|
Yeap,
tried that already but it doesn't work.
There is some problem with these characters :
[
]
these wont escape!
try it out on VS. you will get a
Syntax error, ']' expected
Thank you! :P
theJazzyBrain
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
Whoops! My bad. The problem is not with the '[' and ']' characters, but with the quotes that I didn't see inside your string. When using the '@' sign in front a a string literal, in order to get a double quote into the string, instead of denoting the end of it, you have to double it up, like:
string myPattern = @"<\s*DIV((\s*\w*)\s*=\s*(""[^""]*""|'[^']'|[^>]*))*>.*<\s*/\s*DIV\s*>";
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yup!
thank you
theJazzyBrain
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
Dear,
i want to make a lan messenger in C#, HOw?
Awaiting
|
|
|
|
|
You open Visual Studio, create a Windows Forms application project, add whatever UI controls you need to the form, and hang some code on the controls to do the actual processing of your user interface. Oh! You'll also need to add a class to the project and supply the code to pass message back and forth over the network, as well as manage connections to multiple clients, or possibly a chat relay server.
Next question! Maybe being MUCH more specific in scope would help. Like what part of this project are you having problems with?!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dear
i check simple messenger code from site c-sharpcorne.com By Muhammad Al But i didn't able to run it even demo also didn't work if u have more info in this please send me or any link from where i can see about it,
Thanx For +ve Response
|
|
|
|
|
--Using [VS C#.NET]--
Given a main C# form (main.cs Design/Code) and a threaded worker (worker.cs: inherists from a Threaded class that has functions: LockRead and LockWrite implemented)
What I plan on doing is the following:
When the user presses a button I create my new workers as follows (in my main.cs: private void btn1_Click(object sender, System.EventArgs e))
Worker 1Worker = new Worker(Device, File, Task);
Where variables device, File, Task are required information for the worker to perform its task.
Now, my main.cs form also has a Timer (timer_Refresh) that I use to refresh all my GUI (datagrids, combo boxes, etc) so I thought that at this point the timer_Refresh_Tick event could READ the status of the thread and display it in the GUI (is it STRTATING, PROCESSING, FINISHING, etc…)
My main problem is, how to communicate between the main.cs [which has the timer_Refresh_Tick event] and the Worker threads [like 1Worker] to get the status? (shared ressource)
I thought of using a simple array or dataset to store the status of each thread but I can’t seem to figure out how to “share the resource” so that both can access it (and how to implement LockRead and LockWrite accordingly for this resource).
- Worker thread must be able to access it to update its status as it goes
- main.cs timer_Refresh_Tick must be able to access it to read the new status every tick and display it in the datagrid
Using a table/database to store the information is a possibility (creating a [Task] DB Table) and then I will have a Table that both can access [create db connection objects in both] but I am sure there is something way better (like using a custom class…. String[] array…..dataset……?)
I hope this helps show you where I am stuck…
Thanks,
|
|
|
|
|
Hi, everyone,
I have a question when I use the following code to get the response.
WebRequest req = WebRequest.Create(sURL);
try
{
WebResponse result = req.GetResponse();
}
catch(Exception){}
the code works very well on my XP, but when I run it under Windows server 2000, or some others PC, I sometimes get the exception:
The underlying connection was closed: The server committed an HTTP protocol violation.
it comes with the code GetResponse(). But when I use IE try the Url, IE works.
Would you please tell me why that is happened, and How to avoid/fix that, so I can read the response.
Thanks a lot in advance!!
Alan Shen,
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|
|
If you're sure the code is ok,
1. The .NET Framework versions on XP and Win 2000 server might be different and may cause problems.
2. If it is a specific server you are connecting, it might have a configuration that determines how to response depending on the client-type/platform that is trying to connect.
Just a thought.
Radgar
"Imagination is more important than knowledge." - Albert Einstein
|
|
|
|
|
Can you please help me in my problem?
I have a socket prog. application like
http://www.codeproject.com/dotnet/csharpwhiteboard.asp
My application is chat application like above architecture.
I want to bypass firewall as well as proxy if any on two chat clients like yahoo or msn can chat beyond proxy/firewalls...
Please guide me, how i can do that...!
Thanks,
Mahesh Devjibhai Dhola
"Empower yourself..."
|
|
|
|
|
|
Please tell me how can I send with the message a file and then everything about my question will be clear.Best regards.
|
|
|
|
|
You can't! Code Project doesn't support attachments. But, you can include a link to your code .ZIPped up and posted to some server.
But still, we can look at the code all day long and still not understand your question.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have to compare two XML files in C# by their attribute"name".The key fields are the same
|
|
|
|
|
|
|
hello.
If I have a server that has multiple threads and happens to send two messages to a single client at the same time, what will happen?
If client receives via loop using netstream.read, will one of the two messages be lost?
if both are received, then how do I know which message is received first?
|
|
|
|
|
Jugen wrote:
If client receives via loop using netstream.read, will one of the two messages be lost?
Not if you use TCP, not sure about UDP though... They will just arrive sequencially.
Jugen wrote:
if both are received, then how do I know which message is received first?
Add a timestamp or msg id to the outgoing message.
xacc-ide 0.0.10 now with C#, MSIL, C and HLSL coloring - Screenshots
|
|
|
|
|
whew! I was afraid one of the messages would be lost.
what do you mean by timestamp?
|
|
|
|
|
hi guys,
I want to do Popup Menu in My Application. Who can teach me with Example Code.
MR.AMT
|
|
|
|
|
Do you really need/want to do it in code? It is quite easy tp do in the VS .NET designer instead:
Drag a ContextMenu component onto your application's main form (it will appear in the component tray). When the component is selected it will appear at the top of your form in the same location as a main menu does (temporarily replacing the main menu if one is present). To add items just start typing there as you would when creating a standard menu. With your main form selected, choose the name of the ContextMenu you just added for the form's "ContextMenu" property (it should appear in that property's drop down list in the Property Browser). That's all there is to it.
If you want to see how to do it in code, just look at the code VS generates for you after you've done the above.
Hope this helps.
Mitchell
|
|
|
|
|
Hi,
Iam having a search option after giving values . search results have to display in datagrid.
After tht . the i wnt it in this way.
Name,exp , field location Here i wnt word doc to disp
ex: naveen 2+ dotnet usa I.e to open Resume naveen (by clicking word icon)
how this is possible help me in coding.
|
|
|
|
|
Your searching queary go where ? in database or File ?
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I want to search from db(msaccess).
It has tables like :
dotnet
java..
where table have fields like
Name Exp phno Domain(.net,java..) ...
I have search txt box1 txtbox2
I want to type Dotnet (txtbox1) 2+exp (txtbox2)
then it should disp all the records matching record.
Also i wnt to open word doc (There resume)
How coding help wanted
waiting for reply
chand
|
|
|
|
|
Try to fire some queary aganist your database and get the records. Or if you want to collect all records without any criteria and need to filter records in client side, then please have alook at DataView,DataViewManager classes.
And it may very difficult for you to search .doc or .txt files ( candidates resume ) after your candidate selection. So here i would like to suggest a small design modification in your tables.
ie,
I recommand you to store the candidates resume location ( c:\resume\myresume.doc) through their contact informations. Say Name,Exp,Phno,domain,resume_location.
If you are following this design, then you can avoid lot of lines and searching conditions for .doc or .txt( resumes ) files in your secondary storage.
hope this will surve your purpose.;)
Sreejith Nair
[ My Articles ]
|
|
|
|