python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Is taking uint8 from user's input more efficient than taking uint64?
The following code takes a 64-bit unsigned integer from it's user's input:
package main
import (
"fmt"
"bufio"
"os"
"strconv"
)
func main() {...
John Smith
Votes: 0
Answers: 0
va_args not accepting signed integer in C
I was designing my kernel using C. While making the kprintf function (a function like printf but works with the kernel) I saw that signed integers (precisely the data type is long), va_args is convert...
0xdead
Votes: 0
Answers: 2
"Pack" a np.array of 4 np.uint16 into a single np.unit64
Given a np.array of 4 np.uint16
input = np.random.randint(10, size=4, dtype=np.uint16)
how can I "pack" their binary representations into a single np.uint64?
# Example of C code
# output = ...
Filippo Bistaffa
Votes: 0
Answers: 2
How to handle overflow of unsigned int in C?
How can I change line 6 to handle the integer overflow so that this code will never terminate (while still increasing i in each loop iteration)?
1 int main() {
2 unsigned int i;
3 i = 1;
4 wh...
robertsni
Votes: 0
Answers: 1