小编kri*_*eer的帖子

错误:"无法启动进程,工作目录不存在." 在IntelliJ中

当我将整个项目从一台计算机移动到另一台计算机,并且我尝试在另一台计算机上的IDEA中启动项目时,当我启动应用程序本身时发生以下错误:"无法启动进程,工作目录不存在."

没有任何背景我可以把这条消息放入.我检查了所有设置,一切似乎都没问题.我做错了什么?

intellij-idea

10
推荐指数
1
解决办法
8917
查看次数

web3.eth.accounts[0] 返回未定义并且 app.vote(1,{ from:web3.eth.accounts[0] }) 给出错误

我对 Solidity 很陌生,正在通过一个简单的网络应用程序来探索它。我正在尝试制作一个候选人投票网络应用程序,它接受一些详细信息和一个按钮,按下该按钮应将详细信息部署到智能合约创建的块中。当我尝试web3.eth.accounts[0]在 truffle console 中使用帐户详细信息时,它返回 undefined 。当我尝试使用 truffle 控制台从帐户 1 向候选人 1 发送选票时app.vote(1,{ from:web3.eth.accounts[0] }),我收到如下错误:

truffle(development)> web3.eth.accounts[0]
undefined
truffle(development)> app.vote(1,{ 
from:web3.eth.accounts[0] })
Thrown:
Error: The send transactions "from" field 
must be defined!
at evalmachine.<anonymous>:0:5
at sigintHandlersWrap (vm.js:272:15)
at Script.runInContext (vm.js:127:14)
at runScript
at bound (domain.js:426:14)
    at REPLServer.runBound [as eval] (domain.js:439:12)
    at REPLServer.onLine (repl.js:726:10)
    at REPLServer.emit (events.js:219:5)
    at REPLServer.EventEmitter.emit (domain.js:482:12)
    at REPLServer.Interface._onLine (readline.js:324:10)
    at REPLServer.Interface._line (readline.js:701:8)
    at REPLServer.Interface._ttyWrite (readline.js:1026:14)
    at REPLServer.self._ttyWrite (repl.js:803:7)
    at ReadStream.onkeypress (readline.js:200:10)
    at …
Run Code Online (Sandbox Code Playgroud)

javascript ethereum solidity web3js metamask

2
推荐指数
1
解决办法
3266
查看次数

如何在java中找到数组的索引

我正在尝试使用此功能,但它给出的索引为 -1。那我能做什么

int[] veer = {14,25,14,56,15,36,56,77,18,29,49};

int a = Arrays.asList(veer).indexOf(14);

System.out.println("my array at position 14 is :" + (a));
Run Code Online (Sandbox Code Playgroud)

java arrays arraylist

1
推荐指数
1
解决办法
88
查看次数