首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >什么是物联网?其发展前景如何?

什么是物联网?其发展前景如何?

提问于 2018-04-10 20:09:16
回答 9关注 0查看 1K

最近大热的物联网(IoT)除了字面意思讲“物”连接网络,还有什么别的可以介绍吗?它的发展前景会怎样,会和智能手机一样,智能家居也是家家必备吗?

回答 2

Dust

发布于 2018-03-21 05:22:56

嗯,我有个半个答案。

是的,这涉及到一个第三的聚会,但你不必自己写:你检查了最后一个分机吗?

它包括几个数学函数,其中包括sqrt()。

萌萌呆

发布于 2018-03-21 06:10:30

警告:这个答案取决于编码语言。在我的情况下C#...

用户定义的SQLite函数对我来说很难实现。最后,经过很长一段时间的搜索,我能够在我的C#代码中实现它。主要功能如下:

代码语言:txt
AI代码解释
复制
[SQLiteFunction(Arguments = 1, FuncType = FunctionType.Scalar, Name = "Sqrt")]
class Sqrt : SQLiteFunction
{
    public override object Invoke(object[] args)
    {
        return Math.Sqrt(Double.Parse(args[0].ToString()));
    }
}

登记:

代码语言:txt
AI代码解释
复制
SQLiteFunction.RegisterFunction(typeof(Sqrt));

并在SELECT中使用:

代码语言:txt
AI代码解释
复制
SQLiteCommand com = new SQLiteCommand("select sqrt(10.42)", connection);

或者,如果只想查看代码(或者通过我的代码的所有部分),我将粘贴在SQLite数据库中计算平方根的完整工作示例代码下面,因为很难找到这方面的任何工作代码。要创建和运行此示例,请执行以下6个步骤:

  1. 创建新项目(我的名字是sqrt)
  2. 包括对项目的SQLite引用:解决方案资源管理器->引用(右击:添加引用)->程序集-扩展-System.Data.SQLite(检查)->OK
  3. 开着App.config并替换为这个(如果没有这个步骤,可能会得到混合模式装配错误):<?xml version="1.0" encoding="utf-8" ?><configuration><startup useLegacyV2RuntimeActivationPolicy="true"><supportedRuntime version="v4.0"/></startup></configuration>
  4. 替换你的Form1.Designer.cs使用此代码: <?xml version="1.0" encoding="utf-8" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> </startup> </configuration>
  5. namespace Sqrt { partial class Form1 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.txb_Input = new System.Windows.Forms.TextBox(); this.txb_Output = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.btn_Calcualte = new System.Windows.Forms.Button(); this.SuspendLayout(); // // txb_Input // this.txb_Input.Location = new System.Drawing.Point(131, 12); this.txb_Input.Name = "txb_Input"; this.txb_Input.Size = new System.Drawing.Size(201, 20); this.txb_Input.TabIndex = 0; // // txb_Output // this.txb_Output.BackColor = System.Drawing.Color.WhiteSmoke; this.txb_Output.Location = new System.Drawing.Point(131, 38); this.txb_Output.Name = "txb_Output"; this.txb_Output.ReadOnly = true; this.txb_Output.Size = new System.Drawing.Size(201, 20); this.txb_Output.TabIndex = 0; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(12, 15); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(31, 13); this.label1.TabIndex = 1; this.label1.Text = "Input"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(12, 41); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(39, 13); this.label2.TabIndex = 1; this.label2.Text = "Output"; // // btn_Calcualte // this.btn_Calcualte.Location = new System.Drawing.Point(257, 64); this.btn_Calcualte.Name = "btn_Calcualte"; this.btn_Calcualte.Size = new System.Drawing.Size(75, 23); this.btn_Calcualte.TabIndex = 2; this.btn_Calcualte.Text = "Calculate"; this.btn_Calcualte.UseVisualStyleBackColor = true; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(344, 98); this.Controls.Add(this.btn_Calcualte); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Controls.Add(this.txb_Output); this.Controls.Add(this.txb_Input); this.Name = "Form1"; this.Text = "Root square example"; this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.TextBox txb_Input; private System.Windows.Forms.TextBox txb_Output; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Button btn_Calcualte; } }
  6. Open Form1.cs (code) and replace code with this: using System; using System.Data.SQLite; using System.Windows.Forms; namespace Sqrt { // definition of custom sqlite function [SQLiteFunction(Arguments = 1, FuncType = FunctionType.Scalar, Name = "Sqrt")] class Sqrt : SQLiteFunction { public override object Invoke(object[] args) { return Math.Sqrt(Double.Parse(args[0].ToString())); // return result of math sqrt function } } public partial class Form1 : Form { public Form1() { InitializeComponent(); this.btn_Calcualte.Click += new System.EventHandler(this.btn_Calcualte_Click); } private void btn_Calcualte_Click(object sender, EventArgs e) { if (txb_Input.Text.Length == 0) return; try { SQLiteConnection.CreateFile(AppDomain.CurrentDomain.BaseDirectory + "test.s3db"); } catch { } SQLiteConnection con = new SQLiteConnection("Data Source=test.s3db"); SQLiteFunction.RegisterFunction(typeof(Sqrt)); // register custom function con.Open(); SQLiteCommand com = new SQLiteCommand("select sqrt(" + txb_Input.Text.Replace(',', '.') + ")", con); // select result string res = com.ExecuteScalar().ToString(); txb_Output.Text = res; } } }
和开发者交流更多问题细节吧,去 写回答
相关文章
ERC-20标准规范
ERC-20为以太坊智能合约提供了一套编写规范,而IERC-20则规定了一个Token需要实现的基本接口,本篇文章将对此进行解读。
Al1ex
2021/03/23
2.5K0
ERC-20标准规范
safeSendLp逻辑设计安全分析
上周五一位好朋友在做合约审计时遇到一个有趣的函数safeSendLp,之所以说该函数有趣是因为感觉该函数存在问题,却又觉得该函数业务逻辑正常,遂对其进行简单调试分析~
Al1ex
2021/07/21
7550
safeSendLp逻辑设计安全分析
BSC智能链挖矿dapp系统开发智能合约技术指南
币安智能链(Binance Smart Chain,简称 BSC )是一条以太坊虚拟机兼容,与币安链并行的区块链,是加密资产行业顶尖项目的测试和前沿探索。
开发v_hkkf5566
2022/10/25
1.4K0
公链启动过程
以太坊官方提供了Go、C++、Python各个版本的实现,具体可以在官方GitHub(https://github.com/ethereum)中进行查找:
Al1ex
2021/07/21
1K0
公链启动过程
DAPP丨LP流动性挖矿BSC币安链分红系统开发技术详细及分析源码
function totalSupply() external view returns (uint256);
I357O98O7I8
2022/08/04
7650
DAPP借贷理财挖矿系统开发逻辑分析(源代码)
智能合约真的智能吗?它让区块链网络上执行的交易效率更高,同时,由于它是无法修改的,也由此要谨慎查看。
开发v_hkkf5566
2023/03/06
5180
ERC-777标准规范
在经典的ERC-20场景中,如果用户想要授权给第三方账户或者智能合约进行转账操作,那么需要通过两个事务来完成整个转账的操作,在这里需要注意的是在授权是需要指定对应的amount数量,那么当每次进行授权转账时都需要进行一次查询或者让A用户再次授权给B用户:
Al1ex
2021/07/21
1.2K0
比原链Bytom错误码一览
0XX API错误 编号 内容 注释 BTM000 Bytom API Error 非比原标准错误 BTM001 Request timed out API请求超时 BTM002 Invalid request body 非法的API请求体 1XX为网络错误 编号 内容 注释 BTM103 A peer core is operating on a different blockchain network 区块链网络类型不匹配 2xx是签名相关的错误 编号 内容 注释 BTM200 Quorum mus
比原链Bytom
2018/12/07
9480
比原链Bytom错误码一览
BTM103", "A peer core is operating on a different blockchain network"
比原链Bytom
2018/11/08
8140
比原链Bytom错误码一览
ERC-777标准规范
在经典的ERC-20场景中,如果用户想要授权给第三方账户或者智能合约进行转账操作,那么需要通过两个事务来完成整个转账的操作,在这里需要注意的是在授权是需要指定对应的amount数量,那么当每次进行授权转账时都需要进行一次查询或者让A用户再次授权给B用户:
Al1ex
2021/07/16
1.7K0
ERC-777标准规范
Leetcode 134 Gas Station
There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). You begin the journey with an empt
triplebee
2018/01/12
5970
【知识】无GAS以太坊交易实现原理及源码
每个人都在讨论无gas以太坊交易,因为没有人喜欢支付gas费用。但是以太坊网络能够精准地运转恰恰是因为交易需要手续费。那么如何实现无gas交易呢?让我们一起学习无gas以太坊交易的魔法!
辉哥
2021/11/24
1.9K0
【知识】无GAS以太坊交易实现原理及源码
通过链下签名授权实现更少 Gas 的 ERC20代币
译文出自:登链翻译计划[1] 译者:Tiny熊[2] 解锁消耗到了大量的 gas 每个人都在谈论 “无gas” 的以太坊交易,因为没有人喜欢支付gas费用。但是以太坊网络的运行正是因为交易是付费的。那
Tiny熊
2020/09/29
3.5K0
通过链下签名授权实现更少 Gas 的 ERC20代币
LeetCode 0134 - Gas Station
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].
Reck Zhang
2021/08/11
3280
以太坊交互工具
以太坊提供了Geth客户端用于管理API,我们可以在终端输入geth help查看其具体使用方法:
Al1ex
2021/07/21
2K0
以太坊交互工具
以太坊环境搭建
以太坊作为一个开源的区块链平台,已经在区块链领域中占有重要地位,对于想要了解和使用以太坊的人来说搭建一个以太坊开发环境是必不可少的步骤,本文将介绍如何搭建以太坊开发环境帮助读者更好地理解以太坊的工作原理和开发流程
Al1ex
2023/08/10
5990
以太坊环境搭建
EVM Gas 分析
Gas 就像是机车行驶过程中需要燃烧燃料一样,对于区块链信息的记录至关重要,它是指在网络上执行特定操作所需的计算工作量。
Footprint Analytics
2023/02/02
8430
EVM Gas 分析
“以太坊智能合约设计缺陷问题”影响分析报告
在审计各种智能合约之后,我发现了一类很有趣的问题,这类问题出现的原因不只是由于开发者的疏忽,也同样是因为智能合约本身的一些设计缺陷,在开发者不了解这些问题的基础上,就容易出现问题。
LoRexxar
2023/02/21
4050
“以太坊智能合约设计缺陷问题”影响分析报告
blockwell.ai KYC Casper Token “牛皮癣广告” 事件分析
2018年9月7日早上1点左右,许多以太坊钱包账户都收到了一种名为blockwell.ai KYC Casper Token代币转进/出账消息:
Seebug漏洞平台
2018/10/23
5710
blockwell.ai KYC Casper Token “牛皮癣广告” 事件分析
关于eth gas的思考
理解Gas需要的几个概念: 旷工费:除了转账金额需要额外支付给以太坊网络旷工的费用 gas cost交易旷工费用 ( 也是也是以太坊的交易费用 ) =gas used数量 * gas price ( gas 单价,以太币计价) Gas:以太坊每一步操作都需要消耗Gas,执行总量就是Gas Gas Price:每一步操作的单价,一般用GWei作为单位,乘以Gas就是需要支付的矿工费。Gas Price是运行一个特别的交易或程序(被称作合约)所需的gas。 一个区块的gas费用可以用来暗示计算工作量,交易量和
rectinajh
2018/05/17
2K0

相似问题

CentOS搭建LNMP环境?

0512

配置80端口有问题?

4707

搭建完LNMP环境,验证Hello World的php页面,后台没有执行php程序?

41.2K

LNMP环境下nginx配置的多虚拟主机问题?

2455

ngnix代理配置,同样的配置在81端口有效,80端口无效!怎么破?

2545
相关问答用户
中建数科 | 技术总监架构部总经理擅长3个领域
公司公司公司公司公司公司 | 职务职务职务职务职务职务擅长3个领域
擅长5个领域
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档