I'll be away on holiday for 2 weeks and I've got next week to finish all of the work assigned to me, so no new blog posts for a while. I'll try to sneak in a blog post or two if time permits, but I'm making no promises here. I hope you'll be back to read more from me on the 8th of March, 2009.
Happy surfing and stay out of trouble!
Thursday, February 12, 2009
Wednesday, February 11, 2009
Kindle 2 announced
Kindle 2, the new ebook reader, has been announced with lots of new features over it's older version. It's got 2GB of storage, has text-to-speech capabilities and can run PC-free with a 3G Internet connection. Kindle 2 costs $359.
Tuesday, February 10, 2009
Default User Files in Linux
When you create a user account, the home directory of the user is pre-populated with files that are in the /etc/skel directory. This is useful for distributing a copy of the usage policy for your system to all new users. You can use the "-k dir_name" option to specify an alternate directory of "-k /dev/null" if you do not wish to copy any files to the home directory.
Sunday, February 8, 2009
Linux On Old Hardware: More Progress
After getting Turbo Linux 10 OEM to run on my computer, I decided to install ndiswrapper. To install ndiswrapper, I needed the kernel sources, which I obtained from the Turbo Linux 10 updates FTP link. I also used the RPMs to upgrade my kernel from 2.6.0test to 2.6.0-24.
I set the KBUILD environment variable to my Linux kernel source directory with a:
export KBUILD=/usr/src/linux-2.6.0
...and ran "make" overnight, which compiled the kernel sources and ndiswrapper. After it was done with its buzzing, I did a "make uninstall" followed by a "make install". It would always fail on the installation with a:
ndiswrapper install: cannot stat ndiswrapper.ko No such file or directory
I then tried to set the KVERS variable, as I found the symbol in the Makefile within the drivers directory of ndiswrapper with the following:
export KVERS=2.6.0-24
That didn't seem to make much of a difference either as I still got the error. I also tried manually copying ndiswrapper.ko from the Linux source directory to the directory it was trying to install to. I did a Google search, but the only suggestion I could find was to do a manual copy and run make install again, but I already did that so it wasn't of any use to me.
From the output, I can tell that the installation wants to copy ndiswrapper.ko from one directory to another, but I can't seem to tell which the source directory is. I'll run "make install" again and will look at the final output with a more analytical eye.
UPDATE: I noticed it was leaving the /root/ndiswrapper-1.54/driver directory after the error, so I figured I had to put the ndiswrapper.ko in there. That got "make install" working without errors, but when I do a "modprobe ndiswrapper", I get a "FATAL: Module ndiswrapper not found".
UPDATE: The ndiswrapper.ko was copied to the wrong directory... after I moved it, I did a "modinfo ndiswrapper" to ensure it was in the right place, followed by a "depmod -a" and a "modprobe ndiswrapper". Now, it complains "loadndisdriver: main(542): version
1.9 doesn't match driver version -a". I think I should get a newer kernel to work with ndiswrapper 1.53.
I set the KBUILD environment variable to my Linux kernel source directory with a:
export KBUILD=/usr/src/linux-2.6.0
...and ran "make" overnight, which compiled the kernel sources and ndiswrapper. After it was done with its buzzing, I did a "make uninstall" followed by a "make install". It would always fail on the installation with a:
ndiswrapper install: cannot stat ndiswrapper.ko No such file or directory
I then tried to set the KVERS variable, as I found the symbol in the Makefile within the drivers directory of ndiswrapper with the following:
export KVERS=2.6.0-24
That didn't seem to make much of a difference either as I still got the error. I also tried manually copying ndiswrapper.ko from the Linux source directory to the directory it was trying to install to. I did a Google search, but the only suggestion I could find was to do a manual copy and run make install again, but I already did that so it wasn't of any use to me.
From the output, I can tell that the installation wants to copy ndiswrapper.ko from one directory to another, but I can't seem to tell which the source directory is. I'll run "make install" again and will look at the final output with a more analytical eye.
UPDATE: I noticed it was leaving the /root/ndiswrapper-1.54/driver directory after the error, so I figured I had to put the ndiswrapper.ko in there. That got "make install" working without errors, but when I do a "modprobe ndiswrapper", I get a "FATAL: Module ndiswrapper not found".
UPDATE: The ndiswrapper.ko was copied to the wrong directory... after I moved it, I did a "modinfo ndiswrapper" to ensure it was in the right place, followed by a "depmod -a" and a "modprobe ndiswrapper". Now, it complains "loadndisdriver: main(542): version
1.9 doesn't match driver version -a". I think I should get a newer kernel to work with ndiswrapper 1.53.
More Web Reference vs Service Reference
Today, a co-worker wanted to try creating a web reference instead of a service reference in Visual Studio. The result of his little experiment was interesting... we had a Guid typed parameter that we were passing to a function. The proxy class generated by adding the service reference maintained the Guid type, while the proxy class generated by adding the web reference had a string type instead.
Also, in my previous post I mentioned that the service references (which uses "svcutil.exe" to generate the proxy classes) can only be used by .NET 3.5 clients, so older clients can only use web references (which uses "wsdl.exe" to generate the proxy classes).
Also, in my previous post I mentioned that the service references (which uses "svcutil.exe" to generate the proxy classes) can only be used by .NET 3.5 clients, so older clients can only use web references (which uses "wsdl.exe" to generate the proxy classes).
Saturday, February 7, 2009
Linux for Old Hardware
I have an old Thinkpad 600E, which is like a grand daddy to my Thinkpad T60. It's get a Pentium II 366MHz with 64MB RAM, an 8GB hard disk, a 56kbps modem, an IrDA port, a serial port, a parallel port, firewire, 1 USB port, and a DVD drive. I decided to bring it back to life for checking my email as it's small, portable, and a lot like a netbook.
I decided to install some flavor of Linux on it, so I started off with Knoppix. Knoppix booted up from the LiveCD, but after installing it to the hard disk, it simply refused to boot up with all kinds of errors... first, there was a problem with DMA so I disabled the DMA and started it up again but it simply crashed at some other point in the startup process.
I then tried Turbo Linux 10 Desktop OEM, which installed and booted up the computer. That was cool! An ancient beast running Linux to keep up with the new boyz. Since it doesn't have an ethernet adapter to connect to the wired LAN, I decided to get something to hook it up.
I got a Siemens USB wireless adapter, which I regret because the only way to get it running on Linux is to use ndiswrapper. Using ndiswrapper isn't the actual problem, but the one I got with Knoppix on the LiveCD was probably too old to run the drivers while Turbo Linux simply doesn't include ndiswrapper. I tried installing ndiswrapper, but the kernel sources folder was missing a ".config" file, and I didn't find a copy in /boot/config as a forum-post suggested.
I finally decided to go with something more recent so I got a copy of Sidux Linux, but that wouldn't even boot from the LiveCD.
Anyway, I guess I'll have to just hope I can find a PCMCIA ethernet card supported by Linux (more specifically, by Turbo Linux 10, the only distro that would successfully boot).
I decided to install some flavor of Linux on it, so I started off with Knoppix. Knoppix booted up from the LiveCD, but after installing it to the hard disk, it simply refused to boot up with all kinds of errors... first, there was a problem with DMA so I disabled the DMA and started it up again but it simply crashed at some other point in the startup process.
I then tried Turbo Linux 10 Desktop OEM, which installed and booted up the computer. That was cool! An ancient beast running Linux to keep up with the new boyz. Since it doesn't have an ethernet adapter to connect to the wired LAN, I decided to get something to hook it up.
I got a Siemens USB wireless adapter, which I regret because the only way to get it running on Linux is to use ndiswrapper. Using ndiswrapper isn't the actual problem, but the one I got with Knoppix on the LiveCD was probably too old to run the drivers while Turbo Linux simply doesn't include ndiswrapper. I tried installing ndiswrapper, but the kernel sources folder was missing a ".config" file, and I didn't find a copy in /boot/config as a forum-post suggested.
I finally decided to go with something more recent so I got a copy of Sidux Linux, but that wouldn't even boot from the LiveCD.
Anyway, I guess I'll have to just hope I can find a PCMCIA ethernet card supported by Linux (more specifically, by Turbo Linux 10, the only distro that would successfully boot).
Friday, February 6, 2009
When an EntityCollection isn't an IEnumerable...
I usually convert all my entity collections to plain old Arrays and I use the List.ToArray method to make the conversion. I push the data into a List via the constructor by casting the needed data to an IEnumerable.
This all goes well when I do a:
var data = (from iterEntity in Db.Table
select iterEntity);
I can do a:
var myList = new List((IEnumerable)data);
MyEntityType[] myArr = myList.ToArray();
However, when I select a set of related entities like so:
var data = (from iterOtherEntity in Db.OtherTable
where iterOtherEntity.refId = 911
select iterOtherEntity.MyEntities);
I can no longer cast data to an IEnumerable type, and so can't push data into a List via its constructor... I now have to write a foreach loop to do the same conversion to an array. :-(
UPDATE: There is an AsEnumerable extension method that you could try on the EntityCollection object (data). I didn't get a chance to try it yet, but I will as soon as I boot up in Windows again.
This all goes well when I do a:
var data = (from iterEntity in Db.Table
select iterEntity);
I can do a:
var myList = new List
MyEntityType[] myArr = myList.ToArray();
However, when I select a set of related entities like so:
var data = (from iterOtherEntity in Db.OtherTable
where iterOtherEntity.refId = 911
select iterOtherEntity.MyEntities);
I can no longer cast data to an IEnumerable type, and so can't push data into a List via its constructor... I now have to write a foreach loop to do the same conversion to an array. :-(
UPDATE: There is an AsEnumerable extension method that you could try on the EntityCollection object (data). I didn't get a chance to try it yet, but I will as soon as I boot up in Windows again.
Wednesday, February 4, 2009
Are you trying to be funny, HAL?
Way back in the old days, we had a Dummy Operating System... it was just an application that run with an entry in Autoexec.bat and it said weird stuff when you tried to do anything - a "del " would result in a "I won't delete it. Delete it yourself!" and a "copy " would say "Copying is so not original. I don't want to copy. I want to create something new and original."
Today, I came across a dummy ASP.NET error page that said: "System.ServiceModel.FaultException: Unable to cast a spell on class String". After amusing 404 messages, they now come up with funny error pages that look so much like the real thing.
Today, I came across a dummy ASP.NET error page that said: "System.ServiceModel.FaultException: Unable to cast a spell on class String". After amusing 404 messages, they now come up with funny error pages that look so much like the real thing.
Subscribe to:
Posts (Atom)