Monday, 12 April 2010
Unable to turn key in ignition
I was unable to turn the key in the ignition of my 92 golf gti for several days. I first tried with some oil in the keyhole but I believe it was after I put some in small gap around the cylinder that it finally came loose and I could turn the key again. So, if you have an old car it might be worth trying this first..
Thursday, 19 November 2009
C# Textbox with numbers only
I wanted to allow the user to modify the size of an image by entering a new width and heigth into textboxes. I was surprised to find that there was no really simple way of doing this like a property of the textbox (or maybe I missed it). This is how I solved it:
The IF statement checks for backspace and other control input.
private void textBox_imageHeight_KeyPress(object sender, KeyPressEventArgs e)
{
int isNumber = 0;
if(!Char.IsControl(e.KeyChar.ToString().ToCharArray()[0]))
e.Handled = !int.TryParse(e.KeyChar.ToString(), out isNumber);
}
The IF statement checks for backspace and other control input.
Thursday, 2 July 2009
Mouse Gestures in Windows
StrokeIT is a great program that enables mouse gestures for most windows applications.
It speeds up window management (minimize, maximize or close windows) , navigation in e.g. Firefox and Copy-Paste in most applications. Gestures can also be customized for each application.
It speeds up window management (minimize, maximize or close windows) , navigation in e.g. Firefox and Copy-Paste in most applications. Gestures can also be customized for each application.
Wednesday, 24 June 2009
ÅÄÖ in LaTeX
I'm writing my master thesis in Latex (eclipse/texlipse). The thesis is written in Enlish but I wanted to write an abstract in swedish as well and had some trouble adding the swedish characters ÅÄÖ. After searching the net for a while I finally found a solution that didn't require the use of any additional packages:
å: \aa
ä: \"{a}
ö: \"{o}
Å: \AA
Ä: \"{A}
Ö: \"{O}
Note that \aa and \AA requires a blank space at the end! If they are at the end of a word you might have to force this extra space by adding "\ ", e.g. the words "små bollar" would look like: sm\aa \ bollar.
If you have a lot of these characters in a text (and use a swedish keyboard), write them as usual and make a search-replace for each character when you're done.
å: \aa
ä: \"{a}
ö: \"{o}
Å: \AA
Ä: \"{A}
Ö: \"{O}
Note that \aa and \AA requires a blank space at the end! If they are at the end of a word you might have to force this extra space by adding "\ ", e.g. the words "små bollar" would look like: sm\aa \ bollar.
If you have a lot of these characters in a text (and use a swedish keyboard), write them as usual and make a search-replace for each character when you're done.
Subscribe to:
Posts (Atom)
