Monday, August 27, 2007
iPod, African Version
Monday, July 09, 2007
locked file in trash
sudo chflags -R nouchg ~/.Trash
nouchg is the syntax for removing the uchg flag. Any flag can be removed by putting "no" in front of it.
Saturday, April 14, 2007
Toad + Oracle instant client
- Dowload Oracle instant client
- Create a directory called oracle with the following subdirectories
- Uncompress the instant client under the bin directory
- Add the following environment variables:
- SQL_PATH = c:\Program Files\oracle
- TNS_ADMIN c:\Program Files\oracle\network\admin
- LD_LIBRARY_PATH = c:\Program Files\oracle\bin
- Copy the tnsnames.ora in the following directory: c:\Program Files\oracle\network\admin. Here’s a simple tnsnames.ora:
DEV =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = foo)(PORT = 1531))
)
(CONNECT_DATA =
(SERVICE_NAME = foo)
)
)
c:\Program Files\oracle
├─bin
└─network
└──admin
Friday, April 13, 2007
use shadowbook to play next song in itue
Type: emacs ./shadow_nextsong and validate with enter.
This open the file shadow_nextsong in the text editor emacs.
Paste the line:
/Triggered/ { print $0; system("osascript -e \"tell application \\\"iTunes\\\" to play next track\";"); }
Press Ctrl-x then Ctrl-s to save the file.
Press Ctrl-x then Ctrl-c to quit emacs.
Launch ShadowBook.app
In the Terminal, paste the line:
tail -f /Library/Logs/Console/501/console.log | awk -f ./shadow_nextsong and validate with enter.
Next time you'll want to use it, if you didn't move or deleted the file shadow_song, you'll only need to execute the last 2 step
thanks to http://forums.macosxhints.com/showthread.php?t=57844
Monday, April 09, 2007
How to get widgets on to regular desktop
1 - Press F12
2 - Click the (+) to add a new widget
3 - Drag the widget on to the screen
4 - While still holding on to the widget with your mouse, press F12
5 - Release the widget.
To get rid of it simply press F12 again and close it in the dashboard screen
Tuesday, March 27, 2007
DatabaseMetadata getProcedureColumns and oracle
Considerations for getProcedures() and getProcedureColumns() Methods
According to JDBC versions 1.1 and 1.2, the methods getProcedures()
and getProcedureColumns()
treat the catalog
, schemaPattern
, columnNamePattern
, and procedureNamePattern
parameters in the same way. In the Oracle definition of these methods, the parameters are treated differently:
catalog
: Oracle does not have multiple catalogs, but it does have packages. Consequently, thecatalog
parameter is treated as the package name. This applies both on input (thecatalog
parameter) and output (thecatalog
column in the returnedResultSet
). On input, the construct"
"
(the empty string) retrieves procedures and arguments without a package, that is, standalone objects. Anull
value means to drop from the selection criteria, that is, return
information about both stand-alone and packaged objects (same as
passing in "%
"). Otherwise thecatalog
parameter should be a package name pattern (with SQL wild cards, if desired).schemaPattern
:
All objects within Oracle must have a schema, so it does not make sense
to return information for those objects without one. Thus, the
construct"
"
(the empty string) is
interpreted on input to mean the objects in the current schema (that
is, the one to which you are currently connected). To be consistent
with the behavior of thecatalog
parameter,null
is interpreted to drop the schema from the selection criteria (same as passing in "%
"). It can also be used as a pattern with SQL wild cards.procedureNamePattern
andcolumnNamePattern
:
The empty string (" ") does not make sense for either parameter,
because all procedures and arguments must have names. Thus, the
construct"
"
will raise an exception. To be consistent with the behavior of other parameters,null
has the same effect as passing in "%
".
Powered by ScribeFire.
Columns in the ResultSet returned by getProcedureColumns
- PROCEDURE_CAT
always "null" in Derby
- PROCEDURE_SCHEM
schema for a Java procedure
- PROCEDURE_NAME
the name of the procedure
- COLUMN_NAME
the name of the parameter (see column-Name-Pattern)
- COLUMN_TYPE
short indicating what the row describes. Always is DatabaseMetaData.procedureColumnIn for method parameters, unless the parameter is an array. If so, it is DatabaseMetaData.procedureColumnInOut. It always returns DatabaseMetaData.procedureColumnReturn for return values.
- TYPE_NAME
Derby-specific name for the type.
- NULLABLE
always returns DatabaseMetaData.procedureNoNulls for primitive parameters and DatabaseMetaData.procedureNullable for object parameters
- REMARKS
a String describing the java type of the method parameter
- COLUMN_DEF
a String describing the default value for the column (may be null)
- SQL_DATA_TYPE
reserved by JDBC spec for future use
- SQL_DATETIME_SUB
reserved by JDBC spec for future use
- CHAR_OCTET_LENGTH
the maximum length of binary and character based columns (or any other datatype the returned value is a NULL)
- ORDINAL_POSITION
the ordinal position, starting from 1, for the input and output parameters for a procedure.
- IS_NULLABLE
a String describing the parameter's nullability (YES means parameter can include NULLs, NO means it can't)
- SPECIFIC_NAME
the name which uniquely identifies this procedure within its schema
- METHOD_ID
a Derby-specific column.
- PARAMETER_ID
a Derby-specific column.
Saturday, March 24, 2007
FireFox AddOn for a web developer
The FireFox AddOn I am using:
1.
FireBug, as a web developer I must recommend this one. it's simple to use and powerful. you can trace your javascript, check your DOM structure, and ...... a bunch of powerful stuff. |
Web Developer ok, you already knew that I am a web developer. so you should not be surprised that I am using this addOn. |
del.icio.us bookmarks If you do not know what del.icio.us is, you should go check it now. right now. I mean it. stop reading.... |
FireFtp It's handy to have a ftp client built in your browser. |
FlashGot I switched to mac last year, so this one does not help me any more. I started to use Downthem! All instead. But If you use windows, and you are a flashget user. you should check it out. |
Downthem! All easy to use, if you often find yourself repeatly using right click and save as... in one web page. trust me, you definitely need this one. |
Sunday, January 28, 2007
Intel Based Mac Adobe Flash Player update issue
One day, I was surfing the net with my firefox. A message from adobe asked me to upgrade the flash player plugin. After followed the "easy" instruction step and completed the upgrade. Some thing bad happened, my firefox and safari cannot play the flash for me anymore. after reinstall several time, I asked help from google and found I am not alone. some ppl said that I have to find an older version plugin and install that particular version. but some how as almighty as google cannot find that older version plugins. so following is what i did with the latest adobe flash player plugin 9.0.28, and it works for me.
- Download Adobe Flash Player plugin for Intel-based Macs
- go to [/Library/Internet Plug-Ins] remove following files
- Flash Player.plugin
- flashplayer.xpt
- Flash Player Enabler.plugin
- unzip the file downloaded in step 1, and mount the dmg file
- after the dmg file is mounted, open a terminal window
- cd to following directory --
cd /Volumes/Adobe Flash Player 9
/Install Flash Player 9 UB/Contents/MacOS - And Execute the command as super user as follow
sudo ./Install Flash Player 9 UB
- That's all. You might see some error messages, complaing some text file cannot be moved. just ignore it.
trac-installation
System installation
1. use synaptic package manager to install trac. (SQLite, fastCGI, svn)
2. and install the python module easy_install , which will be a great helper to install the trac plug later.
3. install following plugins
WebAdmin
easy_install http://svn.edgewall.com/repos/trac/sandbox/webadmin
AccountManager
easy_install http://trac-hacks.org/svn/accountmanagerplugin/0.10