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 LRUHashMap<K, V> extends LinkedHashMap<K, V> { | |
| private int limit = 0; | |
| public LRUHashMap(int limit) { | |
| super(limit, 0.75f, true); | |
| this.limit = limit; | |
| } | |
| @Override |
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 AsyncResult<T> { | |
| public T result; | |
| public Excpetion excpetion; | |
| } |
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 ColumnDef { | |
| public static enum Type { | |
| BOOLEAN, BYTE, BYTEARRAY, DOUBLE, FLOAT, INTEGER, LONG, SHORT, STRING | |
| }; | |
| private final String name; | |
| private final Type type; | |
| public ColumnDef(String name, Type type) { | |
| this.name = name; |
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
| ----- | |
| private void insertVal(String val, int id) { | |
| ContentValues r = new ContentValues(); | |
| r.put(COL_ID, Integer.valueOf(id)); | |
| r.put(KeyValContract.Columns.VAL, val); | |
| getWriteableDatabase().insert(TAB_VALS, null, r); | |
| } | |
| ----- |
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 java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.net.HttpURLConnection; | |
| import java.net.URL; | |
| import org.mozilla.javascript.Context; | |
| import org.mozilla.javascript.Function; | |
| import org.mozilla.javascript.Scriptable; |
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 abstract OnSwipeTouchListener implements OnTouchListener { | |
| private final GestureDetector gestureDetector; | |
| public OnSwipeTouchListener (Context ctx) { | |
| gestureDetector = new GestureDetector(ctx, new GestureListener()); | |
| } | |
| private final class GestureListener extends SimpleOnGestureListener { |
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 JavaBean { | |
| private int channelID; // required | |
| private String channelName; // required | |
| private String channelDescription; // optional | |
| private int channelCategory; // optional | |
| public void setChannelID(int id) { | |
| this.channelID = id; | |
| } |
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.example.showsky.test; | |
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.graphics.Color; | |
| import android.os.Bundle; | |
| import android.support.v4.view.ViewPager; | |
| import android.util.Log; | |
| import android.view.View; |
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
| <?php | |
| define(URL_BASE, 'https://www.ptt.cc'); | |
| define(URL_INDEX, URL_BASE . '/bbs/Badminton/index.html'); | |
| define(MAX_LIMIT, 300); | |
| define(KEY_WROD, '[揪人]'); | |
| $result = array(); | |
| function get_html($url) { |
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 appName = 'sitemaji_' + defaultConfig.versionName + '_' + defaultConfig.versionCode + '.jar' | |
| task deleteJar(type: Delete) { | |
| delete 'release/' + appName | |
| } | |
| task exportJar(type: Copy) { | |
| from('build/intermediates/bundles/release/') | |
| into('release/') | |
| include('classes.jar') | |
| rename('classes.jar', appName) | |
| } |