# Questions tagged [numbers]

A number is a mathematical object used to count, measure and label. Questions about using numbers in variables processing, numbers processing, conversion, display, logical numerical changes, data type existence, etc.For questions regarding phone numbers, please use tag [phone-number].

**0**

votes

**0**answers

16 views

### Row number in dataframe based on multiple parameters in R

I wish to find the row number, based on multiple parameters. I have made this test matrix:data=[,1] [,2] [,3][1,] "1" "a" "0" [2,] "2" "b" "0" [3,] "3" "c" "0" [4,] "4" "a" "0" [5,...

**0**

votes

**1**answer

13 views

### Angular pagination using PrimeNG

I'm trying to paginate a table in my Angular project. Doing the following:app.module.tsimport { PaginatorModule } from 'primeng/paginator';component.html<p-table [columns]="bookCols" [...

**1**

vote

**2**answers

42 views

### Calculating a number by experience point correlation

Looking at this RuneScape experience table: http://runescape.wikia.com/wiki/Experience/TableYou can see that an experience point amount correlates to a "level"where:if (xp < 83){level=...

**-1**

votes

**2**answers

25 views

### How to validate number ranges of the form ]0,100000]

I need to validate numbers where the validation rule looks like this (for example): ]0,1000[ meaning that the numbers are only valid in the range >0 and <=1000Also there is validation rule ...

**-2**

votes

**1**answer

15 views

### Adding two digits and finding their carry without IF and While

I want to add two three digit numbers, digit by digit, and need to get value of carry after addition without using IF/ELSE and While/For. For example, if I am adding 9 and 9, I need to get the carry ...

**0**

votes

**0**answers

8 views

### What is the best approach to pick range of numbers again and again from the range of numbers?

Let's suppose I have an array of 200 numbers from 1 to 200. If a user want to pick numbers from range 5 to 60 at a time. And next time, again if he wants to pick number from range next time, what is ...

**-1**

votes

**1**answer

68 views

### Why does this array in C keeps assigning garbage value to itself?

I have been trying this popular question, where I have to multiply two very large numbers in C (without using any libraries other than stdio.h). I know my algorithm and code are correct, since it ...

**0**

votes

**1**answer

22 views

### Get Unicode Numbers Text from Windows Forms Textbox

I can Type both English Numbers and Persian Numbers in .net 4 Windows Form Text-boxsuch as 123 and ۱۲۳ but always i get English numbers from Text-box.Text property 123

**-2**

votes

**2**answers

21 views

### Add trailing zeros to an integer without converting to string in JS?

I'm looking to add decimals to the end of my integer. As an example:15=> 15.00The problem with methods like toFixed is that it will convert it into a string. I've tried to use parseFloat() and ...

**1**

vote

**1**answer

54 views

### gcd of two numbers one of them is too large

I was going through a question which ask to calculate gcd(a-b,a^n+b^n)%(10^9+7) where a,b,n can be as large as 10^12.I am able to solve this for a,b and n for very small numbers and fermat's theorem ...

**2**

votes

**7**answers

86 views

### What is the fastest way to represent number as the sum of powers of two in python

For example >>> two_powers(42)>>> (2, 8, 32)My current naive implementation (taken from here) looks like thatdef two_powers(num):return tuple(2 ** i for i, j in enumerate(...

**0**

votes

**1**answer

14 views

### Increment Last Number in a Text String in Excel 2007

I am trying to import large number of data in Opencart. For the product image I should write image path like catalog/Products/fashion/bags/01.jpgcatalog/Products/fashion/bags/02.jpgcatalog/...

**-5**

votes

**0**answers

24 views

### In Javscript generate unique random numbers with some space between them?

I want to generate 100 random number between 1-1000 in javascript. I need those numbers to be unique and not too close to each other. They need to have a padding of like 20 between each other

**0**

votes

**0**answers

37 views

### Why var initialized with number set to Int32 [duplicate]

I am not sure, if this is right place to ask this question.Moderator can move this question to appropriate place if required.I have question in C#.NETI have below class with overloaded methods,...

**1**

vote

**0**answers

49 views

### Error: Browser auto increments number in json response

I have an API, that returns a JSON object. One of the keys of the JSON object has the value of type 'array of integers'. The issue is browser increments the numbers in the array by 1 when receiving it ...

**0**

votes

**1**answer

24 views

### Numbers appear before content CSS in RTL

I am Designing a Custom unordered list using the following :.list-light li a:before {content: "\f104";font-family: FontAwesome;margin-left: 8px;color: #bcc987;font-size: 12px;}it works just ...

**0**

votes

**0**answers

12 views

### Fun with Number Theory

Is there any relation between a^n + b^n with a+b and a-b.So that we can find HCF and LCM of it with these both.I tried to expand a^n+b^n binomially but does not found any relation with any of two.

**1**

vote

**1**answer

30 views

### Get language wise numbers using culture info in c#

I'm working on language wise numbers and I'm doing it via CultureInfo.CultureInfo class provide Native digit for Arabic and Gujarati language but not for Hindi.For example: My number is in ...

**-1**

votes

**2**answers

22 views

### Regex for a valid JavaScript number?

I'm trying to find a regex that checks if a string contains a valid JavaScript number.So far i got this /(\d|\.\d|e\d)+/i. It's almost what I need but not completely. It now checks for a digit, a ...

**0**

votes

**1**answer

19 views

### MySQL adding extra rows to a selection

Is it possible to format somehow the MySQL SELECT query, so if the records contain nonconsecutive numbers, the missing numbers to be added accordingly, i.e. if the database contains765767768769...

**0**

votes

**3**answers

43 views

### Python Error: How can I print a number stored as a variable without making it a string?

I am creating a practice program that displays the name of a character along with his age. For some reason, whenever I store the character's age without putting quotes around it, it will not print.I ...

**0**

votes

**0**answers

19 views

### Large number division results are not correct [duplicate]

I am running this code:while (zahl !=0):buffer=zahlrest=zahl%2binaryString.append(rest)zahl=int(zahl/int(2))print("%i / 2=%i Rest: %i" % (buffer, zahl, rest))For ...

**1**

vote

**2**answers

46 views

### FizzBuzz only prints numbers divisible by three

I am learning JavaScript, and an exercise that I am doing...I don't seem to "get" it. The objective to write a program using console.log that prints all numbers from 1 to 100, with exceptions.The ...

**-5**

votes

**1**answer

27 views

### Regex that accepts only numbers (0-9) and NO white spaces

I need a regex that will accept only digits from 0-9 and no white spaces. Example:35 62 30 36 63 63 61 63 39 65 34 66 64 33 34 62 66 66 61 63 34 38 39 38 And i want this:...

**0**

votes

**3**answers

53 views

### How to determine is a value falls within a list of ranges?

I have an input type that contains a list of Min & Max values. What I need to do is validate the list to ensure that there is no overlap between the min/max values. The DTO looks similar to this...

**0**

votes

**2**answers

63 views

### C# Find and replace a price in a long string

I have a long string representing a web page in html, I have to change the price of a product detail, the string to be replaced would be like this: 10.20 € or 100.22 € or 1.50 € etc.the price may ...

**-2**

votes

**0**answers

47 views

### C - How to store binary numbers

I have written following code to take a binary string such as 01010101 input from the user and I have to do binary addition on it.#include <stdio.h>int main () {int a[10]={0};int ...

**0**

votes

**0**answers

59 views

### Generate mysql data table with set of numbers (5/40 and 2/8)

I want generate build a table with probabilities of numbers as records, from 1 to 45 (similar to lottery format) and additional 2 numbers from 1 to 8, the result will be like 126m which I can add to ...

**0**

votes

**0**answers

12 views

### Changing port number in easyphp devserver 17

I am using EasyPHP Devserver 17. I want to change it port number to 127.0.0.1:786. Because my all application has set to this type only. This new installation has default only 4 port 8080,8000,8008,...

**0**

votes

**6**answers

56 views

### ORACLE-SQL : how to calculate 2 time in number type?

I kept my Time data as number type (NUMBER(4,2)) and I want to calculate the column like below2.15 (2:15 am.) - 1.45 (1:45 am)***result***0.30 (a half hour)Please kindly explain me the method ...