python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Use of colon ':' in type hints
When type annotating a variable of type dict, typically you'd annotate it like this:
numeralToInteger: dict[str, int] = {...}
However I rewrote this using a colon instead of a comma:
numeralToInteger...
Magmurrr
Votes: 0
Answers: 2
Tensorflow.js selecting specific part of Tensor
In javascript, I'm successfully converting a RGB video frame from my webcam to a tensor using TensorFlowJS's function tf.browser.fromPixels(). Now, I'd like to select only a part of this tensor accord...
EnzoBH
Votes: 0
Answers: 1
How to make array of struct and return from a function in golang?
I recently started working with golang and I need to make array of struct. Below is my struct:
type Process struct {
Key string
Value string
}
Now from my method I need to return []Process....
user1950349
Votes: 0
Answers: 2
rust str slice from string
"A slice is a kind of reference, so it does not have ownership."
The following code is simplified. It needs to return a slice using a match. All but one match arm return a string slice. On...
A Boston
Votes: 0
Answers: 3