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
Reactive.select( | |
Reactive.where( | |
Reactive.range(1, 10), // <---------------- 元のデータソース {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} | |
new Func1<Integer, Boolean>() { // <----- where:偶数だけにフィルタリング | |
@Override | |
public Boolean invoke(Integer param1) { | |
return param1 % 2 == 0; | |
} | |
}), new Func1<Integer, Integer>() { // <- select:値を10倍に加工 | |
@Override |
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
Observable.Range(1, 10) // <------------------ 元のデータソース {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} | |
.Where(num => { return num % 2 == 0; }) // <-- 偶数だけにフィルタリング | |
.Select(num => { return num * 10; }) // <-- 値を10倍に加工 | |
.Subscribe(str => Debug.WriteLine(str)); // <-- 受信した結果をコンソールに出力 | |
// output: | |
// 20 | |
// 40 | |
// 60 | |
// 80 |
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
<?xml version="1.0" encoding="utf-8"?> | |
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" title="Tab1Label" | |
actionBarVisible="false"> | |
<fx:Declarations> | |
<!-- 非ビジュアルエレメント (サービス、値オブジェクトなど) をここに配置 --> | |
</fx:Declarations> | |
</s:View> |
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
Reactive.select( | |
Reactive.where( | |
Reactive.range(1, 10), | |
new Func1<Integer, Boolean>() { | |
@Override | |
public Boolean invoke(Integer param1) { | |
return param1 % 2 == 0; | |
} | |
}), | |
new Func1<Integer, Integer>() { |
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
ObservableBuilder.range(1, 10) // 元のデータソース | |
.where(new Func1<Integer, Boolean>() { // 偶数だけを抽出 | |
@Override | |
public Boolean invoke(Integer param1) { | |
return param1 % 2 == 0; | |
} | |
}) | |
.select(new Func1<Integer, Integer>() { // 結果を3倍にする | |
@Override | |
public Integer invoke(Integer param1) { |
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
- (void)startSend:(NSString *)filePath | |
{ | |
BOOL success; | |
NSURL * url; | |
assert(filePath != nil); | |
assert([[NSFileManager defaultManager] fileExistsAtPath:filePath]); | |
assert( [filePath.pathExtension isEqual:@"png"] || [filePath.pathExtension isEqual:@"jpg"] ); | |
assert(self.networkStream == nil); // don't tap send twice in a row! |
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
namespace HelloWorld_iPhone | |
{ | |
public partial class HelloWorld_iPhoneViewController : UIViewController | |
{ | |
protected int _numberOfTimesClicked = 0; | |
<省略> | |
public override void ViewDidLoad() | |
{ |
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
// HeavyCalc を非同期で実行する AsyncTask | |
class HeavyCalcTask : Android.OS.AsyncTask | |
{ | |
private readonly Button button; | |
public HeavyCalcTask(Button button) | |
{ | |
this.button = button; | |
} |