V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  hiyoi  ›  全部回复第 3 页 / 共 3 页
回复总数  49
1  2  3  
@hiyoi 打错了,是支持 vlan 的交换机,一般就是网管交换机,只要支持 802.1q 的就行了
买个支持 vpn 的交换机放弱电箱,就可以把光猫的 wan 线和各房间的 lan 线接到这个交换机上,在设置两个不同 vlan id 隔离。openwrt 路由器里设置好 wan 口对应 vlan id ,就能放在客厅或者任意有网口的房间拨号了。
2021-12-16 21:56:52 +08:00
回复了 vicalloy 创建的主题 问与答 Travis CI 是不是要挂了
转 CircleCI 不就好了
2021-12-07 13:47:43 +08:00
回复了 cpstar 创建的主题 Android [选择困难症] 分享一下最近的选机历程(2021 年 12 月有效)
手持 s20+,首发买的,感觉现在依旧能打,865 还能再战几年。one ui 现在日常已经非常好用了,缺点是国内不带系统级推送,国外 GMS 就没这毛病。不过国内需要推送也就微信这些 IM ,然而这些毒瘤 app 宁愿开后台也不会接入推送的。
2020-05-19 16:29:07 +08:00
回复了 wuwukai007 创建的主题 Python Python 捕获多进程 OR 多线程 error 的最佳实现是什么?
最近刚好碰到这个情况,我是这么解决的,把要子线程和日志对象封装到一起,使用 logger.exception()来 traceback 错误


```
from concurrent.futures import ThreadPoolExecutor
import logging


class Main(object):
def __init__(self, logger=None):
self.pool = ThreadPoolExecutor
self.logger = logger or self._get_logger(__name__)

def _get_logger(self, name):
logger = logging.getLogger(name)
handler = logging.StreamHandler()
formatter = logging.Formatter(
"%(asctime)s - %(levelname)s - %(threadName)s - %(message)s")
handler.setFormatter(formatter)
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
return logger

def do_something(self):
try:
a = 1 / 0
except Exception as e:
self.logger.exception(e)

def async_task(self):
with self.pool() as p:
for i in range(3):
p.submit(self.do_something)


if __name__ == '__main__':
m = Main()
m.async_task()
```

日志:
```
2020-05-19 16:23:38,378 - ERROR - ThreadPoolExecutor-0_0 - division by zero
Traceback (most recent call last):
File "thread.py", line 22, in do_something
a = 1 / 0
ZeroDivisionError: division by zero
2020-05-19 16:23:38,378 - ERROR - ThreadPoolExecutor-0_0 - division by zero
Traceback (most recent call last):
File "thread.py", line 22, in do_something
a = 1 / 0
ZeroDivisionError: division by zero
2020-05-19 16:23:38,378 - ERROR - ThreadPoolExecutor-0_2 - division by zero
Traceback (most recent call last):
File "thread.py", line 22, in do_something
a = 1 / 0
ZeroDivisionError: division by zero
```
2019-07-11 12:53:02 +08:00
回复了 rizon 创建的主题 程序员 腾讯云服务器 https 连接不上了
原来是这原因,debug 好几天都找不到问题再哪里。腾讯云这孙子也没发个通知公告一下。
2018-07-28 11:54:08 +08:00
回复了 Alice0T0 创建的主题 程序员 求推荐免费图床
@cairnechen 这个 uid 貌似是小贱贱图床的,不知道用什么什么手段隐藏了信息
2018-07-25 14:19:27 +08:00
回复了 gaocc 创建的主题 问与答 求漫画和小说 api,最好是免费的
😂之前为了自己看漫画方便,动手做了一个
https://www.kumaodm.com
厉害啊。
1  2  3  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2330 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 24ms · UTC 11:00 · PVG 19:00 · LAX 04:00 · JFK 07:00
Developed with CodeLauncher
♥ Do have faith in what you're doing.