/**
* Validates that among the dependencies are at most one scoped dependency,
* that there are no cycles within the scoping chain, and that singleton
* components have no scoped dependencies.
*/
private void validateDependencyScopes(BindingGraph subject,
Builder<BindingGraph> reportBuilder) {
ComponentDescriptor descriptor = subject.componentDescriptor();
Optional<AnnotationMirror> scope = subject.componentDescriptor().scope();
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 com.ricebook.app.api; | |
import com.ricebook.app.api.utils.OkClientFactory; | |
import com.ricebook.app.api.utils.RestAdapterFactory; | |
import android.app.Application; | |
import retrofit.RestAdapter; | |
/** |
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
/* | |
* Copyright (C) 2012 Google Inc. | |
* Licensed to The Android Open Source Project. | |
* | |
* 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 | |
* |
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
var s2t = function(str) { | |
var _str = ''; | |
var po; | |
for(var i=0; i < str.length; i++) { | |
if((po = sMap.indexOf(str.charAt(i))) != -1) | |
_str += tMap.charAt(po); | |
else | |
_str += str.charAt(i); | |
} | |
return _str; |
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
public class DemoObserverActivity extends ObserverActivity<String> { | |
final Observable<String> observable = Observable.just("hello", "world"); | |
@Override protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
loadData(); | |
loadData2(); | |
} | |
private void loadData() { |
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
### Run this script via a cronjob every (every minute or so) on a server that has access to your dropbox. | |
### You must install youtube-dl (http://rg3.github.com/youtube-dl/) for this to work. | |
#!/bin/bash | |
QUEUE_DIR=~/Desktop/Dropbox/IFTTT/youtube-dl/*.txt | |
VIDEO_DIR=~/Desktop/Dropbox/youtube/ | |
shopt -s nullglob | |
for queue_file in $QUEUE_DIR | |
do | |
video_url=`cat "$queue_file"`; |
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
Step1 | |
Remove deprecated modules(overide, library,complete),ObjectGraph | |
Step2 | |
Define Dagger2 style Component and module | |
Step3 | |
Inject | |
@ApplicationScope | |
ApplicationComponent | |
NetworkModule | |
Okhttp |
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
{ | |
"code": "OK", | |
"message": null, | |
"result": [ | |
{ | |
"id": "fa1005fc4b3c48d3014b4970168615d5", | |
"parentId": null, | |
"courseCollectId": "fa1005fc4b323c76014b395696445398", | |
"title": "工程造价管理及其基本制度", | |
"playUrl": null, |
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
#export GITAWAREPROMPT=~/.bash/git-aware-prompt | |
#source $GITAWAREPROMPT/main.sh | |
export CLICOLOR=1 | |
export PATH=~/bin:$PATH | |
export PATH=/usr/local/bin:$PATH | |
export PATH=/usr/local/lib:$PATH | |
export PATH=${PATH}:/usr/local/lib/node_modules/hexo-cli/bin/ | |
export PATH=${PATH}:~/Library/gradle | |
export PATH=${PATH}:~/Library/gradle/bin | |
export PATH=${PATH}:/Users/twocity/Documents/android/adt-bundle/sdk |
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
_googleplayDebugCompile - ## Internal use, do not manually configure ## | |
+--- com.android.support:multidex:1.0.1 | |
+--- project :core | |
| +--- com.android.support:support-annotations:22.1.1 | |
| +--- com.google.code.gson:gson:2.3 -> 2.3.1 | |
| +--- com.squareup.retrofit:retrofit:1.9.0 | |
| | \--- com.google.code.gson:gson:2.3.1 | |
| +--- com.squareup.okhttp:okhttp:2.4.0-RC1 | |
| | \--- com.squareup.okio:okio:1.4.0 | |
| +--- io.reactivex:rxjava:1.0.3 |
OlderNewer