Recent Notes

Displaying keyword search results 1 - 3
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 December 05, 2009 20:12:16    Last update: December 05, 2009 20:46:45
It's quite easy for Perl to open a pipe and read from it: $file = "nospace.txt"; open(IN, "cat $file |") ... But the code breaks when the file name contains a space: # This does not work! $file = "yes space.txt"; ... On Windows, these don't work either: # This does not work! $file = "yes space.txt"; ... You need to use a technique called Safe Pipe Opens : $file = "yes space.txt"; $prog = "cat"; ...
Created by Dr. Xi on August 26, 2007 23:22:30    Last update: August 27, 2007 02:00:18
If you want to add security to your wireless network, you almost never want to use WEP . WPA is an improved encryption algorithm that avoids many of the WEP vulnerabilities. However, FC4 (Fedora Core) doesn't support WPA out of the box. I have to install wpa_supplicant in order to access my wireless AP with WPA encryption. Since my Airlink wireless card only shipped with Windows drivers, I also needed ndiswrapper to make it work under Linux. This is my experience setting up wpa_supplicant with ndiswrapper. 1. Download wpa_supplicant 0.5.8 from http://hostap.epitest.fi/wpa_supplicant/ . Extract files to a working directory. 2. Create a .config file that contains: CONFIG_DRIVER_NDISWRAPPER=y CONFIG_CTRL_IFACE=y The first line initially read CONFIG_DRIVER_WEXT=y following the ndiswrapper documentation, but that didn't work for me. 3....