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
#! /bin/bash | |
## This script is for taking a screen shot of an Android device. | |
## If possible, it tries to resize the image file and then copy to the clipboard. | |
## | |
## The script passes unrecognized arguments to adb command, which means you can specify "-e" or "-d" | |
## to select which device to take a screenshot of. | |
if [ -z $(which adb) ]; then | |
echo "Error. adb must be installed and in PATH." 1>&2 |
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 LearnGenerics { | |
static abstract class AbsRecursive<A extends AbsRecursive<A, T>, T> { | |
RecursiveListener<A, ? super T> mListener; | |
T mItem; | |
public <XA extends AbsRecursive<XA, ? super T>> | |
void setListener(RecursiveListener<? super XA, ? super T> listener) { | |
// FIXME: I could not fix this. | |
@SuppressWarnings("unchecked") | |
RecursiveListener<A, ? super T> l = (RecursiveListener<A, ? super T>) listener; |
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 LearnGenericsAssignment { | |
static class Func<T> { | |
T item; | |
public T getItem() { | |
return item; | |
} | |
public void setItem(T item) { | |
this.item = item; |
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 CanNotCompileThisGenerics { | |
static class AbsScrambleAdapter<A extends AbsScrambleAdapter<A, T>, T> { | |
} | |
static class IViewHolderFactory<A extends AbsScrambleAdapter<A, ?>> { | |
} | |
static class ScrambleAdapter<T> extends AbsScrambleAdapter<ScrambleAdapter<T>, T> { | |
} |
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
docker run -v `pwd`/article:/article vvakame/review /bin/bash -c "cd article && rm -r TechBook-pdf TechBook.pdf ; review-pdfmaker config.yml" |
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.wantedly.android.profile.utils; | |
import java.util.Comparator; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* Created by cattaka on 2016/08/03. | |
*/ | |
public class ClassOrderComparator implements Comparator<Object> { |
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
def dump_values(obj) | |
results = "" | |
obj.keys.each do |key| | |
results += key.to_s + "\t" + obj[key].to_s + "\n" | |
end | |
results | |
end | |
def dump_tsv(rows) | |
keys = rows.map do |row| |
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
Section "ServerLayout" | |
Identifier "layout" | |
Screen 0 "nvidia" | |
Inactive "intel" | |
EndSection | |
Section "Device" | |
Identifier "nvidia" | |
Driver "nvidia" | |
# Change BusID if necessary. Tips: (lspci | grep 3D) (Change 01:00.0 to 1:0:0) |
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 rx.functions.Action1; | |
import rx.schedulers.Schedulers; | |
import rx.subjects.PublishSubject; | |
import java.util.concurrent.LinkedBlockingQueue; | |
import java.util.concurrent.ThreadPoolExecutor; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* Created by cattaka on 16/09/24. |
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 net.vvakame.util.jsonpullparser.JsonFormatException; | |
import net.vvakame.util.jsonpullparser.JsonPullParser; | |
import net.vvakame.util.jsonpullparser.util.JsonUtil; | |
import net.vvakame.util.jsonpullparser.util.OnJsonObjectAddListener; | |
import net.vvakame.util.jsonpullparser.util.TokenConverter; | |
import java.io.IOException; | |
import java.io.Writer; | |
import io.realm.RealmList; |