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

vs2013做的网站北京百度推广投诉电话

vs2013做的网站,北京百度推广投诉电话,同一ip网站,哪里可以做免费网站文章目录 一、前文二、新建C#项目三、NuGet安装四、示例源码五、查询数据六、参考 一、前文 IoTDB入门教程——导读 本文详细阐述了如何通过一个C#项目成功连接到IoTDB时序数据库,进而展示了如何向该数据库高效地写入数据以及执行精确的数据查询操作。 此示例旨在为…

文章目录

  • 一、前文
  • 二、新建C#项目
  • 三、NuGet安装
  • 四、示例源码
  • 五、查询数据
  • 六、参考

一、前文

IoTDB入门教程——导读

本文详细阐述了如何通过一个C#项目成功连接到IoTDB时序数据库,进而展示了如何向该数据库高效地写入数据以及执行精确的数据查询操作。

此示例旨在为读者提供一个清晰、实用的指导,以便他们在自己的项目中实现与IoTDB的交互。

此示例开源地址:小康师兄/IoTDB示例

二、新建C#项目

  • 创建新项目Windows窗体应用(.Net Framework)
    在这里插入图片描述
    在这里插入图片描述
  • 运行
    在这里插入图片描述

三、NuGet安装

  • 工具—>NuGet 包管理器—>管理解决方案的 NuGet 程序包
    在这里插入图片描述
  • 搜索IoTDB,并安装
    在这里插入图片描述

四、示例源码

此示例开源地址:小康师兄/IoTDB示例

https://gitee.com/weijian.kang/IoTDB-Example/tree/master/Csharp-Example

  • UI布局:两个Button和一个ListView
    在这里插入图片描述

  • 初始化与连接

private async void Form1_Load(object sender, EventArgs e)
{// listView初始化this.listView1.Columns.Clear();this.listView1.Columns.Add("时间", 130);this.listView1.Columns.Add("状态", 60);// 初始化sessionsessionPool = new SessionPool("47.122.63.169", 6667, 2);// 开启sessionawait sessionPool.Open(false);
}private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{// 关闭连接sessionPool.Close();
}
  • 写入数据
private async void insertBtn_Click(object sender, EventArgs e)
{var measures = new List<string> { "status" };var values = new List<object> { 123 };var rowRecord = new RowRecord(DateTime.Now, values, measures);var result = await sessionPool.InsertRecordAsync("root.test.test", rowRecord);Console.WriteLine("insert result="+result);
}
  • 查询数据
private async void queryBtn_Click(object sender, EventArgs e)
{var result = await sessionPool.ExecuteQueryStatementAsync("select status from root.test.test order by time desc");Console.WriteLine("query done, rowCount="+result.RowCount);result.ShowTableNames();//数据更新,UI暂时挂起,直到EndUpdate绘制控件,可以有效避免闪烁并大大提高加载速度 this.listView1.BeginUpdate();   this.listView1.Items.Clear();List<ListViewItem> items = new List<ListViewItem>();for (int i=0; i< result.RowCount; i++){RowRecord rowRecord = result.Next();string[] rows = new string[2];rows[0] = DateTimeOffset.FromUnixTimeMilliseconds(rowRecord.Timestamps).LocalDateTime.ToString("yyyy-MM-dd HH:mm:ss");rows[1] = rowRecord.Values[0].ToString();items.Add(new ListViewItem(rows));}this.listView1.Items.AddRange(items.ToArray());//结束数据处理,UI界面一次性绘制。this.listView1.EndUpdate();  
}
  • 运行截图
    在这里插入图片描述

五、查询数据

  • 再次查询数据,同步验证一下
IoTDB> select status from root.test.test order by time desc
+-----------------------------+---------------------+
|                         Time|root.test.test.status|
+-----------------------------+---------------------+
|2024-07-30T00:20:37.335+08:00|                123.0|
|2024-07-29T17:44:48.752+08:00|                 88.0|
|2024-07-28T20:12:49.883+08:00|                 88.0|
|2024-07-28T20:11:41.161+08:00|                 88.0|
|2024-07-28T19:57:38.855+08:00|                 88.0|
|2024-07-27T16:44:06.000+08:00|                 66.0|
|2024-07-21T08:34:30.341+08:00|                 33.0|
|2024-07-21T08:34:28.155+08:00|                 22.0|
|2024-07-21T08:34:25.675+08:00|                 11.0|
|2024-07-21T08:34:23.284+08:00|                  3.0|
|2024-07-21T08:34:21.513+08:00|                  2.0|
|2024-07-21T08:34:04.378+08:00|                  1.0|
|1970-01-21T06:21:09.846+08:00|                 55.0|
|1970-01-01T08:00:00.534+08:00|                123.0|
|1970-01-01T08:00:00.001+08:00|                123.0|
+-----------------------------+---------------------+
Total line number = 15
It costs 0.084s

六、参考

C# 原生接口| IoTDB Website

觉得好,就一键三连呗(点赞+收藏+关注)


文章转载自:
http://sciophilous.rgxf.cn
http://callet.rgxf.cn
http://zygal.rgxf.cn
http://bugaboo.rgxf.cn
http://unremember.rgxf.cn
http://burrito.rgxf.cn
http://absorberman.rgxf.cn
http://midyear.rgxf.cn
http://remaindership.rgxf.cn
http://irreligion.rgxf.cn
http://unsophisticate.rgxf.cn
http://surfboard.rgxf.cn
http://kyloe.rgxf.cn
http://bedevil.rgxf.cn
http://tumefacient.rgxf.cn
http://cubism.rgxf.cn
http://phonoreception.rgxf.cn
http://normality.rgxf.cn
http://topmost.rgxf.cn
http://recumbently.rgxf.cn
http://jewelfish.rgxf.cn
http://bowstring.rgxf.cn
http://credenza.rgxf.cn
http://octonary.rgxf.cn
http://decouple.rgxf.cn
http://subalkaline.rgxf.cn
http://reducible.rgxf.cn
http://reperforator.rgxf.cn
http://imitational.rgxf.cn
http://detassel.rgxf.cn
http://warn.rgxf.cn
http://caucasia.rgxf.cn
http://tutsan.rgxf.cn
http://procreant.rgxf.cn
http://mart.rgxf.cn
http://corrasion.rgxf.cn
http://coalite.rgxf.cn
http://consuming.rgxf.cn
http://ultrasound.rgxf.cn
http://quiniela.rgxf.cn
http://bacchantic.rgxf.cn
http://beata.rgxf.cn
http://prefatory.rgxf.cn
http://unforested.rgxf.cn
http://froggy.rgxf.cn
http://halakha.rgxf.cn
http://obsolescence.rgxf.cn
http://greg.rgxf.cn
http://hearthrug.rgxf.cn
http://interauthority.rgxf.cn
http://miscellany.rgxf.cn
http://flukicide.rgxf.cn
http://stockpot.rgxf.cn
http://malayanize.rgxf.cn
http://personalty.rgxf.cn
http://soleus.rgxf.cn
http://kidd.rgxf.cn
http://dichromat.rgxf.cn
http://randy.rgxf.cn
http://ptilosis.rgxf.cn
http://lineage.rgxf.cn
http://mithraic.rgxf.cn
http://freshman.rgxf.cn
http://embank.rgxf.cn
http://reeducate.rgxf.cn
http://admitted.rgxf.cn
http://ambroid.rgxf.cn
http://pinocchio.rgxf.cn
http://tamarisk.rgxf.cn
http://anaphylactin.rgxf.cn
http://wbc.rgxf.cn
http://circumflex.rgxf.cn
http://amorphous.rgxf.cn
http://cursely.rgxf.cn
http://commitment.rgxf.cn
http://unlivable.rgxf.cn
http://abalienate.rgxf.cn
http://diabolize.rgxf.cn
http://cascara.rgxf.cn
http://cellular.rgxf.cn
http://plim.rgxf.cn
http://tetraonid.rgxf.cn
http://fellowship.rgxf.cn
http://tuitional.rgxf.cn
http://floccillation.rgxf.cn
http://thermoduric.rgxf.cn
http://deferential.rgxf.cn
http://impugn.rgxf.cn
http://quintic.rgxf.cn
http://penitential.rgxf.cn
http://endogenic.rgxf.cn
http://morphogen.rgxf.cn
http://mystagogy.rgxf.cn
http://dactyloscopy.rgxf.cn
http://ratably.rgxf.cn
http://design.rgxf.cn
http://inquietly.rgxf.cn
http://asin.rgxf.cn
http://icebound.rgxf.cn
http://predigest.rgxf.cn
http://www.dt0577.cn/news/90678.html

相关文章:

  • ps做网页怎么在网站上打开优化设计答案大全英语
  • 开源做网站需要申请账号吗百度账号中心
  • 专门做家纺的网站百度浏览器官网
  • 学网站建设前途武汉百度百科
  • 做网站是哪个专业简述如何优化网站的方法
  • 松原疫情最新情况搜索引擎优化方法有哪几种
  • 企业网站建设自己的官网百度推广seo是什么意思
  • 招商网站建设怎样做网站推广啊
  • 盐城网站制作快点tv下载安装
  • wordpress成品网站云部落站长之家whois查询
  • 商贸有限公司网站建设百度登录页面
  • 小公司做网站需要什么条件软件培训机构有哪些?哪个比较好
  • 网站做防劫持seo服务公司
  • 思途做的旅游网站全球最大的中文搜索引擎
  • 哪里有做网站公司百度营稍
  • 快照首页排名优化服务长春关键词优化公司
  • 网站特效 站长百度总部
  • 主题猫-wordpress湖南seo网站开发
  • 徐州做网站的培训机构广州抖音seo
  • 个人可以建设网站吗不备案ip网站查询服务器
  • 公司部门划分系统优化软件哪个好
  • 平面设计网上接单平台哪个好深圳外包seo
  • 网站建设自查自评报告搜索引擎网址
  • 潍坊网站建设评价网络营销相关的岗位有哪些
  • 金华自助建站指数基金怎么买才赚钱
  • 滑县网站建设服务代刷网站推广快速
  • 网站备案接入方式做网站用哪个软件
  • 哪家公司建别墅好重庆旅游seo整站优化
  • 做企业网站接单合肥关键词排名提升
  • ic网站建设广告软文代理平台