Hello World

Flutter学习之Hello World Flutter之入门学习第一天 阅读详情

1.main函数的原型

int main(void)

int main(int argc, char* argv[])

int main(int argc, char* argv[], char* env[] )

argc命令行参数的个数

argv命令行参数,以NULL结束

env环境变量,以NULL结束

运行結果:

Hello World!
argv[0]=./helloworld
env[0]=ORBIT_SOCKETDIR=/tmp/orbit-jerry
env[1]=SSH_AGENT_PID=1365
env[2]=TERM=xterm
env[3]=SHELL=/bin/bash
env[4]=XDG_SESSION_COOKIE=03739f9a4df8f5efe9bd70744d164959-1293451882.183158-1973707086
......

 

2.main函数的返回值

main函数的返回值是返回给父进程的,父进程调用以下函数来获取子进程的退出码(即main函数的返回值)

pid_t wait(int* status);

pid_t waitpid(pid_t pid, int* status, int option);

 

#include <stdio.h>

int main(int argc, char* argv[])
{
    printf("Hello World!/n");   
    return 100;
}

在bash在,执行一个命令后(bash里是父进程,命令是子进程),$?里存放的是这个命令的退出码

./hellowrold ; echo $?

 

运行結果:

Hello World!

100

 

3.main函数不是第一个执行的函数

 

运行結果:

hello_init

Hello World!

hello_fini

VsCode及hello world 一早起来,觉得Eclipse有点太“经典”了,于是找了一个免费的VsCode。 PS:学个python,结果IDE搞了N天,什么时候是个头啊.... VsCode安装 下载地址:https://code.visualstudio.com/ 我是用的是Windows x64 Stable版本 配置中文 俺的英文水平比较差,原来用惯了工具还要,换个新工具,自然还是zh_cn比较容易上手... 阅读详情

相关推荐

各个版本的Hello World

 记得自己初学Java时,第一个Hello World程序,从我找到一本Java教材,到懂得如何设置环境变量,到成功打印出Hello World信息,我用了三天的时间(不要笑话我,现在我还是这么笨)。虽然我都毕业已经一年多,可那件事情想来仍历历在目。今天有点闲空,就随手写了各个版本——虽说是“各个版本”,其实也就仅有的几个版本——的Hello World程序,借此来怀念一下大学时光。批处理版

sjdev的专栏(申俊杰) 3196

IOS ARC内存管理,提高效率避免内存泄露

转:点击打开链接 Cocoa内存管理机制 (1)当你使用new、alloc、copy方法创建一个对象时,该对象的保留计数器值为1.当不再使用该对象时,你要负责向该对象发送一条release或autorelease消息。这样,该对象将在其使用寿命结束时被销毁。 (2)当你通过其他方法获得一个对象时,这假设该对象的保留计数器值为1,而且已经被设置为自动释放,你不需要执行任何操作来确保该对...

weixin_30765475的博客 254

【题解】Hello, World!

【题解】003-Hello, World! 原题速达 题目描述: 对于大部分编程语言来说,编写一个能够输出 “Hello, World!” 的程序往往是最基本、最简单的。 因此,这个程序常常作为一个初学者接触一门新的编程语言所写的第一个程序,也经常用来测试开发、编译环境是否能够正常工作。 SO,来挑战最基础的“Hello, World!”吧! 输入格式: 无 输出格式 一行,仅包含一个字符串 样...

DYXM之寒舍 1713

iOS易引起内存泄漏原因总结

最近通过Analyze及Leaks等工具对项目进行了内存泄漏问题的检测及修改,现对遇到的易造成内存泄漏的问题进行一些总结,每点中都列举了会造成内存泄漏的代码书写方式,并对其原因进行分析,最后给出了相关的解决方案。 接下来就开始进行总结: 一、 循环引用 循环引用是在iOS可能引起内存泄漏的主要原因,这类问题常见的出现在Block的使用中,由于Block会持有所使用到的变量,下面就总结下Block使...

TuGeLe的博客 2034

STDP实战:用PyTorch从零搭建脉冲神经网络(附完整代码)

本文提供了基于PyTorch从零搭建脉冲神经网络的实战教程,重点讲解了STDP学习规则的原理与工程实现。通过构建LIF神经元模型和向量化STDP层,并结合泊松编码,详细演示了如何构建一个能够进行无监督特征学习的混合网络架构,为探索神经形态计算和低功耗实时学习方案提供了完整代码与实践指南。

weixin_29056145的博客 263

工业相机图像格式深度解析:从Mono8到Mono12的选型与应用

本文深度解析工业相机黑白图像格式,重点对比Mono8、Mono10与Mono12的核心差异。文章从位深、动态范围和数据量等关键概念切入,详细阐述了不同格式的优缺点及适用场景,为工业视觉项目中的相机选型提供实战指南,帮助用户在精度、速度与成本间做出最优决策。

weixin_29207439的博客 260

Xmonad——在Ubuntu12.04.2上使用Xmonad窗口管理器(续)

xmonad is a dynamically tiling X11 window manager that is written and configured in Haskell. In a normal WM, you spend half your time aligning and searching for windows. xmonad makes work easier, by automating this.

1911

[arcgis插件]在批量出图时,如何把图层属性表以动态表格的形式插入到布局页面

在批量出图时,如何把图层属性表以动态表格的形式插入到布局页面。

坐听风雨 4561

matlab hello world,hello world

hello world(程序代码)编辑锁定讨论上传视频Hello World 中文意思是『你好,世界』。因为 The C Programming Language 中使用它做为第一个演示程序,非常著名,所以后来的程序员在学习编程或进行设备调试时延续了这一习惯。中文名你好,世界外文名Hello World创造者Brian Kernighan(布赖恩·克尼根)类型程序代码出处The C...

weixin_32635501的博客 2576

手把手教你用Simulink搭建DSOGI-PLL模型(附完整代码下载)

本文详细介绍了在Simulink中搭建高鲁棒性DSOGI-PLL模型的完整工程实践指南。针对传统锁相环在非理想电网下的不足,文章深入剖析了双二阶广义积分器锁相环(DSOGI-PLL)的核心原理与优势,并提供了从模块构建、系统组装到参数整定与测试验证的全流程手把手教程,附有完整代码下载,助力工程师应对谐波、电压跌落等复杂电网工况。

weixin_29223603的博客 388

高通410随身WiFi刷OpenWRT与Debian双系统一键集成方案

本文详细介绍高通410随身WiFi设备刷入OpenWRT与Debian双系统的一键集成方案。通过虎王工作室提供的一键刷机包,用户可轻松实现双系统部署,兼顾OpenWRT的网络功能与Debian的完整应用服务,适用于网络加速、服务器部署等多种场景,并提供了硬件资源分配与系统切换的实用指南。

docker7nomad的博客 1135

java输出hello world_java输出Hello World

一、输出“Hello World!”1、新建一个java项目,点击File->New->Java Project,创建java项目的界面之后,输入项目名称wly,点击finish。2、创建好java项目之后,鼠标右键项目,选择New->Class,创建一个类,mypackage为包名,Name类名Hello,首字母大写,点击finish。3、编写程序输出“Hello World!...

weixin_32429589的博客 1万+

Vivado与Vscode无缝集成:高效Verilog开发环境搭建指南

本文详细介绍了如何将Vivado与Vscode无缝集成,打造高效的Verilog开发环境。通过替换Vivado默认编辑器为Vscode,配置必备插件和语法检查工具,开发者可以大幅提升FPGA项目的编码效率。文章还提供了代码片段、Testbench自动生成等高级技巧,帮助开发者快速上手这一集成方案。

weixin_33737774的博客 493

Docker: hello world

第一个Docker镜像:hello world

不负热爱 3577

Foxglove 介绍以及入门使用教程

Foxglove 是由Foxglove 工作室开发的一套工具集,包括和等组件。跨平台支持:可以在 Windows、macOS 和 Linux 上运行。多协议兼容:支持 ROS、ROS 2、CAN 数据以及其他自定义协议。丰富的可视化功能:可以绘制点云、轨迹、激光雷达数据、IMU 数据等。实时与离线模式:既可以实时监控机器人状态,也可以加载和回放记录的数据文件。Foxglove 的 3D 视图允许你以三维方式查看机器人的运动轨迹、传感器数据和其他几何信息。你可以旋转、缩放和平移视图以获得更好的观察角度。

zolty 1万+

自动化测试与AI的结合应用

自动化测试,人工智能,机器学习,深度学习,测试用例生成,缺陷预测,测试优化 1. 背景介绍 在软件开发领域,自动化测试已成为不可或缺的一部分,它可以提高测试效率、降低测试成本,并确保软件质量。然而,传统的自动化测试方法往往依赖于人工编写的测试用例,这不仅耗时费力,而且难以应对复杂软件

AI架构师小马 2246

HTML教程Hello World

在本教程中,您将学习如何使用HTML创建一个简单的hello world页面。 首先,让我们解释一些HTML基础知识。 HTML是代表H yper T外部中号 arkup 大号 anguage HTML是一个文本文件,由一组标记标签组成,例如(<html> <body> </ html> </ body>)。 几乎所有的标记标记都有开...

一名可爱的技术搬运工 3950

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

【Hello World 】

几乎每一个程序员都是从Hello World!开始自己的程序人生,作为一个初学编程的小朋友,也需要先编程来输出Hello World!。

✨ 欢迎来到【Seal ^_^ 的优快云博客】!✨ 8693

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

Docker 入门之hello world

据说程序员写的第一个程序都是输出hello world,前2天在contos7中安装了docker,今天就输出个hello world 来入门吧。 docker允许在容器内部使用docker run 运行应用程序,我们可以使用docker run 来输出hello world。 一、检查下docker是否正确安装。 docker info //如果安装正确就会有很多docker的信息,如下图: docker-info 如果安装正确执行docker info 后就回输出如图很多信息,我.

wzs535131的博客 3133

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

openvela Hello World

openvela 基于开源操作系统 NuttX 构建,进一步提供多种系统级服务。为了使 openvela 更加完善和功能全面,需要引入完整的开发框架或功能模块。

woshikaykay的博客 707

一、cmake的hello world

cmake学习我是参考了《CMake Practice.pdf》,说实话这本书写的真好,很详细,所以就按照这本书,自己再总结一遍。(其实是自己抄一遍,哈哈哈)

酱油师兄的博客 770

GNU HELLO WORLD

NO kidding. This is a real hello world program. The purpose of this program is to demonstrate a standard framework of GNU program and GNU coding style.(I like linux style) Whats more, It shows how to

some random notes 1633
上一篇: 变参函数
下一篇: automake/autoconf工程管理
test27
博客等级 码龄16年 11粉丝 30原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值