Displaying keyword search results 1 - 9
Created by freyo on February 06, 2013 21:10:47 Last update: February 06, 2013 21:12:18
I have an old Samung phone to be used as a toy. After restoring back to factory image and power on, I was stuck at the activate service screen. Unfortunately, the four corner magic touch did not work. So I did quite a bit of digging and this is what worked on my Samsung Continuum: Press emergency call button, then at the dialer, press * # 8 3 7 8 6 6 3 3 , press the Home key From the home screen, tap phone icon, Dial * # 2 2 7 4 5 9 2 7 Enter SPC code: ______ displays tap in white box to show virtual keyboard, enter 6 digit code (default: 000000), tap OK Select “Hidden menu Enable”, tap OK From...
Created by magnum on October 22, 2012 20:03:05 Last update: October 22, 2012 20:03:05
First, the test command that sleeps random number of seconds ( sleeper.sh ):
#!/bin/bash stime=$[$RANDOM % 20] sleep $sti...As comparison, synchronous pipe code:
#include <sys/wait.h> #include <stdio.h> #in...Asynchronous pipe code:
#include <sys/wait.h> #include <stdio.h> #in...
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 Fang on November 10, 2011 09:26:12 Last update: November 10, 2011 09:26:12
Syntax highlighted XML schema for JSF 2.0 Application Configuration Resource File ( faces-config.xml ). Almost 3000 lines!
<?xml version="1.0" encoding="UTF-8"?> <xsd:sch...
Created by meiu on February 09, 2010 03:26:14 Last update: March 31, 2011 09:00:19
Simple JDBC code for Oracle.
import java.sql.*; public class JDBCHelloWo...
Created by nogeek on November 04, 2010 20:00:15 Last update: November 05, 2010 14:38:43
Following are some bugs in the Xalan jar shipped with JBoss 5.1.0 GA and JBoss 6.0. The Xalan jar file is located in jboss-5.1.0.GA/lib/endorsed ( %JBOSS_HOME%/common/lib for JBoss 6.0). Test xml:
<?xml version="1.0" encoding="ISO-8859-1"?> ...Test xsl:
<?xml version="1.0" encoding="ISO-8859-1"?> <xs...XSLT Java code:
import org.w3c.dom.*; import javax.xml.parsers....DateUtil.java
import java.util.Date; public class DateUti...XSLT output:
Transformer Factory class: class org.apache.xalan....Apparently, the output is wrong. The string "A test event" should not have been displayed.
Created by Dr. Xi on October 18, 2008 02:46:56 Last update: October 18, 2008 02:47:33
There are four pairs of methods in the java.sql.ResultSet class that deal with BLOBs/CLOBs: Reader getCharacterStream(int columnIndex) / Reader getCharacterStream(String columnName) InputStream getBinaryStream(int columnIndex) / InputStream getBinaryStream(String columnName) Blob getBlob(int i) / Blob getBlob(String colName) Clob getClob(int i) / Clob getClob(String colName) Example code:
PreparedStatement pstmt = conn.prepareStatemen...
Created by Dr. Xi on September 13, 2008 20:52:47 Last update: September 15, 2008 23:04:35
The text source of the stored objects (including stored procedures) are made available in Oracle by three views: USER_SOURCE describes the text source of the stored objects owned by the current user. This view does not display the OWNER column. ALL_SOURCE describes the text source of the stored objects accessible to the current user. DBA_SOURCE describes the text source of all stored objects in the database. These are the columns: Column Name Description OWNER Owner of the object NAME Name of the object TYPE Type of object: FUNCTION, JAVA SOURCE, PACKAGE, PACKAGE BODY, PROCEDURE, TRIGGER, TYPE, TYPE BODY LINE Line number of this line of source TEXT Text source of the stored object If you want to search for a certain keyword in the source,...
Created by Dr. Xi on August 11, 2007 23:19:26 Last update: August 12, 2007 01:39:33
For SQL Server 2000 and above, there are three functions: SELECT @@IDENTITY When a record is inserted into a table with a identity column, the function @@IDENTITY returns the last identity value that was inserted in the database on the same open connection. If a trigger adds a record into another table, which happens to have an identity column, @@IDENTITY will now return this value instead. SELECT IDENT_CURRENT('tablename') This will give you the most recent identity value for the given table regardless of who inserted it. SELECT SCOPE_IDENTITY() SCOPE_IDENTITY shows the most recently inserted IDENTITY in the current scope (which ignores any triggers that might fire). For SQL Server version prior to 2000, it is customary to use a stored procedure:
CREATE PROCEDURE myProc @param1 INT AS......