이 설정은 엘련 개인의 설정이며 이 설정을 누구든지 사용해도 좋으나, 이 설정을 사용함으로서 생기는 문제에 대해선 책임지지 않습니다.
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
def guess_encoding(text): | |
guess_list = ['euc-kr', 'utf-8', 'utf-16'] | |
for best_enc in guess_list: | |
try: | |
str(text, best_enc, "strict") | |
except UnicodeDecodeError: | |
pass | |
else: | |
break | |
return best_enc |
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
<?php | |
$descriptorspec = array( | |
0 => array("pipe", "r"), // stdin 스트림 | |
1 => array("pipe", "w"), // stdout 스트림 | |
2 => array("file", "/tmp/error-output.txt", "a") // stderr 스트림 -> 파일로 씀 | |
); | |
$cwd = '/tmp'; // 실행할 디렉터리 | |
// $env = array('some_option' => 'aeiou'); // 변수 설정 |
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
std::wstring utf8_to_utf16(const std::string& utf8) | |
{ | |
std::vector<unsigned long> unicode; | |
size_t i = 0; | |
while (i < utf8.size()) | |
{ | |
unsigned long uni; | |
size_t todo; | |
bool error = false; | |
unsigned char ch = utf8[i++]; |
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
# Mac | |
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/your/path/lib | |
# Linux | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your/path/lib |
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
#ifdef __APPLE__ | |
#include "CoreFoundation/CoreFoundation.h" | |
#endif | |
#include <iostream> | |
int main() { | |
#ifdef __APPLE__ | |
CFBundleRef mainBundle = CFBundleGetMainBundle(); | |
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle); |
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
@charset "utf-8"; | |
@import url(http://fonts.googleapis.com/earlyaccess/nanumgothic.css); | |
* | |
{ | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} |
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
set cindent | |
set tabstop=4 | |
set shiftwidth=4 | |
set nu | |
set ruler | |
set title | |
set hlsearch | |
syntax on |
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 lang="ko"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="description" content="My Description"> | |
<meta http-equiv="imagetoolbar" content="no"> | |
<meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1"> | |
<meta name="viewport" content="user-scalable=no, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, width=device-width" /> | |
<title>Title</title> | |
<link rel="stylesheet" type="text/css" href="/css/common.css"> |
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
Scanner scan = new Scanner(System.in); | |
// Desktop 지원 여부 체크 | |
if(Desktop.isDesktopSupported()) | |
{ | |
Desktop.getDesktop().browse(new URI( | |
"http://search.naver.com/search.naver?where=nexearch&query=" + | |
URLEncoder.encode(scan.next(), "UTF-8") + // URL 인코딩 | |
"&sm=top_hty&fbm=2&ie=utf8")); | |
} |