- 博客(88)
- 收藏
- 关注
原创 bash two tips:tab completion igore-case and auto-correct mistyped dir name
in .bashrc #tab auto-completion ignore -casebind 'set completion-ignore-case on'#automatically correct mistyped directory names on cdshopt -s cdspell
2014-10-08 14:42:30
187
原创 Anatomy of a Subtle JSON Vulnerability
http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx/
2014-06-30 17:21:43
138
原创 css中clearfix的作用
一直不太明白bootstrap中.clearfix的作用,在这里发现了答案,http://css-tricks.com/all-about-floats/ .clearfix:before,.clearfix:after { display: table; content: " ";}.clearfix:after { clear: both;}...
2014-03-07 17:05:02
1186
原创 Centering: Negative Margin
http://www.bluerobot.com/web/css/center2.htmlCentering: Negative MarginThis box is horizontally centered using a technique proposed to me by Simon Coggins. First, the box's left edge is position...
2014-03-06 16:53:03
217
原创 How to be a Programmer: A Short,Comprehensive,and Personal Summary
well written.http://samizdat.mines.edu/howto/HowToBeAProgrammer.html?x
2013-10-28 10:38:12
185
原创 js module pattern
http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html
2013-10-12 16:21:22
197
原创 GZip compressing HTML, JavaScript, CSS etc. makes the data sent to the browser s
this is fun.http://tutorials.jenkov.com/java-servlets/gzip-servlet-filter.html GZip HTTP HeadersThe browser includes the Accept-Encoding HTTP header in requests sent to an HTTP server (e.g. a...
2013-07-31 15:48:13
146
原创 IE9 hide <tr> issue
It is incredibly weird. when trying to hide a <tr>, its children checkbox and label are not completed hidden.(in this case, checkbox is hidden,but its bounded label is not).Though I don't unders...
2013-04-25 17:42:46
137
原创 ECMA Script 5 browser compatiblity
http://kangax.github.com/es5-compat-table/
2013-02-05 10:21:44
122
原创 eclipse plugin update extremely slow
eclipse.ini +-Declipse.p2.mirrors=false
2012-11-16 15:38:17
136
原创 INSERT INTO SELECT(bulk insert)
http://www.sqlteam.com/article/using-select-to-insert-records INSERT INTO SELECT INSERT INTO Store_Information (store_name, Sales, Date)SELECT store_name, Sales, DateFROM Sales_Information...
2012-10-15 14:44:54
326
原创 java collection matrix
http://www.janeve.me/articles/which-java-collection-to-use
2012-08-07 11:24:02
115
IE cannot add a hidden input to an iframe. FF can.
var hidden = $('<input type="hidden" name="test" value="test"/>');$('#iframe').html(hidden);
2012-07-16 17:42:26
101
原创 Use CSS to center content
http://www.elated.com/articles/css-center-content/ CSS centering: The basic techniqueThe trick to centering an element with CSS is to give the element a left and right margin value of auto:...
2012-06-12 17:33:44
129
原创 float within a float
http://www.cssnewbie.com/css-float-property/<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://ww...
2012-05-22 23:15:32
148
原创 Liquid three column layout - all steps combined
http://css.maxdesign.com.au/floatutorial/tutorial0916.htm #container{width: 90%;margin: 10px auto;background-color: #fff;color: #333;border: 1px solid gray;line-height: 130%;}#...
2012-05-19 23:38:59
156
原创 rollover list
http://css.maxdesign.com.au/listamatic/vertical08.htmComments: Rollovers can be achieved by converting the a elements within the list to blocks using display: block; and swapping background colo...
2012-05-19 17:59:37
167
原创 Convert size in bytes to human readable format
http://codeaid.net/javascript/convert-size-in-bytes-to-human-readable-format-(javascript) function bytesToSize (bytes) { var sizes = ['Bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', ...
2012-05-10 21:38:25
182
原创 A Shell Script to do shell scripting faster
http://unix-school.blogspot.in/2011/08/shell-script-to-do-shell-scripting.html $ cat workon#!/usr/bin/bashif [ ! -f $1 ]; then echo "#!/usr/bin/bash" > $1fiwhile [ 1 ];do ...
2012-05-08 23:44:51
146
原创 $('option').hide() does not work in IE and chrome, FF works.
here's is a workaround in IE and chrome.The idea is to wrap the option with a <span> and hide that <span>. function optWrapper(opt){ var optSpan = undefined; if ($(opt).par...
2012-04-24 16:27:32
100
原创 textarea does not support 'autocomplete'
seems only <input type="xxx"> can support autocomplete.
2012-04-11 14:30:11
190
原创 ghost text (aka in-field text)
http://archive.plugins.jquery.com/project/overlabel
2012-04-01 11:18:02
144
ftp put
#!/bin/kshif [ $# -lt 3 ]then echo Usage: $0 hostname directory filename echo Note: make sure the machine,login,password has been existed in ${HOME}/.netrc. For example: echo ec...
2012-02-28 22:02:52
144
ftp get
#!/bin/kshif [ $# -lt 3 ]then echo Usage: $0 hostname directory filename echo Note: make sure the machine,login,password has existed in ${HOME}/.netrc. For example: echo ech...
2012-02-28 22:01:45
112
find class in which jar
#!/bin/ksh#this script is used to find class in which jar fileif [ "$#" -le "1" ]; then echo "Usage: $0 class_name jar_path_1 [jar_path2]...[jar_pathn]" exit 1fi#class to be foundCL...
2012-02-28 21:57:14
170
原创 use oncontextmenu to disable right click
<a href='#' oncontextmenu='return false;' onclick='blabla;'></a>
2012-01-11 14:10:48
111
原创 html listbox only posts selected items
Lessons learned:html listbox only posts selected items solution$(function () { $("form").submit(function (e) { $("#yourListBox...
2011-12-20 17:22:31
103
原创 jquery compatibility issue for attr()
As of jQuery 1.6, the .attr() method returns undefined for attributes that have not been set. Example: I want to select/unselect all item checkboxes by check/uncheck a single "selectAll" che...
2011-12-01 16:14:00
124
原创 early adopter
early adopter http://en.wikipedia.org/wiki/Early_adopter an early adopter or lighthouse customer is an early customer of a given company, product, or technology. Typically this wi...
2011-11-17 14:53:25
322
原创 linux command: dash as a operand
for exampe: mv -- -a.txt The -- delimit the option list. Later arguments, if any, are treated a operands even if they begin with - or --. This applies to all commands such as rm, cp, mv, ls, ln a...
2011-11-09 13:54:23
91
原创 <xsd:any> cannot be used in <xsd:all>
1. <xsd:any> cannot be used in <xsd:all>2. problems when <xsd:all> is used in <xsd:extension>
2011-09-21 14:04:46
141
原创 What is Optimistic Locking vs. Pessimistic Locking
What is Optimistic Locking vs. Pessimistic Lockingfrom http://www.dbasupport.com/forums/archive/index.php/t-7282.html These are methodologies used to handle multi-user issues. How does one h...
2011-09-09 16:50:25
249
原创 Eclipse conditional debug java
我承认我好傻,工作了那么多年竟然不知道eclipse有conditional debug这个功能。Eclipse->Help->Tips and Tracks
2011-08-26 16:51:50
137
原创 diff between padding and margin
http://blog.webassist.com/2010/01/the-difference-between-css-margins-and-padding/
2011-05-18 18:00:16
115
原创 what is DAO
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
2011-04-15 13:42:18
141
原创 @SmallTest @MediumTest and @LargeTest
@SmallTest @MediumTest and @LargeTest FeatureSmallMediumLargeNetwork accessNolocalhost onlyYesDatabaseNoYesYesFile system acce...
2011-04-14 13:58:37
377
原创 android junit does not support junit4 code style
only junit 3 is supported. Damn
2011-03-30 10:37:29
83
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人