资源简介
Pycocotools安装程序和安装方法,包括Microsoft Visual C++ 14.0安装程序
代码片段和文件信息
// https://github.com/vivkin/gason - pulled January 10 2016
#include “gason.h“
#include
#define JSON_ZONE_SIZE 4096
#define JSON_STACK_SIZE 32
const char *jsonStrError(int err) {
switch (err) {
#define XX(no str) \
case JSON_##no: \
return str;
JSON_ERRNO_MAP(XX)
#undef XX
default:
return “unknown“;
}
}
void *JsonAllocator::allocate(size_t size) {
size = (size + 7) & ~7;
if (head && head->used + size <= JSON_ZONE_SIZE) {
char *p = (char *)head + head->used;
head->used += size;
return p;
}
size_t allocSize = sizeof(Zone) + size;
Zone *zone = (Zone *)malloc(allocSize <= JSON_ZONE_SIZE ? JSON_ZONE_SIZE : allocSize);
if (zone == nullptr)
return nullptr;
zone->used = allocSize;
if (allocSize <= JSON_ZONE_SIZE || head == nullptr) {
zone->next = head;
head = zone;
} else {
zone->next = head->next;
head->next = zone;
}
return (char *)zone + sizeof(Zone);
}
void JsonAllocator::deallocate() {
while (head) {
Zone *next = head->next;
free(head);
head = next;
}
}
static inline bool isspace(char c) {
return c == ‘ ‘ || (c >= ‘\t‘ && c <= ‘\r‘);
}
static inline bool isdelim(char c) {
return c == ‘‘ || c == ‘:‘ || c == ‘]‘ || c == ‘}‘ || isspace(c) || !c;
}
static inline bool isdigit(char c) {
return c >= ‘0‘ && c <= ‘9‘;
}
static inline bool isxdigit(char c) {
return (c >= ‘0‘ && c <= ‘9‘) || ((c & ~‘ ‘) >= ‘A‘ && (c & ~‘ ‘) <= ‘F‘);
}
static inline int char2int(char c) {
if (c <= ‘9‘)
return c - ‘0‘;
return (c & ~‘ ‘) - ‘A‘ + 10;
}
static double string2double(char *s char **endptr) {
char ch = *s;
if (ch == ‘-‘)
++s;
double result = 0;
while (isdigit(*s))
result = (result * 10) + (*s++ - ‘0‘);
if (*s == ‘.‘) {
++s;
double fraction = 1;
while (isdigit(*s)) {
fraction *= 0.1;
result += (*s++ - ‘0‘) * fraction;
}
}
if (*s == ‘e‘ || *s == ‘E‘) {
++s;
double base = 10;
if (*s == ‘+‘)
++s;
else if (*s == ‘-‘) {
++s;
base = 0.1;
}
unsigned int exponent = 0;
while (isdigit(*s))
exponent = (exponent * 10) + (*s++ - ‘0‘);
double power = 1;
for (; exponent; exponent >>= 1 base *= base)
if (exponent & 1)
power *= base;
result *= power;
}
*endptr = s;
return ch == ‘-‘ ? -result : result;
}
static inline JsonNode *insertAfter(JsonNode *tail JsonNode *node) {
if (!tail)
return node->next = node;
node->next = tail->next;
tail->next = node;
return node;
}
static inline JsonValue listToValue(JsonTag tag JsonNode *tail) {
if (tail) {
auto head = tail->next;
tail->next = nullptr;
return JsonValue(tag head);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3287928 2017-12-20 15:24 Microsoft Visual C++ 14.0\Microsoft Visual C++ 14.0.exe
目录 0 2018-03-29 10:57 Microsoft Visual C++ 14.0
----------- --------- ---------- ----- ----
3287928 2
- 上一篇:MFC 实现画线 画图形 移动删除图形
- 下一篇:VC6.0配置HDF5环境
相关资源
- Python基础教程第3版) 高清PDF
- QT实现的聊天界面,好友列表,支持文
- 嵌入式web服务器boa_C语言/Python + HTML
- C++调用python3.5中的函数
- python3.x Opencv Toturial
- microsoft visual c++ 14.0 For Python
- pyinstaller 解问题包
- Microsoft visual c++ 14.058503
- winows下python安装xgboost的包
- 数据结构与算法分析.C++语言描述 第四
- GDAL-2.3.3-cp35-cp35m-win_amd64.whl
- 基于OpenCV3( Python / C++ ) 的车道检测
- python课件pdf哈工大
- python实现说话人识别实验与开发
- gdb-python27.exe
- NSGA II代码实现集合包含、讲解及 网络
- Python源码剖析-深度探索动态语言核心
- 算法图解-Python语言版本C/C++也可以看
- 酷Q二次开发c++python 混合编程说文件不
- Microsoft Visual C++ Build Tools
- python通过ctypes调用c\\c++编写的dll\\so库
- 深入浅出Python(中文版) pdf
- gcc.tar(gcc-4.8.5-39.el7.x86_64.rpm)
- python3.6.5安装包
- Geoprocessing-with-Python.pdf
- Scipy Tutorial(Scipy教程)
- C++ Primer 英文版
- OpenCV算法精解 基于Python与C++
- python版本推箱子(界面美化包含打包
- 《剑指Offer:名企面试官精讲典型编程
评论
共有 条评论