V2EX terryching 的所有回复 第 1 页 / 共 4 页
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX    terryching    全部回复第 1 页 / 共 4 页
回复总数  69
1  2  3  4  
229 天前
回复了 jackie777 创建的主题 分享创造 TabTab v0.3.0 发布
能不能把浏览器本来的收藏夹一键导入进来,再慢慢调整
@ChristopherWu @nicefrp 迭代的挺快的,比之前好多了
提个建议,最上面的网站名称和“首页”之间是不是分开更好
飞书上竟然还有这么多公开文档,还以为就公司用用
这 UI 设计,一言难尽
感觉 ASAN 是最适合的
dGVycnlxaW5xdEAxNjMuY29t
2024-02-08 22:02:38 +08:00
回复了 wisefree 创建的主题 C++ C++ 如果通过解析字符串定义一个结构体
看看 GPT4 给出的答案:
运行时解析:使用已有的数据结构,如 std::map 或自定义的数据结构,来在运行时模拟结构体。基于解析得到的信息(字段名、类型、数组大小等),你可以动态地存储和访问数据。这种方法牺牲了类型安全和编译时优化,但提供了灵活性。
```c++
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <typeinfo>
#include <cstdint>

class DynamicStruct {
public:
std::map<std::string, std::vector<uint8_t>> fields;

void addInt(const std::string& name, int value) {
auto data = reinterpret_cast<uint8_t*>(&value);
fields[name] = std::vector<uint8_t>(data, data + sizeof(value));
}

void addDouble(const std::string& name, double value) {
auto data = reinterpret_cast<uint8_t*>(&value);
fields[name] = std::vector<uint8_t>(data, data + sizeof(value));
}

int getInt(const std::string& name) {
if(fields.find(name) != fields.end()) {
auto& data = fields[name];
return *reinterpret_cast<const int*>(data.data());
}
return 0; // Or throw an exception
}

double getDouble(const std::string& name) {
if(fields.find(name) != fields.end()) {
auto& data = fields[name];
return *reinterpret_cast<const double*>(data.data());
}
return 0.0; // Or throw an exception
}

// Similar methods can be added for other types and arrays
};

int main() {
DynamicStruct myStruct;
myStruct.addInt("x", 123);
myStruct.addDouble("y", 456.789);
// For arrays, you might add them element by element or as a block if you know the size

std::cout << "x = " << myStruct.getInt("x") << std::endl;
std::cout << "y = " << myStruct.getDouble("y") << std::endl;

// Accessing array elements would require additional methods

return 0;
}
```
2023-07-21 22:48:12 +08:00
回复了 undertow 创建的主题 程序员 工作一天一般写多少行代码
如果有工作需要一天大部分时间敲代码,有两种可能:1. 复杂度低的重复性代码; 2. 任务分配太多导致工作量大。无论哪种,都可以考虑跑路了
2021-08-20 10:34:27 +08:00
回复了 TOUJOURSER 创建的主题 职场话题 坐在我旁边的同事一直抖腿
直接说就行了,不要想太多
2021-01-22 07:57:19 +08:00
回复了 wohenfuyou 创建的主题 C++ 关于 protobuf proto 类型映射到 c++类型
string *是内部使用的,你用接口获取和设置都是 string
2021-01-11 07:54:22 +08:00
回复了 Brentwans 创建的主题 问与答 程序员专职投资可行性
你自己都说了是万万没想到了,说明投资收益和理财能力无关。我觉得可以给自己定几个目标,看看是不是都能达到,大概可以检验一下自己吧。
休息一段时间可以,没必要专职搞吧。
现在默认用 bing,辅助 Google,百度真的用不上了
2020-05-09 12:27:19 +08:00
回复了 deepmindlab 创建的主题 互联网 快看,百度首页的 ui 升级了
2020-05-02 07:58:47 +08:00
回复了 Lybul 创建的主题 宽带症候群 请教各位,为什么同一移动宽带下, windows 无法科学上网,而手机、mac、ubuntu 均没问题呢。
@iamvx 被分享的设备设置开启分享的手机作为代理
2020-04-26 07:24:54 +08:00
回复了 ybw 创建的主题 程序员 有没有类似"给 C++程序员的 Python 教程"的东西
有编程基础的随便看看就会了,基础语法内容不多
目测并不是要找“架构师”,而是做过相关项目的有实际经验的全栈工程师,估计已有的都是应届生或者经验不足的,坑太深。
我们公司的测试组 leader 已经往商务上转,可能也和团队规模比较小有关,题主可以考虑一下
2020-03-30 08:22:56 +08:00
回复了 JJstyle 创建的主题 程序员 第一次画流程图,太难了,请多指教!
感觉文字还要精炼一下
2020-03-25 12:41:21 +08:00
回复了 chizuo 创建的主题 程序员 有没有方便的 GUI 远程 Linux 文件夹管理器啊?
samba 没人说么
1  2  3  4  
关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     3718 人在线   最高记录 6679       Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 36ms UTC 04:15 PVG 12:15 LAX 20:15 JFK 23:15
Do have faith in what you're doing.
ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86