Get the width of the browser’s scrollbar.
Taken from: https://github.com/VodkaBears/Remodal/blob/master/src/jquery.remodal.js
197736
function getScrollbarWidth() {

    if ( $html.height() <= $window.height() ) {
        return 0
    }

    var $outer = $( '<div style="visibility:hidden;width:100px" />' ).
        appendTo( 'body' )

    // Get the width without scrollbars.
    var widthWithoutScroll = $outer[0].offsetWidth

    // Force adding scrollbars.
    $outer.css( 'overflow', 'scroll' )

    // Add the inner div.
    var $inner = $( '<div style="width:100%" />' ).appendTo( $outer )

    // Get the width with scrollbars.
    var widthWithScroll = $inner[0].offsetWidth

    // Remove the divs.
    $outer.remove()

    // Return the difference between the widths.
    return widthWithoutScroll - widthWithScroll
}
190053
function getWidth(el) {
  let styles = window.getComputedStyle(el);
  let width = el.offsetWidth;
  let borderLeftWidth = parseFloat(styles.borderLeftWidth);
  let borderRightWidth = parseFloat(styles.borderRightWidth);
  let paddingLeft = parseFloat(styles.paddingLeft);
  let paddingRight = parseFloat(styles.paddingRight);
  return width - borderLeftWidth - borderRightWidth - paddingRight - paddingLeft;
}
973234
public float getWidth() {
    if (DocumentElement_Type.featOkTst && ((DocumentElement_Type)jcasType).casFeat_width == null)
      jcasType.jcas.throwFeatMissing("width", "ch.epfl.bbp.uima.types.DocumentElement");
    return jcasType.ll_cas.ll_getFloatValue(addr, ((DocumentElement_Type)jcasType).casFeatCode_width);}
409943
function() {
    var self = this, width, heightScale,
        widthDiff, heightDiff,
        x, y,
        xstop = 0, ystop = 0;

    if (self.__indicatorX) {
      // Handle the X scrollbar

      // Don't go all the way to the right if we have a vertical scrollbar as well
      if (self.__indicatorY) xstop = 10;

      x = Math.round(self.__indicatorX.sizeRatio * self.__scrollLeft) || 0,

      // The the difference between the last content X position, and our overscrolled one
      widthDiff = self.__scrollLeft - (self.__maxScrollLeft - xstop);

      if (self.__scrollLeft < 0) {

        widthScale = Math.max(self.__indicatorX.minScale,
            (self.__indicatorX.size - Math.abs(self.__scrollLeft)) / self.__indicatorX.size);

        // Stay at left
        x = 0;

        // Make sure scale is transformed from the left/center origin point
        self.__indicatorX.indicator.style[self.__transformOriginProperty] = 'left center';
      } else if (widthDiff > 0) {

        widthScale = Math.max(self.__indicatorX.minScale,
            (self.__indicatorX.size - widthDiff) / self.__indicatorX.size);

        // Stay at the furthest x for the scrollable viewport
        x = self.__indicatorX.maxPos - xstop;

        // Make sure scale is transformed from the right/center origin point
        self.__indicatorX.indicator.style[self.__transformOriginProperty] = 'right center';

      } else {

        // Normal motion
        x = Math.min(self.__maxScrollLeft, Math.max(0, x));
        widthScale = 1;

      }

      var translate3dX = 'translate3d(' + x + 'px, 0, 0) scaleX(' + widthScale + ')';
      if (self.__indicatorX.transformProp !== translate3dX) {
        self.__indicatorX.indicator.style[self.__transformProperty] = translate3dX;
        self.__indicatorX.transformProp = translate3dX;
      }
    }

    if (self.__indicatorY) {

      y = Math.round(self.__indicatorY.sizeRatio * self.__scrollTop) || 0;

      // Don't go all the way to the right if we have a vertical scrollbar as well
      if (self.__indicatorX) ystop = 10;

      heightDiff = self.__scrollTop - (self.__maxScrollTop - ystop);

      if (self.__scrollTop < 0) {

        heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - Math.abs(self.__scrollTop)) / self.__indicatorY.size);

        // Stay at top
        y = 0;

        // Make sure scale is transformed from the center/top origin point
        if (self.__indicatorY.originProp !== 'center top') {
          self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center top';
          self.__indicatorY.originProp = 'center top';
        }

      } else if (heightDiff > 0) {

        heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - heightDiff) / self.__indicatorY.size);

        // Stay at bottom of scrollable viewport
        y = self.__indicatorY.maxPos - ystop;

        // Make sure scale is transformed from the center/bottom origin point
        if (self.__indicatorY.originProp !== 'center bottom') {
          self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center bottom';
          self.__indicatorY.originProp = 'center bottom';
        }

      } else {

        // Normal motion
        y = Math.min(self.__maxScrollTop, Math.max(0, y));
        heightScale = 1;

      }

      var translate3dY = 'translate3d(0,' + y + 'px, 0) scaleY(' + heightScale + ')';
      if (self.__indicatorY.transformProp !== translate3dY) {
        self.__indicatorY.indicator.style[self.__transformProperty] = translate3dY;
        self.__indicatorY.transformProp = translate3dY;
      }
    }
  }
210406
public java.lang.String getWidth() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.width);

    }
579496
def get_scrollbar_value_height(self):
        """"""
        vsb = self.editor.verticalScrollBar()
        return vsb.maximum()-vsb.minimum()+vsb.pageStep()
791566
private int getWidthOfWidestItem() {

        int maxWidth = 0;

        for (CmsContextMenuItemWidget item : m_menuItems) {
            item.getElement().getStyle().clearWidth();
            int itemWidth = measureWidth(item);
            if (itemWidth > maxWidth) {
                maxWidth = itemWidth;
            }
        }

        return maxWidth;
    }
447467
function getScrollbarWidth() {
      var outer = $document[0].createElement('div');
      outer.style.visibility = 'hidden';
      outer.style.width = '100px';
      outer.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps

      $document[0].body.appendChild(outer);

      var widthNoScroll = outer.offsetWidth;
      // force scrollbars
      outer.style.overflow = 'scroll';

      // add innerdiv
      var inner = $document[0].createElement('div');
      inner.style.width = '100%';
      outer.appendChild(inner);

      var widthWithScroll = inner.offsetWidth;

      // remove divs
      outer.parentNode.removeChild(outer);

      return widthNoScroll - widthWithScroll;
    }
790094
function openModal(src, width) {
	if ( !width ) width = 680;
	//var elementId = 'orcodio';
	var originalYScroll = window.pageYOffset;
	//var modalFrame = $.modal('<iframe id="'+ elementId +'" src="' + src + '" width="' + width + '" onload="centerModal(this,' + originalYScroll + ')" style="border:0">', {
	var modalFrame = $.modal('<iframe src="' + src + '" width="' + width + '" onload="centerModal(this,' + originalYScroll + ')" style="border:0">', {
		closeHTML:'',
		containerCss:{
			backgroundColor:"#fff",
			borderColor:"#fff",
			width:width,
			padding:0,
			margin:0
		},
		overlayClose:true,
		autoPosition:false,
		modal:true,
		opacity:70
	});
}
89370
function _windowHasScrollbar ( query, context ) {

        var windowInnerHeight, windowInnerWidth, windowProps,
            scrollbarWidth = $.scrollbarWidth(),
            result = {},
            doneX = ! query.getHorizontal,
            doneY = ! query.getVertical;

        // We may be able to take a shortcut. The window.innerWidth and -Height report the dimensions of the viewport
        // including scroll bars, and documentElement.clientWidth and -Height report them without scroll bars. That
        // gives the presence of a scroll bar away, as long as
        //
        // - the scroll bars actually take up space (width > 0)
        // - the browser supports window.innerWidth/Height (IE8, for instance, does not)
        // - the browser doesn't report a buggy value. FF has a bug which as only been fixed in FF25 (released 29 Oct
        //   2013). It manifests itself in a fictional return value of 10 for these properties. See
        //   * https://developer.mozilla.org/en-US/docs/Web/API/Window.innerWidth
        //   * https://developer.mozilla.org/en-US/docs/Web/API/Window.innerHeight
        //   * https://bugzilla.mozilla.org/show_bug.cgi?id=641188

        if ( query.getHorizontal && scrollbarWidth > 0 ) {
            windowInnerHeight = context.window.innerHeight;
            if ( windowInnerHeight > 10 ) {
                result.horizontal = windowInnerHeight > context.documentElement.clientHeight;
                doneX = true;
            }
        }

        if ( query.getVertical && scrollbarWidth > 0 ) {
            windowInnerWidth = context.window.innerWidth;
            if ( windowInnerWidth > 10 ) {
                result.vertical = windowInnerWidth > context.documentElement.clientWidth;
                doneY = true;
            }
        }

        if ( ! doneX || ! doneY ) {

            // Shortcut didn't work. We have to evaluate overflow settings, window and document size.

            windowProps = _getViewportOverflows( query, context ).window;

            // Handle the trivial cases first: window set to overflow: scroll or to overflow: hidden.
            if ( ! doneX && windowProps.overflowScrollX ) result.horizontal = doneX = true;
            if ( ! doneY && windowProps.overflowScrollY ) result.vertical = doneY = true;

            if ( ! doneX && windowProps.overflowHiddenX ) {
                result.horizontal = false;
                doneX = true;
            }

            if ( ! doneY && windowProps.overflowHiddenY ) {
                result.vertical = false;
                doneY = true;
            }

            // Handle the remaining overflow: auto case
            //
            // (There is no actual overflow: visible case for the viewport, see getAppliedViewportOverflows.)
            if ( ! doneX ) result.horizontal = context.documentElement.clientWidth < $.documentWidth( context.document );
            if ( ! doneY ) result.vertical = context.documentElement.clientHeight < $.documentHeight( context.document );

        }

        return result;

    }
97180
def getActualLineWidths0(self):
        

        assert hasattr(self, 'width'), "Cannot call this method before wrap()"
        if self.blPara.kind:
            func = lambda frag, w=self.width: w - frag.extraSpace
        else:
            func = lambda frag, w=self.width: w - frag[0]
        return map(func, self.blPara.lines)
1350378
public int getWidth() {
        try {
            return ((RemoteWebElement) getElement()).getSize().width;
        } catch (NumberFormatException e) {
            throw new WebElementException("Attribute " + WIDTH + " not found for Image " + getLocator(), e);
        }
    }
1286371
def _get_width(maxwidth):
    """"""
    width = maxwidth / 3
    if maxwidth <= 60:
        width = maxwidth
    elif 60 < maxwidth <= 120:
        width = maxwidth / 2
    return width
1198814
def console_get_width(con: tcod.console.Console) -> int:
    
    return int(lib.TCOD_console_get_width(_console(con)))
721538
function () {
            var el = this.element();
            if ( el === document || el === window ) {
                return $B.measure.windowWidth();
            } else if ( el === screen ) {
                return screen.availWidth;
            } else {
                var pl, pr, value = this.width();
    
                pl = parseFloat( this.css('padding-left') );
                pr = parseFloat( this.css('padding-right') );
                return value - (( pl > 0 ? pl : 0 ) + ( pr > 0 ? pr : 0 ));
            }
        }
583659
function() {
    var elTbody = this._elTbody,
        elBdContainer = this._elBdContainer;
    
    // IE 6 and 7 only when y-scrolling not enabled
    if(!this.get("height") && (ua.ie)) {
        // Snap outer container height to content
        elBdContainer.style.height = 
                // but account for x-scrollbar if it is visible
                (elBdContainer.scrollWidth > elBdContainer.offsetWidth ) ?
                (elTbody.parentNode.offsetHeight + 18) + "px" : 
                elTbody.parentNode.offsetHeight + "px";
    }

    // Sync message tbody
    if(this._elTbody.rows.length === 0) {
        this._elMsgTbody.parentNode.style.width = this.getTheadEl().parentNode.offsetWidth + "px";
    }
    else {
        this._elMsgTbody.parentNode.style.width = "";
    }
}
382411
function refreshScrollbarHandleLength(isHorizontal) {
                    var handleCSS = {};
                    var scrollbarVars = getScrollbarVars(isHorizontal);
                    var scrollbarVarsInfo = scrollbarVars._info;
                    var digit = 1000000;
                    //get and apply intended handle length
                    var handleRatio = MATH.min(1, (_hostSizeCache[scrollbarVars._w_h] - (_paddingAbsoluteCache ? (isHorizontal ? _paddingX : _paddingY) : 0)) / _contentScrollSizeCache[scrollbarVars._w_h]);
                    handleCSS[scrollbarVars._width_height] = (MATH.floor(handleRatio * 100 * digit) / digit) + "%"; //the last * digit / digit is for flooring to the 4th digit

                    if (!nativeOverlayScrollbarsAreActive())
                        scrollbarVars._handle.css(handleCSS);

                    //measure the handle length to respect min & max length
                    scrollbarVarsInfo._handleLength = scrollbarVars._handle[0]['offset' + scrollbarVars._Width_Height];
                    scrollbarVarsInfo._handleLengthRatio = handleRatio;
                }