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 os, sys, shutil | |
legalResolutionModifiers = ["ldpi","mdpi","hdpi","xhdpi","xxhdpi","xxxhdpi"] | |
# check inputs | |
if len(sys.argv) != 3: | |
print "illegal usage" | |
sys.exit() | |
sourceFolder = sys.argv[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
public static Observable<List<String>> paginatedThings(final Observable<Void> onNextObservable) { | |
return Observable.create(new Observable.OnSubscribe<List<String>>() { | |
@Override | |
public void call(final Subscriber<? super List<String>> subscriber) { | |
onNextObservable.subscribe(new Observer<Void>() { | |
int latestPage = -1; | |
@Override | |
public void onCompleted() { | |
subscriber.onCompleted(); |
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
RACSignal *connectionSignal = [self rac_signalForSelector:@selector(centralManager:didConnectPeripheral:) fromProtocol:@protocol(CBCentralManagerDelegate)]; | |
RACSignal *connectionFailureSignal = [[self rac_signalForSelector:@selector(centralManager:didFailToConnectPeripheral:error:) fromProtocol:@protocol(CBCentralManagerDelegate)] flattenMap:^RACStream *(RACTuple *tuple) { | |
return [RACSignal error:tuple.third]; | |
}]; | |
RACSignal *completeConnectionSignal = [[RACSignal merge:@[connectionSignal,connectionFailureSignal]] catch:^RACSignal *(NSError *error) { | |
//handle the connection failure? | |
}]; |
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
public class ServiceClient { | |
public interface ServiceClientDelegate { | |
Client getClient(); | |
} | |
private static ServiceClient instance; | |
private final int CONNECTION_TIMEOUT = 60000; | |
private RestAdapter mRestAdapter; |
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
{ | |
"packageName": "com.rain.android.agenda.data", | |
"providerName": "agenda", | |
"databaseVersion": 1, | |
"tables": [ | |
{ | |
"name": "agenda", | |
"members" : [ | |
{ | |
"type" : "string", |
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
apply plugin: 'android' | |
import com.rain.utils.android.cpgen.generator.*; | |
android { | |
compileSdkVersion 19 | |
buildToolsVersion "19.0.3" | |
defaultConfig { | |
minSdkVersion 14 | |
targetSdkVersion 19 |
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
using Android.App; | |
using Android.Content; | |
using Cirrious.MvvmCross.Droid.Platform; | |
using Cirrious.MvvmCross.Droid.Views; | |
using Cirrious.MvvmCross.ViewModels; | |
using MyRep.Core; | |
namespace MyRep.Core | |
{ | |
public class Setup : MvxAndroidSetup |
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
using System; | |
using Cirrious.MvvmCross.ViewModels; | |
namespace MyRep.Core | |
{ | |
public class App : MvxApplication | |
{ | |
public App () | |
{ | |
RegisterAppStart (new MvxAppStart<AddressQueryViewModel>()); |
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
using System; | |
using Cirrious.MvvmCross.ViewModels; | |
namespace MyRep | |
{ | |
public class AddressQueryViewModel : MvxViewModel | |
{ | |
public AddressQueryViewModel () | |
{ | |
} |
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.rain.example.data.provider; | |
import com.rain.example.data.database.RainEmployeeDatabase; | |
import com.rain.example.data.database.table.*; | |
import android.provider.BaseColumns; | |
import android.text.TextUtils; | |
import android.content.ContentUris; | |
import android.database.sqlite.SQLiteQueryBuilder; |
NewerOlder