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 final class AndroidImageUtil { | |
private AndroidImageUtil() { | |
} | |
/** | |
* 按图片尺寸压缩时,无法准确知道压缩后的文件大小。 | |
* http://stackoverflow.com/questions/477572/strange-out-of-memory-issue-while-loading-an-image-to-a-bitmap-object/823966#823966 | |
* @param file | |
* @return |
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 android.arch.persistence.db.SimpleSQLiteQuery; | |
import android.arch.persistence.db.SupportSQLiteQuery; | |
import android.arch.persistence.room.Dao; | |
import android.arch.persistence.room.Delete; | |
import android.arch.persistence.room.Insert; | |
import android.arch.persistence.room.OnConflictStrategy; | |
import android.arch.persistence.room.RawQuery; | |
import java.lang.reflect.ParameterizedType; | |
import java.util.List; |
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 BindingUtil { | |
/** | |
* 四方形是基准。none:不做任何调整,width:基于宽度调整成四方形 | |
*/ | |
public enum Size { | |
none, width, height | |
} | |
/** |
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 android.content.Context; | |
import android.text.InputFilter; | |
import android.util.AttributeSet; | |
import androidx.annotation.Nullable; | |
import androidx.appcompat.widget.AppCompatTextView; | |
import androidx.emoji.widget.EmojiTextViewHelper; | |
/** | |
* 变更构建器里 init 方法的调用顺序 |
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
--- | |
-- Personally, I liked this one! | |
--- | |
declare @ym_to date = cast('20190401' as date); | |
declare @ym_from date = cast('20181201' as date); | |
with months(dt) as ( | |
select @ym_to dt | |
union all | |
select dateadd(month, -1, dt) from months | |
) |
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
/** | |
* 印刷設定をコピーする | |
* TODO: 四つのTabのうち、シートTabが対応できてないみたい | |
* | |
* @deprecated 利用しない | |
*/ | |
@Deprecated | |
void copySheetPrintConfig(XSSFSheet from, XSSFSheet to) { | |
CTWorksheet fromCt = from.getCTWorksheet(); | |
CTWorksheet toCt = to.getCTWorksheet(); |