vim简明教程

FX2N-2AD模块实战:从硬件连接到FROM/TO指令编程详解 本文详细解析FX2N-2AD模拟量输入模块的硬件连接与FROM/TO指令编程技巧,涵盖BFM缓冲存储器配置、梯形图程序设计及工程实战经验。通过实例演示如何实现精准信号采集与数据处理,特别针对PLC系统中的常见故障提供解决方案,助力工业自动化工程师高效完成设备调试与维护。 阅读详情

摘要

本文描述了Linux系统上最常用的文本编辑器vim的用法,向经典致敬。

vim简介

在Linux平台上,常用的文本编辑器有vim、nano和gedit。

vim启动后不能马上开始编写文本,这让习惯了GUI文本编辑器的用户颇有些不适应。这些用户如果没有搞懂vim的状态机设计,则玩不转vim。

nano启动后就可以自由地编写文本内容,底部还有一些快捷键提示,使用难度相对vim较低,你只需要根据提示输入快捷键即可。

gedit和Windows的记事本类似,使用难度比vim低很多,易用性也强于nano。

在Linux平台上,我们为什么不只用图形用户界面的gedit,而非得学习vim呢?

作者认为,原因有如下两点:

首先,在没有图形用户界面可用的应用场景中,vim是最佳甚至是唯一的选择。

此外,现代程序员如果能熟练运用vim,在适当的场合一顿操作,会令周围的同学刮目相看。

综上所述,现代程序员仍然有必要熟练掌握vim。

vim配置

vim的默认配置文件是~/.vimrc,如果不存在可以自己新建一个,常用配置命令如下:

set number #显示行号,number可缩写为nu
set nonumber #不显示行号,nonumber可缩写为nonu
set tabstop=n #设置Tab键的显示宽度(一个Tab的空格数),n为可变值,tabstop可缩写为ts
set expandtab #把插入的tab字符替换成tabstop选项指定数量的空格符。
set autoindent #根据格式自动缩进,autoindent可缩写为ai。开启新行自动缩进。
set shiftwidth=n #自动缩进长度,n为可变值。新行自动缩进宽度值。
set cindent shiftwidth=n #设置C自动缩进的缩进长度,n为可变值
set wrap #设置为自动换行,行内容超过窗口宽度时自动换行显示。
s
【无人机设计与控制】基于PID控制的四旋翼无人机系统Matlab仿真 本文设计并仿真了基于PID控制的四旋翼无人机系统。首先,建立了四旋翼无人机的数学模型,涵盖了无人机的动力学和控制系统。通过PID控制器对四旋翼的姿态和位置进行控制,以实现其稳定飞行。使用MATLAB/Simulink对该系统进行仿真,验证了PID控制算法在四旋翼控制中的有效性。仿真结果表明,PID控制能够较好地调节四旋翼的飞行姿态,并有效抑制外部干扰,使得无人机能够保持平稳飞行。 阅读详情

相关推荐

3D视觉引导技术在机器人焊接中的应用

通过对比传统的2D视觉和3D视觉技术在焊接领域的应用差异,探讨了3D视觉引导技术在提高焊接精度、适应不规则工件形状和增强自适应能力方面的优势。本文对3D视觉引导技术在机器人焊接中的应用进行了深入探讨,总结了其在提高焊接精度、适应不规则工件形状和增强自适应能力方面的优势,并通过应用案例展示了其在焊接路径规划、焊缝检测和焊接质量控制等方面的重要作用。1. 提高焊接精度:3D视觉引导技术能够精确测量焊接工件的三维形状和位置,为机器人提供精准的焊接路径规划和跟踪,从而提高焊接精度。三、3D视觉引导技术概述。

2302_79273122的博客 1835

Allan方差读图分析IMU误差指标

Allan方差标定IMU参数实测分析

weixin_44927558的博客 3566

磁传感器技术解析:从霍尔效应到车规级应用,纳芯微的本土第一之路

磁传感器是现代工业与汽车电子中的关键感知元件,其技术演进经历了从分立器件到高集成度SoC的跨越。霍尔效应与磁阻效应构成两大物理基础,其中硅基霍尔方案凭借高性价比与成熟供应链,在车规级应用中占据主流。高精度电流检测、角度与位置感知、磁开关等场景,对传感器的温漂抑制、共模瞬态抗扰与批量一致性提出严苛要求。车规级可靠性体系与系统级集成能力,成为衡量供应商的核心标尺。随着新能源主驱、光伏逆变、工业伺服等应用爆发,具备完整信号链与隔离技术积累的厂商正逐步构建护城河。本文以纳芯微为样本,剖析其从隔离技术延伸至磁传感器平

weixin_34387468的博客 365

MAX30102传感器实战:从寄存器配置到Arduino心率血氧监测

本文详细介绍了MAX30102传感器在Arduino平台上的实战应用,从寄存器配置到心率血氧监测的全过程。通过清晰的代码示例和实用技巧,帮助开发者快速实现脉搏血氧仪功能,包括I2C通信、FIFO数据处理及算法实现,适用于健康监测和可穿戴设备开发。

weixin_29182481的博客 511

中国工商银行企业架构建设实践最全总结

中国工商银行参考IBM持续价值创新方法并吸收TOGAF等主流企业架构的框架理念,结合业务实际情况形成工行自己的企业架构方法论并实践,为数字化转型提供支撑。本案例通过介绍中国工商银行企业架构之业务架构设计方法,为其他银行企业架构建设提供参考。 企业架构是数字化转型的抓手,可以帮助企业规划、管理和实施数字化解决方案,以实现业务目标并适应不断变化的市场条件。中国工商银行通过战略目标指导业务架构的规划和设计,业务架构建模后指导IT架构建模。

银行信息系统应用架构详解 2730

012、乘累加单元(MAC):NPU中最基本的计算单元

本文深入剖析了神经网络处理器(NPU)中的核心计算单元——乘累加单元(MAC)。作者通过实际调试案例揭示了MAC单元设计中的关键问题:定点数格式对齐、累加器位宽陷阱、流水线优化和多MAC同步方案。重点讨论了INT8量化中的边界条件处理、偏置项截断风险以及零值检测等实战经验,并提供了三点实用建议:建立精确的C模型、参考RISC-V P扩展指令集、仔细审查芯片规格书。文章强调硬件加速的实际瓶颈往往在于数据搬运而非计算单元本身,为NPU开发者提供了宝贵的工程实践参考。

m0_50546716的博客 298

Android12+RK3588 多应用录音适配

两个应用能够同时录音,在Android12上的实现

guanmingyuangmy的博客 2225

DaVinci Developer和DaVinci Configurator:AutoSAR开发与配置工具

a. 组件创建:DaVinci Developer允许开发人员创建不同类型的AutoSAR软件组件,如应用软件组件(Application Software Component,SWC)、基础软件组件(Basic Software Component,BSWC)等。除了以上功能,DaVinci Developer和DaVinci Configurator还提供了丰富的文档和代码生成功能,以支持开发人员和配置人员进行文档编写、代码生成和文档浏览等任务。用户可以根据具体需求对软件组件进行灵活的配置。

HmoaAmp的博客 2262

深度学习工具包 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")

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

上一篇: C语言的setjmp和longjmp
下一篇: gdb简明教程
ADM实验室
博客等级 码龄21年 156粉丝 26原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

打赏作者

ADM实验室

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

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

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

打赏作者

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

抵扣说明:

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

余额充值