Thursday, October 30th, 2008
Posted in .NET | No Comments »
Friday, October 24th, 2008
Posted in computing | No Comments »
Thursday, October 23rd, 2008
Useful for random stuff:
int[] array = new int[6] {1,2,3,4,5,6};
Console.WriteLine(”BEFORE”);
foreach (int i in array)
{
Console.WriteLine(i.ToString());
}
Random rng = new Random();
int n = array.Length;
while (n > 1)
{
int k = rng.Next(n);
n–;
int temp = array[n];
array[n] = array[k];
array[k] = temp;
}
Console.WriteLine(”AFTER”);
foreach (int i in array)
{
Console.WriteLine(i.ToString());
}
Console.ReadLine();
Posted in .NET | No Comments »
Thursday, October 23rd, 2008
I like reading Scott Gu’s blog there is usually some really good stuff on there including a large list of tips and tricks:
http://weblogs.asp.net/scottgu/pages/ASP.NET-2.0-Tips_2C00_-Tricks_2C00_-Recipes-and-Gotchas.aspx
Posted in .NET | No Comments »
Thursday, October 23rd, 2008
If you are just testing something you might pop a class in the App_Code directory (I was messing with extending web controls) you may need to the reference the assembly for that class. You can by using “__code”.
Here is what I did:
<%@ Register TagPrefix=”ExtendedAnchor” Assembly=”__code” Namespace=”WhatEver.Namespace”%>
Jobs a good’en!
Posted in .NET | No Comments »
Monday, October 20th, 2008
Posted in Uncategorized | No Comments »
Sunday, October 19th, 2008
Can’t remember everything? Sometimes you just need to be refreshed!
http://msdn.microsoft.com/en-us/library/kx37×362.aspx
Posted in Uncategorized | No Comments »
Wednesday, October 15th, 2008
sed '/^$/d' input.txt > output.txt
grep -v '^$' input.txt > output.txt
Posted in Uncategorized | No Comments »
Wednesday, October 15th, 2008
Posted in Uncategorized | No Comments »
Wednesday, October 8th, 2008
As I don’t use vi very often I seem to forget many of the commands - I know what it can do but sometimes I forget how to do it!
http://www.cs.ucl.ac.uk/staff/t.pagtzis/unix/vi/vi-weq.html
Posted in Uncategorized | No Comments »