Questions tagged [multiple-value]
172 questions
24
votes
5 answers
How can I store multiple values in a Perl hash table?
Up until recently, I've been storing multiple values into different hashes with the same keys as follows:
%boss = (
"Allan" => "George",
"Bob" => "George",
"George" => "lisa" );
%status = (
"Allan" => "Contractor",
"Bob" …

paxdiablo
- 854,327
- 234
- 1,573
- 1,953
21
votes
1 answer
Get Enum name from multiple values python
I'm trying to get the name of a enum given one of its multiple values:
class DType(Enum):
float32 = ["f", 8]
double64 = ["d", 9]
when I try to get one value giving the name it works:
print DType["float32"].value[1] # prints 8
print…

Ruvalcaba
- 445
- 1
- 4
- 9
14
votes
11 answers
Hashtable with multiple values for single key
I want to store multiple values in single key like:
HashTable obj = new HashTable();
obj.Add("1", "test");
obj.Add("1", "Test1");
Right now this throws an error.

user557168
- 161
- 1
- 2
- 4
11
votes
1 answer
Please explain lisp's multiple-value-bind
I've read the docs (several different versions!) but I can't quite get my head wrapped around multiple-value-bind.
Here's what I (think I) know:
The first parameter is a list of variables that are going to get bound.
The next parameter is a list of…

Olie
- 24,597
- 18
- 99
- 131
9
votes
4 answers
Excel VBA set multiple cells to the same value
I want to set every eighth cell on one worksheet to the value of a cell in another worksheet. I wrote this here:
Sub xx()
For i = 5 To 45 Step 8
Set ThisWorkbook.Sheets("Sheet5").Cells(i, 3).Value =…

Prot
- 99
- 1
- 1
- 6
7
votes
1 answer
Passing multiple request parameters with same name from table rows
I have a table with checkboxes that the user can check and delete that row in the table. I have everything working, but if the user checks two boxes, it only retrieves the first one on the table.

Mr Man
- 1,498
- 10
- 33
- 54
7
votes
1 answer
How to access multiple values returned by a function (e.g., cl:parse-integer)?
I'm trying to get three numbers out of a string
(parse-integer "12 3 6" :start 0 :junk-allowed t)
12 ;
2
Now this returns 2 as well, which is the number where it could be parsed.
So I can now give
(parse-integer "12 3 6" :start 2 :junk-allowed t)
3…

shrinidhisondur
- 771
- 1
- 8
- 18
6
votes
1 answer
TypeError: errorbar() got multiple values for keyword argument 'yerr'
I am trying to plot errorbar with the array of mean values and standard deviation by python as below:
p11 = np.genfromtxt(filn1,delimiter="",usecols=0,dtype=None)
p12 = np.genfromtxt(filn3,delimiter="",usecols=0,dtype=None)
s11 =…

Isaac
- 885
- 2
- 15
- 35
6
votes
2 answers
Log multiple returned values in Go
Is there an idiomatic way to log result of a function returning multiple values? This won't compile:
import "log"
func returnPair() (int,int) {
return 42, 24
}
func main() {
log.Printf("Returned %v", returnPair())
}
prog.go:7:…

Maxim Razin
- 9,114
- 7
- 34
- 33
6
votes
2 answers
How to return multiple variables from python to bash
I have a bash script that calls a python script. At first I was just returning one variable and that is fine, but now I was told to return two variables and I was wondering if there is a clean and simple way to return more than one…

Tall Paul
- 2,398
- 3
- 28
- 34
5
votes
4 answers
How to format a nested multiple-value-bind the let way?
Recently, I've been often nesting several functions that return multiple values. However, unlike let, which me allows to write these calls elegantly into one big statement, I always end up with a lot of indentation.
My question is: having several…

Dominik Mokriš
- 1,118
- 1
- 8
- 29
5
votes
4 answers
Difference between multiple values and plain tuples in Racket?
What is the difference between values and list or cons in Racket or Scheme? When is it better to use one over the other? For example, what would be the disadvantage if quotient/remainder returns (cons _ _) rather than (values _ _)?

Alex
- 1,184
- 7
- 15
4
votes
5 answers
Get indices of matches with a column in a second data.table
I have two data.tables. Each has a column called 'firstName' and another called 'lastName', which contain some values which will match each other and some that won't. Some values in both data sets might be duplicated.
I want to add a new column to…

Amy M
- 967
- 1
- 9
- 19
4
votes
1 answer
tensorflow TypeError: run() got multiple values for argument 'feed_dict'
I write this code in tensorflow, however, when I run it, the error in the title come out. Can anyone help me and explain the problem to me? Thanks for any help.
import tensorflow as tf
sess = tf.InteractiveSession()
import numpy as np
a =…

Jinwei Xing
- 265
- 3
- 6
4
votes
4 answers
jQuery, how to get value of a specific checkbox in table row?
I have table with multiple rows but its row cotain 3 checkbox and button. Now, I want to update db table with respect to this button and the check box. But, the problem is that I am not able to get the value of the check box when I clicked on each…

Robindra Singha
- 141
- 1
- 2
- 12