Questions tagged [range]
A range is an extent of values between its lower and upper bound. It can refer to a DOM Range, the Ruby Range class, the Python range function, Perl 5's `..` operator, Perl 6's Range Class, or PostgreSQL's range types.
9,925
questions
-1
votes
0
answers
13
views
VBA Add an object set as Range but get Run-time error '1004: Error in method Range' of Global object occurred [closed]
I want to add the following Range with the WorksheetFunction function. Sum, but appears Run-time error '1004: Error in method Range' of Global object occurred, what I want to do is in a workbook that ...
-2
votes
0
answers
22
views
Program to find sum of 50 inputs using for loop
I have used a variable and for loop to execute it 50 times to get 50 inputs. But I am stuck on how to find the sum of these 50 inputs. This is all I have now. I only know concept of for loop, range ...
-1
votes
1
answer
27
views
Selecting a row where range lies between two columns in mysql
I have 4 columns in my table
id , amount_from, amount_to, amount
My value is lets suppose 350000
The data in the table is:
i want to query which column have a amount_from greater then 350000 and ...
-2
votes
0
answers
21
views
In python how can I make a function that prints all the perfect numbers in a range? [closed]
I wanted to make a function that prints all the perfect numbers that are present in a given range but when I run the code it won't work. Please provide me with new a solution or advise some ...
0
votes
0
answers
14
views
Copying and Pasting Range into Outlook email
Have the following VBA code copying and pasting the range below into Outlook email, and the grids are pasted one below the other (Pic1)
Set LastWkArr2 = LastWkWB.Worksheets("Outlook")....
-1
votes
0
answers
19
views
Select and Export All Rows Between Two Different Cell Names, Loop
I am working with datasets that have many thousands of rows. I am looking to select the rows including and between the start and end of a given condition (Nominal cell values) and export only those ...
0
votes
0
answers
6
views
add missing dates to my list of dates and numbers
I have lists of dates and corresponding numbers. I want to compare/contrast these lists. However, they don't all have entries/data on every date. Some have data for the same date, others don't. I want ...
-2
votes
0
answers
14
views
VBA count function with named ranges and between sheets [closed]
I have working code that counts the number of non blank values and uses that to output an index (i) value that I use in for loops further in the code. I only want to declare the cell references of the ...
2
votes
0
answers
44
views
Why slice [::-1] is the same as [-1::-1]? [duplicate]
I just wonder why slice [::-1] is the same as [-1::-1]?
Syntax for reference: [start:stop:step]
It's interesting because almost every Internet article about Python slices states that start defaults to ...
0
votes
1
answer
42
views
Does Python provide range() as generator?
Does Python already provide a function that generates the endless sequence 0,1,2,3,... ?
I mean this:
def gen_range():
count = 0
while True:
yield count
count = count + 1
0
votes
0
answers
24
views
Implementing IF and vlook up commands using apps scripts [closed]
Thank you all for your invaluable help for those of us who are very new to apps scripts. I would be glad if you could help with me – I have searched but could not figure out how to do this. I have a ...
0
votes
0
answers
30
views
VBA Range method won't work with multiple selection
I don't have much experience with VBA and have been experimenting with the range method.
I want to selcet multiple ranges and using the record Macro button I obtain a code like the following:
Sub ...
0
votes
2
answers
22
views
Dynamically update unique number input field with multiple slider range inputs (Javascript)
I have multiple fields in a form that each have a input range slider and a number input. I would like to update the individual number input field based on the range slider value. I was able to make ...
0
votes
1
answer
41
views
Swift - Difference limit for closed range slider
I am trying to make a slider where the overall range should be 0-300. But I am putting a range on the slider so a user can choose between 0-10 or 20-30 for example. The problem I am facing is figuring ...
0
votes
1
answer
48
views
SystemVerilog - Adder Tree - Conditional localparam error
I've been trying to write a parameterized adder tree in SystemVerilog(the code is at the end). To do that, I use localparams for the number of inputs of each level of the tree(level_limit) and for the ...
-1
votes
0
answers
20
views
create a range in a csv file
I'm a complete novice with Python, so novice that I don't know where to look at for solving this little problem. I was looking for an easy solution but it would take me probably a week, therefore, ...
-2
votes
0
answers
19
views
error in using list comphrension and range in python [duplicate]
I wanted to display all numbers between 1 to 50 that are divisible by 3 but why did the numbers come multiple times like eg - 3,6,9..49
369...49
and numbers also came wrong.
my thought process was ...
0
votes
4
answers
57
views
Excel reference a range based on a string
I would like to input a number in a range from another sheet and I don't know how to do it.
The function:
=PERCENTRANK.INC(sheet1!$C$6:$C$**96**;sheet1!$C$6))
For example: The result of this function ...
0
votes
1
answer
38
views
Error 9 displayed when using my own defined arrays in this code in VBA
I have 2 arrays taken from 2 ranges in a sheet. I'm trying to create a third array that contains only the values contained in array 1 that are missing in array 2 (I found this code online).
Array 2´s ...
0
votes
0
answers
17
views
Validate the date range picker when user selects same date range
I have 2 rows of date picker. When user selected date range from first row, then on the next row user should not be able to select same date range or any date from that range. And user should get a ...
0
votes
1
answer
28
views
using the code for different set of ranges
Situation
Hello SO,
I have a situation where, I have the following code which I would like to use over other ranges to. But in this case, when the case ranges changes, the clear contents and otehr ...
0
votes
0
answers
10
views
Why is minimum exposure value different at the same model?
When I checked min/max value via SENSOR_INFO_EXPOSURE_TIME_RANGE on the two or more device, the minimum value of each device are different.
CameraCharacteristics.SENSOR_INFO_EXPOSURE_TIME_RANGE
I ...
0
votes
1
answer
39
views
Find max local value in a range
I've been struggling with a problem for some days and I can't find the way.
I just need to find the MAX value in a range, but this is a dynamic range looking 2 rows forward and the 2 previous rows if ...
0
votes
2
answers
26
views
Offset issue moving columns from one WS to another
I'm simply trying to move some information from a column to another column on another sheet and using offset to get it to start on the row i need it to start on. trying to not use .copy or .cut or any ...
1
vote
1
answer
59
views
How to check if the elements within a list of lists have overlapping numerical values
I am working with a list of lists where some items have overlapping values.
list=[[7, 11, 'Feature01'],
[2, 6, 'Feature02'],
[31, 59, 'Feature03'],
[31, 41, 'Feature04'],
[20, ...
-1
votes
3
answers
33
views
The data of n=10 moments of time of one day are given buy hours minutes and seconds how to make it compare compares any two moments of time
Im trying to write a program that has a data of n = 10 which is the moments of time of one day, these are: hours (values from 0
to 23), minutes (from 0 to 59) and seconds (from 0 to 59). Write a ...
0
votes
2
answers
44
views
having trouble with range type
the second part of the code it's supposed to get the index(even)and then multiply it by the length of the string. after that, it should replace the word in the list with the result of the operation ...
1
vote
2
answers
31
views
Pasting range vba in values without using clipboard
I am trying to copy and paste a range in values without using the clipboard, below code works but doesn't copy in values (includes forumlas etc):
any ideas as how to make this work?
NbRowsPnLD1 = ...
1
vote
2
answers
57
views
Strange speeds of `x in range(...)` checks
With r = range(1500, 2500), I benchmarked x in r for x below/in/above the range:
1000 in r : 58 ns ± 0 ns
2000 in r : 101 ns ± 1 ns
3000 in r : 58 ns ± 0 ns
Checking 1000 is faster than checking ...
0
votes
1
answer
16
views
Loop - Insert powerpoint title with VBA for 10 slides
I saw some code in stackoverflow that inserts a title in one slide. I would like to add the same slide title for a given number of slides, for example, for the first ten slides.
I understand it can be ...
0
votes
1
answer
42
views
condition to randomly replace a character
I have a sequence, to which I replace 5 characters at random, the problem I have is how to replace the character at random, this in some cases is replaced by itself, how can I put a conditionality so ...
0
votes
1
answer
36
views
Difference in iterating through range vs enumerate
next(range(2))
gives error,
TypeError: 'range' object is not an iterator
but,
next(iter(range(2)))
works, and gives the output 0
but,
next(enumerate('a'))
works, and gives the output
(0, 'a')
and,...
0
votes
1
answer
10
views
Disable Quasar slider arrow key events
When doing a slider input the arrow keys are bound to that slider, even after the mouse event is finished. Using arrowLeft/arrowRight steps the q-slider one value and stops the key event.
I'm using ...
-2
votes
0
answers
22
views
Find Numbers between 2 Numbers SQL [duplicate]
I have a table Numbers and I need to find the numbers between 2 numbers in SQL. How do I get Range column? My input table has columns V1 and V2 and I need an output like the table below. Please help ...
-1
votes
1
answer
26
views
Pandas fill dataframe with count of values within a range from another dataframe
I currently have two dataframes, df_ages and df_count:
In [1]: df_ages
Out [1]:
Enrolled Age
1 Y 44
2 Y 35
3 N ...
-2
votes
1
answer
30
views
python for loop to get the factorial of a number?
# factorial program
n = int(input())
fact = 1
for i in range(n,1,-1): #line4 # this line print the range in reverce
fact = fact*i
print(fact)
some explain the line4. how is the for loop ...
-1
votes
0
answers
30
views
Regex required for positive integer numbers, without decimal and ranging from 0-365 [duplicate]
I want to check if the input number is in range of 0-365(days of 1 year)
0
votes
1
answer
19
views
Subset a table by whether two columns fall within any reference range in a lookup table in R
R Table1: In reality many more rows
PatientID chr pos type end length
AB1 1 2431 DEL 2100 -331
AC3 1 98041 INV 99100 1059
AG6 1 8743 BND 9000 257
Table 2: In reality ...
0
votes
2
answers
37
views
How do I check a range where the higher value is dynamic in C#?
The program im writing currently I need to check if the year given by the user is within a certain range. The bottom value is a fixed value, but the top of this range should be capped at the current ...
0
votes
3
answers
50
views
Kotlin: how to check if 2 date ranges are overlapping? [duplicate]
my current solution is like this:
(A.startAt in B.startAt..B.endAt) ||
(A.endAt in B.startAt..B.endAt) ||
(A.startAt <= B.startAt && A.endAt >= B.endAt)
if there is more ...
0
votes
1
answer
29
views
JavaScript range - after inserting a node how to set the caret after the that node
I'm trying to set some emoji into a contenteditable div by using the javascript range.
But after I insert the new emoji node, the caret is set before the new emoji and not after.
I tried the follow ...
1
vote
2
answers
29
views
Insert formatted text in word document with VBA Userform
I have a userform which contains some textboxes and a button.
when button is pressed it insert text at the end of the document. however I need to insert the text as following format:
First line bold -...
0
votes
0
answers
13
views
How to get the window selection for nested nodes have shadow DOM
If we have nested elements with shadow DOM and try to get selection using. Is there any way to get the correct one for any selection includes cases like this? demo
window.getSelection() // incorrect ...
0
votes
2
answers
23
views
How To remove the spaces between generated numbers from by range object in python like stripe() method applying on strings
Then How I get the Same effect of stripe method but on integers
this is my code to generate out but like
1
121
12321
1234321
123454321
but the result was : i want to remove spaces between numbers in ...
0
votes
2
answers
24
views
Selecting a range based on values of two other columns
I have two columns with the range O6:P that evaluate the row of data in J and display Pass or Fail. The results in O and in P are not always the same. One can display Passing and the other will have ...
1
vote
0
answers
34
views
Why the erf functions have no range error?
The erfcf(FLT_MAX) produces 0.0f and sets errno to ERANGE.
The erff(FLT_MAX) produces 1.0f and does not set errno to ERANGE.
In both cases returned results differ from the "true results" (i....
0
votes
0
answers
9
views
How to copy range from another sheet and paste to current sheet [duplicate]
please help. I try to copy range from one sheet in workbook to another sheet in same workbook without using "selection" but I am getting error for the range definition as "RANGE(Cells(4,...
0
votes
6
answers
92
views
Python - Range()
I'm new to Python, I have tried to create a simple loop in order for me to list users that has userID of value integer. However the userID on the DB seems weird (Users 1-72 are displayed properly, ...
0
votes
0
answers
26
views
Django admin: filter by min and max value
I would like to add a filter to my Django admin to filter based on a floating point with range in [0, 1].
Consider the following model:
class Color(models.Model):
label = models.CharField(...
0
votes
1
answer
19
views
String out of range when generated in a loop
When I write such code that generates a list of random strings 5 chars long, in a number of 7:
#include<iostream>
#include<string.h>
using namespace std;
void generate(string*, int);
int ...