Search
Monday, June 18, 2012
Sunday, February 6, 2011
Ipod, iphone, itouch problem with windows 7 64 bit
Windows 7 can't recognize my iPod Classic iPhone, iTouch?
Windows cannot find driver software for my iPod classic/nano?
Windows Update can't find driver for iPod classic / nano ?
initial requirement: -> install updated itunes
1. Start button -> search for device manager
2. Under other devices, right click -> click uninstall -> then right click again -> scan for hardware changes
it should show generic volume installed.
and show apple device in portable devices.

Windows cannot find driver software for my iPod classic/nano?
Windows Update can't find driver for iPod classic / nano ?
initial requirement: -> install updated itunes
solution:
1. Start button -> search for device manager2. Under other devices, right click -> click uninstall -> then right click again -> scan for hardware changes
it should show generic volume installed.
and show apple device in portable devices.

3. showed under portable devices. -> restart your computer
problem solved
Monday, December 20, 2010
Wednesday, September 29, 2010
Calculate Subnet mask and IP Address the easy way (VLSM)
Question:
Given the Class C IP address, 192.168.10.0/24, the number of users shown below, and the fact that subnet zero is considered to be the first subnet determine and write down the following:
Using the first subnet, determine the subnet address and mask for VLAN 40 (40 IP addresses).
Using the second subnet, determine the subnet address and mask for VLAN 30 (30 IP addresses).
Using the third subnet, determine the subnet address and mask for VLAN 20 (20 IP addresses).
Using the fourth subnet, determine the subnet address and mask for VLAN 10 (10 IP addresses).
Answers:
VLAN40
need 40 ip addresses:
closest 2^x: 64 where x=6. It means we need 6 zeros for the subnet mask.
Thus, subnet mask in binary: 11111111.11111111.11111111.11000000 (numbers of 1 = 24+2 = ip/ 26)
subnet mask in decimal: 255.255.255.(128+64)
: 255.255.255.192
range: the smallest 1 in binary subnet mask = 64.
ip range for the VLAN 40= 192.168.10.0 - 192.168.10.64
broadcast address: 192.168.10.63
available ip addresses: 192.168.10.1 - 192.168.10.62
VLAN30
need 30 ip addresses:
closest 2^x: 32 where x=5. we need to save 5 zeros.
subnet mask in binary: 11111111.11111111.11111111.11100000 (numbers of 1= 24+3 = IP/27)
subnet mask in decimal: 255.255.255.(128+64+32)
: 255.255.255.224
range : the smallest 1 in binary subnet mask= 2^5 = 32.
ip range for VLAN30: 192.168.10.64 - 192.168.10.96
broadcast address: 192.168.10.95
available ip addresses: 192.168.10.65 - 192.168.10.94
we can do the same for the next 2 with above method.
Given the Class C IP address, 192.168.10.0/24, the number of users shown below, and the fact that subnet zero is considered to be the first subnet determine and write down the following:
Using the first subnet, determine the subnet address and mask for VLAN 40 (40 IP addresses).
Using the second subnet, determine the subnet address and mask for VLAN 30 (30 IP addresses).
Using the third subnet, determine the subnet address and mask for VLAN 20 (20 IP addresses).
Using the fourth subnet, determine the subnet address and mask for VLAN 10 (10 IP addresses).
Answers:
VLAN40
need 40 ip addresses:
closest 2^x: 64 where x=6. It means we need 6 zeros for the subnet mask.
Thus, subnet mask in binary: 11111111.11111111.11111111.11000000 (numbers of 1 = 24+2 = ip/ 26)
subnet mask in decimal: 255.255.255.(128+64)
: 255.255.255.192
range: the smallest 1 in binary subnet mask = 64.
ip range for the VLAN 40= 192.168.10.0 - 192.168.10.64
broadcast address: 192.168.10.63
available ip addresses: 192.168.10.1 - 192.168.10.62
VLAN30
need 30 ip addresses:
closest 2^x: 32 where x=5. we need to save 5 zeros.
subnet mask in binary: 11111111.11111111.11111111.11100000 (numbers of 1= 24+3 = IP/27)
subnet mask in decimal: 255.255.255.(128+64+32)
: 255.255.255.224
range : the smallest 1 in binary subnet mask= 2^5 = 32.
ip range for VLAN30: 192.168.10.64 - 192.168.10.96
broadcast address: 192.168.10.95
available ip addresses: 192.168.10.65 - 192.168.10.94
we can do the same for the next 2 with above method.
Monday, August 9, 2010
is finally block called after return command in try block ?
1: static void Main(string[] args)
2: {3: try
4: {5: Console.WriteLine("line1");
6: return;
7: }8: finally
9: {10: Console.WriteLine("line2");
11: } 12: }output:
1: line1 2: line2Well in fact, believe it or not, the finally block will always occur no matter what happened in the try block or any optional catch block.
reference: http://chaoticjava.com/posts/finally-finally-block/
Monday, January 18, 2010
CountWords C# using Regular Expressions (Regex)
1: protected int WordsCount()
2: { 3: Regex r = new Regex(@"\b\w+\b");
4: return r.Matches(textBox1.Text).Count;
5: }don’t forget to include using System.Text.RegularExpressions;
Angle between the hr hand and min hand in the clock
C# Function that would tell the angle between the hr hand and min hand in the clock
1: // assume we always have valid numbers for hour and minute
2: private double CalculateAngle(int h, int m)
3: { 4: // position for minutes
5: double totalHourPerDay = 12;
6: double totalMinutesPerHour = 60;
7: double totalMinutesPerDay = 360;
8: double m_pos = m / totalMinutesPerHour * totalMinutesPerDay;
9: double h_pos = (h / totalHourPerDay * totalMinutesPerDay) + (m / totalMinutesPerHour * totalMinutesPerDay / totalHourPerDay);
10: 11: double gap = Math.Abs(m_pos - h_pos);
12: 13: 14: return gap;
15: }
Subscribe to:
Posts (Atom)
