Sunday, 12 October 2008

eee 1000 Swapping Up Arrow and Right Shift


One of the most annoying things about the eee 1000 is the location of the right shift key. Its small and very far to the right. If you are a touch typist, this makes typing very difficult. Well I have read some blog posts that discussed remapping the keys, but they all seems to mention Windows and not Linux. Since I have the Linux version of the eee 1000 it was time to do a little research.



Googling around I found this really good article on Linux utilities for remapping keys in XWindows. The article only covers remapping the Caps Lock and Control keys. But, playing around with xmodmap and xev I was able to figure things out. So here is the result, two shell scripts. The first scripts swaps the up arrow key with the right shift key. The second resets the keys to their original values.


keyswap



#!/bin/bash
xmodmap -e "keycode 98 = Shift_R"
xmodmap -e "keycode 62 = Up"
xmodmap -e "add shift = Shift_R"

keyreset



#!/bin/bash
xmodmap -e "keycode 98 = Up"
xmodmap -e "keycode 62 = Shift_R"

The scripts seem to do the job. But if you have any suggested improvements please pass them along in the comments.

Thursday, 9 October 2008

Dojo Examples Page


I started a Dojo Examples page here. Currently there is just an example of the forms ValidationTextBox control. Which I gotta say, is a pretty neat tool. I couldn't find anything nearly as easy to use or with as much functionality in the JQuery world.



There will definitely be more to come.

Tuesday, 7 October 2008

Featured gadget: Communicator



Name: Communicator
Author: Andreas Horlacher
Description: Communicator translates from and to a few languages using Google translation services. It comes with the popular 'communicator' design, as seen in Star Trek.

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Sunday, 5 October 2008

jEdit and Java Apps no Longer Start on OS X 10.5 Leopard


I tried to run jEdit this morning and it would no longer launch on my MacPro. Recently, Apple updated Java on OS X 10.5 and that appears to have broken Java apps. So after Googling around a bit, I found a solution on the support forums.


The jEdit executable is defined as a symbolic link in /Applications/JEdit.app/Contents/MacOS/jedit, which points to /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub. This seems to be the problem. To fix it, copy /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub to /Applications/JEdit.app/Contents/MacOS/jedit. The jEdit app should now start correctly.


The problem does not affect all systems. The jEdit on my MacBook works just fine after the update. No changes needed.

Saturday, 4 October 2008

A little house cleaning

I'm doing a little house cleaning on the web site this weekend. Some directories are gonna be moved around to make the production site and development sites a little more consistent. I'm planning to use xampp for a little consistency between my macs and my linux laptop. Been thinking about using GeShi to render my code samples. However, the JEdit syntax highlighting plugin seems to do a nicer job. Plus, I'm not sure the nature of the data really requires dynamic processing. Once a code sample is written, its pretty much written, it seldom needs to be touched again. So static files may be a better way to go.


Anyway, if any of my pages are broken over the weekend, please bear with me. :)

Wednesday, 1 October 2008

CSS Shorthand for Margins and Padding


I have been trying to incorporate some of the 10 CSS tips I posted about a few days back. When it comes to using shorthand for margins and padding I always get confused. I know you can put in 4 values in one margin statement, but I can never remember what order the 4 values are in.


So to help myself out, I wrote up a page on CSS Shorthand Properties.


So to summarize, when you are defining a margin with 4 values, CSS starts at the top of the box and then moves clockwise around the box. So for example:


h2{ margin: 5px 20px 5px 30px; }

This rule defines a top margin of 5px, a right margin of 20px a bottom margin of 5px, and a left margin of 30px. Start at the top, and move clockwise: top, right, bottom, left. Easy! :)


For more information and examples just click on the link.

Saying It != Learning It

I have been running into this problem a lot both at work and with various web sites. You can't teach your audience anything simply by making a statement.


For example, I am going to teach you the theory of relativity and everything you need to know about relativistic physics:
E = MC2


Got it! Good. Let's move onto the next subject.... :)


Are you an expert on relativity? Of course not. Without doing the real math behind the equation, you don't really understand anything. There cannot be learning without practice.


Or let's take riding a bike. I could have you read a book on bike riding. Show you videos demonstrating bike riding. Watch a bike race. Any number of things. But you will never learn to ride a bike until you climb on and pedal.


So when you are writing content, at a minimum, include examples your audience can look at, download and explore. Saying it != learning it.