Returns the range of the selection.

 @return [Range]
437649
def selection_range
      from = [@text_input.selection_start, caret_position].min
      to = [@text_input.selection_start, caret_position].max

      (from...to)
    end
602213
def regions(name=nil, tags=Selectable::Tags.new)
      return self if name.nil?
      self.ranges(name, tags).collect do |base_range|
        marks = self.sort.select do |mark|
          mark >= base_range.from && 
          mark <= base_range.to &&
          mark.tags >= base_range.tags
        end
        ranges = self.ranges.select do |range|
          range.from >= base_range.from &&
          range.to <= base_range.to &&
          range.tags >= base_range.tags
        end
        tl = Benelux::Timeline.new(marks)
        tl.ranges = ranges.sort
        tl
      end
    end
937758
function() {
			var out = [];
			if (this.parent) {
				// add current range if it is not root node
				out.push(this.range);
			}

			this.children.forEach(function(child) {
				out = out.concat(child.allRanges());
			});

			return out;
		}
857843
def range(self, axis=None):
        
        return (self.min(axis=axis), self.max(axis=axis))
422713
def ranges(self, start=None, stop=None):
		
		_check_start_stop(start, stop)
		start_loc = self._bisect_right(start)
		if stop is None:
			stop_loc = len(self._keys)
		else:
			stop_loc = self._bisect_left(stop)
		start_val = self._values[start_loc - 1]
		candidate_keys = [start] + self._keys[start_loc:stop_loc] + [stop]
		candidate_values = [start_val] + self._values[start_loc:stop_loc]
		for i, value in enumerate(candidate_values):
			if value is not NOT_SET:
				start_key = candidate_keys[i]
				stop_key = candidate_keys[i + 1]
				yield MappedRange(start_key, stop_key, value)
649519
public INDArray getRange() {
        if (range == null) {
            try (MemoryWorkspace ws = Nd4j.getMemoryManager().scopeOutOfWorkspaces()) {
                range = upper.sub(lower);
            }
        }
        return range;
    }
1166337
def in_range?( val )
      val = val.to_i
      (@above.nil? or val > @above) and
        (@below.nil? or val < @below) and
        (@valid_range.nil? or @valid_range.include?(val))
    end
999035
private function getRangeWidget()
    {
        if ('selection' === $this->get('rangemode')) {
            // Get all range options.
            $rangeOptions = [];

            foreach (StringUtil::deserialize($this->get('range_selection'), true) as $rangeItem) {
                $rangeOptions[$rangeItem['range']] = $rangeItem['range'] . 'km';
            }

            $rangeWidget = [
                'label'     => [
                    ($this->get('range_label') ?: $this->getAttributeName() . ' Range '),
                    'GET: ' . $this->getParamNameRange()
                ],
                'inputType' => 'select',
                'options'   => $rangeOptions,
                'eval'      => [
                    'colname'            => $this->getColname(),
                    'urlparam'           => $this->getParamNameRange(),
                    'template'           => $this->get('range_template')
                ]
            ];

            return $rangeWidget;
        }

        if ('free' === $this->get('rangemode')) {
            $rangeWidget = [
                'label'     => [
                    ($this->get('range_label') ?: $this->getAttributeName() . ' Range '),
                    'GET: ' . $this->getParamNameRange()
                ],
                'inputType' => 'text',
                'eval'      => [
                    'colname'     => $this->getColname(),
                    'urlparam'    => $this->getParamNameRange(),
                    'template'    => $this->get('range_template'),
                    'placeholder' => $this->get('range_placeholder')
                ]
            ];

            return $rangeWidget;
        }

        return null;
    }
744202
def select!( ypath_str )
            matches = match_path( ypath_str )

            #
            # Create a new generic view of the elements selected
            #
            if matches
                result = []
                matches.each { |m|
                    result.push m.last.transform
                }
                result
            end
        end
846929
def select!
      if block_given?
        return_nil = true
        @data.each do |k,v|
          unless yield(k,v)
            @data.delete(k)
            return_nil = false
          end
        end
        return nil if return_nil
      end
      self
    end
766244
function range(vars) {
  generation += 1;
  const variables = {};
  const selection = {
    type: 'range',
    generation,
    range: {
      variables,
    },
  };

  // Fill variables
  Object.keys(vars).forEach((name) => {
    variables[name] = vars[name].map((interval) =>
      clone(interval, ['interval', 'endpoints', 'uncertainty'], {
        endpoints: '**',
      })
    );
    variables[name].sort((a, b) => a.interval[0] - b.interval[0]);
  });

  return selection;
}
725942
def range(self) -> str:
        """"""
        if FRAGMENT_MISSING in self:
            return '?'

        return '{}_{}'.format(self[FRAGMENT_START], self[FRAGMENT_STOP])
5238
def get_selection_bounds(self):
        """"""
        cursor = self.textCursor()
        start, end = cursor.selectionStart(), cursor.selectionEnd()
        block_start = self.document().findBlock(start)
        block_end = self.document().findBlock(end)
        return sorted([block_start.blockNumber(), block_end.blockNumber()])
1311693
def _selectedLinesRange(self):
        
        (startLine, startCol), (endLine, endCol) = self._qpart.selectedPosition
        start = min(startLine, endLine)
        end = max(startLine, endLine)
        return start, end
1344833
public DateRange getSelectedRange() {
        Dateitem selected = getSelectedItem();
        return selected == null ? null : (DateRange) selected.getData();
    }
1310801
def get_range(col_index)
      col_num = col_index + 1

      old_range = self.locate_range(col_index)

      if old_range.nil? then
        new_range = RubyXL::ColumnRange.new
      else
        if old_range.min == col_num && old_range.max == col_num then
          return old_range # Single column range, OK to change in place
        elsif old_range.min == col_num then
          new_range = old_range.dup
          old_range.min += 1
        elsif old_range.max == col_num then
          new_range = old_range.dup
          old_range.max -= 1
        else
          range_before = old_range.dup
          range_before.max = col_index # col_num - 1
          self << range_before

          old_range.min = col_num + 1

          new_range = RubyXL::ColumnRange.new
        end
      end

      new_range.min = new_range.max = col_num
      self << new_range
      return new_range
    end
321604
function()
		{
			var ranges = this.getRanges(),
				startNode = ranges[ 0 ].startContainer,
				endNode = ranges[ ranges.length - 1 ].endContainer;
			return startNode.getCommonAncestor( endNode );
		}