Set range input

Warning : currently start and end values are stored
in the same input and require extra processing
Use with caution!

@param string|FormField $rangeInput Range input

@return self
322172
public function setRangeInput($rangeInput)
    {
        if ($rangeInput instanceof FormField) {
            // Prevent any further init on this field
            $rangeInput->addExtraClass("flatpickr-init");
            $rangeInput = $rangeInput->ID();
        }
        $rangeInput = '#' . trim($rangeInput, '#');
        $this->rangeInput = $rangeInput;

        return $this;
    }
301114
function( range ) {
			this.setStart( range.startContainer, range.startOffset );
			this.setEnd( range.endContainer, range.endOffset );
		}
1359450
def set_range(self, start_index=0, end_index=None):
        '''
        
        '''
        if end_index is not None:
            end_index += 1
        self._test_list = StartEndList(start_index, end_index)
        self.session_info.start_index = start_index
        self.session_info.current_index = 0
        self.session_info.end_index = end_index
        self.session_info.test_list_str = self._test_list.as_test_list_str()
        return self
890269
def set_range(self, start=None, end=None, occurrences=None):
        
        if start is None:
            if self.__start_date is None:
                self.__start_date = dt.date.today()
        else:
            self.start_date = start

        if end:
            self.end_date = end
        elif occurrences:
            self.__occurrences = occurrences
        self._track_changes()
1003044
protected function parseRangeUsingCidr($input, &$range): void
    {
        $input = explode('/', $input);
        $this->fillAddress($input[0], '0');

        $range['min'] = $input[0];
        $isAddressMask = strpos($input[1], '.') !== false;

        if ($isAddressMask && $this->verifyAddress($input[1])) {
            $range['mask'] = sprintf('%032b', ip2long($input[1]));
            return;
        }

        if ($isAddressMask || $input[1] < 8 || $input[1] > 30) {
            throw new ComponentException('Invalid network mask');
        }

        $range['mask'] = sprintf('%032b', ip2long(long2ip(~(2 ** (32 - $input[1]) - 1))));
    }
311061
public function setRange($range)
    {
        $allowedValues = $this->getRangeAllowableValues();
        if (!in_array($range, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'range', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['range'] = $range;

        return $this;
    }
1345005
public function setRepeat($input)
    {
        if (!is_numeric($input) || !$input) {
            throw new \InvalidArgumentException('Only positive numbers allowed.');
        }
        $this->otherOptions['repeat'] = (float)$input;

        return $this;
    }
788799
public function set($key, Input $input): self
    {
        if (!$input->isValid()) {
            return $this;
        }

        $value = $input->value();

        $this->mapOfValues[$key] = $value;

        return $this;
    }
625422
public function setFormFieldTypeRangedTo($formFieldTypeRangedTo)
    {
        if (!is_string($formFieldTypeRangedTo) || empty($formFieldTypeRangedTo)) {
            throw new InvalidArgumentException('"Form field type ranged to" argument must be string and must not be empty.');
        }

        $this->formFieldTypeRangedTo = $formFieldTypeRangedTo;

        return $this;
    }
632676
function RangeIterator(start, end, step) {
    this.start = start;
    this.end = (end !== undefined) ? end : Math.pow(2,32);    // or should this be Number.MAX_VALUE
    this.step = (step !== undefined)
        ? step
        : (this.end >= this.start)
            ? 1
            : -1;
    this.reset();
}
320762
public function setRange($pRange = '')
    {
        // Uppercase coordinate
        $cellAddress = explode('!', strtoupper($pRange));
        if (count($cellAddress) > 1) {
            list($worksheet, $pRange) = $cellAddress;
        }

        if (strpos($pRange, ':') !== false) {
            $this->range = $pRange;
        } elseif (empty($pRange)) {
            $this->range = '';
        } else {
            throw new PHPExcel_Exception('Autofilter must be set on a range of cells.');
        }

        if (empty($pRange)) {
            //    Discard all column rules
            $this->columns = array();
        } else {
            //    Discard any column rules that are no longer valid within this range
            list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($this->range);
            foreach ($this->columns as $key => $value) {
                $colIndex = PHPExcel_Cell::columnIndexFromString($key);
                if (($rangeStart[0] > $colIndex) || ($rangeEnd[0] < $colIndex)) {
                    unset($this->columns[$key]);
                }
            }
        }

        return $this;
    }
817267
public function setFormFieldTypeRangedFrom($formFieldTypeRangedFrom)
    {
        if (!is_string($formFieldTypeRangedFrom) || empty($formFieldTypeRangedFrom)) {
            throw new InvalidArgumentException('"Form field type ranged from" argument must be string and must not be empty.');
        }

        $this->formFieldTypeRangedFrom = $formFieldTypeRangedFrom;

        return $this;
    }
762137
public function setRange(int $start, int $end) : void
    {
        if ($end < $start) {
            throw new InvalidArgumentException('End must be greater or equal to start');
        }

        if ($end === $start) {
            return;
        }

        --$end;

        $firstInt = $start >> 5;
        $lastInt = $end >> 5;

        for ($i = $firstInt; $i <= $lastInt; ++$i) {
            $firstBit = $i > $firstInt ? 0 : $start & 0x1f;
            $lastBit = $i < $lastInt ? 31 : $end & 0x1f;

            if (0 === $firstBit && 31 === $lastBit) {
                $mask = 0x7fffffff;
            } else {
                $mask = 0;

                for ($j = $firstBit; $j < $lastBit; ++$j) {
                    $mask |= 1 << $j;
                }
            }

            $this->bits[$i] = $this->bits[$i] | $mask;
        }
    }
215072
public function setInput($input)
    {
        $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input);

        return $this;
    }
268929
private function setFloatWithinRange(?float $floatWithinRange): self
    {
        $this->updatePropertyValue(
            FloatWithinRangeFieldInterface::PROP_FLOAT_WITHIN_RANGE,
            $floatWithinRange
        );

        return $this;
    }
978421
public function setCrawlDelay($input = 0.25)
    {
        if (!is_numeric($input)) {
            throw new InvalidArgumentException('Input must be numeric.');
        }
        $input = ($input < 0) ? 0.25 : $input;
        $this->otherOptions['crawlDelay'] = (float)$input;

        return $this;
    }
921989
def set_range_value(self, data):
        
        dtfrom = data.pop('value_from')
        dtto = data.pop('value_to')
        if dtfrom is dtto is None:
            self.errors['value'] = ['Date range requires values']
            raise forms.ValidationError([])
        data['value'] = (dtfrom, dtto)