The Problem
You’ve installed and activated the WP-Shortstats plugin according to the instructions. You see the link on your Dashboard, but it doesn’t register any traffic on your blog. It just doesn’t work.
(more…)
Archive for 2007
FlashVars
If you have a Flash applet that must behave differently in different situations, but is still essentially the same animation, you should use parameters to tell your animation what you want it to do in each case. A parameter is some piece of information… a background color for instance… that is passed into the Flash animation from somewhere else (typically, from the web page in which it is hosted). The Flash file uses that information just like any normal variable that was declared inside the file.
There’s a trick to using parameters in Flash… but fortunately, it’s an easy trick:
(more…)
Why, yes..
…Yes I am!
![]() |
| Are You an Internet Security Wizard? |
This was an interesting quiz, but more fun than useful. Most of the questions were simple, but I still managed to miss two. There’s a downloadable PDF with the correct answers once you’re done.
Coding Horror is doing a three part series on building a brand new, utterly kickass computer. For development purposes. He covers everything from installing hardware to using benchmarking/testing tools, to installing the OS and even overclocking. All of it is documented with full color hardcore nerd pornography.
There are lots of different reasons why a script would generate a 500 error… but there’s no good reason at ALL whey a regular HTML page would. Why? Because HTML is not script. It is not executable. It does not “run” on a server, and should therefore not generate Internal Server Errors.
But I’ve seen it happen.
The Problem:
Whenever I tried to access an HTML file on one of my sites, I got a 500-Internal Server Error instead.
Some more detail is required to understand the nature of the problem. On the site in question, ALL of the pages have a .PHP extension. There was one page with a .HTM extension, and I had just added one that happened to have a .HTML extension. That page was the one that threw the error when I tried to load it. I found that kind of odd, given the fact that HTML != SCRIPT. It was also odd because the PHP and .HTM pages loaded fine… it was specifically the HTML page and that page ONLY that was giving me problem. So I changed the page’s extension to .HTM and reloaded it. Guess what? It worked fine.
I could have left it that way, but no… I had to get to the bottom of this madness.
(more…)
If you ever find yourself in need of a screen capture, both Windows and Max OSX have the built-in capability to do it for you. No, you do NOT need to buy some extra-special software just to take a picture of what’s on your screen. Here’s how you do it.
Windows:
Find the PrintScreen key on your keyboard.
PrintScreen - will capture the entire desktop
Alt-PrintScreen - will capture the current application’s window
Use Control-V to paste the captured images in your image editor of choice.
MAC OSX
Find the Command key on your keyboard. (That’s the weird-looking apple squiggly-thing key)
Command+Shift+3 - will capture the entire screen
Command+Shift+4 - will turn the cursor into a crosshairs, allowing you to draw a rectangle around whatever you want to capture.
On my Mac, the copied images are automatically put on the desktop as PNG files. If you’d rather have the images end up on the clipboard, hold down the SHIFT key while using either of the above keystrokes. After capturing, a simple Command+V will paste the captured image.
I’m writing a small program and I’m packaging it in an executable JAR file so that all the end user has to do is double-click on it to run it. None of that command-line madness that… okay, that’s another rant. ANYWAY, my particular program uses an external package that’s ALSO stored in a jar file. To put everything in one JAR means putting a jar inside another jar.
That part is easy.
Ah, but I still want my main jar file to be executable. Still easy.
AH, but I want it to run anywhere on the destination file system, without the end user having to dick mess around with CLASSPATH statements and other crap, trying to point my application to a jar file that’s contained in its own archive. Nor do I want to spend time setting CLASSPATH statements INSIDE the jar file, because a) I have more important things to do and b) they don’t work as advertised.
Fortunately, there’s a solution.
(more…)
I was building a GUI in Java and discovered, to my annoyance, that the getText() method for the JPasswordField component has been deprecated. (It’s probably been deprecated for a WHILE and I just never cared before). So I use the getPassword() method instead.
Only getPassword() returns an array of characters (a char[]) instead of a String, which the rest of my code expects. I had a brain-fart and couldn’t remember how to turn one into the other. It happens. Rather than hunt through the API for which method turns a char[] into a String, I just Googled it. I found a nice discussion where experienced programmers jumped all over some guy for asking them how to turn a char[] into a String. He asked them instead of just reading the API docs for himself. Their response, predictably, was along the lines of “Read the API and stop asking stupid questions.”
I ALSO found that you could just do a String s = new String(char[]) , but that’s not what this post is about. Why am I bothering to post this, then?
Two reasons:
- Berating someone for wasting your time with a simple question on the internet is…wasting your time. This guy asked a question in a public forum. If you think it’s a stupid question, all you have to do is NOT FRIGGING ANSWER IT. Making the effort to berate someone does indeed waste time and bandwidth… but YOU are the one doing it. Not them. These people were wasting their own time and blaming this guy for it.
- If it’s easier for people to find answers to simple API questions on Google than it is for them to simply look in the documentation, maybe… just maybe… the problem is the documentation, not the people.
End of rant.
Why?
Mysterious random reboots? Sluggish performance? There is a long list of things that could cause these symptoms, but with the heat of summer upon us, you may want to add something to the list that you hadn’t considered before: Heat.
Electronics and heat don’t mix well, and computers bring them both in dangerous proximity to one another. In a full-sized machine there are usually enough fans to keep things cool and functional, but laptops can be different. The space is tight, the airflow is restricted, and the users (i.e. YOU) are more likely to do things that can literally cause the heat death of their machine… like block the vents with a book. More on that later. Monitoring the temperature of a perfectly functioning laptop every once in a while is a good idea. But if the machine is acting strange, then taking its temperature is one of the first things you should do.
How?
There’s no hardware needed in most cases. Most laptops already have a temperature sensor on the CPU and the hard drive. All you need is an application that can report the temperatures that are already being measured. I recommend the FREE application MobileMeter. It’s small, light on resources, and its free. Plus, its free. And free.
(more…)
