|
Munkeymon posted:Sometiems you just have to try even harder to get your Annonces I guess vv Turns out $photoList is a global variable that gets declared and transformed inside getAnnonces(). In fact, it is returned by the function, so all you'd think this does is assign the variable to itself for some reason. Well, it would, if the original programmer would have thought of declaring it as global outside of the function's scope. $photoList exists as a global variable inside the function, but has a local scope outside of it. If this isn't some kind of meta-obfuscation I don't know what it is.
|
# ? Jan 11, 2010 18:07 |
|
|
# ? Apr 26, 2024 13:20 |
|
Can somebody explain to me why my old code:code:
code:
|
# ? Jan 14, 2010 00:17 |
|
How were foo1 and foo2 declared? Dynamically? Maybe someone's trying to avoid a race condition or memory leak?
|
# ? Jan 14, 2010 00:51 |
|
jandrese posted:How were foo1 and foo2 declared? Dynamically? Maybe someone's trying to avoid a race condition or memory leak? How the hell do you declare something dynamically
|
# ? Jan 14, 2010 01:10 |
|
Vanadium posted:How the hell do you declare something dynamically Well you just hardcode it :iamafag:
|
# ? Jan 14, 2010 03:16 |
|
Vanadium posted:How the hell do you declare something dynamically code:
|
# ? Jan 14, 2010 03:22 |
|
code:
|
# ? Jan 14, 2010 03:33 |
|
jandrese posted:How were foo1 and foo2 declared? Dynamically? Maybe someone's trying to avoid a race condition or memory leak? No, they're just plain old attributes. There was absolutely nothing wrong with the original code, it was apparently just not complicated enough
|
# ? Jan 14, 2010 03:36 |
|
mr_jim posted:
|
# ? Jan 14, 2010 04:56 |
|
How did i not know that? Are there any other neat tricks in a similar vein to that?
tripwire fucked around with this message at 05:00 on Jan 14, 2010 |
# ? Jan 14, 2010 04:56 |
|
mr_jim posted:
|
# ? Jan 14, 2010 05:28 |
|
tripwire posted:How did i not know that? Are there any other neat tricks in a similar vein to that? Cut out the middle man: code:
|
# ? Jan 14, 2010 05:56 |
|
mr_jim posted:Cut out the middle man: Wow, thats insane! It's almost like having an interactive c REPL console for loving around with. I could see that coming in handy for just testing snippets of code without bothering to build and make a big project.
|
# ? Jan 14, 2010 05:59 |
|
tripwire posted:Wow, thats insane! It's almost like having an interactive c REPL console for loving around with. I could see that coming in handy for just testing snippets of code without bothering to build and make a big project. Make a big project? Just edit test.c with a text editor (ever tried actually typing code into a terminal? ugh), compile, and run it.
|
# ? Jan 14, 2010 06:02 |
|
code:
edit: No, I'm not. If you add "-ldl" to the gcc command, you never need worry about using a dynamic library function: code:
mr_jim fucked around with this message at 06:33 on Jan 14, 2010 |
# ? Jan 14, 2010 06:12 |
|
code:
Now whats the biggest WTF here?
|
# ? Jan 14, 2010 06:44 |
|
Perhaps a small change is called forcode:
|
# ? Jan 14, 2010 10:49 |
|
tripwire posted:Wow, thats insane! It's almost like having an interactive c REPL console for loving around with. I could see that coming in handy for just testing snippets of code without bothering to build and make a big project. http://neugierig.org/software/c-repl/ * 20 minutes of haranguing haskell, and I now get this* code:
tef fucked around with this message at 13:16 on Jan 14, 2010 |
# ? Jan 14, 2010 12:44 |
|
http://root.cern.ch/drupal/content/cint I have no idea how good or bad it is.
|
# ? Jan 14, 2010 14:43 |
|
Zombywuf posted:Perhaps a small change is called for Well, if you need that much hand-holding: code:
mr_jim fucked around with this message at 18:15 on Jan 14, 2010 |
# ? Jan 14, 2010 17:02 |
|
quote:CINT is written in C++ itself, with slightly less than 400,000 lines of code.
|
# ? Jan 14, 2010 17:22 |
|
If you really want something that approaches a REPL for C++, why not go the whole distance and turn it into an IRC bot.
|
# ? Jan 14, 2010 19:23 |
|
Vanadium posted:If you really want something that approaches a REPL for C++, why not go the whole distance and turn it into an IRC bot. Well that would just be silly. VV no, I got it. mr_jim fucked around with this message at 19:42 on Jan 14, 2010 |
# ? Jan 14, 2010 19:34 |
|
mr_jim posted:Well that would just be silly. *whoosh*
|
# ? Jan 14, 2010 19:42 |
|
Dear former intern: Just because .NET allows you to pass any object in the sender field of the event, does not mean you should use it to pass any arbitrary data. The first google result of "C# Custom Event" shows you exactly how to pass in custom event args. Also, if your dialog only contains an ok and cancel button, you don't need to fire an event on when ok is pressed. Use the Dialog Result instead.
|
# ? Jan 14, 2010 20:33 |
|
Mustach posted:http://root.cern.ch/drupal/content/cint I had to use it for a brief period of time. It was interesting...
|
# ? Jan 15, 2010 02:16 |
|
http://netbeans.org/bugzilla/show_bug.cgi?id=167395 Synopsis: User: Your singleton has a public constructor and multiple instances of it are made. Dev: Oh, it is not so bad, the extra instances of the singleton are thrown away. User: Uh...
|
# ? Jan 23, 2010 13:25 |
|
Ryouga Inverse posted:How are you going to deal with the corpus of already-existing code? Re-write it when it fails or needs modification. Probably end up with something neat like MUMPS-Linq.
|
# ? Jan 23, 2010 14:29 |
|
code:
|
# ? Jan 25, 2010 00:18 |
|
Vanadium posted:!coherent
|
# ? Jan 25, 2010 00:54 |
|
sund posted:!coherent I think you mean !(!coherent != !true).
|
# ? Jan 25, 2010 03:57 |
|
Vanadium posted:
maybe he doesn't know that == tests for equality?
|
# ? Jan 25, 2010 05:34 |
|
MasterSlowPoke posted:maybe he doesn't know that == tests for equality? Yeah, but != tests for !equality. So..... !?
|
# ? Jan 25, 2010 06:10 |
|
Long ago in college he spent hours debugging a program where he'd mistakenly typed = instead of == in a condition. Never again.
|
# ? Jan 25, 2010 06:33 |
|
YeOldeButchere posted:Long ago in college he spent hours debugging a program where he'd mistakenly typed = instead of == in a condition. Gotta love new age compilers eh? poo poo, even codesense/intellisense will pick that up nowadays.
|
# ? Jan 25, 2010 12:39 |
|
Yakattak posted:Gotta love new age compilers eh? poo poo, even codesense/intellisense will pick that up nowadays. Clearly the problem here was a bad compiler...
|
# ? Jan 25, 2010 12:57 |
|
Nippashish posted:I think you mean !(!coherent != !true). That has to be programming by permutation. I refuse to believe anyone deliberately writes code like that.
|
# ? Jan 25, 2010 14:59 |
|
TRex EaterofCars posted:That has to be programming by permutation. I refuse to believe anyone deliberately writes code like that.
|
# ? Jan 25, 2010 19:49 |
|
I got no code to show, but I've just found out about this bug: A coworker of mine was saving hours in a database and chose to use the complete timestamp format (YYYY:MM:DD HH:mm:SS). However, he built the date using mktime() before sending it to the database. When there are parameters missing, mktime() completes them with the local date and time. For some reason, this made it so the main site would show an event's hour as right or wrong depending on the time of the day it was saved on in the admin panel. I still don't really get how or why this all happens, but it made my day hell.
|
# ? Jan 25, 2010 21:58 |
|
|
# ? Apr 26, 2024 13:20 |
|
code:
|
# ? Jan 26, 2010 05:30 |