摘要: package main import "fmt" func main() { a :=[8]int{24,69,80,57,13,1,100} //算出a的长度 //n :=len(a) //0 1 2 3 //冒泡排序 /*for i:=0;i a[j+1]{ a[j],a[j+1] = a[j+1],a[j] } } ... 阅读全文
posted @ 2019-12-21 10:29 往事随风_go 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 1. 以太坊架构 2. 阅读全文
posted @ 2019-12-20 22:54 往事随风_go 阅读(369) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-12-20 22:47 往事随风_go 阅读(9) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "time" ) func main() { ch := make(chan int) quit := make(chan bool) go func() { for{ select { case num := <-ch: fmt.Println("num=",num) case <-time.After(3*time.Second): fm 阅读全文
posted @ 2019-12-20 22:31 往事随风_go 阅读(277) 评论(0) 推荐(0) 编辑
摘要: package main import ( "time" "fmt" ) func main() { timer := time.NewTimer(3*time.Second) ok := timer.Reset(1*time.Second) //把以前3秒重置1s fmt.Println("ok=",ok) <-timer.C fmt.Println("时间到") } /*func main() 阅读全文
posted @ 2019-12-20 22:30 往事随风_go 阅读(171) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "os" "net" "io" ) //发送文件内容 func SendFile(path string,conn net.Conn){ //以只读的方式打开文件 f,err := os.Open(path) if err != nil{ fmt.Prin... 阅读全文
posted @ 2019-12-20 22:28 往事随风_go 阅读(779) 评论(0) 推荐(0) 编辑
摘要: 1 package main 2 3 import "fmt" 4 5 type Humaner01 interface { 6 sayHi() 7 } 8 9 type Personer interface { 10 Humaner01 //匿名字段,继承sayHi() 11 sing(lrc string) 12 } 13 14 type S... 阅读全文
posted @ 2019-12-20 15:16 往事随风_go 阅读(260) 评论(0) 推荐(0) 编辑
摘要: tcp服务器 阅读全文
posted @ 2019-12-20 15:13 往事随风_go 阅读(157) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "time" ) func main() { //创建一个有缓存区的管道 ch := make(chan int,3) //len(ch) 缓存区里面有多个数据,cap(ch )缓存区大小 fmt.Printf("len(ch)=%d,cap(ch)=%d\n",len(ch),cap(ch)) go func() { for i:=0;i< 阅读全文
posted @ 2019-12-20 15:09 往事随风_go 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 结果 子协程i= 0 子协程i= 0 子协程i= 1 子协程i= 1 子协程结束 str= 我是子协程,子协程工作完毕 主协程也结束 结果 子协程i= 0 子协程i= 0 子协程i= 1 子协程i= 1 子协程结束 str= 我是子协程,子协程工作完毕 主协程也结束 阅读全文
posted @ 2019-12-20 15:02 往事随风_go 阅读(574) 评论(0) 推荐(0) 编辑
摘要: 一:将本地的代码push到一个干净的服务器仓库中 git init git add * git commit -m "initialized" 把仓库推送到服务器 git push origin master git push http://192.168.0.172:9080/gp_iot/project_iot.git fatal: The curre... 阅读全文
posted @ 2019-12-20 14:48 往事随风_go 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 随机数 产生数据数 go 回调函数 闭包及闭包的特点 package main import "fmt" func test() func() int { var x int //x没有初始化,值为0 return func() int { x++ return x*x } } func main( 阅读全文
posted @ 2019-12-19 18:06 往事随风_go 阅读(174) 评论(0) 推荐(0) 编辑
摘要: package main import ( "strings" "fmt" "net/http" "log" ) func sayHelloName(w http.ResponseWriter, r *http.Request){ r.ParseForm() fmt.Println(r.Form) 阅读全文
posted @ 2019-12-19 16:15 往事随风_go 阅读(233) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "strconv" ) func Read(ch chan int){ value:=<-ch //fmt.PrintIn(strconv.itoa(value)) fmt.Println(strconv.Itoa(value)) } func 阅读全文
posted @ 2019-12-19 14:54 往事随风_go 阅读(115) 评论(0) 推荐(0) 编辑
摘要: { "window.zoomLevel": 1, "editor.fontSize": 15, //"files.autoSave": "onFocusChange", //"editor.fontWeight": "800", // "go.goroot": "c:\\Go\\", //"go.g 阅读全文
posted @ 2019-12-19 14:47 往事随风_go 阅读(540) 评论(0) 推荐(0) 编辑
摘要: { "window.zoomLevel": 1, "editor.fontSize": 15, "gitlens.advanced.messages": { "suppressFileNotUnderSourceControlWarning": true, "suppressLineUncommit 阅读全文
posted @ 2019-12-18 23:45 往事随风_go 阅读(461) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-12-18 00:10 往事随风_go 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1:直接在终端运行go run命令编译 2.安装code runner插件,根据箭头标示顺序,可以在右侧看到它支持的语言. VS Code配置 1.安装go扩展在vscode扩展中搜“go”,选择microsoft官方的ms-vscode.go 2.安装相关工具包 通过VSCode安装操作很简单,但 阅读全文
posted @ 2019-12-17 14:37 往事随风_go 阅读(3363) 评论(0) 推荐(0) 编辑
摘要: go 安装 go 环境配置C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft VS Code\C:\GO\bin\;C:\Use 阅读全文
posted @ 2019-12-17 12:53 往事随风_go 阅读(142) 评论(0) 推荐(0) 编辑
摘要: redis3.0之后提供了新的HA的解决方案,即Cluster模式,由多个节点组成的集群模式。集群master之间基于crc16算法,对key进行校验,得到的值对16384取余,就是key的hash slot(槽)值,每个节点各自存储一部分的hash槽值,主从节点之间基于异步复制方式同步数据。 基于 阅读全文
posted @ 2019-12-16 20:57 往事随风_go 阅读(765) 评论(0) 推荐(0) 编辑
摘要: 第一步:安装Node 检测Node是否安装成功 node -v 第二步:安装vue-cli 命令:npm install vue-cli -g 第三步:搭建项目命令 vue init webpack '你的项目名称' 一路回车 遇到eslint选择no 第四步:安装依赖包 进去你所创建的项目 输入命 阅读全文
posted @ 2019-12-15 09:32 往事随风_go 阅读(912) 评论(0) 推荐(1) 编辑
摘要: vue项目的安装与启动 第一步:安装Node 检测Node是否安装成功 node -v 第二步:安装vue-cli 命令:npm install vue-cli -g 第三步:搭建项目命令 vue init webpack '你的项目名称' 一路回车 遇到eslint选择no 第四步:安装依赖包 进 阅读全文
posted @ 2019-12-15 09:30 往事随风_go 阅读(232) 评论(0) 推荐(0) 编辑
摘要: C:\Users\Administrator>npm config set registry http://registry.npm.taobao.org vue 安装 npm install -g vue-cli 阅读全文
posted @ 2019-12-14 20:21 往事随风_go 阅读(130) 评论(0) 推荐(0) 编辑
摘要: #Node # node 一、安装nodejs 下载地址:http://nodejs.cn/download/ 二、安装git 下载地址:https://git-scm.com/download/win git clone -》克隆 下拉代码 git clone + 仓库地址 (master:主分支 阅读全文
posted @ 2019-11-28 23:32 往事随风_go 阅读(590) 评论(0) 推荐(0) 编辑
摘要: for (int i = 0; i <count; i++) //根据选择的串口号数量创建对应数量的线程 { thread = new Thread(new ParameterizedThreadStart(Run)); thread.Name = Convert.ToString(i); thre 阅读全文
posted @ 2019-09-22 20:10 往事随风_go 阅读(2348) 评论(0) 推荐(0) 编辑
摘要: 一、抽象与接口的区别: 1,抽象(abstract): (1)抽象类中可以有抽象方法,也可没有; (2)抽象方法包含实现,也可以由子类实现; (3)抽象类不能被sealed修饰,只能使用abstract关键字 (4)抽象方法不能在抽象类外部声明; (5)抽象类只能单继承; (6)可以有虚方法(virtual),在不同的继承中,可以有不同的实现(需要override重写); 2、接... 阅读全文
posted @ 2019-07-13 09:50 往事随风_go 阅读(672) 评论(0) 推荐(0) 编辑
摘要: 学生表:STUDENT(S#,SNAME,SAGE,SSEX)课程表:COURSE(C#,CNAME,T#)成绩表:SC(S#,C#,SCORE)教师表:TEACHER(T#,TNAME)其中,1)学生表里的字段含义:S#代表学号,SNAME代表学生姓名,SAGE代表学生年龄,SSEX代表学生性别2 阅读全文
posted @ 2019-07-13 09:46 往事随风_go 阅读(649) 评论(0) 推荐(0) 编辑
摘要: 2.表需要删除重复的记录(重复记录保留1条), 阅读全文
posted @ 2018-12-05 10:13 往事随风_go 阅读(14231) 评论(0) 推荐(0) 编辑
摘要: 1. 进入 C:\Program Files (x86)\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn 2. sqlcmd -U "sa" -p "" -d "" -i"xxx.sql" -u 用户 -p 密码 -d 数据库名 -i 要 阅读全文
posted @ 2018-11-06 16:54 往事随风_go 阅读(298) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace efdemo { public class UserDal { static ZDEntities zz = n... 阅读全文
posted @ 2018-09-19 17:43 往事随风_go 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 1. 建立数据连接setting.js var settings = {};settings.db = { host: 'localhost', user: 'root', password: '1234', port: '3306', database: 'testnode'}module.exp 阅读全文
posted @ 2018-09-14 15:29 往事随风_go 阅读(850) 评论(0) 推荐(0) 编辑
摘要: /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50519 Source Host : localhost:3306 Source Database : test Target Serv 阅读全文
posted @ 2018-09-11 19:17 往事随风_go 阅读(565) 评论(0) 推荐(0) 编辑
摘要: var app = express(); // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); app.use(logger('dev')); var 阅读全文
posted @ 2018-09-11 13:06 往事随风_go 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 现在很多视频直播,各类打赏,送礼物,什么火牛,抖音,酷狗,各种币已经泛滥。 分布式商业模式一旦做开。真的会是引起一场生产关系的大变革。 只是目前很多人还不知觉。政府也在变相压制。真正的通证是可以交易的。可以当做货币使用。 阅读全文
posted @ 2018-09-09 13:43 往事随风_go 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1. mysql -uroot -p1234; 2. show databases; 3. use testnode; 4. 创建数据库表 CREATE DATABASE `node` DEFAULT CHARACTER SET utf8 ; USE `node`; -- -- Table stru 阅读全文
posted @ 2018-09-08 21:51 往事随风_go 阅读(983) 评论(0) 推荐(0) 编辑
摘要: 安装truffle $ npm install -g truffle 依赖环境 NodeJS 访问https://nodejs.org 官方网站下载安装 系统:Windows, Linux or Mac OS X,推荐Mac OS X,不建议使用Windows,会碰到各种各样的问题,导致放弃。 需要 阅读全文
posted @ 2018-09-06 20:33 往事随风_go 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 什么是区块链健康? 区块链健康是指在健康相关的应用程序上使用区块链技术,用来存储、分析数据,作为健康管理和健康预测。 区块链作为个人健康存储的电子病历 个人健康数据可以用区块链存储和管理,相比传统的健康数据管理,区块链健康有几个优势: 非实名,数据匿名编码到数字地址,防止数据泄漏带来隐私问题 数据只 阅读全文
posted @ 2018-09-06 20:20 往事随风_go 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 1 功能 这里我们使用在线编译器,打开网址 https://ethereum.github.io/browser-solidity 1.1 文件夹管理 最左边是文件夹管理,里面列出了当前工作区里的文件,remix可以支持从本地文件夹读取文件。 1.2 工作区 正中间是工作区,工作区上半部是代码编辑区 阅读全文
posted @ 2018-09-06 20:07 往事随风_go 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 主流共识算法分析 主流共识算法分析 区块链核心框架区块链是一个不断增长的分布式账本[2],账本用“区块”的形式衔接在一起,区块中包含交易, 时间戳,随机数等元数据,每个区块中含有一个指针指向上一个交易链接,区块链的设计是安 全的,因为其具有良好的拜占庭容错能力。区块链可以概括为一个分布式的高频交易系 阅读全文
posted @ 2018-09-06 20:02 往事随风_go 阅读(2323) 评论(0) 推荐(0) 编辑
摘要: vs code 中间创建 1. settings.json { "git.ignoreLimitWarning": true} { "git.ignoreLimitWarning": true } 2. 1. npm init 安装pageage.json 2. npm install JQurey 阅读全文
posted @ 2018-08-30 22:14 往事随风_go 阅读(6079) 评论(0) 推荐(0) 编辑