Skip to content

Instantly share code, notes, and snippets.

View ozw-sei's full-sized avatar

Seijiro Ozawa ozw-sei

View GitHub Profile
@ozw-sei
ozw-sei / gist:9722d3cdd47413e79eb1
Created February 18, 2015 11:15
グラデーション
void main()
{
vec2 uv = iScreen;
vec4 color = texture2D(iCamera, uv);
//gl_FragColor = vec4(color.rgb, 1.0);
float a = gl_FragCoord.x / iResolution.x;
gl_FragColor = vec4(vec3(a), 1.0);
}
echo "     ,、,,,、,,, "
echo "    _,,;' '\" '' ;;,, "
echo "  (rヽ,;''\"\"''゛゛;,ノr)     "
echo "   ,; i ___ 、___iヽ゛;,  テスト書いてないとかお前それ@t_wadaの前でも同じ事言えんの?"
echo "  ,;'''|ヽ・〉〈・ノ |゙ ';, "
echo "  ,;''\"|   ▼   |゙゛';, "
echo "  ,;'' ヽ _人_ / ,;'_ "
echo " /シ、 ヽ ⌒⌒ /  リ \ "
echo "|   \"r,,`\"'''゙´  ,,ミ| "
echo "|     リ、    ,リ   | "

テストケース洗い出し方

※機能要件のみ

#テストケースベースのテスト手法

#ホワイトボックステスト

プログラマがコードを確認して行う プログラムが論理的に正しいか解析するテスト

interface Document{}
interface Read extend Document{}
interface Write extend Document{}
class HTML implements Read;
class PDF implements Read;
class MarkDown implements Write;
class Wiki implements Write;
interface Parser<T <: Write>{
public T parse(Resource resource);
@ozw-sei
ozw-sei / unzip.scala
Created July 29, 2015 21:26
unzip.scala
scala> val a = List(("one", 1), ("two", 2))
a: List[(String, Int)] = List((one,1), (two,2))
scala> a.unzip
res0: (List[String], List[Int]) = (List(one, two),List(1, 2))
scala>
scala> val e =List( (1, "one"), (2, "two"), (3, "three"))
e: List[(Int, String)] = List((1,one), (2,two), (3,three))
scala> e.unzip
res4: (List[Int], List[String]) = (List(1, 2, 3),List(one, two, three))
scala>
/**
* DB Connection
* @type {{host, user, password, database}}
*/
var params = (function(){
if(sails.config.environment == 'production'){
return {
host: sails.config.connections.prodMysqlServer.host,
user: sails.config.connections.prodMysqlServer.user,
password: sails.config.connections.prodMysqlServer.password,
//Phantomjsを使ってPDFをエクスポートしてみた
var phantom = require('phantom')
phantom.create(function(ph){
ph.createPage(function(page) {
page.open("http://www.google.com", function(status) {
page.render('google.pdf', function(){
console.log('Page Rendered');
#pragma strict
public var speed : float = 3; public var jumpPower : float = 6;
private var direction : Vector3 = Vector3.zero;
private var playerController : CharacterController;
private var animator : Animator;
function Start() {
playerController = GetComponent( CharacterController );
animator = GetComponentInChildren( Animator );
using System;
namespace LSD
{
public interface IEither<T1, T2>
{
U Use<U>(Func<T1, U> ofLeft, Func<T2, U> ofRight);
bool IsRight{
get;
}