我有一个 sqlite 数据库,我想在每次归档时添加 84 秒。时间格式如下:
年-月-日 时:分:秒:zzz
2017-12-15 11:50:12.132
我尝试修改时间
UPDATE sensordata
SET time=DATETIME(time, '+84.000 seconds')
Run Code Online (Sandbox Code Playgroud)
这正确地增加了 84 秒,但删除了毫秒:
2017-12-15 11:51:36
如何在添加秒数的同时仍然保留毫秒数?
因此,我正在努力解析以下JSON字符串。即使在StackOverflow上研究了许多问题之后,也是如此。
杰森
[
{
"text": {
"0": "Element 1"
},
"cascade": [],
"val": "1"
},
{
"text": {
"0": "Element 2"
},
"cascade": [],
"val": "2"
},
{
"text": {
"0": "Element 3"
},
"cascade": [],
"val": "3"
},
{
"text": {
"0": "Unknown"
},
"cascade": [],
"val": "0"
}
]
Run Code Online (Sandbox Code Playgroud)
我为此创建的类如下所示:
Options.cs
using System.Collections.Generic;
namespace App.Models
{
public class Options
{
public ICollection<IDictionary<string, string>> text { get; set; }
public List<string> cascade { get; set; }
public string val …Run Code Online (Sandbox Code Playgroud) 我尝试使用 QtNetwork 库并在 .pro 文件中为其添加了所有依赖项。但是当我编译我的代码时,Qt Creator 无法构建项目并声称
C1083:包括“QTcpSocket”:没有那个文件或目录 - telnet.h:4
我认为将网络添加到 .pro 文件就足够了?
网络监视器.pro
#-------------------------------------------------
#
# Project created by QtCreator 2017-07-24T13:18:19
#
#-------------------------------------------------
QT += core gui network charts
# greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = networkmonitor
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# …Run Code Online (Sandbox Code Playgroud)