问题标签 [iota]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - 如何将 std::iota 与 std::pair 一起使用?
假设我必须使用无法修改的模板:
的预期内容y
是{1,2},{2,3},{3,4},{4,5},{5,6}
。
错误是:
好的,我知道std::pair
没有operator++
,但如果我自己提供一个,我不能将其范围限制为foo
.
当我不允许定义 a 时,如何使用std::iota
容器?std::pair<T,U>
template <typename T,typename U> std::pair<T,U>::operator++
blockchain - 哪个区块链最适合实施防篡改文件?
我刚开始作为一名区块链开发人员,我想要一个除以太坊(已经实现)之外的区块链服务来将文档的哈希(SHA256 和 ISCC 哈希)存储在区块链中,以便它可以验证其有效性并且是防篡改的。已经有一个 UI 可以生成散列,我需要一个区块链来存储散列
我的需要是:
我想要一个交易成本低、交易速度快的区块链服务。另外,我希望哈希值在区块链中存储很长一段时间(5 年)。哪个区块链最适合这个用例?
java - Android Studio 线程不等待分布式网络的响应(iota 纠结)
我正在使用来自https://github.com/iota-community/java-iota-workshop/blob/master/src/main/java/com/iota/ReadData.java的 ReadData 类从Iota 中检索消息通过散列值(bundlehash)缠结(本质上是一个分布式网络)。
这就是我的方法:
我需要下一行代码中的返回值,但没有多线程我的程序崩溃。使用多线程它有时可以工作,但大多数时候它不起作用(返回一个空字符串)。
我尝试使用:
但它只是无限循环。
我认为问题在于我的程序等待网络响应的时间不够长。
go - 使用 go/ast 进行 iota 声明
我一直在使用 go/ast 来解析 go 源代码并将其复制到另一个文件中,作为 vendoring 练习的一部分。我已经处理了大多数事情——函数、类型等——但我正在努力处理使用 iota 的 const 声明。我正在遍历 ast.File.Scope.Objects 中的项目并复制具有 Scope.Outer == nil 及其 Decl == ast.ValueSpec 的对象的源,基本上暗示顶级变量和常量。
在类型块中:
...它们中的每一个都注册为一个单独的对象,这很公平。但是,我正在努力为它们分配值,因为当我遍历它们时,这些对象也可能是无序的。我可以将这些值视为 ast.Object.Data ,但是当它设置为 1 << iota 等时它似乎也关闭了。有人对我如何获得分配了正确 iota 值的分组 const 声明有任何想法吗?
谢谢!
c++ - 使用 std::iota 填充字母向量
在这段代码中,我用 to 的字母alpha
填充向量:'a'
'z'
我假设这不适用于所有字符编码,有人可以确认吗?还是否认?
如果前者是真的,还有其他可靠的选择吗?
go - iota 的确切含义是什么?
在下面的代码中:
ReplySuccessful
编译为2
,而我认为它肯定应该为零。如果我移动signature
并dhkxGroup
低于ReplyPending
,则ReplySuccessful
变为 0。
为什么是这样?
PS。对我来说,使用 iota 的唯一“好处”是您可以省略分配给以后常量的值,以便您可以轻松修改/插入新值。但是,如果 iota 不固定为零,则可能会导致大问题,尤其是在处理通信协议之类的事情时。
node.js - IOTA MAM messaging with node.js server
-I'm using (https://github.com/xdk2mam/xdk2mam/tree/Workbench-3.6/http-sdcard).
-I'm not versed on JS so I'm not understanding the problem here.
-I'm trying to send a string of sensor data to the tangle and listen to it using a node.js server.
-I keep getting either ECONNREFUSED or ECONNRESET and Protocol not supported(but I think I get when this last one happens, but I don't really understand why.
-I'm trying to use comnet [I assumed it would be for such tasks]
-(https://comnet.tanglebay.com/)
-(https://api.lb-0.testnet.chrysalis2.com/)
-with port 15600
-I'm also trying to get my node up and running to test such things but still don't have enough peers to sync to(but the node is running).
-Correct me if I'm wrong but my understanding is:
-IOTA messaging(gossip) is free right?
-So why would any Node deny the connection?
-So the problem must be in the connection, but if that's the case the reason escapes me.
-Do I need some kind of authorization from the node for the message to go trough?
-Can anyone have a quick look and point me in the right direction? Any help would be appreciated.
javascript - 如何从 AngularJs 或 Angular 中的 node.js 文件导入函数或变量?
嗨,我正在使用 IOTA 分布式账本。我有 node.js 的 iota 客户端库。我想从访问IOTA分布式分类帐的node.js文件中读取数据并将其传递给用户可以看到的Html。
我的 client.js 文件:
我想将 x[i] 变量传递给 html。
我知道如何从控制器读取数据,但如果 client.js 已导入库,我将如何读取数据。我尝试在 Angular 中将库转换为打字稿,但无法弄清楚。
python - When I install the IRI (IOTA reference implementation), I encouter some problems
I have installed Maven 3.8.3 and Java version 17 in my 'Windows' computer, but when I want to install the IRI (IOTA reference implementation) (https://github.com/iotaledger/iri), I try
When I tried mvn clean compile
, it shows BUILD SUCCESS
. But when I try mvn package
, I got a lot of errors.
I am a begainner in IOTA things, especially coding. Would anyone please help me with that? Thanks a lot!