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
versionName String.format("%.0f.%d", versionCode / 16 + 0.49, (versionCode + 15) % 16) | |
在 String.format 的 %.0f 會把 1.5 四捨五入 為 2.0 | |
(但 17/16+0.4 轉 %.0f 還是 1 ?!) | |
P.S. 17/16 = 1.0625 |
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
/* | |
Ref: | |
https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#variant_output | |
https://developer.android.com/studio/build/optimize-your-build.html#use_static_build_properties | |
*/ | |
android { | |
// If you use each() to iterate through the variant objects, | |
// you need to start using all(). That's because each() iterates | |
// through only the objects that already exist during configuration time— | |
// but those object don't exist at configuration time with the new model. |
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
1. default | |
/* 系統預設樣式 */ | |
2. use SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN|SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | |
/* 在 Android 5.x 切換 theme 可能會有殘影 */ | |
getWindow().getDecorView().setSystemUiVisibility( | |
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | |
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | |
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | |
); |
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
(function($){ | |
/** | |
* Register ajax transports for blob send/recieve and array buffer send/receive via XMLHttpRequest Level 2 | |
* within the comfortable framework of the jquery ajax request, with full support for promises. | |
* | |
* Notice the +* in the dataType string? The + indicates we want this transport to be prepended to the list | |
* of potential transports (so it gets first dibs if the request passes the conditions within to provide the | |
* ajax transport, preventing the standard transport from hogging the request), and the * indicates that | |
* potentially any request with any dataType might want to use the transports provided herein. | |
* |
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
原始影片→每5秒小圖(160x90) | |
ffmpeg -i 影片檔名.mp4 -vf "fps=1/5,scale=160:90" preview%04d.jpg | |
眾小圖→slideshow video | |
ffmpeg -framerate 1 -i preview%04d.jpg -vf fps=1 -x264-params keyint=1:min-keyint=1:scenecut=-1 preview.mp4 |
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
Glide 3.x & 4.x: DiskCacheStrategy.NONE caches nothing | |
Glide 4.x: DiskCacheStrategy.DATA, Glide 3.x: DiskCacheStrategy.SOURCE caches only the original full-resolution image. | |
Glide 4.x: DiskCacheStrategy.RESOURCE Glide 3.x: DiskCacheStrategy.RESULT caches only the final image, after reducing the resolution (and possibly transformations) (default behavior of Glide 3.x) | |
Glide 4.x only: DiskCacheStrategy.AUTOMATIC intelligently chooses a cache strategy based on the resource (default behavior of Glide 4.x) | |
Glide 3.x & 4.x: DiskCacheStrategy.ALL caches all versions of the image | |
Further Read: | |
https://futurestud.io/tutorials/glide-caching-basics |
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
The project name contains at least one of the following characters: [ , /, \, :, <, >, ", ?, *, |]. | |
This has been deprecated and is scheduled to be removed in Gradle 5.0. Set the 'rootProject.name' or | |
adjust the 'include' statement. | |
see for more details: | |
https://docs.gradle.org/4.4/dsl/org.gradle.api.initialization.Settings.html#org.gradle.api.initialization.Settings:include(java.lang.String[]) |
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
# Created by .ignore support plugin (hsz.mobi) | |
### Android Studio ################################################################################ | |
captures | |
### Eclipse template ############################################################################## | |
*.pydevproject | |
.metadata | |
.gradle | |
bin/ | |
tmp/ |
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
const $DFD_Observer = (($, START_CALLBACK, FINISH_CALLBACK) => { | |
let Func_Faked = func => () => typeof (func) == "function" && func() || true; | |
let $DFD_Faked = $.Deferred().resolve() | |
let $DFD_Array = []; | |
return $dfd => { | |
$DFD_Array = $DFD_Array.filter($item => $item.state && $item.state() == "pending").concat($dfd || $DFD_Faked); | |
$.when($.Deferred(Func_Faked(START_CALLBACK)).resolve(), ...$DFD_Array) | |
.always(() => $DFD_Array.length <= 1 && $DFD_Array[0] == $DFD_Faked && Func_Faked(FINISH_CALLBACK)() || $DFD_Observer()); | |
return $dfd; | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer