博文

目前显示的是 五月, 2014的博文

HTML Entity

 Ref: codeproject.com/Articles/751805/Beginners-guide-to-HTML         freeformatter.com/html-entities.html   Do tags and attributes all have to be in lowercase letters? Thing is, HTML5 is flexible and you can chose to write your tags and attributes however way you want. <Head> , <head> , <HEAD> and <hEAd> are all the same, likewise Class , class and CLASS but the usual convention is to write your tags and attributes in lowercase letters. Do I have to use double quotes to enclose attribute values? You can use either. Single ' and " are valid. In fact, HTML5 allows you to completely ignore quotes when writing attribute values that do not have spaces. How do I write <> without the browser thinking it's an HTML tag? An article like this one has be showing you different tags without the browser thinking they are tags, right? If you have to write angle brackets or any other character not on...
Execute an external program Tag(s): IO From: http://www.rgagnon.com/javadetails/java-0014.html Be sure to read this Javaworld article . It describes the various pitfalls related to the Runtime.exec() method. Using Runtime.exec() This example will capture the output (from stdio) of an external program. package com.rgagnon.howto; import java.io.*; public class Exec { public static void main(String args[]) { try { String line; Process p = Runtime.getRuntime().exec("cmd /c dir"); BufferedReader bri = new BufferedReader (new InputStreamReader(p.getInputStream())); BufferedReader bre = new BufferedReader (new InputStreamReader(p.getErrorStream())); while ((line = bri.readLine()) != null) { System.out.println(line); } bri.close(); while ((line = bre.readLine()) != null) { System.out.println(line); } bre.close(); p.waitFor(); System.out.println("Done."...

load-on-startup in Servlet

<servlet>           <servlet-name>TimeServlet</servlet-name>           <servlet-class>TimeServlet</servlet-class>           < load-on-startup >1</load-on-startup>      </servlet>      <servlet-mapping>           <servlet-name>TimeServlet</servlet-name>           <url-pattern>/servlet/TestServlet</url-pattern>      </servlet-mapping> The load-on-startup element indicates that this servlet should be loaded (instantiated and have its init() called) on the startup of the web application. The optional contents of these element must be an integer indicating the order in which the servlet should be lo...

Subversion

http://svnbook.red-bean.com/ This is the home of Version Control with Subversion , a free book about the ubiquitous Apache™ Subversion® version control system and written by some of the developers of Subversion itself.