clojure

11个默克尔树开源项目

北慕城南 提交于 2020-02-27 09:40:22
Merkle树是一种可以有效验证部分数据存在于指定数据集并且未被篡改的高效的哈希树结构,作为一种底层技术广泛应用在各种区块链的实现当中,对于商品溯源、知识产权确认、区块链公证等区块链应用起着重要的作用。本文介绍11个主流的merkle树开源实现,你可以在自己的项目中应用。 区块链开发教程链接: 以太坊 | 比特币 | EOS | Tendermint | Hyperledger Fabric | Omni/USDT | Ripple 1、ethereumjs/merkle-patricia-tree - 以太坊官方merkle树实现 merkle-patricia-tree是以太坊黄皮书中的改进merkle patricia树的实现。目前仅支持leveldb作为存储后端。 开发语言:TypeScript/JavaScript 源码下载: https://github.com/ethereumjs/merkle-patricia-tree 2、google/Trillian - 大规模可验证数据存储 Trillian是google提供的一个透明的、高度可伸缩的密码学可验证数据存储库,它采用MySQL或MariaDB作为后端存储层,可以支持非常大规模的merkle树。Trillian通过gRPC提供服务接口。 开发语言:Golang 源码下载: https://github.com

Java程序员修炼之道

故事扮演 提交于 2020-02-26 22:49:25
《Java程序员修炼之道》 基本信息 原书名:The well-grounded Java developer:vital techniques of Java 7 and polyglot programming 作者: (英)Benjamin J.Evans (荷兰)Martijn Verburg 译者: 吴海星 丛书名: 图灵程序设计丛书 出版社:人民邮电出版社 ISBN:9787115321954 上架时间:2013-6-28 出版日期:2013 年7月 开本:16开 页码:1 版次:1-1 所属分类:计算机 更多关于 》》》《 Java程序员修炼之道 》 内容简介 计算机书籍   《java程序员修炼之道》分为四部分,第一部分全面介绍java 7 的新特性,第二部分探讨java 关键编程知识和技术,第三部分讨论jvm 上的新语言和多语言编程,第四部分将平台和多语言编程知识付诸实践。从介绍java 7 的新特性入手,本书涵盖了java 开发中最重要的技术,比如依赖注入、测试驱动的开发和持续集成,探索了jvm 上的非java 语言,并详细讲解了多语言项目, 特别是涉及groovy、scala 和clojure 语言的项目。此外,书中含有大量代码示例,帮助读者从实践中理解java 语言和平台。    《java程序员修炼之道》适合java 开发人员以及对java7 和jvm

Logging in Clojure

心已入冬 提交于 2020-02-26 05:38:34
问题 For Java development, I use Slf4j and Logback. Logger logger = LoggerFactory.getLogger(HelloWorld.class); logger.debug("Hello world."); How to use these two libs in Clojure programs? Majority of Clojure programming doesn't has .class concept (possible of course via AOT). What do you use for logging in Clojure? 回答1: Clojure comes with a logging core library in tools.logging . Add [org.clojure/tools.logging "0.2.3"] to your leiningen project.clj and run $lein deps as usual. Once you use the

Logging in Clojure

↘锁芯ラ 提交于 2020-02-26 05:38:11
问题 For Java development, I use Slf4j and Logback. Logger logger = LoggerFactory.getLogger(HelloWorld.class); logger.debug("Hello world."); How to use these two libs in Clojure programs? Majority of Clojure programming doesn't has .class concept (possible of course via AOT). What do you use for logging in Clojure? 回答1: Clojure comes with a logging core library in tools.logging . Add [org.clojure/tools.logging "0.2.3"] to your leiningen project.clj and run $lein deps as usual. Once you use the

Hiccup not working : FileNotFoundException: Could not locate ../as__init.class or ../as.clj on classpath

百般思念 提交于 2020-02-25 01:26:56
问题 I'm just beginning with clojure and I'm trying to build a small web app. I wanted to try out hiccup but it doesn't seem to be working. My code is below. Project.clj (defproject WebTest "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :dependencies [[org.clojure/clojure "1.4.0"] [compojure "1.1.5"] [hiccup "1.0.3"] [org.clojure/java.jdbc "0.2.3"] [net.sourceforge.jtds/jtds "1.2.4"] ] :plugins [[lein-ring "0.8.2"] [lein-idea "1.0.1"]] :ring {:handler

Hiccup not working : FileNotFoundException: Could not locate ../as__init.class or ../as.clj on classpath

送分小仙女□ 提交于 2020-02-25 01:26:55
问题 I'm just beginning with clojure and I'm trying to build a small web app. I wanted to try out hiccup but it doesn't seem to be working. My code is below. Project.clj (defproject WebTest "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :dependencies [[org.clojure/clojure "1.4.0"] [compojure "1.1.5"] [hiccup "1.0.3"] [org.clojure/java.jdbc "0.2.3"] [net.sourceforge.jtds/jtds "1.2.4"] ] :plugins [[lein-ring "0.8.2"] [lein-idea "1.0.1"]] :ring {:handler

Importing/using a resource from an external clojar

假装没事ソ 提交于 2020-02-04 15:38:30
问题 What I'm trying to do is package a large file (a MIDI soundfont) in a standalone Maven repo/clojar, and then be able to pull it down programmatically and use it from a separate project. This seemingly simple task is proving to be more complicated than I expected. What would be ideal is if there were a way to access these resources directly, or expose them as public vars, or something. This is the first thing I tried -- I did something like this: (ns midi.soundfont.fluid-r3 (:require [clojure

Importing/using a resource from an external clojar

人走茶凉 提交于 2020-02-04 15:38:13
问题 What I'm trying to do is package a large file (a MIDI soundfont) in a standalone Maven repo/clojar, and then be able to pull it down programmatically and use it from a separate project. This seemingly simple task is proving to be more complicated than I expected. What would be ideal is if there were a way to access these resources directly, or expose them as public vars, or something. This is the first thing I tried -- I did something like this: (ns midi.soundfont.fluid-r3 (:require [clojure

Core.logic finite domain with -ve values

≯℡__Kan透↙ 提交于 2020-02-03 10:21:44
问题 I am not sure why the below code doesn't return any result when using -5 as one of the domain value user=> (run* [q] (infd q (domain -5 5)) (*fd q q 25)) () user=> (run* [q] (infd q (domain 0 5)) (*fd q q 25)) (5) NOTE: This code refers to behavior in the core.logic 0.8.0 betas. 回答1: There is no support currently in the core.logic 0.8.0 betas for domains with negative values at all. If it works it's completely by accident. I don't intend on personally working to add support for this in the

How to use polymorphism in functional programming? [closed]

帅比萌擦擦* 提交于 2020-02-03 03:15:50
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . How to use polymorphism in functional programming (with dynamic type system)? Let's consider following example (first in OOP second in