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 jinx on April 25, 2011 12:43:40    Last update: April 25, 2011 12:43:40
Use the PHP function method_exists to check if the class or object has a certain method. It returns TRUE if the method exists (even when the value of the property is NULL), FALSE if the method does not exist. Example: <?php class A { var $p = 'A property'; ... Outputs: Class A has method f1: bool(true) Object $a has... Also note that C++-like method overloading does not exist in PHP. Thus there's no ambiguity about which version of the method exists, i.e., with no argument, with one argument... etc. The following code generates Fatal error: <?php class A { var $p = 'A property'; ...
Created by voodoo on March 04, 2011 12:11:33    Last update: April 13, 2011 13:55:13
By default SELinux blocks execstack permission. According to Ulrich Drepper : "As the name suggests, this error is raised if a program tries to make its stack (or parts thereof) executable with an mprotect call. This should never, ever be necessary. Stack memory is not executable on most OSes these days and this won't change. Executable stack memory is one of the biggest security problems. An execstack error might in fact be most likely raised by malicious code." You can check if a library/application requires execstack by using the execstack utility: execstack -q PATHTOPROGRAM You can try to clean the flag and see if the application still runs: execstack -c PATHTOPROGRAM To allow execstack for cc1 : # grep cc1 /var/log/audit/audit.log | audit2allow ...
Created by nogeek on August 02, 2010 15:24:58    Last update: August 02, 2010 15:24:58
Troubleshooting wifi connectivity is always a headache. I just spent 4 days fixing (actually, finding a workaround for) this problem. Everything worked fine when my PC is connected to a monitor. Then I switched display to my LCD TV with HDMI integrated sound and video. Then my wifi stopped working. The signal strength is perfect and I verified my password a million times (I'm using WPA-PSK). When I tried to connect, it simply fails. No error message, not even an error code! I suspected the HDMI integrated sound driver so I switched sound to the native Realtek driver, still no hope. Then I upgraded the wifi driver to the latest, it didn't help. Uninstalled and reinstalled the driver and rebooted, no difference. What was the...
Created by Dr. Xi on April 06, 2010 22:55:13    Last update: April 06, 2010 22:56:38
These are the steps to diagnose the "javax.jms.Destination found at the specified destination-location" error an MDB in the Oracle application server (oc4j) environment. The data source is correctly configured and connection can be successfully established. Test this from the Oracle AS em console. The destination queue exists and is started. If you are using PL/SQL Developer, you can check this by right clicking on the queue name and make sure that "Enqueue Enabled" and "Dequeue Enabled" are checked. Deployment descriptors are correctly set up. The database user used for the JDBC connection pool has the proper privileges to enqueue and dequeue. Usually this means that the database user is assigned the AQ_USER_ROLE . The ultimate test is to run some PL/SQL code in the oc4j...