View main.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// forked from https://qiita.com/kabochapo/items/8738223894fb74f952d3 | |
import 'dart:async'; | |
void main() { | |
final data = {'イチゴ': '苺', 'イチジク': '無花果', 'リンゴ': '林檎'}; | |
final controller = StreamController<String>(); | |
controller.sink.add('イチゴ'); |
View List2D.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
namespace System.Collections.Generic | |
{ | |
public class List2D<T> : IEnumerable<List2dIndexer<T>> where T : new() | |
{ | |
public List2D(int w, int h) | |
{ | |
mWidth = w; | |
mHeight = h; |
View file0.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
template <typename List> | |
void split(const std::string& s, const std::string& delim, List& result) | |
{ | |
result.clear(); | |
using string = std::string; | |
string::size_type pos = 0; |
View Main.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "immutable.hpp" | |
#include <vector> | |
#include <list> | |
#include <string> | |
#include <cassert> | |
using namespace std; | |
int main(void){ |
View InvertedSphere.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
public class InvertedSphere : EditorWindow { | |
private string st = "1.0"; | |
[MenuItem("GameObject/Create Other/Inverted Sphere...")] | |
public static void ShowWindow() { | |
EditorWindow.GetWindow(typeof(InvertedSphere)); | |
} |
View Image2D.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sstream> | |
#include <vector> | |
#include <random> | |
#include <cstdio> | |
// 2次元画像クラス | |
class Image2D { | |
public: | |
// Int に Pixel という別名をつける |
View Converter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Converter | |
{ | |
static unsigned short UShort(unsigned char b1, unsigned char b2) | |
{ | |
return (unsigned short)( (0xff00 & (b2 << 8)) | (0x00ff & (b1 << 0)) ); | |
} | |
static short Short(unsigned char b1, unsigned char b2) | |
{ |
View FixedQueue.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <deque> | |
/** | |
* 固定長キュークラス | |
*/ | |
template <typename T> | |
class FixedQueue | |
{ | |
public: |
View CurryImpl.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** A -> (B -> C) 型の関数オブジェクト */ | |
template <typename A, typename B, typename C> | |
struct CurryImpl { | |
// コンストラクタでオリジナルの関数をキャプチャ | |
CurryImpl(function<C(A, B)>& f) : mFunc(f) {} | |
/** B -> C 型の関数オブジェクトをリターンする */ | |
function< C(B) > operator () (A& a) { | |
return CurryImpl2(mFunc, a); |
View file0.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Microsoft.Office.Interop.Word; | |
using Word = Microsoft.Office.Interop.Word; | |
namespace WordSample | |
{ |
NewerOlder