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.

range
Filter by
Sorted by
Tagged with
1 vote
1 answer
55 views

Generic Numeric range function in Scala

I have two functions in scala that do exactly the same like this: private def getIntRange(minLimit: Int, maxLimit: Int, step: Int): Something = { (minLimit to maxLimit by step) .map(_....
Emilia Paredes's user avatar
0 votes
1 answer
102 views

Assigning Multiple Values to Single Variable in VBA

I am currently working on a VBA project that assigns sequence numbers to a list of tasks based on their indent spacing. Currently it will work if there are 0 or 1 blank lines between steps, but if ...
ParkerG24's user avatar
1 vote
1 answer
72 views

Why is ClosedRange<Int>.contains 3.4 million times slower than expected?

The contains method in a ClosedRange in Swift seems very slow. I create the following Swift Playground on macOS for testing: import Foundation func measure(fn: @escaping ()->Void) -> ...
endavid's user avatar
  • 1,873
4 votes
2 answers
173 views

How to lazy concat Ruby ranges?

I have a very large range to iterate through and find the first element that satisfies specific constraints. That can be done efficiently in Ruby already. # Runs until memory is exhausted _without_ ...
Xavier Mol's user avatar
0 votes
1 answer
47 views

Correct way to check for true value without exiting loop in Kotlin

I'm working on a application in Kotlin that needs to iterate over a range, calling a sub-function for each item. The function then returns a boolean indicating if any of the sub-function calls ...
pbuchheit's user avatar
  • 1,495
0 votes
1 answer
44 views

Selection of multiple html elements with the help of document.getSelection()

How to iterate through the multiple selected html elements. const selection = window.getSelection(); const selectedElements = selection.getRangeAt(0).cloneContents().querySelectorAll("*"); ...
annonymous2345's user avatar
0 votes
1 answer
69 views

Write a program that reads an input file and two strings representing the lower and upper bounds. Determine if the strings are in range and output

Write a program that first reads in the name of an input file, followed by two strings representing the lower and upper bounds of a search range. The file should be read using the file.readlines() ...
Aiden Lake's user avatar
2 votes
2 answers
111 views

The range reference in the formula changes in one case but doesn't in other

The 3 in A3:A or B$3:B doesn't change when we move the 3rd row to any other row, but it changes when we move any other row to 3rd row position, or when insert a new row (Insert below in 2nd row or ...
Aashit Garodia's user avatar
-1 votes
2 answers
241 views

Excel formula that returns a range of non empty cells based on conditions

In the example below I'd like to enter in cells L4, M4 and N4 a formula that will return all the flavors (range C:C) for a given product (range B:B). For example, in cell L4, the formula should look ...
lexignot's user avatar
-1 votes
1 answer
185 views

Two-Way Lookup w/ Index and Match

Trying to match row A1:L1 and columns B2:B16,C2:C16,F2:F16,G2:G16,J2:J16,K2:K16 and return their Qtys. The inputs/outputs are in the red/green boxes. The second match in the formula is working when I ...
mjac's user avatar
  • 155
-1 votes
1 answer
69 views

Recreating range function, can not get the decrementing list

I am working on a project were I need to essentially recreate the range function in Python. The assignment dictates: Define and test a function myRange. This function should behave like Python’s ...
Ian Schaak's user avatar
0 votes
0 answers
53 views

Discrepancy in Widths of a Range and a Paragraph Element in JavaScript

I’m working on a feature in a web application that mimics the text selection behavior in Microsoft Office Word. Specifically, when you select text across two paragraphs in Word, the area between the ...
8535241's user avatar
  • 103
0 votes
3 answers
90 views

Range Memory Overflow Issue

Trying to run a simple macro to copy/paste some columns from one worksheet to another. It works fine when I only use a few columns but when I add all the columns I need I get an error. I think my ...
mjac's user avatar
  • 155
0 votes
0 answers
66 views

Select a dynamic Range in Excel VBA

I need to select and delete different ranges that is produced inside a loop. Everytime it changes size and location! Sub DelDoublicate() ' some selection of a bigger range happens here. whole data ...
2012User's user avatar
  • 123
1 vote
0 answers
356 views

Uncaught RangeError: Maximum call stack size exceeded (functionjs.js)

I'm trying to build a recruitment management website (nodejs), but when I'm almost done I get this error: Uncaught RangeError: Maximum call stack size exceeded. functionjs.js Here is my functionjs.js ...
Cmint's user avatar
  • 19
0 votes
1 answer
23 views

Function to convert cell range to text without VBA

I'm trying to use SWITCH function in EXCEL with a cell range but would like to output it as in a single cell rather than an array as seen in the picture. My formula is as below. I'm "forced" ...
RCS's user avatar
  • 255
0 votes
0 answers
139 views

how to add filters/conditions when use embedding vectors in opensearch?

I am learning use embedding vectors in opensearch recently. Here is my code: class SpacyEmbeddings(Embeddings): def __init__(self, model_name: str = "en_core_web_lg"): self.nlp =...
Feng Chen's user avatar
  • 2,193
1 vote
1 answer
83 views

Look up data by string and range number as keys

I am looking for a data structure in C++ or implement one to have different tables with a list of strings as name and each table uses number ranges as keys. The main operation where the most of ...
holmessh's user avatar
1 vote
2 answers
72 views

Duplicate rows of a 2d array to represent each date within the start and end date values of the row

I have the following array called $exhibitions: Array ( [0] => Array ( [exhibition_title] => Picasso [venue_name] => Gallery 1 [room_name] =>...
Hibernacle's user avatar
0 votes
3 answers
81 views

Making an array by giving two number from user and print the array in Java

I want to give two number from user and make an array. Then print the array. How should I do this task in java? This is my code. I give numbers 5 and 25. But it doesn't work properly. My desired ...
Zeynab Moghaddas's user avatar
1 vote
1 answer
48 views

Access contents of a named Excel range which does not refer to a cell in VBA

I have created a named range, say "TestRange" in Excel which contains a formula in the "Refers to" box. It could be as simple as multiplying 2 cells together eg Refers to:=Sheet1!...
Brian Mills's user avatar
0 votes
2 answers
54 views

Dynamic Range used Excel

I have a series of number of my column A,, from A1 to A100 going from 1 to 9 Now I want to count the number of times the number 1 appears, it is easy: =COUNTIF(A1:A100;1) Second step I want to count ...
ImFabien75's user avatar
0 votes
2 answers
84 views

Updating Broken Data Validation Lists via VBA

I have a spreadsheet with several validation lists, one of which is linked to conditional formatting to identify the status of the record, "closed", "open", "pending", ...
Aaron's user avatar
  • 19
-2 votes
2 answers
88 views

How order a string in alphabetical order in a single row

Basically, I have a string with semicolon (;) separated in a Range ("H2"), example (Restrict; No-Resctric; Alpha; Cosmo; n..). This needs to be dynamic, meaning the string may contain more ...
Pepiniano's user avatar
1 vote
0 answers
59 views

How to define an address/cell location thats in a range

I am trying to write code that essentially performs linear interpolation for me and spits the result out into an email. I have set both the first column and top row as their own ranges (excluding 3300)...
kca062's user avatar
  • 63
1 vote
1 answer
33 views

Vvertical offset % function to a SMA

is it possible to add a vertical offset in % function to a SMA? My aim is to attach this SMA to a 1 period ATR. Thanks I'm not good with coding so I tried to use already existent indicators, which don'...
Davidator's user avatar
0 votes
1 answer
37 views

Range.find with date as argument

I have a table (Lets call tb1) that has a date column. I need to search in tb2 (which has a date on it) using tb1_date as key, and it must return tb2 row number where the same date is located for i = ...
felipe kreft batista's user avatar
0 votes
1 answer
72 views

How to get data using header name ranges in Excel in case columns are dynamic?

I have here a simple form that matches data when ID is entered. It works fine. However, these columns are dynamic/interchangeable. What I would like to do is set the foundcell variable range from ...
Shiela's user avatar
  • 608
-1 votes
2 answers
53 views

Combining 2 worksheet change events Excel VBA

Could someone please help me combine these two events below. My goal is to get the to move my row to another sheet when "Completed" is inputted to the Column F. In addition, im looking to ...
Benjamin Leone's user avatar
0 votes
1 answer
96 views

How to know where Word VBA 'Find' has found something

In the While loop below, I need to create a Range object whose Start and End properties indicate the current instance of "whatever", so that I can pass it to a certain routine. This ...
Kirk Hansen's user avatar
0 votes
0 answers
23 views

VBA Error 1004: Copy paste Range with Formats [duplicate]

I have a rows of data, that skip at various points. The data is organized by days, grouped in weeks. The data itself is a Colour Coded Value. The need is delete one week of data. I am attempting to ...
canadiangolem's user avatar
0 votes
1 answer
40 views

Elasticsearch: Date Range Search based on Oldest Document

I am writing to ask: What is the best way to construct a query to satisfy the following requirement: Date range specification in the filter clause of a boolean query so that gte is based on the oldest ...
Sam J Sem's user avatar
0 votes
0 answers
45 views

Superset: Predefined shift times for users on the dashboard

I will define three fix time ranges filters for the users. From 06 AM to 02 PM, from 02 PM to 10 PM and from 10 PM to 06 AM. The user select only the date, but the hours range should select by a list ...
FullTiltFritz's user avatar
0 votes
1 answer
78 views

Elastic/OpenSearch: query composite IP range like 123.[16-31].0.*

I want to run a query that filters out an IP range like 123.[16-31].0.* (16 and 31 are included). Generic example: GET _search { "query": { "bool": { "must": {...
Su Zirboni's user avatar
0 votes
0 answers
59 views

How to add a ngb tooltip in bootsrap range

I want to have a custom tooltip, When it slide the value of tooltip is also change and also Is it possible the tooltip will be always above the thumb when sliding? <input type="range" ...
Ian Gabriel Agujitas's user avatar
0 votes
0 answers
177 views

Search posts in Facebook group by date range

At first sorry for my English it is not so good. My question is: is there a method to search posts in a Facebook group using a date range filter without tapping any text or keyword in the search bar. ...
Radji Benabdallah's user avatar
0 votes
1 answer
75 views

Number of common values between two ranges counted only once each

I have two numerical value ranges, say A1:G2: COLUMN A COLUMN B COLUMN C COLUMN D COLUMN E COLUMN F COLUMN G 15 114 101 32 87 61 138 3 45 12 101 80 29 61 and A5:G6: COLUMN A COLUMN B COLUMN C ...
bluetick's user avatar
0 votes
2 answers
93 views

selection on editable div doesn't work if an Enter is typed

I have an editable div and multiple blocks of texts between a starting three backticks and ending three backticks markers Let's say the cursor is anywhere between the markers Clicking on a button I ...
provance's user avatar
  • 917
0 votes
1 answer
59 views

VBA : How does Merge behave regarding to an Offset'ed Range

The problem in the follwing code is that the range being merged is always the Range("A1:B2"). 'how the range are set (they're dim'ed as Range) Set Range1 = Sheet1.Range("A1:B2") ...
Tounn's user avatar
  • 66
0 votes
0 answers
13 views

How to show a small table by inputting a value in another cell

I have a vlookup that will return a value. I wish to show a small table based on that value in another location. How do I accomplish this. Sample attached I have attempted to use =arrayformula but ...
rltidd27's user avatar
0 votes
0 answers
85 views

Excel VBA correct code for selecting visible rows/the active table?

Morning all, I've created VBA code to automate a very manual process of parsing data from one worksheet into several other work sheets for onward saving as individual .CSV files. The macro works great ...
MikeE's user avatar
  • 3
1 vote
1 answer
37 views

The meaning of 'c(min =0, max =0)' in vapply()

salaries <- list(leaders = c(250, 200), assistant = 100, members = c(300, 200, 180, 120, 100)) > vapply(salaries, range, c(min=0, max=0)) leaders assistant members min 200 100 100 ...
Journey Kang's user avatar
1 vote
2 answers
99 views

Is there a simpler way to do a parallel for-loop in D

Learning D and implementing a ray/path tracer algorithm to solidify the learning. I would like to cast rays in parallel, so this is currently how I have my outer for-loop parallelized: auto yRange = ...
David Frogley's user avatar
0 votes
0 answers
87 views

Write Array to Range that is filtered

I have an array that I want to write to a column of a sheet. Usually I just do rngRangeObject = varArray However, if there is a filter active on the column, the results are ... unexpected. If you run ...
Greengruenvert's user avatar
0 votes
1 answer
26 views

SAS: Conditional Count and Range?

I have a dataset with three columns: ID, Date of Action A, Date of Action B. ID | DateofActionA | DateofActionB 123 | July 1, 2020 | July 15, 2020 123 | July 1, 2021 | August 19, 2021 123 ...
Noob's user avatar
  • 1
0 votes
1 answer
52 views

VBA Copy and Paste Range

I have a code that copies and pastes rows from Sheet 1 to Sheet 2 based on a cell value in a Sheet 1 column. Sheet 1 has 20+ columns, but I only want 5 of those columns in Sheet 2. Is there a better ...
Mark 's user avatar
  • 71
0 votes
2 answers
118 views

Find values in ranges

A hotel provides information about it's rooms using codes like 0103031206100002. Explanation of code: 2 first symbols - is a count of adults (01), next 2 symbols - count of children (03). Remaining 12 ...
Step's user avatar
  • 13
0 votes
0 answers
56 views

Hiding Columns: setting the Range

My intentions are to copy a portion of one ws to another for formatting and printing. I am having trouble when it comes to hiding the unnecessary columns. The code below returns Compile Error: ...
JR Stroik's user avatar
0 votes
2 answers
47 views

Combining overlapping ranges with a start and stop position in dataframe with other non-position values

I am attempting to summarize blasting results such that I am trying to determine the full coverage of a contig (query) versus a database entry (subject). I have a dataframe with the usual outputs from ...
David Bradshaw's user avatar
0 votes
0 answers
48 views

SwiftUI Thread 1: Fatal error: Index out of range

In one ColorOptions view I have 7 colors with different opacities, and picker to change those colors for Circle() in another view, but have problem, with ".fill" because when im trying to ...
Tomas Gavenavičius's user avatar