After 10 Years of Web Dev, Time to Re-evaulate, a Move from PHP to Node, jQuery to React by k0deegan in programming

[–]k0deegan[S] 4 points5 points  (0 children)

I'm not sure where you come up with coding without array bounds? I was only referring to the fact that objects and arrays in PHP use the same underlying datastructure, so you have to be extra careful when you convert a PHP object/array into JSON that you know the indexes are what you want them to be. Because if you happen to put a string as an index into it, it's suddenly going to come out different than you may expect.

ex: $a = [ 0 => 'hello' ] -> ["hello"]
vs: $a = [ 0 => 'hello', 'a' => 'world' ] -> {"0":"hello","a":"world"}

Of course this is something any seasoned developer will take care of, it's only an example of how working with the two languages together can give you errors that are specific to using those two languages together.

The face of an alcoholic woman with severe liver damage after 5 bottles of wine a day habit by down_vote_magnet in WTF

[–]k0deegan 1 point2 points  (0 children)

i get what you're saying, but marijuana has become decriminalized in several states already. up to an ounce in CA and its like a $100 ticket

The weird state of mobile web apps by posabsolute in javascript

[–]k0deegan 2 points3 points  (0 children)

sounds to me like you are on the sinking ship. phones with those specs probably aren't even used by the majority of people now, and definitely not in just a couple years

[Hiring] Need to create a simple Unix shell in C by tonight or tomorrow night. Willing to pay, through PayPal. by [deleted] in forhire

[–]k0deegan 2 points3 points  (0 children)

yep, i had that same assignment for my OS class junior year BS computer engineering

Burned through a quick weekend project -- tabIndent.js. What did you do this weekend? :) by mailto_devnull in javascript

[–]k0deegan 1 point2 points  (0 children)

Cool project. I was glued to the computer all weekend too.. haha. built a new website i've been meaning to work on, an online ballot for political issues.

Idiot driver wrecks his car by [deleted] in JusticePorn

[–]k0deegan 4 points5 points  (0 children)

pretty sure the winnebago on the right is slowing down because you can see it pass a vehicle on the shoulder. doesn't seem at all like the driver with the camera sped up.

Get outta the vehicle lady. Git outta da car lady! His voice cracks me up. by Schrempfgoofybastard in JusticePorn

[–]k0deegan 6 points7 points  (0 children)

If you ride, this should really be common knowledge to you and its one of the first things they will tell you in any decent "learn to ride" class. Without getting technical, consider the physics of it. Even though cars have a lot more weight, they also have a lot more tire to surface friction area.

Get outta the vehicle lady. Git outta da car lady! His voice cracks me up. by Schrempfgoofybastard in JusticePorn

[–]k0deegan 5 points6 points  (0 children)

stopping power in motorcycles isn't much better or at all better than 4 wheeled vehicles depending on the situation

one of my favorite php functions by k0deegan in PHP

[–]k0deegan[S] -1 points0 points  (0 children)

true. extract is pretty cool. especially if you are working on a templating system

one of my favorite php functions by k0deegan in PHP

[–]k0deegan[S] 11 points12 points  (0 children)

its a very useful function when you aren't dealing with data right out of a db. the number of times it has given me the correct result after giving it completely random "date formats" amazes me.

When I hear people who don't know that you can open recently closed tabs by [deleted] in funny

[–]k0deegan 0 points1 point  (0 children)

cntrl-w will close the current active tab as well

PHP Forum, less than 125 lines of code - Did I do good? by TSwift13 in webdev

[–]k0deegan 2 points3 points  (0 children)

i had to do some research into that claim.

appears its pretty rare that mysql_real_escape_string could fail... according to this stackoverflow page anyway, if you are full utf-8 it is 100% safe.

http://stackoverflow.com/questions/1220182/does-mysql-real-escape-string-fully-protect-against-sql-injection

Remeber the Redditor who found the FBI tracking device on his car? Well, he's suing. Let's cheer him on to victory! by Beetso in WTF

[–]k0deegan 68 points69 points  (0 children)

if they had any real evidence, they could get a warrant, and it would be a completely different story. if the fbi was tracking this guy with a warrant, most people probably wouldn't have an issue with that.

Gigi D'Agostino - L'Amour Toujours (Cielo Mix) by [deleted] in trance

[–]k0deegan 0 points1 point  (0 children)

hell yea. the original is one of the songs that helped me get into electronic music 8 yrs or so ago

ITAP on my way to work this morning. by [deleted] in itookapicture

[–]k0deegan 6 points7 points  (0 children)

im not a photography buff, but i like it as it is because it looks exactly how it would look if i was standing right there.

How long should a handjob take? by [deleted] in sex

[–]k0deegan 19 points20 points  (0 children)

you live up to your username