Coding/Tip2011. 3. 1. 19:22

3시 15분 0초일 때 두 바늘이 만드는 작은 각은 7.5 도 이다.
 
시침은 1분에 0.5도 씩 움직인다. 

( 시침은 12시간에 한 바퀴를 돈다. 그러므로 한 시간에는 360 / 12 = 30 도를 돌고, 1분에는 30/60 = 0.5 도 이다.)
 
분침은 1분에 6도씩 움직인다.
( 분 침은 한시간에 1바퀴를 돌기 때문에 360/60 = 6 도 이다.)
 
3시 15분인 경우, 분침은 15분동안 움직였으므로 90도를 움직였고,
 
시침은 3에 위치 했으니, 30 x 3 + 0.5 x 15 = 97.5 도 이다.
 
그러므로 시침과 분침이 이루는 작은 각은 97.5 - 90 = 7.5 도 이다.

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

SVN Local 저장소 사용법 간단 정리  (0) 2011.09.03
[TIP] Private IP  (0) 2011.01.19
보고있는 사이트...  (0) 2005.08.21
Posted by chobocho
Coding/CPP 삽질기2011. 2. 6. 01:09
1. Thread와 Process의 차이는?

2. Compiler와 Interpreter의 차이는?

3. C로 binary tree를 짜보시오.

4. C에서 Stack과 Heap의 구조에 대해서 설명하시오.

5. 자바에서 Garbage collection에 대해서 설명 하시오.

6. BNF란?

7. C로 Quick sort를 구현해 보시오.

8. Quick sort의 Big(O)는 얼마인가?

9. Unix에서 IPC의 방법을 설명하시오.

  


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

static int box[1000] = {1, };  (0) 2011.04.04
[CPP] 파일 분할 프로그램 v0.01  (0) 2010.01.28
[CPP] Lotto 생성기  (0) 2010.01.22
Posted by chobocho
Coding/Java 삽질기2011. 2. 2. 02:41


Galaxy Tab 전용으로 만든 테트리스.

아직 갈 길이 멀다.
 

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

[Android] Image match game  (0) 2011.06.04
Bubble sort  (0) 2010.07.11
Selection sort  (0) 2010.07.11
Posted by chobocho
Coding/Tip2011. 1. 19. 23:55


Private IP

·class A : 10.0.0.0 - 10.255.255.255
·class B : 172.16.0.0 - 172.31.255.255
·class C : 192.168.0.0 - 192.168.255.255

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

3시 15분 0초의 각도  (0) 2011.03.01
보고있는 사이트...  (0) 2005.08.21
빈칸을 체크해서 포커스를 맞춰주는 스크립트  (0) 2005.06.08
Posted by chobocho
Coding/Script2011. 1. 19. 23:50
<?
        echo "Your IP is [ ".$_SERVER['REMOTE_ADDR']." ]";
?>

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

[Excel VBA] File open / 파일열기  (0) 2016.12.20
BASIC의 추억  (0) 2007.04.04
홈페이지에 명언을 뿌려주는 코드  (6) 2006.09.18
Posted by chobocho
Coding/QR Code2011. 1. 12. 23:15

* QR code encoder 소스를 구할 수 있는 사이트
  ActionScript3 / Java / JavaScript / PHP 로 된 소스를 볼 수 있다.
  
   http://www.d-project.com/qrcode/index.html


* QR Code의 에러 정정 코드에 관한 설명이 나온 사이트 (일본어)
  
   http://www.swetake.com/qr/


* Galois fields 에 대한 참고 문서

   http://designtheory.org/library/encyc/topics/gf.pdf


* Reed-Solomon code 대해 참고 할 만한 문서
  
  http://web.eecs.utk.edu/~plank/plank/papers/CS-96-332.pdf


이전에 만들었던 QR code 소스 코드를  다시 만들면서, 이해가 가지 않는 이산수학책을 부여 잡고 국영수의 중요성에 대해서 다시 한 번 깨닫고 있다.  

'Coding > QR Code' 카테고리의 다른 글

QR Code 발표자료  (0) 2005.08.20
QR_CODE에 관하여 1  (0) 2005.08.18
갈로아 필드에서 a 구하기  (0) 2005.08.16
Posted by chobocho
Coding/Python 삽질기2011. 1. 12. 00:24
#-*- coding: cp949 -*-
# Name        : py_patten.py
# Author      : chobocho.com
# Version     :
# Copyright   :
# Description : simple number change 
#

from Tkinter import *
import tkMessageBox
 
save_file_name = "test.txt"
names = [ 'number1', 'number2' ]
table  = { names[0] : '100', names[1] : '200' } 

text_data = """Trees are  %(number1)s 
won,  %(number2)s won!""" 
 
class App:
    def __init__ (self, master):
    
        self.target_file_name = save_file_name
        
        frame = Frame(master)
        frame.pack()
        
        f3 = Frame(frame, width = 100, height = 40)
        f3.grid(row = 0, column = 0)
        
        self.label_1 = Label(f3, text= names[0])
        self.label_1.grid(row = 0, column = 0, sticky = W) 
        self.input_1 = Entry(f3)
        self.input_1.grid(row = 0, column = 1)

        self.label_2 = Label(f3, text= names[1])
        self.label_2.grid(row = 1, column = 0, sticky = W)
        self.input_2 = Entry(f3)
        self.input_2.grid(row = 1, column = 1)

        # 버튼을 그려주는 부분
        f4 = Frame(frame, width = 100, height = 40)
        f4.grid(row = 1, column = 0)
        

        self.info_button = Button(f4, text="Make", command = self.MakeFile)
        self.info_button.grid(row = 0, column = 0)
        self.info_button = Button(f4, text="Info", command = self.ShowInfo)
        self.info_button.grid(row = 0, column = 1)

    def ShowInfo(self):
        tkMessageBox.showinfo("Information","http://chobocho.com\nVersion 0.2")

    def MakeFile(self):
        self.value1 = self.input_1.get()
        self.value2 = self.input_2.get() 
        
        table[ names[0] ] = self.value1
        table[ names[1] ] = self.value2
        
        self.data = text_data % table

        target = file(self.target_file_name, 'w')
        target.write(self.data)
        target.close()

               
#----------------------------------------------------------
# main
if __name__ == "__main__":      
    root = Tk()
    app = App(root)
    root.mainloop()

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

[Python] Undo / Redo 구현하기  (0) 2011.06.16
http://www.pythonchallenge.com...Level6  (0) 2010.12.13
http://www.pythonchallenge.com...Level5  (0) 2010.12.13
Posted by chobocho
Coding/Ruby2011. 1. 8. 02:08
# save image from web
# 2011. 1. 7

require 'open-uri'

def read_url_file(url_name_, number_)
    open(url_name_) { |from| $data = from.read }
    File.open("#{number_}.jpg", "wb:binary") { |to| to.write($data) }
end

read_url_file("http://chobocho.com/photo/sydney.jpg", 2)

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

[Ruby] Simple file copy example  (0) 2011.01.07
Posted by chobocho
Coding/Ruby2011. 1. 7. 23:48
# simple file copy
# 2011. 1. 7

File.open("test.png", "rb:binary") { |from| $data = from.read }
File.open("test2.png", "wb:binary") { |to| to.write($data) }

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

[Ruby] Save image from web  (0) 2011.01.08
Posted by chobocho
Coding/Python 삽질기2010. 12. 13. 01:29


 

import re
import zipfile


def main():

    target = zipfile.ZipFile("channel.zip", 'r')
       
    number = "90052"
    filename = number + ".txt"
    comment = ""

    while 1:   
        print filename
        data = target.read(filename)
        data_ = re.findall("nothing is ([0-9]+)", data)
        if data_:
            comment += target.getinfo(filename).comment
            filename = "".join(data_) + ".txt"
        else:
            break
       
        print comment
         
if __name__ == "__main__":
    main()


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

간단한 반복 작업 매크로  (0) 2011.01.12
http://www.pythonchallenge.com...Level5  (0) 2010.12.13
http://www.pythonchallenge.com...Level4  (0) 2010.12.13
Posted by chobocho