-
ts/d/c/f/f/dcff3d9f70403fc7fe9fcc283f05b024/p1_2.jpg)
## 一 键将 C/C++ 代码转换为 Python 能调用的代码
韦泽华

## 大家以前都是怎样调用C++代码呢?
1. python/pybind11
3. ctypes

## 先不讨论这些工具的优劣
先给大家介绍一下
如何使用c2py来调用C++代码
## 在此之前给大家看一下要调用的C++代码源文件
• 我肯定是会拿上期所的API来作示范:
(看一眼就好了)
|Name|Size| h|36 KB|
|ThostFtdcUserApiDataType.h|251 KB|
|ThostFtdcUserApiStruct.h|232 KB|
## c2py的使用分两步走
· 第一步,生成.pyd (.so) 文件
|1|c2py generate vnctp|||
|---|---|---|---|
|2|ThostFtdcMdApi.h|||
|3|ThostFtdcTraderApi
0 码力 |
12 页 |
1.24 MB
| 2 年前 3
-
## 面向亿行C/C++代码的 静态分析系统设计及实践
肖枭
## 500+高端科技领导者与你一起探讨 技术、管理与商业那些事儿
2019年6月14–15日 上海圣诺亚皇冠假日酒店


## 有时候相似 不是巧合
Refactoring Improving the Design of Existing Code

[美] Martin Fowler 著 熊节 译
软件开发的不朽经典 /0/c/1/00c1cf989fd20e3c9e0afd0906ebbbf1/p4_1.jpg)
## 你必须面对既有代码!
无论是不是由你编写
## 这些既有代码你无法逃避
① 遗留的老项目
② Cocoa Touch
③ Cocoa Pods
或许
Swift
和
重构
都让你尝尽苦头


## 但这一切绝对值得!
## 因为我们需要改变世界
## 这一切要从“举个栗子”开始

## Gitea
## 新一代的代码托管平台
2023.12
## 飞致云 & 上海吉谛
2023年11月,飞致云与上海吉谛达成战略合作,获得 Gitea 企业版中国大陆地区独家代理权,向中国数字化团队交付被广泛验证、可信赖的通用工具软件。 8f32bc68/p2_6.jpg)||
|新一代的代码托管平台|一站式持续测试平台|广受欢迎的堡垒机|人人可用的数据可视化分析工具|
|
hi@mzh.io
## 自我介绍
后端工程师,主要写Go
• 业余搞Go官方库开发
● 主要喜欢折腾ARM/MIPS 性能优化
● 第一个中国Go 官方MIPS64 builder 维护者 release-blocker -- 地狱
## 如何提交CL
## CL类型要求
1. typo
2. 新特性
a. 新API、新语法,不能破坏兼容性
b. 性能提升,太少的基本会被打回
c. 新硬件指令需要真实环境
3. bug
a. 所有平台都没有问题
b. 不能引起其他bug
CL举例
?
$ go version
go version devel +9c6f6409ad Wed Nov 20 15:16:17 2019 +0000 linux/amd64
## CL举例

## 编写安全的Python代码
邓良驹
2019.10.19
## 思考题
if user.balance >= product.price: user.balance -= product.price ?
## 目录 CONTENTS [Image](/uploads/documents/a/c/9/a/ac9a9856d5af4cb76d1049ea3b110e9d/p3_2.jpg)
常见不安全代码
代码检查的工具
总结:如何规避风险

## 常见不安全代码
## 小心 eval
import last):
File "", line 1, in
OverflowError: Python int too large to convert to C long
https://www.cvedetails.com/cve/CVE-2017-1000158/
## 应对:
使用较新版本的Python3,而不使用发行版OS自带的旧版Python
0 码力 |
18 页 |
988.40 KB
| 2 年前 3
-
## C HANDBOOK
# Table of Contents
Preface
The C Handbook
Conclusion
## Preface
The C Handbook follows the 80/20 rule: learn in 20% of the time the 80% of a topic.
In particular, the goal is to get get you up to speed quickly with C.
This book is written by Flavio. I publish programming tutorials on my blog flaviocopes.com and I organize a yearly bootcamp at bootcamp.dev.
You can reach me on Twitter Twitter @flaviocopes.
Enjoy!
## The C Handbook
• 1. Introduction to C
• 2. Variables and types
• 2.1. Integer numbers
• 2.2. Unsigned integers
• 2.3. The problem with overflow
0 码力 |
60 页 |
908.68 KB
| 2 年前 3
-
This is C++
JON KALB
20
24
September 15 - 20
This is

## WHAT'S YOUR SUPERPOWER?
## Uncompromising performance [Image](/uploads/documents/3/a/8/c/3a8cc028dde23f7d3437878d5b9a4de6/p5_1.jpg)

This is

## its a conspiracy man
## Memory Model
## I mportant Question
## Does the processor executes the program you long
27 | # 0x1b | | .LCPI1_7: |
| .long | 28 | # 0x1c |
| .long | 29 | # 0x1d |
| .long | 30 | # 0x1e |
0 码力 |
112 页 |
5.17 MB
| 1 年前 3 -
we'll be using them to port C's struct stat to Idris.
Why do we need type providers? Well, Idris’s FFI needs to know the types of the things it passes to and from C, but the fields of a struct stat Let’s write a simple one now:
module Provider
-- Asks nicely for the user to supply the size of C's size_t type on this
-- machine
getSizeT : IO (Provider Int)
getSizeT = do
putStrLn "I'm Don’t worry, there’s a better way.
### 1.3 Foreign Functions
It’s actually pretty easy to write a C function that figures out the size of size_t:
int sizeof_size_t() { return sizeof(size_t); }
(Why 0 码力 |
14 页 |
121.89 KB
| 2 年前 3
|