|
|
I have a setup for it... any way, in which i can get the code back from there...
thanx
|
|
|
|
|
When the the user clicks on the submit button I want that information submitted to my database. It writes just fine until I try to display a Confirmation page then it will not write anything to the database. How do I write to the database and also display a Conformation Page?
Shane
|
|
|
|
|
make sure you are redirecting to the conformation page after you write to the database. not before.
|
|
|
|
|
I'm trying to build this application that looks at a folder and displays new pictures. I got that to work flawlessly, but there is one more part that is having more issues. The camera that I want to watch gets recognized as just that - a camera (or scanner). Thus, I can't tell my app to watch it, creating a useless application.
I've poked around a bit, but to no avail. Perhaps somebody can shed some light on this.
|
|
|
|
|
You may want to Google for "windows image acquisition[^]". Why look in a folder when you can get the image directly from the camera. Maybe... it depends on if your camera supports it or not.
|
|
|
|
|
I have imagelist with few images. How to get fileinfo of image with specific index?
Second thing is how to show string in listview as item..cause this doesn't work..
for (int j = 0; j < this.imageList1.Images.Count; j++)
{
ListViewItem item = new ListViewItem();
this.listView1.Items.Add(imena[j]);
}
imena is string array defiend as string[] imena=new string[10]..
|
|
|
|
|
Just out of curiosity, if you aren't using the item variable why did you declare and instantiate it?
ListViewItem item = new ListViewItem("someString");
listView1.Items.Add(item);
|
|
|
|
|
you might want to set the ListViewItem.Text then add the item to the list
item.Text = imena[j];
this.listview1.Items.Add(item);
|
|
|
|
|
Is it possible to get info of files from imagelist..?
|
|
|
|
|
what sort of infomation do you want, if its height / width / resolution, then its pretty simple.
imageList.Images[yourImageIndex].Width
|
|
|
|
|
hi
I look for procedure in c# the work of procedure is to determine the object boundary in image.
the image contains one object. the output of procedure must be array contains the coordinates of boundary.
anyone can help me please.
|
|
|
|
|
Your really not going to get much help on what is essentially a university-grade research topic called "machine vision". Google for "machine vision algorithms" and you'll find a bunch of very deep information.
|
|
|
|
|
Dave is right, it is really nontrivial and generally ambigious procedure (I mean - it is often unclear what the 'correct' result should actually be). Check out some basic articles on edge detection and image segmentation. And don't expect to get quick results on wide range of images.
H.
|
|
|
|
|
Hi all.
I'm gonna simulate a small-size robocup soccer[^] with nVidia PhysX & C# .
(I'm beginner in nVidia PhysX , but I'm OK in C#)
How or where can I start learning that ?
Could you guide me ?
Would appreciate if you answer the questions.
Thank you.
|
|
|
|
|
Mohammad Dayyan wrote: Would appreciate if you answer the questions.
Thank you.
Mohammad Dayyan wrote: I'm gonna simulate a small-size robocup soccer[^] with nVidia PhysX & C# ?
This is not a question, it is a statement.
Mohammad Dayyan wrote: How or where can I start learning that ?
Study the subject at home.
Try asking a real question and maybe, just maybe, you will get some help.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
williamnw wrote: This is not a question, it is a statement.
Thanks for the errors. You will be a good compiler.
|
|
|
|
|
try here[^]. It looks like they have lots of help including documentation and forums.
|
|
|
|
|
|
i have managed to make a client and server classes for socket comunication, but i have no ideea how to manage multiple clients connecting to the server, i've checked the web and msdn but most exmpales are either too convoluted or use different mechanics than mine, so how do you guys do this ?
|
|
|
|
|
rareseu wrote: i've checked the web and msdn but most exmpales are either too convoluted or use different mechanics than mine
Maybe your mechanism isn't right then? .
1. The simplest way is creating a thread that will call accept in a loop. For each accepted thread you create new client thread, pass new socket there and voila. Drawback is that you will use 1 socket per connection, so managing a lot of sockets could be expensive. (btw, for each client socket, you can use synchronous operations now).
2. A bit more complicated, but more robust solution is to use asynchrounous communication. Then, foreach connected client, you create him a read buffer, write buffer, supply callbacks methods and just invoke BeginRead/Write. Your callbacks methods will be ran automatically when some data will arive (read) or was sent (write). In callback methods, what you should do is call EndRead/Write to get data, do some quick processing (fe. copy received data to some external buffer) and invoke Begin methods once again, and so on, and so on .
|
|
|
|
|
Thanks for the suggestions Ravadre I've got a question about the 2nd method and in fat this is the main thing i don't understand about working with sockets : how can i tell who i'm talking to ? (client wise) I mean if i accept a connection how do i know who's trying to connect to me ?
|
|
|
|
|
I'm not sure if I understand your question correctly. If you meant that you don't know who has just connected to your server - well, you don't , You can get his IP, or authentificate him using some sort of your own protocol. But if you would have meant that, then this is general issue, not only related to 2nd method, so maybe you've meant, how to know which client has sent you some data, which invoked your callback method, well, there are 2 ways to keep this information; when you Invoke BeginRead() you can pass your own parameter, you can pass some sort of structure that will tell you what you need to know, fe.:
<br />
tcpClient.GetStream().BeginRead(buffer, 0, bufferSize, callback, this)<br />
then, in callback:
<br />
TcpClient myClient = (TcpClient)result.AsyncState;<br />
The second approach (which I use) is to create some sort of wrapper class that handles everything, a little example (a bit simplified):
public class Program
{
class NetClient
{
const int bufferSize = 4096;
TcpClient client;
byte[] writeBuffer;
byte[] readBuffer;
public NetClient(TcpClient client)
{
this.client = client;
writeBuffer = new byte[bufferSize];
readBuffer = new byte[bufferSize];
client.GetStream().BeginRead(readBuffer, 0, bufferSize, OnDataRead, null);
}
void OnDataRead(IAsyncResult result)
{
int dataRead = client.GetStream().EndRead(result);
client.GetStream().BeginRead(readBuffer, 0, bufferSize, OnDataRead, client);
}
}
public static void Main()
{
List<NetClient> clients = new List<NetClient>();
TcpListener server = new TcpListener(11111);
server.Start();
while (true)
{
TcpClient client = server.AcceptTcpClient();
Console.WriteLine((client.Client.RemoteEndPoint as IPEndPoint).Address);
clients.Add(new NetClient(client));
}
}
}
Alternatively, you could make OnDataRead static, and pass NetClient as a parameter, just like in 1st approach.
|
|
|
|
|
Thanks for taking the time to explain Ravadre , i really appreciate it, i'm gonna need some research time to understand the classes and methods you're using. I guess the reason i'm being a little vague with my questions is because i'm not quite sure what i need to make this work, this is the first time i'm working with sockets under c# ( done it once before in c under linux )
|
|
|
|
|
Hi Peoples,
i need to check that in a folder a file type of xml ,
that is *.xml
for a single file we use to check like
normally we do like,
folderpath
System.IO.File.Exists(D:\CodeProject\CodeProject.xml)
this will work, but i need to check all the xml file in that folder,
how to do that, can any one help me?
|
|
|
|