Posted
Filed under 음악감상실




2018/07/24 09:05 2018/07/24 09:05
Posted
Filed under 개발/그외
2018/07/10 00:16 2018/07/10 00:16
Posted
Filed under 개발/그외


2018/07/09 16:49 2018/07/09 16:49
Posted
Filed under 개발/그외
'libpng warning: iCCP: known incorrect sRGB profile' 이 발생하는 이유는 libpng 1.6 이상의 버전에서 기존의 sRGB 프로필에 대해 경고를 토하기 때문이다.
https://wiki.archlinux.org/index.php/Libpng_errors

이 에러를 회피하기 위해서는 png 파일에서 sRGB 프로필을 벗겨내면 되는데, 이를 위해 ImageMagick이라는 프로그램이 존재한다.
http://www.imagemagick.org/script/index.php

설치판을 받아도 되고 포터블판을 받아도 되는데, convert 명령을 다음과 같이 쓰면 프로필을 벗길 수 있다.
convert <in_img> -strip <out_img>

파일이 많은 경우에는 다음 페이지에서와 같이 배치파일을 만들어서 그 디렉토리에서 돌리면 일괄변환을 해 준다.
https://gist.github.com/bluenex/0af2f41fda9954df73a8
2018/07/09 15:33 2018/07/09 15:33
Posted
Filed under 음악감상실


2018/06/08 22:15 2018/06/08 22:15
Posted
Filed under 음악감상실
2018/05/20 22:43 2018/05/20 22:43
Posted
Filed under 음악감상실


2018/05/13 20:32 2018/05/13 20:32
Posted
Filed under Games/PlayStation
2018/05/09 08:24 2018/05/09 08:24
Posted
Filed under 개발/그외
http://bluese05.tistory.com/5

http://brownbears.tistory.com/144

https://stackoverflow.com/questions/576169/understanding-python-super-with-init-methods

https://code.i-harness.com/en/q/8caa9
2018/04/26 15:16 2018/04/26 15:16
Posted
Filed under 개발/Linux
라즈베리파이에서 구동되는 마인크래프트는 화면에 직접 렌더링을 하기 때문에 x윈도우 화면을 받아오는 원격접속으로는 마인크래프트가 실행은 되도 화면이 보이지 않는다.

하지만 다음과 같이 RealVNC에서 설명하는것처럼 라즈비안에서 Vncserver를 설치 후
https://github.com/RealVNC/raspi-preview#optimizingVncViewer

원격 컴퓨터에서 RealVNC로 접속하여
https://www.realvnc.com/en/connect/download/viewer/

라즈비안의 VNC server에서 Enable experimental direct capture mode를 선택하면 화면을 그대로 받아와서 뿌려주게 되므로 원격접속에서도 마인크래프트를 실행시킬 수 있다
https://wikidocs.net/3208

2018/04/14 22:20 2018/04/14 22:20
Posted
Filed under 개발/그외
[code cpp]
#include <stdio.h>

int main()
{
    int (*arr2[]) = {
        (int[]) {0,1,2,3},
        (int[]) {4,5},
        (int[]) {6,7,8}
    };
   
    int row = 0;
    for(int i = 0; i < 4; i++)
    {
        printf("layer1[%d][%d] Address: %p Value: %d\n", row, i, &arr2[row][i], arr2[row][i]);
    }
    printf("\n");
   
    row = 1;
    for(int i = 0; i < 2; i++)
    {
        printf("layer1[%d][%d] Address: %p Value: %d\n", row, i, &arr2[row][i], arr2[row][i]);
    }
    printf("\n");
   
    row = 2;
    for(int i = 0; i < 3; i++)
    {
        printf("layer1[%d][%d] Address: %p Value: %d\n", row, i, &arr2[row][i], arr2[row][i]);
    }
    printf("\n");

    return 0;
}
[/code]
2018/03/24 10:10 2018/03/24 10:10
Posted
Filed under 개발/그외
free함수로 메모리를 해제한 뒤 포인터값을 NULL로 지정하는 기능까지 추가하여 free 함수를 재정의한다.

[code]
#include <stdio.h>

void saferFree(void **pp)
{
    if(pp != NULL && *pp != NULL)
    {
        free(*pp);
        *pp = NULL;
    }
}

#define safeFree(p) saferFree((void**)&(p))

int main()
{
    int *p1;
    p1 = (int *)malloc(sizeof(int));
    *p1 = 5;
    printf("Before: %p\n", p1);
    safeFree(p1);
    printf("After: %p\n", p1);
    safeFree(p1);

    return 0;
}
[/code]
2018/03/23 16:01 2018/03/23 16:01