So read the first line to determine the version and run the parser after that?I mean, I'm sure there's a lot of smaller problems to solve, but it definitely seems possible and worth it.
Maybe you could start that first line with #!
So read the first line to determine the version and run the parser after that?I mean, I'm sure there's a lot of smaller problems to solve, but it definitely seems possible and worth it.
Maybe you could start that first line with #!
Shall I create a language who's name begins withp
, and have the even more terseef
as a keyword? It's shorter thatelseif
,elsif
, andelif
!
Ef that!
My wife and I used to watch "The Biggest Loser". We'd DVR the 2 hour (yes, TWO HOURS) episodes and fast forward through all the precaps, recaps, and in-show commercials... we would condense the entire 2 hours down to less than 40 minutes that way.
So with your special diet, The Biggest Loser is the biggest loser?
Yes, there are such things as girls on the internet....... sorry. that waxs a bit of a low blow.
The Internet: Where men are men, women are men, and 13-year-old girls are FBI agents.
Generally, the preferred technique varies from person to person (as demonstrated in the common core thread). Overall, an individual's preferred technique is no more correct than another individual's. That is what I was getting at.
I know, I was just going for some snark points.
1. Simple integer addition, such as 2 + 3. While there are a few different techniques that can be used (simple memorization, counting on fingers or a number line, etc.), none is inherently<sup>1</sup> better than another as long as the technique used gets the correct answer. In this case, as long as you get the correct answer of 5, you can say "I did it correctly."
Honestly, if you can't think of any ways of doing addition that would be "more" or "less" correct, you aren't trying very hard.
Begin the Rube Goldberg contest... now!
3. is "more correctly" correct? it sounds weird so i'm never sure.
If you're talking about "I did that thing more correctly than the idiot that did it before me", then yes, that is correct. If you're describing a thing (you aren't describing how a thing was done), then it would be "My way is more correct than the idiot's way".
No, I'm not, but it's irrelevant, because we have both of those words in my language too (implicitný / inherentný), and it's the same difference.
I don't believe it, somebody used "same difference" correctly.
I could care less. If you don't think it's a mute point your more pedantic then I thought
Fixed that for you.
And here I was hoping that this was about the software. Internet Exploder was great.
What! A buggy Java program? Naaaaah. You gotta be joshin' me.
No, it really is a buggy Java program.
And stop calling me Josh.
it's pretty, but i wish the snow would go away. i'm done with winter.
At least Portland knows how to deal with the snow. Unlike some other major cities in New England.
What's the over/under on when the snow mountain at Baxter Boulevard will melt this year? I remember some years when it was something like June 1.
Ayuh. I saw the 207, and wondered why someone would use Maine as a throwaway number. Then I thought, wait, 775 is Portland. Darn, what's 4321 again.. oh yeah!
Obviously not quite as useful these days with the Internet and all, but I remember calling that number pretty often as a kid.
hmm... I just gave Google +12077754321 as my phone number for my throwaway accounts... That's the time and temperature line for the time and temp building in Portland Maine BTW, in case you feel inclined to call it it'll just tell you the local time and temperature.
I knew that number looked familiar. Leave the Big Ass Time and Temp sign alone!
Example of complex user interface: Facebook, YouTube, Twitter, Freelancer, and etc.
If those are their examples of complex user interfaces, I want to know what their idea of a simple user interface is. Maybe Notepad?
@joe.edwards said:
In the overhead scenes in Blaster Master for the Nintendo Entertainment System, if the level number was even, damage effects continued when the game was paused. You could throw a grenade, and pause the game to kill a boss rather quickly (or yourself, if you happened to be taking damage). It always seemed like more of a bug than a cheat, but I could never explain why it didn't work on odd levels.
I think it was the first Mega Man for the NES that had a similar bug. Some weapons could damage an enemy and then keep going to hit other enemies behind it. The timer that prevented the same enemy from getting damaged with every clock tick wasn't stopped by pausing the game, though. If you get a shot over an enemy, then keep mashing the pause button, you could keep damaging the enemy without anything else happening. It was especially helpful against a couple bosses.
@kwiksand said:
@Blue said:
What kills me, and I'm sure it had to occur to others, is that when I
first saw the URL, I read it as "Penis-land". Like some kind of
phallic amusement park.
ROFL!
I'm shocked, Pen-Island isn't funny, thats the whole point..How about www.expertsexchange.com though I don't think that exists anymore.
They changed to www.experts-exchange.com for exactly that reason. Not that the change made the site any better.
@shakin said:
PEAR's Database library comes to mind as the official one.
PEAR really isn't official anything. The bundled database class since 5.1.0 is PDO. People that don't know about it, even if they haven't migrated their code yet, should probably spend a bit more time keeping up with this kind of stuff.
@ObiWayneKenobi said:
I live in a "Right To Work" state, which means that a company can legally fire you for any reason (or no reason at all).
The states I've lived in call it "at-will employment", and there is a positive side to it. Your employer can fire you at any time for any or no reason, but you can also quit at any time for any or no reason. If working conditions are really that bad, you can just tell your boss off and leave without fear of being sued.
Part of a method *doc comment:
[code]* @return Boolean true or false[/code]
But what about FILE_NOT_FOUND?
I know it's not really a programming question, but I figure there's enough smart people around here that maybe someone knows a solution. I have an old hard drive that had Windows XP installed on it and had a couple logical volumes on it. In the process of trying to install Linux to be able to dual boot, I completely lost the ability to boot into that install of Windows. I now have a new hard drive running XP. The new install can see the old drive and has full access to the first logical volume, but it can't see the second and third ones. The drive listing in My Computer shows that drive as having a total size of about 100 GB, but Disk Management lists the drive as having a single 232 GB partition. I found a utility (PC Inspector, http://www.pcinspector.de/) that can find the lost logical volumes, but it gave an error when I tried to copy the files off the drive. Does anybody have any other ideas, such as some other Windows utility or even a Linux utility that would be on a LiveCD?
There's a stretch of highway in Massachusetts where you're going south on I-95 and north on Route 3 at the same. The direction you're actually going in is west-southwest.
Even if you assume that this function would only work on small files, it's still a pretty big WTF.
if (file_exists($file1) && file_exists($file2) && (file_get_contents($file1) == file_get_contents($file2))){
return true;
} else {
return false;
}
Obviously this would still have resource issues if you're working with files that are 100 MB, but it's still better than reading the file, imploding the lines, calculating a CRC-32 of both files, and converting the checksum to decimal.
If that's the worst thing you find in a *nuke system, I would be very impressed. *nuke is the Internet Explorer of, well, whatever the hell *nuke is supposed to do.
@PSWorx said:
um, how exactly do you define "compile time" in PHP?
If I remember correctly, PHP is one of those compiled-into-bytecode style languages, so I guess technically you can use the term "compile time". Usually, "compile time" in languages like PHP (and Perl, Python, etc.) refers to parsing, which is when syntax errors are caught. Since C et al catch syntax errors at compile time, the term stuck, even with languages that aren't really compiled.
That and "parse time" sounds kinda stupid.
@MarcB said:
"The form only ever will submit a 'y'..."
That right there is the source of a very large percentage of security issues on web sites. Anyone (other than a student or new programmer) that thinks that should probably not be anywhere near the server end of a web site.
If php.net guesses your language incorrectly (and be realistic, guessing that based only on what your browser sends isn't quite perfect), you can change it by clicking on the "my php.net" link in the top navigation list.
Let's see if I can pick an answer that's both right and wrong.
My favorite person in history: John von Neumann
If you think it's because of his involvement in mathematics, physics, and digital computing, it's a good answer.
If you think it's because he hosted parties every night until 4:00 a.m., it's probably a not-so-good answer.
@Cap'n Steve said:
I was just about to make a PHP thread. Here's my contribution, from the [url=http://us2.php.net/manual/en/function.strpos.php]page for strpos()[/url].
This function is supposed to return the position of the first occurrence of a string within a string, but come with this warning:This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE, such as 0 or "". Please read the section on Booleans for more information. Use the === operator for testing the return value of this function.
So basically you can be pretty sure it won't return an object or an array, but anything else is fair game.
That's an issue with the person that wrote the documentation. As far as I know, strpos() always returns an integer if the needle is found, or false of the needle isn't found. I don't think I've ever seen strpos() return a string, and I'm not sure why the documentation writer thinks that it can.
@Volmarias said:
AOL being "lazy" and not wanting to make sure that the page looks perfect in browsers other than the big two
Netscape is still considered one of the two most commonly used browsers?
@Malfactor said:
ALL the files that run on Windows XP ust also run on the BlueOrb OS.
So not only does he want a completely new operating system (or maybe Operasting System is something else entirely...), he also wants a 100% functional version of WINE? I can't see how anyone could turn down $3000 for a project like this.
Does he not even realize that every current high-level (i.e. higher than C) language has some sort of basic date handling classes/functions? Or is he one of those people that still believes Perl should be a write-once-read-never language?
@Cap'n Steve said:
3 RPG classes
Let me guess, Fighter, Rogue, and Wizard? Clerics always get shafted, huh.
Okay, try this one...
Damn, 3 whole classes on launching grenades? Kick ass.
Impressive. I don't know anything about IIS, so this is just a guess, but maybe the page itself is correct, and the server is misconfigured to have .asp and .mspx point to the same file? There's (sorta) nothing wrong with a meta-refresh time of 0 if it actually goes to a different page.
@stinch said:
Just look through the function reference, there is very little consistency at all. Many sections do stick to one convention or the other but many of the bigger sections don't. There are often very closely related functions like htmlentities and html_entity_decode that are named inconsistently.
Yeah, that can get pretty annoying. It's one of the things that everyone wishes would be changed, but backwards compatibility dictates never will. I was referring more to underscores vs. camel case, which is consistent.
Very interesting method of key "encryption".
And where's this Maine Institute of Technology anyway? If I had known about it, maybe I would have gone there instead of the University of Maine.
[quote user="merreborn"]
Somewhat related to one of the prominent criticisms of PHP.
Some functions use camelcase:
http://www.php.net/manual/en/function.dom-domelement-setattributenode.php
Some use underscores:
Some don't use underscores:
They can't settle on one or the other, even in their own library functions. That was one nice thing about Java. They defined at the outset exactly how functions, classes, and variables should be named (camelcase, w/ or w/o the initial char capitalized, depending on context). If you know a function is called "do something", you don't have to try to remember if it's actually do_something(), dosomething(), or doSomething().
[/quote]
Actually, the first two are pretty consistent in PHP. Normal functions such as array_slice use underscores (usually, at least; never camel case though). Class methods such as DOMElement->setAttributeNode use camel case (though these methods may be available as normal functions, using them that way is definitely not recommended or used by any sane programmer).
[quote user="Pap"]And to others: superglobals only allow the request data to be defined as individual variables within the global scope of the document, not functions.[/quote]
Maybe I'm misreading that, but superglobals ($_POST, $_GET, etc.) are always visible within every function, hence the name superglobals.
My first thought was that what was posted was pretty much the entire script, so The Real WTF (tm) was that some spammer could take advantage of it with a script that keeps hitting http://www.example.com/mail.php?name=foo&email=foo@example.com&message=spam
If it's done by the same group as PHPNuke, I'm not at all surprised. Whenever some poor idiot asked about PHPNuke, I'd just copy/paste this gem:
From the PHPNuke FAQ: If you get lots of Notice lines in your PHP-Nuke output like this: [notice messages] then the error level for the reporting is too high. Set display_errors [sic] so that PHP will display all errors, except notices, in your php.ini.
I probably should have mentioned that this was on Flash MX 2004 (yeah, I know, we're planning the migration pretty soon), so more recent versions might have fixed this issue. Being able to redeclare a local variable and have it overwrite the original declaration would be a bit strange, but not a really big WTF. It's the fact that the compiler still thinks the redeclared variable is of the original type. The three possible ways of handling redeclaration I can think of would be
If the user can't do it on the site, what are the odds that a front-line support person has access to do it? I wouldn't be surprised if the only way to change it would be for someone to change it directly in the database (or flat file?) with a standard database client (or text editor).
So this one took me about half a day to figure out. I was working on some inherited code that looked something like this:
public function someFunction(){ var foo:Class1 = new Class1(); // Do stuff with foo... var foo:Class2 = new Class2(); // Do stuff with foo }
I had to add a property to Class2, but if I tried using that property, I kept getting a compiler error. I used the new property in other files and it worked fine, so I had no idea what was wrong. At some point, I tried changing the second foo to foo2 and it started working. Apparently you can redeclare variables within the same method, but the compiler always treats it as the first type it's declared as. The problem never came up because Class1 and Class2 were both children of the same class, and the only properties used were ones that both classes had in common. Allowing variable redeclaration without changing the type makes me say "WTF?"
I never knew that Java's null is actually an instance of the HappyFunBall class.
[quote user="Quincy5"]This is exactly why I never let Windows automatically install the updates, but only let it download them to get a notification that there are new updates. Then I can decide myself when to install the updates and do the restart; e.g. just before I was going to shut the computer down anyhow.
[/quote]
That doesn't actually always work. That's how I have my computer set, and it will still install the updates and reboot at 3:00 a.m. if there's a patch that Windows thinks is important enough. Because it's common knowledge that nobody would ever leave anything running overnight.
Read the last part again. Also note that there is no previous Javascript setting the selected element, only the HTML source.
[quote user="Vector"]I actually have the same problem in IE with a login system.
If you type the password and hit enter, no matter how many times you do it, it will not work.
If you type the password and then click on the login button, it works.
This is on a PHP system. It works in FF and Opera fine, just IE.
Go figure.
[/quote]
Are you checking for the existance of $_POST['button_name']? PHP doesn't care about pressing enter or clicking the submit button, since the text/password fields get sent to the server either way. However, I do recall an issue where most browsers pass the submit button as a regular input field, but IE only sends it if you actually click the submit button; pressing enter in the form doesn't pass the submit button.
$accreditation['level'] is also more or less the number of dimensions in the array, so I don't think the suggestions given above would work. The loop you would need would be something like this:
$current_node = &$menu_tree; for ($i = 0; $i < $accreditation['level']; $i++){ $current_node = &$current_node[$last_accreditation_id[$i]]['mentry']; } $current_node[$accreditation_id] = $accreditation;
Of course, storing data like this is probably a WTF itself.
I wouldn't necessarily say that this is a real IE WTF, but the code I had to write for it sure is.
function onload_func(){
document.getElementById('some_multiselect_box').selectedIndex = document.getElementById('some_multiselect_box').selectedIndex;
}
When a page loads, IE won't scroll a multiple-select box to the initially selected item (Firefox does). Changing the selected item, though, scrolls the box to the correct place.
The House of Yahweh Prophecy
of 9-12-2006 Has Been Fulfilled
<br /> Stay tuned for upcoming details</p><p></blockquote></p><p> </p><p>Wow, they managed to scoop every major media outlet in the world. </p>
Maybe it's just me, but this strikes me as a pretty big WTF:
"This website started with SQL info. becaue I think SQL is the most basic but must know thing for all software developers. Eventually, I will make this website covers other topics such as .NET, SQL Server, Oracle, DB2 and so on. I will update it everyday."
If the site is primarily about SQL, wouldn't that imply that it's general, non-DBMS-specific SQL information, such as standard queries and relational database design? But he also wants to "cover other topics" that include three specific database systems. If that's the case, what system is he using for the information he already has?
I dunno, I guess it's just me.