Recent Notes

Displaying keyword search results 1 - 5
Created by James on February 02, 2012 09:20:22    Last update: February 02, 2012 09:20:22
This example came from the jQuery validation documentation. The required rule can be used to validate a required selection box when you set the value of the first option to empty. <!DOCTYPE HTML> <html> <head> <scrip... The error message is the title since no error message is specified. A more fully defined validation check would look like this: $('#my-form').validate({ errorElement: "p", ...
Created by voodoo on November 25, 2010 00:03:53    Last update: November 25, 2010 00:03:53
It seems that the JDBC standard way to create a BLOB is to call Connection.createBlob . However, this does not work for PostgreSQL (as of version 9.0-801 jdbc4): Exception in thread "main" org.postgresql.util.PSQ... The workaround is to call a PostgreSQL function to create the Blob, then use JDBC to update it: Connection conn = jdbcTemplate.getDataSource().get... Oracle Note: the Oracle way function to create an empty BLOB is EMPTY_BLOB() . stmt.execute ("INSERT INTO my_blob_table VALUES ('...
Created by Dr. Xi on August 15, 2009 19:10:52    Last update: August 15, 2009 19:17:30
I have a PL/SQL package which uses DBMS_AQADM to create a queue. Oracle gave " PLS-00201 identifier 'DBMS_AQADM' must be declared " error when I tried to create the package. This happened even after I gave the user AQ_ADMINISTRATOR_ROLE , which has EXECUTE privilege on DBMS_AQADM, as can be confirmed with this query: select * from role_tab_privs where role= 'AQ_ADMIN... I have to grant EXECUTE right to the user directly to make it work. It turned out that roles are disabled in any named PL/SQL block ! The following comes from Oracle9i Database Concepts doc: PL/SQL Blocks and Roles The use of roles in a PL/SQL block depends on whether it is an anonymous block or a named block (stored procedure, function, or trigger), and...
Created by Dr. Xi on September 29, 2008 23:03:40    Last update: September 29, 2008 23:04:08
Variables set automatically by shell: Variable Description $# Number of command-line arguments. $- Options currently in effect (arguments supplied to sh or to set). $? Exit value of last executed command. $$ Process number of current process. $! Process number of last background command. $0 First word; that is, command name. $n Individual arguments on command line (positional parameters). The Bourne shell allows only nine parameters to be referenced directly (n = 1-9); the Korn shell allows n to be greater than 9 if specified as ${n}. $* All arguments on command line ("$1 $2..."). $@ All arguments on command line, individually quoted ("$1" "$2" ...). Variables set automatically by Korn shell: Variable Description ERRNO Error number of last system call that failed. LINENO Current...
Created by Dr. Xi on September 21, 2008 21:04:24    Last update: September 21, 2008 22:27:36
IE uses Notepad as the default editor when you select "View Source" from a web page. You can change it to your favorite editor by adding a couple of keys to the registry: Start regedit Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ Add key View Source Editor Under View Source Editor , add key Editor Name Change the default string value to the full path of your favorite editor. The following is the registry entry for vim (full tip for vim is available from the vim wiki ): Windows Registry Editor Version 5.00 [HKEY_... It is probably easier (less error prone) to edit this in a file and import it back into the registry. The contents of gvim.vbs are: '--- gVim.vbs ------------------------------------... It is OK to use gvim.exe...