Recent Notes
Displaying keyword search results 1 - 10
Created by Dr. Xi on March 08, 2013 11:40:49
Last update: March 08, 2013 11:40:49
From Version Control with Subversion, Chapter 4. Branching and Merging In Subversion, a global revision number N names a tree in the repository: it's the way the repository looked after the N th commit. It's also the name of an implicit changeset: if you compare tree N with tree N-1 , you can derive the exact patch that was committed. For this reason, it's easy to think of revision N as not just a tree, but a changeset as well. If you use an issue tracker to manage bugs, you can use the revision numbers to refer to particular patches that fix bugs—for example, “this issue was fixed by r9238.” Somebody can then run svn log -r 9238 to read about the exact changeset that...
Created by freyo on February 06, 2013 21:10:47
Last update: February 06, 2013 21:12:18
I have an old Samung phone to be used as a toy. After restoring back to factory image and power on, I was stuck at the activate service screen. Unfortunately, the four corner magic touch did not work. So I did quite a bit of digging and this is what worked on my Samsung Continuum: Press emergency call button, then at the dialer, press * # 8 3 7 8 6 6 3 3 , press the Home key From the home screen, tap phone icon, Dial * # 2 2 7 4 5 9 2 7 Enter SPC code: ______ displays tap in white box to show virtual keyboard, enter 6 digit code (default: 000000), tap OK Select “Hidden menu Enable”, tap OK From...
Created by magnum on October 22, 2012 20:03:05
Last update: October 22, 2012 20:03:05
First, the test command that sleeps random number of seconds ( sleeper.sh ):
#!/bin/bash
stime=$[$RANDOM % 20]
sleep $sti...
As comparison, synchronous pipe code:
#include <sys/wait.h>
#include <stdio.h>
#in...
Asynchronous pipe code:
#include <sys/wait.h>
#include <stdio.h>
#in...
Created by Dr. Xi on August 24, 2012 14:20:19
Last update: August 26, 2012 11:48:22
Converting hex number to decimal is surprisingly easy in Python:
$ python
Python 2.7.3 (default, Aug 1 2012, 05...
Created by voodoo on August 03, 2012 08:42:38
Last update: August 03, 2012 09:31:25
The C function getsockopt lets you get the error codes with the option SO_ERROR . The possible error numbers are defined in the global errno.h . The relevant values are:
#define ETIMEDOUT 110 /* Connection timed out */
...
But here's the whole list on my Linux system ( /usr/include/asm-generic/errno.h ):
#ifndef _ASM_GENERIC_ERRNO_H
#define _ASM_GENER...
Created by James on August 01, 2012 14:26:53
Last update: August 01, 2012 14:26:53
The jQuery size() function returns the number of elements in the jQuery object.
According to jQuery doc:
The .size() method is functionally equivalent to the .length property; however, the .length property is preferred because it does not have the overhead of a function call.
Created by Dr. Xi on February 23, 2012 14:07:40
Last update: June 25, 2012 13:40:44
The command " svn info " prints information about the current directory:
$ svn info Path: . URL: http://svn.example.c... where: Revision: is the last syncup (update) revision of the current TARGET (artifact/file/directory, whatever you call). This number bumps up to that of the current project revision number after you do an update. Last Changed Rev: is the revision number of the latest change for the current TARGET . If TARGET is a directory, it is the revision number of the latest change within the directory, including all subdirectories. However , this number is not accurate after you do a check in without a following update . The revision number for the file or directory you checked in will have higher revision number than its parent/ancestor....
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 March 30, 2012 12:15:49
Last update: March 30, 2012 12:15:49
1. mvc:default-servlet-handler Configures a handler for serving static resources by forwarding to the Servlet container's default Servlet. Use of this handler allows using a "/" mapping with the DispatcherServlet while still utilizing the Servlet container to serve static resources. HandlerMapping: org.springframework.web.servlet.handler.SimpleUrlHandlerMapping Handler: org.springframework.web.servlet.handler.SimpleUrlHandlerMapping Attribute Description default-servlet-name The name of the default Servlet to forward to for static resource requests. The handler will try to auto-detect the container's default Servlet at startup time using a list of known names. If the default Servlet cannot be detected because of using an unknown container or because it has been manually configured, the servlet name must be set explicitly. 2. mvc:view-controller Defines a simple Controller that selects a view to render the response. HandlerMapping: org.springframework.web.servlet.handler.SimpleUrlHandlerMapping Handler: org.springframework.web.servlet.mvc.ParameterizableViewController Attribute Description...
Created by Fang on February 29, 2012 15:11:22
Last update: February 29, 2012 15:11:22
There are two types of application contexts with Spring MVC: the root context created by ContextLoaderListener , and contexts associated with each DispatcherServlet . According to the Spring Javadoc :
A web application can define any number of DispatcherServlets. Each servlet will operate in its own namespace, loading its own application context with mappings, handlers, etc. Only the root application context as loaded by ContextLoaderListener, if any, will be shared.