18. December 2006 03:53
The MOSS public user profile page (Person.aspx) list items under section headers as defined in the Profile Properties shared service administration page.
You can change this behavior and display the profile without section headers by adding an attribute to the Profile Viewer control in your Person.aspx file (TEMPLATES\SiteTemplates\SPSMSITEHOST\person.aspx).
Find the profile viewer control in your aspx page, and add the ShowSections=false attribute.
<SPSWC:ProfileViewer id="ProfileViewer" ShowSections=false ShowBusinessCardIfEmpty="false" runat="server" />
Voila, Youâ€™ve got no more section headers!
11. December 2006 14:31
I'm in the process of transitioning over to a Blogger powered blog instead of my original DotNetNuke blog module. Blogger conveniently publishes to my own hosting site, and allows me the great Blogger interface for posting instead of my tedious DNN setup. I'm moving some of the more popular articles over here before I take down the deprecated blog entirely.
11. December 2006 14:29
I spent some time this afternoon trying to figure out an easy way to get a count of the messages in a message queue, from .net.
Turns out there are a few ways, using WMI, or interop to the MSMQ COM library.
Just add a reference to your project, "Microsoft Message Queue 3.0 Object".
Then you can do something like this:
MSMQ.MSMQManagement msmq = New MSMQ.MSMQManagement();
11. December 2006 14:26
For some time I had been hesitant about replacing the oem Windows Media Center install on my ZD8000 series HP notebook becuase I anticipated a plethora of incompatibilities... This past weekend I decided to go ahead and give it a shot.
I am traditionally a debian fanatic, but I spent some time investigating various distributions for the laptop, and eventually settled on Ubuntu (or more specifically, Kubuntu). Ubuntu is a debian based distribution, which was a requirement for me, as I could not work without apt.
There are a few things you need to do this the easy way:
- A Breezy Ubuntu/Kubuntu installation CD or DVD burned from the available ISO files.
- An internet connection via a lan cable (we'll get wireless working after we install)
- A copy of the system/drivers folder from your previous windows install (optional)
After downloading and burning the Breezy single CD install, you should be able to boot off the disc, and press enter at the graphical prompt to progress with the normal boot options.
Awnser a few questions about your language, location and keyboard, and go get a Dr. Pepper while the installer probes your hardware...
After a few moments the installer will try to setup networking support. It will attempt to run dhclient and obtain and IP address automatically. If you had your lan cable connected, and DHCP available, then eth0 should now be configured and connected to the internet. If you did not have your cable plugged in, then simply ask the installer to retry, or enter your network information manually if you need to.
Next you will need to partition your disk. For the purposes of this posting I'll assume your not dual-booting anything, and most people can let Ubuntu automatically choose their partitions. If you decide to manually partition, you will find that Ubuntu has properly detected the ZD8000's hard drive and everything goes smoothly.
After partitioning the installer will copy the base system to your hard drive. Go get another Dr. Pepper.
Ubuntu should automatically install a boot loader (grub) after it installs the base system. It will also automatically detect alternate operating systems on the disk and add those to the boot loader configuration.
After you reboot you will be asked some simple questions, and setup user accounts.
You may be asked about your graphics card and monitor to configure X. Unfortunatly it is not this simple, as Ubuntu isn't going to have the right drivers to make your ZD8k with its odd 1440x900 resolution and ATI video card work.
Go ahead and humor the installer, choose the Radeon driver, but don't let it probe for your monitor details, that will crash immediately. Who knows why. If it does, don't worry about it, everything will be fine when you reboot.
After rebooting Ubuntu will TRY to take you into Xwindows, KDE or Gnome depending on whether you choose Kubuntu/Ubuntu. It may or may not be able to pull up an XWindows session. If it is able, it will be at a low resolution with no acceleration. If it's not able, then well... it will be a console.
Lets install the proprietary ATI drivers, if you are in X, exit out now.
Now the module will not be loaded automatically until we reboot, so lets load it manually:
Install the xorg-driver-fglrx package:
sudo apt-get install xorg-driver-fglrx
Add fglrx to /etc/modules:
echo fglrx | sudo tee -a /etc/modules
sudo depmod -a
sudo modprobe fglrxIf you had trouble with apt-get install, you might need to add to your apt repositories!
Fire up your favorite text editor so we can modify our xorg.conf file to represent our new driver. I'll use Nano.
nano /etc/X11/xorg.confChange the driver which should now read "ati" or "radeon" to "fglrx". You'll also want to modify some other values, adding your resolution, 1440x900, which the fglrx driver will support.
Or you could skip all this trouble with your xorg.conf, and download my pre-configured xorg.conf file. (Will be posted shortly)
You should now be able to launch X! Your touch pad should be perfectly configured automatically with the synaptics driver, including scrolling, although you may need to adjust the speed a bit.
Now lets setup your wireless card!
Your machine is equipped with the BroadCom AirForce b/g card. Lucky for us this card will operate perfectly, with WEP, and WPA, under ndiswrapper. Installation is amazingly easy... but for those that are new to ndiswrapper it can be a bit confusing.
Let me say now, that I won't cover the installation of any encryption mechanism other than WEP, you can follow the instructions at ndiswrapper wiki for that!
Goto the HP support website in your browser of choice, and download the drivers for your BCM4306 wireless lan card. Version 4.00. When you download the file your browser should offer you an option to open it with WINE, the windows emulator, go ahead and do that.
The driver installer should launch, looking very.... windows-esque, and let you extract the files. Shortly after extracting the files it will crash on you, but we don't really need it anymore, so thats fine.
Ubuntu already has ndiswrapper installed, so all you need to do is tell it where the windows drivers to load are at.
Point it at the INF file you extracted, which should have a matching SYS file next to it.
Now lets see if the driver and hardware are working properly.
ndiswrapper -i filename.inf
You should see a message telling you the driver and hardware are present.
Now lets finish configuring and load the module.
Now using 'iwconfig' should show you the wlan0 interface.
Your wireless card is ready, although you need to scan and attach to an access point. You can try:
iwlist wlan0 scan //to scan for networks
iwconfig wlan0 essid 'ESSID' //to force essid
iwconfig wlan0 key restricted XXXXXXXX //to provide wep key
dhclient wlan0 //to get IP address once connected
Also, feel free to use whatever graphical tools will be available in your KDE/Gnome installation instead of iwconfig.
11. December 2006 14:19
Download VS2005 Project and BinaryThe WMI class, 'Win32_Processor', will provide you with numerous bits of information about the CPUs in your machine. It is not possible however, to query whether hyperthreading is enabled, or otherwise query whether or not a processor is physical or logical.
Using the SocketDesignation property of the 'Win32_Processor' WMI class we can identify which socket each CPU is in. A physical CPU will report the true socket, and any logical CPU will report the same socket as your first CPU.
I have created a small C# console application to demonstrate detecting hyperthreading, by comparing the count of physical and logical CPUs.
You will need to add a reference to System.Management.
static void Main(string args)
List<string> Sockets=new List<string>();
//Create WMI Class
ManagementClass mc = new ManagementClass("Win32_Processor");
//Populate class with Processor objects
ManagementObjectCollection moc = mc.GetInstances();
//Iterate through logical processors
foreach (ManagementObject mo in moc)
string SocketDesignation = mo.Properties["SocketDesignation"].Value.ToString();
//We will count the unique SocketDesignations to find
//the number of physical CPUs in the system.
PhysicalCPU = Sockets.Count;
Console.WriteLine(LogicalCPU + " logical CPUs detected.");
Console.WriteLine(PhysicalCPU + " physical CPUs detected.");
//Are there more logical than physical cpus?
//If so, obviously we are hyperthreading.
if (LogicalCPU > PhysicalCPU)
Console.WriteLine("HyperThreading is enabled.");
The sample code and available project are .net 2.0. If you want to use this in VS.net 2003, and .net 1.1, you will simply need to change our the List generic for an arraylist.