以下JS:
(function() {
"use strict";
$("#target").click(function(){
console.log("clicked");
});
}());
Run Code Online (Sandbox Code Playgroud)
产量:
test.js: line 5, col 3, '$' is not defined.
Run Code Online (Sandbox Code Playgroud)
当使用JSHint 0.5.5进行linted时.有任何想法吗?
这可能是一个愚蠢的问题.Hyperledger Fabric是否需要Docker来进行操作.
我只是想知道只有当我们需要在同一台物理机器上运行Fabric peer,orderer或couchDB作为虚拟机时才需要Docker.我认为如果我们在单独且相同的服务器上本地安装这些软件(peer,order,couchDB等),可能就没有必要使用Docker.
谢谢.
我需要使用 Angular JS 单击按钮来执行 shell 脚本,谁能告诉我如何实现?
在执行之前,我需要从 GUI/UI 向该 shell 脚本传递一些输入(参数、参数)。
如何完全卸载Hyperledger Composer(和底层Hyperledger Fabric),包括所有依赖项,docker镜像和node/npm模块?
我在安装时遵循了以下设置:https://hyperledger.github.io/composer/installing/development-tools.html
我已经做了以下事情:
npm uninstall -g composer-cli
npm uninstall -g composer-rest-server
npm uninstall -g generator-hyperledger-composer
npm uninstall -g yo
npm uninstall -g composer-playground
Run Code Online (Sandbox Code Playgroud) 执行:
composer network ping -n calma-network -p hlfv1 -i admin -s adminpw
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Error: Error trying to ping. Error: Composer runtime (0.8.0) is not compatible with client (0.11.0)
Command failed
Run Code Online (Sandbox Code Playgroud)
版本看起来一样:
composer -v
composer-cli v0.11.0
composer-admin v0.11.0
composer-client v0.11.0
composer-common v0.11.0
composer-runtime-hlf v0.11.0
composer-runtime-hlfv1 v0.11.0
Run Code Online (Sandbox Code Playgroud) hyperledger hyperledger-fabric hyperledger-composer ibm-blockchain
我有一个定义5个服务的docker-compose.yaml文件:
跑步了
docker-compose -f docker-compose.yaml up -d
Run Code Online (Sandbox Code Playgroud)
命令结果:
Creating network "hlf_byfn" with the default driver
Creating peer1.org1.example.com ...
Creating peer0.org2.example.com ...
Creating peer1.org2.example.com ...
Creating orderer.example.com ...
Creating peer0.org1.example.com ...
Creating peer0.org2.example.com
Creating peer1.org1.example.com
Creating peer1.org2.example.com
Creating orderer.example.com
Creating orderer.example.com ... error
ERROR: for orderer.example.com Cannot create container for service orderer.example.com: Conflict. The container name "/orderer.example.com" is already in use by container "d6621116cf0d1ab108277893178ba29aCreating peer0.org1.example.com ... error
ERROR: for peer0.org1.example.com Cannot create container for service peer0.org1.example.com: …Run Code Online (Sandbox Code Playgroud) 我已经按照http://hyperledger-fabric.readthedocs.io上的Hyperledger Fabric的安装和配置进行了操作,并完成了安装。当我尝试构建它时,出现错误。你能告诉我分辨率吗?
要构建Hyperledger Fabric:
cd $GOPATH/src/github.com/hyperledger/fabric
make dist-clean all
Run Code Online (Sandbox Code Playgroud)
错误输出:
docker tag hyperledger/fabric-tools hyperledger/fabric-tools:x86_64-1.0.0-rc2-snapshot-4709b33
Checking committed files for SPDX-License-Identifier headers ...
The following files are missing SPDX-License-Identifier headers:
orderer/multichain/manager.go
orderer/multichain/manager_test.go
Please replace the Apache license header comment text with:
SPDX-License-Identifier: Apache-2.0
Makefile:111: recipe for target 'license' failed
make: *** [license] Error 1
Run Code Online (Sandbox Code Playgroud) 我正在尝试遵循此示例 Hyperledger Fabric 代码:https://github.com/hyperledger/education/tree/master/LFS171x/fabric-material
最初,我用我的 go 文件 chaincode/tuna-app/test.go 替换了 chaincode/tuna-app/tuna-chaincode.go。test.go 只是通过调用 initLedger 函数在账本中初始化的内容发生了变化。它工作得很好,不需要对 tuna-app/.startFabric.sh 进行任何更改。
现在,当我再次尝试通过 initLedger 函数调用更改分类帐时,它没有发生。即使我评论函数本身,它仍然显示分类帐的旧内容。
如何使用可见的更改更新我的链代码?
startFabric.sh包含以下代码:
set -e
# don't rewrite paths for Windows Git Bash users
export MSYS_NO_PATHCONV=1
starttime=$(date +%s)
if [ ! -d ~/.hfc-key-store/ ]; then
mkdir ~/.hfc-key-store/
fi
# launch network; create channel and join peer to channel
cd ../basic-network
./start.sh
# Now launch the CLI container in order to install, instantiate chaincode
# and prime the ledger with our 10 tuna …Run Code Online (Sandbox Code Playgroud) docker ×4
hyperledger ×4
go ×2
javascript ×2
angularjs ×1
jquery ×1
jshint ×1
lint ×1
node.js ×1
shell ×1
shellexecute ×1