* 프레임워크 의존도가 없다* 초단위(cron), 특정시간(at), 주기적인(interval) 작업수행 가능* @sched.scheduled_job('cron', day_of_week='fri'.... 으로 선언하여 사용 * 설치-> pip install apscheduler * 예제import loggingfrom apscheduler.schedulers.blocking import BlockingScheduler sched = BlockingScheduler() def todo_action():# TODO ACTTIONprint "TODO this !!" # 금요일 9시 22분에 실행@sched.scheduled_job('cron', day_of_week='fri', hour=9, minute=22)..
I. Singleton 이란?아마 GOF의 32가지 패턴 중 가장 쉬우면서도 가장 자주 쓰이게 되며, 가장 문제가 될 소지를 가지는 패턴을 말하면 Singleton을 말할 수 있지 않을까 합니다.먼저 Singleton 패턴의 용도는 하나의 프로그램 내에서 하나의 인스턴스만을 생성해야만 하는 상황. 예를 들어 환경설정을 관리하는 클래스나 Connection Pool, Thread Pool과 같이 풀(Pool) 형태로 관리되는 클래스의 경우 프로그램 내에서 단 하나의 인스턴스로 관리되는 것이 일반적이며, 이 때 Singleton 패턴을 적용하는 것이 일반적인 경우라고 볼수 있겠습니다. 그럼 세부적인 구현 형태를 살펴 보도록 하겠습니다.II. Singleton 구현Singleton 패턴의 가장 일반적인 형태는..
[참고할 사이트] http://www.adminschoice.com/docs/crontab.htm crond 데몬 /etc/rec.d/init.d/crond 스크립트에 의해 시작, 종료,재시작될 수 있다기본 명령의 위치 :/user/bin/crontab =>아무곳에서도 실행 가능 함 등록,수정, 보기 사용형식crontab [ -u 사용자 id] 파일crontab [-u 사용자 id] { -l | -r | -e} crontab -l : 예약된 작업리스트crontab -e : 예약된 작업 수정crontab -r : 예약된 작업 삭제 crond 실행 확인=> ps -ef | grep crond crond 시작=> /etc/rc.d/init.d/crond start{restart | stop} 일반사용자에게 c..
image_list.txt : file_name_1 file_name_2 file_name_3 image url : http://www.test.com/download/image/file_name_1.jpg http://www.test.com/download/image/file_name_2.jpg http://www.test.com/download/image/file_name_3.jpg def getImageList(): image_list_files = open('c:/image_list.txt', 'r') total_lines = image_list_files.readlines() for image in total_lines: if image != '': # 엔터가 붙어있기에 치환해준다. image_..
function replaceAll(strTemp, strValue1, strValue2){ while(1){ if( strTemp.indexOf(strValue1) != -1 ) strTemp = strTemp.replace(strValue1, strValue2); else break; } return strTemp; } 유니코드 -> 한글 : unescape(replaceAll(str, "\\", "%"));한글 -> 유니코드 : escape(replaceAll(str, "\\", "%"));
Map = function(){ this.map = new Object(); }; Map.prototype = { put : function(key, value){ this.map[key] = value; }, get : function(key){ return this.map[key]; }, containsKey : function(key){ return key in this.map; }, containsValue : function(value){ for(var prop in this.map){ if(this.map[prop] == value) return true; } return false; }, isEmpty : function(key){ return (this.size() == 0); }, cle..
IE 에서 정상 작동그 외 브라우저에서는 input 과 함께 안내메시지 노출
* Shufflevar intList = [ 10, 20, 30, 40, 50 ];// shuffle var array_shuffle = function(arr) { for(var j, x, i = arr.length; i; j = Math.floor(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x); return arr; };array_shuffle(intList);for(var i in intList) { alert(intList[i]); }-> 10, 30, 20, 50, 40 * 초기화var arrayList = new Array();arrayList.push("a");arrayList.push("b");arrayList.push("c..
var query = url.split('?')[1].split('&'); var params = {};for (var p in query) { var kv = query[p].split('='); params[kv[0]] = kv[1]; } $.ajax({ url: callUrl, type: 'GET', data: params, success: function(data) { console.log('success'); }, error: function() { console.log('error'); } });
jQuery cookie(쿠키) 사용 // 경로 1. 세션 쿠키 - 세션 쿠키는 브라우저가 열려 있는 동안만 유지 $.cookie('key' , 'value'); 2. 만료일 지정 쿠키 $.cookie('key' , 'value', { expires : 값 }); - expires 단위는 일(日) 3. path 지정 - 별도의 path 지정을 하지 않으면 쿠키가 만들어진 페이지 경로에만 적용되므로 모든 페이지를 원할지 아래와 같이 path:'/' 설정 $.cookie('key' , 'value', { expires : 값, path : '/' }); $.cookie('key' , 'value', { path : '/' }); 4. 쿠키 읽기 - 해당 key가 없다면 null 반환 $.cookie('key..
- Total
- Today
- Yesterday
- 칼라마
- 후마리
- calama
- 볼리비아
- 마추피추
- Cusco
- 빅토리아폴스
- 애드센스
- Namibia
- aguas calientes
- 킹덤 호텔
- 남미
- 칠레
- jQuery
- 쿠스코
- 햄버거
- 족발
- 우유니
- 캄보디아
- 아구아스 칼리엔테스
- 성계 투어
- 빈트후크
- 성스러운 계곡
- 푸에르토 나탈레스
- Oracle
- Cambodia
- 나미비아
- 남미 저가항공
- Uyuni
- 토레스 델 파이네
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |