SSamTure.net

워드프레스

How to install and configure Sphinx in Ubuntu 9.10 with MySQL support

Description: “Sphinx is a full-text search engine, distributed under GPL version 2. Commercial license is also available for embedded use. Generally, it’s a standalone search engine, meant to provide fast, size-efficient and relevant fulltext search functions to other applications. Sphinx was specially designed to integrate well with SQL databases and scripting languages. Currently built-in data […]

Read-only file system error 발생시

서버를 재부팅 한 후 다음의 에러를 발생하며 apache 실행이 안되었고, 파일을 새로 쓰려고 해도 Read-only file system라고 계속 나오더군요. ssamture@testserver:/var/log/apache2# sudo /etc/init.d/apache2 start * Starting web server apache2 (30)Read-only file system: apache2: could not open error log file /var/log/apache2/error.log. Unable to open logs …fail! 다음을 통해 파일 시스템 권한을 확인 해보니 권한이 ro로 되어 있었고, […]

[Ubuntu] NFS error

mount 할 때 다음과 같이 에러메시지가 나오면 mount.nfs: rpc.statd is not running but is required for remote locking. mount.nfs: Either use ‘-o nolock’ to keep locks local, or start statd. protmapper 재 실행 sudo /etc/init.d/portmap restart

아파치 최대접속자 수 계산

아파치 프로세스당 물리적 메모리 사용량을 확인한다. cat /proc/PID/status 에서 VmHWM의 평균을 확인 하고 (전체 메모리 용량 – 서버 기본 사용 용량) / 아파치 프로세스 메모리 사용량 평균

Ubuntu Apache Tuning

출처 : http://www.mistcat.com/ So I recently needed to do a little quick performance tuning at work on one of our ubuntu server installs.  I’ve been using some of the wisdom found here to refresh myself on the basics, and I wrote a quick little one line awk script to give me the total amount of […]

[iPhone]scrollView position 선택

CGFloat position =  320.0f; [scrollView setContentOffset:CGPointMake(position, 0.0f) animated:YES];

[Android] WebView에 플레이어 연결

Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(url), “video/mp4″); view.getContext().startActivity(intent); return true;

[iPhone]다른 클래스 멤버 접근 예)

FirstViewController *firstView = [appDelegate.tabBarController.viewControllers objectAtIndex:0];

HTML DTD

HTML 2.0 표준 문서 형식 <!DOCTYPE html PUBLIC “-//IETF//DTD HTML 2.0//EN”>  HTML 3.2 표준 문서 형식 <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 Final//EN”>  HTML 4.01 표준 문서 형식[Strict, Transitional, Frameset 순] <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Frameset//EN” “http://www.w3.org/TR/html4/frameset.dtd”> XHTML […]

[objective-c]timestamp 관련

NSTimeInterval timeStamp = 1282093277; NSDate* date = [NSDate dateWithTimeIntervalSince1970:timeStamp]; NSLog(@”date=%@”, date); // date=2010-08-18 10:01:17 +0900

[objective-c]형 변환

int -> String int 정수형 = 3; NSString *스트링 = [NSString stringWithFormat:”%d”, 정수형]; String -> int int 정수형 = [스트링 intValue];

[objective-c]공백 제거

string = [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];

mencoder libfaac 에러 날때 참고

Adding the Repository The following bash command adds Medibuntu’s repository to Ubuntu. It also adds Medibuntu’s GPG key to your keyring, which is needed to authenticate the Medibuntu packages. This command should be run in the Terminal (Applications → Accessories → Terminal): sudo wget –output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get –quiet update && sudo apt-get […]

[정규식]element 안에 내용 가져오기

(.+?) 또는 ([sS]+?)

JS 터치이벤트

[이벤트] touchstart touchend touchmove touchcancel [프로퍼티] touches : 복수로 화면에 터치되는 각 손가락들에 대한 터치 이벤트 모음들. 이 객체들은 페이지에 터치되는 좌표의 값을 가지고 있음. targetTouches : 전체페이지가 아닌 타깃 요소만 [예제] window.addEventListener(‘load’,function(){    var b = document.getElementById(‘layer1′);    b.addEventListener(‘touchmove’,function(event){       alert(‘mousemove’); },false);