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
template <typename I, typename O, typename Iterator> | |
inline void transform_image( | |
const cv::Mat_<I>& input, | |
cv::Mat_<O> *output, | |
Iterator iterator) { | |
if (input.size != output->size) { | |
DR_LOGE("Dimensions of input and output images must be identical."); | |
DR_LOGD("Skipping the rest."); | |
return; | |
} |
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
var users = [[String: String?]]() | |
users = [ | |
[ | |
"name": "john", | |
"age": nil | |
], | |
[ | |
"name": "smith", | |
"age": "22" | |
] |
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
# | |
# number of interchanges | |
# | |
require 'nokogiri' | |
require 'open-uri' | |
ic_urls = %w( | |
http://ja.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%BC%E3%83%81%E3%82%A7%E3%83%B3%E3%82%B8%E4%B8%80%E8%A6%A7_%E3%81%82%E8%A1%8C | |
http://ja.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%BC%E3%83%81%E3%82%A7%E3%83%B3%E3%82%B8%E4%B8%80%E8%A6%A7_%E3%81%8B%E8%A1%8C |
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
-# 以下はダミーコードで、動作検証はしていません | |
%ul#user-list | |
%script#profile-template(type="text/x-jquery-tmpl") | |
%li | |
!= link_to('${user.name}', user_path('---1')).sub('---1', '${user.id}') | |
:coffee | |
users = [ |
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
all: | |
platex -kanji=euc tech-jsample | |
pbibtex -kanji=euc tech-jsample | |
platex -kanji=euc tech-jsample | |
platex -kanji=euc tech-jsample | |
dvipdfmx -p a4 tech-jsample | |
open tech-jsample.pdf | |
clean: | |
/bin/rm -f *~ *.log *.dvi *.blg *.aux *.out *.bbl tech-jsample.pdf |
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
all: | |
platex -kanji=euc tech-jsample | |
#pbibtex -kanji=euc tech-jsample | |
platex -kanji=euc tech-jsample | |
platex -kanji=euc tech-jsample | |
dvipdfmx -p a4 tech-jsample | |
open tech-jsample.pdf | |
clean: | |
/bin/rm -f *~ *.log *.dvi *.blg *.aux *.out *.bbl tech-jsample.pdf |
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
// | |
// UIColor+Utilities.h | |
// | |
// ref: | |
// https://gist.github.com/1219029 | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIColor (Utilities) |
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
// 2012-10-16 M. Yasumura | |
#include <iostream> | |
using namespace std; | |
// if leap year then return true else return false; | |
bool leap_year(int y){ | |
if (y % 4 != 0) return false; | |
else if (y % 100 != 0) return true; | |
else if (y % 400 != 0) return false; | |
else return true; |
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
#! /bin/bash | |
# カレントディレクトに引数で指定したアプリケーション名のディレクトリをつくって、 | |
# Rails3のアプリケーションにします。オレオレテンプレなので使わない方がいいかも | |
if [ $# -ne 1 ]; then | |
echo "指定された引数は$#個です。" 1>&2 | |
echo "実行するには1個の引数(アプリケーション名)が必要です。" 1>&2 | |
exit 1 | |
fi |
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
# coding: utf-8 | |
# 突然の死ジェネレータ | |
# $ ruby totsuzen.rb 突然の死 | |
# | |
str = ARGV.join("\s") | |
len = str.length / 3 + 1 | |
s = "_" << "人" * len << "_\n> " << str << " <\n ̄" << "Y" * len << " ̄\n" | |
puts s |
NewerOlder