indexOf 的用法:陣列裡面有的話回傳他的索引值,沒有的話回傳 -1
今天來翻翻大家開發智能合約的利器 Hardhat 是個什麼樣的工具,它的原理又是什麼。
KryptoCamp — Day14 — Solidity — 6
資料結構 (Data Structures)
課程已經進入第四週,看今天的教學大綱應該會提到共享錢包的實作方式、智能合約開發 scaffold 的使用。
今天是參加第二屆 KryptoCamp 的值得紀念的第一天,今天不外乎就是些大家互相認識及基礎知識的講解,知識面的東西很多,可是幾乎都是速速帶過,沒有在課堂有太多著墨。
這是這個禮拜被分派的作業:1. 文字解釋區塊 #0 是如何產生的2. 準備好區塊鏈開發環境透過自己架設的私有區塊鏈發送第一筆交易
原文:
Rvm 是一個 Ruby 的版本管理工具Gem是套件本身Bundler 是一個…
KryptoCamp — Day 10~11 — Solidity — 4
給予一組數字陣列 arr ,判斷其中的元素的重複個數是否是唯一值,若是則回傳 true。
def unique_occurrences(arr) a = arr.uniq.map { |n| (arr - [n]).size } a.size == a.uniq.sizeend