Sign in
|
Join
in
ShowUsYour<Blog> (blog)
Original ASP.NET Community Bloggers (group)
(Entire Site)
ASP.NET Weblogs
Home
Blogs
This Blog
Home
About
Syndication
RSS
Atom
Comments RSS
Recent Posts
Test post
RegexLib V2 - now with added ASP.NET V2 :)
Wow...
My blog is moving - http://markitup.com/Blog/
Upcoming IBF Speaking Engagements
Tags
Bookmarks
C#
Code Snippets
Codewise
Community
goals2004_CodeQuality
goals2004_Estimation
goals2004_Metrics
goals2004_PairProgramming
goals2004_ProjectManagement
goals2005_Health
Javascript
Knowledge and Collaboration
Language Processing
Maths
OneIsABlog
Personality Tests
ProjectDistributor
Rants
Regex
Rotor
Starter Kits
Terrarium
Tools
Unit Testing
User Groups
VB.NET
Web Forms
Whidbey
Windows Forms
Blogs I don't miss...
Chris Frazier
Scott Mitchell
Steve Smith
Thomas Johansen
^zhurnal!
blog.dreampro
David Seruyange
My Websites
MarkItUp
ProjectDistributor
Forest Lake Web Services
RegexBlogs.com
Readify
Mitch Denny
Greg Low
Joseph Cooney
Martin Granell
Dan Green
Bill Chestnut
Luke Drumm
Useful Links
Adelaide .NET User Group
Configuring ASP Checklist
MSF Resources
Improving .NET Application Performance and Scalability
Archives
July 2005
(1)
June 2005
(1)
May 2005
(1)
April 2005
(9)
March 2005
(28)
February 2005
(41)
January 2005
(53)
December 2004
(19)
November 2004
(38)
October 2004
(15)
September 2004
(7)
August 2004
(4)
July 2004
(13)
June 2004
(24)
May 2004
(17)
April 2004
(12)
March 2004
(35)
February 2004
(38)
January 2004
(21)
December 2003
(9)
November 2003
(19)
October 2003
(34)
September 2003
(27)
August 2003
(23)
July 2003
(21)
June 2003
(14)
May 2003
(20)
April 2003
(27)
March 2003
(32)
February 2003
(31)
ShowUsYour<Blog>
Irregular expressions regularly
Published by
Comments
Shawn A. Van Ness
said:
One good use for RegexOptions.RightToLeft is converting a flat index into a text file into human-manageable line/column numbers.
Let's say you're parsing a text file -- with Regexes, of course, so you're representing the whole file as a single string in memory.
Now, let's say you find a problem. Where is it? The user is not going to be very happy if you tell him it's at character offset 54872. He's going to want to see a line number (at least) and hopefully a column number.
Now, there are many ways to skin this cat... certainly some are more performant than others. But for a quick and dirty solution, you can't get much simpler than using an RTL regex!
Here you go... if you use this in your book, can I get a shout-out in the liner notes? :)
-S
Regex lineStartRTL = new Regex( @"^",
RegexOptions.Multiline|RegexOptions.RightToLeft);
private int IndexToLineNumber( int index)
{
if ( index >= this.source.Length)
index = this.source.Length-1;
// Line numbers are conventionally one-based, so
// return the count of line-starts to our "left"
return this.lineStartRTL.Matches(
this.source, index).Count;
}
private int IndexToColumnNumber( int index)
{
if ( index >= this.source.Length)
index = this.source.Length-1;
// Column numbers are conventionally zero-based, so
// return the diff between us and the first char on
// the line
int begin = this.lineStartRTL.Match(
this.source, index).Index;
return index-begin;
}
February 9, 2003 12:08 PM
Darren Neimke
said:
Thanks Shawn, love your work! :-)
February 9, 2003 12:27 PM
coacoacoa said:
About the way to remove a comma in a "string list" is to put commas in front of the string.
Instead of building a string list like this :
myStr = ""
myStr = myStr & strItem1 & ","
myStr = myStr & strItem2 & ","
...
Let's use :
myStr = ""
myStr = myStr & "," & strItem1
myStr = myStr & "," & strItem2
...
Then you can remove the first comma like this :
myStr = Mid(myStr, 2)
February 11, 2003 8:47 AM
Darren Neimke
said:
How much more performant is that? You'd still have to wrap the result in a test to see that the length of the "myStr" variable was > 0; and how big would the string get before you did some sort of optimization on the string building process itself anyway? Hmmmmm? :P
February 11, 2003 1:07 PM
Ben Richardson
said:
How good was Symonds 143!!
February 12, 2003 6:16 AM
Darren Neimke
said:
It was great. I'll bet that he got sledged a bit ;) and probably did some "trash-talkin'" of his own after that knock.
February 12, 2003 6:19 AM
Deepak Sharma
said:
Now it get's interesting. .Net mixed with Cricket. Yeah, I like it. Symonds century was great. More so because you guys defeated Pakistan. I am an Indian. You know what I mean...:) So, Sledging is known to me. That is what every Fast bowler and wicketkeeper does...Right? :)
February 12, 2003 6:52 AM
Darren Neimke
said:
It's not so much the mixing of Cricket and .NET as the recognition that we are a diverse community :-)
February 12, 2003 7:03 AM
Greg
said:
I will have to do some sledging on the tennis courts this weekend! I also call this 'playing mind games' with your opponent. Like in tennis, if your opponent is serving really good, on the next change over you make a comment "Wow, you are serving really good today..have you changed something in your serve?" Then, they can't serve anymore because they are now thinking about it!
February 12, 2003 2:27 PM
TrackBack
said:
Grumpicus Maximus (...we're all mad here.) Thursday, February 20, 2003
February 20, 2003 4:56 PM
Jorge
said:
Aim for the grouchy cyclist? :-)
February 26, 2003 3:47 AM
Darren Neimke
said:
Oy! Now that's just plain nasty. So tell me, were you the guy in the Blue Nissan?
February 26, 2003 3:55 AM
TrackBack
said:
Dewayne Mikkelson and his Radio WebDog, Shadow
March 2, 2003 4:44 PM
TrackBack
said:
XML Web Services are kewl..... : Alex Lowe's .NET Blog
March 2, 2003 4:44 PM
TrackBack
said:
Dewayne Mikkelson and his Radio WebDog, Shadow
March 3, 2003 4:02 PM
TrackBack
said:
Dewayne Mikkelson and his Radio WebDog, Shadow
March 3, 2003 4:07 PM
Duncan Mackenzie
said:
Actually, if you take a look at my custom control article at http://msdn.microsoft.com/library/en-us/dnwinforms/html/custcntrlsamp4.asp that is exactly what I create, an Image List View. :)
March 5, 2003 7:26 AM
TrackBack
said:
Reader as a performer : ShowUsYour-Blog!
March 6, 2003 3:25 AM
TrackBack
said:
MORE VS.NET 2003 Info : ShowUsYour-Blog!
March 6, 2003 3:25 AM
jimh@qis.net said:
As usual, you are far beyond us mere ASP mortals.
Try as I might, I have not grok'd .Net. I made a concerted effort today to download the MSDN 'Intro to .Net' and watched about half of it. I figure I have about 10-20 more hours worth of MSDN stuff to watch before I "get" it.
I know I have to get past this wall, but it is tough.
March 7, 2003 3:26 AM
Thomas Johansen
said:
I hope I see this app in my inbox soon =)
March 9, 2003 1:27 PM
Jeff Giesbrecht
said:
I love the idea Darren!!
Have you read anything from David Allen? His website is http://davidco.com. In his book "Getting Things Done" he talks a lot about a similar fashion of listing tasks, etc.
He puts forward that there shouldn't be a to-do list as that adds pressure to get none important things done that day. Rather there should be one list of items that are going to be done in the future some time, but that is looked at regularly so as to keep up with them.
Your DevBuddy is a great concept that holds great value for making sure one is on top of things that need to get done. An addition I would like to submit is if one can drag an email or web-page to the app and have the email add a task and the URL of the web-page be added to the list of articles that would be very beneficial.
March 9, 2003 10:03 PM
Duncan Mackenzie
said:
Allow me to drag the complete snippet into an email/web post/whatever
Allow me to drag the snippet in from VS.NET
Show the code with color coding, and paste it in with color coding if the target supports it
allow me to describe the snippet (a description field)
Menu Option/Right Click/Shortcut in VS.NET to create new snippet
Save the whole thing as an XML file (serialization makes this easy) and let me send it to other users of the tool...
Support using (multiple) shared snippet sets, so you could put an XML file onto a share and several people could use it and add to it
Perhaps use a database, but support offline through serialized XML?
March 10, 2003 11:41 PM
Darren Neimke
said:
> Allow me to drag the snippet in from VS.NET
So, with *your* dream tool you just drag it onto the tab and it prompts you for metadata such as category, language, description?
> support offline through serialized XML?
Nod, the serialization bit a sort of understand, and that would be a must to implement in some manner or form.
> Allow me to drag the complete snippet into ...
> Allow me to drag the snippet in from ...
Yep, I'd definitely support drag and drop events. Maybe elaborate on how you drag "out" of the tool. What invokes that action?
Because you mentioned it several times, could you please also drill in further on how *your* dream tool interacts with VS.NET?
March 10, 2003 11:58 PM
Duncan Mackenzie
said:
>Because you mentioned it several times, could you please
>also drill in further on how *your* dream tool interacts
>with VS.NET?
It could be a VS Add-In AND a standalone app... I just want a way to add snippets easily from VS.NET... dragging is certainly fine :)
>So, with *your* dream tool you just drag it onto the tab
>and it prompts you for metadata such as category,
>language, description?
Yep, that would be perfect!
March 11, 2003 12:34 AM
Jason Tucker
said:
Mine would be totally integrated in the VS.Net IDE. If not the ability to copy to the clipboard ala Office XP's clipboard manager. The ability to export the snippets into a readable form for aggregation into something else i.e. a portal. The ability to classify the snippet by language, website found, etc. etc. basically lots and lots of metadata. Have you seen Code Swap for VS.Net?
http://wwww.vscodeswap.com/
I'll probably have more items when I think more.
March 11, 2003 12:41 AM
Royo
said:
Take a look ate Source+ 200 from AxTools.Com
It's a code manager for VB 6.0 , but i wish it were for .NET as well. It has very very nice functionality.
March 11, 2003 7:50 AM
TrackBack
said:
Put your orders in... : ShowUsYour-Blog!
March 11, 2003 5:06 PM
TrackBack
said:
Code line counting.. : Jason Tucker's Blog
March 11, 2003 7:25 PM
Jeff Giesbrecht
said:
Darren have you seen this snippet manager?
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=353670f2-4e73-467c-94b5-2faaefb5741d
March 12, 2003 10:59 PM
Shawn A. Van Ness
said:
Interested parties should also check out Chris Sells' RegexDesigner .NET tool... it's literally spoiled me: I can't write or read regexes without it, any more.
http://www.sellsbrothers.com/tools/#regexd
-S
March 13, 2003 12:11 AM
Darren Neimke
said:
< grin / > Thanks Shawn :-) I'll happily concede that my tool isn't really in the same league as Chris's or Eric Gunnerson's workbench.
It's quick-n-simple though, and, it's become one of my most used tools (although I do still use the others if I need a heavyweight).
I'd say mine is to theirs as WebMatrix is to VS.NET!
March 13, 2003 12:14 AM
Darren Neimke
said:
Great stuff!! Thanks Jeff, that's a great tool, probably only 2 or 3 features short of what I had in mind ;)
March 13, 2003 12:17 AM
Phil Weber
said:
Thanks for the link, Darren! You might also enjoy Chris Sells' three-part series on "Serialization Basics." The series starts
here
(free registration required).
March 13, 2003 1:36 AM
Darren Neimke
said:
Yeh, thanks Phil... I saw those the other day. You actually reminded me to add them to my "To read" list ;-)
March 13, 2003 1:40 AM
TrackBack
said:
Useful Methods in C# : ScottW's ASP.NET WebLog
March 17, 2003 11:38 PM
Phil Scott
said:
When I took the 70-310 exam, the hardest part were doing remoting. There were A LOT of question involved with coding, deploying and debugging remoting. Just a warning.
All in all, a good exam. But so much remoting, which to me is one of the minor players in .NET, kinda threw me.
March 21, 2003 2:35 AM
TrackBack
said:
Memobook and DevBuddy : Wes' Puzzling Blog
March 21, 2003 5:57 PM
Paul Gielens
said:
Advanced .NET Remoting will clarify a thing or two.
March 22, 2003 12:18 PM
Ingo Rammer
said:
Paul: Thanks!
Darren: By the way, chapter 3 of my book is available for download at http://www.apress.com/book/supplementDownload.html?bID=47&sID=442
I guess this chapter alone can help you to clarify some of the issues.
Happy Remoting,
-Ingo
March 22, 2003 5:11 PM
TrackBack
said:
Remoting is *still* Whacky! : ShowUsYour-Blog!
March 23, 2003 5:45 AM
Stephane Rodriguez said:
The Interop link points to a free ebook which, at first glance, looks full of promise. Unfortunately, once you start reding it, for instance the COM interop chapter, you'll see that the author is merely providing an overview, not real world cases of actual marshalling issues (anyone can check that .NET programming boards are full of marshalling issues and concerns).
March 26, 2003 1:29 PM
TrackBack
said:
TaskVision and an ever-increasing learning curve! : ShowUsYour-Blog!
March 27, 2003 6:35 AM
TrackBack
said:
WebService Results : Jesse Ezell Blog
March 27, 2003 6:35 AM
TrackBack
said:
Clarence Westberg's Radio Weblog
March 31, 2003 2:21 AM
Moshe Eshel
said:
Hi,
Great idea and solves most of the problems for ranges that users encounter, also it is very intuitive (I'm gonna use this the next time I have to implement a date search).
However, many users (especcially business users) would appriciate the addition (maybe in advanced mode) of actually inputing in dates and even hours for a more complete solution (that can support more advanced date search).
One question though, why the hardcoded limit on the beforedate and afterdate? do you plan on not using the system after 2099 does Y2K ring a bell???
All the best,
Moshe
April 2, 2003 11:18 AM
Chris Frazier
said:
I don't think I'll be alive to worry about dates after 2099, but Moshe raises a good point. I suppose if you wanted to go this route, make sure it's documented in there.
Is this an asp.net/web solution or winforms? I'm implementing a DHTML pseudo-popup calendar to select dates in my current project...makes it real easy to use and eliminates those pesky pop-ups! I modified it from an example on javascript.com.
Good Job,
-Chris
April 2, 2003 7:31 PM
TrackBack
said:
Dewayne Mikkelson and his Radio WebDog, Shadow
April 2, 2003 7:54 PM
Bill Wilkinson said:
Why not actually build part of the query and stuff it into the <OPTION>s?
<SELECT Name="dateSearch">
<OPTION Value="theDate=$"> Exact date
<OPTION Value="theDate<$"> Before date
<OPTION Value="theDate>$"> After date
<OPTION Value="DateDiff(d,$,#)>=-7 AND DateDiff(d,$,#)<=7"> Within a week
...
</SELECT>
And then, in the server code, after validating the users textual date, you just REPLACE the $ with a properly formatted version of his date for the DB you are using. Likewise, you replace any # with a proper form of today's date.
And now you don't have the enddate problem the other noticed.
Of course, you could use the same kind of logic on the server to avoid putting in an enddaate when it isn't needed (or begindate when it isn't needed) but why bother with logic when it isn't needed?
April 3, 2003 3:44 AM
Darren Neimke
said:
Thanks Bill... that's great!
April 3, 2003 4:12 AM
Bill Wilkinson said:
One more minor "trick": Most DBs treat a date-alone as 0:00:00 on that date. So instead of needing to do
WHERE dateField >= '2003-3-11 0:00:01' AND dateField <= '2003-4-11 23:59:59'
you can more simply code
WHERE dateField >= '2003-3-11' AND dateField < '2003-4-12'
Notice the operators: >= but just <
And notice that I bumped the date for the end date to the *next* day. Because *any* time on the prior date will be *less than* that value.
April 3, 2003 7:44 PM
TrackBack
said:
Re: the blogging style thing : Bloated Blog of .NET Blunders
April 5, 2003 8:55 PM
TrackBack
said:
A little 'bit' more on Int32 vs Integer : Code/Tea/Etc...
April 5, 2003 8:55 PM
TrackBack
said:
A Canonical Hierarchy : ShowUsYour-Blog!
April 7, 2003 6:53 PM
Chris Frazier
said:
The only thing that immediately comes to mind is CausesValidation. Although, it seems like that is the *opposite* of what you would like to do...the default is true, but perhaps you could set it to false at the Page level, then set the only one you want to be true.
April 8, 2003 1:53 AM
Chris Frazier
said:
Have you gotten this resolved yet, Darren? How about adding another validator to do the work for you? CustomValidator maybe?:)
April 10, 2003 7:48 AM
TrackBack
said:
What's the fuss about VS .NET 2003? : Edgar S??nchez's .NET Blog
April 10, 2003 7:44 PM
David Stone
said:
Ooooh. I like regexSnippets. Very nice. :)
I use regexes all the time...so it's really nice to see tools like this come out. I also use Eric Gunnerson's RegexWorkbench and Chris Sells' RegexDesigner. There's another on CodeProject that I found useful called Expresso.
What's funny is that these tools all pretty much do the same thing...but each has it's own litle feature that makes me use it when I need that one feature. Yours is now the "favorites" feature which I predict will come in handy. Thanks! :)
April 12, 2003 11:31 PM
Mads Nissen
said:
I've seen jesus on this one. From now on I won't touch a webservice as long as I am sure that I'll only talk to other .NET applications. And. If you design your app nicely (as I'm always struggeling to do) implementing .NET remoting alongside WS is absolutely no problem.<br><br>The other nice thing about remoting is that I get the feel of writing real server apps, like I've done on J2EE. Feels more solid. Feels more component, service and message oriented.
April 17, 2003 12:01 PM
TrackBack
said:
Debugging Web Services over HTTPS : mads studentblog
April 18, 2003 7:19 AM
TrackBack
said:
[Reference] Handy reference for command line compiling : CSharpener's Blog
April 18, 2003 11:45 PM
TrackBack
said:
[Reference] Handy reference for command line compiling : ShowUsYour-Blog!
April 18, 2003 11:45 PM
TrackBack
said:
Dewayne Mikkelson and his Radio WebDog, Shadow
April 18, 2003 11:45 PM
Hendrix
said:
Darren,
I just ran the Anagram.html but if I enter let's say 'AL' it should work but it says it's not one.
Thanks for your help.
May 1, 2003 4:08 AM
Darren Neimke
said:
Well, it doesn't work because "AL" isn't an anagram of "ALXBIETOS". If you'd entered "IBXALTSEO" it would have worked.
What are your the rules for what you are trying to achieve?
May 1, 2003 4:18 AM
Chris Frazier
said:
Sweet! Now, all I have to do is find out how (and when) to leverage Regex!:P
May 2, 2003 1:10 AM
TrackBack
said:
ShowUsYour-Blog!
May 4, 2003 3:16 AM
TrackBack
said:
ShowUsYour<Blog>
May 4, 2003 3:16 AM
G. Andrew Duthie
said:
Darren,
Pet peeve here, but even if you don't like the feature...it's good to point out that this can also be disabled at the page level, rather than disabling it for the entire application. In fact, for most people, this is the smarter way to do it, since it enables you to allow HTML input on a specific page, while protecting you from inadvertent script vulnerabilities where you may not be filtering or encoding the input.
May 4, 2003 7:02 PM
Darren Neimke
said:
I plead temporary insanity ;-)
May 4, 2003 9:44 PM
Frans Bouma
said:
Congratz, Darren! :)
May 5, 2003 11:21 PM
Thomas Johansen
said:
Congrats mate! Awesome stuff by the way ;)
May 5, 2003 11:44 PM
G. Andrew Duthie
said:
Not you, too, Darren...another RSS feed made infinitely less useful through the use of the description field. Don't do it, I beg you. There's too little time, and too many blogs, to add extra clicks to your readers' efforts.
Come back from the dark side... :-)
May 5, 2003 11:55 PM
Serdar Kilic
said:
By A$ I'm assuming it is AUD$ ? If so, hey cool another aussie :)
May 6, 2003 3:12 PM
Maurice Hicks said:
As a Kiwi now living in the US, I faced the same tipping confusion when I first arrived here.
Here are the rules of thumb I use:
1. Tip the bloke who drives the cab or shuttle from the airport. Roughly 10% of the fare for cabbies and $1 per bag for shuttle drivers.
2. If you have a bellboy take bags to your room $1 per bag is reasonable.
3. Americans love to eat out. Get used to tipping 15-20% of the bill anytime you're at a place where a server brings something to your table. Don't feel obligated to use the tip jar at places like Subway though.
4. Tip the guy or girl that cuts your hair (for some reason this just never occured to me).
Off the top of my head I can't think of anything else that isn't discretionary.
My pet peeve is the bloke that stands in the loo at some bars/clubs, turns on the faucet, hands you a paper towel and expects a tip for it.
May 6, 2003 5:33 PM
Phil Weber
said:
Darren: In addition to Maurice's list, I like to leave a couple of dollars each day for the chamber maid when I stay in a hotel, but I think I'm probably in the minority.
I also usually toss my change into the tip jar when I buy something at a coffee place (e.g., Starbucks).
May 6, 2003 5:55 PM
Phil Weber
said:
Also, there's a list of who is on which money here: http://www.moneyfactory.com/document.cfm/18/118
May 6, 2003 5:58 PM
bill said:
ulysses s. grant is on the $50 bill
May 6, 2003 6:01 PM
Roy Osherove
said:
Cool!
I've always wanted to visit there myself, alas, I am in Israel... :(
They'd have to hire me first to get me here
May 12, 2003 4:39 PM
Paul Wilson
said:
You're going to just love what they have to show you about ASP.NET -- I know I did.
May 12, 2003 6:33 PM
randy
said:
Based on what I know, I agree. I think that there are some interesting possibilities, but I doubt that they'll be widely used. Most people will do what they're doing, and on occasion here or there take advantage of the CLR functionality to make their lives easier. However, the XML story could be much bigger than the CLR hosting in Yukon. I think its hard to tell at this point.
May 14, 2003 4:35 PM
TrackBack
said:
.Avery Blog
May 15, 2003 8:04 AM
HumanCompiler
said:
Great entry!
Last time I was out at the campus I just didn't want to leave! :P
And you're definitely right about Bill...and all of us with that same passion for learning...it continues every single day!
May 16, 2003 3:37 AM
TrackBack
said:
Code/Tea/Etc...
May 16, 2003 6:12 PM
TrackBack
said:
ShowUsYour-Blog!
May 16, 2003 6:12 PM
James Shaw
said:
Yes, it was another great week at MS. Hope you make it back to Oz ok Darren. Drop by for a few when you're in Atlanta next. ;-)
May 17, 2003 1:22 PM
Rob Chartier
said:
Have a safe trip, and make sure you drop me a line if you make it up to Vancouver.
ps. Dont forget the tip!
May 22, 2003 10:18 AM
George Young
said:
Good to meet you during your visit here, Darren. Be sure to drop a line when your in Redmond again.
May 23, 2003 1:59 AM
Tariq
said:
I think Expresso is much better, although RegexSnippets has a better interface. Maybe your'll should merge
May 28, 2003 11:57 AM
Tariq said:
Interesting point.
For the last 6 months i've found a great affinity to myie2. its a great browser, oh, but its the IE back end. so theres a brand new interface for IE (myie2) that allowes me to much much more.
June 1, 2003 4:34 PM
Darren Neimke
said:
Tariq, thanks for the post. That's exactly what I'm on about; by all means, use the IE engine to build a better product but, why anyone would go through all the pain to RE-build it is beyond me!
June 1, 2003 6:00 PM
ZeroSleep
said:
Will firebird support Behaviors or something similar to IE Behaviors?
June 1, 2003 6:39 PM
Cadmium said:
Hmmm... let me think. Maybe the MILLIONS of people using a NON-Microsoft OS would have something to say here? Choice is good. If there were no other browsers linux users would never be able get to the internet and OSX's primary browser would still be crippled and buggy.
Beside the broken features that have lasted years (proper http compression? longstanding css bugs?), there are a distinct lack of popular features missing from IE. In case you didn't notice a lot of people like tabbed browsing (so popular it's built-in by every other major browser besides IE: Opera, Mozilla/Firebird, Safari). Gestures in IE? Nope. Skins? Nope. Maybe not your thing, but you could always use the mozilla IE skin if your concerned about UI. Built in javascript control? Built in download manager? JavaScript debugging that isn't a complete joke?
I'm tired of getting only the features microsoft thinks I should have. Give me the features I want, give me the features everyone else has. There has been very few tangible improvements to the IE browsing experience since IE4. Browsing in IE today feels like browsing in IE in 1998.
Yes, IE won the browser wars, and it's a shame because we're missing out.
June 1, 2003 8:35 PM
JosephCooney said:
Hey - all I meant was that you have to do a LOT of typing to get anything done with the htmltextwriter. CodeDOM looks just as bad, but cool because you can output multiple languages...I'll have to get out of the witty .sig business and leave it to guys like you who know what they're doing :-).
June 2, 2003 4:09 AM
Duncan Mackenzie
said:
Thanks for the advice and the plug... I'll try to get out more :)
June 8, 2003 11:48 AM
JosephCooney said:
C'mon Darren - we _know_ you're under NDA, but you can't make statements about how much "better" things are going to get for VB.NET developers without giving us a few more juicy details. :-)
Seriously, if VB.NET got edit & continue I think it would be a compelling reason to switch. Generics are cool (C# 2.0), but edit and continue would probably be a clincher for me. I lead a sort of double life with my .NET programming, writing about the same amount of VB.NET and C#. There are pros and cons to both languages, both in the area of language features and in the area of tool support, and I really don't prefer one language over another. I agree with you that VB has never been this good - inheritance, multi-threading. At the same time I don't see any reason why a competent VB.NET developer shouldn't be able to read and understand C# pretty easily. Same framework, just a different "skin" on top of the MSIL.
June 9, 2003 4:55 AM
Scott Mitchell
said:
Glad I could help out, Darren. I am going to be soon tackling a few magazine articles here, and your comments have inspired me to share my experiences in a blog of my own. :-)
Thanks!
June 9, 2003 5:46 AM
Scott Mitchell
said:
Mozilla 1.x rocks. I am currently using Mozilla 1.4 RC1, and can't get enough of it. The popup blocker is the cincher for me, IE is so freaking annoying, you can't visit ESPN.com or MSNBC.com without having an annoying ad popping up and disrupting your flow.
Never was a huge fan of Opera, didn't seem to do as well as rendering Web sites as Mozilla/IE, but it's always been the fastest browser I've used, especially on "alternative" operating systems.
June 9, 2003 5:49 AM
Scott Mitchell
said:
Doug and Donny Mack are a fun duo. I remember going out to Bourbon Street with them and a handful of others when we were in New Orleans for the ASP.NET Connections conference back in 2001. Quite a blast.
June 9, 2003 5:52 AM
Scott Mitchell
said:
I always think of "tokenizing" as the recognition of tokens. So, the string: "This is a nice blog," is tokenized by your brain, by chunking out the various words from the mess of characters. "This" "is" "a" "nice" "blog". Perhaps I am confusing this term with lexing? I dunno, it's been a while since my last compilers class! :-)
Now that I think about it, isn't what I just described lexing, and tokenizing is saying something like, "Ok, 'This is' is a verb participle and 'nice' is an adjective and 'blog' is a noun." (Apologies for any incorrect grammar terms.) Heh, good thing I'm graduating grad school NOW before any tests on this material! :-)
June 11, 2003 5:15 AM
Tim Walters
said:
Interesting stuff Dazza,
One thing I thought I should add... since you're tokenizing your text with valid XML, your string becomes a XML Fragment. Now if you had multiple markup tags in there you could do something like the following...
Pseudo code:
- If output mode = formatted
- - set node list to all "formatted" elements
- Else
- - set node list to all "raw" elements
- For each node in the list
- - output the innerText
- - output a linebreak
It's more work for the current solution, but if you had more wrap modes it is easily scalable. In fact if you ended up with 30 different wrap modes, you could use the enumerator's toString method to name your markup nodes, and then use the same toString method in your selectNodes() method, no extra coding required except extending the Enum.
You could also use XSLT of course, but given your dislike for it you'll be wanting to wait until a WYSIWYG editor before you try that right? :)
Tim.
June 11, 2003 6:04 AM
Frans Bouma
said:
I will never take that pledge. Speed isn't everything. In today's software, robustness, ease of use (by developers), simplicity and other things are as important as performance and most of the time more important. When speed is important, looking at tiny instructions will NEVER help you. Optimize the algorithm, not the instructions. Read my blog for an excellent example :)
Using the profiler supplied I found a memleak in the IsDBNull function in the SqlDataRe