Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@fra3il
fra3il / 1288336860.py
Created March 9, 2015 12:54
[Blog] latin1? utf8? - 2
import MySQLdb
conn = MySQLdb.connect(host='localhost', user='root', passwd='', db='test')
cu = conn.cursor()
cu.execute("set names utf8")
@fra3il
fra3il / 1288331340.py
Created March 9, 2015 23:36
[Blog] INSERT INTO ? VALUE ?
#!/usr/bin/env python
#coding=utf8
import MySQLdb
conn = MySQLdb.connect(host='localhost', user='root', passwd='', db='test')
cu = conn.cursor()
text = "문자열"
print(text)
@fra3il
fra3il / 1290660300_1.m
Last active August 29, 2015 14:16
[Blog] NSStringFromClass, NSClassFromString #1
NSLog(@"%@", NSStringFromClass([viewController class]));
@fra3il
fra3il / 1290660300_2.m
Created March 10, 2015 00:35
[Blog] NSStringFromClass, NSClassFromString #2
Class cls = NSClassFromString(@"UILocalNotification");
@fra3il
fra3il / 1293067440.m
Created March 10, 2015 00:49
[Blog] 사용자 폰트 추가
[_lbl setFont:[UIFont fontWithName:@"JPhonetic" size:20]];
@fra3il
fra3il / 27_0.m
Last active August 29, 2015 14:16
[WP] DLog
#ifdef DEBUG
#define DLog(fmt, ...) NSLog((@"%s[Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
#define DLog(...)
#endif