Recent Notes
Displaying keyword search results 1 - 10
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 Fang on September 07, 2009 20:44:15
Last update: November 03, 2011 14:43:19
Step 1: Repackage a web app as EAR A Java EE application is a multimodule Maven project. At the very least you'll need to package a WAR and an EAR. To get started, I'll simply re-package the simple webapp as an EAR. Create a directory named javaee-app Copy the webapp from here to javaee-app . Rename struts1app to webapp . Create pom.xml under javaee-app :
<project> <modelVersion>4.0.0</modelVersion>... Create a directory named ear under javaee-app . Create pom.xml under ear : <project> <modelVersion>4.0.0</modelVersion>... Modify pom.xml in the webapp directory so that it looks like this: <project> <modelVersion>4.0.0</modelVersion> ... Build with " mvn package " in the javaee-app directory. You can see that ear-1.0.ear is successfully generated in javaee-app/ear/target . Maven successfully resolves dependencies between the sub-projects....
Created by freyo on September 09, 2011 11:43:36
Last update: September 09, 2011 11:45:45
When you run automated Android tests with Eclipse or from the command line, you get text output, which isn't good for reporting purposes. If you run a large set of test cases with automated build, the text report isn't very helpful. Fortunately, Android CTS generates test reports in XML with accompanying XSL to make it look nice in a browser. To run your own tests with Android CTS: Download Android CTS Make a new directory MyRepository under android-cts , alongside the existing repository directory. Copy host_config.xml from repository to MyRepository Create directory plans under MyRepository , add a test plan ( MyTests.xml ):
<?xml version="1.0" encoding="UTF-8"?> <TestPla... Create directory testcases under MyRepository . Copy TestDeviceSetup.apk from repository/testcases to MyRepository/testcases Under MyRepository/testcases , create a test...
Created by Dr. Xi on July 14, 2011 09:28:57
Last update: July 14, 2011 09:28:57
Java arrays are fixed size, so you have to make a new array with smaller size and copy the data.
For JDK6 and above:
// import java.util.Arrays;
newArray = Arrays.c...
Before that (using Object as example):
Object[] newArray = new Object [newSize] ;
Syst...
Created by woolf on June 25, 2011 10:55:08
Last update: June 25, 2011 10:57:15
My C drive was seriously fragmented with about 20% free space. So I ran the built-in Windows disk defrag utility. To my surprise it doesn't work at all! I tried to defragment multiple times and every time it comes back without doing much work. Then I realized that perhaps it didn't know how to get the job done and needed some help. Here's the list of things I did to help the defragmentor out: Relocate the paging file to a different drive and reboot. If the paging file ( pagefile.sys ) is seriously fragmented, it can't be defragmented, and in turn it blocks other files from being defragmented. If you only have one drive (C:), try to make it smaller or eliminate it entirely for...
Created by freyo on June 08, 2011 09:06:49
Last update: June 08, 2011 09:07:49
The built-in Calculator application has a jar file dependency ( Android.mk ):
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VA...
So we can just copy that and:
Change libarity to libmydependency
Change arity-2.1.2.jar to mydependency-10.3.4.jar
Add libmydependency to build/core/user_tags.mk , next to libarity
Created by nogeek on March 21, 2011 15:31:26
Last update: March 21, 2011 15:32:35
Inventory list for configuring a JDBC data source in JBoss:
Put *-ds.xml configuration file in server/yourServer/deploy , e.g., hsqldb-ds.xml
Other needed files in server/yourServer/deploy : jboss-local-jdbc.rar , jboss-xa-jdbc.rar , jca-jboss-beans.xml , transaction-jboss-beans.xml
Copy jboss-jca.deployer directory to server/yourServer/deployers
Copy standardjbosscmp-jdbc.xml to server/yourServer/conf
Make sure the following lines appear in server/yourServer/conf/jboss-service.xml
<mbean code="org.jboss.ejb.plugins.cmp.jdbc.metada...
Created by nogeek on December 31, 2010 11:56:25
Last update: December 31, 2010 11:56:25
These are the steps to create a JBoss 5.1.0 configuration with Tomcat from the built-in minimal configuration. Change directory to $JBOSS_HOME/server . Make a copy of the minimal configuration.
cp -R minimal tomcatonly Copy bindingservice.beans from the default configuration. cp -R default/conf/bindingservice.beans tomcatonly... Copy login-config.xml from the default configuration. cp default/conf/login-config.xml tomcatonly/conf/ Edit tomcatonly/conf/jboss-service.xml : Add jars from the common/lib directory: <!-- Load all jars from the JBOSS_DIST/serv... Add the JAAS security manager section (copy from the default profile, and yes, JBoss tomcat can't live without the JBoss JAAS manager). <!-- JAAS security manager and realm mappin... Copy the Tomcat (JBoss web) deployer from the default configuration. cp -R default/deployers/jbossweb.deployer tomcaton... Copy metadata-deployer-jboss-beans.xml and security-deployer-jboss-beans.xml from the default profile. cp default/deployers/metadata-deployer-jboss-b... Copy...
Created by nogeek on November 11, 2010 23:58:24
Last update: November 11, 2010 23:59:24
After all I needed basic authentication for my Tomcat service running in JBoss. These are the steps to add the JBoss authentication service.
Edit jboss-tomcat50.sar/WETA-INF/jboss-service.xml , make sure SecurityManagerService is not commented out:
<!-- A mapping to the server security manager ...
Copy jboss-jaas.jar from the default config:
cp server/default/lib/jboss-jaas.jar server/myserv...
Add this section to server/myserver/conf/jboss-service.xml
<!-- ======================================...
Created by Dr. Xi on September 18, 2008 21:38:27
Last update: February 06, 2010 21:55:26
Editing
Shortcut Meaning
Ctrl+C Copy
Ctrl+V Paste
Ctrl+X Cut
Ctrl+Z Undo
Ctrl+F Find
Ctrl+G Find Again
Viewing
Shortcut Meaning
Esc Stop
Ctrl+R Reload
Mozilla/NS: Ctrl+Shift+R, IE: Ctrl-F5 Force reload (not from cache)
Home Go to top of page
End Go to end of page
Page Up Scroll up one page
Page Down Scroll down one page
Ctrl+- (minus sign) Make fonts smaller
Ctrl++ (plus sign) Make fonts bigger
Ctrl+0 Restore default font size
Tools
Shortcut Meaning
Alt Toggle menu bar (IE7 only)
Ctrl+T Open new tab
Ctrl+N Open new window
Ctrl+P Print
Ctrl+I, Ctrl+B Bookmarks
Ctrl+H History
Ctrl+U View page source
Ctrl+W Close Window or tab if more than one tab is open
Ctrl+L Go to location box
Ctrl+E Go to search box