HTML 태그 밖에 쓰지 못했었는데..

한번 DIV로 스킨도 바꿀겸 공부 해봐야지...


결론(?)은

DIV를 이용해서 나란히 하려면 float 특성을 사용해라.. 인가?


[링크 : http://yongja.tistory.com/48]

[링크 : http://aboooks.tistory.com/74]


[링크 : http://mobicon.tistory.com/158]


div class / id

[링크 : http://yongja.tistory.com/15]

[링크 : http://div.or.kr/css-studying/id,class...%A9]



+

2015.09.16

<p id="p01">I am different</p>

p#p01 {

    color:blue;

}


<p class="error">I am different</p>

p.error {

    color:red;

}


Use id to address single elements. Use class to address groups of elements.

[링크 : http://www.w3schools.com/html/html_css.asp]


table은 전체가 로딩되기 전에 렌더링 하지 않아 div를 추천

[링크 : http://egloos.zum.com/pnpcrow/v/5048788]


div / span 차이

[링크 : http://boogis.tistory.com/48]

'Programming > javascript & HTML' 카테고리의 다른 글

html event  (0) 2015.09.10
jquery  (0) 2015.09.08
javascript closure  (0) 2013.01.07
javascript - DOM inspector in Firefox  (0) 2010.08.19
HTML의 style="filter:filter_name()"  (0) 2010.08.06
Posted by 구차니
Programming/openMP2015. 7. 23. 16:43

openMP 4.0.1 부터 지원하는걸려나?


void work();

void main()

{

    #pragma omp parallel proc_bind(spread) num_threads(4)

    {

        work();

    }

}

[링크 : http://openmp.org/mp-documents/OpenMP_Examples_4.0.1.pdf] 


#pragma omp parallel affinity(spread) num_threads(N)

[링크 : http://terboven.com/2012/06/21/the-design-of-openmp-thread-affinity/]



openGL + openMP 는 회의적...

그냥 하나의 쓰레드에서 그리고, 다른 쓰레드에서 처리하고 그런걸 추천

[링크 : http://www.kandroid.org/board/board.php?board=AndroidTechQnA&command=body&no=5332]

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

openmp 테스트 on rpi  (0) 2015.10.06
openCV + openMP  (0) 2015.09.30
openMP parallel for private  (4) 2013.12.12
openMP private copyin copyprivate firstprivate lastprivate  (0) 2013.11.28
openMP reduction 절  (0) 2013.11.28
Posted by 구차니
Programming/openGL2015. 7. 22. 19:24

openGL Super bible에 보이진 않아서 찾아보니 명확하게!


Even

T=[n-1 n-2 n]


Odd

T=[n-2 n-1 n]


[링크 : http://www.matrix44.net/cms/notes/opengl-3d-graphics/understanding-gl_triangle_strip]

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

myAHRS cube 예제  (0) 2016.02.02
openCV <-> openGL  (0) 2015.09.24
openGL super bible 3rd ed - 깊이, 은면처리  (0) 2015.07.21
openGL super bible 3rd ed - 점선면 관련  (0) 2015.07.21
glColor*  (0) 2015.07.20
Posted by 구차니
Programming/openGL2015. 7. 21. 22:23

depth 테스트 - 픽셀별 계산으로 부하가 많음

glutInitDisplayMode(GLUT_DEPTH);

glEnable(GL_DEPTH_TEST);

glClear(GL_DEPTH_BUFFER_BIT);

glDepthMask(bMask);



cull - 법선벡터의 방향으로 면을 추려냄

glEnable(GL_CULL_FACE);

glFrontFace(GL_CCW); // default

glFrontFace(GL_CW);

삼각형이나 폴라곤 그릴시 와인딩이 중요


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

openCV <-> openGL  (0) 2015.09.24
openGL triangle winding  (0) 2015.07.22
openGL super bible 3rd ed - 점선면 관련  (0) 2015.07.21
glColor*  (0) 2015.07.20
우분투에서 openGL 시작하기  (0) 2015.07.20
Posted by 구차니
Programming/openGL2015. 7. 21. 21:51

// 점

glGetFloatv(GL_POINT_SIZE_RANGE);

glGetFloatv(GL_POINT_SIZE_GRANULARITY);

glPointSize(pointsize);

glBegin(GL_POINTS);

glVertex3f(0.0, 0.0, 0.0);

glEnd();


// 선

glGetFloatv(GL_LINE_WIDTH_RANGE);

glGetFloatv(GL_LINE_WIDTH_GRANULARITY);

glLineWidth(linewidth);

glBegin(GL_LINES);

glVertex3f(0.0, 0.0, 0.0);

glVertex3f(1.0, 0.0, 0.0);

glEnd();


// 점선

glEnable(GL_LINE_STIPPLE);

glLineStipple(factor, pattern);




// 폴리곤 평면채우기(각도에 변하지 않는 패턴반복)

glEnable(GL_POLYGON_STIPPLE);

glPolygonStipple(pBitmap); // 32x32 bitmap


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

openGL triangle winding  (0) 2015.07.22
openGL super bible 3rd ed - 깊이, 은면처리  (0) 2015.07.21
glColor*  (0) 2015.07.20
우분투에서 openGL 시작하기  (0) 2015.07.20
GL2PS : an OpenGL to PostScript printing library  (0) 2014.03.06
Posted by 구차니


class wizard 라고 해야하나?

VC에서는 별도로 있었는데 여기는 위에 있었구만 -_-

암튼 상단에서 Form 중 원하는 핸들러를 선택하면 함수가 추가 똮!


그리고 속성에서 Form의 KeyPreview를 True로 해주어야 한다고 한다.


아무튼.. 디버깅으로 입력받는 키를 찾아보니 아래와 같은 숫자가 나온다.

Private Sub Form1_KeyDown(KeyCode As Integer, Shift As Integer)

    Select Case KeyCode

        Case 37: 'left

        Case 38: ' up

        Case 40: ' down

        Case 39: ' right

        Case 107: ' +

        Case 109: ' -

    End Select

End Sub


Private Sub Form1_KeyUp(KeyCode As Integer, Shift As Integer)


End Sub 


[링크 : http://www.vbforums.com/showthread.php?367165-VB6-Using-the-KeyDown-Event]

Posted by 구차니
Programming/openGL2015. 7. 20. 22:03

glColor의 경우 클램프되어 있는 변수는 아니나

내부적으로 clamp 되어 사용이 된다.


void glColor3f( GLfloat red, GLfloat green, GLfloat blue )


Neither floating-point nor signed integer values are clamped to the range [0,1] before the current color is updated. However, color components are clamped to this range before they are interpolated or written into a color buffer.

[링크 : http://linux.die.net/man/3/glcolor3f]



void glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )

[링크 : http://linux.die.net/man/3/glclearcolor]

Posted by 구차니
Programming/openGL2015. 7. 20. 21:48

예전에 컴파일 하는법이랑 다 적은거 같은데..

다 어디로 갔지? ㅠㅠ


$ sudo apt-get install freeglut3-dev

$ gcc -lglut -lm -lGL -lGLU test.c


[링크 : http://ubuntuforums.org/showthread.php?t=345177]


2011/09/07 - [Linux/Ubuntu] - ubuntu 에서 openGL 프로그래밍하기

2012/06/02 - [Programming/openGL] - openGL gcc에서 컴파일 하기


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

openGL super bible 3rd ed - 점선면 관련  (0) 2015.07.21
glColor*  (0) 2015.07.20
GL2PS : an OpenGL to PostScript printing library  (0) 2014.03.06
openGL state variables  (0) 2013.12.12
openGL에서 AVI 동영상 재생하기  (0) 2013.04.09
Posted by 구차니
Programming/lisp2015. 7. 19. 22:36

(read)



.. 먼가 허무하네? -_-a


[링크 : http://www.tutorialspoint.com/lisp/lisp_input_output.htm]

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

lisp 예제  (0) 2014.04.05
lisp 반복문 dolist, dotimes, do  (0) 2013.01.30
lisp cond  (0) 2013.01.28
lisp when/unless macro  (2) 2013.01.28
lisp 명령어 if progn  (0) 2013.01.28
Posted by 구차니
Programming/C Win32 MFC2015. 7. 14. 16:07



$ gcc -v

Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

Thread model: posix

gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 


$ vi void.c

#include <stdio.h>


void main()

{

        void *fp;

        int a = 0;

        fp = &a;


        printf("sizeof(void) %d\n",sizeof(void));

        printf("fp %8X\n",fp);

        fp++;

        printf("fp %8X\n",fp);

} 

(남자니까) 경고따윈 무시한다!

$ gcc void.c

void.c: In function ‘main’:

void.c:9:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat]

void.c:10:2: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘void *’ [-Wformat]

void.c:12:2: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘void *’ [-Wformat]


어? 연산이 되네? ㄷㄷㄷ 일단은 byte로 간주..

어? 게다가.. 왜 void의 sizeof가 1?

$ ./a.out
sizeof(void) 1
fp E9F5689C
fp E9F5689D


+

6.23 Arithmetic on void- and Function-Pointers


In GNU C, addition and subtraction operations are supported on pointers to void and on pointers to functions. This is done by treating the size of a void or of a function as 1.


A consequence of this is that sizeof is also allowed on void and on function types, and returns 1.


The option -Wpointer-arith requests a warning if these extensions are used.


[링크 : https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html]


+

Compiler Error CS0242

The operation in question is undefined on void pointers

Incrementing a void pointer is not allowed. For more information, see Unsafe Code and Pointers (C# Programming Guide).

[링크 : https://msdn.microsoft.com/en-us/library/dhyat531(v=vs.90).aspx] 


'Programming > C Win32 MFC' 카테고리의 다른 글

rand()와 RAND_MAX  (0) 2015.10.05
Cppcheck  (0) 2015.09.30
가변인자를 다시 넘겨주기  (2) 2015.07.07
printf 가변인자의 비밀?  (0) 2015.06.18
gcc 컴파일러 -D 옵션  (0) 2015.05.19
Posted by 구차니