분류 전체보기 21

Configure One-to-One Relationship Code First / 1:1 테이블 릴레이션

// Code Sample Code first 1 : 1 relationship public class User { public int Id { get; set; } public string UserName { get; set; } public DateTime CreatedOnUtc { get; set; } public virtual UserProfile UserProfile { get; set; } } public class UserProfile { public int Id { get; set; } public int UserId { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public v..

RC헬기관련URL

1. 카본 프레임으로 부터 배선을 보호하기 아반트 오로라용(Avant 6" Rubber Edge Strip) http://www.helicafe.co.kr/shop/shopdetail.html?branduid=256667&xcode=036&mcode=002&scode=001&type=X&search=&sort=order 2. 고무 연료호스 http://www.electricrc.co.kr/src/products/products_detail.php?product_mst_id=HT-A138 3. HV 러더서보 http://www.infinity-hobby.com/main/product_info.php?cPath=50_48&products_id=7401 4. CCPM HV 서보 http://www.infini..

Life 2013.02.21

CentOS cpu 사용률

mpstat -P ALL 1 1 | grep Average yum install sysstat로 설치 -P ALL은 모든 cpu 출력 명령어 1 1에서 앞의 1은 갱신 주기(초) 뒤의 1은 출력 횟수 grep Average를 하는 이유는, 출력 횟수를 명시하면 마지막에 Average를 출력하는데, Average만 보기 위하여 써준다. %idle이 쉬고 있는 자원이기 때문에 사용률을 구할 때 100 - %idle을 하면 된다. 또는 split(문자열, " "); 로 쪼갠 후에 empty 는 제거하면 된다.

OS/CentOS 2013.01.03

표준 시간대별 시간 계산

시간대별 시간 계산 // 하나의 시간대를 여러 시간대로 바꾸려면?$dt = new DateTime('Dec-01-08 08:17:40 PST'); $dubai = new DateTimeZone('Asia/Dubai'); $dt->setTimezone($dubai); echo $dt->format('Y-m-d H:i:s GST') . "\r\n"; $sydney = new DateTimeZone('Australia/Sydney'); $dt->setTimezone($sydney); echo $dt->format('Y-m-d H:i:s EST') . "\r\n"; $kst = new DateTimeZone('KST'); $dt->setTimezone($kst); echo $dt->format('Y-m-d H:..

Programming/PHP 2012.10.08

Ubuntu 12.04 + nginx + php5-fpm 가상호스트 설정

루트 패스워드를 설정# sudo passwd root #apt-get update && apt-get upgrade 사용중인 서비스 확인# lsof -i 사용자용 계정 추가 # useradd -b /home -s /bin/bash -m -p 패스워드 사용자아이디# ls /home FTP 서비스를 위해서 vsftpd 설치 # apt-get install vsftpd# vi /etc/vsftpd.conf anonymous_enable=NOlocal_enable=YESwrite_enable=YESlocal_umask=022 chroot_local_user=YESchroot_list_enable=YESchroot_list_file=/etc/vsftpd.chroot_list # touch /etc/vsftpd.c..

OS/Ubuntu 2012.10.07

Ubuntu Server 무선랜 IP설정

노트북을 Ubuntu server 12.04로 설치하고 무선랜 설정을 다름과 같이 하였다. sudo vi /etc/network/interfaces 초기 설정 [DHCP]auto loiface lo inet loopback # The primary network interfaceauto eth1iface eth1 inet dhcp wpa-ssid {이름} wpa-psk {비밀번호} 고정 아이피로 변경# The loopback network interfaceauto loiface lo inet loopback # The primary network interfaceauto eth1iface eth1 inet static wpa-ssid {이름} wpa-psk {비밀번호}address 192.168.0.50..

OS/Ubuntu 2012.10.06