使用c#罗列、监视、控制进程


个人简介:本人多年从事研发和测试领域工作,有一定的经验;
口号:懒人推动科技进步,学习编程啊脚本啊目的就是要将人从做相同的工作脱离出来,手懒可以但是脑子不能懒,让重复的事情自动完成,能动一下就完成任务就不能动两下,懒到极致才是目标!
方向:本人不怎么将理论的知识,专注于解决实际问题最重要。
领域:嵌入式编程,c#,c,c++,可靠性测试,功能性能测试;


显示所有进程

using System.Diagnostics;
using System.Runtime.InteropServices;
// 导入 Windows API 函数 在主class 增加
[DllImport(“user32.dll”)]
static extern IntPtr GetForegroundWindow();
[DllImport(“user32.dll”)]
static extern uint GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);
Process[] processes = Process.GetProcesses();
string processname_new=“”, processname_old=“”;
string killname = “”;
bool killflag = false;
准备工作完成;
richTextBox1.AppendText(“进程数量:” + processes.Length+“\r\n”);
foreach (Process process in processes)
{
richTextBox1.AppendText(“ID : “+ process.Id.ToString()+” Name : “+ process.ProcessName +”\r\n”);
Console.WriteLine(“ID : {0:d} , name : {1:s}”,process.Id, proc

Unity Mod开发与调试:BepInEx、MelonLoader与独立项目方案深度对比 在Unity应用生态中,插件(Plugin)与模组(Mod)是实现功能扩展和深度定制的核心技术手段。其核心原理是通过程序集注入或引用,在运行时或开发时动态扩展或修改原有应用的行为。从技术价值看,这为游戏功能增强、开发调试、逆向学习及社区内容创作提供了强大支持,广泛应用于游戏模组开发、自动化测试、性能分析与教学研究等场景。本文聚焦于Unity生态下最主流的BepInEx、MelonLoader以及Standalone独立调试项目三大方案,从底层设计哲学、安装部署到实战场景进行横向剖析,旨在帮助开发者根据具体需 阅读详情

相关推荐

C#实现进程监视(附完整源码)

C#实现进程监视(附完整源码)

希望我的博客,能帮上你解决学习中工作中所遇到的问题 791

TIA博途V17标准化PLC-HMI协同控制骨架系统

在工业自动化领域,PLC与HMI的深度协同是实现高可靠产线控制的基础。基于西门子TIA Portal V17平台,结构化编程通过UDT继承、分层功能块(FC/FB/OB)和全局数据块设计,显著提升代码可维护性与团队协作效率;HMI与PLC采用类型安全符号寻址与四层状态映射机制,从根本上解决按钮变灰、通讯失联等高频工程问题。该架构不仅支撑S7-1500/1200多设备协同控制,更具备跨项目复用、快速故障定位(<8分钟)、低代码适配新设备(如伺服/变频器)等技术价值,广泛应用于食品灌装、汽车焊装、光伏测试等真实

weixin_34014555的博客 395

基于.NET的大学生健康管理系统毕业设计实战指南

在软件开发领域,管理系统是连接业务需求与技术实现的核心载体,广泛应用于各行各业。其基本原理是通过分层架构(如MVC模式)将数据、逻辑与界面分离,实现高内聚、低耦合。从技术价值看,这类系统能有效提升数据管理效率、规范业务流程,并支持决策分析。在高校信息化场景中,学生健康管理是典型应用,涉及档案管理、数据追踪与统计分析等需求。本文聚焦于一个基于.NET技术栈的完整项目案例,深入剖析如何利用C#、ASP.NET与SQL Server等技术,构建一个功能完备的大学生健康管理系统。通过解读源码结构、核心业务流程(如登

weixin_34353714的博客 418

C#找指定程序进程,并启动程序

当在电脑上想启动一个我们指定的应用程序,那么怎么办?1.找指定程序进程;2.获取运行路径;3.调用这个路径启动程序。必须先要运行一次想启动的程序,不然没有进程,就无法获得这个程序安装路径(运行路径),或者你知道程序的路径。不过,每台电脑的程序安装路径不一样,所以必须要先获得进程,通过进程找到路径(安装路径获取的是绝对路径).

监控进程中指定的程序是否启动和关闭

使用c#开发,监控内存中指定的多个应用程序是否运行,是否关闭

C#进程监控

此文档里面详细讲解了C#如何对进程操作,让你对C#进程深入了解

C# 监控进程使用的网络流量

C#监控进程网络流量, 以上传文件到QQ群为例, 监控流量和上传流量吻合

Qt+PCL实战:如何用QVTKOpenGLNativeWidget高效渲染3D点云(附完整代码)

本文深入解析了Qt与PCL结合使用QVTKOpenGLNativeWidget进行高效3D点云渲染的实战技术。通过对比传统QVTKWidget,详细介绍了QVTKOpenGLNativeWidget在渲染效率、内存占用和兼容性方面的显著优势,并提供了完整的代码示例和性能优化策略,助力开发者在工业检测、自动驾驶等领域实现更高效的点云可视化。

keras9composer的博客 686

OpenEuler22.04 快速部署Docker:华为云镜像源配置指南

本文详细介绍了在OpenEuler 22.04系统上快速部署Docker的完整流程。针对系统默认源版本老旧的问题,重点讲解了如何配置华为云镜像源以加速安装,并涵盖Docker引擎、Docker Compose的安装、服务启动验证、权限配置、镜像加速等核心步骤与常见问题排查,帮助用户高效搭建稳定的容器化开发环境。

http9protocoller的博客 173

电力电子课设救星:用Simulink实现Buck变换器双闭环控制(PID调参技巧)

本文是电力电子课程设计的实用指南,详细讲解如何利用Simulink仿真平台实现Buck变换器的电压电流双闭环控制。文章核心聚焦于PID参数整定的实战技巧,提供了从手动调试口诀到MATLAB脚本自动优化的完整方案,旨在帮助学生高效完成课设,深入理解闭环控制原理并生成专业报告。

weixin_29179311的博客 296

3D坐标系转换实战:如何用Python快速实现旋转矩阵与平移向量的组合变换

本文详细介绍了如何使用Python和NumPy实现3D坐标系转换中的旋转矩阵与平移向量的组合变换。通过齐次坐标和变换矩阵的数学原理,结合代码示例,帮助开发者高效处理机器人路径规划和计算机视觉中的空间变换问题,并解决实际应用中的常见错误。

pluto的博客 958

Python 爬虫实战:龙虎榜机构买卖数据爬取与代码详解(附数据分析)

龙虎榜是证券市场中重要的市场信息之一,记录了当日大宗交易及机构买卖情况,包括机构名称、买卖方向、成交金额、成交股数、买入卖出价格等信息。通过分析龙虎榜数据,投资者可以更好地了解市场动向和机构投资者的行为,从而做出更准确的决策。本文将详细介绍如何使用 Python 编写爬虫程序,高效地抓取龙虎榜机构买卖数据,并进行数据分析。我们将从环境搭建、数据抓取、数据存储到数据分析等关键步骤逐一展开,帮助读者掌握完整的爬虫实战流程。

u014481728的博客 702

NR PUCCH(一) PUCCH format 0/1

NR中PUCCH物理信道用来发送上行控制信息Uplink Control Information(UCI),当然UCI也可以在PUSCH上发送。UCI 内容包括:CSI,HARQ ACK/NACK ,SR 及上述三者的组合信息。 那先看下PUCCH format ,序列的生成及资源映射的相关内容。 NR中支持5种格式PUCCH,根据PUCCH format占用时域符号长度分为短PUCCH(1-2个符号,PUCCH 0/2)和长PUCCH(4-14个符号,PUCCH1/3/4)。使用短PUCCH 能够支

asd199086的博客 6060

Ubuntu零基础教学-如何把Ubuntu20.04界面从英文修改为中文?| 超级详细,建议收藏

带你如何把Ubuntu20.04界面从英文修改为中文?| 超级详细,建议收藏

**My Coding Family** 5338

多源异构数据融合(Kaggle+Google Trends联合分析)

本文详细介绍了如何利用Python实现多源异构数据融合,以Kaggle电商销售数据与Google Trends搜索指数为例,展示了数据清洗、预处理、时间对齐、数据合并、相关性分析、回归建模和可视化全过程。数据预处理与内存优化通过分块加载、数据类型转换和缺失值处理,有效降低了大规模数据在内存中的占用,并确保数据质量。时间对齐与数据融合策略采用重采样与内连接方法对齐不同数据源的时间维度,实现了高质量数据的融合,为后续联合分析奠定基础。模型构建与分析。

闲人编程的博客 1013

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

上一篇: IEC101编程学习笔记专栏规划
下一篇: 手把手教你学习IEC104协议和编程实现 一 起章
six2me
博客等级 码龄23年 1万+粉丝 291原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

six2me

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值