<track-breadth> = <length> | <percentage> | <flex> | min-content |
max-content | auto
429945
private boolean isTermTrackBreadth(Term t) {
        if (t instanceof TermLengthOrPercent) {
            return true;
        } else if (t instanceof TermIdent) {
            CSSProperty property = genericPropertyRaw(GridTemplateRowsColumns.class, null, (TermIdent) t);
            return property == GridTemplateRowsColumns.AUTO
                    || property == GridTemplateRowsColumns.MIN_CONTENT
                    || property == GridTemplateRowsColumns.MAX_CONTENT;
        }
        return false;
    }
166009
function setByPercentage(callback) {
    var percentage = 0;
    
    var setByPercentageInterval = setInterval(function() {
        if (percentage <= 100) {
            dot3k.barGraph.setByPercentage(percentage);
            
            percentage++;
        } else {
            clearInterval(setByPercentageInterval);
            
            if (callback) {
                callback();
            }
        }
    }, 50);
}
191982
static int sharedPrefixLength(ByteBuffer a, int aStart, ByteBuffer b, int bStart) {
    int i = 0;
    final int max = Math.min(a.remaining() - aStart, b.remaining() - bStart);
    aStart += a.position();
    bStart += b.position();
    while (i < max && a.get(aStart++) == b.get(bStart++)) {
      i++;
    }
    return i;
  }
364099
function() {
    return Math.max(MIN_COLUMN_COUNT, Math.floor((document.body.offsetWidth + GAP_WIDTH) / (COLUMN_WIDTH + GAP_WIDTH)));
  }
38014
function(){
      var ele = this[0];

      if( ele ){
        var w = ele._private.style.width;
        return w.strValue === 'auto' ? ele._private.autoWidth : w.pxValue;
      }
    }
427979
def progress(count, total, suffix=''):
    '''
    
    '''
    bar_len = 60
    filled_len = int(round(bar_len * count / float(total)))
    percents = round(100.0 * count / float(total), 1)
    bar = '=' * filled_len + '-' * (bar_len - filled_len)
    sys.stdout.write('[%s] %s%s %s\r' % (bar, percents, '%', suffix))
    sys.stdout.flush()
658137
function(_contentLength) {
    var scrollTop, rowHeight, columnCount, calculatedStartingIndex,
        contentLength;

    if (_contentLength === undefined) {
      contentLength = get(this, 'content.length');
    } else {
      contentLength = _contentLength;
    }

    scrollTop = this.scrollTop;
    rowHeight = get(this, 'rowHeight');
    columnCount = get(this, 'columnCount');

    if (this.heightForIndex) {
      calculatedStartingIndex = this._calculatedStartingIndex();
    } else {
      calculatedStartingIndex = floor(scrollTop / rowHeight) * columnCount;
    }

    var viewsNeededForViewport = this._numChildViewsForViewport();
    var paddingCount = (1 * columnCount);
    var largestStartingIndex = max(contentLength - viewsNeededForViewport, 0);

    return min(calculatedStartingIndex, largestStartingIndex);
  }
1040028
def coverage(self):
        
        if self._targetLength == 0:
            return 0.0

        coverage = 0
        for (intervalType, (start, end)) in self.walk():
            if intervalType == self.FULL:
                # Adjust start and end to ignore areas where the read falls
                # outside the target.
                coverage += (min(end, self._targetLength) - max(0, start))
        return float(coverage) / self._targetLength
374781
function measureText (nodes, parentNode) {
  let width = 0
  for (let i = 0; i < nodes.length; i++) {
    const node = nodes[i]
    width += measure(node.textContent, node.nodeType === 1 ? node : parentNode)
  }
  return width
}
1043500
private void calculateInside(int spanStart, int spanEnd, CfgParseChart chart, double[] newValues) {
    double[] binaryRuleValues = binaryDistributionWeights.getValues();
    
    int leftIndex = Ints.indexOf(binaryDistributionWeights.getDimensionNumbers(), leftVar.getOnlyVariableNum());
    int rightIndex = Ints.indexOf(binaryDistributionWeights.getDimensionNumbers(), rightVar.getOnlyVariableNum());
    
    for (int i = 0; i < spanEnd - spanStart; i++) {
      double[] left = chart.getInsideEntriesArray(spanStart, spanStart + i);
      double[] right = chart.getInsideEntriesArray(spanStart + i + 1, spanEnd);

      for (int j = 0; j < newValues.length; j++) {
        newValues[j] = binaryRuleValues[j] * left[binaryDistributionWeights.indexToPartialDimKey(j, leftIndex)]
            * right[binaryDistributionWeights.indexToPartialDimKey(j, rightIndex)];
      }

      chart.updateInsideEntry(spanStart, spanEnd, i, newValues, binaryDistribution);
    }
  }
693218
function() {
      var n = JSLitmus._tests.length, markers = [], data = [];
      var d, min = 0, max = -1e10;
      var normalize = jsl.$('test_normalize').checked;

      // Gather test data
      for (var i=0; i < JSLitmus._tests.length; i++) {
        var test = JSLitmus._tests[i];
        if (test.count) {
          var hz = test.getHz(normalize);
          var v = hz != Infinity ? hz : 0;
          data.push(v);
          markers.push('t' + jsl.escape(test.name + '(' + jsl.toLabel(hz)+ ')') + ',000000,0,' +
            markers.length + ',10');
          max = Math.max(v, max);
        }
      }
      if (markers.length <= 0) return null;

      // Build chart title
      var title = document.getElementsByTagName('title');
      title = (title && title.length) ? title[0].innerHTML : null;
      var chart_title = [];
      if (title) chart_title.push(title);
      chart_title.push('Ops/sec (' + platform + ')');

      // Build labels
      var labels = [jsl.toLabel(min), jsl.toLabel(max)];

      var w = 250, bw = 15;
      var bs = 5;
      var h = markers.length*(bw + bs) + 30 + chart_title.length*20;

      var params = {
        chtt: escape(chart_title.join('|')),
        chts: '000000,10',
        cht: 'bhg',                     // chart type
        chd: 't:' + data.join(','),     // data set
        chds: min + ',' + max,          // max/min of data
        chxt: 'x',                      // label axes
        chxl: '0:|' + labels.join('|'), // labels
        chsp: '0,1',
        chm: markers.join('|'),         // test names
        chbh: [bw, 0, bs].join(','),    // bar widths
        // chf: 'bg,lg,0,eeeeee,0,eeeeee,.5,ffffff,1', // gradient
        chs: w + 'x' + h
      };
      return 'http://chart.apis.google.com/chart?' + jsl.join(params, '=', '&');
    }
536108
void updateMaxWidth() {

        Element base = getWidget().getElement();
        int availableWidth = base.getOffsetWidth();
        int requiredWidth = 0;
        NodeList<Element> children = CmsDomUtil.querySelectorAll("div > a, div > span", base);
        for (int i = 0; i < children.getLength(); i++) {
            Element child = children.getItem(i);
            Style style = child.getFirstChildElement().getStyle();
            style.setProperty("maxWidth", "none");
            requiredWidth += child.getOffsetWidth();
            style.clearProperty("maxWidth");
        }
        if (requiredWidth > availableWidth) {
            int padding = 30 + ((children.getLength() - 1) * 35);
            int maxWidth = (availableWidth - padding) / children.getLength();
            setMaxWidth(maxWidth + "px");
        } else {
            setMaxWidth("none");
        }
    }
654025
function( containerNode, preceding, following )
    {
        var sel = window.getSelection();
        if( sel.modify )
        {
            for( var i=0; i < preceding; ++i )
                sel.modify('extend', 'backward', 'character');
            for( var i=0; i < following; ++i )
                sel.modify('extend', 'forward', 'character');
        }
        else
        {
            // not so easy if the steps would cover multiple nodes ...
            var range = sel.getRangeAt(0);
            range.setStart( range.startContainer, range.startOffset - preceding );
            range.setEnd( range.endContainer, range.endOffset + following );
            sel.removeAllRanges();
            sel.addRange(range);
        }
    }
134322
function (trackIndex, animation, loop, delay) {
		var entry = new spine.TrackEntry();
		entry.animation = animation;
		entry.loop = loop;
		entry.endTime = animation.duration;

		var last = this._expandToIndex(trackIndex);
		if (last) {
			while (last.next)
				last = last.next;
			last.next = entry;
		} else
			this.tracks[trackIndex] = entry;

		if (delay <= 0) {
			if (last)
				delay += last.endTime - this.data.getMix(last.animation, animation);
			else
				delay = 0;
		}
		entry.delay = delay;

		return entry;
	}
1055593
function setPartial(fs, path, nodeCount, callback) {
  fs.setxattr(path, constants.attributes.partial, nodeCount, callback);
}
83399
function genTicks(min, max, count) {
  var assign;

  if (max < min) {
    (assign = [max, min], min = assign[0], max = assign[1]);
  }

  var step = tickStep(min, max, count);
  var first = Math.floor(min / step) * step;
  var ticks$$1 = [first];
  var cur = first;

  while (cur < max) {
    cur += step;
    ticks$$1.push(cur);
  }

  if (Math.abs(min - ticks$$1[1]) < step) {
    ticks$$1.shift();
    ticks$$1[0] = min;
  }

  if (Math.abs(max - ticks$$1[ticks$$1.length - 2]) < step) {
    ticks$$1.pop();
    ticks$$1[ticks$$1.length - 1] = max;
  }

  return ticks$$1
}
709510
function() {
		var me = this;
		if (me.margins) {
			me.paddingLeft = Math.max(me.paddingLeft - me.margins.left, 0);
			me.paddingTop = Math.max(me.paddingTop - me.margins.top, 0);
			me.paddingRight = Math.max(me.paddingRight - me.margins.right, 0);
			me.paddingBottom = Math.max(me.paddingBottom - me.margins.bottom, 0);
		}
	}