DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 620 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

yesthatmcgurk Subscribe to this feed
yesthatmcgurk
Profile Kicked Submitted Comments Tags Friends Kicked By Friends Submitted By Friends


Comments:

Hurrrrr? Its been out since the end of January. http://blogs.msdn.com/keiths/archive/2007/01/23/asp-net-ajax-1-0-has-shipped.aspx
posted by yesthatmcgurk yesthatmcgurk 1 year, 8 months ago

Too bad Firebug gets out of sync half the time and stops working the other half. And, dear God, please save us all from Venkman. But I suppose I can't complain; they're better than the Opera javascript debugger (i.e., alert(yourVariableGoesHere)).
posted by yesthatmcgurk yesthatmcgurk 1 year, 8 months ago

The article is a bit overstated. Just because the worker process may be recycled, and therefore all in-proc state is lost, doesn't mean that in-proc session state "does not work." It works as advertized. If this is not acceptible to you (i.e., online retail where state = shopping cart = $$$), then don't use it. If it is (a forum, a blog, etc), then use it and don't freak out.
I could sit here and claim that out-of-proc session state doesn't work because (unless you use sql 2k5 correctly) there is no event fired when the session state times out. Its just a limitation of state models. Pick your poison.
posted by yesthatmcgurk yesthatmcgurk 1 year, 8 months ago

Its such a non-issue with the code snippet and refactoring tools that ship with VS2k5. Besides, properties exist so that you can do validity checking before allowing callers to change your state. If you are coding properly, the number of instances where this would actually be useful (unchecked properties) should be a small minority of your total number of properties. I'd consider automatic properties "harmful."
posted by yesthatmcgurk yesthatmcgurk 1 year, 8 months ago

I can't :/
posted by yesthatmcgurk yesthatmcgurk 1 year, 9 months ago

Eh, sokay article for session variables. I like to create a static class that contains all my session variable access code. Variables are accessed via static properties of the class that are stored in the session under names stored in consts within the class. The properties call an internal method (one for gets and one for sets) that actually retrieve the variables. Also, I use HttpContext.Current to get the current session, checking it for null first to avoid null reference exceptions. It usually happens when the web server is shut down, which becomes annoying when debugging as the web site is shut down and restarted multiple times.

What's more fun is creating generic cache-backed methods to retrieve settings from web.config in a type safe manner....
posted by yesthatmcgurk yesthatmcgurk 1 year, 9 months ago

If you've ever thought of implementing a plugin architecture, this is definitely the shiznit. And don't forget to check out the blog for the AddIn team -- http://blogs.msdn.com/clraddins/default.aspx
posted by yesthatmcgurk yesthatmcgurk 1 year, 9 months ago

Wiki "sarcasm," k?
posted by yesthatmcgurk yesthatmcgurk 1 year, 9 months ago

Wow that's... great. I never knew where documentation was before. Thanks.
posted by yesthatmcgurk yesthatmcgurk 1 year, 9 months ago

1) plugins won't work anymore. I'm recompiling mine this morning...
posted by yesthatmcgurk yesthatmcgurk 1 year, 9 months ago

One of the best tools out there. Too bad the binaries for Reflector are obfuscated!!
posted by yesthatmcgurk yesthatmcgurk 1 year, 9 months ago

Sorry, in comments replace {0} with length and {1} with maxLength, and use Regex.Split(stringToSplit,regexString) to split into an array of strings wrapped at the designated lengths.
posted by yesthatmcgurk yesthatmcgurk 1 year, 9 months ago

This is a good starting point; however, the code has been mangled by a smiley translator (an "idea" bulb has been inserted for some text). I personally would use regex to do this. You can finely tune the splitting logic. Here are some of the regex strings you can use to split:
// point at which we want to place our breaks
int length = 5;
// an absolute maximum line length; forces hard break at this point
int maxLength = 8;

// Absolute hard break every {0} chars
string hardBreakSpacesIncluded = string.Format("(.{{0,{0}}})",length);
// Hard break after {0} chars excluding whitespace
string hardBreakWithTrailingWhitespace = string.Format("(.{{0,{0}}}\\s*)", length);
// Hard break after {0} chars discarding whitespace past {0} characters
string hardBreakWithoutTrailingWhitespace = string.Format("(.{{0,{0}}})\\s*", length);
// Soft break after {0} chars including trailing whitespace"
string softBreakInclusive = string.Format("(.{{0,{0}}}\\S*\\s*)",length);
// Soft break after {0} chars excluding trailing whitespace
string softBreakExclusive = string.Format("(.{{0,{0}}}\\S*)\\s*", length);
// Soft break after {0} chars and a hard max of {1} chars including trailing whitespace
string softBreakWithSoftMax = string.Format("(.{{0,{0}}}\\S{{0,{1}}}\\s*)", length, maxLength - length);
// Soft break after {0} chars and a hard max of {1} chars excluding trailing whitespace
string softBreakWithHardMax = string.Format("(.{{0,{0}}}\\S{{0,{1}}})\\s*", length, maxLength - length);
posted by yesthatmcgurk yesthatmcgurk 1 year, 9 months ago
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge