自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 简单计算器的 bison 语法文件

bison 编译原理

2022-07-30 13:37:58 339 1

原创 Beamforming c++实现

#include <iostream>#include <cmath>#define M_PI 3.14159265358979323846#define ANGLE_RESOLUTION 500 int main(){ int numElements = 4; double spacing = 0.2; double freq = 1000.0; d...

2020-04-08 20:07:58 611

原创 golang 扩展package 列表

Golang 扩展packagegolang 扩展package 列表https://github.com/golang/arch.githttps://github.com/golang/playground.githttps://github.com/golang/debug.githttps://github.com/golang/term.githttps://github.c...

2019-12-27 10:50:53 636

原创 Vue img src 动态切换的一个解决方案

Vue img src 动态切换的一个解决方案在Vue 中,如果img 的src 为动态切换的话, 会出现图片无法加载的情况。 网上已经有了很多讨论,在解决这个问题, 基本上都是大同小异。 这里记录一下自己的解决方案,可能会和某些方案雷同。背景采用vue cli 3 创建的项目目录结构和 vue cli 2 会有不同。 本文的式样环境为 vue cli 3 中。创建一个组件 item.vu...

2019-11-06 19:21:05 5566 2

原创 VSC 注册右键菜单

VSC 注册右键菜单VSC 注册右键菜单VSC 注册右键菜单貌似system version 的 vsc 安装之后, 没有在文件管理器注册右键菜单来打开文件或者目录,这在使用过程中十分不方便,可以使用下面的register 文件来注册。把下面文件保存到任何文件中,文件扩展名为 “.reg”。 例如存成: vsc.reg在window 下面双击上面保持的 reg 文件,导入文件内容到注册...

2019-06-25 09:55:39 672

原创 Powershell 的工作环境

Powershell 的工作环境Powershell 工作环境创建快捷方式Powershell 工作环境通常都在linux 下开发, 最新需要在window 下面开发,为了提高工作效率就在 Powershell 下面搭建一个简单的工作环境。 这个脚本有了基本的框架,可以方便个人根据各自的工作环境情况进行进一步的定制。创建快捷方式在桌面上创建快捷方式,快捷方式中命令行如下:C:\Wind...

2019-06-13 10:49:13 346

原创 EOS 链接测试网络

EOS 连接测试网络现在 EOS 主要的网络/测试网络有如下几种,mainnet 这个是真正的 EOS 主链/主网,方法在其他博文中有交代localnet 编译之后其他 nodeos 默认的本地测试网络eosforce 测试网络jungle 测试网络kylin 测试网络SuperHero 测试网络Arrowhead 测试网络Scholar 测试网络在开发的过程,通...

2018-11-08 17:03:34 687

翻译 从EOS 主网同步数据

从EOS 主网同步数据从EOS 主网同步数据编译源代码同步源代码编译源代码运行和加载 genesis.json编辑 config.ini重启 nodeos 命令genesis.jon 的内容:从EOS 主网同步数据最近想建立一个EOS 节点来同步EOS 主网的block 数据, 搜索了很久才找到正确的方法,本文记录这个过程,方便和我有类似需求的人。编译源代码如果你已经编译了EOS 源代码,...

2018-11-06 18:53:43 2030 5

原创 window 下golang 编译 sqlite3

window 下 golang 编译sqlite3问题描述日前想在window 下面用golang 访问sqlite3, 通过搜索发现下面的package 比较合适: github.com/mattn/go-sqlite3使用go get 下载之后,在cygwin 下面编译,发现无法编译,会报如下的错误: $ go build testc testc windows_amd6

2017-11-04 16:13:23 5497 1

原创 leedcode - Valid Parentheses

Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all vali

2017-09-15 15:49:32 561

原创 Leetcode - 3Sum

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The solution set must not contain

2017-09-14 20:00:45 517

原创 Leetcode - Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the

2016-10-17 16:36:44 811

原创 Leetcode - Container With Most Water

Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin

2016-10-17 15:16:22 815

原创 Leetcode - Roman to Integer

Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.这个程序类似int romanToInt(string s) { string symbols[] = { "M", "CM", "D", "C

2016-10-14 21:36:28 781

原创 Leetcode - Integer to Roman

Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999. 可以在网上自行搜索一下罗马数字的编码规则。string intToRoman(int num) { string symbols[] = {

2016-10-14 21:02:24 827

原创 Leetcode - Median of Two Sorted Arrays

There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1:nums1 =

2016-06-24 23:08:12 795

原创 Leetcode - Longest Consecutive Sequence

Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest consecutive elements sequence is [1, 2, 3

2016-06-23 22:29:52 983

原创 Leetcode - Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "

2016-06-23 08:24:57 904

原创 Leetcode - Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link

2016-06-22 22:46:32 998

原创 Leetcode - Two Sum

Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution.Example:Given nums =

2016-06-22 22:09:29 946

原创 Go 编译过程分析(一) -- 编译脚本

go 语言最近很火,与时俱进,我也看了看go 的语法。     看起来 go 还是bu

2014-08-07 14:48:51 10035

转载 GoDaddy的成功不是偶然

GoDaddy的成功不是偶然除了公司不断的创新和拥抱新技术,GoDaddy的创始人Bob Parsons的个人努力也是其公司成功的重要一环,他通过轰动的超级碗广告和赞助纳斯卡赛车(Nascar)的赛车手丹妮卡•帕特里克(Danica Patrick),把GoDaddy公司打造成全世界最大的主机托管供应商。想比GoDaddy,国内的一些域名注册商无论是在主机价格、速度、客户服务上都需要加

2014-06-21 21:19:45 1742

原创 开启硬件支持 KVM

KVM 需要运行在Intel VT 或者 AMD-V  芯片组上。

2014-05-14 12:46:32 2704

原创 KVM 一些信息

KVM 所支持的guest OS 列表:http://www.linux-kvm.org/page/Guest_Support_Status#Linux_Family:_Fedora.2FRedHat_Derivatives

2014-05-14 12:38:55 1474

转载 VDI for free (alternatives)

Page is from :http://www.winsupsite.com/vdi-for-free-alternatives/

2014-05-13 11:26:22 3638

原创 Notepad 打开文本文件所看到的 IRP

双击打开文本文件,看到notepad 发了下面这些 IRP IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATIONIRP_MJ_QUERY_INFORMATIONIRP_MJ_RELEASE_FOR_SECTION_SYNCHRONIZATIONIRP_MJ_CLEANUPIRP_MJ_CLOSE----------------

2014-04-21 10:23:29 3700 4

原创 FltGetFileNameInformation 函数

FltGetFileNameInformation 函数在Minifilter 中可以使用 FltGetFileNameInformation 来获取文件的名字,但是这个函数在如下几种情况下是不能够工作的:1. 当前thread 的 TopLevelIrp  不是NULL 2. Page I/O3. Pre Create 操作中4. Post Close 操作中如果

2014-04-13 21:23:24 5005

原创 调试 Minifilter 无法卸载

在做驱动开发的测试过程中,发现有时候驱动无法成功的unload,程序发生了死锁,导致驱动程序无法成功卸载。打开windbg, 连接运行的虚拟机。在命令窗口输入: !locks得到如下的输出:               *** DUMP OF ALL RESOURCE OBJECTS ****        KD: Scanning for held l

2014-03-28 21:39:41 2719 1

原创 Minifilter 设计之一 --- Post operation 设计

Post operation 可以发生在 IRQL = DISPATCH_LEVEL . 因此在处理 post operation 的时候,要格外注意。 对于基于 IRP 的 I/O 请求, mini filter 可以采用两种方法保证 Post operation 是在IRQL 不高于 APC_LEVEL 来处理的。1. 第一种方法是在 Post 处理中 pending I/O 操作。

2014-03-27 22:35:59 1966

翻译 Postoperation 回调函数中 pending I/O 操作

Postoperation 回调函数中 pending I/O 操作在minifilter 的 posteroperation 的回调函数中可以用下面的步骤来 pending 一个 I/O 操作1. 调用 FltAllocateDeferredIoWorkItem 来分配一个 work item 2. 调用 FltQueueDeferredIoWorkItem 来把 work

2014-03-27 20:38:55 4566

原创 加密算法大全

加密算法从大的方面可以非为两类:私钥体系公钥体系其中公钥体系还可以进一步分为:

2014-03-26 15:22:55 7845

原创 Ubuntu 下 samba 配置

sudo apt-get install sambasudo apt-get install smbfssudo apt-get install system-config-sambasudo smbpasswd -a userAsudo  system-config-sambasudo /etc/init.d/samba  restart

2014-03-26 15:04:54 1032

转载 Tea 任何长度数据加密的一个实现

如下为tea 加密的一个实现,可以实现任何长度数据的加密。TEA 是八字节分组,加密之后的长度不是和原来输入明文数据的长度。把原明文数据长度作为加密数据的一部分存储,在解密的时候还原原始明文的长度。不记得原作者copyright 声明了,如果使用如下代码,自己承担相关风险。  用法,你知道的! 头文件如下:#pragma once/* -Input data: 8 by

2014-03-26 10:15:42 2378

原创 Mini Filter 操作消息的分析

Create :1. 在 Create preoperation 的时候, FsContext, FsContext2 ,Vpb, SectionObjectPointer 都是 02. 在 Create PostOperation 的时候, FsContext, FsContext2, Vpb, SectionObjectPointer 都被初始化成相应的数值3. 同

2014-03-24 21:30:52 1751

原创 Section Object

Section Object    一个 section object 代表了一个内存段, section object 可以在不同的进程之间共享它所代表的内存, 进程也可以使用 section object把文件映射到内存中。        section 有两种:    1. File-backed section . 用磁盘文件填充。 其实就是文件的内存映像,  se

2014-03-17 11:55:03 2153

原创 WORK_QUEUE_ITEM 介绍

    window 内核中有很多成熟的设计, WORK_QUEUE_ITEM 就是其中的一个。 这个设计的思想很简单,就是把要处理的任务扔到一个队列中,系统会自动调度处理这些任务。        WORK_QUEUE_ITEM 的结构很简单:     typedef struct _WORK_QUEUE_ITEM {      LIST_ENTRY  List;  //用

2014-03-16 22:43:16 4772

原创 创建 IRP 给底层驱动

创建 IRP 给底层驱动   在驱动开发的过程中,中间层的驱动可以需要创建 IRP 发送给底层的驱动, 在window   中常见有三种方法来创建 IRP      1. IoAllocateIrp 创建 IRP 并且把 I/O statck location 都初始化为 0      如果调用这个函数创建 IRP, 必须设置新创建的 IRP 的下一个底层驱动的 I/O

2014-03-16 19:37:09 1363

翻译 I/O 请求

上图来自微软驱动 WDK DOC1. the subsystem calls an I/O system service to open a named file.2. I/O manager 调用 object manager 来查询文件, object manager 同时也会对 symbolic link 进行处理, 之后会调用  安全模块来检查 subsystem 是否有正确的

2014-03-16 18:48:48 3560

转载 Check Debugger Present

#include "AntiDebug.h"#include #include #include #include #include "thread.h"#include #if 0Windows allow you to call the CreateProcess function with CREATE_SUSPENDED flag, that tells the

2013-12-12 22:08:46 1789

原创 Android Input 架构简图

InputManager 是一个关键的对象,它启动两个线程,一个用来从设备 /dev/input 读取event,另外一个线程用来分发event。                    在InputManager 做好基础工作之后,实际上在JNI 中承担起承上启下的是 NativeInputManager            InputReader 是通过 Eve

2013-06-14 15:26:33 1551

消息驱动系统实现模型

msg.h/msg.c/modules.c/modules.h 这是个文件实现了消息驱动系统模型。 整个package 是一个VC 项目,可以测试上面的模型。

2011-12-29

带有保存SSH登录 密码的 Putty

在工作中几乎离不开Putty,Putty 可以说最好用的SSH 客户端,由于安全方面的设计考虑,Putty 不支持SSH 登录密码保存,网上也有一些人有这方面的需求。 尽管可以通过设置Private key 的方式来实现自动登录,不过从方面性的角度而言,还是能够支持保存密码自动登录的方式较为方便。所输入的密码通过AES 加密保存起来。有任何bug,请email 告知我。

2008-05-28

空空如也

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

TA关注的人

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