NetBlog主题

json是什么,json如何使用
C#基础

json是什么,json如何使用

3236

2019-06-13 更新:添加Json序列化与反序列化方法JSON(JavaScript Object Notation, JS 对象简谱) 是一种轻量级的数据交换格式。它基于 ECMAScript (欧洲计算机协会制定的js规范)的一个子集,采用完全独立于编程语言的文本格式来存储和表示数据。简洁和清晰的层次结构使得 JSON …

Vue3 Pinia的作用和使用
Web前端

Vue3 Pinia的作用和使用

230

Pinia作用类似于C#的一个类,里面可以放字段属性,方法使用步骤1、安装依赖 npm i pinia2、创建/store/UserInfo.tsimport { defineStore } from piniaexport const useUserInfoStore = defineStore(UserInfo, { state: () = { return { //字段属性 age: …

Vue3 默认插槽的使用
Web前端

Vue3 默认插槽的使用

185

组件App.vuetemplate childd title="组件标题" !-- 组件标签里面的html内容显示到默认插槽 -- p性名:luoFenMing/p p性别:男/p p年龄:18/p /childd/templatescript setup lang="ts"import childd from @/components/Child.v…

Vue3 具名插槽的使用
Web前端

Vue3 具名插槽的使用

199

组件App.vuetemplate childd template v-slot:s2 !-- 显示到插槽名为s2里面 -- p性名:luoFenMing/p p性别:男/p p年龄:18/p /template template #s1 !-- 显示到插槽名为s1里面 v-slot:也可以用【#】代…

Vue3  路由的基本使用(router)
Web前端

Vue3 路由的基本使用(router)

125

路由:简单的来说就是在浏览器输入Url地址回车之后,会显示该Url页面的内容,效果如下App.vue组件代码(程序入口的组件)template div class="navigate" RouterLink to="/Home" active-class="active"首页/RouterLink RouterLink to="/about" active-class="a…

Android 内容使用浏览器WebView
Android基础

Android 内容使用浏览器WebView

1566

activity_web_view.xml文件内容?xml version="1.0" encoding="utf-8"?LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"WebViewandroid:id="@+id/wv_1"android:la…

C# lucene、lucene.NET中文使用文档
算法/数据处理

C# lucene、lucene.NET中文使用文档

2068

1 lucene简介1.1 什么是luceneLucene是一个全文搜索框架,而不是应用产品。因此它并不像www.baidu.com 或者google Desktop那么拿来就能用,它只是提供了一种工具让你能实现这些产品。1.2 lucene能做什么要 回答这个问题,先要了解lucene的本质。实际上lucene的功能很单一,…

解决 .net Core 3.1中使用GB2312编码异常
.Net Core

解决 .net Core 3.1中使用GB2312编码异常

6556

在.net core使用GB2312时抛出以下异常 System.ArgumentException:“'gb2312' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. 解决方法 在NuGet 添加“System.Text.Enco…

C#使用MQTT服务端与客户端应用实例
算法/数据处理

C#使用MQTT服务端与客户端应用实例

2529

MQTT用的就是TCP/IP协议 ,Socket通讯,MQTT定义了一套自己的数据传输格式。 在这里我们引用的是MQTTnet.dll,它将数据的传输格式、数据监听和数据转发封装了,我们只要调用就可以。开源库地址:https://github.com/chkr1011/MQTTnet对应文档:https://github.com/chkr1011/MQT…