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
let list1 = [1..100] | |
let to_str i = | |
if (i%15) = 0 then "fizzbuzz" | |
else if (i%5) = 0 then "buzz" | |
else if (i%3) = 0 then "fizz" | |
else (string) i | |
let list2 = List.map to_str list1 |
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
require 'spec_helper' | |
describe "simulators pages", js: false do | |
before(:each) do | |
@sim = FactoryGirl.create(:simulator, | |
parameter_sets_count: 1, | |
runs_count: 3, | |
analyzers_count: 0 | |
) |
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
str = "no ruby, no life!" | |
h = {} | |
str.scan(/\w+/).each do |word| h[word] = h[word].to_i + 1 end | |
h |
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 x10.glb.ArrayListTaskBag; | |
import x10.glb.TaskQueue; | |
import x10.glb.TaskBag; | |
import x10.glb.GLBParameters; | |
import x10.glb.GLB; | |
import x10.util.Team; | |
import x10.glb.Context; | |
import x10.glb.ContextI; // ContextI : Interface for Context | |
import x10.glb.GLBResult; |
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
<?xml version="1.0"?> | |
<root> | |
<appdef> | |
<appname>iTERM2</appname> | |
<equal>com.googlecode.iterm2</equal> | |
</appdef> | |
<appdef> | |
<appname>MACVIM</appname> | |
<equal>org.vim.MacVim</equal> | |
</appdef> |
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 x10.util.ArrayList; | |
import x10.glb.ArrayListTaskBag; | |
import x10.glb.TaskQueue; | |
import x10.glb.TaskBag; | |
import x10.glb.GLBParameters; | |
import x10.glb.GLB; | |
import x10.util.Team; | |
import x10.glb.Context; | |
import x10.glb.ContextI; | |
import x10.glb.GLBResult; |
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 x10.util.ArrayList; | |
import x10.glb.ArrayListTaskBag; | |
import x10.glb.TaskQueue; | |
import x10.glb.TaskBag; | |
import x10.glb.GLBParameters; | |
import x10.glb.GLB; | |
import x10.util.Team; | |
import x10.glb.Context; | |
import x10.glb.ContextI; | |
import x10.glb.GLBResult; |
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 x10.util.ArrayList; | |
import x10.glb.ArrayListTaskBag; | |
import x10.glb.TaskQueue; | |
import x10.glb.TaskBag; | |
import x10.glb.GLBParameters; | |
import x10.glb.GLB; | |
import x10.util.Team; | |
import x10.glb.Context; | |
import x10.glb.ContextI; | |
import x10.glb.GLBResult; |
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
class Point01 { | |
static def p( o: Any ) { | |
Console.OUT.println( o ); | |
} | |
public static def main( args: Rail[String] ) { | |
Console.OUT.println("hello"); | |
// construct a 1-d point from Long |
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 x10.regionarray.Region; | |
class Region01 { | |
private static def p( o: Any ) { | |
Console.OUT.println( o ); | |
} | |
public static def main( args: Rail[String] ) { | |
val r1 = Region.make( 1..10 ); |