« first day (1507 days earlier)      last day (3659 days later) » 

15:00
Thats my code basically, how come the normal thingy is not working?
@HassanAlthaf Depends on how you get the request uri. But if you really accessed /index.php then that would be the route /index.php, not /. Is that what you mean?
But it doesn't
RUn the show() method as it should
Do you get a 404?
15:01
<?php
namespace AccountingSystem\Controllers;

class Homepage
{
	public function show()
	{
		echo "Hello world";
	}
}
nope, not really.
try doing a var_dump($routeInfo) and see what that gives you
Missing argument 3 for FastRoute\RouteCollector::addRoute(), called in /Applications/XAMPP/xamppfiles/htdocs/Projects/AccountingSystem/src/Bootstrap.ph‌​p on line 33 and defined
@AndreaFaulds But seriously - how hard can using libtommath be if you're already considering to roll your own?
@NikiC It's not hard to use, the problem is all the conversions between zend_long and mp_int
@HassanAlthaf so, how does that code look like where you call addRoute?
@AndreaFaulds pff
15:04
posted on December 01, 2014 by kbironneau

/* by Cyril */

@NikiC Not from performance, I'm just trying to figure out how to implement them...
$routeDefinitionCallback = function (\FastRoute\RouteCollector $r) {
	$routes = include("Routes.php");
	foreach ($routes as $route) {
		$r->addRoute($route[0], $route[1]);
	}
};
@AndreaFaulds Yeah. We have some proper man love going on
4
@HassanAlthaf so that's missing the , $route[2] argument at the end ;)
15:05
@PeeHaa PeeHaa x DaveRandom OTP
Fixed but still doesnt work lol
What does the var_dump give now?
@AndreaFaulds them, as in the bignum operations or the tommath conversions?
array(1) { [0]=> int(0) }
@AndreaFaulds <3
@HassanAlthaf yeah, that's a 404 not found
15:07
@NikiC so, dayum.
@HassanAlthaf the tutorial has the $routeInfo = $dispatcher->dispatch($request->getMethod(), $request->getPath()); bit in it, what does $request->getPath() return there?
u want me to var_dump getPath()?
string(34) "/Projects/AccountingSystem/public/"
oh nvm I got the issue. :P
THanks tho man
@AndreaFaulds No.
Free 10 rep for you @NikiC lol
@HassanAlthaf great :)
15:14
@NikiC Getting a zend_long into a mp_int and vice-versa is difficult
@DanLugg Is the joke I just made on Twitter too cheesy for you?
@AndreaFaulds lol, it isn't srsly, is it?
@DanLugg hint: my nickname "ajf" may or may not be my initials
....Jesus? That's pretty close.
Now I don't feel so bad about my response.
15:18
If my middle name was Jesus I might want to change it
to Jesus Christ
Jesus Christmas.
So people could say "What the fuck are you doing Andrea, *Jesus Chri-
Oh man that's be even better
Andrea Jesus Christmas Faulds.
5
Anyone here able to help me with an SQL Query - I have a column in my table that returns a number between 0-5 for each row. This number represents a status Name e.g. Active, Suspended, Terminated
Is it possible to return the number 0 as Active, and 1 as Suspended and 2 as Terminated etc
Rather than returning the actual integers themselves
@AndreaFaulds ref'd it :-P
15:19
MySQL query*
@James yuno enum?
Not familiar with that, no.
I'll look it up thought if it is relevant
Ah, no it is stored as an Int(1) in the table
It isn't a table I've created, a table created by someone else.
@James It is possible - but why do you want to do that?
hey quick question here , i am trying to insert a value via PDO prepared statements into my db , this value is <script> alert(0);</script>. The problem is that its being inserted like this into the db <script> alert(0);</scr . I do not do any treatment to my string. How is this possible ?
i am losing the ipt> from my string
In the database we have members and each member has a status which is represented by a number
I'm exporting the data but for an end user and want to change it to be more readable e.g. the word rather than the number
@Danack if that makes sense?
15:27
So you're exporting directly from the DB to a csv or other file?
Well kind of, I'm using something called PowerPivot in excel
I'm importing into the PowerPivot model which is like a CSV on steroids
@Joseph what's the code and what's the DB structure
@James You can just use a case statement dev.mysql.com/doc/refman/5.0/en/case.html will probably be easiest.
@Danack Ok thanks, I'll take a look now, I've not used them.
CASE fieldname
  WHEN 0 THEN "foo";
  WHEN 1 THEN "bar";
  ELSE
    "unknown value"
END CASE;
or similar.
15:30
@tereško so i m binding my value $this->stmt->bindValue('0', '<script> alert(0);</script>', PDO::PARAM_STR);
@tereško and then i'm executing $this->stmt->execute();
are you sure that emulated prepares are not left enabled ?
how can i tell ?
@Joseph are you calling something like $pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false); somewhere ?
@tereško no, these are my only options
$options = array(
PDO::ATTR_PERSISTENT => false,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
);
then add that one too
15:33
what's that for ?
it disables the fallback, which was made for MySQL 4.0 ... you should always be disabling it
@tereško ok , i'll do that and try
and if that does not fix the problem, check the DB structure - you might have set something like VARCHAR(24) for that field
also, @Joseph, you really should read wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers
@tereško I just wonder… the client sees if the server supports 4.1+ protocol at initial handshake. Why do we have to manually disable it?
15:38
@bwoebi and why the fuck are you asking me this ?
if it had been my call, I would have had the emulated prepares disabled by default
@tereško no idea… I just learned now that it was a fallback
it's no like PDO had some BC issues to deal with
there was a thread recently on internals wrt this...
@FlorianMargaine then I must have missed it…
@Danack Worked perfectly, thanks.
@tereško the length seems to be the issue :) . It's weird that i didn't have an error saying that data was too big :o !
it's mysql .. you might get a bit better indication is you enabled "strict mode", but not much better, @Joseph
@FlorianMargaine that's not recently… > 1 month^^
@tereško oh well. thanks anyway :)
@Joseph Are you trying to send more than 16 MB?
15:43
wait, wrong thread
@bwoebi I don't get your question .
@bwoebi last mail is from 20 days ago :P
@Joseph basic packet size of mysql is max. 16 MB … not sure what your server supports of packet_sizes…
__clone "changing" state is... bad? I've got an object that's "reset" when cloned.
15:49
Good morning
I'm pretty sure __clone exists so you can change state.
Pretty much exactly for that reason.
Well, deep ref cloning is an obvious case, but I'm wiping the state.
public function __clone() { $this->clear(); }
/me waves
/me waves back
/me waves somewhere...
15:51
/me waves
hey Joe and Anthony
/me shouts ffs
/me slaps @bwoebi with a fish
what's going on?
slappin'n'stuff
15:52
/me likes interrupting series of /me
I think he's trying to import the mIRC trout command to SO chat
not much happening, just monday ...
@Machavity I purposefully generalized because I don't think it's trout season.
lol
15:58
lolwut? ohh. I get jokes.
natural vs super-natural
for some reason, I get a feeling that one can go bald from this
I had to share with someone, I keep seeing it in my bathroom ... hopefully the thought will now leave my head ...
@cspray well, Roll Tide :P
@CarrieKendall Roll Tide!
Didn't like how much the defense gave up but I've been saying for years with option teams sometimes you just gotta out offense them
16:03
neither did saban. you would've thought we lost the way he was talking after
@CarrieKendall Well, if you look at the stats we should've lost that game. If Alabama faces Oregon in the playoffs they can't have a defensive outing like that or that'll be a L
@cspray Toll ride!
sure, but they were playing emotionally so hopefully that will all be back in the bottle against non-rival teams :D
@PeeHaa \troll ride
what's going on @CarrieKendall, been a while?
16:07
seconded
also, hi @cspray, @cspray's beard ...
@CarrieKendall Yea, but like I've been saying for years. Sometimes you just gotta out offense these high octane teams... I see Oregon being the same way
@JoeWatkins Yo, how's it going?
not too shabby @cspray
I needed the beard this Thanksgiving... saw a foot of snow drop on Wednesday :P
@ircmaxell not a whole lot. i've been messing around with m$'s new compliler and their beta release of vNext. what about you?
oh oh I forgot about the crazy snow, that was making news last week in the uk ...
16:10
@cspray give it a shoe...
@FlorianMargaine you could have also had "I didn't know snowdrops had feet?"
I'm not as good as you are for jokes :(
@CarrieKendall not a whole lot, been putting off writing my next blog post
@FlorianMargaine haha, I actually laughed out loud at that. Thanks.
what's next @ircmaxell ?
16:13
architecture
I don't want to be a gossip, but it looked like something happened between igorw and fabpot the other day ... anyone know what it was ?
what day?
@JoeWatkins "I'm... your father..."
@FlorianMargaine be careful, we're talking about two people I consider friends, one of whom I consider a good friend
16:15
Achievement Unlocked: unfollowed by @fabpot
@FlorianMargaine You mean the PeeHaa/DaveRandom relationship?
brb burning some #brands
@ircmaxell I didn't mean to offense anyone
@Machavity that too
@FlorianMargaine if I thought you did, I would have kicked you :-P. Just pointing out
@ircmaxell igor objects to something about sensio, or the way they do business ?
16:17
@ircmaxell lololol
oooh fabpot is fabien potencier...
@FlorianMargaine Lightbulb
i got to attend a talk by dr. nan boden, the director of engineering at google @ircmaxell :D she is truly astounding
yeah, I really wanna know what he said ... so it turns out I do want to be a gossip ...
@CarrieKendall awesome
16:18
@Jimbo yeah the 2nd tweet makes sense now
didn't understand what he meant with "burning some brands" :/
^^ 70 more rep to 80k
@ircmaxell I read it as that the 1st time too... my comment made even more sense
1 message moved to bin
4 messages moved to bin
16:25
@miss_jwo Do you get many nights in your own bed? :)
good question ...
@ircmaxell Does this mean Silex is dead?
I know nothing
me neither
which is really annoying ...
Igor is silex's maintainer?
16:27
@ircmaxell just noticed you are from New Jersey, do you watch Jersey Shore? I heard it's really famous
silex was alive?
@ziGi talking like that is the quickest way to get put on ignore or kicked from the room
10 internet points for being quick to @salathe ...
lol
@ircmaxell sorry, I didn't mean to offend you
that's about the worst way to offend anyone from New Jersey
16:29
@ircmaxell :P
@ircmaxell so... it's your secret fetish?
reality television is just a turn of phrase, like a bird in the hand is worth two in the bush ... nobody is putting birds in bushes and reality television is completely fake ...
I hear Snookie is or got married. -_-
(never heard of the name, googling.)
I don't know what it is all about, I just watched South Park and there was an episode about it and it seemed funny. I didn't know it is offensive to people living in Jersy. I expected it to be more of a funny thing
16:31
one of the spinoffs was filmed literally on my block in Jersey City en.wikipedia.org/wiki/Snooki_%26_Jwoww
I had to walk past their apartment every day
talk about a piece of trash
actually it is sad that there are people who like shows like that together with Honey Boo Boo
I gotta admit I get a little pleasure out of some trashy TV. Like a guilty pleasure.
Additionally I didn't know that Jersey City is one bridge away from Manhattan
but then Jersey City is not part of New York right?
but Brooklyn is
Different States even
@Fabor hnnnng
@ziGi I can see Manhattan from my apartment
I'm closer to midtown Manhattan than most people who live in Manhattan (time wise at least)
user1642018
16:44
hi all.,
user1642018
how can i get my array keys in specific order ?, i have order of keys , how do i tell the array to get arranged by that specific order ?
uasort (user based associative sort)
user1642018
@ircmaxell thanks looking in to it.,
user1642018
i have array like this
user1642018
Array
(
    [page] => /page1.html
    [age] =>
    [verified] =>
    [sortby] =>
    [q] => /my_query
    [mode] => /search
    [category] => /all
)
user1642018
16:47
and looking to get output like this
user1642018
Array
(
    [mode] => /search
    [category] => /all
    [q] => /my_query
    [age] =>
    [sortby] =>
    [verified] =>
    [page] => /page1.html
)
Really? I always thought that ua in uasort() means "Ukraine"
Good morning
Yeah... we heard.
:p
@ircmaxell I rather think this is XY problem…
16:49
this sh*tty network here..
@bwoebi very likely
sorry, not uasort, uksort
Ok, uksort is for @DaveRandom's country :p
.___.
yay, somehow I got php badge? Did nothing ..
@AMB Why do the keys need to be in a specific order?
user1642018
16:52
@salathe so then i can drop the empty value keys and then implode it which will give me canonical url from it.
@AlmaDo 1k upvotes on PHP-tagged questions. Ya jerk -- jelly. I want the badge, but don't feel like chasing it. Any PHP questions worth answering don't get upvotes because they're complex. Everything else is just some variation of a dupe, you might get votes for answering but then you're being a tryhard and contributing to the mess.
@AlmaDo you got the dupe hammer now :)
I'm not answering any questions for around 4 month ..
@FlorianMargaine but you're right. It's working :)
Now I need to write some great answer for mysql and wait when it will fill that badge
something with ~100 duplicates should do
what do you mean?
16:59
that stupid answers get the most upvotes...
heh.. the thing is that my "best" mysql answer is much better than my "best" php answer ..
@AlmaDo please, find a way to optimize LIKE '%str%' queries (not necessarily on word boundaries, so FULLTEXT doesn't work…)
@bwoebi mysql has nothing to do with it as it is a serach-engine question. Or, in general, algorithm question
hmm?
mysql isn't just a thing for that
17:04
Friend someone know how increament el size of the column in the mysql console
3
So you'll need proper index or whatever using right tool
^ it should fit automatically
+------------+------------+
| nombre | clave |
+------------+------------+
| Leonardo | Real Madri |
| MarioPerez | Real Madri |
| Marcelo | Real Madri |
| Gustavo | Real Madri |
+------------+------------+
@AlmaDo mysql just has prefix indices :-/
the field clave don't see
@bwoebi if you know how index works, you have to know, what's the difference between foo% and %foo (or %foo% as well)
I mean, that one which mysql uses :p
in case if B-tree doesn't say anything to you. Also, mysql fulltext sucks
17:07
mysql Ver 14.14 Distrib 5.5.38, for debian-linux-gnu (i686) using readline 6.2
yes, that's the issue. BTREE is just a binary prefix index…
if you know that, then why asking ? Ok, fulltext is another beast
@PeeHaa Some of us have real lives. Sucks.
@DaveRandom jerks! I'm jealous
17:09
@DaveRandom But... @PeeHee neeeeeds you!
That's a pretty long line at the moment
@user3678471 well, try \G then ..
user924016
Morning v2
why v2?
@user3678471 you are missing the 'D' in 'Real Madri'
user924016
@ziGi Second morning for me today, just woke up.. again
17:13
how did it happen?
Naps are awesome
I am feeling sick :(
going to drink some tea and enjoy a movie in my bed
user924016
@FlorianMargaine, yea it is amazing how fresh you can get from a small nap =]
see ya
user924016
@ziGi hope you get better soon
17:14
thanks
@AlmaDo I search a way to somehow define either my own index or something other I don't know … means, I search a solution inside mysql.
@bwoebi no way. Unless you'll write it by your own. That's not the case for mysql. Try to fork mariadb then ..
@AlmaDo well, that goes too far for me :-/
Just don't use mysql for that. There are .. well, normal indexing engines for that
Having a table of a few hundreds of thousand names I'd like to access…
17:20
just create additional indexing data and that's it
Why do I have the feeling, that when I ask for something, it's always impossible…
All things are possible. Impossible things just take a little bit more time to implement.
@philsturgeon Reddit is the worst fucking place in the world.
yeah, when I want something impossible in C, I need to extend gcc, but for everything else it's fine, no? :-P
@DanLugg he's clearly never been to room 10
17:25
lol, I had to check the room. and, perhaps, yes.
and, btw. @bwoebi, depending on your requirements it can be implemented in mysql by adding some additional data
Is there a way to choose PSR-2 rules for phpcs in PhpStorm AND select some custom rules?
@AlmaDo hmm?
17:54
Morning.
We're all made of exploded start material. Dust that was created when a start exploded billions of years ago. So that means that by definition we are a manifestation of the universe trying to understand itself...
Anyone here has experience with runnable.com? Trying some simple PHP code but no output :( Do I have to do something with the terminal to make it run?
that's only the case if big blast theory is correct sigh but that leads to another discussion which I'm not ready to start now
I tried reading the help center, but they don't describe any such thing :/
@ircmaxell Most trees obtain most of their mass through the carbon in the air.
You have no idea how profoundly this hit me when I realized that.
18:00
@AlmaDo no, how the universe started is irrelivant to the way matter was created today
assumption may be wrong as well as all the consequences, done by it
@ircmaxell matter isn't created ;-)
@ChrisBaker it says page does not exist
Well, it works for me, looks like you can't link to output that is not saved and published.
You type your code in the box and click "Run"
18:07
Oh well, I am trying it with more directories and files, and I guess that is where the problem is. If you don't mind, can you try doing something like that? It would be a great help!
@AwalGarg Yep, works fine.
@ChrisBaker yeah figured. Thanks anyways ;)
folder/include.php: `<?php `echo 'Like what?'; ?>`
index.php: `<?php require('folder/include.php'); echo ' Like a baws'; ?>`
eh, stupid markup
Anyway... yeah, it worked
Morning
18:21
hey PHP room, we at the js room have a coding challenge to learn new technologies, you're welcome to chime in. It's not JS-specific.
user924016
@FlorianMargaine already upvoted your ada
user924016
agh seems someone countervoted =[
yeah... the thread had a lot of downvotes
@DanLugg sure it is
and also, by created I mean in the form that it is in (heavy elements)
@Gordon where would you suggest in north-west germany for wurst? we're talking about doing a day-trip from Benelux into Germany for wurstcon-eu
18:39
@DaveRandom lol, now serious. What have you been doing :P
ohai room
user924016
wb @PeeHaa
@ircmaxell You're doing a day trip for sausage? That sounds pretty bad. If you have to go out of your way to buy some cheese as well it would turn in into the wurst-kase scenario.
ba-dum-tish.gif
@Danack :-)
13:41 <ircmaxell> actually, I think we need to expand the scope of wurstcon to include cheese
13:41 <ircmaxell> that way it can be wusrt-kase-con
user3949359
18:46
I'm in my localhost PHPmyAdmin and I don't see an update button to change the values of elements in the SQL table I'd like to tweak. How do I do this?
run an UPDATE query
user3949359
@FlorianMargaine For every element? I'd be better off just deleting the thing and creating a new one.
I'm on a real Meshuggah kick. General awesomeness.
19:05
@DanLugg That's a bit heavy for me - have you heard of Falconer
@Danack I have now :-P Not bad
The first song on that album sounds a lot like something I've heard before...
Shit, I can't think of it, but I know the song title is in an M3U in a ZIP in an ISO on a dismounted HDD I have in a box at home.
@ircmaxell Your meal will be ready in ⅞'s of a second, please get under the table.
when your meal requires protective eyewear, you know it's either going to be amazing or potentially fatal
^^ amazingly fatal :-P
Does anyone know if PHP_GINIT_FUNCTION has to be 'linked' anywhere - i.e. does a module just need to declare it and PHP will pick it up automatically, or does it need an entry somewhere saying 'using this function for this module' ?
it's part of the module declaration
thanks.
ob_start(); var_dump($this); return md5(ob_get_clean());
20:26
> You could translate simple Lisp programs into Python line for line. It's 2002, and programming languages have almost caught up with 1958.
reading this, it's fun :P
20:50
@BenjaminGruenbaum I don't see why you want to delete it...
@HamZa A vs B posts promote a lot of misinformation, cover very broad topics and don't actully teach you anything.
got it
user924016
@FlorianMargaine have you written a IRC bot in ADA before?
@ircmaxell what kind of wurst?
user924016
20:52
@FlorianMargaine thanks
@Gordon any :-)
@ircmaxell we got wurst everywhere
i dont know any special place for wurst

« first day (1507 days earlier)      last day (3659 days later) »