![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
娱乐
dcw0402
这个作者很懒,什么都没留下…
展开
-
py画框框
import matplotlib import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) rect1 = matplotlib.patches.Rectangle((-200, -100), 400, 200, color ='gr.转载 2021-07-01 23:02:53 · 212 阅读 · 0 评论 -
清理linux内核源码arch中不相关的目录
linux源码 2.6.30.4TQ24401.解压源码包2.添加用于清理垃圾的make目标 在顶层Makefile中help目标完了后,增加下面的处理 #garbage remove for TQ244 PHONY += grm GBG_ARCH_DIR += arch/alpha GBG_ARCH_DIR += arch/avr32 GBG_ARCH_DIR += arch/cris .原创 2021-03-27 22:25:38 · 304 阅读 · 1 评论 -
利用jlink调试linux kernel
linux版本2.6.30.4TQ2440开发板◆环境准备 ▲软件 ・windows: jlink驱动及工具包安装 Setup_JLinkARM_V436e.exe ・交叉编译器所在机器(目前是用虚拟机) arm-linux-gdb 和交叉编译器安装为同一方法(内置于交叉编译工具链)...原创 2021-03-27 22:10:01 · 1112 阅读 · 0 评论 -
从汇编看c++ static函数
cpp代码$ cat main.cpp#include <stdio.h>#include <stdlib.h>class CAAA {public: int mX; int fBBBB(int x, int y) {return x - y + mX;} static int fCCCC(int x, int y) {return x + y;}};int main() { CAAA a;原创 2021-03-26 10:17:00 · 205 阅读 · 0 评论 -
linux中断
基于linux2.6.30.4, arm-s3c2440板参考了韦东山老师的<第4.1节 字符设备驱动程序之中断方式的按键驱动_Linux异常处理结构>Linux中断向量表关联向量处理的调用关系decompressor code -> stext -> __switch_data -> __mmap_switched -> start_kernel ->...原创 2021-03-22 15:36:06 · 113 阅读 · 0 评论 -
ttl自动编译下载脚本
defBranch='2ic'/*sprintf2 showCurBranchStr 'default branch is:%s'#13#10 defBranchdispstr showCurBranchStr*/sprintf2 boxTitleStr 'input target compile branch(empty->using default:%s)' defBranchinputbox boxTitleStr 'which branch do you want to comp.原创 2020-11-05 09:36:01 · 176 阅读 · 0 评论 -
随机深色背景颜色
在做某些类文档时,为了区分方便,时不时会遇到选取颜色的头疼问题。要是需要的颜色各类少还好说,大不了手动选几个就好了。要是多了呢?这里给出一个方法。比较土。。。。感觉效果还可以。目前是处理的6*8为一个循环,有更多需求的人可自行修改添加。废话不多说直接上代码(用vba所写,相信移植到其它语言不难)'idx = [0, LONG_MAX]Function getHighColor(ByVal idx&) As Long Dim deepth&, plane&原创 2020-10-14 10:54:18 · 102 阅读 · 1 评论 -
C中的try-catch
之前看lua源码,看到LUAI_TRY没当回事,以为就是直接调用。今天细细调查后发现还真是学到了新玩意儿。照猫画瓢写了一个小例子。费话不多说,show you the code.#include <stdio.h>#include <setjmp.h>#define DECLARE_TRY_CATCH() jmp_buf gJmpBuf; int gSetjmpRet = 0#define TRY(foo) if((gSetjmpRet = setjmp(gJmpB原创 2020-05-20 15:05:33 · 409 阅读 · 0 评论 -
pyplot 并列柱状图
# -*- coding:utf-8 -*-import matplotlib.pyplot as pltorig_data = [81, 73, 77, 79, 80, 78, 85, 80, 68, 90, 80, 89, 82, 81, 84, 72, 83, 77, 79, 75]range_data = [] #组中值x_label = []polar_diff = []...原创 2020-03-26 19:36:58 · 467 阅读 · 0 评论 -
VirtualBox 虚拟机网络设置
好记性不如烂笔头.记之.1. VirtualBox全局设置2. Ubuntu在VirtualBox上网络设置2. Ubuntu在VirtualBox中的网络设置确认宿主机网络设置3. Ubuntu中的网络设置4. 确认连接5. 参考...原创 2020-03-20 13:39:59 · 413 阅读 · 0 评论 -
make python module with c
//bird.c#include <Python.h>#include <stdio.h>void fly(const char *name){ printf("%s is flying.\n", name);}static PyObject *bird_fly(PyObject *self, PyObject *args){ co...转载 2020-03-11 21:46:05 · 119 阅读 · 0 评论 -
ros自动脚本-bag file作成例
Ubuntu 18.04.4 LTS通过Makefileall:#open new console window xdotool key ctrl+shift+n xdotool sleep 1#run roscore xdotool type roscore xdotool key Return xdotool sleep 1#open a new tab an...原创 2020-02-28 22:02:54 · 267 阅读 · 0 评论 -
VBA乱糟糟一筐
'FOR STRINGS--------------------------------------------------------------------------------------------------------------------Sub getExtNameFromPath(ByVal pathStr$, ByRef ext$) Dim sep_pos%, f...原创 2020-02-27 22:42:20 · 239 阅读 · 0 评论 -
Excel高亮部分字符串
Sub subHighLightKeyText(ByRef objRg As Range, ByVal key$, ByRef colorValue&) Dim sh As Worksheet, str$, startPos%, setLen%, nextFindStart%, rg As Range setLen = VBA.Len(key) For Each...原创 2020-02-27 22:36:39 · 851 阅读 · 0 评论 -
VBA ADO备份,只有csv数据源进行了测试
'import Microsoft ActiveX Data Objects 6.1 Library or 2.XPublic gBaseLibConn As Object, gBaseLibRs As Object, gBaseLibConnStr$Sub getConnectionObj(ByVal dbtype$, ByVal ServerPath$, ByVal db$, ByV...原创 2020-02-27 22:23:30 · 199 阅读 · 0 评论 -
从扇区看USB-FDD和USB-HDD在引导时的区别
原文链接 http://www.ituring.com.cn/article/190035这个问题其实大家在平时是不会注意到的,我也是因为最近在PC机上写系统引导程序的时候,才注意到的。起因是这样的,我在bochs虚拟机里写了个引导程序,想移植到物理机上,大家都懂的,虚拟机是支持软驱的,操作简单方便,而且还可以创建虚拟软盘,在系统启动的时候,可以通过BIOS中断调用,写入镜像也很方转载 2016-10-02 22:36:51 · 5536 阅读 · 1 评论