Category: General Development
Accepted boolean XML inputs
Adding for archival purposes: http://xformsinstitute.com/essentials/browse/re45.php true, 1, false, 0 are valid.
Python: Send e-mail to multiple recipients using Gmail SMTP
Below is the method I used. def SendEmail(content): gmailUser = ‘me’ password = ‘password’ recipients = [‘you1’, ‘you2’, ‘you3’ ] msg = MIMEMultipart(‘alternative’)…
Automatically update locate DB in OS X
Pretty straightforward, simply add the following in your .bash_profile: alias locate=’if [ $((`date +%s`-`eval $(stat -s /var/db/locate.database); echo $st_mtime`)) -gt 3600 ]; then echo “locate: db is too old!”>/dev/stderr; sudo /usr/libexec/locate.updatedb; fi; locate -i’ Note: Run source ~/.bash_profile to reload.
Completely remove Python 2.7 on OS X Lion
Simple. Here are the steps: 1. Remove the Python 2.7 framework sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7 2. Remove the Python 2.7 applications directory sudo rm -rf “/Applications/Python 2.7” 3. Remove the symbolic links in /usr/local/bin
Subclipse Error in Eclipse: “Failed to load JavaHL Library”
Just in case you get the error above with Eclipse when accessing an SVN repository via Subclipse on OS X Lion, do the following: 1. Install MacPorts (make sure you have Xcode and the command line tools). 2. Run the following in terminal: sudo port install subversion-javahlbindings
Eclipse error when adding Python Lib on OS X Lion
When I tried creating my first PyDev project in Eclipse on OS X Lion, I was asked to configure my interpreter as it was not listed. And when I did the “Auto Config” option, it came be with the following error: “Error: Python stdlib not found It seems that the Python /Lib folder (which contains…