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.

A range is an extent of values between its lower and upper bound. Examples include a DOM Range, the Ruby Range class, the Python range function, Perl 5's .. operator (in list context), Perl 6's Range Class and PostgreSQL's range types.

In statistics, range is the size of the smallest interval which contains all the data and provides an indication of statistical dispersion. It is measured in the same units as the data. Since it only depends on two of the observations, it is most useful in representing the dispersion of small data sets.

10562 questions
3
votes
1 answer

boost range weak_ptr

I have a map where the value is a weak pointer. This works: While I can write this: for_each( IFoo::foo_wptr obj, objects | range::map_values ) { IFoo::foo_ptr myObj = obj.lock(); if( myObj ) myObj->notify(); } I'd much rather have a new…
Bruce B.
  • 39
  • 1
  • 2
3
votes
5 answers

How to test if a integer range has overlap with an integer list?

For example: we have a list: 1 2 3 7 8 9 11 12 We need to check if a range (A,B) overlaps with the list, e.g range (4, 6) does NOT overlap with the list , range ( 10, 12) and range(5,9) do overlap with the list. I know we can put the list in a…
Yijie Li
  • 71
  • 3
3
votes
3 answers

Delphi: How to have non-contiguous subrange enumeration type?

While the following subrange enumeration declaration works: type TReceiptCode = 'A'..'F'; This does not: type TReceiptCode = ' ','A'..'F', 'R'; Nor does type TReceiptCode = ' ','A','B','C','D','E','F','R'; How can i declare a subrange…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
3
votes
4 answers

How to use range() when you want number with 2 digits only (01,02 ... 10,11)?

I have an array of numbers like that $arr = range(01,10); But I would like the output to be Array ( [0] => 01 [1] => 02 [2] => 03 ... [9] => 10) how could I do that ?
Miles M.
  • 4,089
  • 12
  • 62
  • 108
3
votes
1 answer

std::multimap and equal_range

I'm having some headaches with the std::multimap container and I wish to know what would be the proper way to achieve my goal. Basically, here is my SSCCE: #include #include int main () { typedef std::multimap
Mihai Todor
  • 8,014
  • 9
  • 49
  • 86
3
votes
1 answer

how to scale colorbar based on ylim

I am plotting a spectrogram of my data using matplotlib's specgram function. Pxx, freqs, bins= mlab.specgram(my_data,NFFT=nFFT,Fs=Fs,detrend=mlab.detrend_linear,noverlap=n_overlap,pad_to=p_to,scale_by_freq=True) For ref, the shape of "freqs",…
willf
  • 43
  • 4
3
votes
2 answers

MySQL display all date in between range

I want to display all dates between a from and to dates from MySQL. For example the data from schedule table that has from and to fields are: from date is 2013-3-13, and to date is 2013-3-20, my desired result is: 2013-3-13 2013-3-14 …
xjshiya
  • 915
  • 7
  • 16
  • 44
3
votes
5 answers

double type digits in C++

The IEE754 (64 bits) floating point is supposed to correctly represent 15 significant digit although the internal representation has 17 ditigs. Is there a way to force the 16th and 17th digits to zero…
user85917
  • 925
  • 3
  • 12
  • 21
3
votes
3 answers

Adding -1,0, or 1 randomly to a number in C

I am trying to figure out a way that I can randomly generate -1,0, or 1 using srand and rand. Whenever I do, however, I am only able to get the values inside the range generated and never the -1 or 1. This is what I tried: int value; …
russ0
  • 53
  • 1
  • 6
3
votes
1 answer

highcharts xAxis limit how far zoom in

I have a highcharts graph where the X axis units is date. My data is rounded to the nearest day, so there is no point zooming in beyond the day level. However, highcharts lets me zoom in to the hour level. I don't want to let users zoom in any…
TSG
  • 4,242
  • 9
  • 61
  • 121
3
votes
3 answers

Converting a sequence of numbers to conditionals/ranges

I have an array that consists of pairs of a numeral and some value: a = [[2, :foo], [5, :bar], ..., [17, :baz]] where it can be assumed that no two pairs have the same numeral, and the pairs are sorted by the value of their numeral. Based on this…
sawa
  • 165,429
  • 45
  • 277
  • 381
3
votes
1 answer

DynamoDB: is there a way to get an arbitrary page without LastEvaluatedKey?

I have a Message table with range key CreationDate... How would I Query to an arbitrary page? Is this possible without having to supply LastEvaluatedKey returned by the previous query? That means the client has to also track this and return it with…
FlavorScape
  • 13,301
  • 12
  • 75
  • 117
3
votes
2 answers

Fastest Way To Iterate On Range Of Excel References ("C20:F22")

Assume this string variable is a range of cells in Excel: string RangeReference = "C20:F22"; So I need a list of references in RangeReference Like this: List GetAllReferencesInRange(string RangeReference) { } For this case we will…
Saeid
  • 13,224
  • 32
  • 107
  • 173
3
votes
2 answers

How to use cell values to define the range of chart data?

I have a set of 500 cells from which I've created a chart using the following range definition: =Sheet1!$A$1:$A$500 I have 2 cells B1 and B2 in which I would like to define start and end values (inside 1-500) for the chart to show only a subset of…
Max
  • 12,794
  • 30
  • 90
  • 142
3
votes
3 answers

Repeat rows based on range of dates in two columns

I have a table with following columns: ID startdate enddate I want the rows of this table to be repeated as many times as the difference between startdate and enddate along with a column which gives all the dates between these two days for each id…
Sun Mun
  • 45
  • 1
  • 7
1 2 3
99
100