Recent Notes
Displaying keyword search results 1 - 10
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 Fang on October 31, 2011 21:10:10
Last update: October 31, 2011 21:13:10
In this example I'll add a parameter to a facelets template. The example contains three tabs, each tab points to a different page. The tab control is shared among all pages, therefore, it is put in the template.
Starting from the simple facelet example , make these additions:
Create a new template WEB-INF/templates/tabs.xhtml :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Stric...
Add a page for the about tab ( about.xhtml ):
<?xml version="1.0" encoding="UTF-8"?>
<ui:comp...
Add a page for the news tab ( news.xhtml ):
<?xml version="1.0" encoding="UTF-8"?>
<ui:comp...
Add a page for the partner tab ( partner.xhtml ):
<?xml version="1.0" encoding="UTF-8"?>
<ui:comp...
Build and re-deploy the application. Launch the browser and load page http://localhost:8080/facelet-demo/about.jsf .
This is a screenshot:
Created by Fang on October 30, 2011 20:35:17
Last update: October 30, 2011 20:37:03
This note lists some of the different behaviors I found using different JSF implementations. In the simple JSF facelet example, I used Sun's reference implementation version 2.0.0-RC:
<dependency> <groupId>javax.faces</gro... With this version, the DOCTYPE declaration is dropped when the page is rendered. It doesn't matter what DOCTYPE you declare in your templates, the facelet engine simply drops it. The problem with this is, your page is always displayed in quirks mode , despite your intentions to require standards compliant mode. The DOCTYPE problem is fixed in release 2.0.2-FCS . Change the dependency in pom.xml to: <dependency> <groupId>javax.faces</gro... and test again, you'll find that DOCTYPE is faithfully passed over to the browser (view source at browser). You can delete the DOCTYPE declaration in the xhtml template...
Created by incognito on April 24, 2011 15:14:54
Last update: August 19, 2011 17:33:49
Buscador standard de Noticiero Digital Esto no es un bookmarklet, sino el buscador normal de ND colocado aquí por conveniencia PARA FIREFOX, GOOGLE CHROME, OPERA , SAFARI, etc. Noticiero Digital Buscar ND forista temas ND forista mensajes PARA INTERNET EXPLORER Noticiero Digital Buscar ND forista temas ND forista mensajes Para cualquier browser ( o casi) paginaForista Este bookmarklet es útil para listados de mensajes de foristas con numerosas páginas. En ese caso cuando se intenta pasar de la página 1 obtenemos un mensaje como el de la figura. El bookmarklet pregunta "Que pagina quiere ver ?" e inicia la búsqueda de los mensajes del forista en cuestión en la página deseada. Lo mejor es esperar entre cada búsqueda unos 3 minutos al menos ya que...
Created by James on May 19, 2011 16:02:40
Last update: May 19, 2011 16:05:05
Finally, MathJax makes showing math equations in the browser a reality! Here are some simple demos.
A simple example:
<!doctype html>
<html>
<head>
<title>Math...
Add HTML styling for Firefox:
<!doctype html>
<html>
<head>
<title>Math...
Created by freyo on May 05, 2011 11:26:18
Last update: May 05, 2011 11:26:18
A simplified list of intents for Google Applications :
Intent Action Intent Uri Target Application
VIEW http://web_address
https://web_address Browser
WEB_SEARCH http://web_address
https://web_address
"" (empty string) Browser
CALL tel:phone_number Dialer
DIAL tel:phone_number
voicemail: Dialer
VIEW geo:latitude,longitude
geo:latitude,longitude?z=zoom
geo:0,0?q=my+street+address
geo:0,0?q=business+near+city
Google Maps
VIEW google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom Google Streetview
Created by Dr. Xi on November 23, 2010 20:20:01
Last update: March 01, 2011 13:38:51
I tried to find a GZIP compression servlet filter to compress a large log file that we send down to the browser. Most of the implementations I found were overly complicated and many buggy. This is a simple implementation that worked for me. The filter:
package filter.demo; import java.io.*; i... Config web.xml : <filter> <filter-name>gzipFilter</filte... The ugly anonymous inner class could have been avoided if the servlet API did not insist on ServletResponse.getOutputStream returning the bogus ServletOutputStream class (instead of the plain OutputStream ). Additional Note: In an earlier version of this filter, the gzip headers were added in doFilter , like this: // This is NOT good! if (supportsGzip) { ... It turned out that the ServletResponse methods sendError bypasses the gzip...
Created by voodoo on February 02, 2011 14:28:52
Last update: February 02, 2011 14:30:27
The ProxyRemote directive forwards a request to a remote proxy when itself is acting as a proxy server (forward proxy). For example:
ProxyRemote http://www.somesite.com http://another...
forwards a request for http://www.somesite.com to another proxy server running at another-proxy.local:8080 .
ProxyRemote http http://http-proxy.remote.com
forwards all HTTP requests to the remote proxy http://http-proxy.remote.com .
It must be emphasized that ProxyRemote only functions when:
The Apache server is configured as a forward proxy, i.e., ProxyRequests On .
The user's browser is configured to use the Apache instance as a proxy server.
The second point above clearly differentiates ProxyRemote from ProxyPass , which is the directive to use for reverse proxy.
Created by Dr. Xi on August 27, 2008 19:40:19
Last update: January 14, 2011 09:33:20
There's a limit to the number of characters a bookmarklet can contain. Browser Max chars Netscape > 2000 Firefox > 2000 Opera > 2000 IE 4 2084 IE 5 2084 IE 6 508 IE 6 SP 2 488 IE 7 ~2084 IE 8 ~2200-2300 I tried it in the IE6 browser. The following code (573 characters) doesn't work as a bookmarklet. However, <a href="alert('Hi');">Short Bookmarklet</a> works. Actually, you don't have to save the link as a bookmark in order to test, just click the link, nothing happens if the length limit is exceeded.
<a href='javascript:alert("var c = document.create... If the bookmarklet code is too long, you can save the JavaScript code on a server and use this function to bring it back to the page:...
Created by James on September 07, 2010 03:11:39
Last update: January 11, 2011 20:28:33
I didn't know how hard it was to vertically align something to the middle until I had to do it. An excellent writeup about the various techniques (or should I say hacks?) to achieve this is here: http://blog.themeforest.net/tutorials/vertical-centering-with-css/ Here I present a technique with the help of jQuery. To make it simple, what I'm doing is to display a single line of text in the middle of the page instead of at the top. The markup is made simple because the logic is moved to JavaScript. There are two requirements to make this work: The parent container uses relative positioning jQuery code added to re-position the content with absolute positioning
<!doctype html> <html> <head> <title>Vert... For some reason, the following code did not work although...