As a general rule, the quality of the answer you get is directly proportional to the quality of the question asked. Take your question for example. It's vague, broad in scope, not even a question, demonstrates lack of any research, does not demonstrate any effort on your part and does not make any sense to begin with. As a result you are going to get vague, broad answers that are probably not going to be of much help.
Bottom line: you want better answers then ask better questions.
Hello, I'm doing a project to send information from multiple serial ports over TCPIP network.
The approach I am using is as follows:
Use BackgroundWorker for each serial port that is used to capture the information received.
I use a common method to treat the information received and stored in a queue using locks.
//private String _datos;
Queue _cola = new Queue();
privatevoid bw_DoWork(object sender, DoWorkEventArgs e)
BackgroundWorker bw = sender as BackgroundWorker;
string port = (string)e.Argument;
//put all your serial port code here
SerialPort sprt = new SerialPort(port);
sprt.BaudRate = 4800;
sprt.Parity = Parity.None;
sprt.StopBits = StopBits.One;
sprt.DataBits = 8;
sprt.Handshake = Handshake.None;
string indata = sprt.ReadLine();
//update the graph
BeginInvoke((Action)(() = UpdateGraph(port)));
//user wants to stop the worker
privatevoid UpdateGraph(string port)
//messures is shared by several threads: you must lock it to access it safelylock (_cola)
string text = Leer();
//the curve has been updated so refresh the graph
I found that if I open several ports and FIFO is slower getting data extracting data, the program is "locked." So far all I do is get the information even RichTextBox, but the purpose is to send this data via socket to another computer.
I understand that I should make a thread to avoid these locks but how should do so within the BackgroundWorker?
Sir i just wanted to know the code for K-means Clustering on text documents !!
As the code is available in C#!
but I am not able to get it!
and I am new to this site!
So can anybody help me please!
Thanks a lot!
I am trying to setup a parent task with child task (task1) to run x number (100) of task then run a separate task (task2) 1 time then continue running task1, etc. continuous loop until total task (1000) are complete. Can I do this using the ContinueWith statement, can someone please give me an example or point me to one that shows how to do this.
It gives many example of the different ways to execute a Task
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
AFAIK, you can't tell is a connection is wired or wireless without asking your specific router.
It presents an IP presence to the world - it does not distinguish between the connection methods.
So there are two ways to do it:
1) Tie your code to your specific router and find a way to ask that. This will be dependant on the specific make and model of router you are talking to.
2) Slightly less specific would be to set your router to use two different address ranges for wired and wireless devices - again this will probably depend on your router, but it may be possible if you use a different DCHP controller.
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
Beyond that, some data types were chosen wrongly.
A "Telephone number" is not an int, even when it contains didgits only: it can start with a "0", - and it could be bigger than 2^31 (10 digits or more).
"BirthDay" ought to be a DateTime, not a string.
And the "ID" ought to be generated by the SQL Server, not by the client.
1)We have developed a library to use it with our software & we build it as DLL
2)We developed a application using our library
Now what I need that no other user can use my library in his application for example when i give my application to end user that library is going to be added in setup, and if we dont protect it , any user can use it as reference in a .net project and can use my library and develop his own program , I need some thing that only my application will have access to my library and no other program can use it as reference and access its features