Recent Notes

Displaying keyword search results 1 - 5
Created by voodoo on August 03, 2012 08:42:38    Last update: August 03, 2012 09:31:25
The C function getsockopt lets you get the error codes with the option SO_ERROR . The possible error numbers are defined in the global errno.h . The relevant values are: #define ETIMEDOUT 110 /* Connection timed out */ ... But here's the whole list on my Linux system ( /usr/include/asm-generic/errno.h ): #ifndef _ASM_GENERIC_ERRNO_H #define _ASM_GENER...
Created by Dr. Xi on May 02, 2011 15:59:37    Last update: February 25, 2012 09:16:37
This code snippet gets the default keystore used by the Java keytool and displays the list of aliases along with the key type (certificate or private key). import java.io.File; import java.io.FileInputSt... The default keystore used by the above code is: $HOME/.keystore .
Created by Fang on November 10, 2011 09:26:12    Last update: November 10, 2011 09:26:12
Syntax highlighted XML schema for JSF 2.0 Application Configuration Resource File ( faces-config.xml ). Almost 3000 lines! <?xml version="1.0" encoding="UTF-8"?> <xsd:sch...
Created by Dr. Xi on October 16, 2008 20:45:40    Last update: March 28, 2011 20:23:22
Java's built-in classes are way too complex/flexible for a simple protocol like HTTP. This is a wrapper to simplify HTTP GET and POST. import java.io.*; import java.net.*; imp... A simple test: import java.io.*; import java.util.*; ...
Created by Dr. Xi on October 26, 2010 16:07:40    Last update: October 26, 2010 16:07:40
This is a more generic version, which can be expanded to accommodate additional file signatures. import java.io.*; import java.util.*; pu...