V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  sonack  ›  全部回复第 4 页 / 共 6 页
回复总数  106
1  2  3  4  5  6  
2017-02-17 01:56:46 +08:00
回复了 uhayate 创建的主题 Python 关于命令行使用 Python 虚拟环境的问题,求解答。
virtualenv
2017-02-03 00:27:42 +08:00
回复了 SophiaZhang 创建的主题 分享创造 两人一起开发的独立项目-免费在线 APP 原型工具
很棒!神 coding 侠侣啊
一直在用 chrome 的起始页插件做主页,比如 Infinity
2017-02-01 22:01:23 +08:00
回复了 zhihaofans 创建的主题 Steam 我向开发者举报有网站发布破解软件,结果把我永久封禁了
哈哈哈哈哈 先让我笑一会
2017-01-04 01:02:00 +08:00
回复了 sonack 创建的主题 问与答 游戏开发从零开始到深入的书单求推荐
@GordianZ 看这本书需不需要对 c++的理解比较深?
请问有什么推荐的书来学习 websocket 吗
2017-01-04 00:44:00 +08:00
回复了 iMmatrix 创建的主题 Python 我的开源 GitBook: Python 之旅
赞 抽空看看一下复习一下
我现在这样实现的。。。
用 python 的 aiohttp

import asyncio

from aiohttp import web

test = False

async def index(request):
global test
print('index test=',test)
test = True
print('index changed=',test)
return web.Response(body=b'<h1>Index</h1>',content_type='text/html')

async def hello(request):
print("start");
while True:
await asyncio.sleep(0.5)
print('test = ' , test)
if test:
break
print("end");
text = '<h1>Hello, %s!</h1>' % request.match_info['name']
return web.Response(body=text.encode('utf-8'),content_type='text/html')

async def init(loop):
app = web.Application(loop=loop)
app.router.add_route('GET', '/', index)
app.router.add_route('GET', '/hello/{name}', hello)
srv = await loop.create_server(app.make_handler(), '127.0.0.1', 8000)
print('Server started at http://127.0.0.1:8000...')
return srv

loop = asyncio.get_event_loop()
loop.run_until_complete(init(loop))
loop.run_forever()


访问 hello 不会立即返回。除非另外一个访问了 index 。。。。

不知道这样做有没有什么问题
2017-01-01 02:05:16 +08:00
回复了 bjeck 创建的主题 游戏 有没有啥有趣,可玩性高,耐玩,烧脑的游戏。
暗黑血统
2017-01-01 01:55:05 +08:00
回复了 fsgmhoward 创建的主题 推广 新年快乐,送上我们制作的一枚小礼品给各位~
新年快乐,从来没中过的我
2016-12-28 19:08:53 +08:00
回复了 forvtwoex 创建的主题 问与答 站在旋转的球上容易掉下来,如何解释这个问题?
因为地球对你有引力,引力一部分提供了向心力,一部分是重力,你的球体质量肯定没有地球大,而且人类已经习惯了这种重力。
2016-12-28 19:05:16 +08:00
回复了 eyp82 创建的主题 问与答 刚刚复习算法, 看到 greedy algorithm, 不禁长叹
人生是个不可解问题啊
2016-12-27 02:09:01 +08:00
回复了 lxiange 创建的主题 程序员 来看看这个函数的时间复杂度是多少
楼主钓鱼?
已领,感谢楼主
拼音基本一分钟 150 字
2016-12-23 22:48:40 +08:00
回复了 sonack 创建的主题 问与答 软件工程是不是扯淡
@kmyzzy 收藏了,考完试我翻译到博客上
slixurd 正解
2016-12-23 22:44:08 +08:00
回复了 sonack 创建的主题 问与答 软件工程是不是扯淡
感觉一群刷论文的,,,
A:没有银弹
B:我觉得有
A:真的有
B:有银弹是错误的
A:我承认你,但是有


这不是神经病???

明天就考试的我生无可恋
1  2  3  4  5  6  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2245 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 45ms · UTC 08:01 · PVG 16:01 · LAX 01:01 · JFK 04:01
Developed with CodeLauncher
♥ Do have faith in what you're doing.