Skip to content

Instantly share code, notes, and snippets.

View hsnks100's full-sized avatar
😍
wow

Han Gyoung-Su hsnks100

😍
wow
View GitHub Profile
struct header1 {
uint16_t a1;
int16_t a2;
int16_t a3;
int16_t a4;
int16_t a5;
int16_t a6;
int16_t a7;
@hsnks100
hsnks100 / .vimrc
Created July 30, 2018 08:07
제언이 선물
syntax on
"language en_US.UTF-8
set fileencodings=utf-8,euc-kr
set encoding=utf-8
set langmenu=en_US
let $LANG = 'en_US'
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
@hsnks100
hsnks100 / example.cpp
Created July 27, 2018 00:37
가감속
std::shared_ptr<boost::asio::deadline_timer> m_motorTimer;
FromToWithDuration2<float> fromLeft(현재값, 목표값, 1000);
auto self = shared_from_this();
m_motorTimer = createSchedule(m_ioService, 100, [this, self, 목표값, 증감값(=맥스출력/10)]()->bool{
bool res = fromLeft.stepValue(증감값);
if(res == false)
return res;
m_leftMotorValue = fromLeft.getValue();
모터돌리기(
#include <mutex>
#include <stb_image.h>
#include <nanogui/nanogui.h>
class VideoView: public nanogui::GLCanvas {
public:
nanogui::GLShader shader;
GLuint textureId;
unsigned char* pixelBuffer;
#include "FileControl.h"
CFileControl::CFileControl()
{
// Construct
this->top = filecheck(); //top에다가 대입
}
CFileControl::~CFileControl()
{
@hsnks100
hsnks100 / SaveData.h
Created May 29, 2018 15:20
SaveData can save json-file, edit json-file. It also need nlohmann/json(json.hpp)
#include <streambuf>
#include <iostream>
#include <sstream>
#include <fstream>
#include "json.hpp"
template <char const* m_fileName>
struct SaveData
{
#include "string-util.h"
#include <zlib.h>
#include <memory.h>
using namespace std;
string insertSeparator(const string& s, char separator, int width)
{
string ss = s;
@hsnks100
hsnks100 / ks19937.cpp
Created May 29, 2018 06:53
mt19937 utility
#include "ks19937.h"
std::mt19937 ks19937::rng;
#include "FileControl.h"
CFileControl::CFileControl()
{
// Construct
this->top = filecheck(); //top에다가 대입
}
CFileControl::~CFileControl()
{

R 학습 노트

기본 표현

표현
10
1 + 2
문자열 "string"