Some notes from my successes and failures.
From the official docs
It is a client-server program that includes three components: >
Some notes from my successes and failures.
From the official docs
It is a client-server program that includes three components: >
| fun ViewModel.tearDown() { | |
| ViewModel::class.java.getDeclaredMethod("clear") | |
| .apply { isAccessible = true }(this) | |
| } |
| public class Pager<I, O> { | |
| private static final Observable FINISH_SEQUENCE = Observable.never(); | |
| private PublishSubject<Observable<I>> pages; | |
| private Observable<I> nextPage = finish(); | |
| private Subscription subscription = Subscriptions.empty(); | |
| private final PagingFunction<I> pagingFunction; | |
| private final Func1<I, O> pageTransformer; |
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <string formatted="false" name="html_link"><![CDATA[<a href=\"%s\">%s</a>]]></string> | |
| </resources> |
| public class Incrementer { | |
| public static int[] increment(int[] input) { | |
| int index = input.length -1; | |
| while(++input[index] % 10 == 0) { | |
| input[index] = input[index] % 10; | |
| if(index == 0) { | |
| int[] result = new int[input.length + 1]; | |
| result[0] = 1; | |
| return result; | |
| } |
| /* | |
| * Copyright 2012 Google Inc. All Rights Reserved. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| import android.graphics.Bitmap; | |
| import android.graphics.drawable.Drawable; | |
| import com.squareup.picasso.Picasso; | |
| import com.squareup.picasso.Target; | |
| public class CancelableTarget implements Target { | |
| protected Target mTarget; | |
| private boolean mIsCancelled; |