Shell中dialog的小结

Shell图形化工具dialog使用简述 --checklist ] 允许你显示一个选项列表,每个选项都可以被单独的选择 (复选框)[ --radiolist ] 提供一个菜单项目组,只有一个项目,可以选择 (单选框 )[ --gauge ] 显示一个表,呈现出完成的百分比,就是显示出进度。[ --pause ] 显示一个表格用来显示一个指定的暂停期的状态。[ --timebox ] 提供一个窗口,选择小时,分钟,秒。[ --fselect ] 提供一个路径,让你选择浏览的文件。 阅读详情
liunx 下的dialog工具是一个可以和shell脚本配合使用的文本届面下的创建对话框的工具。
这个对话框使用命令行参数,以确定产生哪些类型的窗口部件。
一个部件是对话框包的窗口元素类型的术语。
每个对话框部件提供的输出有两种形式
一种:使用STDERR
另一种:使用退出状态码,“OK”为0,”Cancle”和“NO”为1.
 
dialog常见的通用选项有:
- -backtitle  backtitle 指定backtitle字符串显示在背景下,在屏幕的顶部。
- -begin  y  x       指定的位置在屏幕上的上一个对话框的左上角
- -colors            解读嵌入式“\ Z”的对话框中的文本序列由下面的字符 0-7, b  B, u, U, ect,恢复正常的设置使用“\Zn”
- -defaultno         使的是默认值 yes/no,使用no
- -default-item string设置在一份清单,表格或菜单中的默认项目。通常在框中的第一项是默认
- -insecure        输入部件的密码时,明文显示不安全,使用星号来代表每个字符,这样安全点
- -nocancel       设置在输入框,菜单,和复选框中,禁止选“cancel”
- -nook          设置在输入框,菜单,和复选框中,禁止选“ok”
- -no-shadow      禁止阴影出现在每个对话框的底部
- -ok-label  string 覆盖使用“OK”按钮的标签
- -timeout  secs   超时(返回的错误代码),如果用户在指定的时间内没有给出相应
- -title  title      指定将在对话框的上方显示的标题字符串
--clear           用来完成清屏操作
 
 
常见的对话框控件选项有:
类型    用于创建类型的选项       含   义
--calendar    提供了一个日历,让你可以选择日期
--checklist     允许你显示一个选项列表,每个选项都可以被单独的选择  (复选框)
--from       允许您建立一个带标签的文本字段,并要求填写
--fselect      提供一个路径,让你选择浏览的文件
--gauge    显示一个表,呈现出完成的百分比,就是显示出进度。
--infobox    显示消息后,(没有等待响应)对话框立刻返回,但不清除屏幕  (信息框)
--inputbox     让用户输入文本  (输入框  )
--inputmenu   提供一个可供用户编辑的菜单 (可编辑的菜单框)
--menu       显示一个列表供用户选择   (菜单框)
--msgbox    显示一条消息,并要求用户选择一个确定按钮 (消息框  )
--pause      显示一个表格用来显示一个指定的暂停期的状态
--passwordbox   显示一个输入框,它隐藏文本
--passwordfrom  显示一个来源于标签并且隐藏的文本字段
--radiolist      提供一个菜单项目组,只有一个项目,可以选择 (单选框)
--tailbox      在一个滚动窗口文件中使用tail命令来显示文本
--tailboxbg    跟tailbox类似,但是在background模式下操作
--textbox    在带有滚动条的文本框中显示文件的内容  (文本框)
--timebox   提供一个窗口,选择小时,分钟,秒
--yesno      提供一个带有yes和no按钮的简单信息框  (是/否框)
 
 
具体使用这些选项的时候,格式如下
 
 
dialog的使用格式:
dialog   --common-options   --boxtype  “text” Height  Width  --box-specific-option
--common-options  这个选项来设置dialog box的背景,颜色和标题等。
所有的对话框有至少三个参数,
“文本“:在标题或框内容。
“高度”:在对话框的高度。
“宽度”:在对话框的宽度。
 
dialog  - -print-max-size  
dialog  - -create-rc  file  
 
好了,什么也不多说了,先看一个简单的例子:(如果没有安装dialog要先安装一下)
#dialog  - -backtitle  “The  first  dialog  box ”  - -title  “hello”  - -yesno  “Is this  your  first dialog box?”  7 25
常见的通用选项有:
- -backtitle  backtitle 指定backtitle字符串显示在背景下,在屏幕的顶部。
- -begin  y  x      指定的位置在屏幕上的上一个对话框的左上角
- -colors            解读嵌入式“\ Z”的对话框中的文本序列由下面的字符 0-7, b  B, u, U, ect,恢复正常的设置使用“\Zn”
- -defaultno          使的是默认值 yes/no,使用no
- -default-item string设置在一份清单,表格或菜单中的默认项目。通常在框中的第一项是默认
- -insecure         输入部件的密码时,明文显示不安全,使用星号来代表每个字符,这样安全点
- -nocancel        设置在输入框,菜单,和复选框中,禁止选“cancel”
- -nook           设置在输入框,菜单,和复选框中,禁止选“ok”
- -no-shadow       禁止阴影出现在每个对话框的底部
- -ok-label  string 覆盖使用“OK”按钮的标签
- -timeout  secs    超时(返回的错误代码),如果用户在指定的时间内没有给出相应
- -title  title       指定将在对话框的上方显示的标题字符串
--clear           用来完成清屏操作
 
消息框:
dialog  - -msgbox  text   height  width
例子:
#dialog    - -title   Testing   - -msgbox  “ This   is  a test “ 10  20   


yesno框
格式:dialog –yesno  text  height  width
#dialog --title “Delete a file”  --no-shadow --yesno “Delete the file /tmp/test.txt?” 7 35


输入框:
格式:dialog --inputbox text height width
#dialog --title “Input your name”  --inputbox “Please input your name:” 10 30  2> /tmp/name.txt   (这里的2>是将错误信息输出重定向到了/tmp/name.txt文件中)
- -extra-button 添加按钮
- -extra-label   string 添加额外的标签

文本框:
格式:dialog --textbox file height width
例子:
#dialog   --title   “The fstab”  - -textbox /etc/fstab  17 40
- -exit-label  string 定义退出的标签串
#dialog  --title  “The fstab”  --exit-label QUIT –textbox  /etc/fstab  17 40
 
 
 
菜单框:
格式:dialog --menu text height width  menu-height tag1 item1 tag2 item2 …
例子:
#dialog --title “pick a choice” --menu “Choose one” 12 35 5 1 “Display the disk usage” 2 “Display the meminfo” 3 “Exit”
 
 
 
Fselect框
格式:dialog --fselect filepath height width dialog --fselect filepath height width
例子:
#dialog  –title  “Pick one file”  --fselect /root/  7  40
 
 
 
进度框架:
格式:dialog --gauge text height width  [<percent>]
例子:
编辑一个gauge.sh的脚本
内容如下:
#!/bin/bash
#vim  gauge.sh
Let  PERCENT=0
(
for  I in /etc/*
do
 if  [ $PERCENT  -gt 100 ];  then
     break
else
   cp  -r  $I  /tmp/test  2>  /dev/null
   echo  ‘XXX’
   echo   “Copy the  file $I …”
   echo   ‘XXX’
   echo  $PERCENT
 fi
 PERCENT=$[  $PERCENT+1 ]
 Sleep  1
done )  dialog   --title  “Copying….”  --gauge “Starting  to  copy  files…”  6  50  0
 
#bash  gauge.sh  (执行脚本的时候注意修改权限)
 
 
 
from框架
格式:dialog --form text height width formheight [ label y x item y x flen ilen ] ...
其中
flen表示field length,定义了:选定字段中显示的长度
ilen表示input-length,定义了:在外地输入的数据允许的长度
使用up/down(或ctrl/ N,ctrl/ P)在使用领域之间移动。使用tab键在窗口之间切换。
例子:
# dialog --title "Add a user" --form "Please input the infomation of new user:" 12 40 4  \
  "Username:" 1  1 "" 1  15  15  0  \
  "Full name:" 2  1 "" 2  15  15  0  \
  "Home Dir:" 3  1 "" 3  15  15  0  \
  "Shell:"    4   1 "" 4  15  15  0     
 
 
 
 
密码框:
格式:
dialog  --passwordbox text height width [init]
例子:
# dialog --title "Password"  --passwordbox "Please give a password for the new user:" 10 35
 
 
(我在框中输入了密码redhat)
我想您也发现了,这样我们的密码就暴露出来了,是不是很不安全,所以通常我们会加上一个安全选项
--insecure  将每个字符用*来显示出来
#dialog  --title  “Password”  --insecure  --passwordbox  “Please  give  a  password  for the  new  user:”  10  35
 
 
(这样就安全点)
在脚本使用dialog会让我们的脚本更智能化和更易于跟用户进行交互。所以使用dialog还是很有必要的!

Linux中shell对话框(dialog)编程 dialog 是一个在类 Unix 系统(如 Linux、BSD 等)的终端环境下使用的工具,它能创建各种交互式的对话框,以方便用户与脚本进行交互。这些对话框提供了一种直观且友好的方式,让用户无需手动输入复杂的命令或参数,就能完成各种操作。 阅读详情

相关推荐

❀dialog命令运用于linux❀

学习dialog命令在linux的运用:)

m0_62022097的博客 1872

shell之dialog详解

  Liunx下的dialog工具是一个可以和shell脚本配合使用的文本界面下的创建对话框的工具,每个对话框提供的输出有两种形式: 将所有输出到stderr输出,不显示到屏幕。 使用退出状态码,OK为0,NO为1,ESC为255。   通用选项如下(这些选项来设置dialog box的背景、颜色和标题等): --title <title>:指定将在对话框的上方显示的标题字符串。 --no-shadow:禁止阴影出现在每个对话框的底部。 --shadow:应该是出现阴影效果。 --inse

健身房 4552

7、巧用 Dialog 和 AWK 提升 Shell 脚本交互性与数据处理能力

本文详细介绍了如何使用 Dialog 和 AWK 提升 Shell 脚本的交互性与数据处理能力。通过具体示例展示了 Dialog 创建各种对话框与用户交互的方法,并深入讲解了 AWK 的文本处理功能。最后,结合 Dialog 和 AWK 的实际应用示例,展示了它们在脚本开发中的强大功能,并提供了总结与学习资源推荐。

silver的专栏 85

Shell编程中dialog的使用方法

 liunx 下的dialog 工具是一个可以和shell脚本配合使用的文本届面下的创建对话框的工具。这个对话框使用命令行参数,以确定产生哪些类型的窗口部件。一个部件是对话框包的窗口元素类型的术语。每个对话框部件提供的输出有两种形式一种:使用STDERR另一种:使用退出状态码,“OK”为0,”Cancle”和“NO”为1. dialog常见的通用选项有:- -b

小菜鸟的天地 9668

从零构建MAVLink通信:PX4飞控与QGC的协议握手全解析

本文详细解析了PX4飞控与QGC地面站通过MAVLink协议进行通信的全过程,重点介绍了航点传输协议的状态机设计、INT类型消息的优化优势以及异常处理与调试技巧。通过实战案例和性能优化建议,帮助开发者高效构建无人机通信系统,提升数据传输效率与稳定性。

weixin_29209805的博客 506

安装keil5(MDK)及导入pack包教程

首先说明的是我安装的Keil版本为Keil V5.29.0.0 1、安装软件 右键管理员权限运行安装包 设置安装路径以及pack的存放路径 随意输入First Name和E-mail 安装驱动 完成软件安装,然后可以先关闭弹出的Pack Install(一会再添加) 2、激活一下软件 打开桌面的Keil File → License Management(我之前注册过了) 右...

hrx-@@ 10万+

linux shell 图形界面之dialog小结

内容导述: 1、命令说明 2、命令概要 3、框体类型 4、通用选项 5、命令用法 6、命令示例 命令说明: liunx 下的dialog 工具是一个可以和shell脚本配合使用的文本界面下的创建对话框的工具。 每个对话框提供的输出有两种形式: 1. 将所有输出用...

weixin_34310369的博客 262

CodeBuddy 接入 MCP,一键生成网站!

2024 年 11 月,Anthropic 公司搞了个挺有意思的新玩意 - Model Context Protocol(模型上下文协议)简称为 MCP 协议。简单来说,它就是给 AI 和各类工具数据之间搭了个标准化的”桥梁”,让开发者不用再为对接问题头疼了。mcp.so如下图所示,这是 mcp.so 网站中的 MCP Server。使用百度/高德地图分析旅线计算时间接 Puppeteer 自动操作网页使用 Github/Gitlab 让大模型接管代码仓库。

悟空聊架构的专栏 1947

Linux shell 图形化窗口编辑之dialog

01. 创建文本菜单示例 创建菜单布局 clear echo echo -e "\t\t\tSys Admin Menu\n" echo -e "\t1. Display disk space" echo -e "\t2. Display logged on users" echo -e "\t3. Display memory usage" echo -e "\t0. Exit menu\n\n" echo -en "\t\tEnter option: " # -en可以去掉末尾的换行符,这样等待输入,

qq_42226855的博客 2243

stc8g1k08硬件iic读取aht20温湿度及0.91寸oled显示

使用stc8g1k08读取aht20温湿度及0.91寸oled显示。

qq_61688416的博客 2772

V-REP(Cooprliesim EDU)自学笔记 实现UR5机械臂末端按轨迹移动

V-REP(Cooprliesim EDU)自学笔记 实现UR5机械臂末端按轨迹移动

xu_white的博客 7583

【Linux-shell】探索Dialog 工具在 Shell 图形化编程中的高效范式重构

《Linux中的dialog工具使用指南》 摘要: dialog是一款在Linux终端中创建图形化界面的工具,无需X Window支持即可实现菜单、表单等交互功能。本文详细介绍了dialog的安装、基本语法和常用组件,包括选择类组件(如单选/复选列表)、文件操作组件(如文件选择器)、输入表单组件(如密码框)以及信息展示组件(如进度条)。同时解析了dialog的四大类命令选项:界面布局、按钮标签、输入输出和行为控制选项,并提供了颜色设置方法。通过丰富的代码示例,帮助用户在Shell脚本中快速构建交互式界面。适

共享IT之美,共创机器未来 1594

外设高级定时器互补输出带死区控制实验

外设高级定时器互补输出带死区控制实验

ff_juju的博客 1654

Linux shell dialog详解

最近使用dialog写图形自动化shell脚本,  功能很强大,功能不是非常多但是足够用。想写一篇linux下dialog的使用方法,虽然命令不多,但是写起来也需要下很大功夫,而且不一定写得更好,在网上发现一篇linux shell图形化脚本文件,于是转过来了. liunx 下的dialog 工具是一个可以和shell脚本配合使用的文本界面下的创建对话框的工具。 每个对话框提供的输出有两种

qq_21764267的博客 3019

高并发网络爬虫实践(欧赔、亚盘、大小指数数据爬取)

本文通过对一个实战化的高并发网络爬虫脚本进行深度模块化剖析,展示了如何构建一个兼具性能、健壮性和易用性的数据采集工具。核心设计思想总结模块化与单一职责: 每个函数都专注于解决一个特定问题,无论是网络请求、数据解析还是文件操作。并发与效率: 通过ThreadPoolExecutor实现了高效的并发抓取,极大缩短了总耗时。健壮性与容错: 强大的重试机制、细致的异常处理和线程安全的文件写入,保证了程序在复杂网络环境下的稳定运行。断点续传: 精心设计了进度记录与恢复机制,使得大规模抓取任务变得轻松可控。

猫敷雪 487

【推荐系统】推荐算法:冷启动-召回-粗排-精排-重排 解读

【推荐系统】推荐算法:冷启动-召回-粗排-精排-重排 解读

Danger的博客 3761

shell之dialog提示窗口

dialog 提示窗口 1.msgbox dialog--msgboxtext2010 2.yesno dialog--title"Pleaseanswer"--yesno"Isthisthingon?"1020 no 返回值为1,yes为0 3.inputbox dialog--inputbox...

aihongzang7880的博客 1236

WINCC7.3破解文件

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

SWT dialog Shell

Shell通过桌面获取。不要通过new Shell()创建。否则,生成的dialog在使用快捷键显示桌面后,TC隐藏后,dialog依旧存在桌面。

weixin_44942769的博客 262

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

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

dialog shell下的gui设计 代替繁杂libncurses编程【转载】

原文链接 前沿 以前想写bash下的类gui界面,就不得不用c一用libncurses库,一想都tm烦 利用dialog这个工具,您可以在不需要写"艰深"的ncurses的程序的状况下,使用ShellScript,完成很复杂的操作界面,大大减少产品开发时间。 先看个例子happy 下 dialog --title "hello" --bac...

weixin_30399055的博客 151

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

Linux dialog详解(图形化shell)

为什么80%的码农都做不了架构师?>>> ...

weixin_34026484的博客 955

linux shell做界面,linux shell图形界面dialog详解

dialog widgets的选项,及使用方法calendar 显示日历checklist ...复选框form 表单editbox dselect fselect 文件选框,即平时上传本地文件时的那个gauge []进度条,百分之多少的那个infobox 弹出一个文本信息,不需要等待回应inputbox []...

weixin_39747049的博客 926

shell dialog使用

#!/bin/bash  dialog --title "Second screen" --backtitle "Test Program" --clear --inputbox \  "Please input your username (default: hello) " 16 51 "hello" 2>/tmp/test.username  result=$?  echo

dp__mcu的专栏 579

oracle dialog运行,Shell编程中dialog的使用方法

liunx 下的dialog工具是一个可以和shell脚本配合使用的文本届面下的创建对话框的工具。这个对话框使用命令行参数,以确定产生哪些类型的窗口部件。一个部件是对话框包的窗口元素类型的术语。每个对话框部件提供的输出有两种形式一种:使用STDERR另一种:使用退出状态码,“OK”为0,”Cancle”和“NO”为1.dialog常见的通用选项有:- -backtitle backtitle指定...

weixin_35881820的博客 307

shell---dialog

参数详解: dialog --clear 整个萤幕会清除後离开 dialog --create-rc file dialog支援动态规划,这个功能会产生一个样本。 --title title 对话盒上的标题文字 --backtitle backtit...

chepabei0455的博客 206
上一篇: dialog及gdialog命令测试
下一篇: ubuntu优化
AstrayLinux
博客等级 码龄15年 55粉丝 38原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值