Displaying keyword search results 1 - 7
Created by freyo on August 31, 2011 15:49:54 Last update: August 31, 2011 15:49:54
Got this error while trying to build Android app:
[apkbuilder] Creating AppInfo-debug-unaligned.ap...Solution: Delete the Android debug keystore:
$ rm ~/.android/debug.keystoreBuild again:
$ ant debugThe new key is valid for 30 years (keystore password is 'android'):
$ keytool -list -v -keystore ~/.android/debug.keys...
Created by freyo on April 20, 2011 15:10:03 Last update: April 20, 2011 15:10:03
When you sign an APK with existing signature, the new certificate is appended to the existing one. If you want to replace the existing certificate, you need to remove it first. But since an APK is just a zip file, this is pretty easy: Remove existing signature:
$ zip -d HelloWorld-new.apk META-INF/* deleting...Verify:
$ unzip -l HelloWorld-new.apk Archive: HelloWo...Sign it again:
$ jarsigner HelloWorld-new.apk android-root Ent...
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 July 21, 2010 22:14:53 Last update: July 21, 2010 22:14:53
This is a Java program to test XPATH expressions with namespace option. It's been tested with JDK1.6.
import java.io.FileInputStream; import java.uti...Following Getting Started with XML Security , these are the test files: Without namespace (patient.xml).
<PatientRecord> <Name>John Doe</Nam...With namespace (patient_ns.xml).
<med:PatientRecord xmlns:med="http://www.medic...Test results:
C:\>java XPathExample patient.xml /PatientRecord/V...
Created by voodoo on July 21, 2010 16:10:47 Last update: July 21, 2010 16:10:47
Google news RSS does not like curl:
C:\> curl --dump-header - -o NUL http://news.googl...Switch the agent to HotJava with the -A option:
C:\> curl -A "HotJava/1.1.2 FCS" --dump-header - -...
Created by Dr. Xi on June 19, 2010 04:34:01 Last update: June 19, 2010 04:39:13
Java SE 6 contains built-in utilities to generate XML signatures. This is an example that generates XML signatures using a Java keystore. It has options to generate signature for the whole document, for an element with a specific ID, or for elements matched by an XPATH expression. The XML document used to test is taken from Getting Started with XML Security :
<?xml version="1.0"?> <PatientRecord> ...This is the Java code:
import java.io.FileInputStream; import java.io....However, it looks like the XPATH transform is not working. The digest generated with XPATH filter is exactly the same as that without it (i.e., the whole document)! Another reference: Programming With the Java XML Digital Signature API
Created by Dr. Xi on December 12, 2007 20:30:01 Last update: December 12, 2007 20:32:23
This is a script to tail a log file through the web browser. It uses AJAX, apache web server, mod_python, UNIX utilities tail (requires the --lines switch) and wc . The log file may reside on the web server or any other host accessible from the web server through SSH. Although it's written in python, it should be easy to port to other languages such as Perl. Apache httpd.conf :
LoadModule python_module modules/mod_python.so ...Python script:
import time, os from os.path import basename ...