V
V
Vasily Demin2017-08-07 13:33:33
css
Vasily Demin, 2017-08-07 13:33:33

How to disable HashTable sorting in Vala?

When elements are added to the hashtable in one order, they appear in a different order.
For example:

var map = HashTable<string, string>(str_hash, str_equal);
for(int i = 0; i < 5; i++) {
    map.insert(i.to_string(), "word " + i.to_string());
}
map.foreach((key, val)=>{
    stdout.printf("%s\n", key);
});

Conclusion
5
4
1
2
3
We need to make sure that they go in the order they were added.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alex, 2019-03-20
@Kozack

So what's the problem?

div {
    width: 80%;
    max-width: 1024px
}

V
Vitaly Kuznetsov, 2019-03-20
@vitaly44

margin-left: -30px;
or a pseudo-class with absolute positioning left: -30px;

K
Konstantin Tsvetkov, 2017-08-07
@includedlibrary

HashTable in Vala
Unfamiliar, but on general programming issues - create an array of the desired dimension and fill in the elements by serial numbers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question