Thursday, February 9, 2012
Friday, January 6, 2012
java URLEncoder
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.net.URLCodec;
public static String encodeURL(String url) {
try {
return new URLCodec().encode(url);
} catch (EncoderException e) {
return null;
}
}
or
String inputEnc= URLEncoder.encode(input,"UTF-8"); // jakarta-commons/commons-codec.jar
import org.apache.commons.codec.net.URLCodec;
public static String encodeURL(String url) {
try {
return new URLCodec().encode(url);
} catch (EncoderException e) {
return null;
}
}
or
String inputEnc= URLEncoder.encode(input,"UTF-8"); // jakarta-commons/commons-codec.jar
Wednesday, January 4, 2012
disable caching for Java servlet
// Set standard HTTP/1.1 no-cache headers.
response.setHeader("Cache-Control", "private, no-store, no-cache, must-revalidate");
// Set standard HTTP/1.0 no-cache header.
response.setHeader("Pragma", "no-cache");
Friday, December 30, 2011
Debug Flex RSL in Intellij Idea
make sure to set -static-rsls="true"
ref:
http://youtrack.jetbrains.net/issue/AS-220
ref:
http://youtrack.jetbrains.net/issue/AS-220
Thursday, December 15, 2011
Tuesday, December 13, 2011
shortcut for intellij idea
Ctrl+F12 => quick method outline for current project
Ctrl+N => open class
Ctrl+Shift+N => open file
Ctrl+Alt+Shift+N => open symbol for whole workspace
Alt+F1 => then + 1 =>select file in Project
Ctrl+Y => delete the line at caret.
Ctrl+Alt+Left Arrow => previous cursor position
Ctrl+Alt+Right Arrow => next cursor position
Alt+Left Mouse Click => show object value of current mouse cursor when debug
Ctrl+F3 : find word at caret
Ctrl+Shift+[numeric+key]: set/remove bookmarkCtrl+Q : Quick Doc
Shift+Del: delete a lineCtrl+Shift+Arrows: switch position between 2 lines
Ctrl-} will move to the close bracket.
Ctrl-{ will move to the open bracket.
F11 : Toggle bookmark
Shift+F11 : bookmark view
Ctrl+N => open class
Ctrl+Shift+N => open file
Ctrl+Alt+Shift+N => open symbol for whole workspace
Alt+F1 => then + 1 =>select file in Project
Ctrl+Y => delete the line at caret.
Ctrl+Alt+Left Arrow => previous cursor position
Ctrl+Alt+Right Arrow => next cursor position
Alt+Left Mouse Click => show object value of current mouse cursor when debug
Ctrl+F3 : find word at caret
Ctrl+Shift+[numeric+key]: set/remove bookmarkCtrl+Q : Quick Doc
Shift+Del: delete a lineCtrl+Shift+Arrows: switch position between 2 lines
Ctrl-} will move to the close bracket.
Ctrl-{ will move to the open bracket.
F11 : Toggle bookmark
Shift+F11 : bookmark view
Thursday, November 10, 2011
Subscribe to:
Posts (Atom)

