Recent Notes

Displaying keyword search results 1 - 10
Created by voodoo on February 02, 2013 12:29:56    Last update: February 02, 2013 12:29:56
I got this error while compiling ucspi-tcp . The solution was to move #include <errno.h> from error.c to error.h . The following also works: echo gcc -O2 -include /usr/include/errno.h > conf-... The reason was explained in http://cr.yp.to/docs/unixport.html#errno
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 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 Dr. Xi on June 06, 2009 18:31:44    Last update: June 25, 2012 12:37:35
You can use the system call from the os module to execute an external program: >>> import os >>> os.system(the_command_line_st... However, the path to the executable contains a space character, the system call treats the strings after the first space as arguments, causing an error. Python doc recommends the use of the subprocess module: The subprocess module provides more powerful facilities for spawning new processes and retrieving their results; using that module is preferable to using this function. For example, using wget to get the google home page: >>> from subprocess import Popen, PIPE >>> (out... or >>> import subprocess >>> subprocess.call(['cur...
Created by Dr. Xi on June 17, 2012 13:14:25    Last update: June 17, 2012 13:14:25
Link to official Java networking properties page: http://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html http.keepAlive (default: true) Indicates if keep alive (persistent) connections should be supported. Persistent connections improve performance by allowing the underlying socket connection be reused for multiple http requests. The default is true and thus persistent connections will be used with http 1.1 servers. Set to 'false' to disable the use of persistent connections. http.maxConnections (default: 5) If HTTP keep-alive is enabled, this value is the number of idle connections that will be simultaneously kept alive, per-destination.
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 Fang on March 30, 2012 15:04:04    Last update: March 30, 2012 15:04:04
Spring MVC 3.1 can send either JSON or HTML response on the same URL, depending on the type of response requested. With this mechanism, a page can be sent when directly requested from a link, but a JSON response can be sent in response to an AJAX request. This is the controller code: package com.example; import java.util.Map; ... In the above example, JSON response will be sent when the HTTP request contains header "Accept: application/json". HTML response will be sent then the header is "Accept: */*", or "Accept: text/html", or anything else. You can add a limitation that the HTML response does not produce "application/json". But then the question is which response will be sent when the HTTP header is "Accept: */*"? Both methods will...
Created by nogeek on March 13, 2012 11:53:49    Last update: March 13, 2012 11:53:49
A. To configure Apache httpd to proxy Tomcat using HTTP: Load Apache httpd modules ( httpd.conf ): LoadModule proxy_module /usr/lib/apache2/modules/m... Configure Apache httpd proxy: <VirtualHost *:80> ServerAdmin webmaster@my... Configure Tomcat HTTP connector with appropriate proxyName and proxyPort : <Connector port="8080" protocol="HTTP/1.1"... Note: context path must be the same for httpd and Tomcat. B. To configure Apache httpd to proxy Tomcat using AJP: Load Apache httpd modules ( httpd.conf ): LoadModule proxy_module /usr/lib/apache2/modules/m... Configure Apache httpd proxy: <VirtualHost *:80> ServerAdmin webmaster@my... Configure Tomcat AJP connector: <Connector port="8009" protocol="AJP/1.3" redirect... You can try this if context path must be changed between Tomcat and httpd: <VirtualHost *:80> ServerAdmin webmaster@my... But this may not work in case the servlet context path is written in the HTML content. ProxyPassReverse only...
Created by Dr. Xi on March 13, 2012 08:46:57    Last update: March 13, 2012 08:46:57
This trick sets HTML base to the root context path of the current webapp: The short version: <!DOCTYPE html> <%@ taglib uri="http://java.sun... The long version: <!DOCTYPE html> <%@ taglib uri="http://java.sun...
Created by venky on March 05, 2012 13:36:41    Last update: March 05, 2012 13:36:41
Thanks Dr.Xi, I was having a tough time changing the deployment context path of my web-app using the so-called context.xml file under /META-INF, it dint work (tomcat documentation at http://tomcat.apache.org/tomcat-6.0-doc/config/context.html , seemed pretty sure it would :() But I have one question, as changing server.xml is too instrusive for every web-app you build, is there any other way of pushing this configuration to one of the application specific files ? thanks, Venky
Previous  1 2 3 4 5 6 7 8 9 10 Next