Recent Notes

Displaying keyword search results 81 - 90
Created by Dr. Xi on June 03, 2010 18:29:59    Last update: June 03, 2010 18:31:49
Generate a private key and store it in the keystore. The keystore file theKeyStore.jks will be created if it does not exist. The default keystore file is $HOME/.keystore if the -keystore option is not given. keytool -genkey -alias myjavakey -keyalg RSA -keys... Generate a private key and self-sign for 10 years. keytool -genkey -alias myjavakey -keyalg RSA -vali... List keys in the keystore. # short list keytool -list -keystore theKeyStor... Create a certificate signing request (CSR). keytool -certreq -alias myjavakey -keystore theKey... It seems that the Java keytool utility can't sign third party certificate signing requests (CSRs). We can use openssl to sign the certificate request created above. Generate signing private key with openssl. openssl genrsa -out openssl_ca.key -des 2048 Generate self-signed certificate valid for...
Created by James on May 07, 2010 04:13:14    Last update: May 07, 2010 04:35:03
It seems that the key to aligning a checkbox with its label lies in the line-height property of the label. This simple HTML snippet aligns well: <!DOCTYPE HTML> <html> <head> <style typ... which is rendered like this: Change the font size of the label to 12px throws off the alignment: label.checkbox { font-size: 12px; di... In case 1, the height of the checkbox is 13px with 3px top and bottom margin, for a total of 19px , which is exactly the height of the label div. As can be seen from Firebug : Checkbox layout Label layout In case 2, the height of the label div shrinks to 15px , while the height of the checkbox remains the same: Checkbox layout Label layout And...
Created by Dr. Xi on February 24, 2010 21:13:05    Last update: February 24, 2010 21:19:54
This program demonstrates the use of the java.nio package to implement a single thread echo server. import java.io.IOException; import java.net.Ine...
Created by Dr. Xi on February 18, 2010 21:17:34    Last update: February 18, 2010 21:17:34
-- add a foreign key to abother table alter tab...
Created by Dr. Xi on February 18, 2010 21:04:13    Last update: February 18, 2010 21:04:13
-- disable foreign key alter table my_table...
Created by voodoo on February 07, 2010 06:11:53    Last update: February 07, 2010 06:11:53
Use the F8 key to enter and exit full screen mode for RealVNC vncviewer .
Created by Dr. Xi on February 04, 2009 16:16:03    Last update: February 06, 2010 21:53:40
Action Shortcut Bring up context menu Shift+F10 Move active window Alt+Space, M Minimize active window Alt+Space, N Move cursor to web browser address bar and select the text Alt+D Minimizes all open windows and displays the desktop Windows Logo+D Restore minimized windows Repeat Windows Logo+D Open windows explorer Windows Logo+E Navigate through tabs in browser Ctrl+TAB Close tab in browser Ctrl+W Page Back Alt + LeftArrow Page Forward Alt + RightArrow Reload Page F5 Reload Page Override Cache Ctrl+F5 Find computer CTRL+Windows Logo+F Open Run dialog box Windows Logo+R Display Start menu CTRL+ESC (same as the Windows Logo key) Move the focus on the taskbar so you can TAB to the Quick Launch tool bar, the Taskbar etc. CTRL+ESC,ESC Quick Launch shortcuts in Windows Vista...
Created by Dr. Xi on January 08, 2010 03:53:37    Last update: January 08, 2010 03:54:56
This is an Ant custom task to merge Properties files I lifted from http://marc.info/?l=ant-user&m=106442688632164&w=2 , with some minor bug fixes. Example usage: <taskdef name="mergeProperty" classname="ant.task.... Implementation: package ant.task.addon; import java.io.Buff...
Created by Dr. Xi on November 19, 2008 00:22:27    Last update: January 07, 2010 23:00:36
There is a open source project named [ini4j] for processing Windows .ini configuration files. However, I found it an overkill for my purposes. So here is my simple implementation of a .ini parser. It mimics the standard java.util.Properties class with enhancements to get and set properties by section name. There are only a few simple rules: Leading and trailing spaces are trimmed from section names, property names and property values. Section names are enclosed between [ and ] . Properties following a section header belong to that section Properties defined before the appearance of any section headers are considered global properties and should be set and get with no section names. You can use either equal sign ( = ) or colon ( : )...
Created by Dr. Xi on January 02, 2010 16:37:13    Last update: January 02, 2010 16:37:57
Use the del operator to delete one key, or clear method to delete all keys: >>> d = { 'a': 1, 'b': 2, 'c' : 3 } >>> del d['...
Previous  3 4 5 6 7 8 9 10 11 12 Next