시작...

블로그 이미지
mutjin

Article Category

분류 전체보기 (148)
기록 (3)
개발새발 (8)
2010년 이전 글 (133)

Recent Post

Recent Comment

Recent Trackback

Calendar

«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

Archive

My Link

  • Total
  • Today
  • Yesterday
  1. 2014.03.11
    태국 유심 사용하기
  2. 2013.07.26
    Table Join 1
  3. 2013.04.30
    과자봉지 접는법
  4. 2013.04.30
    필요 유틸 간단히 설치
  5. 2012.07.30
    db2 컬럼이름 바꾸기
  6. 2012.02.08
    서버 시간 동기화
  7. 2011.07.19
    getCurrentTime() 함수
  8. 2011.05.19
    GNS3 에 SSH 설정하기
  9. 2011.02.18
    postgreSQL 에서 oracle의 rowid 같은 값 이용하기
  10. 2010.04.26
    참조카운팅과 String

세븐일레븐 가서 truemoveH 유심 구입 후 충전 영수증도 구입

폰 끄고 유심 꽂고 켜서 통신 접속 되는지 확인
### (폰 끄기전에 데이터자동접속 설정은 끄고!!)

폰에 통신사 자동로밍 설정되어 있으면 왠만하면 연결됨.
일단 충전 먼저 해야하니
*123*(숫자14자리)# 입력 후 통화

전화하는거 같지만 메시지 창만 뜸

데이터 요금제(49바트짜리 1일 무제한) 등록
 - 아래 둘중 하나
*900*01# 으로 전화
*900*3302# 으로 전화

아직 데이터를 활성화 안해놔서 접속 안됨
## 폰에 따라서 될수도 있음

APN 활성화 하기 (아래 정보는 유심 구입하면 같이들어있는 설명서에 나와있음)
Name : true
Password : true
prompt password : no
MCC : 520
MNC : 04
Authentication : PAP
APN type : internet

데이터가 잘 안될 때
접속이 Truemove 가 있고 TruemoveH 가 있는데 H 붙은거에 접속을 해야 데이터 통신이 됨

한국으로 통화하기
1. *006*82#(010,02 등등에서 앞에 0 빼고 나머지 숫자)
2. *600*82#(010,02 등등에서 앞에 0 빼고 나머지 숫자)

잔액 조회하기
#123# 통화

and
 Inner Join

Join된 테이블에서 on조건에 해당하는 것만을 조회
Select BusinessEntityID, A.DepartmentID, Name, GroupName
From HumanResources.EmployeeDepartmentHistory As A Inner Join HumanResources.Department As B
On A.DepartmentID = B.DepartmentID
Order By DepartmentID

 

 Left Join

Left Outer Join은 두개 이상의 Table을 조인하여 Data를 조회하되 왼쪽(Left)에 있는 Table의 내용은 모두 가져옴.

On조건에 부합하는 것은 정상적으로 조회하고 조건에 부합하지 않는 경우에는 Null로 표시

Select A.BusinessEntityID, B.AddressID, B.AddressTypeID
From Person.Person As A Left Join Person.BusinessEntityAddress As B
On A.BusinessEntityID = B.BusinessEntityID
Order By BusinessEntityID

 

 Right Outer Join

Left Outer Join과 반대로 오른쪽에 조인된 Table을 기준으로 모든 Data를 가져옴

표시할 수 없는 값은 null
Select A.ProductID, A.StandardCost, B.Name
From Production.ProductCostHistory As A Right Outer Join Production.Product As B
On A.ProductID = B.ProductID

 

Full Outer Join

Full Outer Join은 간단히 말해 Left Outer Join과 Right Outer Join을 합한 것

양쪽 Table의 모든 Data를 다 가져옴. 표시할 수 없는 값은 null

Select ProductID, ProductDescriptionID, StandardCost, Description
From Production.ProductCostHistory Full Outer Join Production.ProductDescription
On ProductID = ProductDescriptionID

 

Cross Join

왼쪽 Table 한행당 오른쪽 Table전체를 그리고 다시 왼쪽 Table 한행당 오른쪽 Table 전체... 이런한 방법으로 Join된 결과를 표시

Select A.ProductID, A.Name, StartDate, EndDate, B.StandardCost
From Production.Product As A Cross Join Production.ProductCostHistory As B
Order By A.ProductID

 

Where 절을 이용한 Table Join

두개 이상의 Table을 Join하는데는 굳이 Join문을 이용하지 않고도 Where절을 이용하는 방법

Select ProductID, ProductDescriptionID, StandardCost, Description
From Production.ProductCostHistory, Production.ProductDescription
Where ProductID = ProductDescriptionID
and

 

좋은데?

and
and
and


rdate -p -s time.nuri.net
or
ntpdate time.nuri.net

하드웨어 시간 보기
hwclock -r
하드웨어 시간도 동기화 시키기
hwclock -w



다른 time server
time.bora.net

 

kiki.ktheme

 

iphone_kitty.ktheme

'기록' 카테고리의 다른 글

GNS3 에 SSH 설정하기  (0) 2011.05.19
and

이게 최선일지는 모르겠다.


string getCurrentTime()
{
 time_t curr;
 struct tm *t;
 char timeStr[128];
 curr=time(NULL);
  t=localtime(&curr);
 
  sprintf( timeStr, "%d-%02d-%02d %02d:%02d:%02d" , (t->tm_year +1900),(t->tm_mon + 1),t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec );
 
  return string(timeStr);
 }

'개발새발 > 기초' 카테고리의 다른 글

postgreSQL 에서 oracle의 rowid 같은 값 이용하기  (0) 2011.02.18
참조카운팅과 String  (0) 2010.04.26
메모리 지정 new(placement new)  (0) 2010.04.12
parameter & argument  (0) 2010.04.09
const 정리  (0) 2010.04.02
and

유투브 영상과
http://www.youtube.com/watch?v=YJIhk2gm2RA

관련 글
http://delfirosales.blogspot.com/2011/03/gns3-lab-configuracion-de-ssh-secure.html

요거 두개면 되는군..

첨부 파일은 3600 IOS 이미지.. 극한의 압축률로 압축했다.. 근데 원본크기네 제길 ㅋ

압축프로그램은 압축시대를 썼으니.. 안풀리면 그거 받아서 풀자.. 설마 안 풀리겠어?


'기록' 카테고리의 다른 글

서버 시간 동기화  (0) 2012.02.08
and
row 단위로 중복된 데이터를 가지는 테이블이 있어서.. 중복된 데이터만 골라내고 싶은 마음에 찾아봤다.
오라클의 rowid 처럼 postgreSQL에서도 oid, ctid 같은 시스템 컬럼이 존재한다.
근데 PostgreSQL 8.1 이상에서는 디폴트로 oid가 없다.
그래서 ctid 를 사용했다.
데이터가 좀 특이하다 duple 형식이라는데..
어짜피 한 테이블에서만 유니크한건 문제 없기 때문에 그냥 사용 했다.

select *, ctid from esm_rpt_tra_d where ctid = '(0,8)'



http://www.postgresql.org/docs/9.0/static/ddl-system-columns.html


 



간만에 글쓰는구나

'개발새발 > 기초' 카테고리의 다른 글

getCurrentTime() 함수  (0) 2011.07.19
참조카운팅과 String  (0) 2010.04.26
메모리 지정 new(placement new)  (0) 2010.04.12
parameter & argument  (0) 2010.04.09
const 정리  (0) 2010.04.02
and

코드 내용은 MEC++ 의 항목 29[각주:1] ( 258p~266p ) 를 뱃겼다.

  1 #include <iostream>
  2
  3 class MyString {
  4   public:
  5     MyString( const char * in_str = "" ) : value( new StrValue( in_str ) ) {
  6     MyString( const MyString& rhs ) : value( rhs.value ) {
  7       ++value->refCount;
  8       printf(" init refCount : %d\n", value->refCount );
  9     }
 10
 11     ~MyString() {
 12       printf(" dest refCount : %d\n", value->refCount );
 13       if(--value->refCount == 0 ) delete value;
 14     }
 15     MyString& operator=( const MyString & rhs );
 16
 17     const char* c_str() { return value->data; }
 18
 19   private:
 20     struct StrValue {
 21       int refCount;
 22       char * data;
 23
 24       StrValue( const char * in_str ) : refCount(1)
 25       {
 26         printf( "new called\n" );
 27         data = new char[strlen(in_str) + 1];
 28         strcpy( data, in_str );
 29       }
 30       ~StrValue() {
 31         printf( "delete called\n" );
 32         delete [] data;
 33       }
 34
 35     };
 36
 37     StrValue *value;
 38 };
 39
 40 MyString& MyString::operator=( const MyString& rhs )
 41 {
 42   if( value == rhs.value ) return *this;
 43
 44   if( --value->refCount == 0 ) delete value;
 45
 46   value = rhs.value;
 47   ++value->refCount;
 48
 49   return *this;
 50 }
 51
 52 int main()
 53 {
 54   MyString s1( "abc" );
 55   printf(" 1 .......... %s \n", s1.c_str() );
 56   MyString s2(s1);
 57   printf(" 2 .......... %s \n", s2.c_str() );
 58   MyString s3;
 59   printf(" 3 .......... %s \n", s3.c_str() );
 60
 61   s3 = s2;
 62   printf(" 3-2 .......... %s \n", s3.c_str() );
 63
 64   return 0;
 65 }
 66

결과

new called
 1 .......... abc
 init refCount : 2
 2 .......... abc
new called
 3 ..........
delete called
 3-2 .......... abc
 dest refCount : 3
 dest refCount : 2
 dest refCount : 1
delete called

결과 분석
54번 라인에서 s1이 생성되면서 26라인이 출력 되었다.
56 라인에서 s2가 생성되면서 참조카운트(refCount)가 2로 증가 하였다.
58 라인에서 s3가 생성되면서 다시 26 라인이 출력되었다.
그러나 61 라인에서 s2의 값 복사가 발생해서 s3의 값(빈문자열)이 삭제되어 31 라인이 출력 되었다.
끝으로 main이 끝나며 객체가 하나씩 파괴되고 마지막으로 실제 data도 삭제된다.


[] 연산자나 포인터, 참조자 등등을 추가 해야 하지만, 책을 참조하자 ^^;



  1. 도서에 대한 내용은 http://mutjin.com/159 를 참고하자 [본문으로]

'개발새발 > 기초' 카테고리의 다른 글

getCurrentTime() 함수  (0) 2011.07.19
postgreSQL 에서 oracle의 rowid 같은 값 이용하기  (0) 2011.02.18
메모리 지정 new(placement new)  (0) 2010.04.12
parameter & argument  (0) 2010.04.09
const 정리  (0) 2010.04.02
and