Category Archives: Coding

is_home() not working in my WordPress plugin

When using is_home(), is_category(), is_page() etc. in my WordPress plugin that displays category-based ads, they kept returning NULL. My problem was that I was calling this these function directly in my plugin. I resolved this by adding these call to … Continue reading

Posted in PHP, Wordpress | 1 Comment

USPS Web Tools

I was trying to add the USPS API into osCommerce. I received the following error when adding this shipping module: RateV3 is not a valid API name for this protocol This is because when you create an account for the … Continue reading

Posted in Family, PHP, Python, Z350 | Tagged | Leave a comment

Use Python to Save an FTP Directory List to File

Written for Python 2.6 #!/usr/bin/python   import ftplib   ftp = ftplib.FTP("ftp.server.com") ftp.login("username", "password") ftp.cwd("path/path")   data = []   ftp.dir(data.append)   ftp.quit()   outputFile = open(’dirList.txt’,'wb’)   for line in data: outputFile.write(line + "\n")   outputFile.close()

Posted in Python | Leave a comment

Using Python to replace spaces with underscores in filenames.

Python can be used on Window, Linux and Mac. It just a simple install. download code #!/usr/bin/python   import string import os import re   # task: # loop thur input directory # look for .pdf # replace space with … Continue reading

Posted in Python | Leave a comment

Microsoft Certified Professional Developer (MCPD)

How to earn your MCPD certification on Visual Studio 2008 Each MCPD certification on Visual Studio 2008 requires that you pass two to four Microsoft Certified Technology Specialist (MCTS) prerequisite exams and one Professional Series exam, as shown in the … Continue reading

Posted in Coding | Tagged , | Leave a comment

Displaying Child Page Links in A Template

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 … Continue reading

Posted in PHP, Wordpress | Leave a comment

Deprecated innerHTML

This is a JavaScript example of how to use the createTextNode instead of the deprecated innerHTML. There is also an example of how to use the removeChild function if the node you want to add to has child nodes. 1 … Continue reading

Posted in JavaScript | Leave a comment

Firebug Lite

Finally!!! Now you can use Firebug in IE. But before you wet yourself . . . it is the “Lite” version. Then on the other hand it is far better than nothing. Check it out . . .

Posted in Coding | Leave a comment

php turns SQL to Excel

Thanks StarGeek for this code. this php script will write data from php using text from an SQL table (MySQL, supply your own SQL query) to a microsoft excel (.xls) file. The Excel file is specified as such by a … Continue reading

Posted in PHP | Tagged | Leave a comment