上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 75 下一页
摘要: SLAudioRecorder.h // // Created by yongdaimi on 2020/3/2. // #ifndef DONGLEAPPDEMO_SLAUDIORECORDER_H #define DONGLEAPPDEMO_SLAUDIORECORDER_H #include 阅读全文
posted @ 2020-03-06 15:48 夜行过客 阅读(1632) 评论(0) 推荐(0) 编辑
摘要: public static String getFileRealNameFromUri(Context context, Uri fileUri) { if (context == null || fileUri == null) return null; DocumentFile document 阅读全文
posted @ 2020-02-27 20:57 夜行过客 阅读(7479) 评论(2) 推荐(1) 编辑
摘要: 在commons-io包中org.apache.commons.io.IOUtils类的toByteArray(InputStream input)已经有实现了,我们可以参考下思路,完成我们的方法,我们可以用类似下面的代码实现inputStream转化为byte[]数组 public static 阅读全文
posted @ 2020-02-26 16:49 夜行过客 阅读(34620) 评论(1) 推荐(2) 编辑
摘要: 查看二进制文件,用od或hexdump命令。 $ od -tx1 -tc -Ax binFile 000000 61 62 63 64 65 31 32 33 34 35 61 62 63 64 65 31 a b c d e 1 2 3 4 5 a b c d e 1 000010 32 33 3 阅读全文
posted @ 2020-02-18 15:45 夜行过客 阅读(11631) 评论(0) 推荐(1) 编辑
摘要: ctrl +Octrl + I(i) When you move your cursor to a particular position in a file, Vim remembers this and lets you move around between where you are whe 阅读全文
posted @ 2020-02-02 15:43 夜行过客 阅读(6696) 评论(0) 推荐(0) 编辑
摘要: 今天使用LayoutInflate.inflate()方法加载一个布局,当参数root 为null 时,出现下列提示 Avoid passing null as the view root (needed to resolve layout parameters on the inflated la 阅读全文
posted @ 2020-01-08 13:38 夜行过客 阅读(1156) 评论(0) 推荐(0) 编辑
摘要: 这里主要讨论一下大数转小数,比如int类型转short类型。小数转大数,如short 转 int不做讨论。 首先要明确一下转换规则:大数转小数,多出的高位部分会被截断。比如 int 占 4个byte(32 bit), byte占 1个byte(8bit), 那int 转 byte ,int 高位多出 阅读全文
posted @ 2019-12-26 16:33 夜行过客 阅读(2366) 评论(0) 推荐(0) 编辑
摘要: 已知有两个字符串a, b : 值是null的情况:1. a.equals(b), a 是null, 抛出NullPointException异常。 2. a.equals(b), a不是null, b是null, 返回false 3. Objects.equals(a, b)比较时, 若a 和 b  阅读全文
posted @ 2019-12-25 17:49 夜行过客 阅读(1740) 评论(0) 推荐(0) 编辑
摘要: 首先说明,使用stop方法终止的方式已经在很久之前就被废弃了,在加锁的情况下有可能会造成死锁,这里不做讨论。 1. 使用标志位终止线程 在run()方法执行完毕后,该线程就终止了。但是在某些特殊的情况下,希望run()方法中的代码一直循环执行。比如在服务端程序中可能会使用 while(true) { 阅读全文
posted @ 2019-12-20 18:08 夜行过客 阅读(6480) 评论(0) 推荐(1) 编辑
摘要: 1. 简介 Android.mk 可用来描述要编译的某个具体模块的相关信息。比如:指定编译该模块时所需要的源文件、编译该模块时要链接的库文件、该模块编译完成后生成的库的名字等等。Application.mk 可用来描述整个应用程序编译时的相关信息。比如:指定编译支持的ABI平台(armeabi-V7 阅读全文
posted @ 2019-12-18 18:08 夜行过客 阅读(3218) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 75 下一页