Friday, June 8, 2012

Visual Studio RegEx Helpers for VB.NET to C#


Desire: QueryString("whatever")   to   QueryString["whatever"]
Find: QueryString\("{[^"]+}"\)
Replace: QueryString["\1"]

Desire: userData(0)   to    userData[0]
Find:  userData\({(.#)}\)
Replace: userData[\1]

Desire: Session(whatever)   to   Session[whatever]
Find:  Session\({(.#)}\)
Replace: Session[\1]

Desire: Cache(whatever)   to   Cache[whatever]
Find:  Cache\({(.#)}\)
Replace: Cache[\1]

Desire: rowsXX(i).Item("Whatever")   to   rowsXX[i]["Whatever"]
Find:  rows{.}\({(.#)}\).Item\({(.#)}\)
Replace: rows\1[\2][\3]

Desire: .Tables(0)   to   .Tables[0]
Find:  \.Tables\({(.#)}\)
Replace: .Tables[\1]

Desire: .Split("a")   to   .Split('a')
Find:  \.Split\("{[^"]+}"\)
Replace: .Split('\1')

Desire: dtrXX("Whatever")   to   dtrXX["Whatever"]
Find:  dtr{..}\({(.#)}\)
Replace: dtr\1[\2]

Tuesday, January 24, 2012

Foobar2000 Fastforward Hotkey

Adding a keyboard shortcut to Foobar2000 is realitvey easy for most operations.  Adding a keyboard shortcut to fast forward is also pretty staitforward but you'll need to know that it is found under Playback, Seek, Ahead by [your factor].


I chose to set the shortcut to also be a Global hotkey since focus on a foobar element shouldn't prevent my seeking ahead.  For clarity, the key combo I opted: Alt along with my numeric keypad's plus key.

Tuesday, January 17, 2012

Jon Skeet - C# Time

I've seen Jon Skeet mention Noda Time on Google+ and his very detailed errata findings for Fluent C#.  So of course the question I asked myself about DateTime wasn't hard to track down.  Here's what you need to know: http://noda-time.blogspot.com/2011/08/what-wrong-with-datetime-anyway.html