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;
@hsnks100
hsnks100 / FileControl.cpp
Created June 4, 2018 14:52
์ฒซ์ž‘
#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"