kritoooo / kritoooo.github.io Goto Github PK
View Code? Open in Web Editor NEWkrito's blog
krito's blog
https://krito2023.com/2024/04/13/CSAPP-note/
Floating Point Floating Point Representation Normalized Values Numerical Form: [ (-1)^sM2^E ] S is a sign bit, it determines whether number is negative or positive. Significand M normally a fract
https://krito2023.com/2024/03/15/%E9%BB%91%E7%BE%A4%E6%99%96%E5%AE%89%E8%A3%85/
群晖引导u盘制作 在安装黑群晖之前,我们还需要安装一个u盘刷写工具。在官网Rufus - 轻松创建 USB 启动盘进行下载与安装。 下载对应平台的版本即可,我这里下载的是第一个。下载完Rufus后,我们需要下载群晖引导镜像。下载连接:Releases · fbelavenuto/arpl (github.com) 下载第一个即可arpl-1.1-beta2a.img.zip
https://krito2023.com/2024/03/15/C++%E7%89%B9%E6%80%A7%E5%AD%A6%E4%B9%A0/
const与constexprconst如果 const 变量的初始化值是常量表达式,那么它就是编译时常量。编译时常量使编译器能够执行非编译时常量无法提供的优化。 1234567891011#include int main(){ const int x { 3 }; // x 是编译时常量 const int y 
https://krito2023.com/2024/03/15/Linux%E5%9F%BA%E7%A1%80%E5%85%A5%E9%97%A8%E5%9B%9B/?
Makefile规则Makefile的框架由规则构成。make命令执行时先在Makefile文件中查找各种规则,对各种规则进行解析后运行规则。 12345#每条规则的语法格式:target1,target2...: depend1, depend2, ... command ...... ...... 每条规则由三个部分组成,分别是目标(target),依赖(depend)和命令(c
https://krito2023.com/2024/04/12/CSAPPLAB/
datalab-handout温馨提示:内有解法剧透,未完成前请不要阅读。其中代码,仅供本人回忆用。 bitXor要求我们使~和&这两个位运算符实现异或运算,最大操作次数不超过14次。 我们扩大条件,考虑,&,|这三个位运算如何实现异或。比较容易想到$(!a&b)|(a&!b)$即可实现异或运算。(这里的!指的是)。$$a = 0, b = 0,
https://krito2023.com/2024/04/10/%E8%99%9A%E7%BB%A7%E6%89%BF/
虚基类与菱形继承多重继承问题1234567891011121314151617181920212223242526272829303132#include class PoweredDevice{public: PoweredDevice() { std::cout << "PoweredDevice c
https://krito2023.com/2024/03/15/%E5%A4%9A%E7%BA%BF%E7%A8%8B%E4%B8%80/
线程简介线程是轻量级的进程。操作系统会以进程为单位,分配系统资源。进程是资源分配的最小单位,线程是操作系统调度执行的最小单位。 线程与进程进程有独立的地址空间,多个线程共用同一个地址空间。 线程更加节省系统资源。 在一个地址空间中,每个线程都有属于自己的栈区,寄存器。 在一个地址空间中,代码段,堆区,全局数据区,文件描述符表都是线程共享的。 线程是程序的最小执行单位,进程是操作系统中最小的资源
https://krito2023.com/2024/03/26/%E6%89%8B%E5%86%99%E7%BA%BF%E7%A8%8B%E6%B1%A0/
手写线程池线程池原理当我们使用线程的时候就去创建一个线程,这样的实现虽然很简便,但是在并发的线程数量很多,并且每个线程都是执行一个时间很短的任务就结束的时候,这样频繁创建线程就会大大降低系统的效率,因为频繁创建线程和销毁线程需要时间。 线程池的作用就是复用线程,当一个线程执行完任务后,并不被销毁,而是可以继续执行其他任务。 线程池的组成: 任务队列,存储需要处理的任务,由工作的线程来处理这些任务
https://krito2023.com/2024/01/10/%E9%BB%91%E7%BE%A4%E6%99%96%E5%AE%89%E8%A3%85/
群晖引导u盘制作 在安装黑群晖之前,我们还需要安装一个u盘刷写工具。在官网Rufus - 轻松创建 USB 启动盘进行下载与安装。 下载对应平台的版本即可,我这里下载的是第一个。下载完Rufus后,我们需要下载群晖引导镜像。下载连接:Releases · fbelavenuto/arpl (github.com) 下载第一个即可arpl-1.1-beta2a.img.zip
https://krito2023.com/2024/04/03/%E6%99%BA%E8%83%BD%E6%8C%87%E9%92%88/
Smart Pointer在C++11中通过引入智能指针的概念,使得C++程序员不需要手动释放内存 智能指针的种类 std::unique_ptr std::shared_ptr std::weak_ptr 概述C++的指针包括两种 原始指针(raw pointer) 智能指针 智能指针是原始指针的封装,其优点是会自动分配内存,不用担心潜在的内存泄露。 unique_ptr在任何给定的时刻
https://krito2023.com/2023/12/30/%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/?
安装node.js下载进入到Node.js (nodejs.org),点击20.10.0 LTS,下载Node.js。 下载完成后,打开文件进行安装,全部使用默认配置即可。 验证在命令行中输入如下命令,出现版本号即为安装成功。 这里推荐设置阿里的国内镜像,方便后续的下载。 1npm config set registry https://registry.npm.taobao.org Hex
https://krito2023.com/2024/03/15/%E7%BA%BF%E7%A8%8B%E5%90%8C%E6%AD%A5/
线程同步同步方式对于多个线程访问共享资源(临界资源)出现数据混乱的问题,需要进行线程同步。常见的线程同步方式有四种:互斥锁、读写锁、条件变量、信号量。 互斥锁通过互斥锁可以锁定一个代码块,被锁定的代码块,所有线程只能顺序执行(不能并行)。这样多线程访问共享资源数据混乱的问题就得到解决,需要付出的代价是执行效率降低,因为从并行处理退化到了串行处理。 1234567pthread_mutex_t mu
https://krito2023.com/2024/03/15/%E7%BE%A4%E6%99%96%E5%AE%89%E8%A3%85%E8%99%9A%E6%8B%9F%E6%9C%BA/
群晖虚拟机安装虚拟机安装首先在群晖套件中心下载Virtual Machine Manager 然后下载你需要安装的系统镜像。博主这里需要学习linux的一些常见知识,所以打算安装Centos7和ubuntu20这两个系统。 Centos7:centos-7.9.2009-isos-x86_64安装包下载_开源镜像站-阿里云 (aliyun.com) Ubuntu20.04:ubuntu-rele
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.