Questions tagged [iota]

The iota function is used by several programming languages or their libraries to initialize a sequence with uniformly increasing values.

Definition:

The iota function is used by several programming languages or their libraries to initialize a sequence with uniformly increasing values.

The APL programming language uses the iota symbol () to generate sequences of successive integers.

The C++ language recently added iota to the standard library in the <numeric> header. The iota template function has existed in several unofficial C++ template libraries for years.

Important Links:

65 questions
1
vote
2 answers

How to use json string value to get iota value?

I have a constutil package where I have defined some const values using iota. package constutil type UserType uint const ( Free UserType = iota + 1 Premium UserType ... ) From json I will get {"user": "Premium", ...}. Now I need to…
Mahmudul Haque
  • 502
  • 2
  • 8
  • 18
1
vote
1 answer

Populating an array in descending order c++ NOT sorting

I'm trying to generate an an array in descending order, as in actually fill it from scratch. I am not trying to sort given numbers. I wanted to know if there is a way to do it without a for loop. I was able to generate an array in ascending order …
Jade
  • 15
  • 7
1
vote
2 answers

Enumerating string constants with iota

The following example defines a series of port numbers starting at 3333 using iota. package main import ( "fmt" ) const ( FirstPort = iota+3333 SecondPort ThirdPort ) func main() { hostAndPort := "localhost:"+fmt.Sprint(SecondPort) …
Mike Ellis
  • 1,120
  • 1
  • 12
  • 27
1
vote
3 answers

Typed constant declaration list

I wish to create an "enum-like" list of constants with the following properties: The values of each identifier are sequential, with a few gaps. (I believe iota and the blank identifier help in this regard). The identifiers are private to the…
Matt Joiner
  • 112,946
  • 110
  • 377
  • 526
1
vote
1 answer

Getting tokens in a private Iota testnet

I am trying to deploy my own IOTA testnet using iri and the API but I am unable to get any balance in my accounts. How can I configure the testnet to have some tokens at start?
1
vote
1 answer

Fiware error on creating service and registration for a device

i am a fiware user and i have created an iot agent on an ubuntu 14.04 empty vm and when i send a create service or a device registration request , i get an error. And i've made sure that the ports listen properly and i've also allowed tcp…
ahmad
  • 175
  • 9
1
vote
1 answer

How to add a menu item in Delphi's IDE context menu

I am trying to add some functionality to Delphi's IDE to easy myself. I have found how to add menu items to the IDE main menu using INTAServices.MainMenu, also was able to create some custom component editors, so I can have my own menu items in the…
Kiril Hadjiev
  • 302
  • 2
  • 13
1
vote
2 answers

Iota to define keys on a Go map?

Let's suppose we have a map[int]string and we want to define it like this: var a map[int]string = { 1: "some" 3: "value" 4: "maintained" 7: "manually" // more 100 entries... } I would like to maintain the values manually because they have no…
marcio
  • 10,002
  • 11
  • 54
  • 83
0
votes
0 answers

Why is this program for converting cartesian coordinates to Polar coordinates is not giving correct omega value?

This is my program in C: #include #include int main() { int x, y; printf("Enter the cartesian coordinates to be converted into respective polar coordinates"); scanf(" %d %d", &x, &y ); float r = sqrt(pow(x,2) +…
0
votes
0 answers

flutter error: failed to run custom build command for libsodium-sys v0.2.7

I tried to use flutter with rust by flutter_rust_bridge on my MacOS, but after I added identity_iota = { version = "0.6" } to Cargo.toml, when I run the flutter, it shows Error (Xcode): failed to run custom build command for `libsodium-sys…
施宇飛
  • 1
  • 2
0
votes
0 answers

IOTA Hornet node is not healthy and unsynced

There is nothing in the documents on how you manage the health of the node. My hornet was deployed on an AWS VPS, all configs are default from the docs. Whenever i try to access the node from Node.js server, it returns "Error:…
twenty9str
  • 45
  • 6
0
votes
0 answers

Configurable value in GoLang iota type marshal result?

I have a GoLang API server project in which I currently use iota with a custom type (Method). I created a custom Marshal function to output the details related to Method whenever it is Marshaled for output to an API client. I have now gotten to a…
0
votes
1 answer

Iota iota.adapter.BadApiResponse: 403 response from node Message=forbidden

I am attempting to connect to the one-click-tangle I have set up on WSL2 ubuntu locally. However, when I try and connect to the automatically generated node at http://localhost:14265 I get an error and the following response:…
0
votes
1 answer

IOTA "one-click-tangle" via docker linux containers - ERROR 1

I am trying to run a private tangle on my computer through linux docker containers. Therefore I followed the guide over at https://wiki.iota.org/chrysalis-docs/tutorials/one_click_private_tangle Every step succeeded up until we tried to…
0
votes
1 answer

How to mix iota and values

In a Go enum containing iota, how is it possible to force some values, yet auto-incrementing others? For example, in this source code, const ( SUCCESS int = iota ERROR_UNKNOWN = 3 ERROR_ARGS NOFILES = 50 …
ymudyruc
  • 77
  • 9