## What does "X += nb; Y+= nb;" mean if X and Y are two vectors and nb is an integer?

at page 8 of the paper : [Reducing floating point error in dot product using the superblock family of algorithms- Anthony M. Castaldo , R.Clint Whaley, and Anthony T. Chronopouos][1] there is the following code: typedef double scalar; typedef sca...
more »

## Python 3: RuntimeWarning with numpy.power

When using numpy.power(2,N), where N is an integer, I encounter the following issue: In[1] np.power(2,63) Out[1] -9223372036854775808 RuntimeWarning: invalid value encountered in power and even more strangely, In[2] np.power(2,63)*2 Out[2] 0 Th...
more »

## strange behavior when fixing integer lengths in bash

In my bash script, I set-up the following operations year=0050 echo \$(printf %04d \$year) >0040 I do not understand why 0040 is returned instead of 0050. I eventually found that to get the system to print 0050 correctly, I will have to do this i...
more »

## Setting multpile integers with multiple inputs in Java?

First time posting and just a novice at programming so this may come off as a stupid question, but is it possible to set multiple integers with multiple keyboard inputs via Kb.nextInt(); It currently looks like this: Scanner Kb = new Scanner(Syste...
more »

## Integer concenation with macro

How to concenate integer correctly with macro ? I must call it twice here because i can't add something after ","(error) #define concat(a,b,c) a##b##c dim as integer a=10,b=20,c=30,d d = a concat(*100+,,)b d = d concat(*100+,,)c ?d 'output = 102030...
more »

## Integer overflow test operator? (&+)

This question could just be another case of interpreting the operator incorrectly. But a while ago, I saw someone tweeting about an operator that allegedly can be used to check for integer overflow in C. Namely the &+ (ampersand-plus) operator, a...
more »

## Counting the number of restricted Integer partitions

Original problem: Let N be a positive integer (actually, N <= 2000) and P - set of all possible partitions of the N, where with and . Let A be the number of partitions . Find the A. Input: N. Output: A - the number of partitions . What have I...
more »

## How to make global empty integer?

How to declare global empty integer? I have simple code but i don't know how to declare a variable before def. In java I can do just that: public int a; but how to do it in python? Without this, the third if not working My code: def abcd: if s<...
more »

## Convert text to integer to compare in C#

The C# program receives a string labeled: 1.2345 V I need to compare this value using < or > in a 'if' statement. How do I convert the string above to a integer? I tried to use: int anInteger; anInteger = Convert.ToInt32(textBox1.Text); anInt...
more »

## How do i use separate two integers using dot in java?

I want to make a user to enter integers separated with dot like (11.56.98) to use after that x=11 y=56 z=98 `Scanner s = new Scanner(System.in); System.out.print("Enter Your number like (36.52.10): "); int x = s.nextInt(); int y = s....
more »

## Round Only Percentages to Nearest Multiple of 5

I have a CSV file that contains some values. I need to round only each of the percentages in the text file, to the nearest integer of 5. file 25,83%,22%,67%,43%,30,18%,2,11% awk Code: awk '{for (i=1; i<=NF; i++) \$i = int( (\$i+2) / 5) * 5 "%" ...
more »

## Round Numerical Values to Nearest Multiple of 5

I have a text file with one line of percentages. I need to round all of the numbers in the text file to the nearest integer of 5, for example... 4 rounds up to 5, 8 rounds up to 10, 12 rounds down to 10, 17 rounds down to 15, etc... Text File: 25%...
more »

## Can't access the values of nested list elements, Java 8

First of all, I easily got this to work with the regular way of populating and accessing data from an array, so that as a suggested solution isn't what I'm looking for. I'm trying to better understand how to populate and access data from a multi-dime...
more »

## JSlider only takes integers

I think I've got a hard question... I have programmed a Musicplayer and I have a JSlider at a JFrame as a progress-bar for each song. He is adding every second the current time of the song multiplied by the lenght of the slider which is divided by th...
more »

## Finding Amount of Divisors

I need to write a function in #lang racket that determines the amount of divisors a positive integer has. (Ex: 6 has 4 divisors; 1,2,3,6) So far I have: (define (divides a b) (if (= 0 (modulo a b)) #t #f)) I need to use this helper function to...
more »

## primitive int with same value of 2 Integer objects will point to which one of them?

int a = 30; Integer b = new Integer(30); if( b1 == b2) System.out.println("Hello"); else System.out.println("Hi"); Output : Hello Right. As a will also point to integer Object of b. Also explained here : Comparing Integer objects But...
more »

## Read data into 2d array and find lowest value as file is read into array

I'm having a problem with a "file not found error" while attempting to read a text file containing integers only into a 2d array. I'm also trying to get the lowest number of the file while it's being read. I know I can just check the array afterwar...
more »

## How did the int variable get initialize without a value

In this the Choose variable needs to be initialized, a value needs to be added. Int choose; If(choose==1){ //Do something } While this a value is not added and it still works. Int choose; Scanner userinput=new Scanner(System.in); Choose=userinput...
more »

## VB If number is integer Then write it Else don´t show anything, How can I do?

I have this... Dim x As Integer Dim isn As Decimal Dim fsn As Decimal Dim inc As Decimal For m = isn To fsn Step inc Dim r As String = x * m If r.Contains(".") Then Else Console.WriteLine(r) ...
more »

## Best way to check if value is integer ? Coldfusion 9

I have fields to test and make sure they only accept integers. There is few functions but I wasn't sure which one is the best. First I tried isValid("integer",value) but I have discovered that "1,5" will be accepted as an integer. So then I tried isN...
more »

## Get Integer from XML File and Set to Static Variable?

In Android Studio, I have an integer.xml file where I define two integers. min and max. If I set min to 8, how do I get this value and set it to a static in Java? Something like: private static final int MIN = getInteger(R.integer.min); I know ...
more »

## Convert large decimal number to hexadecimal notation

When creating a String object in Swift you can use a String Format Specifier to convert an integer to hexadecimal notation. print(String(format:"%x", 1234)) // output: 4d2 // expected output: 4d2 But when numbers become bigger, the output is not a...
more »

## How can I determine the type of array and return either its duplicated or unique number in JavaScript

How can I determine the of an array (in this case, 'duplicate' or 'unique') to make it return either the duplicated or unique number. The array arr contains positive integers. It may be one of the following: There are numbers 1 to n, only one numbe...
more »

## Get Integer list from one file

This script checks skills from the config file and allows using only them (in order stop hacking). Here is the process of how to work my script works: #1 There is special .ini configuration file with this skill list: CommunityAvailableBuffs = 115...
more »

## How to perform signed comparison between unsigned operands?

I have declared 4 unsigned variables: uint32_t empty_bucket; uint32_t base_bucket; uint32_t hop_size; uint32_t ht_size; I want to perform a signed conditional check: if (empty_bucket < base_bucket + (hop_size - 1) - ht_size) Knowing that bas...
more »

## EXPECTED_INTEGER — Issues with Square payment portal

I'm having issues accepting payment through my ecommerce site. This only seems to happen randomly, I've accepted payment previous without issue but every so often this happens. Square API didn't have any description with the error code. Array ( [0] ...
more »

## Does converting integers with underscores throw silent errors?

I was working on an exercise earlier today, and it involved summing all the digits in a given integer. One of these digits had underscores. I decided to try and not use a regex to only catch the numbers. Instead, I simply converted the integer to a ...
more »

## Why is the output of the following code 1 and not 0?

@Test public void test(){ Map<String, Integer> a = new HashMap<>(); a.put("x", new Integer(0)); Integer i = a.get("x"); a.put("x", i++); i = a.get("x"); a.put("x", i++); i = ...
more »

## Unexpected negative value in Int32Array

const x = new Int32Array(1); x[0] = 699044815921; console.log(x[0]); -1034853327 Who can explain why there is a negetive number? ...
more »

## Python | Pandas | Objects | Convert to Integer or Float

Overview: I have scrapped some data off a website, put into a Pandas DataFrame but for some reason, I can't seem to convert the Data Type from an Object to an Integer or Float (for the point of this, either is fine). I have looked through a few pos...
more »

## how to get sum in jtable colmn

I'm trying to build my app and I need to get the sum of my jtable 5th column value, I used this code: public int getsum(){ int sum = 0; for (int i=0; i<jTable2.getRowCount(); i++) { sum = sum + Integer.parseInt(jTable2.getV...
more »

## CSV Import Decimal in Integer Access

I have to import a .CSV into Access on a daily basis. One of the fields is causing problems. The value is stored as '5,000'. This is not '5 point 0', but '5000' (five thousand). I've tried multiple combinations of decimal symbols and data types but...
more »

## How to store numbers of a file in a array of integers

I need to read a file with numbers and then store this numbers in a array, after that I need to remove the repeated numbers presenting in the array and subscribe the file. The problem is I can't even put the numbers on the file in a array of integers...
more »

## Algorithm to classify 10 digit keys

I'm looking for an algorithm that classifies differently formated 10 digit (mostly) integer keys. The training data set looks like that: +------------+----------------+ | key | classification | +------------+----------------+ | 1000012355 | U...
more »