2012년 9월 3일 월요일

Squirrel Hill

또 다시 시작한 피츠버그에서의 생활.
놀러온게 아니니 잘 하고 돌아가야겠다. ㅋㅋ

2012년 8월 1일 수요일

ARC


XCode 4 업데이트 후. 잘 되던게 안되는게 너무 많다.
ARC and @properties  ...
해결은 m파일의 compiler flag에 -fno-objc-arc 를 넣으면 됨

http://stackoverflow.com/questions/8375508/why-are-my-asihttprequest-files-showing-arc-errors

2012년 7월 31일 화요일

compile sources in XCODE

Target --> Build Phases --> Compile sources.

변화는 좋지만, 일관성 없는 변화는 좋지 않다.

"_OBJC_CLASS_$_AsyncUdpSocket", referenced from: ...

2012년 7월 24일 화요일

바나나

바나나는 칼륨이 많다고 함.


신기한 보관 방법

2012년 7월 22일 일요일

No fmex9.pfb when update to Ubuntu 10.04

Ubuntu 10.04 로 업그레이드 하고 나서 생기는 문제.


dvips: ! Couldn't find font file fmex9.pfb

solution

It is caused by the pdfmap file in $HOME/.texmf-var.
The solution is just remove or rename $HOME/.texmf-var to $HOME/.texmf-var_Ubuntu904.
Then pdflatex the lyx file inside LyX again . The texlive will produce another new subdirectory $HOME/.texmf-var.
Done.
by Kuo-Ping Chiao
2010-5-9

ㄳㄳ

2012년 7월 15일 일요일

Direct Access to CvMat



If CV_32FC1 (1 channel float)

CvMat* M = cvCreateMat( 4, 4, CV_32FC1 );
M->data.fl[ row * M->cols + col ] = (float)3.0;

or...

cvmGet( mat, row, col );

...


inline void cvDoubleMatPrint( const CvMat* mat )
{
    int i, j;
    for( i = 0; i < mat->rows; i++ )
    {
        for( j = 0; j < mat->cols; j++ )
        {
            printf( "%f ",cvmGet( mat, i, j ) );
        }
        printf( "\n" );
    }
}

from http://note.sonots.com/OpenCV/MatrixOperations.html


2012년 6월 27일 수요일

사람

변상욱 기자의 블로그에서 본 글. 그 때나 지금이나 비슷했나보다

17 세기를 살았던 어느 유학자가 사람 쓰는 일로 이런 글을 남겼군요.
1. 사람의 장점을 처음부터 안다하지 마라. 그 사람을 써 봐야 비로소 장점이 드러난다.
2. 사람의 장점만 취하면 된다. 단점은 알 필요 없다.
3. 자기 마음에 맞는 사람만 쓰려고 하지 말라.
4. 작은 허물을 탓할 거야 없지만 다만 일을 소중히 여기지 않는다면 그건 안된다.
5. 사람을 쓸 때는 그 일을 그에게 완전히 맡겨라.
6. 위에 있는 사람은 밑에 있는 사람과 재주를 겨뤄서는 안된다.
7. 인재라도 반드시 나쁜 버릇 하나는 있게 마련. 그것을 꺼려 인재를 버려서는 안된다.
8. 이렇게 사람을 잘 쓰고자 애쓰다 보면 때에 따라 일을 적절히 처리하는 인물이 반드시 있게 마련이다.
CBS보도국 변상욱 기자
http://blog.nocutnews.co.kr/sniper492.blog$1/217369

2012년 6월 26일 화요일

One-way ANOVA 와 Univariate

아래 페이지에서 찾게 된 글.
필요할 때만 공부해서 통계는 안 느는거 같다. -_-
http://answers.yahoo.com/question/index?qid=20080518160556AAlpG5F


It is the same thing. 'Univariate' means one IV, as does 'one-way'.

Edit
Repeat: its the same thing. SPSS gives you two ways of doing a 1-way ANOVA. As you are a novice just use the 'One Way' option as it gives you fewer option boxes and make you less confused. ANOVA and regression appear under the GLM option as they both fall under this umbrella term (as do many other tests, but that's another story).





2012년 6월 24일 일요일

OpenCV in iOS

XCODE 4.2로 업그레이드를 하기전에, 좀 더 심사숙고했어야 하는데..
어쨋든 기존 프로젝트 섿업을 다시 한번 손봐줘야했다.

마지막으로 남은 OpenCV 문제.




Statement-expressions are allowed only inside functions
../externalLibs/opencv/include/opencv2/core/core.hpp:437: confused by earlier errors, bailing out


core.hpp 에서 MIN 함수에서 문제가 생기네..
해결법이 다음 링크에 나와있긴 한데, 나의 경우는 잘 안되었음.
http://computer-vision-talks.com/2011/01/using-opencv-in-objective-c-code/



이럴때는 간단히 아래처럼 MIN 을 정의를 undef하면 됨.
뭐 나중에 opencv내에서 정의하겠지..


#undef MIN
#include

굳이 나중에 문제가 생긴다면, 재정의하면 되고.
#define MIN(a, b)  (((a) < (b)) ? (a) : (b))

2012년 6월 17일 일요일

A user agent sniffer

User agent sniffing

The term user agent sniffing refers to the practice of Web sites showing different content when viewed with a certain user agent. On the Internet, this will result in a different site being shown when browsing the page with a specific browser. A useful example of this is Microsoft Exchange Server 2003's Outlook Web Access feature. When viewed with Internet Explorer 6 (or newer), more functionality is displayed compared to the same page in any older browsers, because older browsers could not render the same content.[citation needed] User agent sniffing is mostly considered poor practice, since it encourages browser-specific design and penalizes new browsers with unrecognized user agent identifications. Instead, the W3C recommends creating HTML markup that is standard,[7] allowing correct rendering in as many browsers as possible, and to test for specific browser features rather than particular browser versions or brands.[8]


Ray 형때문에 simplexml_load_file 을 쓰다가 알게된 것.
위의 글을 읽어보니 그쪽 서버가 윈도우라는게 의심이 간다.
어쨋든 User agent sniffing은 표준과는 동떨어진 기술.


If you find that you are receiving 500 errors with simplexml_load_file() but you can access the xml/rss feed manually through a browser, your script is probably being blocked by a user agent sniffer.

Add this code before your xml call to remedy this issue



ini_set("user_agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
ini_set("max_execution_time", 0);
ini_set("memory_limit", "10000M");

$rss = simplexml_load_file($feed_url);

?>


http://php.net/manual/en/function.simplexml-load-file.php

2012년 6월 15일 금요일

황금의 성

좋은 세상이다. 휴대폰에서 예전 오락실 게임을 다 하고..ㅎㅎ
50원 넣고 오락하던 예전의 기억이 떠오른다.

며칠간 짬짬히 해서 드디어 끝을 봤다.

끝 왕이 일어나는 순간 정확히 가격해서 한방에 끝내야함.
어디선가 본 것처럼 운이 정말 잘 따라야함. 



중간에 만들어본 무지개.

2012년 5월 31일 목요일

Confidence interval in Matlab

있는지 모르지만, 대충 만들어본 confidence interval 구하는 함수 (matlab).

function x = getCI(alpha, stdev, sz)
    %Normal inverse cumulative distribution function
    cc = norminv([alpha/2 1-alpha/2],0,1);
    cc = cc(2);
    x = cc *  stdev / sqrt(sz);


사용은 아래처럼


  • conf95_c = getCI(0.05, stdev, length(A));


Excel의 CONFIDENCE 함수와 동일


참고 페이지
http://support.microsoft.com/kb/828124

2012년 5월 29일 화요일

조금은 솔직한 ...

Apple 에서 보안설정할때 새롭게 본 질문들. 

2012년 5월 28일 월요일

npnj5agent

은행 업무는 이제 iOS에서만 해야겠다.
쓸데없이 상주하는 nProtect..


은행일 끝나면 사라지든가 비활성화하든가 해야하는게 맞는거 같은데..
게다가 자주 focus를 변경시켜 참을 수 없게 만든다.

미국에서 은행업무 볼 때는 어느 브라우져에서든 보안 걱정없이 잘했었는데..
가뜩이나 ActiveX를 쓰는 것도 답답한데, 이건 도가 지나친다.

다음 대통령 선거에서는 "ActiveX 사용을 억제하겠다"라고
공약걸어주는 사람에게 표를 던져야겠다.