개발하면서/etc
-
IEEE 754 single precision : binary32개발하면서/etc 2011. 8. 11. 23:01
참조 : IEEE 754 floating point Wiki IEEE 754 blog 정수를 넣으면 어떻게 비트변환이 되는지 보여줌 어떻게 변환되는지 단계별로 잘 설명한사이트 위의 자료를 통하여 IEEE 754가 어떤 규칙을 통해 부동 소수점을 표현하는지 알게 되었다. 소수부분에서 10진수를 2진수로 변환하는 걸 나는 아래와 같이 생각하고 있었다. float input; printf("input converting float Number :"); scanf("%f", &input); char binary[15+1]; int binary_idx; float fraction = 0.5f; binary_idx = 0 while (input != 0.0f && binary_idx < 15) { if (input..
-
Hadoop에서 wrong key class 에러 발생개발하면서/etc 2011. 7. 10. 09:49
job은 아래와 같고 job.setInputFormatClass(TextInputFormat.class); job.setOutputFormatClass(TextOutputFormat.class); job.setMapOutputKeyClass(IntWritable.class); job.setMapOutputValueClass(Text.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(IntWritable.class); job.setJobName("sort"); job.setMapperClass(SortMaps.class); job.setCombinerClass(SortReducer.class); job.setReducerClass(Sor..
-
C Predefined Macros개발하면서/etc 2011. 6. 19. 21:42
#include int main() { printf("FILE:%s LINE :%d\n", __FILE__, __LINE__); printf("FILE:%s LINE :%d\n", __FILE__, __LINE__); printf("DATE : %s\n", __DATE__); printf("TIME : %s\n", __TIME__); return 0; } C에서 로그를 찍을 때 보다 더 많은 정보를 남기기 위한 Macro. 소스 예제는 ANSI 표준이고 아래 URL을 가면 MS에서 정의한 Macro들이 있다. 오호~ 이걸 이용해서 log4j 같이 로그 남기는 C library를 만들면 재밌을 것 같다 : ) Microsoft Predefined Macros
-
git Server를 만들어보자~!!개발하면서/etc 2011. 1. 31. 23:19
Ubuntu 9.10에 git Server를 만들어보겠습니다. gitHub를 이용해서 push, pull할수 있겠지만 무료로 사용할경우 private repository를 이용할수 없습니다. 그래서 자체적으로 서버를 만들어서 git의 private repository를 갖고 싶었습니다. (단순하죠.....허허) 그래서 찾은게 gitosis입니다. 나중을 위해 적어놓습니다~!! sudo apt-get install git-core cd ~/src git clone git://eagain.net/gitosis.git cd gitosis sudo apt-get install python-setuptools sudo python setup.py install sudo adduser --system --disab..
-
콘솔 프로그래밍(.exe) 서비스 등록하기개발하면서/etc 2011. 1. 23. 22:32
google에 "콘솔 exe 서비스 등록" 을 검색하면 수두록 나오지만, 몇번의 삽질이 있었기때문에. . . ㅋㅋ 정리하고자 합니다. 우선 콘솔 프로그래밍을 서비스에 등록하기위해서는 두개의 파일이 필요합니다.( instsrv.exe, srvany.exe) 파일입니다. instsrv.exe는 서비스를 등록, 삭제하는 기능이고 srvany.exe는 서비스관리자와의 통신과 제어를 처리합니다. instsrv.exe는 WINDOWSHOME/system32 에 설치하시고, srvany.exe는 콘솔 프로그래밍 폴더와 같이 위치시킵니다. 등록은 위 그림과 같이 합니다. instsrv [Service_name] [Service path] 서비스 삭제는 아래 그림입니다. regedit를 실행하고 아래 그림나온대로 이동합..