Adam K Dean

Posts

Private set property - public get, private set

Published 29 December 2010 in archive with tags csharp Just come across something I haven't needed before, a property read-only from the outside, but writeable from the inside.. I present to you the private set property! Continue reading …

Ctrl+A Select all text in a text box

Published 17 December 2010 in archive with tags winforms , csharp Another quick-snip here. Add select all (ctrl+a) to a regular textbox in less than 7 seconds, and here's how. Using the KeyDown event, look for control and A, and then select all, suppressing the keypress to stop the pingggggg noise: Continue reading …

Non-blocking Console.ReadKey()

Published 16 December 2010 in archive with tags csharp , consoleapplication Just a quick snippet for today. Continue reading …

Regex split by spaces except inside quote marks

Published 9 November 2010 in archive with tags regex , csharp Here's a nifty little bit of code I just wrote while writing a console input handler. Sometimes you will want to split up a string by a space, but then how do you input more than one word as a single argument? You put it in quote marks, but then how do you split those separately? Like this: Continue reading …

Fibonacci Numbers & The Golden Ratio

Published 26 October 2010 in archive with tags php , fibonacci So here I am doing some designs when I think, hmm, maybe I will use the golden ratio to lay out the design, Fibonacci's Spiral and what not, but the amount of tedious workings out.. (having to use a pencil..tedious...physical movement you see..) so I wrote a script. I don't really like using C# for scripts, being it isn't a script but.. sometimes you just want something like putty in your hands to quickly test a hypothesis or whatnot, and PHP is great for that. Big project, ASP.NET but a little versatile albeit-unable-to-really-report-errors-very-well scripting language, PHP is the don. Continue reading …



Newer Page 39 of 42 Older