This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

*/

살구꽃

 옥상에 심어둔 살구나무에 꽃이 활짝 피었네요.



관련글

git 사용자 이름/패스워드 Repository별 저장

git 사용시 repository별 사용자명과 패스워드를 설정하고자 할때 

터미널에서 해당 repository 디렉토리에서 git config user.name "사용자명"을 입력하고,

$ git config user.name "amos"

패스워드를 다음과 같이 입력한다.  git config user.password "패스워드"

git config user.password "amosxxxx"

이후에는 pull 혹은  push시 username과 password를 입력하라는 프롬프트가 안나온다.

설정되어 있는 username과 password를 보고자 할때는 .git 폴더에서 config파일을 확인하면 된다.

 nano  .git/config

[core]
  repositoryformatversion = 0
  filemode = false
  bare = false
  logallrefupdates = true
[remote "origin"]
  url = https://xxx.xxx.xx/xx/yy.git
  fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
  remote = origin
  merge = refs/heads/master
[user]
  name = amos
  password = amosxxx


코로나 검사

오늘은 중앙 보훈병원 선별진료소에서 코로나 검사를 받았다. 

지난주 검사는 잠실운동장 건너편에 있는 임시 선별 진료소에서 받았는데 짧은 시간 검사지만 너무 아파서 조금 멀지만 이곳까지 왔다. 오전 10시 대기하는 사람은 2명으로 

남자분이 검사하는데 기대한 것처럼 콧속이 살짝 간지러운것으로 끝났다. ^^

검사 결과는 오후에 나온다고 한다. 빠르다.





코로나 간이 검사

 코로나 간이 검사를 받았습니다. ㅜ.ㅜ

잠실운동장 건너편 아시아공원 입구에 있는 간이 검사소에서... 점심시간전에 방문했는데 대기자 6~7명 수준으로 대기시간 10분이내에 진행이 되네요.

코에서 검체를 체취하는데 고통스럽습니다. 

빨리 백신이 도입되어야 할 것 같네요.

의료진들 봉사자들 모두 힘내세요.. 

Linux에서 파일명 일괄 변경

 현재 디렉토리 하위에 있는 file명이 from으로 시작되는 모든 파일(fromxxx.xx)을 to로 시작하는 파일로 한번에 변경

 find ./ -name "from*" | sed -e 'p' -e "s/from/to/g" | xargs -n 2 mv


rename 명령어로 변경하기

형식 : rename 's/파일명/변경할파일명/' 대상파일필터

예) 

 rename 's/from/to/' ./*

Visual Studio Code에서 arduino 사용하기

Visual Studio Code에서 arduino를 위한 확장 설치

설치순서


1.확장탭을 누르고 2.검색창에 "arduino"를 입력하면 arduino관련된 확장모듈이 검색된다. 첫번째로 검색된 Microsoft에서 나온 Arduino 확장의 3. install버튼을 클릭한다.

전제조건

Arduino IDE 필요. (다운로드 에서 arduino IDE를 다운받아 설치)

Visual Studio Code 설정

VS Code에서  < Ctrl > + < , > 두키를 동시에 누르면 Search settings 메뉴가 표출된다 여기에서 Extensions > Arduino configuration 을 선택하고 

아래와 같이 Edit in settings.json를 편집한다.
{
    "arduino.path""C:/Program Files (x86)/Arduino",
    "arduino.commandPath""arduino_debug.exe",
    "arduino.logLevel""info",
    "arduino.allowPDEFiletype"false
    "arduino.enableUSBDetection"true,
    "arduino.disableTestingOpen"false,
    "arduino.skipHeaderProvider"false,
    "arduino.additionalUrls": [
        "https://raw.githubusercontent.com/VSChina/azureiotdevkit_tools/master/package_azureboard_index.json",
        "http://arduino.esp8266.com/stable/package_esp8266com_index.json"
    ],
    "arduino.defaultBaudRate"115200
}
"arduino.path" 는 위에서 arduino IDE를 설치한 디렉토리를 기재하여야 한다.

Commands

  • Arduino: Board Manager: Manage packages for boards. You can add 3rd party Arduino board by configuring Additional Board Manager URLs in the board manager.
  • Arduino: Change Baud Rate: Change the baud rate of the selected serial port.
  • Arduino: Change Board Type: Change board type or platform.
  • Arduino: Close Serial Monitor: Stop the serial monitor and release the serial port.
  • Arduino: Examples: Show list of examples.
  • Arduino: Initialize: Scaffold a VS Code project with an Arduino sketch.
  • Arduino: Library Manager: Explore and manage libraries.
  • Arduino: Open Serial Monitor: Open the serial monitor in the integrated output window.
  • Arduino: Select Serial Port: Change the current serial port.
  • Arduino: Send Text to Serial Port: Send a line of text via the current serial port.
  • Arduino: Upload: Build sketch and upload to Arduino board.
  • Arduino: Upload Using Programmer: Upload using an external programmer.
  • Arduino: Verify: Build sketch.

Reference

관련문서



Image buffer를 Bitmap file format으로 저장하기(RGB)

Image처리를 하다보면 memory buffer에 있는 image raw데이터를 BMP포멧으로 저장할 필요가 있다.
RGB Buffer(24bit)를 widows bitmap format으로 저장하는 함수

// _fname : 저장할 파일 명( xxx.bmp )
// _buf : RGB 순서로 구성된 Image buff
// _w, _h : image width, height
void saveBMPfile(char *_fnameuchar* _bufint _wint _h)
{
    int filesize = 54 + _w * _h * 3;
    unsigned char bmpfileheader[14] = {'B','M'0,0,0,00,00,054,0,0,0};
    unsigned char bmpinfoheader[40] = {40,0,0,00,0,0,00,0,0,01,08,0};
    unsigned char bmppad[3] = {0,0,0};

    bmpfileheader2] = (unsigned char)(filesize    );
    bmpfileheader3] = (unsigned char)(filesize>> 8);
    bmpfileheader4] = (unsigned char)(filesize>>16);
    bmpfileheader5] = (unsigned char)(filesize>>24);

    bmpinfoheader4] = (unsigned char)( _w    );
    bmpinfoheader5] = (unsigned char)( _w>> 8);
    bmpinfoheader6] = (unsigned char)( _w>>16);
    bmpinfoheader7] = (unsigned char)( _w>>24);
    bmpinfoheader8] = (unsigned char)( _h    );
    bmpinfoheader9] = (unsigned char)( _h>> 8);
    bmpinfoheader[10] = (unsigned char)( _h>>16);
    bmpinfoheader[11] = (unsigned char)( _h>>24);

    FILE* fp;
    fp =fopen(_fname, "wb");
    if(fp!=NULL) {
        fwrite(bmpfileheader, 114, fp);
        fwrite(bmpinfoheader, 140, fp);
        fwrite(_buf, _w*_h, 3, fp);
        fclose(fp);
    }
}


* Gray Bufferer 저장하기 : 링크

관련문서