- 博客(16)
- 资源 (4)
- 收藏
- 关注
翻译 内容寻址和CIDs
内容寻址和CIDs 内容标识符,或CID,是IPFS网络中指向真正数据实体的标签。它并不表示数据内容在网络中存储的真正位置,他只是基于数据内容本身形成的一种表示地址的形式。无论数据内容有多大,CID的表示形式都很短。 CID是基于内容的加密哈希。主要表现为以下几点:对数据做任何更改,都会产生不同的CID使用同样的方式把同样的内容添加的两个IPFS节点,会产生相同的CID IPFS默认使用sha-256哈希算法,同时也支持多种其他算法。 Multihash项目旨在为其他程序提供哈希算法,并允许
2020-06-18 15:49:55
761
2
翻译 How IPFS works(翻译)
IPFS是一个点对点的存储网络。内容可通过世界上任何对等节点访问,这些对等节点可能作为中继节点、存储节点或两者兼而有之。IPFS网络通过内容寻址而不是通过地址寻址。要理解IPFS网络,有以下三个原则:通过内容寻址进行唯一标识通过有向无环图(DAG)链接内容通过分布式哈希表(DHT)发现内容这三项原则相辅相成,建立起了IPFS生态网络的基础。让我们从内容寻址和内容的唯一标识开始来进一步认...
2020-04-28 17:36:11
343
转载 How IPFS works(原文)
How IPFS works(原文)TIPWant to see a video recap of how IPFS works with files in general? Check out this content from IPFS Camp 2019! Core Course: How IPFS Deals With FilesIPFS is a peer-to-peer (p2p...
2020-04-28 10:44:43
389
原创 以太坊(geth客户端)利用truffle部署智能合约
开发环境:Ubuntu16.04以太坊客户端:go-ethereum v1.7.3第一步:node和npm安装(如果已经安装,请忽略该步骤)官网下载node-v8.9.3-linux-x64.tar.xz解压并移动到通用的软件安装目录 /opt/tar -xJf node-v8.9.3-linux-x64.tar.xzsudo mv no
2018-02-05 14:40:09
2584
原创 希尔排序
#include using namespace std;void shell_sort(int unsorted[], int nCount){ for (int gap = nCount / 2; gap > 0; gap /=2) { for (int i = gap; i { for
2016-12-20 09:21:46
172
原创 快速排序
#include using namespace std;void quick_sort(int unsorted[], int nleft, int nright){ if (nleft { int pivot = unsorted[(nleft + nright) / 2]; //此处选择数组中间值
2016-12-20 08:44:50
178
原创 归并排序
#include using namespace std;void merge_sort_recursive(int unsorted[], int reg[], int start, int end){ if (start { int nlen = end - start, mid = nlen / 2 + start;
2016-12-20 08:39:04
155
原创 插入排序
#include using namespace std;void insert_sort(int array[], int ncount){ for (int i = 1; i { int pivot = array[i]; int j; for (j = i - 1; j >= 0; j--)
2016-12-15 15:32:25
161
原创 地精排序
#include using namespace std;void gnome_sort(int narray[], int nCount){ for (int i = 0; i { if (0 == i||narray[i-1] { i++; } else
2016-12-15 15:22:46
216
原创 二分查找
#include void find_number(int *pInt, int nfind, int nCount){ int nleft = 0, nright = nCount; while (nleft { int nMid = (nleft + nright) / 2; if (pInt[nMid]
2016-12-06 14:23:09
156
原创 打印直角三角形
#include "iostream"using namespace std;void print_line(int n){ for (int i = 1; i { cout } cout }void print_triangle(int nLineCount) //打印直角三角形{
2016-09-27 13:42:41
377
原创 选择排序
#include "iostream"using namespace std;void swap_int(int &a, int &b) //对调数字{ int temp = a; a = b; b = temp;}void selection_sort(int array[], int n){ fo
2016-09-27 11:51:10
143
原创 基本算法之求和&字符串拷贝
#include "iostream"using namespace std;int summation(int array[], int nCount){ int sum = 0; for (int i = 0; i { sum += array[i]; } return sum;}void c
2016-09-27 11:24:49
193
转载 进制转换
#include "iostream"using namespace std;//十进制数字转换为二进制数字void fun_DecToBinary(unsigned int n){ if (n < 2) { cout << n; } else { fun_DecToBinary(n/2); cout << n % 2; }}//十进制数字转换为八进制数字
2015-06-26 16:17:59
262
原创 第一个winSock程序
客户端代码:#include #include int main(){ //加载套接字 WORD wVersionRequested; WSADATA wsaData; int err; wVersionRequested = MAKEWORD(1,1); err = WSAStartup(wVersionRequested, &wsaData); if (0 != e
2015-06-25 17:41:50
303
原创 冒泡排序的两种写法
#include using namespace std;void bubble_1(int a[], int n);void bubble_2(int a[], int n);void bubble_1(int a[], int n){ int i, j, temp; for (j=0; j<n-1; j++) { for (i=0; i<n-j-1; i++) {
2015-06-19 09:35:03
485
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人