V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  dbow  ›  全部回复第 14 页 / 共 26 页
回复总数  503
1 ... 10  11  12  13  14  15  16  17  18  19 ... 26  
2019-09-17 13:41:57 +08:00
回复了 Gnepre 创建的主题 硬件 有没有适合放在家里 24 小时运行的电脑或服务器?
HP Gen8 Microserver, 可挂四块盘, 我买来当 NAS 跑了五年了, 从不关机。
2019-09-16 10:55:51 +08:00
回复了 calmlyman 创建的主题 健康 光跑步可以减肚子吗?
体重高, 跑步会导致膝盖废掉。
2019-09-12 15:20:36 +08:00
回复了 kuyuzhiqi 创建的主题 生活 你们租房是怎么解决饮水问题的?
只喝桶装水
2019-09-12 15:10:59 +08:00
回复了 kisshere 创建的主题 程序员 1W 元以下的护眼显示器,只要 1080P 分辨率,求推荐
从业五年码农里干眼症患者很多, 如果一开始就用墨水屏, 根本就不会患上干眼症。前几年我用过多个个防蓝光眼镜, 还是患上了干眼症, 现已经全面使用墨水屏。
2019-09-12 14:28:55 +08:00
回复了 kisshere 创建的主题 程序员 1W 元以下的护眼显示器,只要 1080P 分辨率,求推荐
墨水屏推荐,6000 块左右, 我现在用的大上 PaperLike HD HDMI 显示器, 写代码, 浏览网页,非常舒服, 当然了, 不能用来看视频 , 刷新率不够。
2019-09-11 18:02:36 +08:00
回复了 zhuzhezhe 创建的主题 生活 我还活着
加油, +50 块, 祝好。
2019-09-11 10:42:30 +08:00
回复了 focalhot 创建的主题 问与答 抓取了一些年收益大于 30%基金,能不能大概率稳定赚钱?
买基金一把梭不是好办法,追涨, 全部被套在高位, 三五年都回不了本。 定期少量投入可以缓解股份波动带来的风险, 涨就少投, 跌就多投,情况不妙就割肉。
2019-09-11 10:37:13 +08:00
回复了 focalhot 创建的主题 问与答 抓取了一些年收益大于 30%基金,能不能大概率稳定赚钱?
往期收益不能代表未来收益 , 如果过去一直在涨, 那意味着你买完他就跌, 套牢。
2019-09-03 10:09:21 +08:00
回复了 zhiwoda123 创建的主题 硬件 四万块买一个外星人游戏本值不值
不值 ,组台机式, 最终性能比外星人要高的多, 看教程半小时搞定了。
2019-08-19 15:17:39 +08:00
回复了 monkeyk 创建的主题 程序员 "中午不睡,下午崩溃“
我是不睡不行, 不然下午几个小时全是犯困 , 啥事也干不成。
2019-08-17 14:22:03 +08:00
回复了 nodwang 创建的主题 程序员 五笔是否正在被淘汰,或已经淘汰
追求打字又快又准的话, 还是得靠五笔, 拼音对付不了生字, 要翻好几屏才出
2019-07-29 15:02:29 +08:00
回复了 Meltdown 创建的主题 生活 被喜欢的妹子屏蔽朋友圈
楼主你听我一句, 跟你喜欢的女生,一周内不能聊 high, 就是没有缘分, 删她号换人聊, 你要是留着她的号, 你就陷进了痛苦的痴心妄想。
2019-07-26 17:03:00 +08:00
回复了 lastright 创建的主题 程序员 C++真的有那么不堪吗?
c++难用的地方, 就在干一个事的方法太多, 总有一个些傻逼写一些自以为聪明, "充分利用了语言特性"的鬼画符, 导致写代码的成本大部分在读别人的代码上。
在海外 vps 上下载, 然后把文件复制回来
2019-07-22 18:52:39 +08:00
回复了 waibunleung 创建的主题 Python 不死心,再来问一遍关于 Python 的 asyncio 问题
def call_soon(self, callback, *args, context=None):
"""Arrange for a callback to be called as soon as possible.

This operates as a FIFO queue: callbacks are called in the
order in which they are registered. Each callback will be
called exactly once.

Any positional arguments after the callback will be passed to
the callback when it is called.
"""
self._check_closed()
if self._debug:
self._check_thread()
self._check_callback(callback, 'call_soon')
handle = self._call_soon(callback, args, context)
if handle._source_traceback:
del handle._source_traceback[-1]
return handle
在事件循环里
while self._scheduled:
handle = self._scheduled[0]
if handle._when >= end_time:
break
handle = heapq.heappop(self._scheduled)
handle._scheduled = False
self._ready.append(handle)

# This is the only place where callbacks are actually *called*.
# All other places just add them to ready.
# Note: We run all currently scheduled callbacks, but not any
# callbacks scheduled by callbacks run this time around --
# they will be run the next time (after another I/O poll).
# Use an idiom that is thread-safe without using locks.
ntodo = len(self._ready)
for i in range(ntodo):
handle = self._ready.popleft()
if handle._cancelled:
continue
if self._debug:
try:
self._current_handle = handle
t0 = self.time()
handle._run()
dt = self.time() - t0
if dt >= self.slow_callback_duration:
logger.warning('Executing %s took %.3f seconds',
_format_handle(handle), dt)
finally:
self._current_handle = None
else:
handle._run()
handle = None # Needed to break cycles when an exception occurs.
2019-07-22 18:50:32 +08:00
回复了 waibunleung 创建的主题 Python 不死心,再来问一遍关于 Python 的 asyncio 问题
图床是 imgur 可能被墙掉了
2019-07-22 18:49:29 +08:00
回复了 waibunleung 创建的主题 Python 不死心,再来问一遍关于 Python 的 asyncio 问题
看上图,call_soon 把 task 加入 loop._ready, loop.run_once 把_ready 的东西 popleft 出来, 开始执行。
2019-07-22 18:48:19 +08:00
回复了 waibunleung 创建的主题 Python 不死心,再来问一遍关于 Python 的 asyncio 问题
2019-07-22 18:45:31 +08:00
回复了 waibunleung 创建的主题 Python 不死心,再来问一遍关于 Python 的 asyncio 问题
2019-07-22 18:44:22 +08:00
回复了 waibunleung 创建的主题 Python 不死心,再来问一遍关于 Python 的 asyncio 问题
create_task 创建了一个 task , task 构造函数里, 使用了 call_soon, call_soon 的意思 event loop 在下一批调度时立刻执行这个 task, 不再等待.
1 ... 10  11  12  13  14  15  16  17  18  19 ... 26  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2545 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 38ms · UTC 02:49 · PVG 10:49 · LAX 18:49 · JFK 21:49
♥ Do have faith in what you're doing.