原创 LeetCode OJ:Median of Two Sorted Arrays(兩個有序數組的中位數)

Description There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two s

原创 關於C++中vector的個人理解

標準庫模型vector表示對象的集合,其中所有對象的類型都相同。集合中每個對象都有一個與之對應索引,索引用於訪問對象。 注:vector是模板而非類型,由vector生成的類型必須包含vector中元素的類型,如vector<

原创 Metadisk:基於區塊鏈的去中心化文件存儲應用程序

  最近在研究關於區塊鏈存儲相關的問題,於是在網上搜羅了一下相關的文章,本文是在14年出現的,在網上沒有看見相應的中文文檔,於是自己試着翻譯了一下,不當之處,歡迎指正。 Metadisk:基於區塊鏈的去中心化文件存儲應用程序 摘要

原创 LeetCode OJ:Longest Substring Without Repeating Characters(最長不重複子串)

Decription Given a string, find the length of the longest substring without repeating characters. Examples: Given

原创 LeetCode OJ:Add Two Numbers

Description You are given two non-empty linked lists representing two non-negative integers. The digits are stored

原创 LeetCode OJ:Two sum

Decription Given an array of integers, return indices of the two numbers such that they add up to a specific target

原创 Ubuntu下Geth客戶端搭建私有網絡集羣

本篇博客主要介紹一下在一臺機器上建立多個節點,並且把節點連接在一起形成一個集羣的方法筆記,以及配置時遇到的一些問題。 本文基於Ubuntu14.04 和 Geth 1.4.5-stable 建立一個私有節點時常用參數: --nodisc

原创 Hyperledger Fabric1.0架構概覽

轉載自:http://blog.csdn.net/fidelhl/article/details/54893353 Hyperledger是被業界非常看到的聯盟鏈的實現,包括IBM、Intel、R

原创 Leveldb實現原理

本文轉載自:http://www.cnblogs.com/haippy/archive/2011/12/04/2276064.html LevelDb日知錄之一:LevelDb 101   說起Lev

原创 Ubuntu下leveldb的安裝使用(C++中)

1、獲取leveldb源碼 https://github.com/google/leveldb 2、解壓及編譯 $ cd leveldb-master $ make 編譯完成之後會出現兩個新的目錄,out-shared和out-stat

原创 TCP/IP網絡編程學習筆記

最近學習網絡編程,做了一些筆記,簡要、明確,方便自己查看,也希望能讓更多人看到,網絡編程的大概過程就是這樣。 1、網絡編程中接受(server)連接請求的套接字創建過程 第一步:調用socket函數創建套接字 第二步:調用bind函數分配

原创 C++去除字符串中多餘的空格

今天寫了個小編程,去除字符串中多餘的空格,例如"I___am_____a______student."(下劃線表示空格哈,打多個空格顯示的還是一個),最後輸出”I am a student.” 現在把自己的思路貼上,歡迎大家留言指正。 思

原创 Ubuntu下sublime安裝完package control後Preference下沒有出現的問題

sublime無疑是一款神器,之前一直在上面寫C++、Go之類的代碼來着,由於它自帶語法高亮之類的功能,也沒用上安裝插件,所以一直都沒有用到package control。今天發現沒有,按照官方文檔 進行了安裝,一切都正常,但是後來重啓s

原创 利用truffle框架部署應用到自己搭建的私有鏈

本次實驗Ubuntu 14.04 、truffle 3.2.4、node 6.9.1、npm 3.10.8和geth 1.4.5搭建的私有鏈。 truffle官方文檔:http://truffleframework.com/docs/ 用

原创 truffle webpack下localhost能夠訪問,而IP地址無法訪問的解決方法

最近學習ethereum時,用truffle webpack遇到一個問題,就是啓動服務後能夠用localhost:8080訪問,但是卻不能用IP:8080訪問。這樣,另外的電腦就不能夠訪問自己的應用了。 本機IP:219.216.65.1