How to tell whether a character is a letter or not

Let's say you have a variable with a character in it and you want to know whether it is a letter or not. First of all choose a proper value for your language for use in the NLS_SORT parameter ('XHUNGARIAN' in my example).

Calculating the correct width and height for embedded videos

In embedded videos (or Flash apps in general) you can specify the width and height in the "WIDTH" and "HEIGHT" parameters of the <OBJECT> tag. But do not forget the space occupied by the controls (button bar, etc.)!
Eg. in case of a Google video the player consists of a video pane and a control bar. The latter takes a fixed 27 pixels in height. So if your video is 160 x 120 and you want to embed it by scaling to double size (without distortion of course), then you have to specify a width of 160*2=320 pixels and a height of 120*2+27=367 pixels.

Default size of embedded Google videos

In my previous post I went into details about flashvars used by embedded Google videos. Originally I wanted to get that list so I can set the initial scaling mode of a video using a flashvars parameter. Unfortunately this is not possible. Sad Here's why ...

FlashVars for embedded Google videos

You can embed a Google video in your webpage by including either an <embed> or an <object> tag in your HTML. You can grab the required code for embedding directly from the Google Video page.
One can see from Google's embedding HTML-snippet that there're some parameters that googleplayer.swf can interpret and use. I was wondering what other parameters are there, so I digged a little bit inside the Google video player. Smile

List of timezones in Java

I've extracted the list of available timezones and their attributes from JDK 1.5.0 (Update 7) by going through the result of TimeZone.getAvailableIDs() and calling TimeZone.getTimeZone(id).toString() on each of them. I've formatted the output into an OpenOffice spreadsheet and attached the result to this post. Use it as you like. Smile

Setting default timezone for the JVM of Tomcat

On Linux/Unix: add the "-Duser.timezone=Europe/Budapest" parameter (replacing the "Europe/Budapest" part with the ID of your timezone) to the JAVA_OPTS environment variable in your {TOMCAT_HOME}/bin/startup.sh. If you don't have a line in your startup.sh for setting the JAVA_OPTS, then you can add this to the start of the file (after the shell-specification in the first line of the shell-script, of course Wink ):
export JAVA_OPTS="-Duser.timezone=Europe/Budapest"

On Windows: start the "Configure Tomcat" program from the Start Menu, select the Java tab and add the "-Duser.timezone=Europe/Budapest" to the Java options list.

On both platforms you'll have to restart Tomcat for the new default timezone setting to take effect.

Worlds worst hacker (IRC transcript) :-D

I've read this before, but you know: "repetitio est mater studiorum" Wink
So here it is: Worlds worst hacker. Be prepared: this might make you ROFL ... Laughing out loud

"HTTP 404 Not Found" errors :-)

There're some web administrators who spend quite some time creating funny/amusing pages for the standard HTTP 404 ("Page not found") error codes. You get these normally if you try to access a page on a server that does not exist, however some guys (or girls ... you cannot know for sure nowadays Wink) make custom designed pages for these events. I'll collect them here and I'd be glad if others could contribute as well. Smile

Checking for existence of Perl packages

Eg. if you want to check for "Net::DNS", try this:
perl -e 'require Net::DNS'
You'll get an error like "Can't locate Net/DNS.pm in @INC..." if you don't have the given Perl package installed.

Installing and testing the Net::DNS Perl package on a Debian setup

All you need to do is to issue the following command:
apt-get install libnet-dns-perl

To test whether it works or not, try one of the demo scripts that come with libnet-dns-perl. In Debian they reside in the following location: /usr/share/doc/libnet-dns-perl/examples/demo/*

Syndicate content