-
-
Save AITUncle/af71f6f7fa96e7f61f46e6efe17712da to your computer and use it in GitHub Desktop.
我的日志 |
AITUncle
commented
Nov 15, 2016
•
UPDATE downloadtask
SET quality = CASE quality
WHEN 0 THEN 1
WHEN 1 THEN 2
WHEN 2 THEN 4
WHEN 3 THEN 5
WHEN 4 THEN 1
ELSE 0
END
select fileuserkey, case substr(fileuserkey,-2,1)
when '-' then case substr(fileuserkey,-1,1)
when 0 then '流畅'
when 1 then '标准'
when 3 then '无损'
else fileuserkey
else fileuserkey
end
from file
Android API SQLite Version
API 24 3.9
API 21 3.8
API 11 3.7
API 8 3.6
API 3 3.5
API 1 3.4
https://developer.android.com/reference/android/database/sqlite/package-summary.html
sqlite case的用法
http://www.sqlitetutorial.net/sqlite-case/
- 字符串拼接,使用串接符: ||.
The || operator is "concatenate" - it joins together the two strings of its operands. - SQLite searched CASE statement. CASE可以直接当if使用
select fileuserkey, case
when qualitytype=0 then '流畅'
when qualitytype=1 then '标准'
when qualitytype=2 then '无损'
else fileuserkey
end
from file
sqlite 多表联查
select display_name,singer,songname
from localmusic,file,kugou_songs
where localmusic.fileid = file.fileid and kugou_songs._id = localmusic.songid
android中home键的监听:
在Activity.onKeyDown,Activity.dispatchKeyEvent中都是无法监听到的。
跟进用户文件丢失的问题是:只差了服务端的filelost数据库。然而并没有查filelost_old数据库。
居然把这个给忘了,真是大意了。
LOST.DIR是专门收集Android系统运行时意外丢失的文件而设置的文件夹,其收集的内容包括系统因为意外而没能保存的各类 内存 、交换、暂存等数据, 软件 的缓存数据、以及其他各类文件。只要系统发生意外(如软件突然无法正常运行),便会将发生意外的文件移到此目录下,以数字序列名称代替该文件的扩展名。注意:由于LOST.DIR文件夹的特殊作用,里面的文件都是“意外而生”,因此可以删除里面的文件,但请不要删除LOST.DIR文件夹。
https://www.quora.com/What-is-the-LOST-DIR-folder-in-Android
播放组大神说,这个文件夹会被“手机管家-清理加速”给清理掉。但是实际上并没有。
java注释:这里的分割符是“#”而不是“.”
@see #field
@see #method(Type, Type,...)
@see Class#field
在描述问题时,讲外部原因时:尽量避免,推卸责任的词语。
引发问题的人,内心听着会很不舒服。
有时候,会让某些人觉得自卑,给团队带来麻烦。
有时候,会让某些人觉得愤怒。
这样会影响组员之间的合作。如果他不是一个经常弄出某个问题来的话,描述问题的话尽量谦卑一些。有些bug的出现是无法预料的。
在公司尽量不要抱怨工作,因为你的抱怨,只会让他人觉得你的能力没有处理好该处理的问题。
如果要抱怨,请,顺便提出你的解决方案。不然一切抱怨都是扯蛋。
请教问题之前,先想想:他真的能你带来解决方案吗?
如果不能,你只是想找个人倾述一下,那么,请憋一憋。你的倾述不一定能得到肯定,很可能得到的反而是双方的不满。
mysql union all
http://dev.mysql.com/doc/refman/5.7/en/union.html
explain
select * from filelost where imei_crypt like "%32878681013683905766109117506828893802%"
union all
select * from filelost_1611 where imei_crypt like "%32878681013683905766109117506828893802%"
union all
select * from filelost_1612 where imei_crypt like "%32878681013683905766109117506828893802%"
union all
select * from filelost_1701 where imei_crypt like "%32878681013683905766109117506828893802%"
/*
select * from filelost_old where imei_crypt like "%32878681013683905766109117506828893802%"
*/
android中当崩溃引发二次崩溃是:调用uncaughtException时,我们在调用系统默认的sDefaultHandler.uncaughtException(thread, ex)来处理时,并不会弹窗提示崩溃,而是直接闪退。
AtomicBoolean.getAndSet(newValue) //返回原来旧的值,并设置新的值
AtomicBoolean.compareAndSet(expect,update) //只有返回为true时才会更新值为update,只有expect等于原来的值才会返回true
酷狗中,对音频文件计算hash的代码实现。
PreCalcHashValueRunnable.run