Recent Notes
Displaying keyword search results 1 - 10
Created by James on April 24, 2012 14:01:39
Last update: April 24, 2012 14:01:39
This is the Mathias Bynens placeholder plugin with several bug fixes of my own.
/*! http://mths.be/placeholder v2.0.7 by @mathias ...
Created by Fang on April 16, 2012 13:32:10
Last update: April 16, 2012 13:32:10
There are two steps to create a custom function for JSP:
Declare the function in the TLD:
<?xml version="1.0" encoding="UTF-8" ?>
<taglib...
Implement the function (must be static):
package com.example;
public class UrlTransl...
To use the function:
<%@ taglib uri="http://www.example.com/jsp/tags" p...
Created by voodoo on February 16, 2012 13:35:38
Last update: February 16, 2012 13:35:57
The C shell allows you to define aliases with arguments: \!^ passes the first argument, \!* passes all arguments. Examples from http://unixhelp.ed.ac.uk :
alias print 'lpr \!^ -Pps5'
alias print 'lp...
In ksh or bash you cannot define alias with arguments. Use function instead.
Created by James on February 02, 2012 09:20:22
Last update: February 02, 2012 09:20:22
This example came from the jQuery validation documentation. The required rule can be used to validate a required selection box when you set the value of the first option to empty.
<!DOCTYPE HTML>
<html>
<head>
<scrip...
The error message is the title since no error message is specified. A more fully defined validation check would look like this:
$('#my-form').validate({
errorElement: "p",
...
Created by James on November 27, 2011 16:02:11
Last update: November 27, 2011 16:02:11
This is an example that uses the XSLTProcessor jQuery plugin for client side XSLT. Unfortunately it didn't work in IE or Chrome. It worked in Firefox but somehow disable-output-escaping="yes" was ignored.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/...
Created by nogeek on November 27, 2011 12:24:27
Last update: November 27, 2011 12:24:27
There is no XSLT 2.0 support in the JDK as of 7.0. According to Stackoverflow , there are three Java packages that support XSLT 2.0: Saxon IBM WebSphere XML Feature Pack Oracle XDK There are no known support for XSLT in browsers. According to Wikipedia : XSLT is developed by the World Wide Web Consortium (W3C). The most recent version is XSLT 2.0, which reached W3C recommendation status on 23 January 2007. As of 2010, however, XSLT 1.0 is still widely used, as there are no products that support XSLT 2.0 running in the browser, nor on some important server environments such as LAMP. Expressions like this:
format-date(xs:date('1999-12-31'), '[D01] [MNn] ... where format-date is a XSLT 2.0 function and date is a XPath 2.0 constructor...
Created by James on September 23, 2010 20:30:55
Last update: November 16, 2011 14:51:23
jQuery button set where one button can be pressed "down" at a time.
<!DOCTYPE html>
<html>
<head>
<title>jQu...
Created by James on January 10, 2011 12:35:53
Last update: November 04, 2011 19:28:03
The events mouseover and mouseout are fired when the mouse enters/leaves the element where the event handlers are registered, and any nested elements which do not handle these events (because of event bubbling ). The events mouseenter and mouseleave are fired only when the mouse enters/leaves the specified element. Nested elements do not come into play. This following is a test page. You need Firebug to view the console output. Or use the JavaScript Executor bookmarklet. If none of these are available, an alert will popup (but you won't be able to fully test with alert.).
<!DOCTYPE HTML> <html> <head> <title>jQu... For the above test page, when you move the mouse through both the outer and inner areas of the mouseover/mouseout rectangle, the output is...
Created by Fang on November 02, 2011 16:40:10
Last update: November 02, 2011 16:40:10
Facelet taglib schema from JavaServer Faces Spec 2.0:
<xsd:schema targetNamespace="http://java.sun.com/x...
Created by jinx on May 18, 2011 20:09:05
Last update: May 18, 2011 20:09:05
The PHP function file_get_contents reads the entire contents of a file into a string, while the function file reads a file into an array.
file_get_contents('filename') is equivalent to implode('', file('filename')) :
<?php
// reads entire file into array, one elem...