--一个loop
作者:ShellEx.
ShellEx.cn && shellex.cublog.cn 版权所有
我又来了。今天实现的是类似While(.……
墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
200+累计阅读
216平均单平台
已同步平台
优快云
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄21年
当前文章被以下社区和专栏收录:
GCC源码分析(二)——前端
从这一篇开始,我们将从源代码的角度来分析GCC如何完成对C语言源文件的处理。GCC的内部构架在GCC Internals(搜“gccint.pdf”,或者见[1])里已经讲述得很详细了,但是如果你只看了gccint就来看代码,还是觉得一头雾水,无法下手,因为你很难把gccint所讲的概念同gcc代码里真实的数据结构联系起来。那么这也是我把我这半年的分析经理写下来的原因,大家可以参照gccint来看
内嵌汇编语法如下
内嵌汇编语法如下: __asm__(汇编语句模板: 输出部分: 输入部分: 破坏描述部分) 共四个部分:汇编语句模板,输出部分,输入部分,破坏描述部分,各部分使用“:”格开,汇编语句模板必不可少,其他三部分可选,如果使用了后面的部分,而前面部分为空,也需要用“:”格开,相应部分内容为空。例如:
gcc之编译链接原理
文章目录1. 概述2. 1. 概述 Windows环境下的开发同事,对于“目标文件”概念的理解或多或少有些陌生,因为大多数都是基于IDE(Integrated Development Environment)集成开发环境进行项目开发。如常用到的 IntelliJ IDEA、Visual Studio、Eclipse 等等。当某函数功能开发完成之后,直接鼠标点击构建(Build)然后就会生...
GCC编译器的应用和它的背景
一级标题 提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录一级标题前言一、pandas是什么?二、使用步骤1.引入库2.读入数据总结二级标题三级标题四级标题五级标题六级标题 前言 提示:这里可以添加本文要记录的大概内容: 例如:随着人工智能的不断发展,机器学习这门技术也越来越重要,很多人都开启了学习机器学习,本文就介绍了机器学习的基础内容。 提示:以下是本篇文章正文内容,下面案例可供参考 一、pandas是什么? 示例:pandas 是基于NumPy 的一种工具,该工具是为了
保姆级教程:用GATK4分析重测序数据,从fq.gz到vcf文件一步不落
本文提供了一份详细的GATK4重测序数据分析教程,涵盖从原始fq.gz文件到最终vcf文件的完整上游分析流程。通过Miniconda环境配置、数据质控、序列比对、变异检测等步骤的逐步指导,帮助生物信息学研究人员掌握标准流程,特别适合Linux命令行基础薄弱的研究者学习实践。
四旋翼无人机Matlab建模
本文主要分享一下四旋翼无人机的建模过程,然后在Matlab的simulink模块搭建起四旋翼无人机的模型,下一章将结合这个模型设计双环PID控制器并调节参数。 一、无人机建模过程
GCC-3.4.6源代码学习笔记 (103)
<br /><br />5.12.3.2.1.1.3.5.2. 为参数构建DECL节点<br />在解析完参数列表后,在cp_parser_direct_declarator的10492行,make_call_declarator创建如下的树节点。<br />(点此打开)<br />图76:非默认构造函数的CALL_EXPR<br />沿着和默认构造函数相同的路径,然后在grokdeclarator中,以下对该声明符的处理有所不同。下面的CALL_DECLARATOR_PARMS访问
Hi3516CV610 YOLOv8模型转换与部署实战:从源码到板端推理全流程解析
本文详细解析了将YOLOv8模型部署到Hi3516CV610开发板的全流程。内容涵盖从Ubuntu环境搭建、模型获取与验证,到关键的PyTorch模型转换为ONNX格式,并利用海思工具链量化生成板端可执行的.wk文件。最后,指导开发者编写板端C程序,完成视频流处理、NNIE推理及结果后处理,并提供了部署调试与性能优化的实用技巧。
详细解读gcc
详细解读gcc开放、自由和灵活是Linux的魅力所在,而这一点在gcc上的体现就是程序员通过它能够更好地控制整个编译过程。在使用gcc编译程序时,编译过程可以细分为4个阶段:● 预处理(Pre-Processing)● 编译(Compiling)● 汇编(Assembling)● 链接(Linking)Linux程序员可以根据自己的需要让gcc在编译...
arcgis导出自身相交数据
今天接到一个客户需求,一份面文件,里面有好多元素是两两相交甚至是三个相交的,现在要把这些重叠部分提取出来,并且把相交部分的原始要素的名称也保留在字段中,也就是说名称这个会有好多个名称字段,如果两个要素相交那就是前两个名称字段有值,后面的为空,如果是三个要素相交,那么输出的这个要素就是前三个名称字段有值,后面的为空,嗯,这里也不太确定会出现多少个名称字段,这个需要依照数据来定。 这是原始数据,...
DeepSeek+Dify实战:零代码构建智能SQL生成器
本文详细介绍了如何利用DeepSeek和Dify零代码构建智能SQL生成器,帮助非技术人员通过自然语言查询数据库。文章涵盖从数据准备、知识库设计到Agent配置的全流程,并提供了优化技巧和实际应用案例,显著提升团队数据查询效率。
MIPS内嵌汇编:从语法到实战,掌握底层优化核心技术
内嵌汇编是连接高级语言与底层硬件指令的关键技术,它允许开发者在C/C++代码中直接插入特定架构的机器指令,从而实现对性能瓶颈的精准优化或对硬件行为的精确控制。其核心原理在于通过编译器提供的特殊语法,将汇编指令模板与高级语言变量进行绑定和寄存器分配,在保持代码可读性的同时突破高级语言的限制。这项技术的核心价值在于能够直接操作硬件寄存器、实现原子操作、管理缓存以及执行系统级调用,尤其在对性能有极致要求的嵌入式系统、操作系统内核和高性能计算等场景中不可或缺。以MIPS架构为例,其精简规整的指令集使得内嵌汇编的学习
DSSAT模型实战:从基础配置到气候情景模拟
本文详细介绍了DSSAT模型在农业模拟中的应用,从基础配置到气候情景模拟的全流程实战指南。通过土壤-植物-大气连续体的动态关系建模,DSSAT能精准预测作物产量,误差率低至8%。文章涵盖气象数据处理、土壤参数配置、管理措施调控等核心技巧,并提供了Python脚本和可视化方法,助力农业科研与决策。
STM32 uCOS-III GCC移植说明
1. 修改ST的内核文件 参考https://blog.youkuaiyun.com/chuancey_cc/article/details/78474001 第四节 2. 替换启动文件 参考https://blog.youkuaiyun.com/chuancey_cc/article/details/78474001 第五节 3. 添加链接脚本 参考https://blog.youkuaiyun.com/chuancey_cc/...
Wazuh部署记录
Wazuh是一个免费的开源安全平台,统一了XDR和SIEM功能。它可以保护内部部署、虚拟化、容器化和基于云的环境中的工作负载。Wazuh帮助组织和个人保护其数据资产免受安全威胁。它被全球数千个组织广泛使用,从小型企业到大型企业。443:仪表盘界面访问端口1515:探针连接服务器端口1514:探针回传信息端口以上3个端口必须打开防火墙。
dolphinscheduler服务注册中心源码解析(一)服务注册与发现整体设计
下一篇文章我们开始讲解dolphinscheduler基于Zookeeper实现注册中心的源码解析。
操作系统—GCC与编译全流程
GCC与编译全流程
C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片
基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正
c与汇编的关系
c与汇编的关系 _start是汇编程序的入口,main是c程序的入口? gcc 只是一个 外壳而不是真正的编译器,这真的c编译器是/usr/lib/gcc/i486-gun/4.3.2/cc1,gcc调用c编译器、汇编器和链接器完成c 代码的编译链接工作。/usr/lib/gcc/i486-linux-gun/4.3.2/collect2是链接器ld的外壳,它调用ld完成链接。 i
霍尼韦尔SoftMaster使用说明
霍尼韦尔SoftMaster使用说明
深度学习工具包 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');```[](https://bitdeli.com/free "Bitdeli Badge")
Ucos-iii 移植到STM32F407 (vscode+cmake版)
本文详细介绍了uC/OS-III实时操作系统在STM32F429平台上的移植过程。主要内容包括:1)准备uC/OS源码并验证关键汇编文件;2)建立工程目录结构,复制必要源文件和配置文件;3)编写CMake脚本将uC/OS编译为静态库;4)修改启动文件、中断处理和配置宏定义;5)实现BSP层时钟和GPIO初始化;6)创建LED闪烁示例任务。移植过程中重点处理了系统时钟配置、任务调度初始化、临界区保护等关键环节,最终成功实现了基于uC/OS-III的LED定时闪烁功能。该移植方案采用CMake构建系统,便于工程
老版QQ原生表情gif动态
这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。
Linux 高并发学习笔记 - GCC/G++基本使用
GCC/G++ 基本使用,GCC编译原理,GCC常用命令,GCC与G++的区别。
从前后台系统到UCOS-III实践指南
基础阶段(1-2周):完成LED多任务闪烁实验进阶阶段(1个月):实现多外设协同控制项目实战(3个月):完成工业控制器原型开发源码研究(6个月):深入理解内核调度算法ImageCodefill:#333;color:#333;color:#333;fill:none;裸机开发基础RTOS任务管理系统资源优化网络协议集成安全机制设计裸机开发基础RTOS任务管理系统资源优化网络协议集成安全机制设计。
黑妹的游戏III
题目链接:黑妹的游戏III 不难发现,每次除以因子,可以等价于除以质因子。 然后我们对每个质因子单独看也是不影响的。 然后就变成质因子最多可以抵消多少次了。 假设某个质因子总数为sum,最大值为mx,那么如果mx*2<=sum,则会剩下1或者0个(奇偶)。 不然就是mx*2-sum个。 AC代码: #pragma GCC optimize("-Ofast","-funroll-all-loops") #include<bits/stdc++.h> //#define int long
GCC源码分析(摘)
摘自https://blog.youkuaiyun.com/sonicling/article/details/6702031,https://blog.youkuaiyun.com/sonicling/article/details/670615,https://blog.youkuaiyun.com/sonicling/article/details/7915301,https://blog.youkuaiyun.com/sonicling...
如何快速掌握WAVEWATCH III:风浪模拟的终极框架指南
WAVEWATCH III® 是一个由社区驱动的风浪模拟框架,汇集了风浪建模和动力学领域的最新科学进展。该框架通过求解随机相位谱动作密度平衡方程,能够精确模拟波数-方向谱,适用于浅水(冲浪区)应用以及网格点的湿化和干燥过程。支持使用规则(矩形或曲线)和不规则(三角形)网格进行波浪谱的传播计算,为海洋科学研究和工程应用提供了强大的工具。 ## ???? WAVEWATCH III的核心技术亮点 WA...
2252

被折叠的 条评论
为什么被折叠?



