EOS开发推荐VS Code和CLion做IDE工具

CLion vs VSCode:为什么CMakeLists.txt让CLion在库配置上更胜一筹? 本文深入对比了CLion与VSCode在C++项目开发中的差异,重点分析了CLion如何通过深度集成CMakeLists.txt,在第三方库配置和管理上提供更流畅、一致的体验。CLion以CMake为单一事实来源,自动同步构建、代码索引与调试配置,避免了VSCode中多配置文件手动同步的繁琐与不一致问题,尤其适合中大型、跨平台的CMake项目。 阅读详情

每一个开发人员都需要一个良好的IDE,EOS开发也是一样,为项目开发过程构建一个良好的IDE环境是第一步。这就是为什么我们要写这个如何使用VS Code或者CLion进行EOS开发的快速教程的原因。

我们还为VS Code创建了一些脚本,这些脚本将你在终端中使用的一些命令自动化。

设置Visual Studio Code

首先,如果你还没有这些VS Code扩展的话,安装一下。对于EOS Dapp开发,它们将非常有帮助:

  • C/C++ - VS Code的智能感知、调试和代码浏览
  • CMake - Visual Studio Code的CMake语言支持
  • CMake Tools - Visual Studio Code扩展CMake支持
  • WebAssembly - 用于WebAssembly文本表示的语法高亮显示

当我们开发EOSIO dApps时,我们需要编写.hpp和.cpp文件中的代码。然而,这是整个过程中很小的一部分。大多数时候,我们需要生成一些其他文件,这些文件将用于在区块链上部署合约,进行单元测试等等。这就是CMake有用的地方。

CMake是用于控制软件编译过程的命令行工具。一旦它在你的IDE内正确设置的话,会使整个开发过程更加容易。

既然我们要使用CMake工具,我们应该对我们的项目结构做一些改变。我们将重用EOSIO项目的构架,因为它拥有我们所需要的一切。当然,我们有一些小的变化。

我们有一张图片,展示了新的项目结构。让我们看一看。

首先,我们有了build文件夹。这是放置所有构建内容的地方。你所使用的每一个生成文件都在那里。接下来是CMakeModules,它包含一些有用的Cmake模块,这些自定义模块用于编译过程。

contracts是我们的核心文件夹。这就是我们要放置智能合约的地方。目前,eosiolib, libc++和musl默认存在这里用于编译。紧接着是externals和libraries。两个文件夹都包含用于使整个编译过程更容易的库。

项目结构中最后一个重要的东西是配置文件CMakeLists.txt。每个目录都有自己的带有命令的CMakeLists.txt文件。

可以在我们的repo中找到所有的文件夹和脚本的新项目结构。

CMakeLists

让我们看一些配置文件,因为你需要知道如何使用它们。

1.CMakeLists.txt(4)

这是设置编译过程的主要配置文件。你应该知道,当你开发Dapp时,你需要设置项目名称。版本和语言是可选的。

# Set the minimum required version of cmake for a project
cmake_minimum_required(VERSION 3.5)

# Set a name, version, and enable languages for the entire project.
project( ProjectName )

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libraries/fc/CMakeModules")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")

# Load and run CMake code from a file or module.
include( GNUInstallDirs )
include( SetupTargetMacros )

# Set a normal, cache, or environment variable to a given value
set( CMAKE_CXX_STANDARD 14 )
set( CMAKE_CXX_EXTENSIONS ON )
set( CXX_STANDARD_REQUIRED ON)

set( CLI_CLIENT_EXECUTABLE_NAME cleos )
set( GUI_CLIENT_EX
普元EOS学习笔记-EOS的ide开发工具的介绍 普元EOS开发包括低开和高开。EOS低开,直接在浏览器操作即可,不需要编码。EOS高开,需要使用EOS的ide工具,进行编码开发。EOS的ide工具是普元在Eclipse基础上进行的扩展,添加了若干插件,专门用于EOS开发。本文章将介绍如何获取EOS的ide工具。本文章将以EOS 8.3.1来讲解。 阅读详情

相关推荐

CentOS 7下快速安装clang-format的3种方法(附常见问题解决)

本文详细介绍了在CentOS 7系统下快速安装clang-format的三种高效方法,包括通过SCL仓库安装、源码编译安装和使用预编译二进制。同时提供了常见问题的解决方案和高级配置技巧,帮助开发者提升代码格式化效率,确保团队协作中的代码风格统一。

weixin_28737073的博客 217

Primeton BPS 6.6开发教程(EOS 开发模式).pdf

普元开发的pdf教程讲述eos开发的基本开发,包括页面流,逻辑流等等

超详细流式细胞术全流程解析:从样本制备到结果分析全攻略

流式细胞术(Flow Cytometry)是现代生物学和医学研究中不可或缺的高通量分析技术,可实现对细胞表型、功能状态、细胞周期等多维度参数的快速检测。本文将从实验全流程出发,详解样本制备、上机操作、参数设置及结果处理的核心要点,帮助科研人员精准掌握流式实验关键技术。

good_rrrrr的博客 3868

解决Office 365 SMTP问题:C#邮件发送详解

本文介绍了如何在C#中使用Office 365 SMTP服务发送邮件。重点讲解了正确配置SMTP客户端的关键参数:必须使用587端口并启用TLS加密(EnableSsl=true),同时通过NetworkCredential进行身份验证。虽然SmtpClient已不推荐用于新项目,但本文提供的代码示例仍适用于临时项目或系统维护,并建议未来可考虑使用MailKit等现代邮件库。文章还包含了错误处理机制,确保程序健壮性。

2501_90323865的博客 141

Python 爬虫实战:分析 AJAX 请求抓取搜狐新闻数据

在Web 2.0时代,大量网站采用AJAX技术实现动态内容加载。传统基于静态HTML解析的爬虫技术(如BeautifulSoup)已无法应对这类场景。本文将以搜狐新闻为实战目标,详解如何通过分析AJAX请求接口实现动态新闻数据的精准抓取。

yansideyucsdn的博客 1750

1分钟吃透一篇文献,借助AI辅助各部分精读,效率提升10倍(附AI提示词)

你现在是一名【研究领域】的资深博士,非常擅长阅读与分析长篇论文,那么接下来我会给你上传一篇论文,请你按照我的要求辅助我阅读。

qq_64378896的博客 641

ROS机器人未知环境自主探索功能包explore_lite最全源码详细解析(二)

本系列文章主要针对ROS机器人常使用的未知环境自主探索功能包explore_lite展开全源码的详细解析,并进行概括总结。 本系列文章共包含六篇文章,前五篇文章主要介绍explore_lite功能包中 explore.cpp、costmap_tools.h、frontier_search.cpp、costmap_client.cpp等源码实现文件中全部函数的详细介绍,第六篇文章进行概括总结,包含自主探索功能包explore_lite的简介,实现未知环境自主探索功能的原理及流程总结,效果演示,使用功能包exp

慕羽★的博客 1648

Linux系列:SecurtCRT中的密码如何找回

【代码】Linux系列:SecurtCRT中的密码如何找回。

NIO4444 1086

从理论到实践:AI设备维护系统的架构实现

第一部分:理论基石——从设备维护的演进讲起,理解AI如何重塑维护模式;第二部分:架构设计——详解六层高可用系统架构,明确各层职责与技术选型;第三部分:核心技术——拆解数据处理、特征工程、模型训练、部署等关键环节的实现细节;第四部分:实践落地——8步流程带你从需求到上线,附代码示例与工具链;第五部分:案例研究——风电齿轮箱预测性维护系统的真实案例,从问题到方案再到效果;第六部分:挑战与展望——探讨当前技术瓶颈与未来趋势(数字孪生、联邦学习等)。准备好了吗?

大数据洞察的博客 1251

【零基础学习CAPL】——弹窗信息提示

不用手动制作Panel窗口,直接使用CAPL脚本实现弹窗提示。//没有wait超时,等待测试人员确认//有wait超时,对话框在超时后自动终止//有wait超时,可以显示一个资源,即对话框可以显示额外的信息。/*参数说明text:显示在弹窗中的内容,长度限制在4096字符timeout:弹窗自动结束的时间,单位:ms。若为0,则无超时控制heading:对话框文本上方的标题。字符串最大长度限制在256个字符。resource:URL或文件路径。字符串的最大长度是有限的(512个字符)。

LOVE135149的博客 264

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

深度学习工具包 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以太坊开发中节点和网络选择
下一篇: 以太坊java库EthereumJ简介
落叶无声9
博客等级 码龄12年 443粉丝 343原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值