Recent Notes

Displaying keyword search results 1 - 12
Created by woolf on December 29, 2011 11:18:11    Last update: December 29, 2011 11:18:11
Use the expand command to extract files from a .cab file: expand [-r] source [destination] [-d source.cab ... Option Description [-r] Renames expanded files. [destination] Specifies where files are to be expanded. If source is multiple files and -r is not specified, destination must be a directory. destination can consist of a drive letter and colon, a directory name, a file name, or a combination of any of these. [-d source.cab] Displays a list of files in the source location. Does not expand or extract the files. [-f:files] Specifies the files in a cabinet (.cab) file that you intend to expand. You can use wildcards (* and ?). source.cab Specifies the files to expand. source can consist of a drive letter and colon, a directory...
Created by voodoo on February 25, 2011 14:00:41    Last update: February 25, 2011 14:03:46
Suddenly my Windows XP failed to boot with this error message on a blank screen: missing or corrupt <windows root>\system32\hal.dll I took out the hard drive, put it in a USB enclosure and attached it to another PC. Then I ran CHKDSK and it fixed some file system errors. But I did find that hal.dll was intact, so hal.dll was not missing or corrupt . It turned out that the file that was really missing was C:\boot.ini . It is a hidden file, so you have to use attrib boot.ini to see it. The file is missing if attrib boot.ini returns nothing (run in the root folder C:\). In my case I reconstructed the boot.ini file: [boot loader] timeout=30 default=multi(0)dis... and changed the attributes back...
Created by magnum on December 03, 2010 08:53:18    Last update: December 03, 2010 08:54:23
You can use the ntfsresize utility on Linux to shrink or expand an NTFS partition (boot, for example, with the DRBL live cd). To shrink an NTFS partition: shrink NTFS (the file system) with ntfsresize. re-create a smaller partition to hold the shrinked file system with FDisk. To expand an NTFS partition: Recreate a partition that's bigger than the previous one. expand NTFS to the full size of the new partition. The following are from excerpts from ntfsresize FAQ (Frequently Asked Questions) : ntfsresize help: [tinker:root]:(~)# ntfsresize -h ntfsresize v1.... ntfsresize example session: [tinker:root]:(~)# ntfsresize -s11000M /dev/hd... Fdisk example session: [tinker:root]:(~)# fdisk /dev/hdc ...
Created by nogeek on July 30, 2010 23:00:06    Last update: July 30, 2010 23:01:24
It happened on Windows XP with JBoss 5.1.0.GA. This is the stack trace: 2010-07-30 16:39:52,177 ERROR [org.jboss.kernel.pl... According to " (SOLVED) JBAS-7674 solution for JBoss 5.1?? (Windows lock on jnp-service.url) ", the problem seemed to be solved for JBoss 6. In the meanwhile for JBoss 5, disabling Windows Indexing Service seemed to solve the problem. Quote from aforementioned link: It seemed that a file was being locked for some reason, and that file was obviously necessary for JBoss to start. Some further investigation (ok, I admit, I just tried to delete all of JBoss with the faith that it would fail on the locked file), it turns out that file was some file called jnp-service.url in the data directory of the default server. After downloading...
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 July 28, 2009 19:00:55    Last update: July 28, 2009 19:03:57
When you install Apache with mod_ssl, an executable file openssl (or openssl.exe for Windows) is installed in /usr/local/ssl/bin (or %APACHE_HOME%/bin ). This utility is used to generate private key and certificate request: Generate private key: openssl genrsa -out server.key 1024 # or wi... Generate certificate request: openssl req -new -key server.key -out server.csr ... Self-Sign Certificate: openssl x509 -req -days 3650 -in server.csr -signk... Apache configuration: Listen 443 <VirtualHost *:443> ServerNam... In some configurations SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unc... is used to work around MSIE bugs. See http://httpd.apache.org/docs/2.2/ssl/ssl_faq.html#msie for details.
Created by Dr. Xi on June 26, 2009 23:34:54    Last update: July 03, 2009 02:27:31
This registry key determines the number of bytes a sender may transmit without receiving an acknowledgment. If left unset, the default size is 8760 (2238 hex). For reliable networks, this size is almost always too small. I increased it to 65535 (FFFF hex) and my download speed for a big file increased from about 450Kbps to about 8Mbps! Windows Registry Editor Version 5.00 [HKEY_... Note: This hack doesn't work for Windows Vista.
Created by Dr. Xi on March 08, 2009 20:42:32    Last update: March 08, 2009 20:43:17
encoding : The 'encoding' option tells Vim the encoding of the characters that you use. This applies to the text in buffers (files you are editing), registers, Vim script files, etc. For example: :set encoding=utf-8 You need to use an appropriate font to display Non-ASCII characters: X Windows: :set guifont=-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 Win32: :set guifont=courier_new:h12 , or select one from the Edit/Select Font... menu termencoding : Encoding used for the terminal. For the Win32 GUI 'termencoding' is not used for typed characters, because the Win32 system always passes Unicode characters. fileencoding : When you edit a file, vim tries to detect what kind of file you are editing. It uses the encoding names in the ' fileencodings ' option. When using Unicode, the default value is: "ucs-bom,utf-8,latin1"....
Created by Dr. Xi on October 08, 2008 19:33:21    Last update: October 08, 2008 20:17:42
In sqlnet.ora , there's a parameter named NAMES.DEFAULT_DOMAIN that usually contains the value world . If you remove this parameter then you don't need to append .world . My sqlnet.ora contains three lines: # sqlnet.ora Network Configuration File: C:\wo... To force a lookup without NAMES.DEFAULT_DOMAIN appended, append a dot to the tnsname: tnsping unqualified_tnsname_name.
Created by Dr. Xi on September 21, 2008 21:04:24    Last update: September 21, 2008 22:27:36
IE uses Notepad as the default editor when you select "View Source" from a web page. You can change it to your favorite editor by adding a couple of keys to the registry: Start regedit Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ Add key View Source Editor Under View Source Editor , add key Editor Name Change the default string value to the full path of your favorite editor. The following is the registry entry for vim (full tip for vim is available from the vim wiki ): Windows Registry Editor Version 5.00 [HKEY_... It is probably easier (less error prone) to edit this in a file and import it back into the registry. The contents of gvim.vbs are: '--- gVim.vbs ------------------------------------... It is OK to use gvim.exe...
Created by Dr. Xi on December 12, 2007 21:53:19    Last update: December 12, 2007 21:53:19
The first time you access an SSH host, you'll get and store the host key. Putty stores the host key in the registry. If you run putty plink as a Windows service, the host key should be available to the Windows system user. Otherwise, plink won't connect to the remote server. The solution is to obtain the host key from an interactive session then save it for use for the system user. Here are the steps: 1. Access the remote host interactively with putty or plink. Accept the host key. 2. Run regedit and export the key HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys . You'll get something like this: Windows Registry Editor Version 5.00 [HKEY_... 3. Edit the exported registry file, change HKEY_CURRENT_USER to HKEY_USERS\.DEFAULT : [HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\Ss... 4. Import the...