自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(234)
  • 资源 (2)
  • 收藏
  • 关注

原创 5种 c++ 类(容器) 重载的运算符

1.vector中重载运算符//==重载//stl_vector.htemplate <class T, class Alloc>inline bool operator==(const vector<T, Alloc>& x, const vector<T, Alloc>& y) { return x.size() == y.size() && equal(x.begin(), x.end(), y.begin());}/

2020-07-29 08:19:53 1861

原创 c++ string类 简单实现 cin cout

#include <iostream>#include <string.h>using namespace std;namespace haizei {class string {public: string() { length = 0; data = new char[1]; data[0] = '\0'; }; string(const char *s); string(const st

2020-07-28 12:07:32 526

原创 某oj selenium 无需界面 提交代码 自动更新cookie免登陆

alias AC='sudo time python3 up_code.py'from selenium import webdriverfrom selenium.webdriver.support.ui import WebDriverWaitfrom selenium.webdriver.support import expected_conditionsfrom selenium.webdriver.common.by import Byimport timeimport reim.

2020-07-22 22:31:10 451

原创 c语 json cJSON安装

git clone https://github.com/DaveGamble/cJSON.gitcd cJSON/mkdir buildcd build/cmake ..makesudo make installsudo vim /etc/ld.so.conf在第二行加上/usr/local/lib保存执行命令/sbin/ldconfig最简单的例子:#include <stdio.h>#include <cjson/cJSON.h>cJS

2020-07-05 14:24:07 632

原创 vimrc ma6174 Taglist ctags 安装配置

1…vimrc http://files.cnblogs.com/ma6174/vimrc.zip下载后解压到~2.Taglist插件安装wget http://www.vim.org/scripts/download_script.php?src_id=19574 -O abc.zip && unzip -o -d ./ abc.zip && mv doc/taglist.txt /usr/share/vim/vim[0-9][0-9]/doc/ &&a

2020-06-06 19:56:13 289

原创 提高编程手速利器 klavaro 配置最后一篇文章 deepin下载

搜索文件find / -name "C.paragraphs"C.paragraphs更改为一下内容即可(内容自己改)#include <algorithm> #include <bitset> #include <cctype> #include <cerrno> #include <clocale> #include <cmath> #include <complex> #include <cstdio&

2020-05-08 19:10:24 291

原创 linux ftp命令 基本使用

搭建好ftp服务器后如何使用。sudo apt-get install ftp连接后支持ls,mkdir ,cd 命令1.连接ftp [ip]输入用户名输入密码2.上传文件put [远程文件] [本地文件] 3.下载文件get [本地文件] [远程文件]4.结束断开byeMDELETE [文件名,支持*匹配]...

2020-05-02 16:51:22 555

原创 linux shell 恶意进程检测 时间 进程名 pid 用户 cpu占用 内存占用

#!/bin/basheval `ps -aux --sort=-%cpu -h | awk -v num=0 \ '{if($3 < 50){exit} else{num++; printf("cpupid["num"]=%d", $2)}} \ END {printf("cpunum=%d", num)}'`eval `ps -aux --sort=-%mem -h | a...

2020-05-02 16:02:13 500

原创 linux shell系统运行概况 时间 主机名 os版本 内核版本 运行时间 平均负载 磁盘总量 磁盘百分比 内存大小 内存百分比 cpu温度报警级别 内存报警级别 CPU报警级别

#!/bin/bashTime=`date +"%Y-%m-%d__%H:%M:%S"`HostName=`hostname`OsType=`cat /etc/issue.net | tr " " "_"`KernelVersion=`uname -r`LoadAvg=`cut -d " " -f 1-3 /proc/loadavg`UpTime=`uptime -p | tr -s ...

2020-05-02 16:00:22 199

原创 deepin15.11 GTX1060 扩展显示屏 双屏显示 双显卡安装 没有NV-PRIME方案

1.安装系统时,不能使用独显,所以安装了nvidia官网上的驱动。能在笔记本上正常显示。2.插入hdmi线,没有反应。通过查找网上的资料,说是切换显卡的方案到NV-prime可是我没有。去deepin用户qq群问了一下。需要装闭源驱动。#1.安装NVIDIA闭源驱动,在终端输入下面这句(由于之前装了nvidia官网.run,installer-clean的时候跳过了)sudo apt-g...

2020-05-02 14:04:36 2177 1

原创 deepin 开机报错 打不开图形桌面 startx失败 xorg文件修改

遇到事情不要慌,先看看csdn上的解决方案一、开不开机一般是系统配置文件被修改,恢复一般可以重新开机。修改系统配置文件前最好先备份 cp一份这种问题直接用recovery系统或者u盘系统进入文件夹修改,恢复文件即可。二、打不开图形化桌面1.xorg文件配置被修改恢复配置文件即可cp /etc/X11/目录下的orginal的一个文件 xorg.conf 一般自己备份的这个文件,即...

2020-05-02 12:25:01 1820

原创 2020爬取美赛数学成绩

爬取美赛数学成绩1.下载所有pdffor ((i=2002742; i<=2003139; i++))do echo $i wget http://www.comap-math.com/mcm/2020Certs/$i.pdfdone安装convertsudo apt-get install imagemagick安装tesseractsud...

2020-05-01 15:43:56 405

原创 ubuntu 服务器 安装 docker

阿里云 6 sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common 7 sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg ...

2020-05-01 11:45:01 508 1

原创 linux shell 用户统计 时间 用户总数 近期活跃用户 具有root权限的用户 当前在线用户 登录ip tty

linux shell 用户统计 时间 用户总数 近期活跃用户 具有root权限的用户 当前在线用户 登录ip ttyTime=`date "+%Y-%m-%d__%H:%M:%S"`eval $(awk -F: -v sum=0 '{if ($3 >= 1000 && $3 != 65534) {sum+=1; printf("All["sum"]=%s;", $1)...

2020-04-25 20:22:30 542

原创 linux shell 磁盘总量 磁盘剩余量 占用比例

linux shell 磁盘总量 磁盘剩余量 占用比例time=`date +%Y-%m-%d__%H:%M:%S`sum=(`df | tr -s -c 'a-zA-Z0-9%-/\n' ' ' | cut -d ' ' -f 2 | tr -s -c 'a-zA-Z0-9-' ' '`)sy=(`df | tr -s -c 'a-zA-Z0-9%-/\n' ' ' | cut -d ...

2020-04-25 16:30:51 1219

原创 linux shell mem 内存总量 剩余量 当前占用百分比 占用百分比动态平均值

linux shell mem 内存总量 剩余量 当前占用百分比 占用百分比动态平均值#!/bin/bash#判断参数合法if [[ $# -lt 1 ]];then echo "Usage:$0 DyAver"fiTime=`date "+%Y:%m;%d__%H:%M:%S"`DyAver=$1if [[ ${DyAver}x == x ]];then exit ...

2020-04-25 16:10:01 1037

原创 linux shell CPU信息获取 负载 占用率 当前温度 温度警告

CPU信息获取#时间time=`date "+%Y-%m-%d__%H:%M:%S"`#CPU负载fz=`cat /proc/loadavg | cut -d ' ' -f 1-3`#CPU温度wd=`cat /sys/class/thermal/thermal_zone0/temp`wd=`echo "scale=2;${wd}/1000" | bc`#警告war=""if ...

2020-04-25 15:16:24 959

原创 avl树 在线演示 如何操作 建议

https://www.cs.usfca.edu/~galles/visualization/AVLtree.html

2020-04-21 21:22:07 1790 1

原创 [em] [/em] 表情 代码 如何使用 qq空间代码

qq空间的表情代码[em][/em]对应链接http://qzonestyle.gtimg.cn/qzone/em/***.gif或png或jpg对应什么号码可以去这个链接查找使用时去qq空间或其他平台发送   [em]号码[/em]   即可...

2020-04-20 20:12:24 6481

原创 在Linux系统中,假设现在有⼀篇英⽂⽂章,基于项⽬要求,你需要计找出⽂章中,出现频次最多的20个单词,请说明思路,及相关命令

tr -sc "[A-Z][a-z]" "[\012*]" < 1.txt | \tr "[A-Z]" "[a-z]" | \sort | uniq -c | \sort -k1 -n -r | \head -20 | nl

2020-04-16 09:55:51 454

原创 c语言 实现 poen pclose

#include <stdio.h>#include <unistd.h>#include <string.h>#include <sys/types.h>#include <sys/wait.h>#include <errno.h>#include <stdlib.h>static pid_t ...

2020-04-14 19:53:49 1036

原创 第一次实现的简易shell

https://github.com/libohao666/My_Shellhttps://github.com/libohao666/My_Shell

2020-04-14 18:28:01 133

原创 c语言 select poll epoll 区别 总结

IO复用​ 为了解决大量客户端访问的问题,引入IO技术:一个进程可以同事对多个客户请求进行服务,复用一个进程对多个IO进行服务。IO读写的数据多数情况下没准备好,需要通过一个函数监听这些数据状态,一旦有数据可以读写就服务。​ select,poll,epoll都是IO多路复用的机制,监视多个描述符,一旦某个描述符就绪,通知程序进行操作。int select(int nfds, fd_set ...

2020-04-12 11:10:29 1031

原创 c语言 使用fgets fprintf 替代read write 读写管道 进行进程通信

使用fgets fprintf替代read write读写管道#include <stdio.h>#include <unistd.h>#include <stdlib.h>#include <sys/ipc.h>#include <sys/shm.h>#include <sys/types.h>#inclu...

2020-04-09 12:43:07 536

原创 c语言 fork pipe 实现popen plcose源码

还有点问题,待解决#include <stdio.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <stdlib.h>#include <errno.h>#inclu...

2020-04-09 10:21:16 551

原创 c语言 共享内存 pthread_cond init... server client 互斥锁

client#include<sys/shm.h> #include<sys/ipc.h> #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<signal.h> #include<sys/types.h> ...

2020-04-05 20:34:56 310

原创 c语言 进程 共享内存 pthread_mutex 互斥锁 数字累加

#include<sys/ipc.h> #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<signal.h> #include<sys/types.h> #include<sys/stat.h> #inclu...

2020-04-05 17:01:39 701

原创 亲缘进程、非亲缘进程-共享内存与信号

亲缘进程 共享内存与信号#include <stdio.h>#include <unistd.h>#include <stdlib.h>#include <sys/ipc.h>#include <sys/types.h>#include <sys/shm.h>#include <signal.h>...

2020-04-04 20:56:09 623

原创 2020.4.4 网站 css 全灰

html{filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);filter:grayscale(100%);-moz-filter:grayscale(100%);-o-filter:grayscale(100%);-webkit-filter:grayscale(1)}

2020-04-04 17:08:19 125

原创 c语言 flock 多进程 数字累加

#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <sys/types.h>#include <sys/wait.h>#include <fcntl.h>#include <sys/file.h>char *num_fi...

2020-04-04 17:04:20 295

原创 c语言 实现简单的socket聊天 在线名单 文件传输 如图

github地址

2020-03-30 11:53:51 861 1

原创 c语言 socket 多进程 多线程

多进程 server#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <sys/types.h>#include <sys/socket.h>#include <arpa/inet.h&gt...

2020-03-28 09:10:33 830

原创 exec fork vim 编译 运行 .c/.cpp

如果需要传入参数,NULL之前传入 *++argv#include <stdio.h>#include <unistd.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/wait.h>int main(int ...

2020-03-26 19:11:13 180

原创 scp实现最简单的图床,图片路径直接覆盖剪切板

#!/bin/bashdatetime=`date '+%Y%m%d_%H%M%S'`target="用户名@ip或网站地址:文件夹"$datetime$1scp $1 $targetecho "![$1](http://网站或ip/images/$datetime$1)" | xsel --clipboard

2020-03-22 19:39:24 373

原创 cp 自写 linux 命令

cp 1.log 2.log#include <stdio.h>#include <stdlib.h>#include <fcntl.h>#include <sys/types.h>#include <sys/stat.h>#include <string.h>#include <unistd.h>...

2020-03-22 17:41:54 166

原创 more 自写 linux命令

满足1.回车 下一行2.空格 下一页3.q 退出4.下方有”–More–(百分比)"截图如下:#include <stdio.h>#include <stdlib.h>#include <string.h>#include<sys/types.h>#include<sys/ioctl.h>#include<u...

2020-03-22 17:13:08 124

原创 deepin man 手册不全 解决办法

apt-get install manpages-de manpages-de-dev manpages-dev glibc-doc manpages-posix-dev manpages-posix

2020-03-19 18:49:10 624

原创 某微博爬虫 根据关键词 每条信息数据 和 对应用户数据

#coding=utf-8from selenium import webdriverfrom selenium.webdriver.common.keys import Keysimport timeimport pymysqlimport osimport redriver = webdriver.Chrome()def get_night(month, date): ...

2020-03-19 16:26:44 475

原创 ssh -o ServerAliveInterval=60 保持ssh链接

ssh -o ServerAliveInterval=60 -p xx xx@xxxxxxxxx

2020-03-16 12:06:22 4361

原创 ls自写

只能lsls -als -a filename#include <stdio.h>#include <string.h>#include "dirent.h"#define RED "\033[0;32;31m"#define GREEN "\033[0;32;32m"#define BLUE "\033[0;32;34m"#define CYAN "\...

2020-03-15 10:44:02 258

2017201212李博浩第七讲 物理存储器与进程逻辑地址空间的管理(1).zip

205265871820526587182052658718205265871820526587182052658718205265871820526587182052658718205265871820526587182052658718205265871820526587182052658718

2019-05-21

os ppt.zip

分析了一个面向教学的操作系统——EOS 操作系统的源代码。本书从 EOS 操 作系统中引用了丰富的代码实例,并配有大量的图示和图表,一步步的引导读者分析 EOS 操作系统的源代 码。本书与其它操作系统理论书籍最明显的不同是,配有若干个精心设计的实验。读者可以亲自动手完成 这些实验,在实践的过程中循序渐进的学习 EOS 操作系统,进而加深对操作系统原理的理解

2019-05-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除