Recent Notes

Displaying keyword search results 1 - 4
Created by voodoo on November 24, 2010 23:34:52    Last update: November 24, 2010 23:36:08
PostgreSQL provides two distinct ways to store binary data: Binary data can be stored in a table using the data type bytea . By using the Large Object feature which stores the binary data in a separate table in a special format and refers to that table by storing a value of type oid in your table. Different methods are used to access the BLOBs depending on which storage type you choose: To use the bytea data type you should use the getBytes() , setBytes() , getBinaryStream() , or setBinaryStream() methods. To use the Large Object functionality you can use either the LargeObject class provided by the PostgreSQL JDBC driver, or by using the getBLOB() and setBLOB() methods. Using setBinaryStream on an OID column yields...
Created by Dr. Xi on February 10, 2010 23:39:37    Last update: February 10, 2010 23:39:37
Example web.xml that includes most frequently used elements. This sample is for Servlet Specification 2.4. <?xml version="1.0" encoding="UTF-8"?> <web-ap...
Created by Dr. Xi on January 30, 2009 16:57:12    Last update: January 30, 2009 17:25:36
The scriptable attribute defaults to false . However, even when you set it to true , there is a time delay between when the applet is loaded and when it becomes scriptable . The following code may fail: <html><body> <object classid="clsid:8AD9C840-04... You need to wrap the JavaScript like this: <script language="JavaScript" type="text/javascrip...
Created by Dr. Xi on December 12, 2007 20:30:01    Last update: December 12, 2007 20:32:23
This is a script to tail a log file through the web browser. It uses AJAX, apache web server, mod_python, UNIX utilities tail (requires the --lines switch) and wc . The log file may reside on the web server or any other host accessible from the web server through SSH. Although it's written in python, it should be easy to port to other languages such as Perl. Apache httpd.conf : LoadModule python_module modules/mod_python.so ... Python script: import time, os from os.path import basename ...