|
well this is my first post on codeproject, first of all thanks too all that have posted so many good articles in the past that has helped me out greatly. anyways down to the question.
i was to create an application that will recieved Cisco Netflow packets (http://www.cisco.com/en/US/tech/tk648/tk362/technologies_white_paper09186a00800a3db9.shtml) and then parse out the data. store the data and then use RRDTool to create pretty little graphs. I have never done socket programming before or really know where to start. If i can aquire the individual pieces of data in those fields then i can dump it to txt files or a database or w/e i please . i'm pretty sure that i don't want to use raw sockets, and that i want to impliment a socket in the tcp/ip stack itself. I'm relitivily sure i can get the raw data itself, but from there i don't know how to turn the string of jibberish i would get into english. does anyone have any ideas? i'm not asking for a free hand out of code, but just to be pointed in the right direction. thanks.
|
|
|
|
|
Well, I would suggest to play with socket programming first by simply writing little programs. You could start with examples here on CodeProject. And eventually you will find the right way
Vitaliy
|
|
|
|
|
If I want array with elements of different types - what must I use instead of an array? (Since the elements in an array must be of the same type)
Arbitrary example: If I want an array that shows colors and their corresponding integer value.
Do I use a struct ( I don't think so)? So what would I use?
|
|
|
|
|
|
You could have an array of objects, or some other base class. Of course you would need to be aware of the performance issues with boxing/unboxing.
only two letters away from being an asset
|
|
|
|
|
If you want to store two different types like that and they correspond on a one to one basis I would use a dictionary.
Dictionary<string,int> d = new Dictionary<string,int>();
d.Add("Blue", 0x0000FF);
d.Add("Red", 0xFF0000);
d.Add("Green", 0x00FF00);
Console.WriteLine( "Blue is " + d["Blue"]);
Console.WriteLine("\nRed is " + d["Red"]);
Console.WriteLine("\nGreen is " + d["Green"]);
If you are going to have many different and arbitrary classes you probably need to rethink your program before you start plugging them all into an ArrayList, yank em out, and hope you cast correctly.
-- modified at 15:36 Friday 18th August, 2006
|
|
|
|
|
Hi,
You Can Also use hashtable.
Hope This Works.
Nitin...
|
|
|
|
|
hi
how to print multipage in vc# 2005 ? (for example a datagrid with many records).
thanks ..
|
|
|
|
|
Hello
In the PrintPage event there is an e.HasMorePages property. While you draw your graphics -controls, tables, text, etc...- you make sure to check the length of the current page that you've reached.
Once youy start drawing outside the bottom margin you should set this property to true and return. Then the event will be fired again.
Actually this event will keep firing til you set the HasMorePages to false and return. The graphics and drawing part is all on your shoulders.
Why don't you take a look at My Article[^]? Maybe it will help you.
Regards
|
|
|
|
|
I have two forms. One is master form and one is inherited form from master form. How can i inhert a function from master form?. i want to override a function in the master form in the inherited form.
Regards
Hari
|
|
|
|
|
public class BaseForm : System.Windows.Forms
{
public virtual void MyFunction()
{
...
}
}
public class ChildForm : BaseForm
{
public override void MyFunction()
{
...
}
}
|
|
|
|
|
Hello
3 quick, short, direct, well focused answers in a row in less than 30 mins. WOW!! I think that's a record
Someone should make you Programmer of the month.
Regards
|
|
|
|
|
Nader Elshehabi wrote: 3 quick, short, direct, well focused answers in a row in less than 30 mins. WOW!! I think that's a record
You should have been here when Heath Stewart hung around the C# forum. Now there was a guy who could go through 20 questions in 30 minutes all with precise, detailed and accurate answers. He works for Microsoft now and doesn't have so much time. He pops in now and again, but not very often.
|
|
|
|
|
Hello
I read the bio of the man. He is quite a guy! and 9 THOUSAND messages!!! How did he do that?!!
Last message in the C# forum was 7 months ago though.. Too bad!
Regards
|
|
|
|
|
I have removed the contorl title bar from my form. I have put a usercontrol there instead of that. Now when i drag it the form should move accordingly. How can i do that?
regards
hari
aspspider.net/rkharikrishnan
|
|
|
|
|
Use the event OnMouseDown for detecting mouse click, then use OnMouseMove to get the mouse pointer location, from mouse pointer location you can count the x and y for the property Location.
|
|
|
|
|
|
How can get memory status of the system using C#
Memory status means i need to get aviable physical memory, total physical memory etc.
Please help me
Regards
Hari
aspspider.net/rkharikrishnan
|
|
|
|
|
Find all what you want there....
ManagementObjectSearcher m1 = new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem");
foreach(ManagementObject mo in m1.Get())
{
foreach(PropertyData pdc in mo.Properties)
{
Console.WriteLine(pdc.Name + " = " + pdc.Value);
}
}
ManagementObjectSearcher m2 = new ManagementObjectSearcher("SELECT * FROM Win32_ComputerSystem");
foreach (ManagementObject mo in m2.Get())
{
foreach (PropertyData pdc in mo.Properties)
{
Console.WriteLine(pdc.Name + " = " + pdc.Value);
}
}
|
|
|
|
|
Thanks for the help... Its worked for me
|
|
|
|
|
Anywho, If i add a node
this.treeview1.Nodes.Add("ParentNode");
How do i add a node to it?
I can do this
this.treeview1.SelectedNode.Nodes.Add("ChildNode");
but it means having to click on the node first, which i cant do.
|
|
|
|
|
Don't use Nodes.Add(string) use Nodes.Add(TreeNode)
led mike
|
|
|
|
|
Actually, i am adding a node, i just used text to help the example. So err, still kinda stuck here.
|
|
|
|
|
Is there any way i can do this:
TreeNode folder = treeView1.SelectedNode.Nodes.Add(oNode);
folder.Nodes.Add(TreeNode);
It comes up with 'can't implicitly convert int into TreeNode'
It doesnt have this problem if i'm adding text as a node, only when i add an object as a node.
|
|
|
|
|