Some command line utilities I have learnt (again).
To test the originality of the system files:
sfc /scannow
To configure power setting if the powercfg.cpl UI can not be started:
powercfg.exe
Sunday, January 3, 2010
Acer laptop brings troubles.
It can be called as a known fact, Windows on Acer's laptops stops working when the battery becomes weak. Nobody knows why, but the keyboard and the touchpad do not respond at all.
A solution for that - boot windows with removed battery and disable ACPI driver.
Also, acers have a hidden recovery partition, which should be accessible on Alt-F10 combination after the POST has done its job. But if the MBR record is overwritten, it's no longer there.
One can carefully restore the sector, it's template is located in a hidden partition's file (/ACER/TOOLS/RTMBR.bin). The file does not contains the partition table, so it should be taken from the existing MBR sector (back up it anyway).
A solution for that - boot windows with removed battery and disable ACPI driver.
Also, acers have a hidden recovery partition, which should be accessible on Alt-F10 combination after the POST has done its job. But if the MBR record is overwritten, it's no longer there.
One can carefully restore the sector, it's template is located in a hidden partition's file (/ACER/TOOLS/RTMBR.bin). The file does not contains the partition table, so it should be taken from the existing MBR sector (back up it anyway).
Sunday, December 20, 2009
Android dialog bug fixed
Cool, in Android SDK 2.0 the bug in which onPrepareDialog was not called on an activities reincarnation is fixed.
Wednesday, December 16, 2009
Improve internet connection
If windows internet connection slow or glitchy, try the following utility:
http://www.speedguide.net/files/TCPOptimizer.exe
To analyze the tcp/ip traffic, try Wireshark (http://www.wireshark.org/)
http://www.speedguide.net/files/TCPOptimizer.exe
To analyze the tcp/ip traffic, try Wireshark (http://www.wireshark.org/)
Monday, November 2, 2009
merge two files
To convenient merge two files use the diff utility with the -D option.
The command will be like:
diff -D _NEWFILE_ old_file.ext new_file.ext >result_file_to_edit.ext
With that -D option the result file will contain the C-preprocessor code, like
#ifdef _NEWFILE_
content only the new_file.ext
#endif /* _NEWFILE_ */
#ifndef _NEWFILE_
content only the old_file.ext
#endif /* _NEWFILE_ */
or
#ifndef _NEWFILE_
content only the old_file.ext
#else /* _NEWFILE_ */
content only the new_file.ext
#endif /* _NEWFILE_ */
Then use a text editor to manually search for the _NEWFILE_ string and modify the text
as you think it should be.
The command will be like:
diff -D _NEWFILE_ old_file.ext new_file.ext >result_file_to_edit.ext
With that -D option the result file will contain the C-preprocessor code, like
#ifdef _NEWFILE_
content only the new_file.ext
#endif /* _NEWFILE_ */
#ifndef _NEWFILE_
content only the old_file.ext
#endif /* _NEWFILE_ */
or
#ifndef _NEWFILE_
content only the old_file.ext
#else /* _NEWFILE_ */
content only the new_file.ext
#endif /* _NEWFILE_ */
Then use a text editor to manually search for the _NEWFILE_ string and modify the text
as you think it should be.
Sunday, November 1, 2009
ftp thru a NAT firewall
I always was wondering, how ftp data connection gets through a firewall with NAT.
A ftp client on a machine with local IP (192.168.x.x) sends its own local address, like:
---> PORT 192,168,0,2,150,117
but the server still manages to establish the data connection to the client machine.
The answer to this question is simple - the NAT router works also on the application level and understands the ftp commands. When it sees the "PORT" command in the control connection, it translates the internal address to the external and adds a temporary record to the firewall table.
It's funny, but my simple cheap WiFi all-in-one box at home does the job when the ftp commands are upper cased and ignores it when it lowercased.
Good article about the subject here:
A ftp client on a machine with local IP (192.168.x.x) sends its own local address, like:
---> PORT 192,168,0,2,150,117
but the server still manages to establish the data connection to the client machine.
The answer to this question is simple - the NAT router works also on the application level and understands the ftp commands. When it sees the "PORT" command in the control connection, it translates the internal address to the external and adds a temporary record to the firewall table.
It's funny, but my simple cheap WiFi all-in-one box at home does the job when the ftp commands are upper cased and ignores it when it lowercased.
Good article about the subject here:
Sunday, October 25, 2009
Subscribe to:
Posts (Atom)