Displaying keyword search results 1 - 4
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 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 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...
Created by Dr. Xi on September 10, 2008 03:37:17 Last update: September 10, 2008 15:48:31
Suppose you have a file with these lines:
-- contents of update_contact.sql update co...You can execute this script from the SQL prompt by entering:
@update_contact.sqlAnd it would execute fine. Now you get the contents of the script into the SQL buffer by:
GET update_contact.sqland use the / command to execute the buffer, you get ORA-00911 invalid character error for the semicolon at the first line. Confusing, right? It turned out that the semicolon is used by SQL*Plus to signify the end of a SQL command. When you enter SQL commands into SQL*Plus, it strips the trailing semicolon before sending the SQL command to the database. But when you import the contents of a file with the GET command, the semicolon is...