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
0
votes
0 answers

python convert list of binarys into int32

I have a list with about 32800 elements which are all 0 or 1, so they are binary. (note 0/1 not true/false) Now I need element 0 till 31 in an integer (32bit) format, and save the values in another list. My recent try is too slow, it should take…
InvAdErZz
  • 49
  • 1
  • 11
0
votes
0 answers

SQL ID to Int32 - there has to be a quicker way (Swift)

Trying to turn a record ID into an Int32 and ending up with a verbose three line/layer trick to achieve the obvious. There must be a shorter way. Can someone put me out of my misery? var XX = resultSet.stringForColumn("ID") var XXX =…
Edward Hasted
  • 3,201
  • 8
  • 30
  • 48
0
votes
5 answers

Reorder digits in integer using C#

I want to ask how I can reorder the digits in an Int32 so they result in the biggest possible number. Here is an example which visualizes what I am trying to do: 2927466 -> 9766422 12492771 -> 97742211 I want to perform the ordering of the digits…
yq8
  • 145
  • 1
  • 10
0
votes
1 answer

Int32.Parse C# error

public class ChemDB : MonoBehaviour { private int i; void Start () { string[] lines = System.IO.File.ReadAllLines("Assets/Scripts/Data/Database.txt"); int…
Zadak Leader
  • 29
  • 11
0
votes
2 answers

Playground(Swift) Excecution was interrupted issue

Same piece of code can't run on playground but can in the xcode project. There is error"Excuetion was interrupted.reason:EXC_BAD_INSTRUCTION...." Here is the detail snapshot Question here is to figure out why this issue happen ? Why exist in…
Forrest
  • 122,703
  • 20
  • 73
  • 107
0
votes
2 answers

How can I determine which element is causing an overflow?

I've got this code: String testData = File.ReadAllText("siteQueryTest.txt"); XDocument xmlDoc = XDocument.Parse(testData); List sitequeries = (from sitequery in xmlDoc.Descendants("SiteQuery") select new SiteQuery { Id =…
0
votes
1 answer

C variable blows up suddenly

I am facing a strange problem over a fairly simple piece of code. The relevant portion of the code is given below: void foo(int32 in_sd_id, int32 out_sd_id) { int32 nsds; /* number of data sets in the file */ int32 nattr;…
srsci
  • 239
  • 5
  • 10
0
votes
3 answers

Months between two integer dates

I have 2 dates as integers. How can i find the month difference between these two integers in c#? For example: Int32 beginDate= 20130307(yyyymmdd) Int32 beginDate= 20140507(yyyymmdd) I need the result as 14 months. I have already tried: DateTime…
user3661657
  • 183
  • 2
  • 2
  • 7
0
votes
0 answers

Why integer doesnt fit into system.int32

I have data Column type: system.int32 and I want to save a normal Integer value in it. For Example I want to save the Integer "1" into a system.int32 column. Then a exception is thrown which says "The Value is more then The Max.length of this…
steve
  • 123
  • 1
  • 14
0
votes
0 answers

how to multiply vector 'double' to vector 'int32' matlab

I have 1X6 double vector A (where values change during the run): 0.0155 0.1566 0.0454 0.0146 0.3967 0.1879 I have another 1x6 int32 vector B (where values also change during the run): 120 14 42 2874 …
mil
  • 301
  • 1
  • 2
  • 15
0
votes
2 answers

Can't convert to int32

I have this line of code that should convert a label and a textbox to int32 and then subtract them with eachother... retur = Convert.ToInt32(pengarTxtbox.Text) - Convert.ToInt32(kostarLbl.Text); retur is a int aswell. This line gives me the error:…
Hugo Löwgren
  • 47
  • 1
  • 1
  • 8
0
votes
4 answers

Converting decimal to binary with user input

I wanna make a c# application that convert a decimal number into binary with the input from the user. I get a red squiggly line on bin, when declaring bin = Convert.ToString(decToBin,2);. I don't understand my problem, so any help would be…
TNJ
  • 3
  • 3
0
votes
2 answers

How To Read File Into A Two Dimensional Array in c#

I have a file (c:\kk.bmp). I want to read this file into a two dimensional array[Width,Height] of byte and a two dimensional array[Width,Height] of Int32, such as byte[,] byte_array = File.ReadAllBytes(filename_mpeg4); // Not correct I want to…
user3226824
  • 47
  • 1
  • 6
0
votes
1 answer

Wrong in convert four byte to integer then display in textbox

I use array of byte and I need to convert this 4 byte to integer and display result in textbox ,the result must 320 but it display 64 byte[] bb = new byte[4] { 64, 1, 0, 0 }; textBox1.Text = Convert.ToInt32(bb[0]).ToString(); // display result 64…
user2922938
  • 227
  • 5
  • 13
0
votes
1 answer

Set time_t to unsigned 32-bit int

I'm doing some embedded software and its time_t is unsigned 32-bit integer. I have a PC simulator whose time_t appears to be signed 32-bit integer. Is there any way to tell Visual C to use uint32_t?
leon
  • 435
  • 1
  • 4
  • 12