December 18, 2006
Setting Default Text File Encoding in Eclipse
I was recently working with a set of SQL migration scripts in eclipse and started noticing that the localized characters weren't showing correctly. I've seen all kinds of chaos in my project with different file formats creeping into the sources and database. So I did a looking and found that Eclipse was defaulting to Cp1252 for the encoding. This is a pain and the cause of my files not displaying. So went into Window->Preferences... and Opened General->Workspace and changed the Text file encoding setting to UTF-8. Now all is good again.
December 14, 2006
How to query Oracle Schema
I have been trying to query the difference between Oracle Schemas for a project I'm working on.
You can repeat this process for other schemas and use a diff tool like beyond compare to find the differences.
- get SQL Developer (free) from Oracle
- I needed was a list of the system tables in Oracle which I found here.
- Next log in as the user who's schema you want to print.
- The basic query you want is:
SELECT
t.table_name
, column_name
, data_type
, data_length
FROM USER_TABLES t, USER_TAB_COLUMNS c
where t.TABLE_NAME = c.table_name; - run the script using
F5 and select the Script Output tab 
- Save the output
You can repeat this process for other schemas and use a diff tool like beyond compare to find the differences.
December 01, 2006
Good RSS Reader in Java
I heard about BlogBridge this week from the Java Posse. it is a good RSS Reader written in Java. This means that I can use the same reader in Windows and Linux. Even better if you sign up with their free service you can store your settings and feeds online so you don't have to reconfigure your reader on each system. Very cool! It has an interesting Guide, Feed Article view that allows you to group sets of feeds under a category.
November 22, 2006
Javascript Object Literals
For a while now I've been experimenting with the dojo toolkit. I have been puzzling over what the following meant.
It is hard to come up with a search query for this. At first I thought it might be some sort of dictionary or hash table shorthand. However, I finally found that it was an object declaration shorthand and is equivilent to
var something =
{ somename: "some value",
anothername: "another value",
more: function () { alert("called"); }
};
It is hard to come up with a search query for this. At first I thought it might be some sort of dictionary or hash table shorthand. However, I finally found that it was an object declaration shorthand and is equivilent to
var something = new Object();
something.somename = "some value";
something.anothername = "another value";
something.more = function () { alert("called"); };
November 18, 2006
Power Shell for windows
I saw this release of Power Shell. It looks like it will do some Unix commands that I always get tripped up on when I'm running windows. It will work on WinXP and Server 2003. I'm installing and we'll see how it works.
October 17, 2006
Ubuntu System Clock setting for UTC
Ubuntu live CD installs assuming the system clock is UTC. If you dual boot to windows (which assumes local timezone) you will get a shifted time in windows. To change this after Ubuntu installs go to /etc/default/rcS and modify the line that says: UTC=yes setting it to no. Now when you reboot it will treat the bios clock as local time and all can live in happy time.
Gnome Menu Files
while trying to setup a new system I wanted to copy some menu settings I had. Alacarte is a great tool, but as with most gui tools get tedious when you have multiple similar actions. So after digging around I found the two directories of interest: ~/.config/menus and ~/.local/share/applications.
The menus directory has an XML file called applications.menu which contains the structure and points to *.desktop launchers in the ~/.local/share/applications directory.
copying the desired files from these directories should re-create your menus on the new system.
The menus directory has an XML file called applications.menu which contains the structure and points to *.desktop launchers in the ~/.local/share/applications directory.
copying the desired files from these directories should re-create your menus on the new system.
October 12, 2006
Read your EXT2/3 partitions from Windows
I Found this driver for the linux ext2 filesystem. It makes transfering files to and from your dual boot machine very easy.
September 18, 2006
Ubuntu Environment variables
On Ubuntu, to set a global environment variable, edit /etc/environment and follow the form:
<Name>=<Value>
For the setting to be local to your login you can edit ~/.profile but you will need to use export <Name>=<Value>
I've used this for the JAVA_HOME, TOMCAT_HOME and ORACLE_HOME environment variables.
<Name>=<Value>
For the setting to be local to your login you can edit ~/.profile but you will need to use export <Name>=<Value>
I've used this for the JAVA_HOME, TOMCAT_HOME and ORACLE_HOME environment variables.
September 14, 2006
IP Renewal when moving between networks
On Ubuntu when I move my laptop from one subnet to another (desk to conference room for example) the dhcp ip doesn't reload. Previously I would disable the adapter then re-enable it but that took a bit of time. I found that you can use dhclient to do the trick from a shell:
sudo dhclient -r to release ip.
sudo dhclient -1 to renew ip. (that is a -one not the letter 'l').
sudo dhclient -r to release ip.
sudo dhclient -1 to renew ip. (that is a -one not the letter 'l').
Subscribe to:
Posts (Atom)