@Lorne Kates said:
have never bought from Canada Computers againTRWTF is buying something online from Canada Computers when DirectCanada exists. Or Newegg. Or NCIX. Or, hell, even TigerDirect. But Canada Computers?
@Lorne Kates said:
have never bought from Canada Computers againTRWTF is buying something online from Canada Computers when DirectCanada exists. Or Newegg. Or NCIX. Or, hell, even TigerDirect. But Canada Computers?
@HardwareGeek said:
Not to mention that calling st.nextToken() twice each time through the loop also removes the delimiters, assuming every other token is a delimiter.
...and it's totally unnecessary, given that the token is ignored if it's the delimiter. Except it's not unnecessary, because the outer loop is just a counter to 5 and not a while loop on st.hasMoreTokens()
.
The number of nested WTFs in this code is impressive.
@JBert said:
One could wonder if this was the plan from the start.
Hanlon's razor wants a word with you.
@daveime said:
...there's going to come a time when everything runs through SSL, and this whole certificate "extortion racket" will cease to be, and good fucking riddance.Ain't that the truth. There was a time when an “administration fee” sort of made sense, but the full certificate price (hundreds of dollars? Really, VeriSign?) never did, and nowadays when SSL is expected of practically any site of any significance, it's ridiculous and about time we saw a better option. Having to have one IP per certificate is bad enough, even if that is a technical restriction.
@inori said:
Even after reminding them several times, I still get programming submissions whose line indentations look like they were set by a random number generator.
Next time you run the course, dock points for style errors. They'll quickly start paying attention.
(I say this not entirely witihout sadism, but also because I've seen it work with first-year university undergrads.)
@mikeTheLiar said:
for www.mysite.org - ...mysite.org... are all invalid
Any decent certificate vendor will create the cert for the root domain plus one subdomain (in this case, www). Get a better vendor.
@Cassidy said:
They probably don't. Was simply bragging that I'm not a hosting company and yet I have easier (and apparently more secure) deployment measures than they seem to have.
Fair enough. Altogether too many “hosting companies” buy a WHM/cPanel license and let it do all the work for them without understanding what that work is.
@Cassidy said:
suPHP also provides each vhost with its own indivudal php.ini config settings. Not sure if ruid2 does that.
Not so much. As opposed to specializing in running one thing (CGIs, mod_php, etc.) as a different user, it lets the entire Apache worker process assume the permissions of a user when serving the request, so everything relating to that request (SSIs, mod_*, CGI, etc.) runs as that user and with that user's permissions.
@Cassidy said:
However, that module looks interesting. There any further documentation other than "mod_ruid2 is a suexec module"...?
How succinctly you have hit upon the project's greatest fault. The extent of its documentation is its readme; however, it's fairly intuitive to configure once you know what the available directives are.
The big flaw I've noticed is that because ownership of worker processes is given to a non-www-user
user, Apache gets really confused when it comes to counting up and maintaining the MinSpareThreads
/MaxSpareThreads
limits. YMMV. The other issue, which I'm not terribly concerned about but some might be, is that in order to change the ownership of worker processes, the master Apache process must run as root
. Doesn't bother me too much as exploitation of that fact would require the presence of a fairly gaping hole very, very deep in Apache's guts, but it's something to be aware of.
@Mole said:
It was pulled apart that night and the LEDs surgically removed.
Wh... why would you do that? You presumably had to install the software at some point anyway to set up DPI stages, and those settings (including the light settings) are stored to memory internal to the mouse – unless you intentionally used the same software to turn the LEDs back on again, they would've stayed dim indefinitely. Instead, you opted to blow the warranty on (what was presumably) an $80 mouse – an $80 mouse made by a company imfamous for shoddy manufacturing and short-lived products.
@The Bytemaster said:
Windows 3.0 ?Pft, Windows? It took them until version 3 to get grid-aligned icons! Apple has had that since, like, the Apple II.
@PJH said:
Shouldn't the Optimus Black be, erm, black?My thoughts exactly, until I remembered that originally, the Optimus Black was black, and Koodo has just defaulted to showing the (later released) white model. Still doesn't explain why they'd release a white model in the first place, though.
@PJH said:
And since the phone I currently use is on Android 4.1.1, I'm not sure advertising the fact that this one is on 2.3 is much to crow about.One thing that can't be commended of LG is their speed in pushing firmware updates. My Optimus One, released in October 2010, did not recieve an update to Gingerbread (released December 2010) until October 2011. By contrast, the xda-developers community, had Gingerbread booting by May, and fairly stable by July. By the time the official LG update was released, most community ROMs equaled or surpassed its performance and almost matched its battery life.
(Yellow highlighting mine.) Why do Canadian cellphone providers suck so badly?
@Speakerphone Dude said:
As everyone can see, Lotus Notes is using lots of memory...
Be honest: that was a Firefox process, wasn't it?
@Anketam said:
Right now my Outlook is using 34164 K of Memory or 13.4% of what lotus notes is using.
Oh snap...
Mail.app is a lousy mail client.
@Xyro said:
The discussion got pretty threaded up yesterday. Let's recap: have we found something that beats Gmail or Outlook yet..?
Has anyone suggested the new Outlook.com yet?
Would you believe that when I went to watch your LP, YouTube travelled back in time, recorded my Portal 2 playthrough, and suggested ways I might've solved levels better?
Dammit Google!
@dhromed said:
He meant building living rooms in Terraria, not Minecraft.
Aw, and I was so satisfied with the vitrol in my summary...
@blakeyrat said:
Building player housing is a game mechanic and required for advancement in the game.Building a scientific calculator in Minecraft is not part of the game and serves no purpose.
What? No, the only “advancement” in the game is the construction of progressively more advanced tools. Beyond that? No point. Nothing. Progression in the game can be boiled down to requiring three actions: mining, crafting better tools with the new minerals you mined, and occasional woodcutting. To that end, building player housing is as useless as scientific calculators.
What I think I'm trying to get at is: just as you may not enjoy things others derive enjoyment from (the act of constructing ridiculously complex Redstone mechanics), others may not enjoy the results of that from which you derive enjoyment (pedantic dickweedism).
Is now a good time to point out that margins and layouts in Word used to be (if they aren't still, for old formats) set based on, and impacted by, the page margins of your default printer?
Yes.
Your printer.
@MiffTheFox said:
Don't ask me why I have an industrial machine controller lying around...
Pretty impressive. Care to give us a vintage?
@Paddles said:
For people with our kind of rationality, 0000 would be the midnight at the start of a day and 2400 would be the midnight at the end of the day.
You mean 00:00 would be midnight at the start of a day and 23:59 would be the end of the day (not midnight, mind you), leaving 24:00 as a reference to the start of the next day.
@Lorne Kates said:
(oh oh oh or even better... ePrice?)
Woah, hold your horses! They're still using vPrice
. (It's correct virtually all the time.)
@Xyro said:
Mr. DOS, you also have a jpeg artifact avatar?
Yes, and based on the last-modified timestamp, I've had it for longer than you ;P Great minds and all that, I suppose.
Yours turned out better than mine did, though – I was too subtle (for once).
(In response to, “What sort of platform am I running on?”)
Any comments outside method bodies are mine.
isWindows = System.getProperty("os.name").contains("Windows");public static boolean isWindows() {
if (System.getProperty("os.name").contains("Windows")) {
return true;
}
return false;
}public static boolean isOSX() {
if (System.getProperty("os.name").contains("Mac")) {
return true;
}
return false;
}if(System.getProperty("os.name").toLowerCase().contains("mac")) {
// ...
}private boolean isMacOs() {
return System.getProperty("os.name").toLowerCase().equals("mac os x");
}if (System.getProperty("os.name").equals("Linux")) {
// ...
}// Yes, this is the entirety of the method (although I did rename it).
public SomethingSomethingSimulator() {
isWindows = System.getProperty("os.name").contains("Windows");
}/*
Yeah, sure, “to avoid confusion”. And since when is Unicode
handling faulty under XP? Incomplete character sets, perhaps, but nothing
particularly faulty...
*/
private boolean isFaultyUnicodeOS(){
String osName= System.getProperty("os.name");
String [] faultyOSForUnicode = {"XP"};
for(int i=0; i <faultyOSForUnicode.length; i++){
//in order to avoid confusion for case change both of them to upper
if(osName.toUpperCase().contains(faultyOSForUnicode[i].toUpperCase())){
return true;
}
}
return false;
}
if(System.getProperty("os.name").contains("win")) {
// ...
} else {
// ...
}
/*
These are scattered all throughout the codebase, although they're most commonly found in the GUI code. The first example is by far the most common, occuring dozens of times. The second and third are close behind, appearing at least half-a-dozen times each, not always hand-in-hand, and with varying declarations; most aren't static and a few are private.
@morbiuswilters said:
It's also about 39 times slower than the fastest method (the Integer.bitCount one from arotenbe).
That surprises me -- I thought for sure one of the bithacks would've been the fastest. How much faster is bitCount?
@morbiuswilters said:
I'm wary of fucking around with floating point when the bitwise check is faster and seems safer.
That was my line of thought, too:
public static boolean isPowerOfTwo(int x) { double exponent = log(x) / log(2); return (exponent == (double) ((int) exponent)); }
but the possibility of false-positives (and positive-falses) caused by floating-point imprecision seemed too high.
@boomzilla said:
And anyways, why use "n"? In math, it's typically used for describing cardinality. If you're dealing with an arbitrary function with a parameter, it's almost always written as f(x)
.
Er. Yes. x
. Not n
. That's rather embarassing.
@token_woman said:
Not that that wouldn't be fun, but in the kind of example I was writing (a generic function for doing something with an integer completely out of any context), what better name would you suggest?
n
.
That single letter implies that
Then again, most of the java.lang.Math methods use a
/b
so I don't know that anyone outside of this forum really cares about this sort of thing.
@boomzilla said:
but adding special handlers just...feels dirty.
Yeah, because you totally didn't just write a power-of-two check using string manipulation.
@Mcoder said:
and able to deal with negative numbers
...praytell, by what magic have you found a negative number to be a power of 2?
return (n > 0 && (n & (n - 1)) == 0);
works too.
Oh, and I changed the method signature. Pretty silly for it to be taking an Integer
instead of int
; correct me if I'm wrong, but isn't autoboxing done at runtime, not compile-time?
At the end of a source file full of complicated math methods:
private Boolean isPowerOfTwo(Integer value) { if (value == 1) { return true; } else if (value == 0 || value % 2 != 0) { return false; } return isPowerOfTwo(value/2); }
It got replaced with a bitwise one-liner.
@Gordonjcp said:
Grim, who the hell eats baked beans on toast?
I do. Maybe not for breakfast, but it makes a delicious lunch.
@DOA said:
Worst I had was airport security in the UK stopping me because I had a small swiss army knife on my keychain. My luggage was already checked in and I sure as hell wasn't throwing it away because they were afraid I'd MacGyver my way to hijacking the plane. I ended up mailing to myself.
Yeah, I had the same thing once, except it was with a pocket retractable screwdriver, and I was travelling domestically in Canada. Land of the free, yup.
@boomzilla said:
@Mr. DOS said:WTF are you talking about?Sounds like he set a BIOS password or something, and just swapped out
the motherboard (where that's kept) to get rid of it.
Sure, but
I'm not necessarily calling bogus story, but I [i]am[/i] callling idiot.
@SilentRunner said:
Eventually he swapped the motherboard to make his computer usable again. lol
WTF are you talking about?
@nexekho said:
http://tinypic.com/
@nexekho said:
http://imageshack.us/
Use Imgur.
@Xyro said:
That seems so connivish and passive-aggressive though. :(
Oh, that's true. I just meant that there's no technical reason to not take that approach.
@jchannell said:
<font face="Lucida Console" size="2">echo sprintf('<option value="%1$d"%2$s>%1$d</option>', $optyear, ($optyear == $the_year) ? ' selected="selected"' : '');</font>
Except that 1) sprintf plus echo is inefficient when you could just use printf, and 2) echo with concatenation is faster than printf:
<font face="Lucida Console" size="2">echo '<option value="' . $optyear . '"' . (($optyear == $the_year) ? ' selected="selected"' : '') . '>' . $optyear . '</option>';</font>
@Xyro said:
Should I just fix it for him and not say anything? No, that won't work, he wouldn't be update his working copy since he's the only one who works on this project.
Maybe he wouldn't immediately notice, but SVN should complain about a conflict next time he tried to check in changes from that file.
@hoodaticus said:
This is one reason I'm writing my own serializer.
And apparently, you also hate yourself!
@hoodaticus said:
...Silverlight.
Oh, no, just masochistic. Sorry, I misunderstood.
@belgariontheking said:
Don't feel like digging through all three pages to see if anyone else has addressed this yet, but the problem isn't with the contents of the line; rather, the problem is with the position of the line. Similarly to class constructors, CheckStyle feels that private static variables should be declared (IIRC) between public constants and private instance variables.Static variable definition in wrong order.Code involved:
private static HashMap<String, String[ ][ ]> STATE_TABLE;
Can you figure out what they're complaining about? I can't. It's only informational level though.
One thing that nobody else has mentioned yet is that many people will have some other form of external, hardware-based monitoring, which, where present, will be highly preferable to latency-hindered software monitoring. Audacity is not a very low-latency program, and deals poorly with small the small buffers required for that sort of thing. In the case of digitizing LPs or tapes, it's no big deal, but when multitracking audio in near-realtime (something Audacity really shouldn't be use for to begin with, really – REAPER is so much better for this), it's almost unbearable.
@blakeyrat said:
"You pluralized a corporation's name in a way that is technically correct but I don't personally like! Damned Democraps!"
You mean “the name of a corporation”, not “a corporation's name”. Non-personal entities may not use the contractive possessive.
@Sutherlands said:
http://www.google.com/#sclient=psy&hl=en&source=hp&q=40+bytes+*1000000000+to+gigibytes&aq=f&aqi=&aql=&oq=&pbx=1&bav=on.2,or.r_gc.r_pw.&fp=66fe48b603cbf4a0&biw=1063&bih=855
So apparently I can't math. I still stand by the rest of my post, though.