- U+0000~U+007F (ASCII)
- U+AC00~U+D7A3 (가-힣)
- hex(ord('a')) -> '0x61'
- chr(int('0x61', 0)) -> 'a'
- hex(ord('가')) -> '0xac00'
- chr(int('0xac00', 0)) -> '가'
- U+AC00 != 0xEA B0 80
<?php | |
if (isset($_POST['text'])) { | |
$text = $_POST['text']; | |
$fo = fopen("./text.txt", "w") or die("can't open file"); | |
fwrite($fo, $text); | |
fclose($fo); | |
} | |
$fc = file_get_contents("./text.txt"); | |
?> | |
<!DOCTYPE html> |
cat example.txt | perl -e 'while($line=<>){$line=~s/print/say/gi;print $line;}' |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Centering</title> | |
<style type="text/css"> | |
html, body, #wrapper { | |
height:100%; | |
margin: 0; | |
padding: 0; | |
border: none; |
#!/usr/bin/env python | |
# coding: utf-8 | |
from __future__ import unicode_literals, print_function | |
import sys, zipfile, shutil, os, fileinput | |
def inflate(filename): | |
print(filename) | |
zfile = zipfile.ZipFile(filename) | |
for f in zfile.namelist(): |
A
로 그룹1는 테스트 B
로 지정하고 싶다고 가정하자.#!/usr/bin/env python | |
import csv | |
import json | |
import requests | |
def get_postcode(loc): | |
payload = {'q':loc} | |
res = requests.get('https://api.poesis.kr/post/search.php', params=payload) | |
result = res.json() |