'프로그램 사용'에 해당되는 글 2354건

  1. 2022.11.01 libvncserver 종료 절차
  2. 2022.10.24 FFT
  3. 2022.10.19 fftw 예제 와 복소수 처리
  4. 2022.10.19 fftw 테스트(tests/bench)
  5. 2022.10.19 fftw cross compile
  6. 2022.10.17 gdb 디버깅 타겟을 인자와 함께 실행하기
  7. 2022.10.12 docker snap 버전 문제
  8. 2022.09.26 libvncserver 로그인
  9. 2022.09.05 git diff --staged
  10. 2022.08.31 mariadb msec 단위 시간 얻기
프로그램 사용/VNC2022. 11. 1. 10:45

정작 API 문서에는 아무런 설명도 없다.

[링크 : https://libvnc.github.io/doc/html/group__libvncserver__api.html#ga7560cf50d53208ad5dc24b3d82bbb418]

[링크 : https://libvnc.github.io/doc/html/group__libvncserver__api.html#ga69b57fe0447eac66fe216430bcda5859]

 

예제에 보면 F11, F12 누르면 서버 종료 되는 내용이 있다.

static void dokey(rfbBool down,rfbKeySym key,rfbClientPtr cl)
{
  if(down) {
    if(key==XK_Escape)
      rfbCloseClient(cl);
    else if(key==XK_F12)
      /* close down server, disconnecting clients */
      rfbShutdownServer(cl->screen,TRUE);
    else if(key==XK_F11)
      /* close down server, but wait for all clients to disconnect */
      rfbShutdownServer(cl->screen,FALSE);
  rfbShutdownServer(rfbScreen, TRUE);
#endif /* BACKGROUND_LOOP */

  free(rfbScreen->frameBuffer);
  rfbScreenCleanup(rfbScreen);

[링크 : https://github.com/LibVNC/libvncserver/blob/master/examples/example.c]

 

rfbScreenCleanup은 걍.. vnc 버전 free() 라고 보면 될 듯.

/* hang up on all clients and free all reserved memory */
 
 void rfbScreenCleanup(rfbScreenInfoPtr screen)

[링크 : https://libvnc.github.io/doc/html/main_8c_source.html]

'프로그램 사용 > VNC' 카테고리의 다른 글

libvncserver without password  (0) 2022.11.08
libvncserver 기본 인자  (0) 2022.11.04
libvncserver 로그인  (0) 2022.09.26
libvncserver 접속 끊어짐 문제  (0) 2022.08.16
libvncserver websocket example  (0) 2022.08.12
Posted by 구차니

FFT

FFT Size - 몇 번의 샘플을 분석할 것인지

Window - 사용하지 않을때 Rectangular / Flat / Uniform

- Hannning Window(cosine?)

- Blackman 윈도우, Kaiser 윈도우(최근 제안, 사이드 로브가 적은 편)

 

사이드 로브(side libe, leakage) - 중심 주파수 하나가 아니라 주변부 주파수가 나오는 문제

 

대역폭(Bandwidth) - Hz 단위

 

[링크 : https://m.blog.naver.com/suya309/221467948212]

 

[링크 : https://scribblinganything.tistory.com/181]

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

real to complex  (0) 2022.11.04
fftw wisdom  (0) 2022.11.04
fftw 예제 와 복소수 처리  (0) 2022.10.19
fftw 테스트(tests/bench)  (0) 2022.10.19
fftw cross compile  (0) 2022.10.19
Posted by 구차니

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

fftw wisdom  (0) 2022.11.04
FFT  (0) 2022.10.24
fftw 테스트(tests/bench)  (0) 2022.10.19
fftw cross compile  (0) 2022.10.19
fft  (0) 2020.11.25
Posted by 구차니

도대체 저 옵션들은 먼지 모르겠다.

fftw-3.3.4/tests/bench -o nthreads=2 --verbose=1   --verify 'ok10bx6bx6e11x13b' --verify 'ik10bx6bx6e11x13b' --verify 'obrd7x13v16' --verify 'ibrd7x13v16' --verify 'ofrd7x13v16' --verify 'ifrd7x13v16' --verify '//obcd7x13v16' --verify '//ibcd7x13v16' --verify '//ofcd7x13v16' --verify '//ifcd7x13v16' --verify 'obcd7x13v16' --verify 'ibcd7x13v16' --verify 'ofcd7x13v16' --verify 'ifcd7x13v16' --verify 'okd10bv127' --verify 'ikd10bv127' --verify '//obr240' --verify '//ibr240' --verify '//ofr240' --verify '//ifr240' --verify 'obr240' --verify 'ibr240' --verify 'ofr240' --verify 'ifr240' --verify '//obc240' --verify '//ibc240' --verify '//ofc240' --verify '//ifc240' --verify 'obc240' --verify 'ibc240' --verify 'ofc240' --verify 'ifc240' --verify 'ok11760e00' --verify 'ik11760e00' --verify 'obr33v31' --verify 'ibr33v31' --verify 'ofr33v31' --verify 'ifr33v31' --verify '//obc33v31' --verify '//ibc33v31' --verify '//ofc33v31' --verify '//ifc33v31' --verify 'obc33v31' --verify 'ibc33v31'

[링크 : https://unix.stackexchange.com/questions/209753/how-do-i-check-if-fftw-installed-correctly]

 

 

+

[링크 : https://people.sc.fsu.edu/~jburkardt/c_src/fftw_test/]

[링크 : https://people.sc.fsu.edu/~jburkardt/c_src/fftw_test/fftw_test.html]

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

FFT  (0) 2022.10.24
fftw 예제 와 복소수 처리  (0) 2022.10.19
fftw cross compile  (0) 2022.10.19
fft  (0) 2020.11.25
fftw  (0) 2020.11.25
Posted by 구차니

 

[링크 : https://www.fftw.org/download.html]

 

./configure --prefix=/home/zhouxiaoyong/fftw3_test --disable-fortran --with-slow-timer --host=arm-none-linux-gnueabi --enable-single  --enable-neon   --enable-shared CC=arm-none-linux-gnueabi-gcc CFLAGS="-march=armv7-a -mfpu=neon -fPIC -ldl -mfloat-abi=softfp"

[링크 : https://codeantenna.com/a/ztGG77F10Z]

 

 

The basic usage of FFTW is simple. A typical call to FFTW looks like:
#include <fftw.h>
...
{
     fftw_complex in[N], out[N];
     fftw_plan p;
     ...
     p = fftw_create_plan(N, FFTW_FORWARD, FFTW_ESTIMATE);
     ...
     fftw_one(p, in, out);
     ...
     fftw_destroy_plan(p);  
}


For example, code to perform an in-place FFT of a three-dimensional array might look like:
#include <fftw.h>
...
{
     fftw_complex in[L][M][N];
     fftwnd_plan p;
     ...
     p = fftw3d_create_plan(L, M, N, FFTW_FORWARD,
                            FFTW_MEASURE | FFTW_IN_PLACE);
     ...
     fftwnd_one(p, &in[0][0][0], NULL);
     ...
     fftwnd_destroy_plan(p);  
}

The following is a brief example in which the wisdom is read from a file, a plan is created (possibly generating more wisdom), and then the wisdom is exported to a string and printed to stdout.
{
     fftw_plan plan;
     char *wisdom_string;
     FILE *input_file;

     /* open file to read wisdom from */
     input_file = fopen("sample.wisdom", "r");
     if (FFTW_FAILURE == fftw_import_wisdom_from_file(input_file))
          printf("Error reading wisdom!\n");
     fclose(input_file); /* be sure to close the file! */

     /* create a plan for N=64, possibly creating and/or using wisdom */
     plan = fftw_create_plan(64,FFTW_FORWARD,
                             FFTW_MEASURE | FFTW_USE_WISDOM);

     /* ... do some computations with the plan ... */

     /* always destroy plans when you are done */
     fftw_destroy_plan(plan);

     /* write the wisdom to a string */
     wisdom_string = fftw_export_wisdom_to_string();
     if (wisdom_string != NULL) {
          printf("Accumulated wisdom: %s\n",wisdom_string);

          /* Just for fun, destroy and restore the wisdom */
          fftw_forget_wisdom(); /* all gone! */
          fftw_import_wisdom_from_string(wisdom_string);
          /* wisdom is back! */

          fftw_free(wisdom_string); /* deallocate it since we're done */
     }
}

[링크 : http://www.fftw.org/fftw2_doc/fftw_2.html]

'프로그램 사용 > fft, fftw' 카테고리의 다른 글

fftw 예제 와 복소수 처리  (0) 2022.10.19
fftw 테스트(tests/bench)  (0) 2022.10.19
fft  (0) 2020.11.25
fftw  (0) 2020.11.25
ffmpeg fft 분석 예제  (0) 2020.11.25
Posted by 구차니

예를 들어 ls -al을 하려면 아래와 같이 하면 된다.

$ gdb --args ls -al

 

그냥 넣으면 gdb의 옵션으로 해석한다.

$ gdb ls -al
gdb: 인식할 수 없는 옵션 '-al'
Use `gdb --help' for a complete list of options.

 

$ gdb --args executablename arg1 arg2 arg3

[링크 : https://stackoverflow.com/questions/6121094]

'프로그램 사용 > gdb & insight' 카테고리의 다른 글

gdbserver taget  (0) 2023.07.19
gdb conditional break  (0) 2023.07.19
gdb break  (0) 2021.04.09
gdb/insight target window  (0) 2010.05.19
insight/gdb 우분투에서 컴파일하기 실패 - insight/gdb compiling on ubuntu failed  (2) 2010.05.18
Posted by 구차니
프로그램 사용/docker2022. 10. 12. 11:10

특정 디렉토리 마운트 시 read -only 라고 마운트 안되는 문제 있음

 

[링크 : https://askubuntu.com/questions/907110/]

[링크 : https://stackoverflow.com/questions/45764477/]

'프로그램 사용 > docker' 카테고리의 다른 글

docker 이미지 만들기  (0) 2024.05.08
도커 cpu 갯수 제한  (0) 2024.03.22
Dockerfile... 2?  (0) 2019.07.15
docker remote  (0) 2019.07.15
UTS name space  (0) 2019.07.15
Posted by 구차니
프로그램 사용/VNC2022. 9. 26. 17:51

rfbCheckPasswordByList()는 계정-패스워드 쌍으로 되어있는 값을 이용하여 로그인을 구현하는 기본 함수이다.

희망(?)을 가졌던 newClientHook 이벤트는 시도때도 없이 발생했고(원래 기대했던 것은 로그인 시 1회)

로그인 별로 어떤 계정이 로그인 성공,실패 했는지는 함수를 확장해서 만들어야 할 듯..

 

newClientHook 에서도 cl->viewOnly가 설정되지 않는 걸 보면, vnc client 측의 설정과는 별개 인 듯

/* for this method, authPasswdData is really a pointer to an array
    of char*'s, where the last pointer is 0. */
 rfbBool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len)
 {
   char **passwds;
   int i=0;
 
   for(passwds=(char**)cl->screen->authPasswdData;*passwds;passwds++,i++) {
     uint8_t auth_tmp[CHALLENGESIZE];
     memcpy((char *)auth_tmp, (char *)cl->authChallenge, CHALLENGESIZE);
     rfbEncryptBytes(auth_tmp, *passwds);
 
     if (memcmp(auth_tmp, response, len) == 0) {
       if(i>=cl->screen->authPasswdFirstViewOnly)
         cl->viewOnly=TRUE;
       return(TRUE);
     }
   }
 
   rfbErr("authProcessClientMessage: authentication failed from %s\n",
          cl->host);
   return(FALSE);
 }

[링크 : https://libvnc.github.io/doc/html/main_8c_source.html#l00786]

'프로그램 사용 > VNC' 카테고리의 다른 글

libvncserver 기본 인자  (0) 2022.11.04
libvncserver 종료 절차  (0) 2022.11.01
libvncserver 접속 끊어짐 문제  (0) 2022.08.16
libvncserver websocket example  (0) 2022.08.12
libvncserver 마우스 이벤트  (0) 2022.02.25
Posted by 구차니

stage 상태의 소스에 대해서 unstage 하지 않고 diff 하는 방법

 

[링크 : https://frhyme.github.io/git/git_diff_staged/]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git stash drop , clear  (0) 2024.09.19
git submodule ... 2?  (0) 2024.06.19
git reset 서버 commit  (0) 2021.09.14
git blame  (0) 2021.06.21
git pull rebase 설정  (0) 2021.06.02
Posted by 구차니

 

 

select current_timestamp(3)

[링크 : https://stackoverflow.com/questions/9624284/current-timestamp-in-milliseconds]

 

NOW([precision])
CURRENT_TIMESTAMP
CURRENT_TIMESTAMP([precision])
LOCALTIME, LOCALTIME([precision])
LOCALTIMESTAMP
LOCALTIMESTAMP([precision])

[링크 : https://mariadb.com/kb/en/now/]

'프로그램 사용 > mysql & mariaDB' 카테고리의 다른 글

mariaDB 설치 실패  (0) 2025.03.04
mariadb 초기설정  (0) 2022.08.30
mariadb c# connector  (0) 2021.10.22
HeidiSQL  (2) 2021.08.18
sql zerofill  (0) 2019.11.25
Posted by 구차니