Questions tagged [int32]

int32 is a datatype that represents an integer and is coded on 32 bits in memory.

int32 is a datatype that represents an (a whole number, not a fraction) and is coded on 32 bits in memory. Unlike its counterpart which is , int32 can be used to store positive and negative integers, of values between -231 to 231 - 1.

187 questions
1
vote
1 answer

WPF: System.Windows.Int32Rect ---> System.Windows.Int32Point?

You know how System.Drawing.Rectangle was replaced by System.Windows.Int32Rect? (As far as non-floating-point shapes are concerned ...) Is there a similar new object for an integer point or size? If not, I'll just use System.Drawing - but that…
Giffyguy
  • 20,378
  • 34
  • 97
  • 168
1
vote
4 answers

Is it thread-safe to increment an Int32 in a Timer callback?

I want to increment an integer that gets incremented in a timer event handler and read by the main and other worker threads i.e. one writer thread and multiple reader threads. Will it be thread-safe? I have a timer in my application that runs every…
bsobaid
  • 955
  • 1
  • 16
  • 36
1
vote
2 answers

C# GetHashCode with two Int16, also returns only up to Int32?

Sorry to combine two questions into one, they are related. HashCodes for HashSets and the such. As I understand it, they must be unique, not change, and represent any configuration of an object as a single number. My first question is that for my…
alan2here
  • 3,223
  • 6
  • 37
  • 62
0
votes
3 answers

How cast type int with atoi() to Int32

I've got a piece of C code: Int32 tmp = atoi("314"); It throws an error: error: Int32 undeclared (first use in this function) I have no idea why? Could you help me? Maybe it is problem with…
ruhungry
  • 4,506
  • 20
  • 54
  • 98
0
votes
1 answer

LINQ - to Entities does not recognise the method Boolean (int32)

I have a class called Person that has a method called hasPermission(Int 32) I'm trying to call some linq and have tried various options but haven't managed to find a solution yet if anyone has any ideas, please can you help. I currently…
gadgetgem
  • 63
  • 11
0
votes
2 answers

"value was not in a correct format" error when converting a string to an int32

this is my code; string a="11.4"; int b,c; b=2; c= convert.toint32(a) * b I get this error; Input string was not in a correct format how can i convert "a"?
Mehmet
  • 149
  • 1
  • 3
  • 12
0
votes
1 answer

indexof on 64 vs 32 bit pc

i'm using the line below to find a position of the test withing HTML document and it works fine on a 64bit machine but does not work on my 32bit Windows 2008 server. IntStart1 variable returns 2 on 64bit and 0000029ae on 32 bit. please help. Int32…
Paul Kogan
  • 681
  • 1
  • 5
  • 3
0
votes
0 answers

The model item passed into the dictionary is of type System.Int32

I am receiving this error message when trying to go to the "CreatePreparer" view. I've tried converting the Ints to Int32 in the model, as well as converting the Ints in the reader to string. I inserted a break point just before the controller…
Jake
  • 13
  • 6
0
votes
0 answers

How to use Int32 as Index without an error?

I have an array which is large, but doesn't need an Int with 8 Byes. So I decided to use Int32 as index. I also defined an extension to avoid error messages, that you can't use Int32 but to convert it to Int: extension Array { subscript(index:…
Peter71
  • 2,180
  • 4
  • 20
  • 33
0
votes
1 answer

Python3.8 pySerial sending int64 as signed bytes

I'm trying to convert a class 'numpy.int64'named "int_array" into bytes. In the past I used this structure (-1024).to_bytes(8, byteorder='big', signed=True) and worked fine. Now, saving all the integers into a matrix, it doesn't allow me to do…
0
votes
0 answers

Fetch request integers change after applying .json()

Can someone explain what is happening here? I used fetch and noticed that converting my response to json returns different results. I simplified the problem down to this. Try this on any JSON Pretty Print website online. Input:…
aivarastee
  • 81
  • 2
  • 12
0
votes
1 answer

How to accurately emulate `int32`, signed 2's complement 32-bit integers, in python

Python supports arbitrary bit-length integers, but I would like to emulate int32, 32-bit integers, in all their overflow glory. I have few questions and comments about this int32 has INT32_MIN = -(1 << 31) and INT32_MAX = (1 << 31) - 1 Does python…
joseville
  • 685
  • 3
  • 16
0
votes
1 answer

How to handle int and int64 when parsing json

I have a program that loops through json and grabs the values. This works find until it gets to an integer that is above what int32 handles. 2021-09-10 08:00:02.7576|ERROR|System.OverflowException: Value was either too large or too small for an…
rcmpayne
  • 163
  • 2
  • 15
0
votes
1 answer

How do you check the equivalence of a numpy.int64 value stored in a tf.Tensor dataset object in Python 3?

I would like to know whether there is an easy way to check the equivalence of an int32 value stored in a tf.Tensor dataset object of class 'numpy.int64'. The integer value will change over time, and I would like to get a logical indicator of 'True'…
hackr
  • 41
  • 7
0
votes
1 answer

How can I compare values in 2D array with values in 1D array in GoLang?

I need to compare 1D array's and 2D array's values and to return the result array which has similar values using Go: func absolutePermutation(n int32, k int32) []int32 { var position []int32 var i, j int32 var result []int32 for i =…