上一页 1 2 3 4 5 6 7 8 ··· 22 下一页
摘要: 整理一波g++编译参数 生成可执行文件a.out 生成可执行文件test 生成test.o 生成带调试信息的test.o 链接目标文件,生成可执行文件test 参考资料: gcc命令 GCC Command Options 阅读全文
posted @ 2017-09-23 19:52 Sawyer Ford 阅读(252) 评论(0) 推荐(0) 编辑
摘要: id id(x)对应变量x所引用对象的内存地址。可以把id(x)看成变量x的身份标识。 is 有时在编程中需要与变量的身份标识打交道,但不是通过 id 函数,而是 is 操作符。 The operators is and is not test for object identity: x is y 阅读全文
posted @ 2017-09-22 10:41 Sawyer Ford 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Python中的变量有两个特点: 1. 无需声明 2. 不与类型绑定 变量名只是内存中具体对象的一个引用(reference)。 对于 a = 1,内存模型如下: 对于 内存模型如下: 可以通过id(x)获取变量x所引用对象的内存地址 输出如下: address of the object refe 阅读全文
posted @ 2017-09-21 21:59 Sawyer Ford 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 初始化 迭代 迭代时删除 参考文献 Remove items from a list while iterating How to delete items from a dictionary while iterating over it? 阅读全文
posted @ 2017-09-21 17:08 Sawyer Ford 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 索引与外键 order是MySQL的一个关键字,不要用来做表名,否则有坑。 触发器 replace into REPLACE works exactly like INSERT, except that if an old row in the table has the same value as 阅读全文
posted @ 2017-09-12 20:37 Sawyer Ford 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 开始学习MySQL。 customer表如下: 参考资料: How I Write SQL, Part 1: Naming Conventions 阅读全文
posted @ 2017-09-12 16:52 Sawyer Ford 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 直接上代码: 有个地方值得注意: <img /> 、<br /> 、<hr /> 没有内容的HTML元素被称为空元素,空元素是在开始标签中被关闭的。 效果图: 上述关于body背景颜色、h1对齐方式的设置方法已经过时,应该通过style进行设置。 阅读全文
posted @ 2017-08-26 10:04 Sawyer Ford 阅读(139) 评论(0) 推荐(0) 编辑
摘要: df -h, --human-readable du -h, --human-readable -s, --summarize 阅读全文
posted @ 2017-08-25 14:11 Sawyer Ford 阅读(7595) 评论(0) 推荐(0) 编辑
摘要: python脚本如何调用Java的jar文件呢? HelloWorld.java javacaller.py 输出: b'hello world\n' <class 'bytes'>decode: hello world <class 'str'>b'LOGAN' <class 'bytes'>de 阅读全文
posted @ 2017-08-15 14:29 Sawyer Ford 阅读(537) 评论(0) 推荐(0) 编辑
摘要: 今天发现,使用redis-py从redis中获取的数据竟然是加密的。 输出: result: b'value1'result type: <class 'bytes'> result_decoded: value1result_decoded type: <class 'str'> result_s 阅读全文
posted @ 2017-08-11 21:09 Sawyer Ford 阅读(187) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 22 下一页