Click here to Skip to main content

Comments by rj45 (Top 15 by date)

rj45 at 16-Dec-11 13:38pm View
   
Deleted
What do you want to know, I will add it.
rj45 at 16-Dec-11 13:38pm View
   
Deleted
First part of a series.
rj45 at 8-Nov-11 14:28pm View
   
Deleted
The list approach is extremely* slow especially when you factor the foreach required to use it.
 
Profile it and take a look how terrible foreach is.
Although it is still better than recursive approach.
 
rj45 at 8-Nov-11 14:22pm View
   
Deleted
Why is that. Explain please.
rj45 at 2-Nov-11 12:34pm View
   
Deleted
2626?
 
rj45 at 1-Nov-11 15:40pm View
   
Deleted
but I did approve it, I hope it does work :)
rj45 at 1-Nov-11 15:39pm View
   
Deleted
It would be pretty slow alternative in terms of performance.
rj45 at 1-Nov-11 14:12pm View
   
Deleted
hah nice!
rj45 at 28-Oct-11 12:56pm View
   
Deleted
Well usually I have an override that doesn't have that parameter but usually you need it. StringReader might be interesting, or some kind of iterator that acts like a cursor in the file.
 
returning null, isn't needed on errors because the lastMatch parameter returns -1. Although in some versions I had it returning null, I found this to be easier I think.
rj45 at 27-Oct-11 23:18pm View
   
Deleted
thanks this must be old code, I will find my latest version and submit tomorrow.
 
Your solution is cool but its not many times when your iterating through the same things.
 
what about this situation
getbetween ( a,b, 0, out last );
getbetween ( c,d,last, last;
 
I use that all the time.
rj45 at 27-Oct-11 23:12pm View
   
Deleted
Reason for my vote of 4
pretty cool
rj45 at 27-Oct-11 12:29pm View
   
Deleted
Marcus, Singleton means single instance and nothing more. In asp.net we multiple scopes of singletons ( not just static ). You may be expecting simply static, which would be single instance server wide, however in asp.net that is rarely what we want. My example gives us a single instance per session which is a singleton of the session context. If you want it per Request then you could use HttpContext.Current.Items.add rather than session which is a singleton of the request scope.
 

 
As you know, If you want it accessible from throughout the application make the property public static.
rj45 at 24-Oct-11 17:27pm View
   
Deleted
Reason for my vote of 2
a silly idea.
rj45 at 24-Oct-11 15:15pm View
   
Deleted
Did you get a chance to try it, I'd appreciate it if you could change your vote. ( if codeproject lets you do that..)
rj45 at 18-Oct-11 15:48pm View
   
Deleted
I suggest you try it out. I hint may be that it wouldn't work with foreach.
 
New fangled in regards to not needed recursion, yield, Ienumerable/foreach, Linq, templates. These things are not crap by themselves of course nor new things. They are simply not great IMHO for this simple context. I always laugh when I see the use of things to eliminate a loop or two thats why I posted this.

Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid