Adam K Dean

Posts

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 …

SQL INSERT with WHERE clause

Published 14 October 2010 in archive with tags sql So here I am, again, resigned to having to deal with SQL. I don't like SQL and it doesn't like me. One of the main reasons is because when I put a nicely formatted piece of code into Management Studio, it mangles it and disfigures it horribly as if saying "not only does this SQL not work but I have chewed it up and spat it back out at you." Continue reading …



Newer Page 39 of 42 Older