handle "size" property, which has different behaviour for input vs everything else
972228
def _special_value_size(em):
    '''
        
    '''
    if em.tagName == 'input':
        # TODO: "size" on an input is implemented very weirdly. Negative values are treated as invalid,
        #          A value of "0" raises an exception (and does not set HTML attribute)
        #          No upper limit.
        return convertToPositiveInt(em.getAttribute('size', 20), invalidDefault=20)
    return em.getAttribute('size', '')
307295
def on_size(self, event):
        ''''''
        state = self.state
        size = event.GetSize()
        state.width = size.width
        state.height = size.height
        self.redraw_map()
630822
function( width, height ) {
		if( arguments.length === 2 ) {
			this.width = width;
			this.height = height;
		} else {
			this.width = this.container.width();
			this.height = this.container.height();
		}

		if( this.isInitialised === true ) {
			this.root.callDownwards( 'setSize', [ this.width, this.height ] );

			if( this._maximisedItem ) {
				this._maximisedItem.element.width( this.container.width() );
				this._maximisedItem.element.height( this.container.height() );
				this._maximisedItem.callDownwards( 'setSize' );
			}

			this._adjustColumnsResponsive();
		}
	}
331210
function width (val) {
  var cr = val.indexOf(EOL);
  if (cr !== -1) {
    val = val.substring(0, cr);
  }
  if (typeof val !== 'string') {
    val = val + '';
  }
  var h = val.match(/[ -~]/g);
  return val.length * 2 - (h ? h.length : 0);
}
355028
function numberPad(num, size) {
  var s = "000000000" + num;
  return s.substr(s.length-size);
}
535654
function assembleInput(input) {
  if (_.isArray(input.context)) {
    return input.context;
  }
  var result = (input.prefix || '') + (input.context || '') + (input.suffix || '');
  return strip(result);
}
856705
function () {
            var inputField = this._textInputField;
            var inputFieldParent = inputField.parentNode;
            if (inputFieldParent.lastChild !== inputField) {
                inputFieldParent.removeChild(inputField);
                inputFieldParent.appendChild(inputField);
                inputField.style.width = "0px";
                this.__resizeInput();
            }
        }
1164164
function isIntrinsicSize(element, prop) {

	var computedStyle = getComputedStyle(element);

	if (computedStyle.display === 'none') {
		return false;
	}

	if (computedStyle.display === 'inline') {
		return true;
	}

	// Non-floating non-absolute block elements (only width)
	if (
		prop === 'width'
		&& ['block', 'list-item', 'flex', 'grid'].indexOf(computedStyle.display) !== -1
		&& computedStyle.cssFloat === 'none'
		&& computedStyle.position !== 'absolute'
		&& computedStyle.position !== 'fixed'
	) {
		return false;
	}

	var originalStyle = getOriginalStyle(element, prop);

	// Fixed size
	if (originalStyle && originalStyle.match(LENGTH_REGEXP)) {
		return false;
	}

	// Percentage size
	if (originalStyle && originalStyle.substr(-1) === '%') {
		return false;
	}

	// Calc expression
	if (originalStyle && originalStyle.substr(0, 5) === 'calc(') {
		return false;
	}

	// Elements without a defined size
	return true;

}
803796
function expandShorthandAndAntiAlias(property, value, result) {
    if (isNotAnimatable(property)) {
      return;
    }
    var longProperties = shorthandToLonghand[property];
    if (longProperties) {
      shorthandExpanderElem.style[property] = value;
      for (var i in longProperties) {
        var longProperty = longProperties[i];
        var longhandValue = shorthandExpanderElem.style[longProperty];
        result[longProperty] = antiAlias(longProperty, longhandValue);
      }
    } else {
      result[property] = antiAlias(property, value);
    }
  }
932149
function checkLength(size, schema, key) {
    //Check if it is an int
    if (Number.isInteger(schema[SCHEMALENGTH])) {
      if (size != schema[SCHEMALENGTH]) {
        throw new ValidationException("Size of " + key + " is not correct.");
      }
    } else if (typeof schema[SCHEMALENGTH] == "string") {
      if (
        size < getMin(schema[SCHEMALENGTH], key) ||
        size > getMax(schema[SCHEMALENGTH], key)
      ) {
        throw new ValidationException("Size of " + key + " is not correct.");
      }
    } else {
      throw new ValidationException(SCHEMALENGTH + " cast exception: " + key);
    }
  }
1337957
function handleInput(input) {

    /*!
     * Display help
     */

    if (!input || input === '-h' || input === '--help') {
        help();
        process.exit();
    }

    /*!
     * Display version
     */

    if (input === '-v' || input === '--version') {
        version();
        process.exit();
    }

    /*!
     * Render the QR Code
     */

    qrcode.generate(input);
}
1234405
function standardizeInput(input) {
  if ([undefined, null].indexOf(input) !== -1) {
    input = null;
  }
  else if (_.isNaN(input)) {
    input = null;
  }
  else if (_.isString(input)) {
    input = input.trim();

    // Written empty values
    if (["unspecified", "unknown", "none", "null", "empty", ""].indexOf(input.toLowerCase()) !== -1) {
      input = null;
    }
  }

  return input;
}
1190374
function(properties, options) {
    var widthUnit = '',
      heightUnit = '';

    // name takes precedence
    if (properties.name) {
      return properties.name;
    } else {
      // figure out the units for width and height (they can be different)
      widthUnit = ((properties.width || 0).toString().indexOf('%') > 0) ? options.units.percentage : options.units.pixel;
      heightUnit = ((properties.height || 0 ).toString().indexOf('%') > 0) ? options.units.percentage : options.units.pixel;

      if (properties.width && properties.height) {
        return parseFloat(properties.width) + widthUnit + options.units.multiply + parseFloat(properties.height) + heightUnit;
      } else {
        return (properties.width) ? parseFloat(properties.width) + widthUnit : parseFloat(properties.height) + heightUnit;
      }
    }
  }
351429
def _pad(string, size):
    
    strlen = len(string)
    if strlen == size:
        return string
    if strlen < size:
        return _padding[0:size-strlen] + string
    return string[-size:]
803712
public static void hasSize(Collection<?> input, int length, String message) {

    notNull(input, message);
    if (input.size() != length) {
      throw new IllegalArgumentException(message);
    }
  }
603568
function handleWindowResize () {
    ctrl.lastSelectedIndex = ctrl.selectedIndex;
    ctrl.offsetLeft        = fixOffset(ctrl.offsetLeft);

    $mdUtil.nextTick(function () {
      ctrl.updateInkBarStyles();
      updatePagination();
    });
  }
17010
function(event, args) {
      var size = args[0];
		// TODO: do not hardcode those sizes !!
      WireIt.sn(this.bodyEl, null, {width: (size[0]-14)+"px", height: (size[1]-( this.ddHandle ? 44 : 14) )+"px"});
   }