[XCode] Unistall Xcode on OS X (XCode 제거하기)
If you ever need to completely remove Xcode due to application issues or future upgrades, you can run a single command from Terminal to remove it.
sudo /Developer/Library/uninstall-devtools --mode=all
Of course, /Developer
is dependant on where you installed Xcode to.
[XCode] 단축키 PDF 버전
[JAVA][CLASS] ZipUtil.java - Compress Data and Decompress Data
import java.io.ByteArrayOutputStream;
import java.util.zip.Deflater;
import java.util.zip.Inflater;
public class ZipUtil {
public static final int BUF_SIZE = 1024;
public static ZipUtil instance = null;
private ZipUtil() {
}
public static ZipUtil getInstance() {
if (instance == null)
instance = new ZipUtil();
return instance;
}
public byte[] compress(byte[] input) {
if (input == null)
return null;
byte[] buf = new byte[BUF_SIZE];
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Deflater def = new Deflater();
def.setInput(input);
def.finish();
try {
while (!def.finished()) {
int count = def.deflate(buf);
baos.write(buf, 0, count);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
def.end();
}
return baos.toByteArray();
}
public byte[] decompress(byte[] input) {
if (input == null)
return null;
byte[] buf = new byte[BUF_SIZE];
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Inflater inf = new Inflater();
inf.setInput(input);
try {
while (true) {
int count = inf.inflate(buf);
if (count > 0) {
baos.write(buf, 0, count);
} else if (count == 0 && inf.finished()) {
break;
} else {
throw new RuntimeException();
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
inf.end();
}
return baos.toByteArray();
}
}
[OBJC] URL Encode
NSString * encodedString = (NSString *) CFURLCreateStringByAddingPercentEscapes (
NULL,
(CFStringRef)unencodedString,
NULL,
(CFStringRef)@"!*'();:@&=+$,/?%#[]",
kCFStringEncodingUTF8 );
참고로 Objective-C 에서 제공하는 stringByAddingPercentEscapesUsingEncoding 의 경우 "/", "=" 등이 encode 되지 않기 때문에 위의 방법을 사용하는 것이 안전합니다.
관련 정보는 http://choizak.tistory.com/69 에서 퍼왔습니다.
[MySQL] Copy a table with CREATE TABLE LIKE
Create a copy of the table
Copying the data from the original table to the new table
Copying the data back again
original link http://www.electrictoolbox.com/copy-table-mysql-create-table-like/
Mac - itunes 한글깨짐 해결
대체로 OSX의 기본 언어 설정이 영어로 되어 있는 경우 이런 현상이 발생합니다.
따라서 itunes를 열기전에
"System Preferences" > "Language & Text" 를 열어서
"Language" 탭에 왼편에 있는 언어의 순서를 변경해 주어야 합니다.
한국어 를 끌어서 제일 위로 올려주시고,
itunes를 열고 작업을 하면 한글이 깨지지 않습니다.
작업이 완료된 후에는 언어 설정을 다시 영문으로 돌려놓으면 됩니다.
그럼..
[Linux][CentOS] DNS setup
nameserver 4.2.2.1
nameserver 4.2.2.2
[Linux] Sendmail Test
[Linux] Crontab
[Linux][Ubuntu] 설치후 기본 서버 세팅
ROOT password setup