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 json | |
import glob | |
def format_json_compat(file): | |
json_file = open(file) | |
raw_json = json.load(json_file) | |
json_compat = json.dumps(raw_json, indent=None, separators=(',', ':')) | |
print(json_compat) | |
write_file = open(file, 'w') |
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
BindingScoped.kt | |
@Scope | |
@Retention(AnnotationRetention.BINARY) | |
annotation class BindingScoped | |
------------------------------------------------------- | |
CustomBindingComponent.kt |
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
2017-12-22 18:02:34.064 5625-5625/com.movesense.samples.connectivityapisample I/MainActivity: Connecting to BLE device: 0C:8C:DC:2B:B9:5A | |
2017-12-22 18:02:34.065 5625-5625/com.movesense.samples.connectivityapisample I/Mds: Connecting to BLE device: 0C:8C:DC:2B:B9:5A | |
2017-12-22 18:02:34.065 5625-5625/com.movesense.samples.connectivityapisample I/Mds: MdsConnectionListener exists | |
2017-12-22 18:02:34.071 5625-5647/com.movesense.samples.connectivityapisample I/Komposti: [SDS REQUEST] type: POST uri: suunto://MDS/EventListener contract: {"Uri":"suunto://MDS/ConnectedDevices"} | |
2017-12-22 18:02:34.073 5625-5653/com.movesense.samples.connectivityapisample I/Komposti: Adding EventListener for path: suunto://MDS/ConnectedDevices | |
2017-12-22 18:02:34.075 5625-5653/com.movesense.samples.connectivityapisample I/Komposti: [SDS RESPONSE] type: POST status: OK header: {"Location": "MDS/EventListener/24", "TaskId": 24, "Uri": "suunto://MDS/EventListener", "Content-Length": 0, "Reason": "OK", "Status": 200} | |
2017-12-22 18:02:34. |
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
/* | |
solution based on - based on Sevastyan answer on StackOverflow | |
changes: | |
- take to account views offsets | |
- transformed to Kotlin | |
- now works on viewHolders | |
- try to cache viewHolders between draw's |
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 CustomView extends LinearLayout implements OnMapReadyCallback { | |
SupportMapFragment mapFragment; | |
@BindView(R.id.location_text) MapChip locationText; | |
private GoogleMap googleMap; | |
private LocationWithPolygon locationWithPolygon; | |
private Polygon polygon; | |
public CustomView(Context context) { |
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 CountriesPresenter { | |
private final CountryRepository repository = new CountryRepositoryImpl(); | |
private CountriesActivity view; | |
public CountriesPresenter(CountriesActivity countryActivity) { | |
view = countryActivity; | |
} | |
public void getCountries() { |
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.firebase.client; | |
import com.firebase.client.core.Constants; | |
import rx.Observable; | |
import rx.Subscriber; | |
import rx.functions.Action0; | |
import rx.functions.Func1; | |
import rx.subscriptions.Subscriptions; | |
public class RxFirebase { |
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 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; |
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
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
import android.support.v7.widget.RecyclerView; | |
import butterknife.Bind; | |
import butterknife.ButterKnife; | |
#parse("File Header.java") | |
public class ${NAME} extends RecyclerView.Adapter<${NAME}.ViewHolder> { | |
@Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { |
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
[sts] ----------------------------------------------------- | |
[sts] Starting Gradle build for the following tasks: | |
[sts] build | |
[sts] ----------------------------------------------------- | |
Inferred version 0.8.12 for final PATCH change. | |
:framework:compileJavawarning: [options] bootstrap class path not set in conjunction with -source 1.6 | |
1 warning | |
:framework:compileAspectJ | |
warning at /Users/liangsong/RoboBinding/framework/src/main/java/org/robobinding/aspects/PresentationModelAspect.aj:37::0 advice defined in org.robobinding.aspects.PresentationModelAspect has not been applied [Xlint:adviceDidNotMatch] |
NewerOlder