php inline captcha PHP를 이용해서 손쉽게 인라인 captcha image 를 만들수 있다.ref : http://99webtools.com/blog/php-simple-captcha-script/ First generate captcha imageHere is php code to generate image with random code. Save it as captcha.php1234567891011121314 프로그램/script 2015.12.07
Useful javascript regular expression 유용한 Javascript RegExref : http://ntt.cc/2008/05/10/over-10-useful-javascript-regular-expression-functions-to-improve-your-web-applications-efficiency.html 1// Check if string is non-blank2var isNonblank_re = /\S/;3function isNonblank (s) {4 return String (s).search (isNonblank_re) != -15} 1// Check if string is a whole number(digits only).2var isWhole_re = /^\s*\d+\s*$/;3function isWhole (s) {4 .. 프로그램/script 2015.12.05
SED를 이용한 파일내 문자열 일괄 변환 텍스트파일을 다루거나, 개발자라면 자주 만나는 작업입니다.sed 를 이용하여 한방에...ref : http://unix.stackexchange.com/questions/159367/using-sed-to-find-and-replaceref : http://www.brunolinux.com/02-The_Terminal/Find_and%20Replace_with_Sed.html replace string in the file : by SED (Stream EDitor) A512.html 안의 모든 411 문자열을 512 로 바꾼다. (1회 수행하려면 g 를 제외)ex) sed -i -e 's/411/512/g' ./A512.html find 를 이용한 확장 사용 (다중 파일처리)$ find /home/da.. 편하게 살자 2015.12.04
nodejs express : json post example nodejs express : json post example in server-code : router.post('/demo/api', function(req, res, next) { req.accepts('application/json'); // input message handling var json = req.body; logger.info('name is :'+json.name); logger.info('address is :'+json.address); // output message res.json({result:'success'});}); TEST 프로그램/node 2015.11.30
use maven local jar , mvn install:install-file use maven local jar :ref : http://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-in-maven-projectkeyword : mvn install:install-fileexample) mvn install:install-file -Dfile=json_simple-1.1.jar -DgroupId=local.mulder -DartifactId=json_simple -Dversion=1.1 -Dpackaging=jar -DgeneratePom=truemvn install:install-file -Dfile=javapns-jdk16-162.jar -DgroupId=local.mulder -DartifactId=java.. 프로그램/spring 2015.11.28
open app example in macos in terminal open -a "Google Chrome.app" http://www.google.com 편하게 살자 2015.11.27
Javascript Typeof ref: http://www.w3schools.com/jsref/jsref_operators.asp typeof "John" // Returns string typeof 3.14 // Returns number typeof NaN // Returns number typeof false // Returns boolean typeof [1, 2, 3, 4] // Returns object typeof {name:'John', age:34} // Returns object typeof new Date() // Returns object typeof function () {} // Returns function typeof myCar // Returns undefined (if myCar is not decla.. 프로그램/script 2015.11.25
bash while loop example ref : http://www.cyberciti.biz/faq/bash-while-loop/bash while loop#!/bin/bash x=1 while [ $x -le 5 ] do echo "Welcome $x times" x=$(( $x + 1 )) done unix 2015.11.25
async.js waterfall 사용방법 ajax 콜을 여러번 시리얼하게 요청 하고자 한다면... 아래의 async waterfall 을 사용하길 추천 합니다... Project : https://github.com/caolan/async Guide: http://hatemogi.com/holiday-project-day-10/waterfall(tasks, [callback])Runs the tasks array of functions in series, each passing their results to the next in the array. However, if any of the tasks pass an error to their own callback, the next function is not executed, and the ma.. 프로그램/script 2015.11.24
cordova upgrade - with upgrade nodejs HWOTO : Apache Cordova Upgrade : mulder@~/Project$ cordova -v {현재버전보기}5.1.1mulder@~/Project$ sudo n v0.12.7 {nodejs 업그레이드} install : node-v0.12.7 mkdir : /usr/local/n/versions/node/0.12.7 fetch : https://nodejs.org/dist/v0.12.7/node-v0.12.7-darwin-x64.tar.gz installed : v0.12.7mulder@~/Project$ sudo npm update -g cordova {upgrade cordova} mulder@~/Project$ cordova -v5.4.0mulder@~/Project$ mulder.. 프로그램/hybrid app 2015.11.17