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
Sub procedureName() | |
Dim row As Long | |
Dim i As Long | |
Const COUNT_TARGET_COLUMN As Integer = 2 | |
Const dataPartRow As Long = 3 | |
row = Cells(Rows.count, COUNT_TARGET_COLUMN).End(xlUp).row | |
Application.ScreenUpdating = False | |
For i = row To dataPartRow Step -1 | |
' 表を末端から走査して行いたい処理を記述 |
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
println((1..100).inject([1G,1G]){fib,i->fib<<fib[i]+fib[i-1]}.collect{it%15==0?"FizzBuzz":it%3==0?"Fizz":it%5==0?"Buzz":it}) |
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 fact(n) {n<=1?1:fact(n-1)*n} | |
assert [1,1,2,6,24,120,720,5040,40320,362880,3628800] == (0..10).collect {fact(it)} |
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 fib(n) { | |
switch (n) { | |
case 0: 0; break | |
case 1..2: 1; break | |
default: n = fib(n-1) + fib(n-2); break | |
} | |
} | |
assert [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987] == (0..16).collect {fib(it)} |
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
# ls coloring and shortcut | |
alias l.='ls -d .* --color=always' | |
alias ll='ls -l --color=always' | |
alias la='ls -la --color=always' | |
alias ls='ls --color=always' | |
# vi -> vim | |
alias vi='vim' | |
# less coloring settings |
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
/** | |
* The global place to Tellurium configuration | |
* | |
* @author Jian Fang (John.Jian.Fang@gmail.com) | |
* | |
* Date: Aug 2, 2008 | |
* | |
*/ | |
tellurium{ |
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
package test; | |
import module.NewUIModule; | |
import org.junit.AfterClass; | |
import org.junit.Before; | |
import org.junit.BeforeClass; | |
import org.junit.Test; | |
import org.telluriumsource.test.java.TelluriumJUnitTestCase; | |
import org.telluriumsource.test.java.TelluriumJavaTestCase; |
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
package module | |
import org.telluriumsource.dsl.DslContext | |
class NewUIModule extends DslContext { | |
public void defineUi() { | |
ui.Form(uid: "TelluriumDownload", clocator: [tag: "form", method: "GET", action: "list"], group: "true"){ | |
Selector(uid: "DownloadType", clocator: [tag: "select", direct: "true", name: "can", id: "can"]) | |
InputBox(uid: "input", clocator: [tag: "input", type: "text", name: "q", id: "searchq"]) |
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 filter(list, p) { | |
def new_list = [] | |
list.each { i -> | |
if (p(i)) | |
new_list << i | |
} | |
new_list | |
} | |
modBy2 = { n -> n % 2 == 0} |
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 filter(list, p) { | |
if (list.size() == 0) return list | |
if (p(list.head())) | |
[] + list.head() + filter(list.tail(), p) | |
else | |
filter(list.tail(), p) | |
} | |
l = filter(1..20, {n-> n % 2 == 0}) |
OlderNewer