2012년 12월 30일 일요일

Curvature Scale Space

Smooth operator 결과. sigma 를 높임에 따라 뭉게진다.
cyan은 원 sine curve + 15% noise

2차원 커브에 적용. 빨간 점은 커브가 zero-crossing되는 지점.

재밌다 ㅋㅋ

Thanks to Roy


2012년 12월 25일 화요일

Violence doesn’t end violence. It extends it.

크리스마스에 핫초코 마시며 재미있게 본 에피소드. "A Town Called Mercy"
아래 대사가 와 닫는다.
The Doctor: Don’t you see? Violence doesn’t end violence. It extends it. And I don’t think you want to do this. I don’t think you want to become that man.


아래는 http://en.wikipedia.org/wiki/A_Town_Called_Mercy 에서
"A Town Called Mercy" received generally positive to mixed reviews from critics. IGN's Matt Risely rated the episode 8.5 out of 10, calling it "a weighty, progressive, sumptuous and entertaining adventure". He praised Whithouse and Metzstein for setting the right mood and found the highlight to be the Doctor's moral uncertainty. Dan Martin of The Guardian described it as "a complex morality dilemma fizzing with sharp dialogue". He wrote that it was Gillan who "emerged as the real star of the episode", citing Amy's conversation with the Doctor about how travelling alone had affected him.

2012년 11월 21일 수요일

Molex

자주 쓰는 몰렉스
53047-02 (충전 배터리 작은 단자)
5267-02

2012년 11월 11일 일요일

Lithium Ion/Polymer USB Battery Charger IC

MAX 1555

The MAX1551/MAX1555 charge a single-cell lithium-ion (Li+) battery from both USB* and AC adapter sources. They operate with no external FETs or diodes, and accept operating input voltages up to 7V

Current is automatically reduced to a trickle when charging is complete.




2012년 10월 28일 일요일

Bad Piggies

너무도 경쾌한 게임. Bad Piggies.



2012년 10월 17일 수요일

2012년 10월 14일 일요일

언제까지 ActiveX

언제까지 ActiveX ? 
이것 때문에 우리나라 web 발전이 뒤쳐져도,
여기서 나오는 단물 먹는 회사들 때문에 아직도 쓰는 거겠지??
미국에서 있을때 인터넷 구리다고 생각했는데, 이런 걸 보면 미국의 인터넷 환경이 훨씬 낫다고 본다. 

2012년 10월 13일 토요일

2012년 10월 12일 금요일

Proxy의 transformaiton

Proxy의 transformaiton 은
HDAPI and HLAPI 에서 각각

  • HD_CURRENT_TRANSFORM 
  • HL_PROXY_TRANSFORM



2012년 10월 3일 수요일

Gesture Recognizer

UIGestureRecognizer is the abstract base class for concrete gesture-recognizer subclasses (or, simply, gesture recognizers). The UIGestureRecognizer class defines a programmatic interface and implements the behavioral underpinnings for gesture recognition. The UIKit framework provides six gesture recognizers for the most common gestures. For other gestures, you can design and implement your own gesture recognizer (see “Creating Custom Gesture Recognizers” for details).



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 사용을 억제하겠다"라고
공약걸어주는 사람에게 표를 던져야겠다.


2012년 5월 20일 일요일

Cross processing

사진 처리 효과 중 하나.

Cross processing (sometimes abbreviated to Xpro) is the procedure of deliberately processing photographic film in a chemical solution intended for a different type of film.





2012년 5월 19일 토요일

생활의 지혜

우연히 길가에서 발견한 화분. 머리 좋다. 

2012년 5월 18일 금요일

Matlab 정수로 파일 저장

1) 실수 형태로 저장이 됨.
savefile = 'a.txt';

save savefile B -ascii;

2) Matlab 정수로 파일 저장

fid = fopen('data.txt', 'wt');
for i = 1:length(B)
    fprintf(fid,'% g\t% g\t% g\t% g\n',B(i,1), B(i,2), B(i,3), B(i,4) );
end
fclose(fid);

bb = uint8(B); 로 하면 정수형태가 되나 save 명령으로 저장이 안됨.



http://www.mathworks.com/matlabcentral/newsreader/view_thread/255696

2012년 5월 12일 토요일

민방위

첫 민방위 출격.
유성 온천대축제 보조 요원.
일요일의 아침을 축제장에서 보낼 수 있어 나름 의미 있었다.



2012년 5월 11일 금요일

OpenOCD


make flash 부분을 보면..


flash: all
@echo ---------------------------------------------
@echo  Flash programming...
@../OpenOCD/OpenOCD_ftdi.exe --file fury_ft2232_flash.cfg


The Open On-Chip Debugger (OpenOCD) aims to provide debugging, in-system programming and boundary-scan testing for embedded target devices.

OpenOCD for Stellaris JTAG 을 깔아서 설정했음.

관련 문서
http://fun-tech.se/stm32/OpenOCD/index.php

2012년 5월 7일 월요일

커피 삼촌

어제 분갈이를 완료하고 사진찍는 누리를 뒤에서 촬영.
예쁜 iPad 배경이 되다.


Sweet Basil


올해로 3년째 기르는 Basil.
모종으로 키워주시는 부분은 아빠가 해주신다.
뭔가 연례행사가 된 거 같다.

2012년 5월 5일 토요일

Multiple Inheritance

 ... cannot access public member declared in class ...

뭔 소리야.. private도 아니고..
결국은 Multiple Inheritance 에서 public keyword를 안붙여 일어난 일 -_-

class CGLWnd : public CWnd, ddUDP
class CGLWnd : public CWnd, public ddUDP

2012년 5월 2일 수요일

Picking & Dragging

유용하게 자주 쓰는 코드 한 줄

void DWnd::OnLButtonDown(UINT nFlags, CPoint point)
{
PostMessage( WM_NCLBUTTONDOWN, HTCAPTION,
MAKELPARAM( point.x, point.y));
CWnd::OnLButtonDown(nFlags, point);
}

2012년 4월 22일 일요일



관점에 따라서는 교체한 Cable TV 단자도
멋진 배가 될 수 있다. 

- 누리의 관점


2012년 4월 21일 토요일

Skipping items in a legend

Each curve has a handle, which can be obtained from the properties.



h1 = plot(rand(1,10));      % Blue line
hold on;
h2 = plot(rand(1,10),'r');  % Red line
h3 = plot(rand(1,10),'g');  % Green line
legend([h1 h3],{'hello','world'});  % Only the blue and green lines appear
                                    %   in the legend


http://www.mathworks.com/matlabcentral/answers/406-how-do-i-skip-items-in-a-legend

2012년 3월 16일 금요일

Gaussian profile of Illustrator format


Illustrator source : Download
profile calculated from Matlab

첫 아침

한국에서의 1년만의 첫 아침. 
날씨만큼 좋은 기분.

2012년 2월 19일 일요일

2012년 2월 13일 월요일

2012년 2월 10일 금요일

When glBindTexture doesn't work... (multiple texture image)

glBindTexture 를 했는데, (glGenTextures 로 값도 잘 얻어 왔는데..)
texture가 안 붙으면..  (texture file 이 여러 개인경우..)

glBegin(GL_TRIANGLES (or..) ) 밖에서 되었는지 확인.
상식적으로 생각해보면 texture는 geometry 를 어떻게 할지 시작하기전에 이루어져야함.
glBegin = delimit the vertices of a primitive or a group of like primitives


찾아보니 아래와 같네..
무조건 받아들이는 거보다 왜 저것만 되는지 생각해보면 납득 OK

You can use only a subset of OpenGL functions between glBegin and glEnd. The functions you can use are:
glVertex
glColor
glIndex
glNormal
glTexCoord
glEvalCoord
glEvalPoint
glMaterial
glEdgeFlag

http://www.gamedev.net/topic/83150-glbindtexture-inside-of-glbegin/

operator delete[]

struct myclass {
  myclass() {Dbg("myclass constructed : %x\n", this);}
  ~myclass() {Dbg("myclass destroyed : %x\n", this);}
};


function1()
{
  myclass * pt;

  pt = new myclass[3];
  delete[] pt;

  return 0;
}

modified from http://www.cplusplus.com/reference/std/new/operator%20delete[]/

Debug 결과 (pt = 0x004229f4 일때)
myclass constructed : 4229f4
myclass constructed : 4229f5
myclass constructed : 4229f6

myclass destroyed : 4229f6
myclass destroyed : 4229f5
myclass destroyed : 4229f4

delete operator만 쓰면 당연 에러..





Me Party

I love Amy Adams.
From the Muppets Movie

2012년 2월 3일 금요일

PZT strain


한 번 꾹 눌렀다가 몇 초 있다가 뗀 거. beam 형태로 된 거 사용. 
1kHz sampling 했음


The piezoelectric effect is a reversible process in that materials exhibiting the direct piezoelectric effect (the internal generation of electrical charge resulting from an applied mechanical force) also exhibit the reverse piezoelectric effect (the internal generation of a mechanical strain resulting from an applied electrical field).
...
The nature of the piezoelectric effect is closely related to the occurrence of electric dipole moments in solids.
...

1.818181818181818

숫자놀이
680/374 = 1.818181818181818 = 20/11
두배보다 살짝 작은...

이걸 제곱하면
1.818181818181818 ^2 = 3.305785123966941
이건 한 평의 넓이 -_-
1.818㎡ = 1평

근데 왜 저런 비율이 동영상에 쓰이지?

2012년 2월 2일 목요일

2012년 1월 31일 화요일

복사꽃 무더기로 피더이다




멀고 먼 인생길, 어찌 평탄한 길만 있겠습니까. 때로는 오르막, 또 때로는 내리막. 더러는 주막집 문전걸식에 더러는 잔칫집 진수성찬. 눈보라 몰아치는 엄동설한 지겹도록 길더니, 걷다 보니 어느새 화창한 봄. 걸음마다 복사꽃도 무더기로 피더이다.


아...멋지다.

2012년 1월 29일 일요일

Galactic coordinate system


Galactic coordinate system

멋지다.

The galactic coordinate system (GCS) is a celestial coordinate system which is centered on the Sun and is aligned with the apparent center of the Milky Way galaxy. The "equator" is aligned to the galactic plane. Similar to geographic coordinates, positions in the galactic coordinate system have latitudes and longitudes. The northern galactic pole is located in the constellation of Coma Berenices while the southern pole lies in Sculptor.

http://en.wikipedia.org/wiki/Galactic_coordinate_system


2012년 1월 27일 금요일

Manipulatory and ambulatory space



Lederman, Klatzkey, Collins, Wardell (1987)  made a distinction between manipulatory and ambulatory space, the former within reach of the hands and the latter requiring exploration by movements of the body.

Lederman, S. J., Klatzky, R. L., Collins, A. and Wardell, J. Exploring environments by hand or foot: Time-based heuristics for encoding distance in movement space. Journal of Experimental Psychology: Learning, Memory, and Cognition, 13, 4 (1987), 606-614.

2012년 1월 13일 금요일

Perspective correct barycentric coordinate

Perspective effect가 있으면, projected space에서 barycentric 계산 틀려짐.
아래는 nvidia 어디에선가 가져온 자료.

그냥 Object space에서 해결.




시간나면 다른 방법으로도 풀어봐야겠다.

cursor위치에서 vertex normal을 이용하여 normal vector interpolation을 하기 위함

Perspective-correct barycentric coordinate for picking:


     float b0 = _area[0];
     float b1 = _area[1];
     float b2 = _area[2];

     float w0 = p_rot_face[0].z;
     float w1 = p_rot_face[1].z;
     float w2 = p_rot_face[2].z;

     w_= b0/w0 + b1/w1 + b2/w2;

     w_ = 1.0/w_;

     _area[0] = _area[0] / w0 * w_;
     _area[1] = _area[1] / w1 * w_;
     _area[2] = _area[2] / w2 * w_;





2012년 1월 7일 토요일

iMame

파일 리스트


daleks-iPhone:/User/Applications/...F4B24/Documents root# ls -alt
ls: unrecognized prefix: mh
ls: unparsable value for LS_COLORS environment variable
total 1660
drwxr-xr-x 2 mobile mobile     170 Dec 23 13:56 iOS/
drwxr-xr-x 2 mobile mobile     102 Dec 23 13:53 folders/
drwxr-xr-x 8 mobile mobile     748 Dec 23 13:52 ./
drwxr-xr-x 2 mobile mobile     408 Dec 22 01:48 __MACOSX/
drwxr-xr-x 2 mobile mobile      68 Dec 22 01:48 cfg/
drwxr-xr-x 2 mobile mobile      68 Dec 22 01:48 hi/
drwxr-xr-x 2 mobile mobile      68 Dec 22 01:48 nvram/
drwxr-xr-x 6 mobile mobile     272 Dec 22 01:47 ../
-rw-r--r-- 1 mobile mobile    6114 Dec  1 23:46 crash.zip
-rw-r--r-- 1 mobile mobile   23591 Dec  1 23:46 fireone.zip
-rw-r--r-- 1 mobile mobile   20198 Dec  1 23:46 hardhat.zip
-rw-r--r-- 1 mobile mobile   28721 Dec  1 23:46 robby.zip
-rw-r--r-- 1 mobile mobile    6046 Dec  1 23:46 robotbwl.zip
-rw-r--r-- 1 mobile mobile    5621 Dec  1 23:46 sidetrac.zip
-rw-r--r-- 1 mobile mobile    9791 Dec  1 23:46 spectar.zip
-rw-r--r-- 1 mobile mobile   17034 Dec  1 23:46 starfire.zip
-rw-r--r-- 1 mobile mobile    8089 Dec  1 23:46 targ.zip
-rw-r--r-- 1 mobile mobile    6288 Dec  1 23:46 circus.zip
-rw-r--r-- 1 root   mobile  267019 Apr 10  2003 gladiatr.zip
-rw-r--r-- 1 root   mobile 1170578 Apr 10  2003 goldnaxe.zip
-rw-r--r-- 1 root   mobile   36610 Apr  8  2003 goonies.zip
-rw-r--r-- 1 root   mobile   66256 Apr  8  2003 gberet.zip