当前位置: 首页 > news >正文

从化做网站深圳宝安专业做网站公司

从化做网站,深圳宝安专业做网站公司,创世通网站建设,电影网站开发现状背景 在vscode 中 如果执行命令需要传递进来参数,那么直接通过命令行终端的方式不太方便。通过task 任务的方式来进行启动执行,降低反复输入参数等繁琐工作。 首先可以查看vscode 官方文档 task 启动 crtl shift p .vscode/task.json 示例 执行cp…

背景

  • 在vscode 中 如果执行命令需要传递进来参数,那么直接通过命令行终端的方式不太方便。
  • 通过task 任务的方式来进行启动执行,降低反复输入参数等繁琐工作。

首先可以查看vscode 官方文档

  • task 启动 crtl + shift + p

.vscode/task.json 示例

执行cpp 带参数二进制

{"version": "2.0.0","tasks": [{"label": "Run BIN","type": "shell",  // shell 类型的任务"command": "${command:cmake.launchTargetPath}", // CMake 生成的二进制文件路径"args": ["${workspaceFolder}/config.toml",  // 第一个参数"${workspaceFolder}/model.onnx"  // 第二个参数],"options": {"cwd": "${command:cmake.launchTargetDirectory}"},"group": {"kind": "build", // 此任务的组别"isDefault": true // 设为默认任务},"problemMatcher": [], // 没有特定的错误匹配器"presentation": {"echo": true, // 在输出面板中回显命令"reveal": "always", // 始终在面板中显示"focus": false, // 不聚焦到输出面板"panel": "new", // 在新面板中显示输出"close": false, // 任务完成后关闭输出面板"clear": false // 任务启动前清空输出面板}}]
}

在执行task时,手动输入传参

  • 硬编码方式虽然比较简单粗暴,但是,当使用git来管理的时候,会引入一些没有必要的改变,那么此时就需要将参数,不是使用硬编码,而是去通过启动任务时,动态加载进去。
  • 那就简单介绍几种输入方式
        {  // 简单理解就是输入文本框"type": "promptString","id": "outputPath","description": "Please input the output path:",},{ // 简单理解说就是选择框"type": "pickString","id": "quantize","description": "use quantize","options": [{"label": "True","value": "-q"},{"label": "False","value": ""}],"default": ""},
  • 详细示例如下
{"version": "2.0.0","inputs":[{"type": "promptString","id": "outputPath","description": "Please input the output path:",},{"type": "pickString","id": "quantize","description": "use quantize","options": [{"label": "True","value": "-q"},{"label": "False","value": ""}],"default": ""},{"type": "pickString","id": "task","description": "task type","options": ["weigh","arc"],"default": "arc"},{"type": "promptString","id": "config","description": "Please input using configs file",},{"type": "pickString","id": "test_data","description": "juse use test data","options": [{"label": "True","value": "-b"},{"label": "False","value": ""}],"default": ""},{"type": "pickString","id": "qat","description": "use keras quantization aware training","options": [{"label": "True","value": "--qat"},{"label": "False","value": ""}],"default": ""},],"tasks": [{"label": "torch_inf","type": "shell","command": "${command:python.interpreterPath}","args": ["${workspaceFolder}/inference_torch.py","-i","${workspaceFolder}/output/${input:task}/${input:outputPath}"],"presentation": {"echo": true,"reveal": "always","focus": false,"panel": "shared","showReuseMessage": true,"clear": true},"problemMatcher": []},{"label" : "train","type": "shell","command": "${command:python.interpreterPath}","args": ["${workspaceFolder}/test.py","-c","${workspaceFolder}/configs/${input:config}"],"presentation": {"echo": true,"reveal": "always","focus": false,"panel": "shared","showReuseMessage": true,"clear": true},"problemMatcher": []},{"label" : "exprot_tfl","type": "shell","command": "${command:python.interpreterPath}","args": ["${workspaceFolder}/export2.py","-i","${workspaceFolder}/output/${input:task}/${input:outputPath}","${input:quantize}"],"presentation": {"echo": true,"reveal": "always","focus": false,"panel": "shared","showReuseMessage": true,"clear": true},"problemMatcher": []}]
}
http://www.sczhlp.com/news/97906/

相关文章:

  • 如何提高网站排名seo长春网站建设方案报价
  • 网站建设的目的及功能上海免费建网站
  • 58同城成都网站建设wordpress太慢
  • 公司网站费怎么做分录企业网站设计注意事项
  • 网站模块建设中wordpress 分类 标题
  • 广州个性化网站建设中商外贸网站
  • 【光照】[光照模型]发展里程碑时间线
  • 算法设计作业-week1
  • git merge
  • 门户网站 商城系统静态网页制作技术
  • led外贸网站建设如何成为 个网站
  • 如何做网站系统建设开发网站
  • 在菲律宾做网站推广怎么样网站建设 英语词汇
  • 深圳市专注网站建设python网页制作项目
  • 做的网站打印全乱掉了甜品制作网站
  • 六安品牌网站建设电话wordpress 最新版
  • 上海注册公司在哪个网站wordpress仪表盘文件目录
  • 创客贴网站建设app开发软件排行
  • C语言学习
  • Ubuntu 的剪贴板
  • 关于淘宝店网站建设的可行性报告迅睿cms和帝国哪个好
  • 中国北京出啥大事了seo网站优化是什么
  • 企业网站建站的专业性原则是指长安seo排名优化培训
  • 建设工程施工合同示范文本2017专业的企业网站优化公司
  • 个人备案做门户网站南京电商网站建设公司排名
  • 怎么创建网站app设计师 个人网站
  • IDAPro--MCP详细配置教程
  • 汕头网站网站建设wordpress子菜单位置分离
  • 网站的二级栏目怎么做网站推广计划
  • vps网站如何设置缓存搭建一个网页