V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  siteshen  ›  全部回复第 12 页 / 共 22 页
回复总数  422
1 ... 8  9  10  11  12  13  14  15  16  17 ... 22  
2017-02-27 13:02:36 +08:00
回复了 gps32251070 创建的主题 macOS 终于限免了……
要是标题是“ 1password 终于限免了……”就更好了。
2017-02-07 12:55:11 +08:00
回复了 lzjun 创建的主题 Python Python 表达式 i += x 与 i = i + x 等价吗?
吓得我赶紧 `help('+=')` 了一下,果然不完全等价。

An augmented assignment expression like "x += 1" can be rewritten as
"x = x + 1" to achieve a similar, but not exactly equal effect. In the
augmented version, "x" is only evaluated once. Also, when possible,
the actual operation is performed *in-place*, meaning that rather than
creating a new object and assigning that to the target, the old object
is modified instead.
2016-10-09 01:47:21 +08:00
回复了 Orzzzz 创建的主题 问与答 如何存储知乎的关注关系?
-- 补充下:关注 /取消关注的 sql
insert into user_followships values(1024, 2048); -- “用户 1024 ”关注“用户 2048 ”
delete from user_followships where from_user_id=1024 and to_user_id=2048; -- “用户 1024 ”取消关注“用户 2048 ”
2016-10-09 01:44:49 +08:00
回复了 Orzzzz 创建的主题 问与答 如何存储知乎的关注关系?
-- 用户关注
-- user_followships: from_user_id, to_user_id
select to_user_id from user_followships where from_user_id = '1024'; -- 列出“用户 1024 ”关注的 user_id
select from_user_id from user_followships where to_user_id = '1024'; -- 列出关注“用户 1024 ”的 user_id

-- 话题关注:参考用户关注
2016-09-26 13:32:20 +08:00
回复了 mumuy 创建的主题 JavaScript 亲戚关系计算器求找 bug
@siteshen 不好意思,忘记默认选择了性别(男)。
2016-09-26 13:30:30 +08:00
回复了 mumuy 创建的主题 JavaScript 亲戚关系计算器求找 bug
爸爸的儿子 -兄弟 /自己
爸爸的女儿 - 姐妹
2016-09-14 13:53:18 +08:00
回复了 laoyur 创建的主题 Python 新手问一个关于 fabric 的问题
def hehe():
with prefix('VAR1=hehe'):
run('echo $VAR1')
2016-09-14 13:44:05 +08:00
回复了 rogwan 创建的主题 Python 通知用户,有未读新文章,用那种方案比较好?
model
-------

+ user.n_unread_message
+ user.message_ids

code
------

.. sourcecode:: python

create_post(user, post):
# offline worker
for follower in user.followers:
follower.n_unread_message += 1
user.message_ids.append(post_activity.id)
2016-08-09 11:05:56 +08:00
回复了 simple26 创建的主题 程序员 如何优雅地将 md 文件中的中英文混合标点符号进行统一?
@simple26 我给的当然只是示例代码,不过回答这个问题已经足够了。

另,现代编辑器 Replace All 都应该支持正则的,研究下完全能达到和 tr 一样的替换的效果。
2016-08-09 09:48:35 +08:00
回复了 simple26 创建的主题 程序员 如何优雅地将 md 文件中的中英文混合标点符号进行统一?
cat filename.md | tr ',.' ',。'
2016-07-11 09:24:58 +08:00
回复了 XueSeason 创建的主题 杭州 杭州有哪些适合敲代码的地方?
西湖
2016-06-27 09:26:06 +08:00
回复了 szhgoldeneye 创建的主题 程序员 大家有没有系统洁癖
岂止系统洁癖,年轻的时候都有硬盘洁癖,重装系统都要 dd 8 次硬盘。
2016-06-23 09:31:22 +08:00
回复了 jrhu05 创建的主题 问与答 有多少人是因为觉得写程序挺好玩的才选择成为码农?
大学看了软件工程学费贵,想到“高投入高回报”,而且和高中喜欢的“数学”有些关系,就报这个专业了。
2016-06-18 00:41:35 +08:00
回复了 gulu 创建的主题 Python 使用 Tornado 开发 Web App 的架构是怎么样的?
2016-06-17 23:10:09 +08:00
回复了 coolloves 创建的主题 Python 请教一个 requests 使用代理的问题!
@SuperFashi 别带坏初学者!!
2016-05-24 13:48:55 +08:00
回复了 Egg 创建的主题 问与答 前端的审美应该如何提升
@Egg 《写给大家看的设计书》内容已经很少了,我(后端) 3 个小时就看完了前面几章。照着那几条规则来,至少能发现很多明显的失误。
2016-05-18 09:27:08 +08:00
回复了 only0jac 创建的主题 程序员 最方便的后端语言?
常年 *ix 环境开发,无视 .net ,对 java 这种大部头的语言无感。
我选择 python3 , python 库丰富,绝大部分库已支持 python3 。主流操作系统都能方便的安装,搭上 jinja2 做个网页也比较轻松。
用 go1.2 写过 API ,调用通用接口时,需要类型转换比较麻烦,和 python 相比有被束缚的感觉。
2016-04-21 13:32:00 +08:00
回复了 sivacohan 创建的主题 酷工作 [北京] 高级前端工程师/前端架构师 -- 来自招聘头条的邀请
“你需要从最基础的代码风格,到最后的性能优化,制定出能经受住 challenge 的架构”,看到这条在心里点了个赞,再一看原来是招前端。。
1 ... 8  9  10  11  12  13  14  15  16  17 ... 22  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5428 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 44ms · UTC 09:01 · PVG 17:01 · LAX 02:01 · JFK 05:01
Developed with CodeLauncher
♥ Do have faith in what you're doing.