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

Print Range User Selected

I was hoping to create a module that would basically operate like so: Define 4 or 5 print ranges; Prompt a user an input box; Allow the user to select, from a drop down in that input box, the range they wish to print; After selecting the range,…
mburke05
  • 1,371
  • 2
  • 25
  • 38
3
votes
0 answers

Contenteditable div caret position

Possible Duplicate: Get caret position in contentEditable div I have a contenteditable div and I am trying to get the caret position inside this div on non IE browsers using the following code: var caretPosition = 0, containerEl = null, sel,…
Crista23
  • 3,203
  • 9
  • 47
  • 60
3
votes
1 answer

Why does an Ada compiler let range violations pass? Why is my type declaration a runtime entity?

Why does Ada compiler let range violations pass? It does give warning, but why does it let it pass if it is an error in any case? Is there a practical scenario in which this is a useful behaviour? And most importantly: Why is type declaration a…
user1358
  • 623
  • 2
  • 8
  • 13
3
votes
1 answer

How to keep ranges on form datasource when manually add filters?

I have a strange problem on form: I added a range to filter records in datasource executeQuery() method, this works fine when opening form but if I set manually a filter in the grid header, the range set in ExecuteQuery() method are not applied. My…
Thomas Post
  • 535
  • 2
  • 11
  • 27
3
votes
0 answers

Simulation html text selection in android

I need to simulate selecting text in a HTML page from android browsers. Android has a special selector in a web page. My HTML page does not detect a selection of text as the browser would have a PC. How I can simulate this selection of text using…
Martin
  • 1,282
  • 1
  • 15
  • 43
3
votes
1 answer

Matlab: Elegant way to extract (split) array elements

I have to split, from an array (1D), in blocks of 64, the first element (DC), and another 63 elements (AC) in separate arrays. I made the UGLY code above: %split DC from AC n = 8^2; DC = zigZagLinha(1 : n : end); AC = blkproc(zigZagLinha, [1…
rdlu
  • 630
  • 6
  • 10
3
votes
4 answers

Best way to generate random number between x and y but not between a and b

I have a canvas that is 1000x600px. I want to spawn sprites outside the canvas (but evenly distributed). What is the best way to retrieve random values between (-500, -500) and (1500, 1100) but not between (0, 0) and (1000, 600)? I understand a…
Sam
  • 313
  • 4
  • 17
3
votes
2 answers

Comparing sub ranges of a char array in C

I want to compare a sub range of a char array to another string using strcmp. I made the dna char array by reading from a textfile and then concatenating them into a longer char array. char dna[10] = "ATGGATGATGA"; char STOP_CODON[3] = "TAA"; int…
Ben Fossen
  • 997
  • 6
  • 22
  • 48
3
votes
2 answers

Splitting up an interval in weeks in Postgres

Here goes a yet another SQL question about dates… I'm building a calendaring application using PHP and Postgres that would display events spanning days, weeks or possibly months. Each event has a start date and an end date, and selecting them by…
slikts
  • 8,020
  • 1
  • 27
  • 47
3
votes
3 answers

Selecting a Word Interop Header Range causes Word to switch to Draft View

When selecting a Header Range using .Select(), Microsoft Word automatically switches to Draft View from my current view type (Print layout). How do I stop Word from switching to Draft View? The following code example demonstrates what I'm doing: //…
Joe W
  • 1,789
  • 3
  • 28
  • 42
3
votes
2 answers

Python: list inside a list index out of range error

I'm getting an error when trying to append values to a list inside of a list. What am I doing wrong? xRange = 4 yRange = 3 baseList = [] values = [] count = 0 #make a list of 100 values for i in range(100): values.append(i) #add 4 lists to…
Dan Smith
  • 43
  • 1
  • 7
3
votes
2 answers

Java - Average Linear Graph Plots

I have a piece of code that checks if the given 3 coordinates are linear to one another (if so, return true). But is there a way to make the code give or take a few pixels/plots? private boolean collinear(double x1, double y1, double x2, double y2,…
Oliver Jones
  • 1,420
  • 7
  • 27
  • 43
3
votes
2 answers

I need to select a specific range of dates, ignoring year, from MySQL table

Here's my problem. My system stores dates and times in your usual DATETIME format: 'YYYY-MM-DD HH:MM:SS' This is what I have trouble with: I need to select all the contacts that have a date field in this format: 'XXXX-12-02 23:59:59' and every…
kingmaple
  • 4,200
  • 5
  • 32
  • 44
3
votes
3 answers

Implementing table level check constraint

We have a table that contains prices that are depending on a base amount. As an example let say that if the base amount is less or equal to 100 then the price is 10 but if the base amount is greater that 100 but less or equal to 1000 then the price…
Peter Å
  • 1,269
  • 11
  • 20
3
votes
3 answers

How to combine a custom color range with colorbar in MATLAB?

I'd like to have a surface plot like the one below, but with a proper colorbar. This is my code: [X,Y,Z] = peaks(30); [maxval dummy] = max(Z(:)); [minval dummy] = min(Z(:)); crange = 1.5; % red, yellow, green cmap = [1 0 0; 1 1 0; 0 1 0]; …
jhscheer
  • 342
  • 1
  • 8
  • 18
1 2 3
99
100