Skip to content

Instantly share code, notes, and snippets.

View sh-cho's full-sized avatar
💬
I may be slow to respond.

Seonghyeon Cho sh-cho

💬
I may be slow to respond.
View GitHub Profile
@sh-cho
sh-cho / is-contain-hangul.c
Created September 5, 2017 16:51
is contain hangul?
#include <stdio.h>
#include <wchar.h> //wcslen
int is_contain_hangul(const wchar_t *str) {
const size_t len = wcslen(str);
const wchar_t start_ch = L'가';
const wchar_t end_ch = L'힣';
register int i;
for (i = 0; i < len; ++i) {
@sh-cho
sh-cho / cpp11-random-int.cpp
Last active September 5, 2017 16:52
c++11 random int
#include <random>
#include <iostream>
using namespace std;
int main() {
std::random_device rd;
std::mt19937 rng(rd());
std::uniform_int_distribution<int> uni(0, 10000000);
for (int i = 0; i < 10; ++i) {