« first day (660 days earlier)      last day (4302 days later) » 

3:00 PM
@GordonM As opposed to a formal foot:
 
@Darkeden Of course they will. You should take down the site from production and start refactoring. There might be a serious issue of malcompliant design, crippling and cursing your entire code.
 
I think the foot is a more natural measurement. It's easier to visualize, and fits inline with most real-word things we'd need to measure. Most things are small multiples of the foot (1, 2, 3, 4, 5, 6), whereas the meter requires lost of decimals, or swithing to CM with larger values...
Now, don't get me wrong, for general measurement I think the metric system is far more natural and easier to scale.
 
@Whisperity I bet there is...but I don't know what I should look for
 
@ircmaxell But, when you have a beer, would you rather have a US pint or a British one? :)
 
he told me about GET and POST variables
 
3:02 PM
Hey there
 
@Leigh I'd rather have a german one. Those things are so bloody cheap
 
@ircmaxell In street speak, we usually describe meter as the average size of one human step. It's usually +- 15cm accurate.
 
I have a question...
 
@Whisperity true, but how much that you measure is greater than 10cm, but less than a multiple of a meter...?
 
@ircmaxell well that's true, but in Germany you'd have to have a half litre. I was aiming for quantity rather than origin :)
 
3:03 PM
@Darkeden Topics about SQL injection, authentication. Take a look at here also: blog.ircmaxell.com/2011/08/…
 
@ircmaxell We used to have non-metric money (based on troy weights of precious metals). You needed a maths degree to work as a cashier.
 
@Leigh I was aiming at cost/quantity, not origin
I drank in Munich, had 5 rounds, and paid like 3.50 euro for it...
 
@ircmaxell Where was that?
 
@ircmaxell Go and visit Oktoberfest, it's 5 euro for a litre
 
Sounds pretty cheap, even for Germany.
 
3:04 PM
@deceze ummm... Munich...?
 
liter a cola?
 
Umm, I have a php script that echo's out a DIV with a button inside it. I call the jquery function $('#id').button() on it to make it a jquery ui button. Problem is when the script gets called again (it's a chat application), the messages' buttons above it get bigger. So.. any advice?
 
@webarto no, wiesenbier
 
Supermarket beer, or a real sit-down-and-order thing?
 
sit down bar...
 
3:05 PM
you can get 5 small tap beers for that, or just one... depends...
 
Wow... pretty good deal.
 
Sorry guys to interupt.
Any of you know how I could solve my issue?
 
not half liters, but about the size of a bottle
 
0.33 :P
 
Well then, thanks for your help?
lol
 
3:06 PM
I'll be in Munich in two weeks, will have to look for that... :-3
 
are you really trying to defend the imperial measurement system ?!
 
Well in the local supermarket near my girlfriends parents (Karlsruhe) - the 500ml bottles are about a euro (and obviously with pfand you get some money back :))
 
@JordanRichards Make a question on the main site or express your issue. It's really crowded right now in here.
 
I'm ate so much chocolate I think I'm having a mild heart attack, help? @JordanRichards
 
Umm, I have a php script that echo's out a DIV with a button inside it. I call the jquery function $('#id').button() on it to make it a jquery ui button. Problem is when the script gets called again (it's a chat application), the messages' buttons above it get bigger. So.. any advice?
 
3:07 PM
@JordanRichards Oh it involves jQuery. @webarto
 
@JordanRichards Try the Javascript room?
 
it involves php too...
The Javascript room is dead
 
@JordanRichards echoing a div..
 
2 hours ago, by webarto
It is sad that chat applications with Websocket are considered cool in 2012...
@Whisperity :P
@JordanRichards jQuery pumps it up, if you repeat command...
 
I'm on a wacky quest; perhaps one of you fellows can help.
 
3:09 PM
What is also sad is I only found out about ErrorException today, and I never thought about re-raising errors as exceptions until I saw Stans mail on internals :(
 
Does anyone know the name of the font used for the "7" on most slot machines?
 
How can I make a site which asks user a regular expression and then checks if it accepts only those numbers that are divisible by 7?
 
too much 7
 
@ircmaxell 2011, no
 
3:11 PM
:-P
 
I only click them when they get spammed in here and someone makes a fuss about it, then I have to come up with some average remark
 
Slot font machine divisible by 7? :confused:
 
@JaakkoSeppälä Start by trying something, then go make a question on SO when it fails, remembering to include what you tried.
 
Yo
 
@deceze No I... wait, what?
 
3:14 PM
@Bracketworks I think it is custom 7
 
@webarto Actually, it isn't (maybe it is, but there's a font built around the 7 glyph at least). At work I had the font; I took home all the assets to get some crap done over the weekend, and go figure, forgot the font.
Forgot the font, forgot the name, forgot the letter it started with.
 
you can't remember because you got wasted
 
ok, I was practising PHP by doing programming problems and got stuck with that. What would be a good WWW-site or a book to learn PHP?
 
Oh, if only it was because I got wasted; I think it's because I'm an idiot.
But I digress.
 
@JaakkoSeppälä php.net
 
3:18 PM
@Bracketworks i.istockimg.com/file_thumbview_approve/6910013/2/… you are looking for this one right?
 
But your way is correct
 
@webarto Spot on sir.
 
Solve problems you think are too big or too hard for you, if you get stuck, you can ask us here on Stack Overflow, we'll help you.
Make sure to post your attempt, and where you are stuck!
 
I think it may have started with a "C"...
 
@JaakkoSeppälä codegolf.stackexchange.com has some awesome examples of PHP
 
3:21 PM
Would anyone mind informing me what I did wrong here? It's not changing any values in the database, I'm guessing I put the WHERE in the wrong spot.
UPDATE `members` WHERE id='$usrid' SET lunchbalance = lunchbalance + $lunchaddvalue
I don't get any errors either.
 
@Alec so did you try putting the WHERE in the right spot? UPDATE table SET x=y,z=a WHERE blahblah
 
@Alec , please , learn to use prepared statements
 
@tereško Prepared statements look too difficult from what I've seen.
 
@Alec learn to do them now, and save yourself pain in the future
 
OK. The problem is that I was unable to find jobs in maths and now I have no proper education in CS. I'm not sure whether I might find a job on information technology. But I will try to solve problems that are not too hard but I will learn something new.
 
3:23 PM
@JaakkoSeppälä projecteuler.net Not necessarily PHP problems though...
 
@Leigh Thanks for spotting my error.
 
hey fellas
do you guys use checkdnsrr() for checking validity of email address's domains?
seems like there are too many exceptions
 
No, I send them an email and make them click a link
 
Hey
is this good way to protect a variable against SQL injection?
$idog = mysql_real_escape_string($_GET['id']) ? mysql_real_escape_string($_GET['id']) : addslashes($_GET['id']);
 
@Darkeden the best way is to not do that.
 
3:27 PM
 
$idog = mysqli_real_escape_string($conn,$_GET['id']);

this is better?
 
7 mins ago, by tereško
@Alec , please , learn to use prepared statements
 
I tried PDO Leigh...but I couldn't understand it...my PDO didn't worked
 
3:30 PM
@Alec They're really not that hard. And their benefits are so massive the slight learning curve involved is far more than worth it
 
ircmaxell told me to first espace strings and then try PDO later
 
heh. i think my profile still says something about prepared statements...
 
my PDO didn't worked
 
@GordonM Alright, I'll look into it.
 
0
Q: Is there a way to apply the button() jquery ui function to a button when it's loaded?

Jordan RichardsBasically. I have a javascript loop that posts to a php script. To append on the response to a DIV in a log. The response has a button inside it. The problem is, when a new response is made and appended, the jquery button function makes all the previous appended buttons larger. (Probably because ...

Could you take a look at that?
 
3:32 PM
I hope that Doom 4 is at least as good as Doom 3 was. Rage was a bit of a flop, but I have hope in game developers like Carmack who admit to faults and obviously want to correct them.
 
yep. i have an example of using pdo and prepared statements in my profile
 
For now I only want to know which kind of mysql_escape I should use here
 
Some of these velodrome events are really weird.
 
@Event_Horizon Is aiming to be another "play in the dark and 99% chance of needing clean underwear" kind of title?
 
@Leigh No, its aiming to be Doom 3, the action fps.
But I don't care, either way as long as the quality/effort on Gameplay is as good as Doom 3 I'll be happy
 
3:33 PM
$idog = mysql_real_escape_string($_GET['id']);
$idog = mysql_real_escape_string($_GET['id']) ? mysql_real_escape_string($_GET['id']) : addslashes($_GET['id']);
$idog = strip_tags(trim($_GET['id']));
$idog = (!get_magic_quotes_gpc) ? addslashes($_GET['id']) : $_GET['id'];
 
@Event_Horizon Doom 3 was fun, once, the darkness was a bit over the top, and couldn't see anything when played with the lights on... was lots of stuff jumping out unexpectedly, which I liked.
 
@Leigh I liked the horror of Doom 3, but I think it dropped off further through the game and that they (ID Software) do better at action titles.
 
I had the Doom 3 edition video card, way back when. 6600 FTW
 
@SomeKittens Same here :P
 
@Darkeden if you insist on pretending you're an SQL compiler, the first one will work. the second is useless, and the third is actively bad if you're trying to escape for SQL -- it doesn't actually escape the stuff that's dangerous in SQL
 
the fourth doesn't even make sense unless you have a constant named get_magic_quotes_gpc, and frankly, it's better if you just scream and die if magic quotes are enabled than try to limp along with them
 
@Alec , then maybe you should pick a different hobby .. try gardening or beekeeping
 
prepared statements are a hell of a lot easier than building SQL manually.
there isn't even any quoting to do, unless you're missing the whole point and inserting data into the SQL string
 
@tereško I don't really appreciate the rude remarks, please stop it. I am reading up on prepared statements now.
 
Guys so I should stop using mysql??
 
3:40 PM
yes.
 
199
Q: mysqli or PDO - what are the pros and cons?

FlubbaIn our place we're split between using mysqli and PDO for stuff like prepared statements and transaction support. Some projects use one, some the other. There is little realistic likelihood of us ever moving to another RDBMS. I prefer PDO for the single reason that it allows named parameters for...

 
@JordanRichards unequivocally, categorically, yes.
 
cHao, if I have one PDO for my code, i believe I can keep it on rest of the code
 
it's been half-deprecated for years now, and iirc is officially so now.
at the very very least, upgrade to mysqli
@Darkeden huh?
 
oh
I'm soooo used to Mysql
 
3:42 PM
@JordanRichards summed up easily. Pro, PDO is PDO, Con, mysqli isn't
 
@JordanRichards I was used to my 9 inch monochrome crt. Guess what...
 
@JordanRichards Go with PDO, make the effort to learn it, it's worth it.
 
@PeeHaa it gave you eye cancer! - much in the same way mysql_* functions do today :)
 
@PeeHaa You're still using it?
 
mysqli works quite a lot like mysql to start out with; the big difference is that the $link argument is mandatory
but really, you want to learn to use the oo'ish interface eventually...it's quite nice
 
3:44 PM
Well the thing is I'm 14... Do you have any links you can show me with YT tutorials on mysqli or something?
I'd find it easier to learn, rather than reading complex articles filled with jgjgokjlgnf,ekjfngkjlk3gnlg
 
@JordanRichards Are you slightly familiar with OOP?
 
Slightly yes. Not very much so no.
 
The PDO tutorials I've seen on YouTube suck, I'll give you that.
 
It's something I need to catch up on.
^ OOP
 
Any ideas why it's re-writing the entire file instead of just adding one line?
 
3:46 PM
First of all, PDO is a library, meaning it is a collection of classes in OOP, which exist to solve a common problem
 
function writelog($log,$logname) {
	$writer = fopen("$logname.txt", 'w');
	fwrite($writer,$log);
	fclose($writer);
}
 
@Truth lol, found any good ones on Mysqli?
 
(credit to @ircmaxell)
 
@Leigh my latin was from choir chanting only. geez was I sweet.
 
@JordanRichards Haven't tried :)
 
3:47 PM
:-)
 
How is PDO hard.. 1) go to php.net, 2) copy, 3) paste.
 
@Leigh That's not a very good way of learning it now is it?
 
@hakre Before you became a man and they kicked you out of the choir.
 
lol
 
3:47 PM
@Leigh it's not just like that..
 
@Truth It's how I learned, why is that bad
 
@JordanRichards Get used to reading. As a programmer, you need to do lots and lots of it. You can't program using videos.
14
The kids these days...
 
I can read...
lol
 
@deceze lol
 
It's just a lot of articles assume you are a computer whizz at things and know all the technical speech
 
3:49 PM
@JordanRichards dictionary.com
 
that's why you start simple and work up
 
@JordanRichards If you're stuck on some sentence, you can always come here and we'll help you through it.
 
@JordanRichards Isn't being a "computer whizz" somewhat of a prelude to being a coder?
 
@Truth that too
 
@deceze You can learn programming by typing. A lot of typing. Obviously.
 
3:49 PM
@hakre Infinite monkeys etc.?
 
if that typing happens to be in some programming language, all the better :))
 
At 14 years of age. I like articles that are informative, yet GET to the point rather than saying like "Historeh of this word was found by the greek BLAH BLAH BLA"
 
I appreciate Niki so much more now
 
I think its funny that I read that article the other day by Jeff Atwood about monitor latency and how bad it is now, and John Carmack mentions how horrible monitor latency is nowadays in his Quakecon Keynote.
 
@deceze Da monkeys. A thousand monkeys. Reminds me on the book by Goodlife.
 
3:51 PM
@NikiC Hey, how'd you get so smart at 'rogramming? Maybe you could help Mr. @JordanRichards.
 
@Leigh Who's Niki?
 
@JordanRichards There's a hell of a lot more to programming than just writing code. That BLAH BLAH BLAH stuff is there for your own good
 
@ircmaxell That would be NikiC without the C, like Nikita without the ta
 
Gordon, What I'm saying is when they say stuff that are NO GOOD
 
@JordanRichards There are some PHP programming tutorials on YouTube for the more visual learners, even if they're not that good. TheNewBoston might be able to help some.
 
3:51 PM
@Leigh right...
 
@JordanRichards Programming has several perspectives, the implementation, the specification, and the conceptual perspective
 
Stuff like 'The history of how php has changed' is fine. But when they say something that's not relevent to the actual article like.. "That reminds me... [insert off topic here]"
 
@ircmaxell was it that hard to deduce? Or did you always imagine the C like a "ch" sound?
 
I'd say the best thing you can do is that you have a mate next to you and you do programming together.
 
I've used TNB, that's where I got trapped by mysql
 
3:52 PM
@JordanRichards How are you familiar with mysql_ but can't understand MySQLi?
 
In order to be a good programmer, you must be able to understand the program you're making on all 3 perspectives.
 
That really rocks. There is even some institutional form of it called pair-programming
 
Levi, I haven't tried
lol
I want to know WHERE to try
 
@JordanRichards php.net/mysqli
 
@Leigh No, more that I've never held that Niki is a valid shortening of Nikita. Niki is a very female name in the US, whereas Nikita is a male name in Russia (predominately)...
 
3:53 PM
before I waste time reading junk, when I could be reading an article that makes it much easier
 
There aren't a lot of reading, and it's a solid start.
 
Thanks truth.
Guys I'll be right back ok?
 
@hakre that'd be an idea...but it's harder than it sounds. i know maybe 3 people who have any interest. :P i pretty much had to learn on my own
 
@JordanRichards I can't wait
 
@JordanRichards Nope, not okay.
 
3:54 PM
@ircmaxell yes very male i.stack.imgur.com/jgq1j.jpg
 
PUBLIC SERVICE ANNOUNCEMENT: go vote on the RFC for finally.
10
 
@cHao Same, but if you want, I'll be there for you :)
 
@LeviMorrison are those votes binding?
 
@Truth awwwww :)
 
@hakre link broken
 
3:55 PM
@LeviMorrison thanks, I forgot to do so (I saw the voting thread, but haven't gone through it yet)
 
goes to uk.php.net/mysqli see's loads of links leaves
:L
 
@ircmaxell I always inferred the camel casing of the C as a word boundry. Nicky is fine as a guys name, Niki not so much I guess, but it could be... with a russian twist... maybe (I wouldn't know)
 
What one do I click?
 
@JordanRichards Hint: Start at the first.
 
3:55 PM
@LeviMorrison how many people in here can vote?..
 
@Leigh I don't know either
 
WAIT A MINUTE
 
@ircmaxell word Nikita is of female gender... names are usually abbr. to four letter words... @Leigh Niki is valid
 
Are you kidding me? It looks exactly like mysql with a i on the end!?!?
 
Nikita (Никита, ) is a unisex name, historically masculine from Russian and related languages. The Ukrainian version is Mykyta (), and the Belarusian version is Mikita (), but Nikita also appears in both countries. All are derived from the Greek Niketas (Νικήτας) meaning "victorious". Beginning in the 20th century, it was adopted for female children in some countries such as France but remains strictly masculine in Russia and other countries of eastern Europe. As an Indian female name, it is derived from the Sanskrit word "niketa" which means abode/ Earth. A similar male name is Aniket,...
 
3:56 PM
@JordanRichards Almost.
 
What is this? What improvment does an i on the end give?
lol
 
@ircmaxell Ok Toni, we get the point.
 
@JordanRichards The back-end is completely different.
 
@ircmaxell Please don't stress wikipedia that much, it is often wrong.
 
@JordanRichards read the pages you're being linked to
 
3:57 PM
 
@JordanRichards It also adds some important functions.
 
@JordanRichards The code for the driver for mysqli is different from mysql
 
@Leigh Don't put an i on the end of Tony...
 
So can I ask some fact-based questions, like bullet ones?
 
3:57 PM
@leigh are you eyles?
 
@ircmaxell , it always brings up the association with "La Femme Nikita"
 
@ircmaxell yes, but, names that end up with "a" are in majority female names... and I was talking about word gender, not name...
 
@JordanRichards This is possibly the most important page to read in the MySQLi section: prepared statements
2
 
@ircmaxell Obviously did it to irk you ;) I've had to live with a unisex yet predominantly female spelling of this name.
 
@webarto in latin languages. Nikita is Russian (the person, not the name)
 
3:58 PM
For example the one head of state that was the beginning of the end of the Soviet Union.
 
Khrushchev :)
 
The functions I normally use are..

mysql_query();
mysql_result();
mysql_num_rows();
mysql_fetch_assoc();

Are all of them exactly the same but with an i on the end?
 
no
 
@webarto Not sure if that counts for forenames, obviously it does for surnames.
 
3:59 PM
Please, don't use mysql_* functions to write new code. They are no longer maintained and the community has begun deprecation process. See the red box? Instead you should learn about prepared statements and use either PDO or MySQLi. If you can't decide which, this article will help you. If you pick PDO, here is good tutorial.
 
^ I know that lol!
 
they are slightly different, the API is different (the function signature), additionally, mysqli has an object oriented syntax as well (which I'd suggest)
 

« first day (660 days earlier)      last day (4302 days later) »