Archive - Historical Articles
You are viewing records from 03/02/2006 19:15:54 to 01/16/2007 10:30:50. I'll be adding support for selecting a date range in future.
This is just a quick example so I don't forget how to search generic lists easily and have to hunt for it again, but I've fleshed it out so it will hopefully be of help to someone else!
//Set up our example generic List
List<string> myItems = new List<string>();
myItems.Add("This isn't going to be found");
myItems.Add("Nor this");
myItems.Add("But it will find this example for nullify!");
myItems.Add("And it will find this nullify example too!");
//This is our search term, it is a local variable
string localVariable = "nullify";
//Do the search using a Predicate<> delegate here.
//
//This can point to a method that takes a parameter of the type, but
//doing that will result in not being able to pass parameters to the
//method (its parameters are predefined as the type, with a boolean
//return as far as I can see). We get around this by using an
//anonymous delegate, so it is inline and can access local variables
string[] matches = myItems.FindAll(delegate(string searchItem) {
//this is an anonymous delegate, that
return searchItem.IndexOf(localVariable)>-1;
}).ToArray();
Updated 7/2/2010: You could also use a Lambda expression to do this with a few less characters:-
string[] matches = myItems.FindAll(searchItem => {
//this is an anonymous delegate, that
return searchItem.IndexOf(localVariable)>-1;
}).ToArray();
I have played around with plasma pong a few times in the past, and am always impressed by how spectacular the fluid dynamics are... It's a great game! Check it out: www.plasmapong.com.
PermalinkI have had a typematrix 2030 for some time, and found that it reduces the pain in my hands when typing - but that it is missing the key that is a backslash/pipe when used with a UK layout... And if you don't use a UK layout you loose several other keys.
So I eventually put the effort in and made a new keyboard layout for it! This is mostly just so I don't lose it :)
TypeMatrix 2030 UK keyboard layout with the back-slash, pipe and tilde keys reinstated to their US keys.
PermalinkWell, in addition to the high profile slew of products Microsoft also released Windows Powershell for XP and Windows 2003!
I've been looking forward to an improved shell for Windows for some time as I like using Bash on Linux (and refuse to run it on Windows using Cygwin for anything more than just testing).
PermalinkWell, it is out, although at 50MB clients will be even less inclined to install it. I'll hold judgement on how awesome it is till I've played with it....
Once installed you can now happily* watch a true 3d accelerated cube spin in your browser...!
I am actually really looking forward to the Windows Communication Framework - ever since I first saw C# and .NET (well they were showing Longhorn really) demonstrated by Chris Anderson and Don Box.
PermalinkTo fix the error:
Unable to obtain a server-assigned IP address. Try again later or enter an IP address in Network settings.
Fire up your registry editor then head to:
[HKEY_LOCAL_MACHINE\Comm\RNDISFN1\Parms\TcpIp]
Set AutoCfg to 1
Set EnableDHCP to 0
Soft reset the device and there should be no further errors!
PermalinkIf you're getting an annoying error about an IP address not being able to be assigned then you are not alone.
Well, seeing the dialog titled "Pocket PC Networking" with the text:
Unable to obtain a server-assigned IP address. Try again later or enter an IP address in Network settings.
Annoyed me one too many times and google has't quite got it yet - if you too have this problem and have any idea then please add a comment or possible solutions. My trial and error attempt at fixing it (so far) ended with using your favourite pocket pc registry editor (like PHM Regedit) and adding the following three DWORD registry keys in [HKEY_LOCAL_MACHINE\Comm\VMINI1\Parms\TcpIp] with nice and large numbers (FFFFFFFF in hex!):
- DhcpMaxRetry
- DhcpInitDelayInterval
- DhcpRetryDialogue
This comes from MSD's Windows CE 4 documentation but still applies.
The lack of details in the error is EXTREMELY frustrating.
PermalinkBetter late than never, I noticed a couple of days ago there's a GoLive license now for Indigo and a release on my MSDN that works under the RTM of .NET 2.0! It's actually a public release too, so go download it.
Congratulations to Don Box's team for getting it out the door.
PermalinkMy webserver in the states has been hammering the processor for the last 405 hours - all SQL Express hitting 100%.
The other instances of SQL Server were idling, so I don't know what it was getting up to, as it certainly wasn't dealing with any serious load!
Permalink