2023年8月19日

c++ 多线程

摘要: ```cpp #include #include #include #include // std::promise, std::future #include void print_int(std::future& fut) { int x = fut.get(); // 获取共享状态的值. st 阅读全文

posted @ 2023-08-19 09:38 Ultraman_X 阅读(14) 评论(0) 推荐(0) 编辑

2022年8月17日

D3D世界变换

摘要: 首先讲解一下模型空间 什么是模型空间呢?每个模型(3D物体)都有它自己的空间,空间的中心(原点)就是模型的中心。在模型空间里,只有模型上的不同点有位置的相对关系。那什么是世界空间呢?世界就是物体(模型)所存在的地方。当我们把一个模型放进世界里面去,那么它就有了一个世界坐标,这个世界坐标是用来标记世界 阅读全文

posted @ 2022-08-17 17:20 Ultraman_X 阅读(61) 评论(0) 推荐(0) 编辑

2022年6月20日

UML交互图

摘要: 概念 交互图描述对象之间的动态合作关系以及合作过程中的行为次序。 交互图常常用来描述一个用例的行为,显示该用例中所涉及的对象以及这些对象之间的消息传递情况,即一个用例的实现过程。 交互图有顺序图(Sequence Diagram)和协作图(Communication Diagram)两种形式。时序图 阅读全文

posted @ 2022-06-20 13:45 Ultraman_X 阅读(69) 评论(0) 推荐(0) 编辑

2022年5月12日

以某特定点缩放

摘要: Fixed Point Scaling in Easy Steps with Important Example March 17, 2021 / Computer Graphics, Computer Science, Gate preparation, UGC-NET preparation / 阅读全文

posted @ 2022-05-12 10:22 Ultraman_X 阅读(45) 评论(0) 推荐(0) 编辑

2022年4月28日

c++11 decay/decltype/declval

摘要: decay std::decay对类型进行退化处理。 T为数组U或数组U引用,则type为U*. T为函数时,则type为std::add_pointer::type. 其它类型则移除cv限定符(const和volatile),则type为std::remove_cvstd::remove_refe 阅读全文

posted @ 2022-04-28 10:53 Ultraman_X 阅读(445) 评论(0) 推荐(0) 编辑

2022年3月24日

避免overloading on universal reference : tag dispatch

摘要: template<typename T> void logAndAdd(T&& name){ logAndAddImpl(std::forward<T>(name),std::is_integral<T>()); } 如果name是个左值(int),则T为int&,这样std::is_integra 阅读全文

posted @ 2022-03-24 18:11 Ultraman_X 阅读(19) 评论(0) 推荐(0) 编辑

2021年12月17日

gtest的使用

摘要: 一、TEST 有两个参数 : test case name 和 test name。test需要归类到test cases。例如: TEST(FactorialTest, Negative) 中 test is named "Negative", "FactorialTest" 是test case 阅读全文

posted @ 2021-12-17 19:11 Ultraman_X 阅读(323) 评论(0) 推荐(0) 编辑

2021年12月10日

老年人保险

摘要: 给老人,只买四类保险就可以了: 社会医保、意外险、医疗险、重疾险 。 意外险,有三项责任,意外身故、意外伤残、意外医疗 对老年人来讲,发生意外的概率一般是“意外医疗>意外伤残>意外身故”。 所以要着重看保不保意外医疗,建议0免赔,报销额度在1万以上。 百万医疗险 但是,老人因为健康问题,买不了百万医 阅读全文

posted @ 2021-12-10 23:33 Ultraman_X 阅读(33) 评论(0) 推荐(0) 编辑

2021年11月1日

正则表达式

摘要: 普通字符: [ABC] [^ABC] [A-Z] [\s\S] \w 特殊字符: $ :匹配输入字符串的结尾位置 ():标记一个子表达式的开始和结束位置 :匹配前面的子表达式零次或多次 +:匹配前面的子表达式一次或多次 ?:匹配前面的子表达式零次或一次 .:匹配除换行符 \n 之外的任何单字符 [: 阅读全文

posted @ 2021-11-01 15:08 Ultraman_X 阅读(35) 评论(0) 推荐(0) 编辑

2021年9月10日

2021 打算图书清单

摘要: modern-cpp Fundamentals of Computer Graphics Computational Geometry: Algorithms and Applications Physically Based Rendering: From Theory to Implementa 阅读全文

posted @ 2021-09-10 13:52 Ultraman_X 阅读(14) 评论(0) 推荐(0) 编辑

导航