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 fizzbuzz(args:Int){ | |
(1 to args).foreach({ i => | |
if((i%3)==0 && (i%5)==0) | |
println("FizzBuzz") | |
else if(i % 3 == 0) | |
println("Fizz") | |
else if(i % 5 == 0) | |
println("Buzz") | |
else | |
println(i) |
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
// Register UiTestSampleActivity... | |
Instrumentation mInstrumentation = getInstrumentation(); | |
Instrumentation.ActivityMonitor monitor = mInstrumentation.addMonitor(UiTestSampleActivity.class.getName(), null, false); |
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
// Wait for it to start... | |
Activity mCurrentActivity = getInstrumentation().waitForMonitorWithTimeout(monitor, 5); |
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
// Check initial state... | |
TextView textView = (TextView)mCurrentActivity.findViewById(jp.modal.soul.uiTestSample.R.id.mainTextView); | |
assertEquals("Hello World, UiTestSampleActivity!", textView.getText().toString()); |
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
// Wait for transited page to start... | |
mCurrentActivity = getInstrumentation().waitForMonitorWithTimeout(monitor, 5); |
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
// Check transited state... | |
textView = (TextView)mCurrentActivity.findViewById(jp.modal.soul.uiTestSample.R.id.transitedTextView); | |
assertEquals(textView.getText().toString(), "Transited."); |
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 scala.collection.immutable.Map | |
/** | |
* Created with IntelliJ IDEA. | |
* User: modal_soul | |
* Date: 12/06/02 | |
* Time: 23:06 | |
*/ | |
// 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
package it.fbIntegration | |
package lib | |
import org.joda.time.DateTime | |
import net.liftweb._ | |
import common._ | |
import json._ | |
import http.{ Factory, S, SessionVar } | |
import util.{ Helpers, Props } |
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 it.fbIntegration | |
package snippet | |
import lib.FacebookGraph | |
import model.User | |
import scala.xml.{ NodeSeq, Text } | |
import net.liftweb._ | |
import common._ |
OlderNewer