Coding/CPP 삽질기2011. 9. 8. 00:42
1. Unity3D down 받기
 
http://unity3d.com/unity/download/


2. 실행화면


 
 

'Coding > CPP 삽질기' 카테고리의 다른 글

Programming quiz  (0) 2012.10.25
static int box[1000] = {1, };  (0) 2011.04.04
간단한(?) 퀴즈  (2) 2011.02.06
Posted by chobocho
Coding/Bada2011. 9. 6. 00:37
Bada SDK 2.0이 릴리즈 되었다고 하여 설치해 보았다.

Bada SDK 2.0은 http://developer.bada.com 에서 받을 수 있다. 



IDE를 실행한 화면

 

Hello bada!

 

'Coding > Bada' 카테고리의 다른 글

[Bada] Bada로 만든 숫자 빨리 터치 하기 게임  (0) 2010.08.21
[Bada] Resource explore  (0) 2010.08.18
[Bada] SDK 설치  (0) 2010.08.18
Posted by chobocho
Coding/Tip2011. 9. 3. 01:01



SVN Local 사용법



1. SVN 프로그램을  다운 받아 설치 한다.
 
 
http://tortoisesvn.net/
 
그리고 설치가 끝나면 컴퓨터를 재부팅 한다. 


2. SVN 저장소 폴더를 지정한다.




3. SVN에 저장할 소스 폴더를 추가한다.


 방법 1)   탐색기로 저장소로 사용할 폴더 ( 빈 폴더 ) 를 선택한 다음, 마우스 오른쪽 버튼을 클릭하여 TortoiseSVN -> Create Repository Here 메뉴를 클릭한다.
 





방법 2) Repo-browser에서 직접 폴더를 추가한다.





 URL은 Local repository를 사용하기 때문에 file:///d:/svn_data  와 같이 입력해야 한다.

 

4. 작업할 폴더로 위치하여    
 
SVN checkout... 을 클릭하면, 저장소에 저장된 소스를 가지고 온다.
여기서 작업을 하고 commit을 하면 된다.

 


* 맘에 드시면 댓글 부탁드립니다. 

'Coding > Tip' 카테고리의 다른 글

Sinppely ( Code snippet tool )  (0) 2013.05.19
3시 15분 0초의 각도  (0) 2011.03.01
[TIP] Private IP  (0) 2011.01.19
Posted by chobocho
Coding/Java 삽질기2011. 9. 1. 23:23


지인이 만든 게임을 보고 따라서 만들어 보았다.

초 간단 규칙, 발바닦으로 얼굴을 문질러 주면 된다. 

단, 손가락이 휴대폰 화면에서 떨어지면 Game over 다.
 


Update : 2011. 9. 2

'Coding > Java 삽질기' 카테고리의 다른 글

[Android] Image match game ( V 0.2 )  (0) 2011.09.12
Java 실행 시간 측정 하기  (0) 2011.09.01
Java에서 객체의 초기화 순서  (0) 2011.08.24
Posted by chobocho
Coding/Java 삽질기2011. 9. 1. 01:39

public class Test {
    public static void main (String[] args) {
        long start_time = System.currentTimeMillis();
        
        //================================
        // Todo something
        
        // ===============================

        System.out.println ("Time : " + (System.currentTimeMillis() - start_time));
    }
}

'Coding > Java 삽질기' 카테고리의 다른 글

Press a ghost  (0) 2011.09.01
Java에서 객체의 초기화 순서  (0) 2011.08.24
[Android] Image match game  (0) 2011.06.04
Posted by chobocho
Coding/Math2011. 8. 30. 22:52


삼각형의 세 변의 길이를 a, b, c라고 하면 삼각형의 넓이 S는 헤론의 공식에 의해 위와 같이 구할 수 있다.


위 공식을 이용하면  아래와 같이 터치한 세 점의 좌표로 만들어 지는 삼각형의 넓이를 구하는 프로그램을 쉽게 작성할 수 있다.

사선 공식을 이용하면 더 쉽게 세 점의 좌표로 만들어지는 삼각형의 넓이를 구할 수 있다.

http://chobocho.tistory.com/2461076


'Coding > Math' 카테고리의 다른 글

홀수의 합으로 제곱근 구하기  (0) 2012.06.01
[Math] 사선 공식  (0) 2011.09.12
원점을 중심으로 회전이동 시키는 공식  (2) 2008.12.20
Posted by chobocho
Coding/Java 삽질기2011. 8. 24. 23:58

자바는 Static block -> Instance block -> 생성자 순으로 초기화가 된다.

먼저 아래와 같은 코드를 실행해 보자.

public class TestClass {
    public static void main (String[] args) {
       System.out.println("---------------------------");
       
       Parent father = new Parent("father");
       
       System.out.println("---------------------------");
    }
}

class Parent {
    public String myName = "Parent";

    static {
        System.out.println ("This is first message of Parent class!");
    }

    public Parent() {
       System.out.println (myName + ": This is third message! I'm a default constructor of Parent class!");
    }

    public Parent(String name) {
        myName = name;
        System.out.println (myName + ": This is third message! I'm a constructor of Parent class!");
    }
    
    {
      System.out.println (myName + ": This is second message!");
    }
}


그럼 하기와 같은 결과를 얻을 수 있다.

---------------------------
This is first message of Parent class!
Parent: This is second message!
father: This is third message! I'm a constructor of Parent class!
---------------------------



 public class TestClass {

    public static void main (String[] args) {
       System.out.println("---------------------------");
       
       Parent father = new Parent("father");
       Parent mother = new Parent("mother");
       
       System.out.println("---------------------------");
    }
}

class Parent {
    public String myName = "Parent";

    static {
        System.out.println ("This is first message of Parent class!");
    }

    public Parent() {
       System.out.println (myName + ": This is third message! I'm a default constructor of Parent class!");
    }

    public Parent(String name) {
        myName = name;
        System.out.println (myName + ": This is third message! I'm a constructor of Parent class!");
    }
    
    {
      System.out.println (myName + ": This is second message!");
    }
}


 위 와 같이 한 줄을 추가하여 실행하면 아래와 같은 결과를 얻을 수 있다.

---------------------------
This is first message of Parent class!
Parent: This is second message!
father: This is third message! I'm a constructor of Parent class!
Parent: This is second message!
mother: This is third message! I'm a constructor of Parent class!
---------------------------


여기서 보면 static { }  으로 둘러 싸인 구문은 객체 생성시 최초 1회만 수행이 되고, 그 뒤에는 수행이 되지 않는 걸 알 수 있다. 그러나 { } 로 둘러싸인 instance block은 객체가 생성 될 때마다 실행 되며 생성자 보다 먼저 생성되는 걸 알 수 있다.

class Child extends Parent {
    public String myName = "Child";

    static {
        System.out.println ("This is first message of Child class!");
    }

    public Child(String name) {
        myName = name;
        System.out.println (myName + ": This is third message! I'm a constructor of Child class!");
    }
    
    {
      System.out.println (this.myName + ": This is second message of Child class!");
    }
  
}



위 와 같이 Parent class를 상속받는 Child 클래스를 만들고, 아래와 같이 객체를 생성해 보자

public class TestClass {
    public static void main (String[] args) {
       System.out.println("---------------------------");
       
         Child son     = new Child("son");
       
       System.out.println("---------------------------");
    }



그럼 하기와 같은 결과가 나온다.

---------------------------
This is first message of Parent class!
This is first message of Child class!
Parent: This is second message!
Parent: This is third message! I'm a default constructor of Parent class!
Child: This is second message of Child class!
son: This is third message! I'm a constructor of Child class!
---------------------------


위 결과를 보면 알 수 있듯이,
부모 클래스의 static block -> 자식 클래스의 static block -> 부모 클래스의 instance block
-> 부모 클래스의 생성자 -> 자식 클래스의 instance block -> 자식클래스의 생성자 순으로 실행 되는 것을 알 수 있다.

마지막으로 아래와 같이 실행을 하면,

public class TestClass {
    public static void main (String[] args) {
       System.out.println("---------------------------");
       
       Parent father = new Parent("father");
      Parent mother = new Parent("mother");
       Child son     = new Child("son");
       
       System.out.println("---------------------------");
    }
}



하기와 같이 실행 된다. 천천히 살펴보면 앞에서 설명한 내용에서 벗어나지 않는다.

---------------------------
This is first message of Parent class!
Parent: This is second message!
father: This is third message! I'm a constructor of Parent class!
Parent: This is second message!
mother: This is third message! I'm a constructor of Parent class!
This is first message of Child class!
Parent: This is second message!
Parent: This is third message! I'm a default constructor of Parent class!
Child: This is second message of Child class!
son: This is third message! I'm a constructor of Child class!
---------------------------





 

'Coding > Java 삽질기' 카테고리의 다른 글

Java 실행 시간 측정 하기  (0) 2011.09.01
[Android] Image match game  (0) 2011.06.04
Android Tetris  (0) 2011.02.02
Posted by chobocho
Coding/Python 삽질기2011. 6. 16. 01:17
#-*- coding: cp949 -*-
#
# undo/redo 구현 방법
# 1) undo stack를 만든다.
# 2) redo stack를 만든다.
# 3) 새로운 액션을 undo에 넣는다.
# 4) 사용자가 undo를 선택하면 redo.append ( undo.pop() ) 를 수행한다.
# 5) 사용자가 redo를 선택하면 undo.append ( redo.pop() ) 를 수행한다.

undo = []
redo = []

undo.append (1)
undo.append (2)
undo.append (3)
redo.append ( undo.pop() )


print undo
print redo
Posted by chobocho
Coding/Java 삽질기2011. 6. 4. 19:56


즐거운 연휴~ 심심해서(?) 만들어 본 간단한 안드로이드용 퍼즐 게임



게임 방법

1. 빈 곳을 터치하면 상하좌우에서 동일한 이미지가 2개 있으면 삭제한다.
2. 빈 곳을 터치했으나 삭제할 수 있는 이미지가 없으면 타이머가 준다.
 
 
 

'Coding > Java 삽질기' 카테고리의 다른 글

Java에서 객체의 초기화 순서  (0) 2011.08.24
Android Tetris  (0) 2011.02.02
Bubble sort  (0) 2010.07.11
Posted by chobocho
Coding/CPP 삽질기2011. 4. 4. 17:37


static int box[1000];

static int box[1000] = {0, };

static int box[1000] = {1, };


의 차이는?

 
static int box[1000] = {1, }; 의 경우

컴파일시 바이너리의 크기가 sizeof(int) * 1000 만큼 커진다. 

'Coding > CPP 삽질기' 카테고리의 다른 글

Unity3D (1)  (0) 2011.09.08
간단한(?) 퀴즈  (2) 2011.02.06
[CPP] 파일 분할 프로그램 v0.01  (0) 2010.01.28
Posted by chobocho