Skip to content

Instantly share code, notes, and snippets.

View Gitmoko's full-sized avatar

STM/Ryotaro Gitmoko

View GitHub Profile
@Gitmoko
Gitmoko / 0_reuse_code.js
Created October 7, 2015 15:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Gitmoko
Gitmoko / make_function.cpp
Created October 7, 2015 15:19
make std::function from lambda without describing explicit function type
#include<functional>
namespace make_function{
template<class R = void,class C = void,class... A>
struct impl;
template<class R,class C,class... A>
struct impl<R (C::*)(A...)const>{
using type = R(*)(A...);
};
#ifdef GL_ES
precision mediump float;
#endif
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
//反復回数(constで書く方も多い)
#define ITE_MAX 190
#define PICOJSON_USE_INT64
#include <fstream>
#include <iostream>
#include <stdexcept>
#include <picojson.h>
#include <valijson/utils/picojson_utils.hpp>
#include <valijson/adapters/picojson_adapter.hpp>
#include <valijson/schema.hpp>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>child</class>
<widget class="QWidget" name="child">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
#ifndef BinaryOperatorsCalculatersH
#define BinaryOperatorsCalculatersH
#include<algorithm>
#define ParserOpeq ==
#define ParserOpnoteq !=
#define ParserOpand_ &&
#define ParserOpor_ ||
#define ParserOprelless <
@Gitmoko
Gitmoko / source.c
Created October 26, 2016 04:27
parser_by_c
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<ctype.h>
#include<stdlib.h>
#include<string.h>
char str[512];
int digit(int*pos) {
int ret = 0;
while (isdigit(str[*pos])) {
ret *= 10;
{
"title": "CNS",
"type": "array",
"items": {
"type": "object",
"properties":{
"StateNum" : {
"type":"number"
},
"SttateData":{
#include<cmath>
#include<algorithm>
#include<vector>
#include<iostream>
#include<random>
constexpr auto CARDSMAX = 30u;
struct IncGenerator {
int current_;
IncGenerator (int start) : current_(start) {}
{
"title": "CNS",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"NAME": {
"type": "string"
},