2012-06-12

Add all new files to Subversion Repository

Add new files to repository
svn status | grep "^\?" | awk '{print $2}' | xargs svn add

2012-04-12

Linux Command Line Kill a Process by Process Name

kill $(pgrep PROCESS_NAME)
killall -v PROCESS_NAME
pkill PROCESS_NAME
kill `ps -ef | grep PROCESS_NAME | grep -v grep | awk '{print $2}'`

2011-12-29

Django "SMTPServerDisconnected Connection unexpectedly closed"

  1. Check mail server by "telnet servername port(25)"
  2. Check IMAP server (e.g. deovecot)

2011-04-20

How To Install Python JCC

Ubuntu 8.04 Server
Windows
  • require Python2.5.2, Visual Studio 2003, Java-JDK1.6.0u17
  • add Path
    • C:\Program Files\Java\jdk1.6.0_17\bin
    • C:\Program Files\Java\jdk1.6.0_17\lib
    • C:\Program Files\Java\jdk1.6.0_17\jre\bin\client
    • C:\Python25
  • checkout jcc from subversion http://svn.apache.org/repos/asf/lucene/pylucene/trunk/jcc (revision 1090549)
  • open command prompt
  • in jcc directory >>> python setup.py build install

2009-02-14

How to Change JOptionPane font

Use JTextArea component to render in JOptionPane.
Example:
JTextArea txtArea = new JTextArea(errMsg);
txtArea.setFont(GuiUtils.getThaiFont(Font.BOLD, 22));
txtArea.setOpaque(false);
txtArea.setEditable(false);
txtArea.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JOptionPane.showMessageDialog(this, txtArea);

2009-01-26

SQL History in Django

Use django.db.connection to get SQL history.
Example:
from django.db import connection
connection.queries

2008-12-04

Certificate expired when package AIR appication

Solution: Change your date and time formats on your computer to US format before create certificate file.