|
`For-case` wins the lifetime achievement award here, I think
|
# ¿ Nov 26, 2008 20:33 |
|
|
# ¿ Apr 26, 2024 09:19 |
|
MEAT TREAT posted:Who is Duff and what is his enigma? http://en.wikipedia.org/wiki/Duff's_device e: fixed url brokenness
|
# ¿ Nov 26, 2008 21:18 |
|
Zombywuf posted:Really? Can't say I've seen evidence of this.
|
# ¿ Nov 27, 2008 19:31 |
|
Really the thing that causes more freeze-ups than anything else in modern C++ is the deluge of a hundred lines (of which three may be informative) that occurs when you gently caress up in a way related to templates.
|
# ¿ Dec 2, 2008 00:09 |
|
__really_fucking_inline_i_mean_it_this_time_mister()
|
# ¿ Dec 23, 2008 23:49 |
|
Kharya posted:Oh variable naming. It's an art in and of itself: php 4.2.0 seems oddly appropriate for this code
|
# ¿ Dec 31, 2008 17:15 |
|
Kharya posted:Also, gently caress prepared statements. Except it is broke, and your input is not sanitized properly. You're using mysql_escape_string as your sanitization function. mysql_escape_string is broken and insecure. And you can't even use mysql_real_escape_string without upgrading to PHP >= 4.3.0 . Your poo poo be fuk'd. e: also what Lysidas said
|
# ¿ Jan 3, 2009 04:12 |
|
Btw mysql_real_escape_string has a long history of vulnerabilities (as does every function ever coded by MySQL AB, funny that...), and the PHP folks are nuts for using a really loving thin wrapper over it generally If you are going to code a database-backed php app just use parameterized queries like every other language/framework out there
|
# ¿ Jan 8, 2009 09:05 |
|
Victor posted:How do I parameterize on the table from which I am selecting, using this wonderful parameterized functionality like every other language/framework out there? http://tinyurl.com/7ex6d8
|
# ¿ Jan 8, 2009 09:34 |
|
PnP Bios posted:Ah, my mistake. It shouldn't matter what version of mysql you are using. The mysqli module is does roughly the same thing, just faster and more secure. http://dev.mysql.com/tech-resources/articles/4.1/prepared-statements.html, the first loving Google result for 'mysql prepared statements' posted:Server-side prepared statements are an exciting new feature in MySQL 4.1. In this article, I will explain what, why, when, and how to use prepared statements.
|
# ¿ Jan 9, 2009 06:14 |
|
Smackbilly posted:The best part of reinventing the wheel: you can make it a triangle!
|
# ¿ Jan 11, 2009 18:32 |
|
Zakalwe posted:Did you ever get your drat Anschuetz working
|
# ¿ Jan 17, 2009 03:09 |
|
Flobbster posted:This is all well and good, did anyone submit a bug I mean, the Compiz dev is a senior in high school iirc, he could use all the help he can get
|
# ¿ Jan 17, 2009 03:10 |
|
julyJones posted:There are so many caveats with iterators, for example, I find it easier with most types of data to just stick with vector and traverse using integers. When you start using more complex container types you will be very very glad iterators exist. Also, C++0x is introducing the following foreach syntax code:
code:
|
# ¿ Jan 18, 2009 09:18 |
|
TSDK posted:I've started seeing this rather sub-optimal anti-pattern in a few places recently: How many strings are you testing against by the way
|
# ¿ Jan 27, 2009 22:10 |
|
Just so you know your compiler probably has <tr1/unordered_set> (not that it's necessary here)
|
# ¿ Jan 28, 2009 15:27 |
|
Avenging Dentist posted:I've seen worse things. Hell, I've written worse things (though I usually at least have the awareness to apologize for it in comments). code:
|
# ¿ Jan 29, 2009 00:56 |
|
Otto Skorzeny posted:Just so you know your compiler probably has <tr1/unordered_set> (not that it's necessary here) As of gcc 4.3 unordered_set and friends are in the main include folder and under namespace std :themoreyouknow:
|
# ¿ Feb 5, 2009 00:01 |
|
Wheany posted:Short loop variables can be descriptive, though. For example using y and x instead of, say, the traditional i and j... Meh, any programmer should have taken at least one statics course and thus grok i, j and k
|
# ¿ Feb 24, 2009 23:41 |
|
Avenging Dentist posted:hats Yesssssssssssssssssssssssss this whas the best part of intro to engineering analysis
|
# ¿ Feb 25, 2009 00:06 |
|
Behead those who say K&R is a violent religion
|
# ¿ Feb 27, 2009 02:02 |
|
Flobbster posted:Singletons are almost always pointless, and trying to shoehorn whatever problem you have into a GoF pattern is retarded If patterns have any utility at all, it is not as glorified cookbook recipes
|
# ¿ Mar 16, 2009 23:43 |
|
Janin posted:Non-const references are insanely dangerous because they allow arbitrary unchecked modification of local variables without any accompanying indication at the callsite. To have even a basic understanding of how reference-using code works, a reader must memorize the type signatures of every function and method called (and, if one uses a reference parameter, everything *they* call). At least in C and C# there are sigils to tell the reader "WARNING: this call might do anything to the parameter!". If you don't know what a function does you probably shouldn't use that function
|
# ¿ Mar 17, 2009 05:33 |
|
Janin posted:you try tracking down the source of an irregular once-per-day crash by talking to a receptionist over the telephone What do references have to do with this
|
# ¿ Mar 17, 2009 05:50 |
|
Sure there's a reason, to get you to complain to Sun or Oracle or the Java Community Process or whoever to get some type inference up in this bitch Also as some salt against making AbstractFactoryVisitorBridgeMementoSingletons
|
# ¿ May 15, 2009 14:02 |
|
tef posted:this for new cobol title
|
# ¿ Jun 8, 2009 23:38 |
|
Lexical Unit posted:Found this in a Perl script today I should hope there wasn't
|
# ¿ Jun 11, 2009 23:42 |
|
This* is why warnings and strict should have defaulted to on since like 1995 *among many other things
|
# ¿ Jun 12, 2009 17:26 |
|
two great tastes that taste great together
|
# ¿ Jun 16, 2009 21:40 |
|
Zakalwe posted:From the Bullet SDK User Manual [mp3-yakety_sax]
|
# ¿ Jun 26, 2009 18:52 |
|
Not a horror, butcode:
We had a fun time in the channel kicking around why Linus might have chosen the ((void)0) construct.
|
# ¿ Jul 7, 2009 21:09 |
|
Not everybody itc knew that
|
# ¿ Jul 7, 2009 21:29 |
|
Dijkstracula posted:To say nothing of that ridiculous switch statement could be removed (edit: or at least simplified) if the author had known about fls() Did he specify he was on a BSD? ffs(3) and its extensions are in POSIX.1-2001, but fls(3) and friends are BSD-specific from what I can tell. e: more than BSD-specific, fls(3) first appeared in FreeBSD 5.3 circa November 2004 Blotto Skorzany fucked around with this message at 02:26 on Jul 8, 2009 |
# ¿ Jul 8, 2009 02:22 |
|
Zombywuf posted:I don't think you understand the gravity of the situation. code:
Blotto Skorzany fucked around with this message at 23:47 on Jul 9, 2009 |
# ¿ Jul 9, 2009 23:16 |
|
tripwire posted:Did you write this yourself or just copy+paste it from somewhere? I'm curious how it was made... I only understand perl a tiny bit, but it seems like it would have had to be generated by another program. How/why does the program work, and how would you go about writing a program to generate it? There's a cpan module for everything, and several for most things; the one I used was Acme::EyeDrops e: Did you really think there was a place on the internet where I could have copy+pasted an obfuscated/beautified perl program that outputs 'eat poo poo limeys' in block letters? Blotto Skorzany fucked around with this message at 14:56 on Jul 10, 2009 |
# ¿ Jul 10, 2009 14:52 |
|
Anyways the way the thing works is by making a regex that matches the code you want to execute then eval'ing it; since perl regexes can execute perl code there are ways to do this without calling 'eval' but whatever
|
# ¿ Jul 10, 2009 15:27 |
|
C'mon guys, plenty of people make lovely first posts, our job is to educate them so they don't end up like Victor or Chain Chomp
|
# ¿ Jul 22, 2009 01:02 |
|
Scaevolus posted:What's wrong with it? Does k*sin(x) = sin(k*x) for you?
|
# ¿ Jul 24, 2009 04:16 |
|
Yeah, on a second look I read the parens wrong
|
# ¿ Jul 24, 2009 05:07 |
|
|
# ¿ Apr 26, 2024 09:19 |
|
This is why macros are bad, they kick sand in everyone's vaginas and happens
|
# ¿ Jul 24, 2009 05:28 |