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
import com.google.gson.Gson | |
import com.googlecode.jsonrpc4j.JsonRpcBasicServer.* | |
import com.googlecode.jsonrpc4j.JsonRpcServer | |
import fi.iki.elonen.NanoHTTPD | |
import java.io.ByteArrayInputStream | |
import java.io.ByteArrayOutputStream | |
import java.io.IOException | |
import java.io.InputStream | |
import java.nio.charset.StandardCharsets |
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
import org.junit.Test; | |
import java.io.ByteArrayOutputStream; | |
import java.io.RandomAccessFile; | |
import java.nio.ByteBuffer; | |
import java.nio.MappedByteBuffer; | |
import java.nio.channels.FileChannel; | |
import java.nio.channels.FileLock; | |
public class NioFile { |
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
//本脚本将编译后的aar上传私有artifactory仓库 | |
//first config ~/.gradle/gradle.properties | |
//artifactory_contextUrl=http\://127.0.0.1\:8080/artifactory | |
//artifactory_user=anmin | |
//artifactory_repo_release=libs-release-local | |
//artifactory_password=password | |
//artifactory_repo_snapshot=libs-snapshot-local | |
// | |
//then in you root project's build.gradle: | |
//import below in project.gradle |
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
/** | |
* @author hglf <a href="https://github.com/hotstu">hglf</a> | |
* @since 5/13/19 | |
* @desc | |
*/ | |
class Config { | |
val chidren: ArrayList<NotificationChannelGroup> = ArrayList() | |
} | |
//NOTE: extension properies are resolved static, so here is a little mem leak, call clean() when every thing is done | |
val extendPenddingChannels = HashMap<NotificationChannelGroup, ArrayList<NotificationChannel>>() |
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 CountingFileRequestBody extends RequestBody { | |
private static final int SEGMENT_SIZE = 2048; // okio.Segment.SIZE | |
private final File file; | |
private final ProgressListener listener; | |
private final String contentType; | |
public CountingFileRequestBody(File file, String contentType, ProgressListener listener) { | |
this.file = 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
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) | |
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) | |
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) |