V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  hahastudio  ›  全部回复第 105 页 / 共 118 页
回复总数  2346
1 ... 101  102  103  104  105  106  107  108  109  110 ... 118  
2014-08-22 23:12:56 +08:00
回复了 Cwind 创建的主题 问与答 家里的老人老是迷信那些“仙草”怎么办?
我以为是烧仙草= =
你需要 Filco Minila Air
2014-08-22 12:46:58 +08:00
回复了 berry10086 创建的主题 Python 请教 python 字符串编码问题
突然想起来
There should be one-- and preferably only one --obvious way to do it.
然后觉得满脸黑线= =
2014-08-22 12:45:11 +08:00
回复了 berry10086 创建的主题 Python 请教 python 字符串编码问题
比 @binux 慢了。。。好久= =
2014-08-22 12:44:02 +08:00
回复了 berry10086 创建的主题 Python 请教 python 字符串编码问题
来一个好玩的
>>> print eval('"%s"' % ssid)
不是你的网你连个啥嘞
2014-08-22 11:46:16 +08:00
回复了 mailunion 创建的主题 问与答 把服务器的网卡禁用了!
欢迎加入手贱党
我觉得所有的命令行在敲回车之后都要来一个确认= =很多时候只有当敲了回车之后,才意识到自己究竟做了什么= =
2014-08-21 20:13:32 +08:00
回复了 randomize 创建的主题 问与答 发高烧一天半了,一直不退,有什么办法么?
发高烧
× 去医院
√ 上 v2ex
2014-08-20 18:43:20 +08:00
回复了 won 创建的主题 北京 我要掀起一波五道口饮料狂潮
你不如直接 2 块,大家都省事,找钱的时间成本买卖双方都亏掉了
其实我觉得,一杯也送的话,5 块都不算高= =
我看了这个显示器,觉得挺好= =
http://www.v2ex.com/t/121330
2014-08-19 15:58:31 +08:00
回复了 jianghu52 创建的主题 分享发现 别颓了这个网站,真是拖延症的克星啊。
@acros 别闹了,你也会把拉黑插件这件事拖延的
啧啧啧,输入法暴露日常
零食
2014-08-17 23:32:54 +08:00
回复了 ywywywx 创建的主题 问与答 我不能过得好一点吗
等你朝九晚五,没有寒暑假的时候,你也许就明白了
嘛,谁没个跟父母撒娇的时候,只是一般来说知道自己把这话抖出来不露脸= =
2014-08-17 23:28:43 +08:00
回复了 zzetao 创建的主题 问与答 对于目前来说,你会选择什么手机?
Google 不是要弄个 silver 计划么,不知道 Sony 大法参不参与= =
2014-08-17 20:12:06 +08:00
回复了 mortal 创建的主题 Steam Steam 更新 UI 了…
@BGLL 你这么一说我又对未来充满信心了呢!
2014-08-17 18:12:23 +08:00
回复了 mortal 创建的主题 Steam Steam 更新 UI 了…
还有图标变了
我对这个拍扁的世界越来越绝望了= =
2014-08-17 16:45:23 +08:00
回复了 ZzFoo 创建的主题 问与答 Python 为什么不定义 NaN 呢?
啊,Python 喜欢先试,后果另说
你大可以
try:
....n = float(input_str) # e.g. input_str = "123"
except ValueError:
....n = float("nan") # or any other default value you want

对了,作为豆知识
>>> float("inf")
inf
>>> float("-inf")
-inf

对了,突然想起来,也许这个才是 LZ 最想要的:
>>> from decimal import *
>>> setcontext(ExtendedContext)
>>> nan = Decimal("I'm not a number!")
>>> nan
Decimal('NaN')
>>> print nan
NaN

它还能做到更多:
>>> inf = Decimal(1) / Decimal(0)
>>> print inf
Infinity
>>> neginf = Decimal(-1) / Decimal(0)
>>> print neginf
-Infinity
>>> print inf + neginf
NaN
>>> print inf * neginf
-Infinity
>>> print 2 * inf
Infinity
>>> print 1 + nan
NaN
2014-08-17 13:24:00 +08:00
回复了 ZzFoo 创建的主题 问与答 Python 为什么不定义 NaN 呢?
你也许需要 float("nan") 和 math.isnan(x)
>>> float("nan")
nan
>>> nan = float("nan")
>>> import math
>>> math.isnan(nan)
True
>>> math.isnan(1)
False
>>> math.isnan(nan + 1)
True
1 ... 101  102  103  104  105  106  107  108  109  110 ... 118  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2778 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 51ms · UTC 08:57 · PVG 16:57 · LAX 01:57 · JFK 04:57
Developed with CodeLauncher
♥ Do have faith in what you're doing.