Linux2011. 10. 5. 14:36
도대체 이녀석 정체가 멀까?
도움말 상으로는 test로 연결이 되는데 흐음...
쉘 스크립트에서 사용하는 [] 랑 연관이 있는걸까?

[링크 : http://linux.die.net/man/1/test


$ ll -al \[
-rwxr-xr-x 1 root root 42584 2010-09-22 03:33 [* 

$ man -k "\["
[ (1)                - check file types and compare values 

$ file [
[: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped 

% ./\[ --help
BusyBox v1.14.2 (2011-01-24 14:35:28 KST) multi-call binary

Usage: [ EXPRESSION ]

Check file types, compare values etc. Return a 0/1 exit code
depending on logical value of EXPRESSION 

/usr/bin$ ./\[ --help
사용법: test 표현식
  또는:  test
  또는:  [ 표현식 ]
  또는:  [ ]
  또는:  [ 옵션
Exit with the status determined by EXPRESSION.

      --help     이 도움말을 표시하고 끝냅니다
      --version  버전 정보를 출력하고 끝냅니다

An omitted EXPRESSION defaults to false.  Otherwise,
EXPRESSION is true or false and sets exit status.  It is one of:

  ( EXPRESSION )               EXPRESSION is true
  ! EXPRESSION                 EXPRESSION is false
  EXPRESSION1 -a EXPRESSION2   both EXPRESSION1 and EXPRESSION2 are true
  EXPRESSION1 -o EXPRESSION2   either EXPRESSION1 or EXPRESSION2 is true

  -n STRING            the length of STRING is nonzero
  STRING               equivalent to -n STRING
  -z STRING            the length of STRING is zero
  STRING1 = STRING2    the strings are equal
  STRING1 != STRING2   the strings are not equal

  INTEGER1 -eq INTEGER2   INTEGER1 is equal to INTEGER2
  INTEGER1 -ge INTEGER2   INTEGER1 is greater than or equal to INTEGER2
  INTEGER1 -gt INTEGER2   INTEGER1 is greater than INTEGER2
  INTEGER1 -le INTEGER2   INTEGER1 is less than or equal to INTEGER2
  INTEGER1 -lt INTEGER2   INTEGER1 is less than INTEGER2
  INTEGER1 -ne INTEGER2   INTEGER1 is not equal to INTEGER2

  FILE1 -ef FILE2   FILE1 and FILE2 have the same device and inode numbers
  FILE1 -nt FILE2   FILE1 is newer (modification date) than FILE2
  FILE1 -ot FILE2   FILE1 is older than FILE2

  -b FILE     FILE exists and is block special
  -c FILE     FILE exists and is character special
  -d FILE     FILE exists and is a directory
  -e FILE     FILE exists
  -f FILE     FILE exists and is a regular file
  -g FILE     FILE exists and is set-group-ID
  -G FILE     FILE exists and is owned by the effective group ID
  -h FILE     FILE exists and is a symbolic link (same as -L)
  -k FILE     FILE exists and has its sticky bit set
  -L FILE     FILE exists and is a symbolic link (same as -h)
  -O FILE     FILE exists and is owned by the effective user ID
  -p FILE     FILE exists and is a named pipe
  -r FILE     FILE exists and read permission is granted
  -s FILE     FILE exists and has a size greater than zero
  -S FILE     FILE exists and is a socket
  -t FD       file descriptor FD is opened on a terminal
  -u FILE     FILE exists and its set-user-ID bit is set
  -w FILE     FILE exists and write permission is granted
  -x FILE     FILE exists and execute (or search) permission is granted

Except for -h and -L, all FILE-related tests dereference symbolic links.
Beware that parentheses need to be escaped (e.g., by backslashes) for shells.
INTEGER may also be -l STRING, which evaluates to the length of STRING.

NOTE: [ honors the --help and --version options, but test does not.
test treats each of those as it treats any other nonempty STRING.

NOTE: your shell may have its own version of test and/or [, which usually supersedes
the version described here.  Please refer to your shell's documentation
for details about the options it supports.

Report [ bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report [ translation bugs to <http://translationproject.org/team/> 

Posted by 구차니
이유는 알수 없음 -_-



아무튼, 한번 캡쳐하고 나면 프로그램 재시작 전에는 저~얼대
녹화도 안되는 버그도 여전히 안고쳐짐 -_- 

[링크 : http://en.freesion.com/3865/4898908/34565154/]
[링크 : http://s1.zetaboards.com/The_RX_Community/topic/3085909/1/]
[링크 : http://camstudio.org/forum/discussion/33
Posted by 구차니
Python의 openGL 바인딩이다.
linux 개발용 노트북을 해놔서 C를 통해 개발을 해도 상관은 없지만
다른 언어도 배울겸 한번 openGL을 python으로 하면 어떨까? 싶어서 찾아본 내용인데 흐음..
함수 이름이라던가 거의 100% C와 동일한데 별 의미가 없으려나?

import OpenGL 
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import * 

[링크 : http://pyopengl.sourceforge.net/]
[링크 : http://pypi.python.org/pypi/PyOpenGL-Demo] demo 

'Programming > python(파이썬)' 카테고리의 다른 글

python이 인기라는데..  (0) 2014.03.19
python2 vs python3  (0) 2013.01.02
python 3.2.2 64bit 버전 설치  (4) 2011.09.13
python 버전 골라서 실행하기  (0) 2011.05.08
python C/api - PyObject_GetAttrString()  (0) 2010.04.06
Posted by 구차니
Programming/ruby2011. 10. 3. 23:52
혹시나 해서 찾아봤더니 패키지로 존재 두둥!

sudo apt-get install rails
[링크 : https://help.ubuntu.com/10.04/serverguide/C/ruby-on-rails.html]
[링크 : https://help.ubuntu.com/community/RubyOnRails]

[링크 : http://www.ruby-lang.org
[링크 : http://rubyonrails.org/]

Posted by 구차니
Linux2011. 10. 3. 08:01
윈도우에는 Recycled(WinXP) $RECYCLE.BIN(Win7) 이 존재하듯
리눅스에는 .Trash-1000이 존재한다. (뒤에 숫자는 임의로 생성되는걸려나?)

리눅스에서는 . 으로 시작하면 숨김파일이 되기때문에 일단 숨김 디렉토리이고
하위 디렉토리 구성은 files 와 info로 나누어 진다. 
 


files 에서는 지워진 파일이 들어있고 (과거에 rm은 mv 로 대체해서 사용하던 방식의 업그레이드)
info 에는 ini 파일과 같은 형식으로
지워진 파일에 대한 정보가 들어있다.
 

$ cat wxp-ragexl-5-10-2600-6009.exe.trashinfo

[Trash Info]

Path=program/driver/Server/Intel Server Board SE7520BD2/wxp-ragexl-5-10-2600-6009.exe

DeletionDate=2011-09-25T19:47:20 



gnome의 경우
$HOME/.local/share/Trash 에 존재한다.

Posted by 구차니
Programming/openGL2011. 10. 2. 23:31
수식을 보고 초기값을 찾으려고 하지만.. 영 보이지 않고
Description

gluLookAt creates a viewing matrix derived from an eye point, a reference point indicating the center of the scene, and an UP vector.

The matrix maps the reference point to the negative z axis and the eye point to the origin. When a typical projection matrix is used, the center of the scene therefore maps to the center of the viewport. Similarly, the direction described by the UP vector projected onto the viewing plane is mapped to the positive y axis so that it points upward in the viewport. The UP vector must not be parallel to the line of sight from the eye point to the reference point.

Let

F = ( centerX - eyeX centerY - eyeY centerZ - eyeZ )
Let UP be the vector ( upX upY upZ ) .

Then normalize as follows:

f = F | | F | |
UP ' = UP | | UP | |
Finally, let s = f × UP ' , and u = s × f .

M is then constructed as follows:

M = ( s [ 0 ] s [ 1 ] s [ 2 ] 0 u [ 0 ] u [ 1 ] u [ 2 ] 0 -f [ 0 ] -f [ 1 ] -f [ 2 ] 0 0 0 0 1 )
and gluLookAt is equivalent to glMultMatrixf(M); glTranslated (-eyex, -eyey, -eyez);
 
[링크 : http://pyopengl.sourceforge.net/documentation/manual/gluLookAt.3G.html]
[링크 : http://www.opengl.org/sdk/docs/man/xhtml/gluLookAt.xml]  

If gluLookAt() was not called, the camera has a default position and orientation. By default, the camera is situated at the origin, points down the negative z-axis, and has an up-vector of (0, 1, 0). So in Example 3-1, the overall effect is that gluLookAt() moves the camera 5 units along the z-axis. (See "Viewing and Modeling Transformations" for more information about viewing transformations.)

[링크 : http://glprogramming.com/red/chapter03.html

테스트를 통해서 값을 구해보니
gluLookAt(0.0, 0.0, 0.0,
               0.0, 0.0, -n,
               0.0, 1.0, 0.0) ;
으로 설정을 하면 어떤 n 값(negative z-axis) 이던 동일하게 행렬값이 나온다.

'Programming > openGL' 카테고리의 다른 글

openGL Line 관련설정  (0) 2011.10.06
glutTimerFunc()  (0) 2011.10.05
GLUT 키보드 콜백 함수 총정....리?  (2) 2011.10.02
GLUI  (0) 2011.09.30
glEnable() / glDisable()  (0) 2011.09.30
Posted by 구차니
Programming/openGL2011. 10. 2. 21:12
void glutKeyboardFunc(void (*func)(unsigned char key, int x, int y));
void glutSpecialFunc(void (*func)(int key, int x, int y));

int x, int y 에는 윈도우의 마우스 좌표가 출력되며
glutSpecialFunc는 F1~F12 / 화살표 / PgUp / PgDn / Home / End / Insert 에 대한 입력을 받고
glutKeyboardFunc 는 그 외에 모든 키보드 입력을 받는다.

glutSpecialFunc 관련해서는 아래의 파일에 정의가 되어있고, 샘플용 콜백함수도 같이 투척!
$ vi /usr/include/GL/freeglut_std.h
124  * GLUT API macro definitions -- the special key codes:
125  */
126 #define  GLUT_KEY_F1                        0x0001
127 #define  GLUT_KEY_F2                        0x0002
128 #define  GLUT_KEY_F3                        0x0003
129 #define  GLUT_KEY_F4                        0x0004
130 #define  GLUT_KEY_F5                        0x0005
131 #define  GLUT_KEY_F6                        0x0006
132 #define  GLUT_KEY_F7                        0x0007
133 #define  GLUT_KEY_F8                        0x0008
134 #define  GLUT_KEY_F9                        0x0009
135 #define  GLUT_KEY_F10                       0x000A
136 #define  GLUT_KEY_F11                       0x000B
137 #define  GLUT_KEY_F12                       0x000C
138 #define  GLUT_KEY_LEFT                      0x0064
139 #define  GLUT_KEY_UP                        0x0065
140 #define  GLUT_KEY_RIGHT                     0x0066
141 #define  GLUT_KEY_DOWN                      0x0067
142 #define  GLUT_KEY_PAGE_UP                   0x0068
143 #define  GLUT_KEY_PAGE_DOWN                 0x0069
144 #define  GLUT_KEY_HOME                      0x006A
145 #define  GLUT_KEY_END                       0x006B
146 #define  GLUT_KEY_INSERT                    0x006C 

void keyboard_spe(int key, int x, int y)
{
    switch (key)
    {
        case GLUT_KEY_F1:
        case GLUT_KEY_F2:
        case GLUT_KEY_F3:
        case GLUT_KEY_F4:
        case GLUT_KEY_F5:
        case GLUT_KEY_F6:
        case GLUT_KEY_F7:
        case GLUT_KEY_F8:
        case GLUT_KEY_F9:
        case GLUT_KEY_F10:
        case GLUT_KEY_F11:
        case GLUT_KEY_F12:
            break;
        case GLUT_KEY_LEFT:
        case GLUT_KEY_RIGHT:
        case GLUT_KEY_UP:
        case GLUT_KEY_DOWN:
            break;
        case GLUT_KEY_PAGE_UP:
        case GLUT_KEY_PAGE_DOWN:
            break;
        case GLUT_KEY_HOME:
        case GLUT_KEY_END:
        case GLUT_KEY_INSERT:
            break;

        default:
           break;
    }
}

void keyboard(unsigned char key, int x, int y)
{
    switch (key)
    {
      default:
          break;
    }
}

void main()
{
  // ...
  glutKeyboardFunc(keyboard);
  glutSpecialFunc(keyboard_spe);
  // ...
}

연유는 모르겠으나,
glutSpecialFunc()와 glutKeyboardFunc() 의 key는 char와 int 형으로 크기가 다르게 정의되어 있으니 주의요망!

2011/09/27 - [Programming/openGL] - GLUT keyboard callback function
2011/03/28 - [Programming/openGL] - openGL callback function - GLUT 키보드 / 마우스 입력

'Programming > openGL' 카테고리의 다른 글

glutTimerFunc()  (0) 2011.10.05
gluLookAt() 의 기본값  (0) 2011.10.02
GLUI  (0) 2011.09.30
glEnable() / glDisable()  (0) 2011.09.30
glGet()  (0) 2011.09.30
Posted by 구차니
개소리 왈왈/블로그2011. 10. 1. 20:57
내가 목표로 삼고있는 것은 "하루 하나 이상의 글을 블로그에 작성한다" 인데..
이 목표 자체가 어떻게 보면 블로그의 문제점과 한계라고 생각을 한다.

사용자들을 끌어들이기 위해서는 키워드를 남발하고 광고를 해야하지만
그렇게 글들이 많아진다는 것은 중복된 글을 쓸수도 있는 등의
"관리"적인 문제가 발생할 소지가 많아진다는 것이다.

그리고 하루하나에 집착을 하다보니 글의 품질이나 문제점수정 보다는
어떻게든 하나라도 글을 쓰는 문제가 발생을 한다.
이런 이유로 하루하나의 글쓰기를 포기할까? 바꿀까?도 생각을 해보지만
최초의 목표이기도 했으니 쉽게 포기도 못하고..

아무튼 개인적으로는 블로그에 위키를 추가하여
특정 주제에 대해서 글을 더욱심도있게 쓸수있게 되면 좋겠다는 생각이 든다.
위키에서 글갯수만큼의 숫자로 글을 쓰는 방법도 있겠지만 흐음...
아무튼 블로그와 위키 두개를 운영을 해볼까? 라는 생각도 들기시작한다

블로그를 쓰게된 결과론적 이유중에 하나가
기록을통해 나중에 정리할 자료를 남기고 ebook 형식이나 종이책으로
출판할 내용을 갖춘다였기 때문인데.. 이를 어떻게 조율하는게 좋으려나?
Posted by 구차니
Programming/openGL2011. 9. 30. 13:55
GLUI는 C++ 기반의(으악!) GLUT로 만든 User Interface 라이브러이다.
C++이라니 웬지 거부감이.. 들지만 OTL
openGL/GLUT와 마찬가지로 멀티플랫폼을 지원하는 2차원 인터페이스를 작성하는데에는 꽤 괜찮은 선택이라고 보여진다.


[링크 : http://glui.sourceforge.net/]

ubuntu에서는 libglui-dev 로 설치하면 끝!
[링크 : http://packages.debian.org/lenny/libglui-dev]

'Programming > openGL' 카테고리의 다른 글

gluLookAt() 의 기본값  (0) 2011.10.02
GLUT 키보드 콜백 함수 총정....리?  (2) 2011.10.02
glEnable() / glDisable()  (0) 2011.09.30
glGet()  (0) 2011.09.30
glGet() 함수 이용하기  (0) 2011.09.28
Posted by 구차니
Programming/openGL2011. 9. 30. 12:32
void glEnablei(GLenum cap, GLuint index);
void glDisablei(GLenum cap, GLuint index);

glGet()에서 빼올수 있다는건 다른데서 설정을 하기 때문인데
이러한 설정들은 glEnable() / glDisable()을 통해 이루어진다. 


[링크 : http://www.opengl.org/sdk/docs/man/xhtml/glEnable.xml]
2011/09/30 - [Programming/openGL] - glGet() 

'Programming > openGL' 카테고리의 다른 글

GLUT 키보드 콜백 함수 총정....리?  (2) 2011.10.02
GLUI  (0) 2011.09.30
glGet()  (0) 2011.09.30
glGet() 함수 이용하기  (0) 2011.09.28
GLUT keyboard callback function  (0) 2011.09.27
Posted by 구차니