Skip to content

Instantly share code, notes, and snippets.

@yumetodo
yumetodo / string_split.hpp
Last active July 5, 2016 18:00
|で繋げたいための奮闘
#include <string>
#include <vector>
#include <type_traits>
namespace detail {
using std::vector;
namespace type_traits {
//
// is_char_type
//
template<typename T> struct is_char_type : public std::false_type {};
#include <DxLib.h>
#include <string>
#include <codecvt>
#include <vector>
#include <fstream>
int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int /*nCmdShow*/) {
//init
DxLib::SetOutApplicationLogValidFlag(FALSE);
DxLib::SetGraphMode(300, 100, 16);
DxLib::ChangeWindowMode(TRUE);
@yumetodo
yumetodo / !readme.md
Last active May 18, 2016 11:00 — forked from 3846masa/!readme.md
#vscode Visual Studio Codeのmarkdownでmathjaxを使えるようにするパッチ(仮)

Visual Studio Codeのmarkdownでmathjaxを使えるようにするパッチ(仮)

無保証

導入方法

  • markdownWorker.js にパッチを当てる
    • Windowsでは./Microsoft VS Code/resources/app/out/vs/languages/markdown/common
    • パッチを当てる前に,js-beautifyで整形してください
This file has been truncated, but you can view the full file.
# 1 "<built-in>"
# 1 "sample.cpp"
#if 0 /* expanded by -frewrite-includes */
#include "../include/string_split.hpp"
#endif /* expanded by -frewrite-includes */
# 1 "sample.cpp"
# 1 "./../include/string_split.hpp" 1
#if 0 /* expanded by -frewrite-includes */
#include <string>
#endif /* expanded by -frewrite-includes */
#include <iostream>
#include <array>
namespace detail {
using std::size_t;
template<size_t N>
constexpr size_t calc_size() { return calc_size<N - 2>() + 2 * N - 3; }
template<> constexpr size_t calc_size<0>() { return 0; }
template<> constexpr size_t calc_size<1>() { return 0; }
template<> constexpr size_t calc_size<2>() { return 1; }
template<> constexpr size_t calc_size<3>() { return 3; }
@yumetodo
yumetodo / DxLib_Update.ps1
Last active February 18, 2020 03:50
DxLib auto update script
if ($PSVersionTable.PSVersion.Major -lt 5) {
Write-Error "Powershell version 5 or later is required."
exit 1
}
function Compare-With-Current-Dxlib-Version ($dxlib_txt, $dxlib_expect_version) {
return (Test-Path $dxlib_txt) -And ($dxlib_expect_version -eq ([regex]"Ver ([0-9]+\.[0-9a-z]+)").Matches((Get-Content $dxlib_txt))[0].Groups[1].value.Replace(".", "_"));
}
[System.Console]::Write("fetch DxLib...")
$ProgressPreference = 'SilentlyContinue'
$dlhtml = Invoke-WebRequest -Uri "http://dxlib.o.oo7.jp/dxdload.html"
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>//in gcc
#include <errno.h>//in gcc
#include <stdbool.h>
#include <ctype.h>
#ifdef _MSC_VER
# define RESTRICT
#else
# define RESTRICT restrict
@yumetodo
yumetodo / iterator_wrapper.hpp
Last active June 6, 2018 12:34
イテレーターをラップしてイテレータを作る練習
#include <iterator>
#include <vector>
#include <iostream>
#include <utility>
struct Vec2f{
float x; float y;
};
struct Circle {
Vec2f pos;
float size;
@yumetodo
yumetodo / syntaxhighlighter_from_web.js
Last active November 11, 2016 08:34
UTF-8なplain textをfetchしてsyntaxhighlighterに力技でぶち込む
class syntaxhighlighter_from_web{
constructor(){
this.count_ = 0;
this.appended_ = 0;
this.load_all_called_ = false;
}
set appended(c){
this.appended_ = c;
if(true === this.load_all_called_ && this.appended_ === this.count_){
SyntaxHighlighter.all();
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2016-11-14 01:51:40" build="160710">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{Shells::cmd}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>