risent's recent timeline updates
risent

risent

Linux Python webOS
V2EX member #488, joined on 2010-05-21 16:56:22 +08:00
Today's activity rank 6429
如何获取到腾讯云的所有 IP 段
云计算  •  risent  •  Mar 11, 2019  •  Lastly replied by ruiowe
1
Python 中 Hello World 的 10 种写法
Python  •  risent  •  Mar 27, 2018  •  Lastly replied by est
22
跟 Cloudflare Raigun 类似的功能有人自己实现过么?
程序员  •  risent  •  Oct 27, 2017  •  Lastly replied by risent
4
记一次 macOS 文件系统修复
macOS  •  risent  •  Aug 4, 2017  •  Lastly replied by risent
6
risent's recent replies
Feb 19, 2025
Replied to a topic by timothyxu 程序员 微信 mac DB 内怎么找到删除好友的记录
Mac 微信的数据库是加密的,你要先关闭 SIP ,然后 hook 住微信的进程找到合适的函数把密钥打印出来,然后就可以用 sqlcipher 等工具打开数据库了,如果没有逆向相关的经验整个过程还是很繁琐的。
@Dogergo 个人感觉字符串才是比数字是更优雅的设计,尤其是当在你通过 SQL 维护或者统计数据的时候,直接就能看明白结果。
使用 int 的“优点”是在数据库存储上会有些微的节省空间以及性能优势,比如 MySQL 中可以用 tinyint 替代 varchar 。但是这是在以前存储很值钱的时候有点价值,现在对于普通 web 应用这点优势完全不值得牺牲可读性跟可维护性。
Apr 30, 2020
Replied to a topic by scalaer 生活 一双合适运动鞋对跑步的影响有多大?
鞋子真的很重要,尤其是对于刚开始跑步的人,技能不行,装备来凑还是有道理的。
我个人开始也遇到过穿着普通鞋跑两公里后膝盖各种痛,后面买了 美津浓的 Wave Rider,可以说立竿见影,跑完几公里后膝盖一点感觉都没有。
其他步频、核心、呼吸之类的,入门后网上有很多专业资料讲的。

最后:听从身体的感觉,疲惫了可以坚持,但是如果出现伤痛,立马停止休息。
Jun 22, 2019
Replied to a topic by TangMonk LeanCloud Leancloud 挂了
哎,这事都没法讨论
我去, 这锅当年是算在 cassandra 头上的,同一时期很多公司包括 Twitter 也在准备迁移到 cassandra,出了 digg 这档子事后都赶紧拉倒了。
cassandra 背锅这么多年啊!!
这话要是从王坚博士口里说出来倒也正常,竟然是从章博士口里说出来的,真是让人大吃一惊
Mar 23, 2018
Replied to a topic by 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'))

```
Mar 23, 2018
Replied to a topic by risent Python Python 中 Hello World 的 10 种写法
@assad 主要是针对不同的情况, 比如需要用到一个 C/C++ 的库,那么就可以很快的通过 ctypes 或者 cffi 的方式快速的撸一个 binding 出来,
或者如果想对某一个模块 /功能在性能上优化一下,那么可以将其直接用 Cython 或者 Rust 直接重写,然后提供给 Python 来调用。
Mar 23, 2018
Replied to a topic by 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
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   796 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 22ms · UTC 22:15 · PVG 06:15 · LAX 15:15 · JFK 18:15
♥ Do have faith in what you're doing.