Div
@param ValueProxy $val
@return ValueProxy
350907
protected function Div( $val )
	{
		$denominator = $val->getValue(); // Make sure it's a double not an int
		$numerator = $this->getValue();

		if ( is_nan( $denominator ) )
		{
			throw XPath2Exception::withErrorCode( "FOAR0001", Resources::FOAR0001 );
		}

		if ( is_nan( $numerator ) )
		{
			throw XPath2Exception::withErrorCode( "FOAR0002", Resources::FOAR0002 );
		}

		// Replace the handler because the status test handler traps any error and terminates the session
		$previousHandler = set_error_handler(null);
		$result = new DoubleProxy( @($numerator / $denominator) );
		set_error_handler( $previousHandler );
		return $result;

		// A long hand version without incurring a notice
		return new DoubleProxy(
			$denominator == 0
				? (
					$numerator == 0
						? NAN
						: ( ( strval( $denominator )[0] == '-' && strval( $numerator )[0] != '-' ) ||
							( strval( $numerator )[0] == '-' && strval( $denominator )[0] != '-' )
								? -INF : INF
						  )
				  ) : @($numerator / $denominator)
		);
	}
342294
public function displayValue( $value )
    {
        return $this->view->translate(
            ( empty( $this->translatePrefix )
              ? '' : $this->translatePrefix . '.' ) .
            $value .
            ( empty( $this->translatePostfix )
              ? '' : '.' . $this->translatePostfix ),
            $this->translateTextDomain
        );
    }
1015103
public function getFilterValue($val)
    {
        $formatter = new IntlDateFormatter(
            $this->getLocale(),
            $this->getOutputDateType(),
            $this->getOutputTimeType(),
            $this->getOutputTimezone(),
            IntlDateFormatter::GREGORIAN,
            $this->getOutputPattern()
        );
        $timestamp = $formatter->parse($val);

        $date = new PhpDateTime();
        $date->setTimestamp($timestamp);
        $date->setTimezone(new DateTimeZone($this->getSourceTimezone()));

        return $date->format($this->getSourceDateTimeFormat());
    }
604160
public function attr(string $name, $val=null)
    {
        if ($val !== null) { // set attribute for all nodes
            foreach ($this->getElements() as $node) {
                $node->setAttribute($name, $val);
            }
            return $this;
        }
        if ($node = $this->getFirstElmNode()) { // get attribute value for first element
            return $node->getAttribute($name);
        }
    }
1134071
public static function EqValues( $val1, $val2, &$res )
	{
		$res = false;

		if ( ! $val1 instanceof ValueProxy )
		{
			/**
			 * @var ValueProxyFactory $f
			 */
			$class = Type::FromValue( $val1 )->getFullName();
			$f = isset( ValueProxy::$valueFactory[ $class ] )
				? ValueProxy::$valueFactory[ $class ]
				: null;

			if ( is_null( $f ) ) return false;
			$val1 = $f->Create( $val1 instanceof XPath2Item ? $val1->getTypedValue() : $val1 );
		}

		if ( ! $val2 instanceof ValueProxy )
		{

			/**
			 * @var ValueProxyFactory $f
			 */
			$class = Type::FromValue( $val2 )->getFullName();
			$f = isset( ValueProxy::$valueFactory[ $class ] )
				? ValueProxy::$valueFactory[ $class ]
				: null;

			if ( is_null( $f ) ) return false;
			$val2 = $f->Create( $val2 instanceof XPath2Item ? $val2->getTypedValue() : $val2 );
		}

		switch ( ValueProxy::$conv_t[ $val1->GetValueCode() ][ $val2->GetValueCode() ] )
		{
			case -1:
				return $val2->Promote( $val1 )->TryEq( $val2, $res );

			case 0:
				return $val1->TryEq( $val2, $res );

			case 1:
				return $val1->TryEq( $val1->Promote( $val2 ), $res );

			default:
				if ( ValueProxy::$conv_t[ $val2->GetValueCode() ][ $val1->GetValueCode() ] == 1 )
					return $val2->Promote( $val1 )->TryEq( $val2, $res );
				return false;
		}
	}
215575
public function Sub( $val )
	{
		$value = $val instanceof DecimalValue ? $val : Convert::ToDecimal( $val );
		return new DecimalValue( bcsub( $this->_value, $value->getValue(), max( $this->getScale(), $this->scale( $value ) ) ) );
	}
1314654
public static function OperatorSubtract( $val1, $val2 )
	{
		switch ( ValueProxy::$conv_t[ $val1->GetValueCode() ][ $val2->GetValueCode() ] )
		{
			case -1:
				return $val2->Promote( $val1 )->Sub( $val2 );

			case 0:
				return $val1->Sub( $val2 );

			case 1:
				return $val1->Sub( $val1->Promote( $val2 ) );

			default:

				if ( ValueProxy::$conv_t[ $val2->GetValueCode() ][ $val1->GetValueCode() ] == 1 )
					return $val2->Promote( $val1)->Sub( $val2 );
				throw XPath2Exception::withErrorCodeAndParams( "XPTY0004", Resources::BinaryOperatorNotDefined,
					array(
						"op:sub",
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $val1 ), XmlTypeCardinality::One ),
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $val2 ), XmlTypeCardinality::One )
					)
				);
		}
	}
758132
protected function Mod( $val )
	{
		$numerator = $this->_value;
		$denominator = $val->getValue();

		// if ( $denominator == 0 )
		//	throw XPath2Exception::withErrorCode( "FOAR0001", Resources::FOAR0001 );

		// if ( is_nan( $denominator ) )
		//	throw XPath2Exception::withErrorCode( "FOAR0002", Resources::FOAR0002 );

		// if ( is_nan( $numerator ) || is_infinite( $numerator ) )
		//	throw XPath2Exception::withErrorCode( "FOAR0002", Resources::FOAR0002 );

		return new DoubleProxy( fmod( $numerator, $denominator ) );
	}
250071
public function setLineWidth( $val )
	{
	    if ( $this->jsWriter instanceof \Altamira\JsWriter\Ability\Lineable ) {
	        $this->jsWriter->setSeriesLineWidth( $this->getTitle(), $val );
	    }
	    return $this;
	}
705541
public function setRawMimeDirValue($val)
    {
        $val = explode($this->delimiter, $val);
        foreach ($val as &$item) {
            $item = (float) $item;
        }
        $this->setParts($val);
    }
518712
public static function op_IntegerDivide( $val1, $val2 )
	{
		switch ( ValueProxy::$conv_t[ $val1->GetValueCode() ][ $val2->GetValueCode() ] )
		{
			case -1:
				return $val2->Promote( $val1 )->IDiv( $val2 );

			case 0:
				return $val1->IDiv( $val2 );

			case 1:
				return $val1->IDiv( $val1->Promote( $val2 ) );

			default:
				if ( ValueProxy::$conv_t[ $val2->GetValueCode() ][ $val1->GetValueCode() ] == 1 )
					return $val2->Promote( $val1 )->IDiv( $val2 );

				throw XPath2Exception::withErrorCodeAndParams( "XPTY0004", Resources::BinaryOperatorNotDefined,
					array(
						"op:idiv",
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $val1 ), XmlTypeCardinality::One ),
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $val2 ), XmlTypeCardinality::One )
					)
				);
		}
	}
707821
private static function Bind()
	{
		ValueProxy::$conv_t = array_fill( 0, ValueProxy::TYPES_MAX, 0 );
		for ( $k = 0; $k < ValueProxy::TYPES_MAX; $k++ )
		{
			ValueProxy::$conv_t[ $k ] = array_fill( 0, ValueProxy::TYPES_MAX, -2 );
		}

		$list = array_values( ValueProxy::$valueFactory );

		foreach ( $list as /** @var ValueProxyFactory $curr */ $curr )
		{
			foreach ( $list as /** @var ValueProxyFactory $curr2 */ $curr2 )
			{
				if ( $curr == $curr2 )
					ValueProxy::$conv_t[ $curr->GetValueCode() ][ $curr2->GetValueCode() ] = 0;
				else
					ValueProxy::$conv_t[ $curr->GetValueCode() ][ $curr2->GetValueCode() ] = $curr->Compare( $curr2 );
			}
		}
	}
1362397
public function setCoreProxyHost($value)
    {
        $this->setFieldName('proxy_host');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
1156494
function(val) {
      return val === undefined ? (this.length ? this[0].clientHeight || this[0].innerHeight : 0) : this.each(function(index, el) {
        el.style.height = val + 'px';
      });
    }
1297454
public function set($name, $val)
    {
        $var = &$this->nestedValueRef($name, $this->data);

        // Mark changed
        if ($var !== $val) {
            $var = $val;
            $this->markChanged($name);
        }
        return $this;
    }
1194843
protected function Mul( $val )
	{
		if ( ! $val instanceof ValueProxy ) throw new \InvalidArgumentException();
		return new IntProxy( $this->_value * $val->getValue() );
	}
546932
public function prop(string $name, $val=null)
    {
        if ($val !== null) { // set attribute for all nodes
            foreach ($this->nodes as $node) {
                $node->$name = $val;
            }

            return $this;
        }
        // get property value for first element
        if ($name === 'outerHTML') {
            return $this->getOuterHtml();
        }
        if ($node = $this->getFirstElmNode()) {
            if (isset($node->$name)) {
                return $node->$name;
            }
        }
    }