selinap.com

To leave furtively and stealthily.

Archive for November, 2008

python list in sql query as parameter

Saturday, November 22nd, 2008

Suppose that we have a list [10, 20, 4, 6, 9], and we want to write a sql query to get the data for all elements of the list, like

SELECT * FROM students WHERE id IN (10, 20, 4, 6, 9)

How to do that in Python? Actualy, it is very easy. Below are the list of techniques to do it:

Technique 1

id = [10, 20, 4, 6, 9]
sql = 'select * from studens where id in %s' % str(tuple(id))

(more…)

Wordpress 2.7 new update features

Tuesday, November 18th, 2008

I had updated my WordPress version to WordPress 2.7-beta3-9750 from beta 1 via SVN.  Well, actually I had to do it by first updating the SVN version from my PC, zip it, upload it via FTP, and then extract it to my WordPress installation via cPanel. That’s because of my Web hosting provider that does not support SSH.

(more…)

Backup, sync and secure folders with Toucan

Monday, November 17th, 2008

Toucan is a small freeware that allows us to synchronize, backup and secure your data. The GUI is so simple and divided into seven tabs, allowing us to easily find the function that we need.

There are four synchronization mode for Toucan: copy, update, mirror (copy/update) and equalize.

(more…)

Desktop screenshot with Lightscreen

Sunday, November 16th, 2008

Lightscreen is a small and simple freeware to capture your desktop screenshots. It can be executed silently at Windows startup, and stays in the system tray, besides the clock.

(more…)

Spring clean your PC

Sunday, November 16th, 2008

Baku is a freeware tool that could be use to clean up your PC. The three main features of Baku are remove unwanted files, remove invalid Registry keys, and remove Most Recently Used (MRU) lists.

(more…)

Wordpress 2.7-beta3

Sunday, November 16th, 2008

Wordpress 2.7 is now in the beta 3 stage.

You can download it here.

Simple division technique

Thursday, November 6th, 2008

This division technique can only be used if the divisor could be factorized.

Example 1:

272 ÷ 16 = 17

(more…)

Change WordPress displayed author name for all comments

Thursday, November 6th, 2008

Whenever you change the display name Users >> Your Profile >> Nickname, and set  the “Display name publicly as”, it will only affect the newly posted comment by you. Actually, you can change the displayed author name for all comments.

You can change the displayed name of comment author for all comments using this sql statement:

UPDATE `wp_comments` SET `comment_author`=‘old-name’ 
     WHERE `comment_author`=‘new-name’

How to create a WordPress theme option page

Wednesday, November 5th, 2008

This tutorial will show you how to create a simple WordPress theme option page.

First, you will need a sample theme. Create a new folder in wp-content\themes. Name it ‘test’ (or, whatever you like). Create three files in the ‘test’ folder: index.php, style.css and functions.php. Now, you should choose the ‘test’ theme as the current theme.

(more…)

Remainder when a number is divided by a nine

Monday, November 3rd, 2008

Do you know that there is an easy way to find the remainder when a number is divided by 9?

(more…)


© Copyright 2008 - 2009 selinap.com
Entries (RSS) and Comments (RSS).