V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  4ever911  ›  全部回复第 36 页 / 共 38 页
回复总数  751
1 ... 28  29  30  31  32  33  34  35  36  37 ... 38  
2016-11-22 15:45:31 +08:00
回复了 yao978318542 创建的主题 配件 推荐一款鼠标,办公用的!手感好一点 100 左右吧 别太贵了
Kinzu V3
2016-11-20 19:46:32 +08:00
回复了 Antidictator 创建的主题 程序员 看技术文档 PDF 之类的比较适合是 Kindle 吗?
我之前为了看书籍, 各种类型, 有 kindle store 上购买的 mobi 格式, 也有 pdf 格式。 买过 2 个 kindle , 都不适合 pdf 格式,文字太小,段落分得很不好。 还买过 surface , 上面的 pdf 阅读软件都好烂!!尤其是涉及到本地书架的时候, 很不爽。 ipad mini 也不适合,太小了。

最后 kindle voyage 看电子书, pdf 用 ipad air
2016-11-17 18:46:32 +08:00
回复了 SkyTodInfi 创建的主题 macOS Visual Studio for Mac 下载链接来啦~
这不就是 xamarin 吗?
2016-11-13 15:27:11 +08:00
回复了 4ever911 创建的主题 Python Python 多线程 Websockets 退出出错
算了,算了, 不麻烦了, 我还是 setDaemon 方式退出拉倒。。。后事不料理了。。。。
2016-11-13 00:55:38 +08:00
回复了 4ever911 创建的主题 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 21:50:01 +08:00
回复了 4ever911 创建的主题 Python Python 多线程 Websockets 退出出错
@raysonx 你可能没仔细看上面的帖子, 也可能我没说清楚。

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

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

少年, 看问题看本质....
2016-10-08 23:07:35 +08:00
回复了 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-08 15:14:41 +08:00
回复了 KOSKERS 创建的主题 Linux 在 Youtube 上看到老外用 unity8.看上去挺帅气的。
xfce user pass by...
我现在发帖用的是一台 外星人 Alpha ,装的 Xubuntu ,速度飞快!但是实际上显卡是多余的,根本用不到,并且支持也不够。

一个星期前,我一直犹豫要不要买一台顶配 32G 的骷髅 做我家里的服务器,也是装 linux , 最后,选择了 i5 的 nuc
因为一个显卡用不到, 二来, i5 完全满足我需求,而且低耗电, CPU 温度低,长期跑稳定。

关键是,价格便宜不少啊。
1 ... 28  29  30  31  32  33  34  35  36  37 ... 38  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   748 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 54ms · UTC 20:49 · PVG 04:49 · LAX 13:49 · JFK 16:49
Developed with CodeLauncher
♥ Do have faith in what you're doing.