Friday, 25 December 2009

Hard Disk Size Measurement

Manufacturers and operating system measures hard disk capacity in different ways. That is, the binary gigabyte and the decimal gigabyte. When we install a new 160 GB (manufacturer measurement) hard drive, we see that operating system reports only 149 GB. Similarly, if we install a 4GB hard disk we get 3.72GB. This difference is because of the way in which manufacturers and software developers calculate the drive capacity. Technically, hard drive capacity is calculated by multiplying the number of cylinders, sectors, and heads time 512.

Capacity = Cylinders * Heads * Sectors * 512 (bytes per sector)

So a typical drive with 7752 cylinders, 16 heads and 36 sectors.
7752 * 16 * 63 * 512 = 4,000,776,192 bytes

Hard disk manufacturers use decimal megabyte to determine the size of their hard drive.
4,000,776,197 bytes / 1,000,000,000 = 4.0 GB

Whereas software makers use binary megabytes to calculate the drive size. A binary gigabyte is 1,073,741,824 bytes and a binary megabyte is 1,048,576 bytes. So we get 4,000,776,192 bytes / 1,073,741,824 = 3.72.

Port Forwarding with NAT

Internal IP addresses are only visible to the computers within an internal network. So computers on the internal network can not send data directly to a computer outside of the network. When a computer on the network wants to send data to a computer outside of the network, it sends the data to the gateway. The gateway is the internal ip address of the router.Then the router decides what to do on this data. But NAT (Network Address Translation) will take care of most of the work. There are some programs that NAT was not designed to work with, those are the programs we need to set up port forwarding for.

Port Forwarding simply tells the router which computer on the local area network to send the data to. When you have port forwarding rules set up, your router takes the data off of the external IP address:port number and sends that data to an internal IP address:port number.
1. Open the terminal under windows (Win+R->cmd), and run
2. Note down the IP Address of Ethernet adapter Local Area Connection.

3. Open the browser, go to and log in.
4. Go to Advanced Setup->NAT->DMZ Host. This depends on the type of router. Anyway there will be a NAT option somewhere.

5. Enter the noted down IP Address from step 2 here.

6. Press Save/Apply

Windows 7 Remote Kernel Crash

"The bug trigger an infinite loop on smb{1,2}, pre-auth, no credential needed...
If netbios_header is 4 bytes smaller or more than SMB_packet, it just blow !"

Firewall is useless in this case. This is the part of the Server Message Block (SMB) which is a protocol of the Microsoft Windows Network to provide shared access to files and printers. There is no BSOD, just pull of the plug.

Read more at Laurent Gaffié Blog: Windows 7 / Server 2008R2 Remote Kernel Crash

Tuesday, 22 December 2009

Activate TECHMODE in w700i

1. Enter *585*0000# in standby mode and press send.
2. Now go to Settings->Connectivity->Mobile Networks->TECHMODE.

GSM Channel

Standby mode shows only bold marked parameters.

These can be interpreted as follows.
A - current type of service
B - Broadcast control channel
S - Standalone dedicated control channel
T - Transfer channel
F - Frequency Hopping
BBB - number of current channel:
    001...124 - GSM900
    512...885 - DCS1800
    974...1023 - EGSM900
    9999 - no signal
CC - Number of current channel on a current BS (Base Station), it depends of operator settings
DD - receive level(RxLevel): -40dBm...-117dBm (-40 is strongest signal)
EEEE - Cell ID
F - Cell sector number
HHHH - may be another channel
I - Timeslot number: 0...7
    One of the eight channels which are used to transfer TDMA traffic.
    On 0 channel is transferred control information: BCCH, SDCCH, etc. Other channels are used for traffic.
JJJ - Transmitter signal level, 0...34 dBm
K - Bit Error Rate - number of errors, 0...7.
    0 - No errors. When more than 5, sound is being lost frequently.
    RxQual table
        0---BER < 0.2 (%)
        1---0.2 < BER < 0.4
        2---0,4 < BER < 0.8
        3---0.8 < BER < 1.6
        4---1.6 < BER < 3.2
        5---3.2 < BER < 6.4
        6---6.4 < BER < 12.8 (Half of packets are lost here)
        7---12.8 < BER
LL -Timing Advance. 0...63.
    With this parameter it is possible to calculate distance to BS using the following formula:
    L=1.11 x TA/2, where L is the distance to BS, TA - Timing Advance.
    In GSM standard max distance from BS is 35.2 km, so one number here is roughly 550 m.
    Timing Advance: 0; 1; 2; 3; 4; 5...63
    Distance to BS: <550 m; 550-1100 m; 1100-1650 m; 1650-2200 m; 2200-2750 m; 2750-3300 m ... 35.2 km.
MM - no info (seems like its the number of lost packets)
NNN - rate of speech codec:
    HR - half rate
    FR - full rate
    EFR - enhanced full rate
OO - no info, range 0...95 (seems like RxQual)
PP - no info, range 0...83
QQQ - Network Country Code (NCC)
RR - Operator Code (MNC)
SSSS - Location Area Code (LAC)
TTT TT, UUU UU, VVV VV, WWW WW, XXX XX, ZZZ ZZ - numbers & receive of the best alternative channels

If we want to quit from the TECHMODE, just press and hold the Back key. But the TECHMODE menu is still available.
After restarted your phone the TECHMODE menu will disappear. Or Enter *585*0000# in standby mode and press send once again.

Firefox Hacks

Open the Firefox browser and type the following in the address bar.
Accept the a warning, and continue.

Backup prefs.js. If something goes wrong, we can restore it by replacing the corrupted file. In Windows XP you can find it under C:\Documents and Settings\{your username}\ApplicationData\Mozilla\Firefox\Profiles\{profilename-with-some-string}.default\prefs.js
If it is not getting restored via the backup prefs.js file, we can exit Firefox and issue the command firefox -safe-mode to bring up the Firefox Safe Mode screen. Select "Reset All User Preferences To Firefox Defaults".

Speed up firefox
Search for the following entries and give values as shown below:
network.http.max-connections = 96
network.http.max-connections-per-server =32
network.http.max-persistent-connections-per-proxy =16
network.http.max-persistent-connections-per-server = 10
network.http.pipelining = true
network.http.pipelining.maxrequests = 8 
network.http.proxy.pipelining = true
network.http.request.max-start-delay = 0
Experiment with other values too.
Now right click and Choose New->Integer. Give the name as below:
And set the Integer value as 0. This value is the amount of time the browser waits before it acts on information it receives.

Disable extension install delay
security.dialog_enable_delay = 0
Default is 2000.

Spell check in all fields
layout.spellcheckDefault = 2
By default, Firefox checks spelling only in multi-line text boxes.

Remove Statusbar in AIR apps build with Flex Builder 3

To remove status bar, add the following code in the main Application window.
When we create AIR apps using the Adobe Flash CS4 IDE, there doesn't appear any status bar. But using Flex Builder 3, all the AIR apps will have status bar turned on by default.

Code (with status bar)
<mx:windowedapplication xmlns:mx=""
    backgroundgradientalphas="[1.0, 1.0]"
    backgroundgradientcolors="[#FFFFFF, #000000]"
    height="281" layout="absolute">
To remove status bar add the following code in the main Application window.
The complete code will look like below
<mx:windowedapplication xmlns:mx=""
    backgroundgradientalphas="[1.0, 1.0]"
    backgroundgradientcolors="[#FFFFFF, #000000]"
    height="281" layout="absolute" 
Screen (after hiding the status bar)

Monday, 21 December 2009

Google Public DNS

Google introduced a public DNS. It can be used instead of the default DNS provided by your ISP.

  • Configure your network settings to use the IP addresses and as your DNS servers or
  • Read configuration instructions.
If you decide to try Google Public DNS, your client programs will perform all DNS lookups using Google Public DNS.Google's spider crawls all websites.

By using Google Public DNS you can: