Recent Notes

Displaying keyword search results 1 - 6
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 nogeek on November 03, 2010 20:52:49    Last update: November 23, 2011 08:54:44
My problem is simple: in my XML data, a timestamp is provided as a long integer (number of milliseconds since the "the epoch"). When I do XSLT, I want to display it as a readable string, such as "Mon Nov 01 18:08:48 CDT 2010". After hours of struggle, I found: It's not so easy to get the job done with JDK 1.6 There are tons of garbage on the web in this space (suggestions, code snippets that simply don't work) Simple Xalan extension functions was the only resource that's somewhat informative. Even there some of the examples don't work. Below is a list of what worked and what didn't. This works: <xsl:stylesheet version="1.0" xmlns:xsl="h... This does not (providing long value to Date constructor): <xsl:stylesheet version="1.0" xmlns:xsl="h......
Created by balu on October 14, 2011 10:21:08    Last update: October 14, 2011 10:21:08
Got this error while trying to start vFabric tc server : C:\Apps\vfabric-tc-server-standard-2.6.1.RELEASE>t... It's a UAC error. Need to start the command prompt with Administrator privileges: right click the shortcut and select Run as administrator . Or enable administrator rights for the shortcut: Bring up the cmd shortcut properties Select the Shortcut tab, click the Advanced button. Check Run as administrator .
Created by freyo on September 07, 2011 16:46:14    Last update: September 07, 2011 19:23:00
The Android unit test framework is based on JUnit 3 , not JUnit 4. Test cases have to extend junit.framework.TestCase or a subclass (such as android.test.InstrumentationTestCase ). Tests are identified by public methods whose name starts with test , not methods annotated with @Test (as in JUnit 4). An Android test suite is packaged as an APK, just like the application being tested. To create a test package, first you need to identify the application package it is testing. Google suggests to put the test package source in a directory named tests/ alongside the src/ directory of the main application. At runtime, Android instrumentation loads both the test package and the application under test into the same process. Therefore, the tests can invoke methods on...
Created by Dr. Xi on March 28, 2011 11:11:33    Last update: March 28, 2011 11:13:21
grep is a versatile command with many variations (grep, egrep, fgrep, then various implementations). It uses a regula expression (regex) pattern to filter input. But then there are basic and extended flavors of regex - leading to even more confusion. And, beware that there are lots of bad examples of regex in the wild... There are two critical questions to ask when you use grep: which grep implementation are you using? what is the flavor of the regex? Here are some examples for gnu grep v2.7: # Find all numbers (no decimal point), basic regex... Use the -o flag to show only the matching part instead of the whole matching line: grep -o -E '\b[0-9]{2}\b' The good thing about the gnu grep is that it...
Created by Dr. Xi on September 19, 2008 22:24:44    Last update: September 19, 2008 22:24:44
I've always known that IE lies about error messages. When I get a generic error page from IE, I would test the same page in Firefox, which would faithfully show me the error sent from the server. Never, even in my wildest dreams, would it occur to me that the blurring of error messages is actually called "user friendly". Until I stumbled upon it. Anyway, here's how to turn it off. Thanks to MS, which apparently thought that most people are dumb but seemed like they still acknowledged there are some out there not so dumb as they think, for offering the option to turn it off! Select "Internet Options" from the "Tools" menu Click the "Advanced" tab Scroll to the "Browsing" section and deselect...