avatar
文章
17
标签
25
分类
5

首页
归档
标签
分类
清单
  • 音乐
  • 电影
友情链接
关于我
王赵安的博客
首页
归档
标签
分类
清单
  • 音乐
  • 电影
友情链接
关于我

王赵安的博客

使用KVM创建虚拟机的记录
发表于2025-03-25
关键命令: sudo virt-install --name wza-vm3 --ram 2048 --disk path=/var/lib/libvirt/images/myubuntuvm4.qcow2,size=20 --vcpus 2 --os-type linux --os-variant ubuntu20.04 --network network=default,model=virtio --graphics none --console pty,target_type=serial --location http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/ --extra-args "console=ttyS0"
论文阅读笔记-[SIGCOMM_17] The QUIC Transport Protocol- Design and Internet-Scale Deployment
发表于2023-10-24
摘要QUIC(Quick UDP Internet Connections),一种加密的,多路复用的,并且低延时的传输层协议,被设计用于提高 HTTPS 流量的传输效率以及快速的部署和持续的传输机&#x ...
论文阅读笔记-[Security_18] Off-Path TCP Exploit-How Wireless Routers Can Jeopardize Your Secret
发表于2023-10-08
摘要 作者发现了一种时序侧信道,其存在于各代半双工的 IEEE 802.11 或者 Wi-Fi 技术中。 这种设计上的错误很难被修补,不像其他漏洞。 可以应用于三大d ...
Modern C++ Learning(8)-Pointers
发表于2023-09-07
PointersPointer to Object of Type T stores a memory address of an object of type T can be used to inspect/observe/modify the target object can be redirected to a different target (unlike references) may also point to no object at all (be a Null Pointer) Raw Pointers: T* essentially an (unsigned) integer variable storing a memory address size: 64 bits on 64 bit platforms many raw pointers can point to the same address / object lifetimes of pointer and taget (pointed-to) object are independent ...
Modern C++ Learning(7)-References
发表于2023-09-05
ReferencesCapabilities (& Limitations)non-const Referencesint i = 2;int& ri = i; // reference to i ri and i refer to the same object / memory location: cout << i <<'\n'; // 2cout << ri <<'\n'; // 2i = 5;cout << i <<'\n'; // 5cout << ri <<'\n'; // 5ri = 88;cout << i <<'\n'; // 88cout << ri <<'\n'; // 88 references cannot be “null” ...
Modern C++ Learning(6)-Strings (Basics)
发表于2023-09-03
Strings (Basics)std::string Manipulation Literals‘a’ // char Literal“C string Literal”auto a = "seven of"; // type of a is char const[]auto b = a; // b refers to same object as aa += " nine"; // ❌ COMPILER ERROR: can't be modifiedauto c = "al" + "cove"; // ❌ COMPILER ERRORstd::string s = a; // a is copied into ss += " nine"; // ✔ (s is std::string) “std ...
Modern C++ Learning(5)-Functions (Basics)
发表于2023-08-29
Functions (Basics)Return TypesFull Return Type Deduction C++14(deduction = compiler determines type automatically) auto foo (int i, double d) { … return i;}// OK: return type: int auto foo (int i, double d) { return i; // int … return d; // double} // ERROR: Inconsistent return types! ParametersDefault Parametersdouble f (double a, double b = 1.5) { return (a * b);}int main () { cout << f(2); // 1 argument → 3.0 cout << f(2, 3); // 2 argumen ...
Modern C++ Learning(4)-Type System (Basics)
发表于2023-08-28
Type System (Basics)Type Aliasesusing NewType = OldType; C++11 typedef OldType NewType; C++98 using real = double;using ullim = std::numeric_limits<unsigned long>;using index_vector = std::vector<std::uint_least64_t>; Prefer the more powerful (we’ll later see why) using over the outdated and ambiguous typedef! Type Deduction: auto C++11auto variable = expression; variable type deduced from right hand side of assignment often more convenient, safer and future proof also impo ...
Modern C++ Learning(3)-Control Flow (Basics)
发表于2023-08-28
Control Flow (Basics)Conditional Branchingif (statement; condition) { … } C++17useful for limiting the scope of temporary variables int i = 0;std::cin >> i;if ( int x = 2*i; x > 10) { cout << x; } Switching: Value-Based Branchingswitch (statement; variable) { … } C++17useful for limiting the scope of temporary variables int i = 0;std::cin >> i;switch (int k = 2*i; k) { … } Loop IterationRange-Based Loops C++11for (variable : range) { ... } range = object ...
Modern C++ Learning(2)-Enumerations
发表于2023-08-28
EnumerationsScoped Enumerations C++11enum class name { enumerator1, enumerator2, ..., enumeratorN }; default: each enumerator is mapped to a whole number from 0 to N-1 enum class day { mon, tue, wed, thu, fri, sat, sun };day d = day::mon; d = day::tue; // RIGHT!d = wed; // WRONG! COMPILER ERROR: 'wed' only known in day's scope enumerators confined to a named scope cannot query properties of enumeration as in some other languages Unscoped enumerationsenum name { enumerator ...
12
avatar
王赵安
个人博客,用于技术分享
文章
17
标签
25
分类
5
关注我
公告
添加了评论系统,欢迎留言评论!
最新文章
使用KVM创建虚拟机的记录2025-03-25
论文阅读笔记-[SIGCOMM_17] The QUIC Transport Protocol- Design and Internet-Scale Deployment2023-10-24
论文阅读笔记-[Security_18] Off-Path TCP Exploit-How Wireless Routers Can Jeopardize Your Secret2023-10-08
Modern C++ Learning(8)-Pointers2023-09-07
Modern C++ Learning(7)-References2023-09-05
分类
  • 学习笔记1
    • 数据库1
  • 宝藏网站1
  • 技术分享2
  • 随想1
标签
control-flow 数据库 Modern C++ functions 学习笔记 types beginner-level Type System 论文阅读笔记 TCP References 宝藏网站 Hexo ChatGPT C++ 本科毕业 strings 随想 Pointers CS186 UDP 北京航空航天大学 网络安全 custom-types QUIC
归档
  • 三月 20251
  • 十月 20232
  • 九月 20233
  • 八月 20235
  • 七月 20231
  • 六月 20232
  • 五月 20233
网站资讯
文章数目 :
17
本站访客数 :
本站总访问量 :
最后更新时间 :
©2023 - 2025 By 王赵安
框架 Hexo|主题 Butterfly