Questions tagged [uint]

is a type of variable and is used to store the equivalent of a mathematical non-negative integer

Due to the limited amount of memory a computer can handle, uint can represent just a subset of positive integers.

In C the uint standard is unsigned int and uses 4 bytes of memory (and thus can represents all integers int the range 0 to 4,294,967,295)

192 questions
0
votes
1 answer

Rotating the Uint8ClampedArray image data using a html canvas

I am currently trying to find a way to have images bouncing around the page while rotating. So far, I have succeeded in the bouncing part: The code in action. However, I am still struggling with the rotating part: The source code. I believe the…
Jack G
  • 4,553
  • 2
  • 41
  • 50
0
votes
1 answer

Xamarin Forms - ResourceDictionary and value

It's a simple question, maybe stupid, but I'm stuck from hours.. I have that in the XAML part: 50
Emixam23
  • 3,854
  • 8
  • 50
  • 107
0
votes
1 answer

Why don't I get an exception on integer (uint) under/overflow?

I accidentally discovered this today. Is this supposed to happen? Is this something we should all be warned about? Since this is an unsigned integer, shouldn't I have gotten an error? uint foo = 10; foo = foo - 35; Console.WriteLine(foo); Output:…
Scott Jore
  • 71
  • 8
0
votes
1 answer

Not sure where my code is going wrong when using improfile in MATLAB

I am currently working on code which takes a stack of images and calculates the intensity profiles of these stacks to compare them with another stack of images. Here's my code: for i = 1:c_frames d_Img(:,:) = d_I(i,:,:); c_Img(:,:) =…
SDG
  • 2,260
  • 8
  • 35
  • 77
0
votes
1 answer

c++ (OpenBSD 5.8 amd64), outputting uint64_t as a real number

Trying to understand why I get the following output from my program: $ ./chartouintest UInts: 153 97 67 49 139 0 3 129 Hexes: 99 61 43 31 8b 00 03 81 uint64 val: 8103008b31436199 $ I am trying to output just the actual UInt64 numerical value,…
nethereal
  • 11
  • 2
0
votes
2 answers

Send a NSString with \0

I am trying to send a string terminated with \0 to a tcp socket but it seems the \0 does never reach its destination. Using this code: NSString* s=@" \0_"; uint8_t *buf = (uint8_t *)[s UTF8String]; int resCode = [outputStream write:buf…
Daniel
  • 20,420
  • 10
  • 92
  • 149
0
votes
1 answer

UInt8[4] to Int in swift

I use following function to implement Int to UInt8[4] converter: func toByteArray(var value: Int) -> [UInt8] { var msgLength = [UInt8](count: 4, repeatedValue: 0) for i in 0...3 { msgLength[i] = UInt8(0x0000FF & value >> Int((3…
fcbflying
  • 693
  • 1
  • 7
  • 23
0
votes
2 answers

C# constant list of values

I want control a other device with a C# program, this device have something like registers for read and write. So I searching something to enter all register numbers to get a better human readable code and to have central config place. All the…
0
votes
1 answer

Assign octal/hex declared INT/UINT to another variable

My WIN32 (C++) code has a UINT lets call it number. The value of this UINT (or INT doesn't matter) start with a 0 and is recognized as an octal value. It's possible to use the standart operators and the value will keep the octal-system. The same is…
0
votes
2 answers

Issue working with uint2 and CUDA

Recently I started working with CUDA and Ethereum and I found a little bit of code snipet on a function that when I try to port to a cuda file I get some errors. Here is the code snippet: void keccak_f1600_round(uint2* a, uint r, uint…
tudoricc
  • 709
  • 1
  • 12
  • 31
0
votes
1 answer

Treatment of integers of different size

A general question about supporting and treatment of multiple different integer sizes and whether they should be treated as independent types (like string vs int) or one a subset of the other. Specifically I'm considering uint8_t and uint32_t. I…
Joey O
  • 95
  • 2
  • 10
0
votes
1 answer

Entity framework with Uint DataContractJsonSerializer

I have an api which I call that return JSON. This I deserialize to objects using DataContractJsonSerializer. My JSON can have uint values ranging higher than int.MaxValue so I need to have a uint property on my classes to avoid exception. This class…
Evelie
  • 2,919
  • 2
  • 14
  • 21
0
votes
1 answer

Ask an uint, get an int

I know the use of anonym function have to be done with parsimony but : private function getAnonymFct() : Function { return function () : void { var num : uint = -1; if( num < uint.MIN_VALUE ) trace( "WTF ??" ); …
Simon Eyraud
  • 2,445
  • 1
  • 20
  • 22
0
votes
3 answers

How to use MFC Resource id stored as string

I am developing an MFC application in which I have menus defined in .rc file. I have an requirement for removing of few menu items at run time which are defined in xml file. The menu ids are stored as string in xml as like…
srajeshnkl
  • 883
  • 3
  • 16
  • 49
0
votes
2 answers

Once again: Not convertible to UInt8

I like Swift, but its number type conversion quirks are starting to drive me mad... Why ist the following code resulting in a LogLevel is not convertible to UInt8 error (in the if statement)? import Foundation; enum LogLevel : Int { case System…
BadmintonCat
  • 9,416
  • 14
  • 78
  • 129