转换方法:
- Convert Android VectorDrawable to SVG:
使用附件中的java程序。命令如下:
cp Vector2Svg.java path/to/xml_dir
javac Vector2Svg.java
java Vector2Svg ./*.xml
mkdir svg_dir
from transformers import AutoTokenizer | |
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased") | |
text = "It 's a pre-tokenized , silly sentence !" | |
words = text.split() | |
encoded = tokenizer(words, is_split_into_words=True) | |
for token, wordid in zip(encoded.tokens(), encoded.word_ids()): | |
if wordid is not None: | |
print(token, words[wordid]) |
/******This Gist explains how to create instagram like Gradient color transition in android.******/ | |
1. Create some gradient color drawables inside drawable Folder. | |
a) color1.xml | |
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | |
<gradient | |
android:startColor="#c44e4e" | |
android:endColor="#dcb9b9" | |
android:angle="0"/> |
转换方法:
使用附件中的java程序。命令如下:
cp Vector2Svg.java path/to/xml_dir
javac Vector2Svg.java
java Vector2Svg ./*.xml
mkdir svg_dir
RecyclerViewInteraction.<Item>onRecyclerView(withId(R.id.recyclerview)) | |
.withItems(items) | |
.check(new ItemViewAssertion<Item>() { | |
@Override | |
public void check(Item item, View view, NoMatchingViewException e) { | |
matches(hasDescendant(withText(item.getDisplayName()))) | |
.check(view, e); | |
} | |
}); |
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(); |