def concatAsString(a: Int, b: Int): String = {
val a_ = a.toString();
val b_ = b.toString();
return a_.+(b_);
}
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
/// <reference path="../typings/tsd.d.ts"/> | |
module DEMO { | |
export class Layout { | |
display($el: JQuery) { | |
$('body').append($el); | |
} |
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
class Human | |
constructor: (@name) -> | |
sayName: () -> | |
return @name | |
class Oiwa extends Human | |
constructor: (@name = "oiwa")-> | |
super @name |
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
# Assignment: | |
num = 42 | |
opposite = true | |
# Conditions: | |
number = -42 if opposite | |
# Functions: | |
square = (x) -> x * 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
#!/bin/sh | |
for f in *.mp4.mp4; do | |
mv $f ${f%.mp4.mp4}.mp4; | |
done |
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 str = "string"; | |
console.log(str); // string: string | |
var num = 10; | |
console.log(num); // 10: number | |
var flag = true; | |
console.log(flag) // true: boolean | |
var list = [1, 2, 3, 4]; |
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
interface ICarousel { | |
run(): void; | |
} | |
class FadeCarousel implements ICarousel { | |
run() { | |
console.log('fade'); | |
} | |
} |
一時的に保存
% git stash pop {{stash name}}