This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
This script will delete all of the tweets in the specified account. | |
You may need to hit the "more" button on the bottom of your twitter profile | |
page every now and then as the script runs, this is due to a bug in twitter. | |
You will need to get a consumer key and consumer secret token to use this | |
script, you can do so by registering a twitter application at https://dev.twitter.com/apps | |
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: UTF-8 -*- | |
__author__ = 'cinos81' | |
import threading | |
import time | |
#함수를 쓰레드로 만들 때의 공유자원을 가정한 변수 | |
globalResource = 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by cinos81 on 2014. 6. 24.. | |
*/ | |
var paramFromQryStr = function(url){ | |
/* | |
* 첫번째 정규식 | |
* . : 모든 글자로부터 | |
* + : 1개 이상의 글자를 | |
* ? : ? 를 만날 때까지 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'cinos81' | |
if __name__ == '__main__': | |
testList = [{'a': 1, 'b': 2}, {'a': 'a', 'b': 'b'}] | |
print testList | |
subsetList = [{key: value for key,value in record.items() if key == 'a'} for record in testList] | |
print subsetList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//클래스명을 통해 접근 가능. | |
ClassName.class.getResource("").getPath(); | |
//클래스 인스턴스 내에서 다음처럼 접근하는 것 또한 가능 | |
this.getClass().getResource("").getPath(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by cinos81 on 2014. 10. 4.. | |
*/ | |
var express = require('express'); | |
var app = express(); | |
app.get('/', function(req, res){ | |
res.sendfile('index.html'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script src="jquery-ui-1.11.1.custom/external/jquery/jquery.js"></script> | |
<script src="jquery-ui-1.11.1.custom/jquery-ui.js"></script> | |
<script> | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
폼을 초기 로딩상태로 회복시키는 방법은 2가지 방법이 있음. | |
1. 자바스크립트로 programatic하게 form 자체의 dom메소드를 활용하는 방법 | |
$('#reset')[0].reset(); | |
2. DOM에 선언 reset type의 input 태그를 선언하는 방법 | |
<input id="reset" type="reset" value="리셋" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// includes bindings for fetching/fetched | |
var PaginatedCollection = Backbone.Collection.extend({ | |
initialize: function() { | |
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
typeof(options) != 'undefined' || (options = {}); | |
this.page = 1; | |
typeof(this.perPage) != 'undefined' || (this.perPage = 10); | |
}, | |
fetch: function(options) { |
OlderNewer