완전 귀엽다 ㅎㅎ
2011년 9월 21일 수요일
2011년 9월 19일 월요일
find where-to-look criteria what-to-do
막 쓰지 말고 이해하고 써야겠다 ㅋㅋ
find where-to-look criteria what-to-do
Example 1)
find ./ -name *.url
You can use shell-style wildcards in the -name search argument:
find . -name foo\*bar
Example 2)
프로그램 컴파일 폴더 지울때 사용
find . -iname "build" -type d -print0 | xargs -0 rm -r
xargs -0; files with space in name
find -print0
It is safer to use ‘find -print0’ or ‘find -fprint0’ and process the output by giving the ‘-0’ or ‘--null’ option to GNU xargs, GNU tar, GNU cpio, or perl. The locate command also has a ‘-0’ or ‘--null’ option which does the same thing.
2011년 9월 18일 일요일
2011년 9월 13일 화요일
2011년 9월 11일 일요일
Prison Break
뒤늦긴 했지만 Prison break 전 시즌을 마무리 했다.
재미있게 잘 봤다.
개인적으로 Fernando Sucre(Amaury Nolasco)가 너무 좋다.
http://en.wikipedia.org/wiki/Fernando_Sucre
재미있게 잘 봤다.
개인적으로 Fernando Sucre(Amaury Nolasco)가 너무 좋다.
http://en.wikipedia.org/wiki/Fernando_Sucre
거울 뉴런 (Mirror Neuron)
거울 뉴런 : 우리의 세포속에는 타인의 표정을 흉내내는 뉴런이 있다.
정서 공유와 관련된 이야기에서 나온 부분.
A mirror neuron is a neuron that fires both when an animal acts and when the animal observes the same action performed by another.
새로 태어난 짧은꼬리원숭이가 얼굴 표정을 흉내낸다.
http://en.wikipedia.org/wiki/Mirror_neuron
정서 공유와 관련된 이야기에서 나온 부분.
A mirror neuron is a neuron that fires both when an animal acts and when the animal observes the same action performed by another.
새로 태어난 짧은꼬리원숭이가 얼굴 표정을 흉내낸다.
http://en.wikipedia.org/wiki/Mirror_neuron
Union Grill
2011년 9월 10일 토요일
Variadic Macros
A macro can be declared to accept a variable number of arguments much as a function can. The syntax for defining the macro is similar to that of a function. Here is an example:
좋은 꼼수
#define FORMAT(format, ...) [NSString stringWithFormat:(format), ##__VA_ARGS__]
#define eprintf(...) fprintf (stderr, __VA_ARGS__)
eprintf ("%s:%d: ", input_file, lineno)
==> fprintf (stderr, "%s:%d: ", input_file, lineno)좋은 꼼수
#define FORMAT(format, ...) [NSString stringWithFormat:(format), ##__VA_ARGS__]
...
[self logInfo:FORMAT(@"Echo server started on port %hu", [listenSocket localPort])];
2011년 9월 8일 목요일
extern "C"
C와 C++는 컴파일시 obj에 함수 이름, 변수 이름 등의 심벌을 기록하는 방식이 다르다.
그래서 C++ 컴파일러에서 C로 작성된 코드를 컴파일 하고자 할 때 사용한다.
http://cafe.naver.com/devctrl.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=1700&
C쪽에서 아래처럼 하거나..
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
cpp 쪽에서 아니면 아래처럼
extern "C" {
#include "sift.h"
#include "imgfeatures.h"
#include "kdtree.h"
#include "utils.h"
#include "xform.h"
}
그렇지 않으면 -_-
error LNK2001: unresolved external symbol "int __cdecl sift_features(struct _IplImage *,struct feature * *)" (?sift_features@@YAHPAU_IplImage@@PAPAUfeature@@@Z)
error LNK2001: unresolved external symbol "struct _IplImage * __cdecl stack_imgs(struct _IplImage *,struct _IplImage *)" (?stack_imgs@@YAPAU_IplImage@@PAU1@0@Z)
그래서 C++ 컴파일러에서 C로 작성된 코드를 컴파일 하고자 할 때 사용한다.
http://cafe.naver.com/devctrl.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=1700&
C쪽에서 아래처럼 하거나..
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
cpp 쪽에서 아니면 아래처럼
extern "C" {
#include "sift.h"
#include "imgfeatures.h"
#include "kdtree.h"
#include "utils.h"
#include "xform.h"
}
그렇지 않으면 -_-
error LNK2001: unresolved external symbol "int __cdecl sift_features(struct _IplImage *,struct feature * *)" (?sift_features@@YAHPAU_IplImage@@PAPAUfeature@@@Z)
error LNK2001: unresolved external symbol "struct _IplImage * __cdecl stack_imgs(struct _IplImage *,struct _IplImage *)" (?stack_imgs@@YAPAU_IplImage@@PAU1@0@Z)
피드 구독하기:
글 (Atom)






