Archive | Tech Tips RSS feed for this section

Removing U3 from USB Drive

3. February 2010

2 Comments

Here is how to remove the U3 application from your USB drive and prevent it from starting up every time you plug in your USB stick. For Windows: Download and run this Windows uninstaller from U3. Works in XP, Vista and Windows 7, and others. Macintosh Follow the sandisk instructions ro remove U3. Additional Information […]

Continue reading...

Fixing Desktop.ini popup on Windows Start

4. November 2009

1 Comment

If you have a file called desktop.ini open in Notepad when Windows starts, here is how to fix it. You just need to delete this file from the Program Menu startup folder. Go to the Notepad window that has the desktop.ini file. In the menu, click File -> Save As. In the “Save as type”, […]

Continue reading...

UrlEncode in Python

3. November 2009

2 Comments

To urlencode a querystring or form data in python you can use the urllib module: use urllib # you have to pass in a dictionary print urllib.urlencode({'id':'100', 'name':'john smith'}) # then you get 'id=100&name=john+smith' Urlencoding Unicode and UTF8 Values #this works fine print urllib.urlencode({name:'José'}) #you have to be careful with unicode strings # this will […]

Continue reading...

Using a favicon in Django

1. November 2009

Comments Off on Using a favicon in Django

The default location for a favicon.ico file is the root folder of website. However when using Django with an apache virtualhost, you need to map the location of your favicon. Here are a few ways to get you favicon working: 1) The quick way is to modify the html in your base template to include […]

Continue reading...

Adding Dates and Times in Python

19. October 2009

2 Comments

Using the built-in modules datetime and timedelta, you can perform date and time addition/subtraction in python: from datetime import datetime from datetime import timedelta #Add 1 day print datetime.now() + timedelta(days=1) #Subtract 60 seconds print datetime.now() - timedelta(seconds=60) #Add 2 years print datetime.now() + timedelta(days=730) #Other Parameters you can pass in to timedelta: # days, […]

Continue reading...