V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  kzaemrio  ›  全部回复第 1 页 / 共 2 页
回复总数  35
1  2  
2021-02-03 11:18:36 +08:00
回复了 brucefu 创建的主题 Java Vector 的 get 方法为什么也要同步呢?
因为你无法确定是否会出现多线程修改了数据,多线程访问可能获取不同的结果

如果能确定线程安全,就该用 ArrayList 而不是 Vector
2020-12-30 00:29:48 +08:00
回复了 QBugHunter 创建的主题 Android 这种情况下 EventBus 的函数还能执行完吗?
不太看得懂,感觉描述不全面

假设这个 eventbus 正确地被注册,正确地收到了事件,那么 writeLog(deviceLog) 会运行在 eventBus.getExecutorService() 上,和这个 MyThread 应该无关
加油帮顶
2020-03-13 22:51:11 +08:00
回复了 tuding 创建的主题 生活 麻烦问一下有没有能有效入睡的方法?
@newtype0092 如此真实,发视频的大多都是仙术,学不来的。躺着看他视频,脑子很空,只盯着屏幕看棋,不乱想别的,很快就困了
2020-03-13 13:56:36 +08:00
回复了 tuding 创建的主题 生活 麻烦问一下有没有能有效入睡的方法?
对自走棋感兴趣的话,可以看 b 站蛞蝓豆腐的 dota 自走棋催眠。。。
2020-03-09 09:03:10 +08:00
回复了 ailuoliai 创建的主题 Java 2020,想学一门新编程语言,哪种语言和 Java 是 1+1>2 的?
可以考虑先看看 antlr
2020-02-22 23:25:32 +08:00
回复了 KunMinX 创建的主题 Android Android N 为什么强推 FileProvider?
大概比放开 sdcard 大家随便来强一些吧
2019-04-29 15:43:31 +08:00
回复了 mtt2011pony 创建的主题 Android android studio 3.4 还是经常 卡死
editor -> general -> code completion -> show the documentation popup in 1000 关掉
同学说:还是苹果音乐强啊,同一首二胡,苹果音乐的就显得更惨更凄凉 😂
我也是小程序不能用,还以为是个例,还以为是我手机的锅呢,看来是 play 版微信的锅
2018-03-01 09:47:43 +08:00
回复了 tvallday 创建的主题 全球工单系统 微信,药丸
2333 之前有个微信小号,只有大号一个好友,验证的时候文案是“ 3 位好友发送确认”,然后大号一个发了之后也通过验证了
2017-10-16 15:04:38 +08:00
回复了 CatSama 创建的主题 Android 安卓的自动备份软件不能常驻后台
设置 -> 电池 -> 电池优化 -> 给对应应用选择不要优化
2017-07-11 11:46:12 +08:00
回复了 codeInfinty 创建的主题 Android Java 嵌套 for 循环怎么用递归实现?
private static int count(int[] array) {
return count1(array, array.length, 0, 0);
}

private static int count1(int[] array, int length, int count, int i0) {
if (i0 == length) {
return count;
}
count = count2(array, length, count, i0, i0 + 1);
return count1(array, length, count, i0 + 1);
}

private static int count2(int[] array, int length, int count, int i0, int i1) {
if (i1 == length) {
return count;
}
count = count3(array, length, count, i0, i1, i1 + 1);
return count2(array, length, count, i0, i1 + 1);
}

private static int count3(int[] array, int length, int count, int i0, int i1, int i2) {
if (i2 == length) {
return count;
}
count = count4(array, length, count, i0, i1, i2, i2 + 1);
return count3(array, length, count, i0, i1, i2 + 1);
}

private static int count4(int[] array, int length, int count, int i0, int i1, int i2, int i3) {
if (i3 == length) {
return count;
}
count = count5(array, length, count, i0, i1, i2, i3, i3 + 1);
return count4(array, length, count, i0, i1, i2, i3 + 1);
}

private static int count5(int[] array, int length, int count, int i0, int i1, int i2, int i3, int i4) {
if (i4 == length) {
return count;
}
System.out.println(String.format(
"%d %d %d %d %d",
array[i0],
array[i1],
array[i2],
array[i3],
array[i4]
));
return count5(array, length, count + 1, i0, i1, i2, i3, i4 + 1);
}
2017-02-22 17:08:55 +08:00
回复了 psq 创建的主题 程序员 认真讨论下,为什么 iPhone 越用越卡?
关闭后台应用刷新
关闭不必要的 iCloud 同步
关闭不必要的通知
关闭 siri
关闭语音控制
关闭定位服务

关于关闭后台应用刷新,以下都是我个人臆想:
假设从应用内按 home 键后去干别的,系统性能不吃紧的情况下,该应用仍可运行假设最长 10 分钟后被系统冻结,一般正常应用,系统设置内关闭后台应用刷新后,查看电池用量里要么只有前台工作时长没有后台工作时长,要么后台工作时长极短。
但是即使在关闭后台应用刷新后,电池用量里微信的后台工作时长也特多,感觉大概微信用什么办法强行占满了刚假设的那个最长 10 分钟的使用时长
2016-10-21 10:06:05 +08:00
回复了 rootliang 创建的主题 Android 安卓 6.0 有 root 不装 xposed 怎么活
root 了可以用 MyAndroidTools 合理限制应用的服务和广播接收器
2016-07-01 09:26:46 +08:00
回复了 chenchuangfeng 创建的主题 Android mac 下面 Android studio 打字卡顿
之前有个界面比较复杂且用了 dataBinding 之后输入比较卡顿貌似
2016-06-09 20:57:05 +08:00
回复了 shuding 创建的主题 JavaScript JavaScript 一行简易实现 `sleep(1)`
@chairuosen 棒棒棒
1  2  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2865 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 35ms · UTC 11:28 · PVG 19:28 · LAX 04:28 · JFK 07:28
Developed with CodeLauncher
♥ Do have faith in what you're doing.