I'm a developer of 企鹅FM
. Our app constantly report ClassCastException
on ArrayMap
, some stack trace looks like this.
Intent i = new Intent(ACTION);
i.putExtra(KEY, VALUE); // crashes here
I'm a developer of 企鹅FM
. Our app constantly report ClassCastException
on ArrayMap
, some stack trace looks like this.
Intent i = new Intent(ACTION);
i.putExtra(KEY, VALUE); // crashes here
#!/usr/bin/env python | |
# encoding: utf-8 | |
from __future__ import print_function | |
''' | |
analyze /proc/<pid>/smaps | |
doc | |
http://liutaihua.github.io/2013/04/25/process-smaps-analysis.html |
ADB=${ANDROID_HOME}/platform-tools/adb | |
HPROF_CONV=${ANDROID_HOME}/platform-tools/hprof-conv | |
# customized functions | |
# dump droid heap | |
function droid_hd() { | |
PACKAGE_NAME=$1 | |
TIME=$(date +"%Y%m%d_%H%M%S") | |
FILE_NAME="${PACKAGE_NAME}-${TIME}-heap.hprof" |
class ViewModel_1 { | |
val name = LiveData<String>() | |
val gender = LiveData<Boolean>() | |
val loading = LiveData<Boolean>() | |
val errorMessage = LiveEvent<String>() | |
fun follow() { | |
api.follow(xxx) | |
} |
sealed class LiveEvent<T> : LiveData<T>() { | |
private var version = 0 | |
/** | |
* override hashCode and equals, | |
* so-that, [LiveData.removeObserver] still can work | |
*/ | |
private inner class ObserverWrapper<T>( | |
private val other: Observer<T> | |
) : Observer<T> { |
String httpGet(String url) throws IOException { | |
URL u = new URL(url); | |
URLConnection conn = u.openConnection(); | |
InputStream input = conn.getInputStream(); | |
byte[] buffer = new byte[1024]; | |
int len = input.read(buffer); | |
input.close(); | |
return new String(buffer, 0, len); |
/* | |
* Copyright (C) 2018 Square, Inc. | |
* Copyright (C) 2019 taylorcyang@tencent.com | |
* Copyright (C) 2019 landerlyoung@gmail.com | |
* | |
* 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 |
#! /usr/bin/env kscript | |
@file:DependsOn("com.xenomachina:kotlin-argparser:2.0.7") | |
@file:DependsOn("me.tongfei:progressbar:0.7.1") | |
import com.xenomachina.argparser.ArgParser | |
import com.xenomachina.argparser.InvalidArgumentException | |
import com.xenomachina.argparser.SystemExitException | |
import com.xenomachina.argparser.default |
#! /usr/bin/env bash | |
#-------------------- | |
# Standard options: | |
export COMMON_FF_CFG_FLAGS= | |
# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --prefix=PREFIX" | |
# Licensing options: | |
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-gpl" | |
# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-version3" |