Windows 7 Tips
Tim Sneath on msdn.com has compiled a list of 30 Windows 7 secrets. Excellent for anyone who enjoys productivity.
The new keyboard shortcuts (and mouse gesture equivalents) for the new window management features allow you to dock windows to the sides, maximize/restore the window vertically (without changing window width), move a window to another monitor, hide all non-active windows, peek at the desktop (allowing you to see gadgets or icons without moving windows), set focus to the taskbar, or launch apps from the taskbar, all just with simple key combinations involving the Windows key.
Another useful tip is to Shift+Right-Click a folder to show the "Open Command Prompt Here" option in the context menu, which sets current working directory to that folder within the command shell.
Hit the jump to see more Windows 7 tips
The new keyboard shortcuts (and mouse gesture equivalents) for the new window management features allow you to dock windows to the sides, maximize/restore the window vertically (without changing window width), move a window to another monitor, hide all non-active windows, peek at the desktop (allowing you to see gadgets or icons without moving windows), set focus to the taskbar, or launch apps from the taskbar, all just with simple key combinations involving the Windows key.
Another useful tip is to Shift+Right-Click a folder to show the "Open Command Prompt Here" option in the context menu, which sets current working directory to that folder within the command shell.
Hit the jump to see more Windows 7 tips
If Seoul were made out of toys...
...it might look something like this...
(click the image for a larger version)
Created with http://tiltshiftmaker.com
(click the image for a larger version)
Created with http://tiltshiftmaker.com
Best of Air Gear OST Playlist
Desktop Feng Shui
To help my coding Chi evolve to the next level of greatness, I have recently purchased a bamboo plant to accompany me on my hacking adventures. A couple pickies...
Now perhaps I need a nice picture frame on the wall. Perhaps of one from our recent Grand Canyon vacation. ^_^
Now perhaps I need a nice picture frame on the wall. Perhaps of one from our recent Grand Canyon vacation. ^_^
Grand Canyon 2009 New Years Vacation
Vista explorer.exe using max cpu and tablet pc driver issues
Issue 1 - explorer.exe using max cpu
A few days ago, I realized that after my laptop had booted up and had been running for a while, I noticed that it was a little sluggish. I opened Task Manager and saw that explorer.exe was using ~50% cpu (one of my dual cores) constantly. I then started to noticed that this happens every time I boot up. Not cool. It's not very easy to diagnose issues with explorer.exe since it's used so heavily from the Windows OS.
More specifically, right after I boot into Vista, I would open Task Manager and see that explorer.exe is running somewhere from 0 to 4% cpu, then about 15 seconds later, was when it would jump up to ~50%. After a few more reboots I was able to see that DpAgent.exe would jump from 0% to a constant 7% cpu usage at the same time that explorer.exe would jump up to 50. That's a pretty good indication DpAgent.exe is conflicting somehow, so I killed DpAgent.exe and sure enough, explorer.exe jumps back down to 0%. However, DpAgent.exe is my Fingerprint reader driver. I don't *need* it, but I sure would like to use it if the Fingerprint reader came with my laptop, ya know? Thing is, this conflict just started not too long ago (I would've noticed it months ago).
So now I'm trying to think about all the stuff I've installed recently. The most obvious was Java, since Java is notorious for running slower on Windows (at least not too long ago). I noticed I had a JDK installed along with two separate updates. I uninstalled all three, and sure enough, when I reboot, DpAgent.exe no longer causes explorer.exe to jump it's cpu usage.
Well, this sucks. Cause I've recently started using NetBeans IDE and I'd like the option of continuing to use it. (I also have it under Ubuntu dual booted on my laptop, so that's always an option to use it there as well). Anyway, I remember that when I installed NetBeans IDE, it comes with a Java SDK (that's how I originally installed the Java SDK.. through the NetBeans install.) But, how does NetBeans work when you install a new Java SDK? It turns out that there's a netbeans config file where you specify the path to Java, and I wasn't modifying this after Java was being updated.
So I decided to download the latest SDK from http://java.sun.com, and I found out that according to Sun, you *must* use the 64bit install if you are using a 64bit OS. I'm guessing NetBeans doesn't come with that (I don't see any 64bit download option for Windows on their site), so this could be the whole issue. Anyway, after installing 64bit JDK, I changed the NetBeans config file and all is good: The Fingerprint reader driver no longer causes explorer.exe to use 50% cpu, and I can still use NetBeans IDE with Java.
Issue 2 - tablet pc driver error
This has been happening for about the past three weeks or so. Upon bootup into Vista, I'd get a message saying "Tablet Service for consumer driver has stopped working", and my Tablet Pen would no longer work. This only happens some of the time. It's very random. I've tried disabling several different things, such as Nod32 Antivirus, Windows Defender, and other startup services, but I would still get the random crashes.
I was about to install a slightly newer version of the driver located at Wacom, but when I uninstalled the current Tablet Pen driver under Add/Remove Programs and rebooted, I noticed that the Pen still worked just fine. So I'm guessing there was a duplicate driver installed somehow at some point. Not sure exactly, but I'm not going to bother to install the new driver if all is working well as is. I've rebooted several times, and I no longer see the tablet service crash message. I've also read that installing the newer driver has caused some issues for some Tablet PC users, so I'd rather not mess with it anyway.
Anyway, the laptop is in optimal condition once again, so I'm happy. Maybe now I can get some coding done before my wife and I leave for Vegas and the Grand Canyon.
A few days ago, I realized that after my laptop had booted up and had been running for a while, I noticed that it was a little sluggish. I opened Task Manager and saw that explorer.exe was using ~50% cpu (one of my dual cores) constantly. I then started to noticed that this happens every time I boot up. Not cool. It's not very easy to diagnose issues with explorer.exe since it's used so heavily from the Windows OS.
More specifically, right after I boot into Vista, I would open Task Manager and see that explorer.exe is running somewhere from 0 to 4% cpu, then about 15 seconds later, was when it would jump up to ~50%. After a few more reboots I was able to see that DpAgent.exe would jump from 0% to a constant 7% cpu usage at the same time that explorer.exe would jump up to 50. That's a pretty good indication DpAgent.exe is conflicting somehow, so I killed DpAgent.exe and sure enough, explorer.exe jumps back down to 0%. However, DpAgent.exe is my Fingerprint reader driver. I don't *need* it, but I sure would like to use it if the Fingerprint reader came with my laptop, ya know? Thing is, this conflict just started not too long ago (I would've noticed it months ago).
So now I'm trying to think about all the stuff I've installed recently. The most obvious was Java, since Java is notorious for running slower on Windows (at least not too long ago). I noticed I had a JDK installed along with two separate updates. I uninstalled all three, and sure enough, when I reboot, DpAgent.exe no longer causes explorer.exe to jump it's cpu usage.
Well, this sucks. Cause I've recently started using NetBeans IDE and I'd like the option of continuing to use it. (I also have it under Ubuntu dual booted on my laptop, so that's always an option to use it there as well). Anyway, I remember that when I installed NetBeans IDE, it comes with a Java SDK (that's how I originally installed the Java SDK.. through the NetBeans install.) But, how does NetBeans work when you install a new Java SDK? It turns out that there's a netbeans config file where you specify the path to Java, and I wasn't modifying this after Java was being updated.
So I decided to download the latest SDK from http://java.sun.com, and I found out that according to Sun, you *must* use the 64bit install if you are using a 64bit OS. I'm guessing NetBeans doesn't come with that (I don't see any 64bit download option for Windows on their site), so this could be the whole issue. Anyway, after installing 64bit JDK, I changed the NetBeans config file and all is good: The Fingerprint reader driver no longer causes explorer.exe to use 50% cpu, and I can still use NetBeans IDE with Java.
Issue 2 - tablet pc driver error
This has been happening for about the past three weeks or so. Upon bootup into Vista, I'd get a message saying "Tablet Service for consumer driver has stopped working", and my Tablet Pen would no longer work. This only happens some of the time. It's very random. I've tried disabling several different things, such as Nod32 Antivirus, Windows Defender, and other startup services, but I would still get the random crashes.
I was about to install a slightly newer version of the driver located at Wacom, but when I uninstalled the current Tablet Pen driver under Add/Remove Programs and rebooted, I noticed that the Pen still worked just fine. So I'm guessing there was a duplicate driver installed somehow at some point. Not sure exactly, but I'm not going to bother to install the new driver if all is working well as is. I've rebooted several times, and I no longer see the tablet service crash message. I've also read that installing the newer driver has caused some issues for some Tablet PC users, so I'd rather not mess with it anyway.
Anyway, the laptop is in optimal condition once again, so I'm happy. Maybe now I can get some coding done before my wife and I leave for Vegas and the Grand Canyon.
Ubuntu Headphone Jack Issue
I feel pretty good. Just took me a little while, but I was just able to get Ubuntu Linux to dualboot with my already existing installation of Vista on my laptop. The hardest thing was getting my damn headphone jack to work!! I could get sound to play from my laptop speakers, but when I plugged headphones into the jack, sound would just continue to play from the speakers. Took a little while to find the fix online, so I've posted the fix here. (assuming you have a Realtek ALC861-VD soundcard. If you have a sony vaio, replace "hp" with "vaio" in the steps below.)
Run this command to open the alsa-base config file... (replace gedit with whatever editor rocks your world)
sudo gedit /etc/modprobe.d/alsa-base
...then add the following line on the end...
options snd-hda-intel model=hp
...save, close, reboot, and enjoy tunes directly into your ears.
Run this command to open the alsa-base config file... (replace gedit with whatever editor rocks your world)
sudo gedit /etc/modprobe.d/alsa-base
...then add the following line on the end...
options snd-hda-intel model=hp
...save, close, reboot, and enjoy tunes directly into your ears.
Playing with Ubuntu
Was in a mood to tinker today. I've had an idol PC sitting around for a while now, so I decided to install Ubuntu Linux on it. So far, I like what I see. It was very easy to install. Just downloaded an iso from www.ubuntu.com, burned it to dvd, booted from the dvd drive, then installed, and all my hardware seems to be working fine. Ubuntu includes a packaging system that makes adding/removing software very easy. In the screenshot below, you can see i have Firefox, Pidgin (multi IM client), terminal (used it to run the Adobe Air installer because it doesn't use the packaging system), Twhirl (twitter client), Gnometris (tetris clone), and the standard Ubuntu File Browser.
I'm definitely impressed with how easy it is to get up and running with Ubuntu. Last time I used Linux was the RedHat distro in college in '96 through 2001. I could definitely see Ubuntu being a great place to do web development (assuming I wasn't using ASP.NET).
I'm definitely impressed with how easy it is to get up and running with Ubuntu. Last time I used Linux was the RedHat distro in college in '96 through 2001. I could definitely see Ubuntu being a great place to do web development (assuming I wasn't using ASP.NET).
C# .NET - Access private members directly
Found out something interesting this morning while writing a copy constructor in C# .NET 2.0 code. Similar to Java, within a class, if you use another reference of the same class within a method of that class, you can directly access private members of that other reference.
An example should show this more clearly. The following function is a copy constructor. I like to use leading underscores for private class members.
As you can see, it is accessing the reference's private members directly.
Why would you want to do this?
What if your public get/set accessor methods return altered values? Being forced to use the get/set methods would not allow a copy constructor to work properly in this case.
This isn't only limited to constructors either, you can do this in any method of the class as long as the reference is the same type. Even static methods. Like I said, this also works in Java.
An example should show this more clearly. The following function is a copy constructor. I like to use leading underscores for private class members.
public Category(Category cat) { _id = cat._id; _name = cat._name; _description = cat._description; }
As you can see, it is accessing the reference's private members directly.
Why would you want to do this?
What if your public get/set accessor methods return altered values? Being forced to use the get/set methods would not allow a copy constructor to work properly in this case.
This isn't only limited to constructors either, you can do this in any method of the class as long as the reference is the same type. Even static methods. Like I said, this also works in Java.
Hacking for Dummies
I saw this book in a local bookstore and just couldn't resist taking a pic. Too funny. 2nd Edition, even. Srsly, can you really consider yourself a hacker if you learned from a "for Dummies" book? n_n


alphatrak
Bringing you the coding smackdown since '95
Bringing you the coding smackdown since '95
Now Playing
- StarCraft - PC
Now Reading
- Death Note
- Ikigami: The Ultimate Limit
- Infinite Game Universe: Mathematical Techniques
- Microserfs by Douglas Coupland
- Pro Android 2


