Recent Notes

Displaying keyword search results 1 - 10
Created by Dr. Xi on April 15, 2014 12:03:45    Last update: April 15, 2014 12:03:45
To show the file type identified by vim for the file you are currently editing, type " :set filetype " in vim command. From vim Help, this is how vim identifies file type: Detail: The ":filetype on" command will load one o...
Created by James on February 03, 2014 14:38:30    Last update: February 03, 2014 14:38:30
IE 10 no longer support conditional comments like: <!--[if IE 8]> <p>Welcome to Internet Explorer ... So other hacks are necessary when you want to target specific CSS to IE10 or IE11. The following hack was confirmed to work for IE10 & IE11: <style type="text/css"> { displa... Links: Moving IE specific CSS into @media blocks IE 10 Specific Styles
Created by Fang on December 30, 2013 14:40:40    Last update: December 30, 2013 14:42:17
Sample code to return an image as a byte array, with @ResponseBody annotation. Content type is controlled by the produces attribute. Calling HttpServletResponse.setContentType has no effect. // import; //...
Created by James on November 09, 2013 20:54:03    Last update: November 09, 2013 20:54:03
This page draws an interactive parabola on HTML5 Canvas. <!DOCTYPE HTML> <html> <head> <...
Created by James on October 16, 2013 09:14:24    Last update: October 16, 2013 09:14:24
The initial attempt was to compile the bunch of LESS files with: lessc less/* But then I got errors like: NameError: variable @line-height-computed is undef... The order of LESS files listed is important. Variables are defined in variables.less , so it should be listed first. For Bootstrap, the ordering is defined in bootstrap.less . So all you have to do is ( this is the right way ): lessc bootstrap.less bootstrap-compiled.css Just for the reference, this is the content of bpptstrap.css : /*! * Bootstrap v3.0.0 * * Copyright 2...
Created by voodoo on July 09, 2010 21:24:22    Last update: October 13, 2013 09:29:08
To resolve the error: [focus@bamboo ~]$ psql -U postgres -W Password ... Edit /var/lib/pgsql/data/pg_hba.conf , change ident to trust , then restart postgres: # TYPE DATABASE USER CIDR-ADDRESS ... Update: For version 9.1 on Ubuntu, the file is /etc/postgresql/9.1/main/pg_hba.conf , trust is changed to md5 .
Created by Dr. Xi on September 23, 2013 09:00:22    Last update: September 23, 2013 09:17:55
Tsung is an open-source multi-protocol distributed load testing tool. It's written in Erlang , but don't let that dissuade you. Here are some simple steps to get started. Install Tsung. On Ubuntu, this is simply: sudo apt-get install tsung . Create a config file ( tsung.xml ): <?xml version="1.0" encoding="UTF-8"?> <!DOCTYP... Beware of the dumptraffic attribute. You might want to set it to false for a real load test. Run the test: $ tsung -f tsung.xml start Starting Tsung "L... Generate the reports: $ cd /home/drxi/.tsung/log/20130923-1031 $ /usr... Open the report file in your browser: file:///home/drxi/.tsung/log/20130923-1031/report.html . For HTTPS testing change the server line to: <servers> <server host="" port="...
Created by freyo on September 22, 2013 08:07:46    Last update: September 22, 2013 08:07:46
From Android developer site: If you're developing on Windows , you need to install a USB drive r for adb. If you're developing on Mac OS X , it just works . Skip this step. If you're developing on Ubuntu Linux , you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs for Ubuntu, see USB Vendor IDs on the Android developer site . For an installation guide and links to OEM drivers on Windows, see the OEM USB Drivers document on the Android developer
Created by Dr. Xi on September 18, 2013 19:54:58    Last update: September 18, 2013 19:54:58
You can define a JDBC datasource in $CATALINA_BASE/conf/server.xml under <GlobalNamingResources> like this: <GlobalNamingResources> <Resource name="jd... But you will not be able to lookup the datasource in your webapp, unless you define a link in your per-web-application JNDI context (for example, META-INF/context.xml ): <?xml version="1.0"?> <Context> <Resourc... By tomcat documentation : The GlobalNamingResources element defines the global JNDI resources for the Server. These resources are listed in the server's global JNDI resource context. This context is distinct from the per-web-application JNDI contexts described in the JNDI Resources HOW-TO . The resources defined in this element are not visible in the per-web-application contexts unless you explicitly link them with <ResourceLink> elements.
Created by Dr. Xi on March 22, 2013 12:18:39    Last update: March 22, 2013 12:18:39
This is a step-by-step guide to create a "contract-first" web service with Apache CXF. It's a lot easier than doing the same thing with Spring-WS. The project uses standard Maven directory layout. Define the data types ( src/main/resources/hello.xsd ): <xs:schema xmlns:xs=" Define the service ( src/main/resources/hello.wsdl ): <?xml version='1.1' encoding='UTF-8'?> <wsdl:de... Create pom.xml : <project xmlns=" Generate jaxb bindings: $ mvn generate-sources Code the web service ( src/main/java/com/example/cxfdemo/ ): package com.example.cxfdemo; import javax.j... Declare the CXF servlet in web.xml ( src/main/webapp/WEB-INF/web.xml ): <?xml version="1.0" encoding="UTF-8"?> <web-app... Wire up the web service implementation ( src/main/webapp/WEB-INF/cxf-servlet.xml ): <?xml version="1.0" encoding="UTF-8"?> <beans x... Build the WAR: $ mvn clean package After the webapp is deployed (Tomcat running on port 8080), the web service (WSDL) is available via...
Previous  1 2 3 4 5 6 7 8 9 10 Next