#include #include #include MODULE_LICENSE("Dual BSD/GPL...: make -C $(KER_DIR) M=$(PWD) modules clean : make -C $(KER_DIR) M=$(PWD) clean ifneq...($(KERNELRELEASE),) obj-m := helloKo.o else PWD := $(shell pwd) KER_DIR ?...#include #include #include #include #include...ifneq ($(KERNELRELEASE),) obj-m := helloDr.o else PWD := $(shell pwd) KER_DIR ?
说起证书,我想起了之前GitHUB学生包里面有$9一年的证书,但是对于我这种博客和脚本公用的人来说, 就会使得Linux服务器获取脚本时候出现: Unable to locally verify the...当然,这也不是啥问题, wget --no-check 4ker.cc/脚本 即可,但是这样做是不是太麻烦了?...如果你仅作为Web使用的话,是完全没问题的,但是作为wget源的话,可能会出现: [root@linux ~]# wget https://4ker.cc/sh --2017-09-16 22:40:...53-- https://4ker.cc/sh Connecting to test.4ker.cc (4ker.cc)|116.196.82.87|:443... connected....点击下载证书链,然后去补全SSL证书中的crt文件,简单说,就是在源文件中加入了后面的中间人证书,这样Linux服务器才能信任证书,这样也能Wget所需文件了。
下面是测量的结果: 2.1 驱动代码 #include #include #include #include... #include #include #include static...("GPL"); /*设置模块的许可证--GPL*/ 2.2 Makefile KER_DRI=/home/wbyq/work/linux-3.5/linux-3.5 all: make -C $(...KER_DRI) M=`pwd` modules cp *.ko /home/wbyq/work/rootfs/code -f make -C $(KER_DRI) M=`pwd` modules...clean obj-m += linux_csb.o
Linux内核提供了中断的注册接口: (1)注册中断 头文件 include\linux\interrupt.h 定义文件 include\linux\interrupt.h 函数原型 int...#include #include #include #include <linux/irq.h...); /*驱动出口*/ module_exit(tiny4412_interrupt_drv_exit); /*许可证*/ MODULE_LICENSE("GPL"); 2.3 makefile代码 KER_DRI...=/home/wbyq/work/linux-3.5/linux-3.5 all: make -C $(KER_DRI) M=`pwd` modules cp *.ko /home/wbyq/work.../rootfs/code -f make -C $(KER_DRI) M=`pwd` modules clean obj-m += interrupt_key.o
Name: 服务器定时重启脚本 # | Version: 1.0 # | This Is a Shell Script ,Easy To Use # | Web Site: https://4ker.cc...crontab.html # |-------------------------------------------------------------- # | Author: 刺猬 # | Copyright (c) 2017, https://4ker.cc All Rights Reserved...reboot echo ; » 本文链接:Linux服务器使用Crontab控制定时任务 » 转载请注明来源:刺客博客
hello_drv_init); /*驱动出口*/ module_exit(tiny4412_hello_drv_exit); /*许可证*/ MODULE_LICENSE("GPL"); 1.3 Makefile示例代码 KER_DRI...=/home/wbyq/work/linux-3.5/linux-3.5 all: make -C $(KER_DRI) M=`pwd` modules clean: make -C $...(KER_DRI) M=`pwd` modules clean obj-m += drv_hello.o 编译完成之后,生成的驱动文件名称还是xxxx.ko文件。...在Linux内核的include\linux目录下有Miscdevice.h文件,misc设备定义及其内核提供的相关函数在这里。...> #include #include #include #include
题目描述 题目解答 习题二:输出字符奇数位置的字符串 题目描述 题目解答 结束语 习题一:输出字典key 题目描述 给你一字典a,如a = {“honker”: 707, “hacker”: 707, “ker...”: 707},输出字典a的key,以’,‘连接,如‘honker’,‘hacker’,‘ker’。...要求key按照字典序升序排列 例如:a = {“honker”: 707, “hacker”: 707, “ker”: 707}, 则输出:honker,hacker,ker 题目解答 使用字典中的keys...()方法把所有的键取出,然后使用join方法拼接,sort()排序方法进行排序 a = {"honker": 707, "hacker": 707, "ker": 707} keys = a.keys(...": 707} keys = a.keys() print(keys) 改进代码如下: a = {"honker": 707, "hacker": 707, "ker": 707} keys =
2.1 按键驱动源代码 #include #include #include #include <linux...open=tiny4412_open, .read=tiny4412_read, .write=tiny4412_write, .release=tiny4412_release }; /* Linux...KER_DRI=/home/wbyq/work/linux-3.5/linux-3.5 all: make -C $(KER_DRI) M=`pwd` modules cp *.ko /home/wbyq.../work/rootfs/code -f make -C $(KER_DRI) M=`pwd` modules clean arm-linux-gcc app.c -o app cp app /home
} = grand(ker_height,ker_width,ker_num) - 0.5; cnn.biases{index} = grand(1,ker_num) - 0.5; cnn.nabla_w...{index} = zeros(ker_height,ker_width,ker_num); cnn.nabla_b{index} = zeros(1,ker_num); height = height...- ker_height + 1; width = width - ker_width + 1; cnn.a{index} = zeros(height,width,mini_size,ker_num...= cnn.layer{in}{3}(1); ker_w = cnn.layer{in}{3}(2); kernel = ones(ker_h,ker_w)/ker_h/ker_w; tmp = convn...= cnn.layer{in+1}{3}(1); ker_w = cnn.layer{in+1}{3}(2); kernel = ones(ker_h,ker_w)/ker_h/ker_w; [~,~
sys_hello()函数 asmlinkage void sys_hello(const char __user * buf, size_t count) //打印count长数据 { char ker_buf...[100]; if(buf) { copy_from_user(ker_buf, buf, (count<100)?...count : 100); ker_buf[99]='\0'; printk("sys_hello:%s\n",ker_buf); } } 3.4 include\linux...hello("www.100ask.net", 15);//这个函数会调用内核的sys_hello() return 0; } 4.1 其中asm ()是一个内嵌汇编(参考linux
从procrank_linux.git下载代码,然后make编译。 sudo procrank查看各进成的VSS/RSS/PSS/USS占用情况。...map->proc->ker->pagesize : (0);------------只要有人使用,增加pagesize。...(map->proc->ker->pagesize / count) : (0);--如果多人使用,取1/count的pagesize;如果单人使用,取整个pagesize。...(map->proc->ker->pagesize) : (0);----------如果只有一个人使用那么,增加pagesize到uss。...} else { usage.swap += map->proc->ker->pagesize; } } memcpy(usage_out, &
3.1 设备端代码 #include #include #include #include... #include #include #include #include <linux...for(i=0;i<cnt;i++) { printf("%d ",buff_r[i]); } printf("\n"); return 0; } 3.4 编译Makefile KER_DRI...=/home/wbyq/work/linux-3.5/linux-3.5 all: make -C $(KER_DRI) M=`pwd` modules cp *.ko /home/wbyq/work.../rootfs/code -f make -C $(KER_DRI) M=`pwd` modules clean arm-linux-gcc app.c -o app cp app /home/wbyq
在线二维码api服务: http://q.4ker.cc (访问此地址有提示操作信息) 使用举例: url: 二维码对应的网址 m : 二维码白色边框尺寸,缺省值: 3px e : 容错级别(...15%的字码可被修正 Q水平 25%的字码可被修正 H水平 30%的字码可被修正 p : 二维码尺寸,可选范围1-10(具体大小和容错级别有关)(缺省值:6) 用法举例,为https://4ker.cc...生成二维码:http://q.4ker.cc?...m=3&e=H&p=6&url=https://4ker.cc 上面是我搭建的在线api服务,想自己搭建的,欢迎点击下面源码自己搭建。 源码: http://q.4ker.cc/qr.zip
> #include #include #include #include ...GFP_KERNEL); if (filp->f_flags & O_NONBLOCK) { /* 非阻塞访问 */ return -EAGAIN; } else { printk("KER11...__set_current_state(TASK_INTERRUPTIBLE);/* 设置任务状态 */ schedule(); /* 进行一次任务切换 */ printk("KER22...TASK_RUNNING); /* 设置任务为运行态 */ remove_wait_queue(&plpsirq.w_wait, &wait); /* 将等待队列移除 */ printk("KER33...打印数据如下: irq = 62 KER22 KE44 cnt = 10 irq app printf!
本人修改脚本使用方法: wget 4ker.cc/ss/aria2.sh;chmod +x aria2.sh;./aria2.sh 以后使用....PS:如果你使用的是逗比原版脚本,连接Aria2的PRC口令是 doub.io 使用我的脚本的话,连接Aria2的PRC口令是 4ker 务必记住这条,否则连不上Aria2!!!...本人修改的Aria2中包含了一些BT的地址,所以下载会快很多,如果你没使用我的脚本,可以下载:4ker.cc/ss/aria2.conf 覆盖/root/.aria2/aria2.conf在重启Aria2...服务器即可,注意,重启后PRC密码变为4ker 需要修改的话使用脚本的 6....修改 配置文件找到: # 设置的RPC授权令牌, v1.18.4新增功能, 取代 --rpc-user 和 --rpc-passwd 选项 rpc-secret=4ker 把上面的4ker修改为自己的密码来连接即可
Get_Gauss(20, 0.02); } } //中值求取 void Media(Mat* src, int indexrows, int indexcols, int* meanv, int ker...) { int lo = (ker - 1) / 2; vectormoreo; for (int i = indexrows - lo; i <= indexrows + lo; i+...ker) { int lo = (ker - 1) / 2; float total = 0; for (int i = indexrows - lo; i <= indexrows + lo;...* ker); return; } //像素方差 void Variance(Mat& src, vector& hierachy, int ker) { int row = src.rows...; int col = src.cols; int lo = (ker - 1) / 2; for (int ir = lo; ir < row - lo; ir++) { for (int
--" echo "请输入宝塔面板添加的网站域名:(请不要修改添加之后的默认地址,只输入域名即可)" read web sleep 1 echo "请输入Aria2的PRC密码:(回车默认为4ker...,使用方法见文章底部)" read pa if [[ $pa == "" ]]; then pa=4ker fi echo "请等待自动操作......"....session wget --no-check https://coding.net/u/cvc/p/bt-aria2/git/raw/master/aria2.conf sed -i "s/4ker...-------" 项目地址: https://coding.net/u/cvc/p/bt-aria2 欢迎到项目地址获取安装方法 上面提到的 echo "请输入Aria2的PRC密码:(回车默认为4ker
> #include #include #include #include static... #include #include static int __devinit at24cxx_probe... #include #include #include #include <asm/...at24cxx_write(struct file *file, const char __user *buf, size_t count, loff_t *off) { unsigned char ker_buf...[2]; unsigned char addr, data; copy_from_user(ker_buf, buf, 2); addr = ker_buf[0]; data = ker_buf
from ctypes import * 三、认识动态链接库 动态链接库在linux 系统中表现为“.so”的后缀文件,而在Windows中表现为”.dll“的后缀文件。...b.val=cast((c_float*4)(1.2,3.2,4.3),POINTER(c_int)) print(b.val[1]) 20).进程操作 aa=0x00000020 #定义正常优先级的类 ker...=windll.LoadLibrary('kernel32.dll') #加载动态链接库 crk=ker.CreateProcessA #获得创建后的进程的函数地址 rk=ker.ReadProcessMemory...#获得读取进程内存的函数地址 wk=ker.WriteProcessMemory #获得写入进程内存的函数地址 ker.TerminateProcess #终止进程 print(ker,'\n'
领取专属 10元无门槛券
手把手带您无忧上云