Expresso will generate the following C# code for you:
// using System.Text.RegularExpressions;<br />
///<summary><br/>/// Regular expression built for C# on: Fri, Apr 16, 2010, 07:52:19 AM<br/>/// Using Expresso Version: 3.0.3634, http://www.ultrapico.com<br/>///<br/>/// A description of the regular expression:<br/>///<br/>/// Match expression but don't capture it. [!(?<JobId>\w*)(?:.*?),(?:.*?)], zero or one repetitions<br/>/// !(?<JobId>\w*)(?:.*?),(?:.*?)<br/>/// !<br/>/// [JobId]: A named capture group. [\w*]<br/>/// Alphanumeric, any number of repetitions<br/>/// Match expression but don't capture it. [.*?]<br/>/// Any character, any number of repetitions, as few as possible<br/>/// ,<br/>/// Match expression but don't capture it. [.*?]<br/>/// Any character, any number of repetitions, as few as possible<br/>/// Match expression but don't capture it. [;(?<Field1>\w*)?/??(?:.*?)], zero or one repetitions<br/>/// ;(?<Field1>\w*)?/??(?:.*?)<br/>/// ;<br/>/// [Field1]: A named capture group. [\w*], zero or one repetitions<br/>/// Alphanumeric, any number of repetitions<br/>/// /, zero or one repetitions, as few as possible<br/>/// Match expression but don't capture it. [.*?]<br/>/// Any character, any number of repetitions, as few as possible<br/>/// :<br/>/// [Field2]: A named capture group. [\w*], zero or one repetitions, as few as possible<br/>/// Alphanumeric, any number of repetitions<br/>/// /<br/>///<br/>///<br/>///</summary><br/>publicstatic Regex regex = new Regex(<br />
| RegexOptions.CultureInvariant<br />
| RegexOptions.Compiled<br />
//// Replace the matched text in the InputText using the replacement pattern<br/>// string result = regex.Replace(InputText,regexReplace);<br />
//// Split the InputText wherever the regex matches<br/>// string results = regex.Split(InputText);<br />
//// Capture the first Match, if any, in the InputText<br/>// Match m = regex.Match(InputText);<br />
//// Capture all Matches in the InputText<br/>// MatchCollection ms = regex.Matches(InputText);<br />
//// Test to see if there is a match in the InputText<br/>// bool IsMatch = regex.IsMatch(InputText);<br />
//// Get the names of all the named and numbered capture groups<br/>// string GroupNames = regex.GetGroupNames();<br />
//// Get the numbers of all the named and numbered capture groups<br/>// int GroupNumbers = regex.GetGroupNumbers();<br />
I hope this helps. I wrapped each section in a non-capturing group with the ? option to account for cases where the field 1 may not be present.
5 from me!
I have been using Expresso for a year or so, and had never spotted it could generate the C# code! Admittedly, it's not an onerous job, but the comment generation is very handy! Thanks a lot - Friday has not been wasted for me: I've learned something new...
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
I am working on some software that needs to be able to create videos from an array of images and I need to create the video as fast as possible. The requirements I have been given are that the software needs to be able to create 6 minute video at 640x480 resolution and 25 fps within about 5 - 10 seconds. Can anyone give me any advice or help?
That requers processing power of 0,77GB/s - 1,54GB/s (asuming the images in the video is in 24bit, and this is for "pure" image reading, any processing like resizing, image filters and so on must be added), you better whipe the dust from that old asm book and optimize like mad.
"Don't re-invent the wheel." applies here. There are plenty of commercial (and some free) applications out there that can do this. I would seriously look at using one.
Look at movie maker or something like that, because taking an image, resizing it to the proper dimensions and resolution, saving its relative position and saving it along with the other images to a video format is a pain you probably never want to go through.
Maybe I should tell you more about the application im developing. Im working on a camera monitoring application that buffers video from up to 12 cameras and records events when a signal is recieved. The buffer is just an array of images that is saved to disk in 5 second chunks. So at the end of recording the event I need to create a video file from the images. I have some code that works and creates a video file but its far to slow. Im just wondering if theres anything faster. If you could point me at some code I could look at or just point me in the right direction it would be apreciated.
Could you please elaborate your question. Are "id" and "classid" primary keys in your tables - then they are of course unique.. If you made a query on tables with the "id" and "classid" as pKey's then the select distinct should help you out in the sql statement. Maybe I didn't really get your question though..
I've a datatable. type and id are the columns of datatable. I would like to filter the datatable using select method on a condition(type='s') and distinct on one column(id).
like datatable.Select("type='S' distinct id);
Hope this is clear. If not, please let me know.
the problem is solved. hope the solution might help some one.
DataRow dr = dtSimple.Select("type='S'");
foreach (DataRow dr1 in dr)
DataView dv = dt1.DefaultView;
//below line gives the distinct values of column "id"
dt1 = dv.ToTable(true, "id");
I have a winform application and want to add some reports to it.
Because my Data Access Layer can do MsSQL, Access, MySQL and Oracle I search for a "database independent" solution (now I use generally SQL Express). If posible I like the idea to have standalone reports so If I need to change the report I don't need to rebuild the entire solution.
I'am searching for a good tutorial to do this and have quick an easy to implement reports!
I know the first answer on this post is: Search google, but i've been there and can't find an good answer on the question so far... only more questions
Designing a RDLC report file and shipping into the winform application would be easy. Even if you want to change the report design, it does not require a solution build again. You can easily go ahead and change the report design. Copy the rdlc report file to the application folder and see the changes are reflecting or not.
"Winners don't do different things. They do things differently. ...
I am facing problem in opening crystal report.
It gives error saying Invalid username or Password
I have three reports in my application.Two of three are opens successfully but one reports asks for username and password.
I have provided servername,username,password carefully in my source code.
When i run the application from visual studio,it runs perfect.
but in case of installing application from setup it gives that error.
I think some of the components are missing.but In such case any of the reports from three should not open.
Thank in advance.
Please help me to solve this issue.
Last Visit: 31-Dec-99 19:00 Last Update: 30-Nov-21 14:25