|
Thanks for the outline, it got me thinking about how regex parsers are actually build. I found some old material on how to write your own regex parser and I'm going to use that for my library.
My plan is to implement a partial regex parser. This parser will be constructing an NFA of the regex expression and convert it to a DFA.
After that I'm going to determine which parts of the DFA will have a fixed length, those parts will need to be generated first. When these parts are generated I will be filling up the rest of the string with the other variable length parts, starting with the operator + (You need at least one if these) and after that the * operator.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
Does anybody have sample project of code for creating simple TaskDialogs in framework 2.0, without any unsafe/unmanaged code?
Thanks.
|
|
|
|
|
If you are referring to the TaskDialog provided by Vista, the only way to do this in .NET is to use interop to the Win32 APIs. There are several examples of how to do that here on CP. There are also some examples that show how to make a TaskDialog-like dialog. Search Results[^]
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
I am trying to read the columns in a selected gridview row. The column value is 760 but when I rund it I get "Blaaaaa". I also tryed doing a while statement before the if statement but that didnt' work either. Below is the code:
public void GridView1_SelectedIndexChanged(Object sender, EventArgs e)
{
GridViewRow row = GridView1.SelectedRow;
string cmopid = row.Cells[1].Text;
string Packageid = row.Cells[2].Text;
string carrier = row.Cells[3].Text;
if (cmopid == "760")
{
Labeltest.Text = "Good to Go";
}
else
{
Labeltest.Text = "Blaaaaaa";
}
}
|
|
|
|
|
change the following line as indicated:
Labeltest.Text = "Blaaaaaa";
Labeltest.Text = string.Format("{0}; {1}; {2}", cmopid, Packageid, carrier); Then debug by seeing what results you get, and where they are comming from.
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
I did that and I got the right values:
xxx;sss;zzz
|
|
|
|
|
So it is working?
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Well, it does seem to be working but there is something wrong. The first value is 760 so why don't I get "Good to Go".
|
|
|
|
|
My guess is that the value is not really "760". I bet there is an extra character in there, like a space or a tab or something. Check the ".Length" property on the value that looks like it is "760", and I bet it is not 3. If this is correct, then just call the ".Trim()" method on the string prior to comparison to remove extraneous whitespace.
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
You are a life saver, thanks so much. It just needed trimmed.
|
|
|
|
|
I want to know more about C#, I have a project about the "Website Mapper", Use C# language, I don't know how to realizing the function. How to use C# realizing graphic website map, This is my Question. Thank you very much.
Project Description:Represent in a graphical form the hyper linking of web pages and evaluate the status of all links from a web site.
WebSite Mapper analyzes the contents of a web site, and create the hyperlinked sitemap
|
|
|
|
|
If I understand your question you wish to automatically create a site map?
If so - this[^] is written in PHP, but it may be a good starting point.
|
|
|
|
|
My Question is: Which C# Controls will use realize the graphic website map? at Vs2003 or VS2005 development tool.
the controls can show the Static or 3D GRAPHIC ?
Question description: When you scan any website map, search the website map, and than show the graphic(static or 3D) website map?
Thanks
I don't know the PHP, I just know the C# or asp.Net
|
|
|
|
|
Hi, all:
I'm using a PrintPreviewControl to create a thumbnail document view for users. Everything works fine, except for the small MessageBox that gives the page count flashes.
Is there a way to suppress this MessageBox (or, at least, a clever work around to hide it)? This is w/VS2008 (if that matters).
(Also, where do I go to find out this stuff on my own?)
Thanks,
Balboos
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"How do you find out if you're unwanted if everyone you try to ask tells you to go away?" - Balboos HaGadol
|
|
|
|
|
hi
unfortunately you can not.
PrintPreviewControl uses System.WindowsForms.PrintControllerWithStatusDialog initialized with System.Drawing.Printing.PreviewPrintController as underlying Controller to display the Preview.
the only thing you could do would be to write your own PrintPreview - Control.
you can find this out by using Reflector. it's a great tool if you want to take a look how things are done in the framework. it's frustrating sometimes but always very helpful
greets
m@u
|
|
|
|
|
Thanks for the news, even if it's bad. At least I needn't keep looking for an answer.
Your suggestion about creating my own printPreviewControl. Makes me wonder what I can use to show the mini-facsimile of the screen. Also makes me wonder why MS doesn't let these things be under programmer control.
A strategy I'm consider is to pixelize the image and then draw on the Form. It doesn't seem worth it - especially since I'm reasonably sure I'd not have accesss to the printPreviewControl bitmap, either.
Balboos
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"How do you find out if you're unwanted if everyone you try to ask tells you to go away?" - Balboos HaGadol
|
|
|
|
|
Hi,
I want to serialize a List<int> so that it looks like:
<br />
<ArrayOfProductIds><br />
<ProductId>1</ProductId>><br />
</ArrayOfProductIds><br />
Or if this is too difficult:
<br />
<ArrayOfProductIds><br />
<int>1</int>><br />
</ArrayOfProductIds><br />
But...I want to be able to deserialize the XML back to a List<int>.
|
|
|
|
|
Create a new class that inherits from List<int>, has the attribute [Serializable], and implements either IXmlSerializable or ISerializable (depending on how you will serialize it). This will enable you to control the xml created/read when serializing or deserializing. Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
I have written this code to read the XML
<br />
public void ReadXml(System.Xml.XmlReader reader)<br />
{<br />
reader.ReadStartElement();<br />
<br />
while (reader.ReadToNextSibling("ShoppingListItemId"))<br />
{<br />
this.Add(reader.ReadElementContentAsInt());<br />
}<br />
}<br />
When I read the following it works fine:
"<ArrayOfShoppingListItemId>\r\n<ShoppingListItemId>1</ShoppingListItemId>\r\n</ArrayOfShoppingListItemId>"
But when I get back a string from the database without the '\n' and '\r' it skips the while loop? Why is it doing that?
"<ArrayOfShoppingListItemId><ShoppingListItemId>1</ShoppingListItemId></ArrayOfShoppingListItemId>"
|
|
|
|
|
Would it be a problem if I installed .Net 1.0 and 2.0 on the same machine?
thanx
|
|
|
|
|
Hi,
you can install all .NET versions side-by-side, they don't interact.
Vista comes with most of them preinstalled.
You can install several Visual Studio versions side-by-side; they don't interact except
the one installed last will be launched when double-clicking one of the relevant
file extensions (such as .cs).
|
|
|
|
|
No.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
While in most cases there's no problem, you should be aware that .NET 1.x and 2.0 do collide when it comes to CAS (that's a point I had to learn the hard way).
If you set CAS policies with .NET 1.x, then these policies are not used if .NET 2.0 is installed as well. Only the 2.0 policies will be effective, even for applications running with .NET 1.1!
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
That's news for me. Thank you!
|
|
|
|
|
hi i have adde handler for html document like this but i am not able to find arguments for the event
could any one help me for this
mshtml.HTMLElementEvents2_Event the_event = (mshtml.HTMLElementEvents2_Event)elem;
the_event.onclick += new mshtml.HTMLElementEvents2_onclickEventHandler(htmlonclick);
with regards
Balagurunathan.B
|
|
|
|