This file contains hidden or 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
<tile> | |
<visual version="2"> | |
<binding template="TileSquare150x150Text04" fallback="TileSquareText04"> | |
<text id="1">Hello world!</text> | |
</binding> | |
</visual> | |
</tile> |
This file contains hidden or 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
#pragma once | |
#include <vector> | |
#include <list> | |
// Link-Cut 木 | |
template<class T=int> class link_cut_tree { | |
public: | |
struct node; |
This file contains hidden or 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
#pragma once | |
#include <vector> | |
#include <list> | |
// スプレー木 | |
template<class T=int> class splay_tree { | |
public: | |
struct node; |
This file contains hidden or 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
#pragma once | |
#include <vector> | |
#include <list> | |
// 2分木 | |
// 再配置もきっと怖くない | |
template<class T=int> class bitree { | |
public: |
This file contains hidden or 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
#pragma once | |
#include <vector> | |
#include <list> | |
// 子の数がたくさんあっても大丈夫な木 | |
// 再配置もきっと怖くない | |
template<class T=int> class tree { | |
public: |
This file contains hidden or 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
#pragma once | |
#include <vector> | |
#include <list> | |
// vectorの再配置されたら死ぬ | |
template<class T=int, class W=int, class F=int> | |
class graph { | |
public: | |
struct node; |
This file contains hidden or 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
import play.api.data._ | |
import play.api.data.format._ | |
import play.api.data.format.Formats._ | |
/** | |
* Option[T]をクエリとして解決するためのバインダ(必須でないパラメータなどに利用することを想定) | |
* 通常のFormと同様にbindFromRequestして使う | |
* クエリに該当するキーが含まれていない場合にはFormの値がNoneになる | |
* | |
* こんなかんじ (もっときれいに書きたいけど): |
This file contains hidden or 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
#!/usr/bin/env bash | |
do_svm_install() { | |
svm_path=$HOME/.svm | |
if [[ ! -d "$svm_path" ]]; then | |
echo "Making directory $svm_path" | |
mkdir -p $svm_path | |
fi | |
if [[ ! -e "$svm_path/bin/.git" ]]; then |
This file contains hidden or 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
#pragma once | |
#include <vector> | |
#include <algorithm> | |
#include <limits> | |
template<class T> | |
class starrysky { | |
public: | |
struct node { T add; T min; }; |
This file contains hidden or 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
#pragma once | |
#include <vector> | |
#include <algorithm> | |
template<class T> | |
class segtree { | |
public: | |
struct node { T all; T part; }; | |
explicit segtree(size_t N=1, T init=0) |