risent 最近的时间轴更新
risent

risent

Linux Python webOS
V2EX 第 488 号会员,加入于 2010-05-21 16:56:22 +08:00
如何获取到腾讯云的所有 IP 段
云计算  •  risent  •  2019-03-11 14:12:32 PM  •  最后回复来自 ruiowe
1
Python 中 Hello World 的 10 种写法
Python  •  risent  •  2018-03-27 15:04:00 PM  •  最后回复来自 est
22
跟 Cloudflare Raigun 类似的功能有人自己实现过么?
程序员  •  risent  •  2017-10-27 21:58:33 PM  •  最后回复来自 risent
4
记一次 macOS 文件系统修复
macOS  •  risent  •  2017-08-04 16:25:21 PM  •  最后回复来自 risent
6
risent 最近回复了
2021-06-23 17:20:11 +08:00
回复了 kensoz 创建的主题 程序员 中小公司开发人员包揽测试,在行业内属于正常嘛?
2020-05-15 11:59:32 +08:00
回复了 en20 创建的主题 程序员 问一下后端的同学为何你们传参都喜欢 int 1234
@Dogergo 个人感觉字符串才是比数字是更优雅的设计,尤其是当在你通过 SQL 维护或者统计数据的时候,直接就能看明白结果。
使用 int 的“优点”是在数据库存储上会有些微的节省空间以及性能优势,比如 MySQL 中可以用 tinyint 替代 varchar 。但是这是在以前存储很值钱的时候有点价值,现在对于普通 web 应用这点优势完全不值得牺牲可读性跟可维护性。
2020-04-30 09:35:54 +08:00
回复了 scalaer 创建的主题 生活 一双合适运动鞋对跑步的影响有多大?
鞋子真的很重要,尤其是对于刚开始跑步的人,技能不行,装备来凑还是有道理的。
我个人开始也遇到过穿着普通鞋跑两公里后膝盖各种痛,后面买了 美津浓的 Wave Rider,可以说立竿见影,跑完几公里后膝盖一点感觉都没有。
其他步频、核心、呼吸之类的,入门后网上有很多专业资料讲的。

最后:听从身体的感觉,疲惫了可以坚持,但是如果出现伤痛,立马停止休息。
2019-06-22 16:31:26 +08:00
回复了 TangMonk 创建的主题 LeanCloud Leancloud 挂了
哎,这事都没法讨论
我去, 这锅当年是算在 cassandra 头上的,同一时期很多公司包括 Twitter 也在准备迁移到 cassandra,出了 digg 这档子事后都赶紧拉倒了。
cassandra 背锅这么多年啊!!
这话要是从王坚博士口里说出来倒也正常,竟然是从章博士口里说出来的,真是让人大吃一惊
2018-03-23 23:20:53 +08:00
回复了 risent 创建的主题 Python Python 中 Hello World 的 10 种写法
@hellolleh 确实,示例代码没考虑 Python3, Python3 中应该是下面这样子

```
import ctypes

hello_lib = ctypes.cdll.LoadLibrary('hello.so')

hello = hello_lib.hello
hello(b'Hello World')
hello('Hello World'.encode('ascii'))

```
2018-03-23 21:50:02 +08:00
回复了 risent 创建的主题 Python Python 中 Hello World 的 10 种写法
@assad 主要是针对不同的情况, 比如需要用到一个 C/C++ 的库,那么就可以很快的通过 ctypes 或者 cffi 的方式快速的撸一个 binding 出来,
或者如果想对某一个模块 /功能在性能上优化一下,那么可以将其直接用 Cython 或者 Rust 直接重写,然后提供给 Python 来调用。
2018-03-23 21:41:44 +08:00
回复了 risent 创建的主题 Python Python 中 Hello World 的 10 种写法
@hellolleh 这个是会自动转换的

> None, integers, longs, byte strings and unicode strings are the only native Python objects that can directly be used as parameters in these function calls. None is passed as a C NULL pointer, byte strings and unicode strings are passed as pointer to the memory block that contains their data (char * or wchar_t *). Python integers and Python longs are passed as the platforms default C int type, their value is masked to fit into the C type.


https://docs.python.org/2/library/ctypes.html
2017-10-27 21:58:33 +08:00
回复了 risent 创建的主题 程序员 跟 Cloudflare Raigun 类似的功能有人自己实现过么?
@scriptB0y 嗯,不一样,不过 varnish 是内置支持 ESI 的。
从效果上说的话 Cloudflare Railgun 就是通过透明化不需要改动应用层的业务逻辑 自动化的达到了 ESI 的效果。

类似的还有 Google 之前推出过一个 SDCH (Shared Dictionary Compression for HTTP) 的协议,Chrome 从 2008 年起就支持,但是后语需要更改后端业务层的逻辑才能起到压缩效果,一直推广不开来,前不久在 Chrome 59 中被 Google 把该功能移除了。
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3040 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 18ms · UTC 14:55 · PVG 22:55 · LAX 07:55 · JFK 10:55
Developed with CodeLauncher
♥ Do have faith in what you're doing.