Monday, September 20, 2010

Done! Sleep!

Just finished the C Programming ASS,

Sunday, September 19, 2010

Eric Carmen

Like His voice, Run Away!!

Dynamically Allocation Multidimensional Arrays

Doing the ASS of my C programing language, I need to dynamically allocation two dimensional arrays.
 So the method is as below:
int **a; 
int i,m,n; 
scanf("%d %d",&m,&n); 
*a=(int **)malloc(m*sizepf(int *)); 
for (i=0;i<m;i++) 
       a[i]=(int *)malloc(n*sizeof(int)); 
//which is just like in C++: 
int m,n; 
int a[m][n]; 
cin>>m>>n;
very funny!

Saturday, September 18, 2010

Use EclipseCDT in Windows

http://www.cs.umanitoba.ca/~eclipse/7-EclipseCDT.pdf


use MinGW

SyntaxHighlighter in Blogger

SyntaxHighlighter is awesome.

if u wanna use it in blogger, do the following steps:

Download and find a place to host the library files for SyntaxHighlighter. A free choice is, of course, google sites

Use grep to search strings in files

GREP is a powerful tool to search in linux, as there is no good search tools in windows.

A simple example:

$ grep "some string" /home/steven/*.txt

Search all subdirectories recursively

$ grep "some string" /home/steven

-i ignore case

wanna know more things it can do just:

grep --help

Friday, September 17, 2010

Win7 is very user friendly

There is a lot of things win7 amazed me.
when I use the remote desktop connect to another server, I can just drag the bar.:

Boot!! Win7 and ubuntu 10.04

Finally reinstall the grub.
http://goo.gl/mKMY

One thing DropBox Need to Improve

Just fount out one thing that DropBox need to improve:
When I move one folder into another on the web, the DropBox have to download all of the folder from the net. What a wast! Just do the mv operation on the computer.

Wednesday, September 8, 2010

Gonna Sleep

Java is Powerful. I am not efficiency in writing java code, but that's all right.Finish it tomorrow!

Just try to publish a post through email

Just try to publish a post through email, 
nothing else.

--
/**
 *@You Silin
 *More Info:
 *http://www.google.com/profiles/yousilin
 *My Blog:

Useful Eclipse Shortcut Keys

Ctrl+Shift+T

Find Java Type

Start typing the name and the list gets smaller. Try typing the capital letters of the class only (e.g. type "CME" to find "ConcurrentModificationException")

Ctrl+Shift+R

Find Resource

Use this to look for XML files, text files, or files of any other type. which are in your workspace.

Ctrl+E

Open Editor Drop-Down

Presents a popup window listing currently opened files. Start typing to limit the list or simply use the down arrow key.

Ctrl+O

Quick Outline

Use this to find a method or a member variable in a class. Start typing to limit the choices. Press Ctrl+O a second time to include inherited methods.

Ctrl+Space

Content Assist

Context sensitive content completion suggestions while editing Java code.

Tuesday, September 7, 2010

TOO LATE

EVERY TIME, IT IS TOO LATE WHEN YOU SLEEP

windows netsh command

netsh interface ipv4 show interfaces

Example result:
Idx Met MTU State Name
--- --- ----- ----------- -------------------
1 50 4294967295 connected Loopback Pseudo-Interface 1
9 20 1500 connected Local Area Connection


netsh interface ipv4 show interface 9
Example result:
Interface Local Area Connection Parameters
----------------------------------------------
IfLuid : ethernet_7
IfIndex : 9
Compartment Id : 1
State : connected
Metric : 20
Link MTU : 1500 bytes
Reachable Time : 19000 ms Base Reachable Time : 30000 ms Retransmission Interval : 1000 ms
DAD Transmits : 3 Site Prefix Length : 64 Site Id : 1 Forwarding : disabled
Advertising : disabled Neighbor Discovery : enabled Neighbor Unreachability
Detecion : enabled Router Discovery : dhcp Managed Address Configuration :
enabled Other Stateful Configuration : enabled Weak Host Sends : disabled Weak
Host Receives : disabled Use Automatic Metric : enabled Ignore Default routes :
disabled

Why is there no ARP reply in the packet trace

>Hello
> I'm having a situation concerning Arp where i am seeing no Arp
>reply's to many arp requests on my network when i evaluate with a
>protocol analyzer. I think the arp traffic may be at a level where it
>is disrupting traffic on the network and nodes are dropping off as a
>result. It is a microsoft 2000/xp network running active directory.
>The sniffs show alot of whois arp traffic and i see little or no arp
>reply's with the mac address. I'm wondering what this could be due
>too. It is a flat network with 175 nodes running a class b subnet.
>Wins and Dns are configured. The workstation nodes are mixed
>win2k/xp(majority being 2k), The servers are win2k. Is this high
>amount of arp traffic(between 60 to 90 percent at a server)normal and
>if not what could i do to facilitate the arp reply's. Thanks


How is your protocol analyzer connected to the network? If you're on a
switch, it would be logical that you don't see ARP reply's.

The ARP requests are in the fowm of a broadcast, so sent to every
port. However, the reply is sent as an unicast to the host which made
the ARP request.

Unless you configured a SPAN por, you won't see this traffic on a
switched network. This would also explain why you see such a high
percentage of ARP requests: the unicast traffic isn't captured by your
protocol analyzer.


With kind regards,

Patrick

The ARP Command -s

arp -s InetAddr EtherAddr

allows you to manually add an entry to the ARP cache that resolves the IP address InetAddr to the physical address EtherAddr.