Recent Notes
Displaying keyword search results 1 - 10
Created by Dr. Xi on March 21, 2013 19:47:46
Last update: March 22, 2013 12:30:27
It's normal practice to import types from an external xsd file in WSDL like this:
<wsdl:types> <xsd:schema xmlns:xsd="htt... When you use <dynamic-wsdl> and have Commons XMLSchema on the class path, Spring-WS inlines the xsd in the wsdl. But that doesn't happen when you use <static-wsdl> . You can define a SimpleXsdSchema bean to expose the xsd: <?xml version="1.0" encoding="UTF-8"?> <beans x... where the bean id "hello" should match the schemaLocation attribute in the WSDL (without the .xsd suffix). But note that the SimpleXsdSchema does not inline the xsd. It only makes the xsd available via an HTTP URL. Alternatively, you can simply put the xsd file under the content directory of the webapp (just link any CSS or JavaScript). Anyway, that's a lot of manual...
Created by James on January 16, 2013 19:57:11
Last update: January 16, 2013 19:59:26
This is handy for looking at compressed js files:
http://jsbeautifier.org/
works pretty well.
Created by James on November 01, 2012 13:51:42
Last update: November 01, 2012 13:51:42
One way to vertically center a line of text in a container div is to set line-height to be the same as the height of the container. But that requires specifying line-height in pixels. This technique avoids that.
<!doctype html>
<html>
<head>
<style typ...
Created by James on October 19, 2012 09:50:08
Last update: October 19, 2012 09:50:08
Use window.location.hash to get the page fragment identifier in the URL. For example, if the URL is:
http://www.mysite.com/#frag1
window.location.hash is " #frag1 ".
Created by James on September 18, 2012 12:14:13
Last update: September 18, 2012 20:28:46
This is an example of IIFE (Immediately Invoked Function Expression) from jQuery Plugins Authoring :
(function( $ ) {
$.fn.myPlugin = function() {...
Created by James on July 25, 2012 12:32:09
Last update: July 25, 2012 12:32:09
JavaScript (ECMAScript) does not support Unicode-aware character classes, for example, \p{L} or \p{Letter} . It does support \uFFFF for matching a single Unicode code point.
References:
Unicode Regular Expressions
Unicode Character Classes in ECMAScript Regular Expressions
Javascript + Unicode
Created by Captain on November 22, 2010 04:34:37
Last update: July 22, 2012 20:36:26
HDTV modeline example:
1920x1080 148.5 1920 2008 2052 2200 1080 1084 1088...
MythTV modeline database: http://www.mythtv.org/wiki/Modeline_Database
<!DOCTYPE html>
<html>
<head>
<style ...
Reference:
Custom Resolutions on Intel Graphics
Created by Fang on June 05, 2012 09:12:36
Last update: June 05, 2012 09:13:03
The apache.commons.lang package has a nice utility to escape strings for various language environments. Simply include the dependency in pom.xml :
<dependency>
<groupId>org.apache.commons</...
and use it:
// import org.apache.commons.lang3.StringEscapeUti...
Created by Dr. Xi on May 24, 2012 20:36:53
Last update: May 24, 2012 20:36:53
I have two sites: site1 and site2 . I want to render some content from site2 on site1 . The content is different depending on whether the user is logged in site2 . For example, display Login button when user is not logged in, My Account link when user is logged in. I can inject content into the page on site1 by including a JavaScript generated from site2 :
<script type="text/javascript" src="http://site2/c... This works because when the JavaScript is requested from site2 , the session cookie is sent along with the request, which is used by site2 to generate different content depending on the session status. However, for IE 9, this scheme breaks when site1 and site2 are in different security zones and IE protected...
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).