uint Questions
8
Solved
How do I get a uint unix timestamp in C++? I've googled a bit and it seems that most methods are looking for more convoluted ways to represent time. Can't I just get it as a uint?
5
Solved
I need to generate random numbers with range for byte, ushort, sbyte, short, int, and uint. I am able to generate for all those types using the Random method in C# (e.g. values.Add((int)(random.Nex...
2
Solved
I have found 3 methods to convert Uint8Array to BigInt and all of them give different results for some reason. Could you please tell me which one is correct and which one should I use?
Using bigin...
Voroshilov asked 31/7, 2022 at 6:42
6
Solved
Is there any difference between uint and unsigned int?
I'm looking in this site, but all questions refer to C# or C++.
I'd like an answer about the C language.
If it is relevant, note that I'm usin...
2
Solved
So in go, I do a calculation which gives "5726718050568503296"
In JS it gives "5726718050568503000"
I would like to replicate this behavior in go
Susceptive asked 22/4, 2021 at 23:19
2
Solved
I am writing a program in Swift that takes the multiplicative inverse of random bytes. Sometimes, the byte is 0, and when the multiplicative inverse is taken, it results in inf.
The multiplicative ...
Moncear asked 13/4, 2021 at 15:5
3
Solved
6
Whats the best way of doing variable length encoding of an unsigned integer value in C# ?
"The actual intent is to append a variable length encoded integer (bytes) to a file header."
For ex: "C...
3
Solved
I am trying to map a ulong to a long (and vice-versa), and a uint to a int (and vice-versa), as shown below - in order to save the values in a MS-SQL-database with signed types integer and biginteg...
Projector asked 1/12, 2016 at 0:20
1
Solved
I have a program that uses dynamic allocation for a uint8_t array; can I safely
assume that its length will always be one byte?
5
Solved
According to Swift - Converting String to Int, there's a String method toInt().
But, there's no toUInt() method. So, how to convert a String to a Uint?
Cynthy asked 21/5, 2015 at 19:12
3
Solved
The piece of code is like:-
int x = -24;
uint y = (uint) x;
Console.WriteLine("*****" + y + "********");
// o/p is *****4294967272********
Why this type of behavior in C#, Detailed elaborat...
1
2
Solved
As in the title, are read and write operations regarding uint8, atomic?
Logically it must be a single cpu instruction obviously to read and write for a 8 bit variable. But in any case, two cores co...
1
Solved
How can I convert a Uint8ClampedArray (like one used for storing HTML5 canvas image data) to a regular array, in which values won't be constrained to 0-255?
Tercel asked 24/4, 2015 at 12:50
5
Converting -1 to uint will not work "((uint)(-1))" solution?
num10 = ((uint)(-1)) >> (0x20 - num9);
Error:
Constant value '-1' cannot be converted to a 'uint' (use 'unchecked' syntax to ov...
Claqueur asked 17/3, 2013 at 6:0
1
Solved
I just stumbled upon the type u_int8_t because it did not compile in Windows+MinGW (but compiled fine under Linux). According to this site the C++11 standard defines the type uint8_t. I just used t...
3
Solved
Hi all I want to do a debug with printf. But I don't know how to print the "out" variable.
Before the return, I want to print this value, but its type is void* .
int
hexstr2raw(char *in, void *o...
Inanition asked 8/3, 2013 at 10:49
2
Solved
This is my test code
#include<iostream>
using namespace std;
int main()
{
uint8_t a;
while(1)
{
cin>>a;
if(a == 0) break;
cout<<"Input is "<<a<<endl;
}
}
...
1
I tried to run a query on google BigQuery api and got an exception as follows:
"Argument type mismatch in function IF: 'distinctPlayers' is type 'TYPE_UINT64', '0' is type 'TYPE_INT32'."
The q...
Warila asked 16/6, 2012 at 0:32
2
Solved
For some reason, when I define a variable as "uint" instead of "unsigned int" in my program, it errors. This seems strange, because uint is typedef'd as:
typedef unsigned int uint;
...so I would...
3
5
Solved
Definitely, I know the basic differences between unsigned integers (uint) and signed integers (int).
I noticed that in .NET public classes, a property called Length is always using signed integers...
1
Solved
Background
We've been using some code copied verbatim from Joe Duffy's "Concurrent Programming on Windows" (page 149) in production for over a year. The code (below) is used in our Asp.Net web app...
Heyman asked 14/3, 2011 at 19:9
6
Solved
So, I have a string of 13 characters.
string str = "HELLOWORLDZZZ";
and I need to store this as ASCII representation (hex) in a uint variable. How do I do this?
1 Next >
© 2022 - 2025 — McMap. All rights reserved.