builtin set bash 스크립트에서 set 명령어 뒤에 오는 다양한 옵션들이 존재한다. setset [--abefhkmnptuvxBCEHPT] [-o option-name] [argument …] set [+abefhkmnptuvxBCEHPT] [+o option-name] [argument …] 예를 들어 set -x 를 하면 Print a trace of simple commands, for commands, case commands, select commands, and arithmetic for commands and their arguments or associated word lists after they are expanded and before they are executed. The value of t.. Passion/bash 2017.01.03
M개 element에서 N개를 고르는 방법 (recursion) #include int arr[10];void dfs(int n, int r, int sz) {for (int i = n; i >= r; i--) {arr[r - 1] = i-1;if (r > 1) {dfs(i - 1, r - 1, sz);}else {for (int i = 0; i < sz; i++) {printf("%d ", arr[i]);}printf("\n");}}}int main(){dfs(6, 4, 4);return 0;}https://helloacm.com/cc-coding-exercise-recursive-combination-algorithm-implementation/ Passion/Algorithm 2016.10.28
python egg cache http://stackoverflow.com/questions/2192323/what-is-the-python-egg-cache-python-egg-cache Passion/My Idea 2016.05.27
array loop var array = ['a', 'b', 'c']; for (var i in array) { alert(array[i]); } Passion/javascript 2016.05.26
jquery url parsing $(function(){ $.url.attr('protocol') // --> Protocol: "http" $.url.attr('path') // --> host: "www.example.com" $.url.attr('query') // --> path: "/correct/" $.url.attr('message') // --> query: "done" $.url.attr('year') // --> query: "1990" Passion/javascript 2016.05.26
bootstrap tag input https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/ $("input").val()"Amsterdam,Washington,Sydney,Beijing,Cairo"$("input").tagsinput('items')["Amsterdam","Washington","Sydney","Beijing","Cairo"] Passion/javascript 2016.05.26
bpmn-js url viewer URL을 기반으로 bpmn 을 열기https://github.com/bpmn-io/bpmn-js-examples/tree/master/url-viewer 노드에 색칠하기https://github.com/bpmn-io/bpmn-js-examples/tree/master/colors css 에 highlight 추가.highlight:not(.djs-connection) .djs-visual > :nth-child(1) { fill: green !important; /* color elements as green */ } 특정 task 에 highlight를 추가함viewer.importXML(diagramXML, function() { var canvas = viewer.get('canvas'); canv.. Passion/javascript 2016.05.23