tool

c# 杀死占用某个文件的进程

柔情痞子 提交于 2019-12-02 13:15:44
原文: c# 杀死占用某个文件的进程 需要使用微软提供的工具Handle.exe string fileName = @"H:\abc.dll";//要检查被那个进程占用的文件 Process tool = new Process(); tool.StartInfo.FileName = @"H:\软件\Handle\handle64.exe"; tool.StartInfo.Arguments = fileName + " /accepteula"; tool.StartInfo.UseShellExecute = false; tool.StartInfo.RedirectStandardOutput = true; tool.Start(); tool.WaitForExit(); string outputTool = tool.StandardOutput.ReadToEnd(); string matchPattern = @"(?<=\s+pid:\s+)\b(\d+)\b(?=\s+)"; foreach (Match match in Regex.Matches(outputTool, matchPattern)) { Process.GetProcessById(int.Parse(match.Value)).Kill(); } Console.ReadKey(

启动Spring Tool Suite 4时出现 could not find tools.jar spring boot live hovers....弹窗

隐身守侯 提交于 2019-12-02 05:51:28
第一步:检查一下STS启动时的加载环境 Help —› About Spring Tool Suite 4 —› Installation Details —› Configuration 本人已经修改过了,所以是jdk,若是jre,则说明启动加载的是jre,需要进行第二步操作了。 第二步:检查一下STS启动时的加载环境 打开Spring Tool Suite 4的安装路径,用编辑器打开SpringToolSuite4.ini文件,找到-vmargs,在该行上面添加两行代码` -vm D:\software\dev\java\jdk8\jdk1.8.0_25\bin\javaw.exe //该行为自己jdk路径 保存后重启STS,即可解决问题。 参考文章: stack overflow 来源: https://www.cnblogs.com/mharvay/p/11732909.html

python 面向对象:类属性

夙愿已清 提交于 2019-12-02 05:47:39
一、概念和使用 类属性 就是给 类对象 定义的 属性 通场用来记录 与这个类相关 的特征 类属性 不会用于 记录 具体对象的特征 二、代码演示 示例需求: 定义一个工具类 每件工具都有自己的name 需求--知道使用这个工具类创建了多少个工具对象 class Tool(object): count = 0 def __init__(self, name): self.name = name Tool.count += 1 tool1 = Tool("钳子") tool2 = Tool("扳手") tool3 = Tool("改刀") print(Tool.count)  # 输出:3 来源: https://www.cnblogs.com/testlearn/p/11732715.html

SPMT(SharePoint Migration Tool)SharePoint 迁移工具介绍

送分小仙女□ 提交于 2019-12-01 03:48:43
SPMT(SharePoint Migration Tool)SharePoint 迁移工具介绍 由于使用SharePoint 很多年,在数据维护,系统迁移等有自己固定的模式。 一次偶然参与的SharePoint 上海的本地讲座,听到Helen 介绍SPMT。个人感觉很好用,所有在这里介绍一下。也做个记录供自己产看。 先看看官方介绍:https://support.office.com/en-us/article/Introducing-the-SharePoint-Migration-Tool-9c38f5df-300b-4adc-8fac-648d0215b5f7?ui=en-US&rs=en-US&ad=US 其中: The SharePoint Migration Tool lets you migrate your files from SharePoint on-premises document libraries or your on-premises file shares and easily move them to either SharePoint or OneDrive in Office 365. It is available to Office 365 users. SPMT 工具可以把你服务器版本的文档库、共享文件

c# 杀死占用某个文件的进程

落爺英雄遲暮 提交于 2019-11-30 09:52:43
需要使用微软提供的工具Handle.exe string fileName = @"H:\abc.dll";//要检查被那个进程占用的文件 Process tool = new Process(); tool.StartInfo.FileName = @"H:\软件\Handle\handle64.exe"; tool.StartInfo.Arguments = fileName + " /accepteula"; tool.StartInfo.UseShellExecute = false; tool.StartInfo.RedirectStandardOutput = true; tool.Start(); tool.WaitForExit(); string outputTool = tool.StandardOutput.ReadToEnd(); string matchPattern = @"(?<=\s+pid:\s+)\b(\d+)\b(?=\s+)"; foreach (Match match in Regex.Matches(outputTool, matchPattern)) { Process.GetProcessById(int.Parse(match.Value)).Kill(); } Console.ReadKey(); 来源: https://www

nodejs windows 安装过程

笑着哭i 提交于 2019-11-30 09:18:21
https://nodejs.org/en/ 下载安装包 配置全局安装包路径 npm config set prefix "D:\tool.install\nodejs\node_global" 以及 npm config set cache "D:\tool.install\nodejs\node_cache" 查看npm所有配置 npm config ls -l 配置全局路径查看.npmrc文件所在位置,编辑文件 prefix=D:\tool.install\nodejs\node_global cache=D:\tool.install\nodejs\node_cache windows环境变量 配置 添加Path变量 D:\tool.install\nodejs\node_global值 淘宝NPM镜像加速下载 npm install -g cnpm --registry=https://registry.npm.taobao.org 来源: oschina 链接: https://my.oschina.net/u/94965/blog/775329

pprof 使用总结

瘦欲@ 提交于 2019-11-29 21:34:54
pprof 使用总结 作用: 1. cpu分析,按照一定的频率监听cpu寄存器使用情况。确定Cpu周期花费时间的跟踪位置。 2. 内存分析,在应用程序进行堆分配时记录堆栈跟踪,用于监视当前和历史内存使用情况,以及检查内存泄漏。 3. 阻塞分析,记录 goroutine 阻塞等待同步(包括定时器通道)的位置 4. 互斥锁分析,报告互斥锁的竞争情况 web方式 url输入地址: http:127.0.0.1:9090/debuf/pprof 会出现以下信息 /debug/pprof/ profiles: 0 block 5 goroutine 3 heap 0 mutex 9 threadcreate full goroutine stack dump 终端操作 登录指令: 1. go tool pprof 127.0.0.1:9090/debug/pprof/profile cpu信息 2. go tool pprof 127.0.0.1:9090/debug/pprof/heap 内存信息 默认类型: -inuse_space:分析应用程序的常驻内存占用情况 -alloc_objects:分析应用程序的内存临时分配情况 go tool pprof -alloc_objects 127.0.0.1:9090/debug/pprof/heap 3. go tool pprof 127

刷题记录:[BUUCTF 2018]Online Tool

我与影子孤独终老i 提交于 2019-11-29 21:06:10
目录 刷题记录:[BUUCTF 2018]Online Tool 一、知识点 1、 escapeshellarg 和 escapeshellcmd 使用不当导致rce 刷题记录:[BUUCTF 2018]Online Tool 题目复现链接: https://buuoj.cn/challenges 参考链接: BUUCTF 2018 Online Tool 一、知识点 1、 escapeshellarg 和 escapeshellcmd 使用不当导致rce https://github.com/hongriSec/PHP-Audit-Labs/blob/master/Part1/Day5/files/README.md PHP escapeshellarg()+escapeshellcmd() 之殇 这两个链接讲的很详细了 来源: https://www.cnblogs.com/20175211lyz/p/11532530.html