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
<?php | |
//こういうのがあって | |
$structures = array( | |
array("structure_first" => "first001","structure_second" => "second001","structure_third" => "third001","count" => 1), | |
array("structure_first" => "first002","structure_second" => "second002","structure_third" => "third002","count" => 1), | |
array("structure_first" => "first003","structure_second" => "second003","structure_third" => "third003","count" => 1), | |
array("structure_first" => "first004","structure_second" => "second004","structure_third" => "third004","count" => 1), | |
); |
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
package com.mycode | |
object App { | |
def main(args : Array[String]) { | |
val receiver = new Receiver | |
val task = new ConcreteCommandTask(receiver) | |
val play = new ConcreteCommandTaskPlay(receiver) | |
val invoker = new Invoker |
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
package com.mycode | |
object App { | |
def main(args : Array[String]) { | |
val addSalt = new AddSaltCommand | |
val addWater = new AddWaterCommand | |
val makeSaltWater = new MakeSaltWaterCommand | |
addSalt.setBeaker(new Beaker(100,0)) | |
addWater.setBeaker(new Beaker(0,10)) |
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
package com.mycode | |
object App extends LoggerSupport with LoginSupport with DbSupport{ | |
def main(args : Array[String]) { | |
//開始ログ | |
logger("START main") | |
//ログイン | |
login("arakaki") |
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
<html ng-app='myApp'> | |
<body ng-controller='TextController'> | |
<p>{{someText.message}}</p> | |
<p ng-bind="greeting"></p> | |
<p>{{greeting}}</p> | |
<form ng-controller="StartUpController"> | |
Starting: <input ng-change="computeNeeded()" | |
ng-model="funding.startingEstimate"> | |
Recommendation: {{funding.needed}} |
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
<?php | |
/** | |
* Created by IntelliJ IDEA. | |
* User: arakakiyuusuke | |
* Date: 2013/09/16 | |
* Time: 17:50 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
function outerFunction(){ |
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
people = %w(alice bob charile) | |
block = Proc.new{|name| puts name} | |
people.each &block |
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
def block_sample(&block) | |
puts 'statu up' | |
block.call if block | |
puts 'sit down' | |
end | |
block_sample do |
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
def default_argument_for_block | |
yield | |
end | |
default_argument_for_block do |val = 'Hi'| | |
puts val | |
end | |
def flexible_arguments_for_block | |
yield 1,2,3 |
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
def with_current_time | |
yield Time.now | |
end | |
with_current_time do |now| | |
puts now.year | |
end |