V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
V2EX  ›  hihihihihi  ›  全部回复第 39 页 / 共 41 页
回复总数  812
1 ... 31  32  33  34  35  36  37  38  39  40 ... 41  
Kinzu V3
2016 年 11 月 20 日
回复了 Antidictator 创建的主题 程序员 看技术文档 PDF 之类的比较适合是 Kindle 吗?
我之前为了看书籍, 各种类型, 有 kindle store 上购买的 mobi 格式, 也有 pdf 格式。 买过 2 个 kindle , 都不适合 pdf 格式,文字太小,段落分得很不好。 还买过 surface , 上面的 pdf 阅读软件都好烂!!尤其是涉及到本地书架的时候, 很不爽。 ipad mini 也不适合,太小了。

最后 kindle voyage 看电子书, pdf 用 ipad air
2016 年 11 月 17 日
回复了 SkyTodInfi 创建的主题 macOS Visual Studio for Mac 下载链接来啦~
这不就是 xamarin 吗?
2016 年 11 月 13 日
回复了 hihihihihi 创建的主题 Python Python 多线程 Websockets 退出出错
算了,算了, 不麻烦了, 我还是 setDaemon 方式退出拉倒。。。后事不料理了。。。。
2016 年 11 月 13 日
回复了 hihihihihi 创建的主题 Python Python 多线程 Websockets 退出出错
好像还是用抛异常来解决超时杀线程比较方便


import threading
import time
import inspect
import ctypes

def _async_raise(tid, exctype):
"""raises the exception, performs cleanup if needed"""
tid = ctypes.c_long(tid)
if not inspect.isclass(exctype):
exctype = type(exctype)
res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype))
if res == 0:
raise ValueError("invalid thread id")
elif res != 1:
# """if it returns a number greater than one, you're in trouble,
# and you should call it again with exc=NULL to revert the effect"""
ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None)
raise SystemError("PyThreadState_SetAsyncExc failed")

def stop_thread(thread):
_async_raise(thread.ident, SystemExit)

class TestThread(threading.Thread):
def run(self):
print "begin"
while True:
time.sleep(0.1)
print "end"
if __name__ == "__main__":
t = TestThread()
t.start()
time.sleep(1)
stop_thread(t)
print "stoped"
2016 年 11 月 12 日
回复了 hihihihihi 创建的主题 Python Python 多线程 Websockets 退出出错
@raysonx 你可能没仔细看上面的帖子, 也可能我没说清楚。

1. python 不像 c++那样提供强制退出线程的函数。 有的时候,你 CTRL+C ,主程序退出了, 你用 Process Monitor 海能看到有代码在跑。

2. 我设置了这样的变量让他退出, 现在关键是 recv 那个函数阻塞住不返回, 也就不会去访问那个变量。我尝试设置超时,也可能是我设置有问题。 对 Python 的异步还没完全搞明白。
楼上有人要 GR2 吗, 买了没用几次,想出,还有 Leica x1 ,也便宜出。
2016 年 10 月 21 日
回复了 hihihihihi 创建的主题 云计算 Cloud 主机硬件选择问题
主要是跑 Python 程序, 太多核好像也用不到, 比较讨厌的一点是, CPU 和 RAM 通常不能自定义配置比例。
2016 年 10 月 10 日
回复了 qceytzn 创建的主题 Linux 有没有人比较过 debian 8 和 ubuntu 16 的稳定性?
稳定和速度快慢是两回事, 并且你都不确定源是不是一样..

少年, 看问题看本质....
2016 年 10 月 8 日
回复了 KOSKERS 创建的主题 Linux 在 Youtube 上看到老外用 unity8.看上去挺帅气的。
@su8610 I don't think so. There are so many bugs.
@zhuangzhuang1988

Please see code below:


```python

from PyQt4 import QtGui, QtCore
import sys
import time

app = QtGui.QApplication(sys.argv)

#the following line will crash the app
time.sleep(300)

w = QtGui.QDialog()
w.show()

sys.exit(app.exec_())

```python


Error Message: ICE default IO error handler doing an exit(), pid = 31805, errno = 32


In some certain occasion, when tasks that take so much time for running, such as loading a database...etc, the app crashes either. To make it simple here, I just added a short period of time sleep to the source code, which crashes the app.


Sorry about that I cannot type Chinese on my Linux Server.
2016 年 10 月 8 日
回复了 KOSKERS 创建的主题 Linux 在 Youtube 上看到老外用 unity8.看上去挺帅气的。
xfce user pass by...
1 ... 31  32  33  34  35  36  37  38  39  40 ... 41  
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1062 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 33ms · UTC 22:51 · PVG 06:51 · LAX 15:51 · JFK 18:51
♥ Do have faith in what you're doing.