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
def array = [] | |
def tmp = "" | |
array = ('0'..'9') + ('a'..'z') + ('A'..'Z') + '_' | |
(1..16).each { | |
tmp += array[Math.floor(Math.random() * array.size()) as int] | |
} | |
println tmp |
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
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
public class ScriptingForJavaScript { | |
public static void main(String[] args) throws Exception { | |
ScriptEngineManager factory = new ScriptEngineManager(); | |
ScriptEngine engine = factory.getEngineByName("js"); | |
try { |
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
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
public class ScriptingForJavaScript { | |
public static void main(String[] args) throws Exception { | |
ScriptEngineManager factory = new ScriptEngineManager(); | |
ScriptEngine engine = factory.getEngineByName("js"); | |
Object obj= new Object(); |
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
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
public class ScriptingForJavaScript { | |
public static void main(String[] args) throws Exception { | |
ScriptEngineManager factory = new ScriptEngineManager(); | |
ScriptEngine engine = factory.getEngineByName("js"); | |
try { |
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
#/usr/bin/python | |
# coding:utf-8 | |
""" | |
PFIブログの問題 | |
http://research.preferred.jp/2011/07/intern2011_problem/ | |
の解答。アイディアとしては | |
・最大になる文字の候補を2つに絞る | |
・それぞれの候補に対して、候補が実際に文字列の半分以上あるか調べる | |
の2ステップで行う。 |
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(?)x=["",show x,"Fizz","Buzz","FizzBuzz"]!!div(x?3+x?5)2 | |
main=mapM(putStrLn.a gcd)[1..100] |
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
#http://ssrs.dpri.kyoto-u.ac.jp/~nakamichi/exercise/presentation.pdf | |
#を実装したけど渦にならない・・・ | |
datadir = "YOUR SAVE DIR PATH" | |
import random,copy | |
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
object SnocList{ | |
} | |
sealed trait SnocList[+A] { | |
def isEmpty : Boolean | |
def ::>[B >: A] (x: B): SnocList[B] = new ::>[B](this, x) | |
def map[B](f: A=>B) : SnocList[B] = this match { | |
case SnocNil => SnocNil |
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
object SnocList{ | |
def empty = SnocNil | |
} | |
sealed trait SnocList[+A] { | |
def isEmpty : Boolean | |
def head : A | |
def tail : SnocList[A] | |
def ::>[B >: A] (x: B): SnocList[B] = new ::>[B](this, x) |
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
#hogehoge/python | |
# coding=utf-8 | |
#ファインマンダイアグラムの描画 | |
#ファインマンダイアグラムについては、fetter-waleckaの本を参照 | |
# | |
#内容 | |
#・ファインマンダイアグラムの計算(文字情報。\latex形式に出力可能) | |
#・計算したダイアグラムデータのベクトル画像化(ベクトル画像情報。できれば.ai形式に) | |
#・ベクトル画像化したダイアグラムデータのpng(gif?)画像化 |
OlderNewer