|
Hi All.
I learning in this week how to use regular Expression in c# ( .Net 2.0 - IDE 2005 ).
I don't understand if use regular Expression "cost" more then use some scan string to know validation of some sentence ( that build from string ).
1. Some one can solve my understanding problem ?
2. How can i know if using regular Expression is more effective ? where can i find some article about effective use ( or more effective use ) in C# trait ?
Thanks for any help ...
|
|
|
|
|
RegEx costs more, plainly. A ferrari also costs more than a push bike. RegEx can do things that are hideously complex to try and do with string mashing.
If you search the site for Expresso, that's a tool for playing with regex. Basically, if string mashing can solve the problem simply, use it. But, having said that, outside tight loops, it's not likely to matter which you use.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
OK , i see that.
Bug but lets take some example of some dummy application that need to analyze some document with 100000 line in this document.
To know if some expression X is in line i can do it in 2 ways
1. Scan and look for Y string.
2. Use regular Expression to find matching.
But if i need to look for 100000 line and look for match with 10 strings - what you recommend to use ? regular Expression or string look for ?
|
|
|
|
|
Write both instances and time them to find out which one is faster. Then if you want to know which is faster for case(n) and case(
|
|
|
|
|
Hi
I am not able to connect to remote oracle database with out installing oracle client client software on my machine.
The application code is in C# and database is Oracle.
Is it possible to connect to Oracle database with out Oracle CLient. I am using ODP.Net provider.
Thanks in Advance
Venkat
|
|
|
|
|
VenkatChundi wrote: Is it possible to connect to Oracle database with out Oracle CLient.
No.
To access the server services you must have client software.
Regards.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
Okay i want to do this: Use the child's MDIParent property to get the parent form. Cast it to the
MDI parent type. Then set/use the properties of the parent.
What is the correct syntax because i keep getting Errors?
|
|
|
|
|
MyParent form = (MyParent)this.MDIParent;
However, if you need to pass data from the child to the parent based on a user action, it is better to do it with events. This way you avoid casting and you do not risk changes to the parent form or its' children.
Search MSDN and you will get a good tutorial on establishing events. The altered data can be in your custom event arguments.
|
|
|
|
|
There are different approaches, but I think this will assist
Code for the Closing event of the Child form i.e. on closing the form; here is the code: In this code the frmMain is the MDIParent of the frmItem, but casting is important in retrieving the properties of the parent form:
private void frmItem_FormClosing(object sender, FormClosingEventArgs e)
{
Form f = sender as Form;
((frmMain)f).statusStrip = frmItem.statusStrip;
}
|
|
|
|
|
i want a project on designing a website on virtual stock exchange using asp.net, c#, sql server and flash
|
|
|
|
|
Now you have it.
Best,
Jun
|
|
|
|
|
Rentacoder is a good place to get your homework done, if yuo want to pass without actually becoming employable.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: Rentacoder is a good place
You're just jealous of those guys
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
I want fame, fortune a ham sandwich and a big-screen TV.
/ravi
|
|
|
|
|
My mate in Texas bought a headset for $500 that apparently gives you a view like being in front of a 42 inch TV. Perhaps if you're 100 metres away from it, but he's still happy with it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have a client/server app that I'm working on that needs to tell the server to create an archive of a database, then transfer that archive file to any specified machine (even outside the local LAN). How do I give my server the permissions of the logged in user on the client side so it can use that users permissions to move/copy the file in C#?
I've read a lot about "Zones" and FileIOPermissions, but everything seems to be dealing with running things locally.
Thanks!
JT McDuffie
-jtmcduffie@gmail.com
http://www.mcduffie.net/james
|
|
|
|
|
Impersonate the logged in user. You should find plenty of articles here telling you how to impersonate the windows user. That will allow the program to operate with that users credentials.
Logifusion[^]
|
|
|
|
|
Okay, i have found a ton of articles and source code that i have used to try and fix this, but i have had 0 luck so far.
First off, i am trying to get the screensaverr to display a preview. All samples i have seen so far have failed, for me anyway. most seem to involve an IntPtr, but none explains how to use it. i have copied code that absolutely works for the source code, but when i copy mine into it, nada.
the other is getting the screensaver to show on multiple monitors. i routinely work with 2 at a time, and would like to get this working. The issue i seem to have is everyone does a for() loop that counts the number of screens, then launches a screensaver in each one, whihc is all fine and dandy, except for 2 issues. Sometimes, the saver starts and runs in the primary screen, then if you move the mouse, it loads in the same window again. The next issues is that when that doesnt happen, the saver runs on the primary screen, then if you move the mouse, it starts in the second screen. obvious, having it run on both at once is the odeal solution.
Does anyone have any barebones, completely unfancy code that can accomplish any of these?
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
|
I have actually looked at that and tried using it for my own, but between the complexity of your code, overlapping with the complexity of mine, i am getting lost.
Yours is actually the ONLY source code i have found that actually does the multiple monitors properly.
I dont suppose you have a sample of just the monitor code hanging around?
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
I'm sorry, I don't have anything else, but it's really not complex. You work out the co-ordinates of the total desktop using the code that's in the article, and you draw to those co-ordinates. Once you copy the routine to get those co-ords, the rest is exactly as it is for single monitor, is my recollection.
The rest of it is probably over complex, I scanned the article and note I was apologising for bits of it ...
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
Hi;
I have this big problem in .net 2005 (C#). In the previouse version (2003) when we made a stored procedure we could simply drag and drop it into the screen and VIOLA you had all the code you needed for the procedure and with a little touch everything was fine. Now in .net 2005 I can't do that anymore or at least I dont know anyway. Could some one help me on this please or at least present another solution or 3rd party tool I could use.
I realy need to use SP.
Thanks very much
Hadi
|
|
|
|
|
If the drag-n-drop is broken or missing, try writing the code yourself.
:josh:
My WPF Blog[^]
|
|
|
|
|
How do you Pass Data from a MDI Child form to its Parent form?
|
|
|
|