Desktop Desktop Desktop. Desktop, Lemon Curry Desktop. Desktop Desktop!
Desktop Desktop Desktop. Desktop, Lemon Curry Desktop. Desktop Desktop!
You use a CAPTCHA, of course.
I feel FANTASTIC and I'm
still alive.
But the cake is a bit dry.
@Zecc said:
Password: v8SQY[waE-z3De
I was bored, so I searched for your new super secret access token in YouTube. The first time http://www.youtube.com/results?search_query=v8SQY[waE-z3De returned Waka Waka. Then some movie trailers. Then Waka Waka. Then some anime. Then Waka Waka. Then music videos. Then Waka Waka. WTF?
@Master Chief said:
I want to see programs of a complexity like Photoshop or 3ds Max running on the cloud, or games like Crysis or Bioshock.
I want to see a web browser running on the cloud.
@Jaime said:
if you use a native date type, it's most likely implementated as a floating pointWait. What?
I'm glad US-ASCII includes GRAVE ACCENT at 0x60. At the very least I won't have to fix my shell scripts if your cute little crusade against Unicode ever comes to my town.
@derula said:
Speculating about things you don't have a clue of is fun! Let's go on:@Zecc said:
In any case, AFAIK it's an obsolete technology.Doesn't Ruby on Rails use FastCGI? For whatever that is or for however that's related to CGI.
This is certainly a misunderstanding. CGI is not an obsolete technology. Perl is.
</flame>
@Smitty said:
Welcome to my personal hell. Here we have awesome treasures like <font face="Lucida Console" size="2">string() arrStringArray;</font> and <font face="Lucida Console" size="2">bool bBooleanValue;</font> spread throughout the codebase.
But it can be fun sometimes, e.g., if you like riddles or keep asking your colleagues about which prefix to use in C code given the current phase of the moon ("Hey, do we use s, str, sz, psz, ac, pc, pac, pch, pstr, lpstr, lpcstr, lpwstr, lptstr, or bstr for strings today?"). Also, DefInt a-z
(in some BASIC dialects).
@haha-only-serious said:
Brilliant. Everybody knows computers suck at mathematics....
http://random.irb.hr/signup.php
@bridget99 said:
Character modifiers ... result in multiple character sequences that look the same
Normalization is your friend.
Java example:
import java.text.Normalizer;
import java.text.Normalizer.Form;
public class Test {
public static void main(String[] args) {
Å();
Å();
Å();
}
static void Å() {
print("Å");
}
static void Å() {
print("Å");
}
static void Å() {
print("Å");
}
static void print(String s) {
printHex(s);
printHex(Normalizer.normalize(s, Form.NFC));
}
static void printHex(String s) {
System.out.print(s);
for (char c : s.toCharArray()) {
System.out.print(' ');
System.out.print(Integer.toHexString(c));
}
System.out.println();
}
}
(TRWTF being of course that my compiler does not normalize identifiers.)
@Scarlet Manuka said:
@Weng said:I'm with you on this one. Whenever I have to use my manager's computer this screws me up, because the block of 6 is now a bock of 9 (I think the top row is the Print Screen, Scroll Lock and Pause / Break keys). Half the time I end up hitting the wrong row of keys and going somewhere completely different to where I wanted to.Another disturbing trend in keyboard design is to fuck with the arrow keys, and to remove or alter the edit pad (that's the 6-key cluster above the arrow keys).
I owned suffered from one of those keyboards, too. I frequently turned my PC off instead of making a screenshot because the keyboard had a Sleep key where the Print Screen key used to be.
@Weng said:
NS=/*-
CF789+
BE456+
AD123E
,:00.E
Not bad, but I would keep related keys closer together (i.e., decimal mark and thousands separator). Also, an X might be useful when typing hex literals. The position of the letter block is somewhat unfortunate, but since decimal numbers are probably more common, it should be fine. I changed the order of the letters to match the numbers, however. The Numlock key could be moved somewhere else; perhaps near the status LEDs.
S;:/*-
EF789+
CD456+
AB123E
X,00.E
@DaveK said:
http://wordpress.grc.nasa.gov/blog/2009/07/28/resolving-issue-with-pasting-from-word-into-tinymce-visual-editor-extra-style-information/
Wait ...
Resolution: By changing both instances of the value “paste_auto_cleanup_on_paste” from “false” to “true” in the following WordPress file,
There is more than one paste_auto_cleanup_on_paste?
@boomzilla said:
y = m * x + bvs
vertical_coordinate = slope * horizontal_coordinate + vertical_intercept
vs.
int y; // vertical coordinate int m; // slope int x; // horizontal coordinate int b; // vertical intercept ... y = m * x + b;
Addendum: Apparently, the U+0001 character broke the RSS feed. I can no longer edit my previous post, however, so I can't fix it.
@Shinhan said:
Check the source. Everything is in <noscript> so if you turn on NoScript you'll see the normal page. Interesting joke :)
I wonder how the forum handles <noscript> noscript tags. Or .
Edit: It removed the tag. Could have been worse.
@TheCPUWizard said:
@ari said:Hashing is always a good idea.
And for simplicity use a 1 bit hash <ducking and running>
For security reasons, you should obfuscate it further. For example, store the hashes in a column called isAdmin3.
@Weng said:
The thing that really pisses me off about these scenarios is that they NEVER have the sort of useful items you'd expect to find in a mutilated airplane, and they always have things that don't belong there at all.
They just want to see how well you perform with non-standard tools. If you pass, you're almost certainly qualified to build an e-commerce site with MUMPS on top of their existing SSDS backend.
Interesting find. java.util.Random modifies its final seed field this way. Why call seed.set() or remove the final modifier when you can abuse the JVM instead?
@GreyWolf said:
@fatbull said:Am I TRWTF for recycling old hardware?No. But trying to do it with Ubuntu, yes you are.
Damn!
The laptop has been working as a minimal web and file server since around 2004; a poor man's home NAS if you want to put it this way. It was running Debian Etch just fine until its harddisk died this week, so I thought I could install Ubuntu (server edition) instead. Perhaps I really should replace it with something new.
I just tried to install Ubuntu 10.4 on an old laptop (166MHz, 64MB RAM). The (text mode) installer aborted because:
kernel: [ 1546.625217] Out of memory: kill process 17861 (debootstrap) score 74 or a child kernel: [ 1546.625268] Killed process 18557 (ar) debootstrap: zcat: error inflating debootstrap: tar: short read
I guess I need more swap space. Am I TRWTF for recycling old hardware?
@Quietust said:
I guess "fatbull" is having some fun with feeding bogus values to the rating script.
I am.
About a year ago I noticed this forum includes a textual description for a rating of 0, but no way to actually rate a thread 0. That's when I found out I could simply call ctl00_ctl00_bcr_bcr_ctl00_ctl02_ajax.SaveRating() with arbitrary integers as often as I wish and CS would happily add my new rating to the existing ones. The rating overview page would still show only my first rating.
Now count the WTFs in the previous paragraph.
TRWTF is that it does not restore allowPrecache on error. And that args is a command.
@El_Heffe said:
@eBusiness said:Catch and release is common among sport fishers, why shouldn't it be among coders?Try is common. Catch, not so much.
That's why it's called Exception Angling.
@dhromed said:
@spike_tt said:
LandroverWhat if you didn't have a Landrover, or if the tree had been too big? :(
Filed under: I have a dream, Stargate Atlantis, James Bond, category, mini nukes solve everything
FTFY.
sleep(10 + abs(20 * appversion.major - 3 * appversion.minor))
@Zemm said:
You should upload it to an Apache server with mod_rewrite, called manual.pdf, into say http://downloads.example.com/. Then add this rule into .htaccess:RewriteRule ^manual/ manual.pdf [L]
Then provide the link http://downloads.example.com/manual/anythingyouwant.pdf - hey presto, as many PDFs as you want! And no-one would know they point to the same file (because there's no [R])
mod_rewrite is a powerful tool, but all too often it's overkill. AcceptPathInfo on
and Options +MultiViews
are sufficient in this case.
@Scarlet Manuka said:
I'm not sure what this spam email is supposed to achieve.
I shall tell you if you post your credit card number.
Filed under: blatant phishing, do not listen to me
@smxlong said:
I'll bet you a bag of peanuts the thing doesn't Close() unless you call Close() explicitly.
\Microsoft Visual Studio 8\VC\atlmfc\src\mfc\filetxt.cpp:
CStdioFile::~CStdioFile() { AFX_BEGIN_DESTRUCTORASSERT_VALID(this); if (m_pStream != NULL && m_bCloseOnDelete) Close(); AFX_END_DESTRUCTOR
}
@alegr said:
If a constructor throws an exception, the destructor is not executed. You need to catch all exceptions inside the constructor and clean up manually.
This is not an issue with RAII. Every class instance manages only one resource. If resource allocation fails, the constructor throws an exception. No cleanup is required because nothing has been allocated. If resource allocation succeeds, the constructor always completes normally and the destructor is automatically called wherever necessary.
If you need more than one resource, you'll want to use several RAII objects. This way, the compiler ensures previously allocated resources will be freed if an exception is thrown somewhere in the middle. No need for manual cleanup.
@The_Assimilator said:
Technically it's still 3 values, since LEADING == LEFT and TRAILING == RIGHT. :p
Actually, it's still five values. setAlignment
limits the other align field to three values.
Filed under: missing <li> tags
If they earn more money than before, it's a "success" nevertheless. Ignoring a few "elite" fare dodgers is probably cheaper than fixing the system.
Documentation WTF in JDK 1.6.0_20*. Yes, I'm bored.
public class FlowLayout implements LayoutManager, java.io.Serializable {
...
/**
* <code>align</code> is the property that determines
* how each row distributes empty space.
* It can be one of the following values:
* <ul>
* <code>LEFT</code>
* <code>RIGHT</code>
* <code>CENTER</code>
* <code>LEADING</code>
* <code>TRAILING</code>
* </ul>
*
* @serial
* @see #getAlignment
* @see #setAlignment
*/
int align; // This is for 1.1 serialization compatibility
/**
* <code>newAlign</code> is the property that determines
* how each row distributes empty space for the Java 2 platform,
* v1.2 and greater.
* It can be one of the following three values:
* <ul>
* <code>LEFT</code>
* <code>RIGHT</code>
* <code>CENTER</code>
* <code>LEADING</code>
* <code>TRAILING</code>
* </ul>
*
* @serial
* @since 1.2
* @see #getAlignment
* @see #setAlignment
*/
int newAlign; // This is the one we actually use
...
public void setAlignment(int align) {
this.newAlign = align;
// this.align is used only for serialization compatibility,
// so set it to a value compatible with the 1.1 version
// of the class
switch (align) {
case LEADING:
this.align = LEFT;
break;
case TRAILING:
this.align = RIGHT;
break;
default:
this.align = align;
break;
}
}
* I know there is a newer version, but I'm not going to try it. I have no idea why They™ stripped most debug info from recent JDKs. Also, why did They™ merge java.sun.com and www.oracle.com? Lots of links to technical articles on that site are broken now.
@PSWorx said:
I don't think that will be quite that easy since afaik Eclipse uses SWT instead of Swing.
Indeed. But I see you already found alternatives.
@DOA said:
Did you try StackOverflow?
Actually yes, I did.
@DescentJS said:
While true, if the thing can render forms and possibly javascript, then it would be possible to do post stuff too.
Reading the source, I'd say JS is not supported. Maybe it will be included in JDK7? Who knows ...
@noitcif said:
object->GetMap()->push_back(std::make_pair(std::make_pair(std::make_pair(conflictObject, subConflictID),std::make_pair(object, subObjectID)),To_dB(value)));
Can't you see the hidden binary tree? It's obviously optimized for speed!
Filed under: cons car cdr
So I was working on a small application which reads a text file and displays the data in a JTree. Suddenly it stopped working and displayed gibberish. Why? Because the text was some sort of HTML. What? Yes. Apparently, HTML labels are an important "feature" of the Swing framework.
You see, if you put some plain text in a text field, it will do what it is supposed to do: Render plain text. If you put some text in a label/button/menu/whatever instead, things are a little different. Those components will also render plain text 99% of the time, unless the text starts with the string "<html>". In this case, the default behavior is to parse the text as HTML and render fancy colors and images. And since a JTree uses a kind of JLabel to render tree cells, JTrees can display HTML as well.
Sure, it might be useful now and then. But I'm just trying to display plain text in a tree! PLAIN! TEXT! How hard could that be? A GUI framework which cannot display plain text by default? Seriously? (WTF#1) And don't get me started on the security implications if the text happens to contain <img> elements with malicious src attributes. (WTF#2) Bonus points if you can craft a plain *.java source file which, if opened in the Eclipse IDE, will trick the package explorer view into rebooting my router!
Ok, calm down, I'm sure there must be a way to turn it off. Every feature you cannot turn off is a bug, right? So let's see ...
Apparently, someone else had the same problem 9 years ago. Aha, so you can set an undocumented (WTF#3) property in a hash map (WTF#4) to disable HTML. Well, at least that's better than escaping special HTML characters. Let's try that:
label.putClientProperty(javax.swing.plaf.basic.BasicHTML.htmlDisable, Boolean.TRUE);
Ooops, my bad, htmlDisable is private (WTF#5).
label.putClientProperty("html.disable", Boolean.TRUE);
Ah, much better!
On a side node: javax.swing.plaf.basic.BasicHTML.updateRenderer tests if this property is !=Boolean.TRUE, i.e., new Boolean(true) will not work, you have to use the one and only Boolean.TRUE (WTF#6).
Back on topic. Now all I have to do is to feed my JTree a custom TreeCellRenderer. And disable HTML for all other labels. And buttons. And tables. And ... sigh. There must be a way to disable HTML globally!
Someone suggested the only way to do that is to replace the look and feel. WTF#7? Is there no easier way? Well, at least we're getting somewhere. Although this piece of code get's the job done, it has a few drawbacks: It only fixes LabelUI and it depends on the Windows Look and Feel. But it's a good start. I can continue from there.
After reading the JDK source for a few hours, I think I found an acceptable solution: Register an auxiliary look and feel which disables HTML everywhere. Now all I have to do is call disableHTML() during startup and HTML is gone! Finally!
Code posted here just in case someone else has the same problem:
public class PlainLookAndFeel extends BasicLookAndFeel { public static void disableHTML() { UIManager.addAuxiliaryLookAndFeel(new PlainLookAndFeel()); } private final UIDefaults UI_DEFAULTS = new UIDefaults() { @Override public ComponentUI getUI(JComponent target) { target.putClientProperty("html.disable", Boolean.TRUE); return null; } }; @Override public UIDefaults getDefaults() { return UI_DEFAULTS; } @Override public String getName() { return "Plain Look and Feel"; } @Override public String getID() { return "Plain"; } @Override public String getDescription() { return "Disables HTML by default."; } @Override public boolean isNativeLookAndFeel() { return false; } @Override public boolean isSupportedLookAndFeel() { return true; } }
I was playing a video game when my PC suddenly turned off. Upon investigation I found the following error message from amdkmdag in Windows Event Viewer:
System shutdown due to graphics card overheating (ID: 6145)
This message has been logged 32262 times within 13 seconds.
Filed under: autosave is for wimps
@Xyro said:
Exactly! The buttons should be "Abort" or "Continue". Same deal with an interrupted cancellation. Instead of buttons that confuse "continue the cancellation" and "cancel the cancellation", a more descriptive layout may be called for. There's nothing wrong with more than one word on a button so how about, "Abort cancellation" and "Continue cancellation"?
How about simply "Yes" and "No"? Sure, you might have to read the message, but it would be less confusing than this whole cancellation continuation abortion mess. "Stop Task" and "Continue Task" would probably work, too.
@Xyro said:
In the case of that "stop unresponsive script" box, who would think that "Continue" means "continue the abort" and "Abort" means "abort the continue"?
(BTW, the buttons actually read "OK" and "Cancel". They have been replaced by "Stop Script" and "Continue" in current versions.)
People like me who think "leftmost commit button = stop asking and just DO it" and "Cancel = X = just get me out of here" might. Until they actually read the text and get confused.
@Xyro said:
In short, verbs are better on the boxes because it's easier and faster to read.
As long as it is clear what those buttons mean, that's OK I guess. But "Cancel" is different.
@Xyro said:
And canceling cancellation is an action only dreamed up by sadistic programmers.
Consider a dialog with a progress bar and a "Cancel" button below. Obviously, "Cancel" (or, for that matter, the generic "X" button to close a window) will cancel whatever operation is going on in that dialog, since a "Cancel" button usually applies to the surrounding dialog box.
But what if you are asked for confirmation to cancel something? Again, by convention, the "Cancel" or "X" buttons apply to the confirmation dialog box and will deny whatever was requested, so you have to press "Continue" instead of "Cancel". Unless you take the button labels literally, in which case you have to press "Cancel" instead of "Continue". Great way to confuse users.
Do you know the old "stop unresponsive script" confirmation of Mozilla (random picture I found on google)? Guess which button you had to click to actually stop the script!
@Xyro said:
Will Cancel cancel the operation in question or just my request for cancellation? What's wrong with yes/no and do/don't buttons for yes/no questions?For "Do you want to continue?" or "Do you want to cancel?, the buttons should absolutely not be "Yes" and "No", but "Continue" and "Cancel".
@RTapeLoadingError said:
the positioning of the sensor
The microphone of my laptop is located right above the CPU fan.
@b-redeker said:
The hardest thing in business, saying "No" at exactly the right time. *
Playing Poker with certain business people might be fun.
"I don't care if the other player has better cards. I already invested $fortune and I'm not going to give that up. It's a $fortune for crying out loud and I can't afford losing it. I'll just spend more money until I win."
@El_Heffe said:
WTF? Hasn't closing a window using an "x" located in the UPPER RIGHT been a standard on every program on every major operating system for a really long time? I know that "usability" can be a very controversial subject, but, WTF are these people thinking?
Close buttons are only the tip of the iceberg. What really annoys me is the placement/order of standard OK/Cancel/Whatever buttons in desktop applications. Did you ever want to confirm something but pressed Cancel (or Reset Form in case of web apps) instead?
On Windows, those buttons usually are grouped in the lower right and ordered Affirmative/Negative/Cancel/Apply/Help. Examples: Yes/No/Cancel. OK/Cancel/Apply. Register now/Register later/STFU. You get the drill. We even have guidelines stating the (apparently not so) obvious.
Granted, these conventions may differ between platforms. But it seems that a lot of software I use orders buttons randomly. Sometimes Help is on the left, sometimes OK on the middle, sometimes even different dialogs in the same application order buttons differently. Is a little consistency too much to ask for? Sigh.
Filed under: TRWTF is MB_CANCELTRYCONTINUE
@El_Heffe said:
@da Doctah said:You click on the X? I always just key Alt+F4. Friend of mine does Alt, Space, C (but then he always was a little odd).I tend to avoid using the keyboard as much as possible. I didn't even know about Alt-Space-C. WTF!! It really works!!
I usually press Ctrl+W (less cumbersome) or middle+left mouse buttons (requires mouse gestures addon). The latter is pretty convenient because I can click (almost) anywhere to close a browser window.
@pbean said:
Arguable... some programming languages have -1 for True (was it VB6, or Delphi, or something else? I'm not sure).
VB does. I guess it's a matter of taste whether you handle booleans as 1 bit signed (-1 and 0) or unsigned (0 and 1) integers.
@eBusiness said:
I wonder why noone has yet come up with the arithmetic branchless solution:
size=(size-6)*(v<=10)+6-(v>22)-(v>51)-(v>68)-(v>117)-(v>145);
return size;
Variation of the theme:
int foo(int i) {
assert i > Integer.MIN_VALUE + 145;
return 7 + ((10 - i) >> 31) + ((22 - i) >> 31) + ((51 - i) >> 31)
+ ((68 - i) >> 31) + ((117 - i) >> 31) + ((145 - i) >> 31);
}
New objective: Rewrite the Mapper class from above to emit branchless byte code! Only solutions longer than 24k lines will be accepted!
Filed under: If the only tool you have is a book about bit twiddling ...