-
One line to remove all unneeded old kernel for Ubuntu
Posted on December 5th, 2011 Add commentsAlong with the kernel keeps updating, many old kernels are kept in the system. For normal users, those old kernels are no longer needed, so the best way just remove them.
To remove all kernels, just run the single line with below:1dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | grep -E "(image|headers)" | xargs sudo apt-get -y purge*Original post from here
164 views -
Create XML Comments for Custom Function in VIsual Studio 2010
Posted on September 25th, 2011 Add commentsIf you need to add your custom comments for your function, including function summary, parameter description, return value etc., just add “///” right before your function, then VS will generate XML layout for you.
123456789/// <summary>////// </summary>/// <param name="para"></param>/// <returns></returns>public bool YourFunction(int para){//Code here}After finish comments, enable “XML Documentation” option for your project:
- Open project property
- Go to “Build” tab
- Check “Xml documentation file”
- Build project, then check the XML comments in other project
418 views -
Install Linksys Wireless PCI Adapter(WMP54G) Driver for Windows 7 64Bit
Posted on August 21st, 2011 Add commentsSeems like linksys doesn’t provide wireless PCI adapter driver for new Windows OS. The only way to install driver for Windows 7 is force to install the driver from the chip company.
- Download the driver from Here
- Unzip to somewhere. Let’s say “C:\”
- Go to “Control Panel” -> “Device Manager”, look for this adapter. Normally it will be shown like “Unknown Network Controller” or something like that
- Click this device, select “Update Driver Software”
- Select “Browse My Computer for driver software”
- Select “Let me pick from a list of device drivers on my computer”
- Scroll down to “Network Adapters” and double click. Then click “Have Disk”
- In the box that pops up, navigate to “C:\driver_folder”, and select the driver file
- Scroll down to “Ralink Technology Corp” in the box on the left side. On the right side, select “802.11b/g Wireless Adapter.” (Here I have tried select “Linksys” on the left, and “Linksys Wireless Adapter” on the right. It also works! Just choose whatever you want)
- Click YES on the warning window (if you see it)
- Done! (Sometimes the device still might not be working, try to right click the device and uninstall the driver, but DO NOT check “Delete the driver software for this device”, and restart the computer. Then Windows will help you install the driver again)
1,024 views -
One Script to Backup All SQL Databases
Posted on August 15th, 2011 Add commentsIt’s a nightmare for backup your DB if you have 100+ DB’s in SQL server. Just simply run a script while you taking a coffee:
12345678910111213141516171819202122232425262728DECLARE @name VARCHAR(50) -- database nameDECLARE @path VARCHAR(256) -- path for backup filesDECLARE @fileName VARCHAR(256) -- filename for backupDECLARE @fileDate VARCHAR(20) -- used for file nameSET @path = "C:\Backup"SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)DECLARE db_cursor CURSOR FORSELECT nameFROM master.dbo.sysdatabasesWHERE name NOT IN ('master','model','msdb','tempdb')--skip system database (optional)OPEN db_cursorFETCH NEXT FROM db_cursor INTO @nameWHILE @@FETCH_STATUS = 0BEGINSET @fileName = @path + @name + '_' + @fileDate + '.BAK'BACKUP DATABASE @name TO DISK = @fileNameFETCH NEXT FROM db_cursor INTO @nameENDCLOSE db_cursorDEALLOCATE db_cursor
263 views -
How to Change the Frequency of Windows Internet Time Synchronisation
Posted on September 28th, 2010 2 comments
635 views






Recent Comments