区块链学习

区块链学习

本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:

升级到6.x的脚本:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs 
sudo apt-get install -y npm

错误信息:

sudo apt-get install -y nodejs 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gyp libboost-python1.58.0 libjs-inherits libjs-node-uuid libjs-underscore
  libssl-dev libssl-doc libuv1-dev linux-headers-4.4.0-18
  linux-headers-4.4.0-18-generic linux-headers-4.4.0-21
  linux-headers-4.4.0-21-generic linux-image-4.4.0-18-generic
  linux-image-4.4.0-21-generic linux-image-extra-4.4.0-18-generic
  linux-image-extra-4.4.0-21-generic linux-signed-image-4.4.0-18-generic
  linux-signed-image-4.4.0-21-generic python-configobj python-pycurl
  python-pyexiv2 python-pyexiv2-doc
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  nodejs
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
Need to get 0 B/3,162 kB of archives.
After this operation, 13.2 MB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 329473 files and directories currently installed.)
Preparing to unpack .../nodejs_4.2.6~dfsg-1ubuntu4_amd64.deb ...
Unpacking nodejs (4.2.6~dfsg-1ubuntu4) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (4.2.6~dfsg-1ubuntu4) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode

解决方案:

  1. Create a new file: /etc/apt/sources.list.d/nodesource.list
    You’ll need to create this file with sudo, but when you create the file, put this inside it:
deb https://deb.nodesource.com/node_6.x xenial main
deb-src https://deb.nodesource.com/node_6.x xenial main
  1. Download the GPG Signing Key from Nodesource for the repository.
    Otherwise, you may get NO_PUBKEY errors with apt-get update:
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
  1. Manually run sudo apt-get update.
    This refreshes the data from the nodesource repo so apt knows a newer version exists.
    If you get a NO_PUBKEY GPG error, then go back to Step 2
  2. Check apt-cache policy nodejs output.
    This is not done by the script, but you want to make sure you see an entry that says something like this in the output:
Version table:
    6.2.1-1nodesource1~xenial1 500
       500 https://deb.nodesource.com/node_6.x xenial/main amd64 Packages
    4.2.6~dfsg-1ubuntu4 500
       500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

If you do not see entries like this, and only see 4.2.6, start over. Otherwise, proceed.
5. Install the nodejs binary. Now that you have confirmed 6.x is available on your system, you can install it: sudo apt-get install nodejs
6. nodejs –version should now show v6.2.1 or similar on output (as long as it starts with v6. you’re on version 6 then).
解决方案参考链接
nodejs安装

  • Platform-specific Binaries 下载问题
    通过以下方式下载,国内受网络限制,基本连不上,即使连上速度也很慢。可通过手动方式下载。
curl -sSL https://goo.gl/Q3YRTi | bash

手动下载hyperledger-fabric binaries,根据系统版本下载对应tar包,我下载的是hyperledger-fabric-linux-amd64-1.0.3.tar.gz
FQ国外风景
下载成功后根据官网的介绍,解压后会得到一个bin文件夹,将其解压至*/fabric-samples目录下即可运行first-network等项目。
因是手动下载的zip,对应的bash并没有执行,需要我们手动下载fabric镜像bwf@ubuntu:/usr/hyperledger/fabric-samples$ ls bin
configtxgen cryptogen get-docker-images.sh peer
configtxlator get-byfn.sh orderer
bwf@ubuntu:/usr/hyperledger/fabric-samples$ cd bin
bwf@ubuntu:/usr/hyperledger/fabric-samples/bin$ ./get-docker-images.sh

通过如下命令启动镜像。(因手动下载的镜像,启动脚本默认用latest版本,有可能报错)

./byfn.sh -m up

错误信息

bwf@ubuntu:/usr/hyperledger/fabric-samples/first-network$ ./byfn.sh -m up
Starting with channel 'mychannel' and CLI timeout of '10000'
Continue (y/n)? y
proceeding ...
Creating network "net_byfn" with the default driver
Pulling orderer.example.com (hyperledger/fabric-orderer:latest)...
ERROR: manifest for hyperledger/fabric-orderer:latest not found
ERROR !!!! Unable to start network
Error response from daemon: No such container: cli
bwf@ubuntu:/usr/hyperledger/fabric-samples/first-network$ 

解决方法1:修改镜像版本为latest.(所涉及镜像都要更新)

bwf@ubuntu:/usr/hyperledger/fabric-samples/first-network$ docker tag hyperledger/fabric-orderer:x86_64-1.0.3 hyperledger/fabric-orderer:latest

解决方法2:修改相关*ymal,添加上对应版本号(所相关的都要改)
例:bwf@ubuntu:/usr/hyperledger/fabric-samples/first-network/base$ cat docker-compose-base.yaml

image: hyperledger/fabric-orderer

改为:

image: hyperledger/fabric-orderer:x86_64-1.0.3

再次启动即可。

快捷键

  • 加粗 Ctrl + B
  • 斜体 Ctrl + I
  • 引用 Ctrl + Q
  • 插入链接 Ctrl + L
  • 插入代码 Ctrl + K
  • 插入图片 Ctrl + G
  • 提升标题 Ctrl + H
  • 有序列表 Ctrl + O
  • 无序列表 Ctrl + U
  • 横线 Ctrl + R
  • 撤销 Ctrl + Z
  • 重做 Ctrl + Y

Markdown及扩展

Markdown 是一种轻量级标记语言,它允许人们使用易读易写的纯文本格式编写文档,然后转换成格式丰富的HTML页面。 —— [ 维基百科 ]

使用简单的符号标识不同的标题,将某些文字标记为粗体或者斜体,创建一个链接等,详细语法参考帮助?。

本编辑器支持 Markdown Extra ,  扩展了很多好用的功能。具体请参考Github.

表格

Markdown Extra 表格语法:

项目价格
Computer$1600
Phone$12
Pipe$1

可以使用冒号来定义对齐方式:

项目价格数量
Computer1600 元5
Phone12 元12
Pipe1 元234

定义列表

Markdown Extra 定义列表语法: 项目1 项目2
定义 A
定义 B
项目3
定义 C

定义 D

定义D内容

代码块

代码块语法遵循标准markdown代码,例如:

@requires_authorization
def somefunc(param1='', param2=0):
    '''A docstring'''
    if param1 > param2: # interesting
        print 'Greater'
    return (param2 - param1 + 1) or None
class SomeClass:
    pass
>>> message = '''interpreter
... prompt'''

脚注

生成一个脚注1.

目录

[TOC]来生成目录:

数学公式

使用MathJax渲染LaTex 数学公式,详见math.stackexchange.com.

  • 行内公式,数学公式为: Γ(n)=(n1)!nN
  • 块级公式:

x=b±b24ac2a

更多LaTex语法请参考 这儿.

UML 图:

可以渲染序列图:

Created with Raphaël 2.1.0 张三 张三 李四 李四 嘿,小四儿, 写博客了没? 李四愣了一下,说: 忙得吐血,哪有时间写。

或者流程图:

Created with Raphaël 2.1.0 开始 我的操作 确认? 结束 yes no
  • 关于 序列图 语法,参考 这儿,
  • 关于 流程图 语法,参考 这儿.

离线写博客

即使用户在没有网络的情况下,也可以通过本编辑器离线写博客(直接在曾经使用过的浏览器中输入write.blog.csdn.net/mdeditor即可。Markdown编辑器使用浏览器离线存储将内容保存在本地。

用户写博客的过程中,内容实时保存在浏览器缓存中,在用户关闭浏览器或者其它异常情况下,内容不会丢失。用户再次打开浏览器时,会显示上次用户正在编辑的没有发表的内容。

博客发表后,本地缓存将被删除。 

用户可以选择 把正在写的博客保存到服务器草稿箱,即使换浏览器或者清除缓存,内容也不会丢失。

注意:虽然浏览器存储大部分时候都比较可靠,但为了您的数据安全,在联网后,请务必及时发表或者保存到服务器草稿箱

浏览器兼容

  1. 目前,本编辑器对Chrome浏览器支持最为完整。建议大家使用较新版本的Chrome。
  2. IE9以下不支持
  3. IE9,10,11存在以下问题
    1. 不支持离线功能
    2. IE9不支持文件导入导出
    3. IE10不支持拖拽文件导入


  1. 这里是 脚注内容.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值