Displaying keyword search results 1 - 10
Created by James on May 03, 2012 14:54:46 Last update: May 03, 2012 14:54:46
History.js gracefully supports the HTML5 History/State APIs (pushState, replaceState, onPopState) in all browsers. For HTML4 browsers it will revert back to using the old onhashchange functionality. All major browsers are supported. This is a simple test page to get started:
<html> <head> <title>Test History</title> ...Note: state url must be provided for IE to generate a unique hash. YOu can prefix the state url with '?' ('#' does not work).
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 October 28, 2011 13:49:40 Last update: October 30, 2011 19:23:25
This is a simple example to demonstrate the templating power of JSF facelets. If you've used struts tiles before, you'll recognize the simplicity of templating with facelets. I've stripped out everything else except the pages themselves, just to put our focus on facelets. This is a Maven based project, and you need Tomcat (or any servlet container) to run the resulting webapp. To begin with this is the list of files:
./pom.xml ./src/main/webapp/home.xhtml ./src...I left faces-config.xml in there for completeness sake, it may not be needed. The Maven POM ( pom.xml ):
<?xml version="1.0" encoding="UTF-8"?> <project...Web app configuration ( WEB-INF/web.xml ):
<?xml version="1.0" encoding="UTF-8"?> <web-app...Empty WEB-INF/faces-config.xml :
<?xml version="1.0" encoding="UTF-8"?> <!-- Thi...index.jsp is simply a redirect to home.jsf :
<% response.sendRedirect("home.jsf"); %>...
Created by James on October 25, 2011 19:44:30 Last update: October 25, 2011 19:45:40
jQuery automatically maps HTML5 custom data attributes to data storage associated with the data() method. Here's an example:
Created by Dr. Xi on August 11, 2007 15:56:47 Last update: July 19, 2011 08:15:55
Here's a list of common TCP ports. You can find a more complete list here: http://www.gasmi.net/docs/tcp.html . Port Number Service Description 21 FTP File Transfer Protocol 22 SSH Secure Shell 23 Telnet Telnet remote login 25 SMTP Simple Mail Transfer Protocol 70 gopher Gopher 79 finger Finger 80 HTTP Hyper Text Transfer Protocol (WWW) 88 Kerberos Kerberos authentication 94 tivoli Tivoli Object Dispatcher 110 pop3 Post Office Protocol Version 3 123 ntp Network Time Protocol 137 netbios NetBIOS Name Service 138 netbios NetBIOS Datagram 139 netbios NetBIOS Session 143 imap Internet Message Access Protocol 161 snmp Simple Network Management Protocol 162 snmptrap SNMP trap 194 irc Internet Relay Chat Protocol 389 ldap Lightweight Directory Access Protocol 443 https Secure HTTP 445 SMB MS Server Message...
Created by Dr. Xi on January 29, 2009 00:01:02 Last update: February 04, 2011 14:57:40
Generate key valid for 10 years (3650 days). Since no -keystore option is given, the key is stored in the default keystore $HOME/.keystore .
C:\tmp>keytool -genkey -keyalg rsa -alias myke...Create the applet jar:
jar -cf myapplet.jar com/my/appletSign jar:
C:\tmp>jarsigner myapplet.jar mykey Enter Passp...Verify signature:
C:\tmp>jarsigner -verify -verbose -certs myapplet....
Created by Fang on August 03, 2010 19:50:51 Last update: August 03, 2010 19:50:51
The tags <fmt:message> Writes out a formatted message for the current locale and resource bundle, or stores the resulting message to a scoped variable (when the var attribute is specified). Syntax:
<fmt:message key="messageKey" [bundle="resourc...Or, with parameters in body:
<fmt:message key="messageKey" [bundle="resourc...<fmt:bundle> Creates a resource bundle for the contained body. Syntax:
<fmt:bundle basename="basename" [prefix="prefi...<fmt:setBundle> Sets a resource bundle in a scoped variable, which may be used later by <fmt:message> . Syntax:
<fmt:setBundle basename="basename" [var="varNa...<fmt:param> This is used inside a <fmt:message> tag to specify a replacement parameter.
<fmt:param>The Parameter Value</fmt:param>Test it Make these additions to the expanded test application : Create 3 resource bundles and place them under src\main\resources . messages_en.properties :
label.login=Login label.username=User Name ...messages_es.properties :...
Created by Fang on July 27, 2010 16:42:08 Last update: July 30, 2010 18:39:48
Three key concepts are associated with internationalization (I18N): Locale: a locale is identified by a language code along with an optional country code. For example: en for English, en_US for US English, zh_CN for simplified Chinese. Resource Bundle: a resource bundle is a properties file localized for a specific locale. For example, messages_en.properties may be a resource bundle for English, messages_zh.properties may be a resource bundle for Chinese. Basename: a basename identifies the same set of messages represented by all related resource bundles. In the above example, the basename is messages . When a user request comes to a web application, the resource bundle is retrieved using the basename and the preferred locales . The preferred locale can be either application-based or browser-based . When...
Created by voodoo on July 11, 2009 15:14:55 Last update: July 29, 2010 22:45:48
cURL is a command line tool for transferring files with URL syntax. The main purpose and use for cURL is to automate unattended file transfers or sequences of operations. It's really easy to see HTTP headers with curl:
C:\>curl --head http://www.google.com HTTP/1.0 ...or, headers and page together (dump headers to stdout):
$ curl --dump-header - http://www.google.com HTTP/...Download openssl from openssl.org:
C:\>curl --help Usage: curl [options...] <url> ...
Created by Fang on April 04, 2010 04:12:14 Last update: July 21, 2010 14:52:58
The tags <c:if> The <c:if> tag may be used with or without body content:
<!-- Without body content, used to export vari...In my opinion, the version without body content is pretty much useless (the <c:set> tag is a lot more meaningful for this purpose). If body content exists, it is inserted into the page if the testCondition is true . Optional attributes var and scope may be specified. If var is specified, a variable whose name is the value of var is exported to the associated scope ( pageScope if no scope is specified). The type of the exported variable is Boolean and its value is the value of the testCondition . <c:choose>, <c:when>, <c:otherwise> These tags imitate the Java control structure if...else...