div[yes=no]#something.hello.world:nth-child(-2n+1)%placeholder
437975
protected function selectorSingle(&$out) {
        $oldWhite = $this->eatWhiteDefault;
        $this->eatWhiteDefault = false;

        $parts = array();

        if ($this->literal("*", false)) {
            $parts[] = "*";
        }

        while (true) {
            // see if we can stop early
            if ($this->match("\s*[{,]", $m)) {
                $this->count--;
                break;
            }

            $s = $this->seek();
            // self
            if ($this->literal("&", false)) {
                $parts[] = scssc::$selfSelector;
                continue;
            }

            if ($this->literal(".", false)) {
                $parts[] = ".";
                continue;
            }

            if ($this->literal("|", false)) {
                $parts[] = "|";
                continue;
            }

            // for keyframes
            if ($this->unit($unit)) {
                $parts[] = $unit;
                continue;
            }

            if ($this->keyword($name)) {
                $parts[] = $name;
                continue;
            }

            if ($this->interpolation($inter)) {
                $parts[] = $inter;
                continue;
            }

            if ($this->literal('%', false) && $this->placeholder($placeholder)) {
                $parts[] = '%';
                $parts[] = $placeholder;
                continue;
            }

            if ($this->literal("#", false)) {
                $parts[] = "#";
                continue;
            }

            // a pseudo selector
            if ($this->match("::?", $m) && $this->mixedKeyword($nameParts)) {
                $parts[] = $m[0];
                foreach ($nameParts as $sub) {
                    $parts[] = $sub;
                }

                $ss = $this->seek();
                if ($this->literal("(") &&
                    ($this->openString(")", $str, "(") || true ) &&
                    $this->literal(")"))
                {
                    $parts[] = "(";
                    if (!empty($str)) $parts[] = $str;
                    $parts[] = ")";
                } else {
                    $this->seek($ss);
                }

                continue;
            } else {
                $this->seek($s);
            }

            // attribute selector
            // TODO: replace with open string?
            if ($this->literal("[", false)) {
                $attrParts = array("[");
                // keyword, string, operator
                while (true) {
                    if ($this->literal("]", false)) {
                        $this->count--;
                        break; // get out early
                    }

                    if ($this->match('\s+', $m)) {
                        $attrParts[] = " ";
                        continue;
                    }
                    if ($this->string($str)) {
                        $attrParts[] = $str;
                        continue;
                    }

                    if ($this->keyword($word)) {
                        $attrParts[] = $word;
                        continue;
                    }

                    if ($this->interpolation($inter, false)) {
                        $attrParts[] = $inter;
                        continue;
                    }

                    // operator, handles attr namespace too
                    if ($this->match('[|-~\$\*\^=]+', $m)) {
                        $attrParts[] = $m[0];
                        continue;
                    }

                    break;
                }

                if ($this->literal("]", false)) {
                    $attrParts[] = "]";
                    foreach ($attrParts as $part) {
                        $parts[] = $part;
                    }
                    continue;
                }
                $this->seek($s);
                // should just break here?
            }

            break;
        }

        $this->eatWhiteDefault = $oldWhite;

        if (count($parts) == 0) return false;

        $out = $parts;
        return true;
    }
434862
function setHTML(container, content) {
    if (container) {
        // Clear out everything in the container
        while (container.firstChild) {
            container.removeChild(container.firstChild);
        }
        if (content) {
            if (typeof content === 'string') {
                container.innerHTML = content;
            } else {
                container.appendChild(content);
            }
        }
    }
}
591248
function SandboxPO() {
    // whitelist checkbox inputs
    this.checkboxes = ["link.renderLabel", "node.renderLabel", "staticGraph", "collapsible", "directed"];

    // actions
    this.fullScreenMode = () => cy.get(".container__graph > :nth-child(1) > :nth-child(1)");
    this.playGraph = () => cy.get(".container__graph > :nth-child(1) > :nth-child(2)").click();
    this.pauseGraph = () => cy.get(".container__graph > :nth-child(1) > :nth-child(3)").click();
    this.addNode = () => cy.get(".container__graph > :nth-child(1) > :nth-child(5)").click();
    this.removeNode = () => cy.get(".container__graph > :nth-child(1) > :nth-child(6)").click();
    this.clickJsonTreeNodes = () => {
        cy.get(".container__graph-data")
            .contains("root")
            .scrollIntoView();
        cy.get(".container__graph-data")
            .contains("nodes")
            .click();
    };
    // must be collapsed
    this.clickJsonTreeFirstNode = () =>
        cy
            .get(
                ":nth-child(2) > .rejt-not-collapsed > .rejt-not-collapsed-list > :nth-child(1) > .rejt-collapsed > .rejt-collapsed-text"
            )
            .click();
    this.addJsonTreeFirstNodeProp = () =>
        cy.get(":nth-child(2) > :nth-child(1) > .rejt-not-collapsed > :nth-child(4) > .rejt-plus-menu").click();
    this.deleteJsonTreeFirstNodeProp = () =>
        cy.get(".rejt-not-collapsed-list > :nth-child(2) > .rejt-minus-menu").click();

    // element getters
    this.getFieldInput = field =>
        this.checkboxes.includes(field)
            ? cy.contains(field).children("input")
            : cy.contains(field).siblings(".form-control");
    this.getGraphNumbers = () => cy.get(".container__graph-info");
}
78142
function _fnConvertToWidth ( sWidth, nParent )
		{
			if ( !sWidth || sWidth === null || sWidth === '' )
			{
				return 0;
			}
			
			if ( !nParent )
			{
				nParent = document.getElementsByTagName('body')[0];
			}
			
			var iWidth;
			var nTmp = document.createElement( "div" );
			nTmp.style.width = _fnStringToCss( sWidth );
			
			nParent.appendChild( nTmp );
			iWidth = nTmp.offsetWidth;
			nParent.removeChild( nTmp );
			
			return ( iWidth );
		}
113551
def num_having_numId(self, numId):
        
        xpath = './w:num[@w:numId="%d"]' % numId
        try:
            return self.xpath(xpath)[0]
        except IndexError:
            raise KeyError('no <w:num> element with numId %d' % numId)
711632
function before (el, newEl) {
  if (typeof newEl === 'string') {
    return el.insertAdjacentHTML('beforebegin', newEl)
  } else {
    return el.parentNode.insertBefore(newEl, el)
  }
}
1090200
function (element) {
    var left = 0
      , top = 0;

    do {
      left += element.offsetLeft;
      top += element.offsetTop;
    } while (element = element.offsetParent);

    return {
      left: left,
      top: top
    };
  }
542047
function elementLeadingWhitespace(el) {
  let style = getComputedStyle(el, null)
  let display = style.getPropertyValue('display')

  let firstNotIgnoredChild = () => {
    for(let i = 0; i < el.children.length; i++) {
      let n = el.children[i]
      if(!ignoredNode(n)) return n
    }
    return null
  }

  if(display === 'inline') {
    let first = firstNotIgnoredChild()
    if(first && first.nodeType === Node.ELEMENT_NODE) {
      return elementLeadingWhitespace(first)
    } else {
      return ''
    }
  } else if(display === 'inline-block'
    || display === 'inline-table'
    || display === 'none'
    || display === 'table-cell'
    || display === 'table-column'
    || display === 'table-column-group') {
    return ''
  } else {
    return '\n'
  }
}
1089305
function find(n, sel){
    if(typeof n === 'string'){
      sel = n;
      n = false;
    }
    if(typeof document.querySelectorAll !== 'undefined'){
      return (n||document).querySelectorAll( sel );
    }else{
      error('You can test PURE standalone with: iPhone, FF3.5+, Safari4+ and IE8+\n\nTo run PURE on your browser, you need a JS library/framework with a CSS selector engine');
    }
  }
1038749
function checkInit() {
        if (!container) {
            container = document.createElement("div");
            container.style.cssText = "position: fixed;" + "opacity: 0.9;" + "right: 0;" + "bottom: 0";
            document.body.appendChild(container);
        }
        initialized = true;
    }
622366
function (value) {
			var anim, barEl = this.get(BAR_EL);
			if (value) {
				if (value instanceof YAHOO.util.Anim) {
					anim = value;
				} else {
					anim = new YAHOO.util.Anim(barEl);
				}
				anim.onTween.subscribe(this._animOnTween,this,true);
				anim.onComplete.subscribe(this._animComplete,this,true);
				
				// Temporary solution until http://yuilibrary.com/projects/yui2/ticket/2528222 gets solved:
				var oldSetAttribute = anim.setAttribute,
					pb = this;
				switch(this.get(DIRECTION)) {
					case DIRECTION_BTT:
						anim.setAttribute = function(attr , val , unit) {
							val = Math.round(val);
							oldSetAttribute.call(this,attr,val,unit);
							Dom.setStyle(barEl,'top',(pb._barSpace - val) + 'px');
						};
						break;
					case DIRECTION_RTL:
						anim.setAttribute = function(attr , val , unit) {
							val = Math.round(val);
							oldSetAttribute.call(this,attr,val,unit);
							Dom.setStyle(barEl,'left',(pb._barSpace - val) + 'px');
						};
						break;
				}
				// up to here

			} else {
				anim = this.get(ANIM);
				if (anim) {
					anim.onTween.unsubscribeAll();
					anim.onComplete.unsubscribeAll();
				}
				anim = null;
			}
			this._barSizeFunction = this._barSizeFunctions[anim?1:0][this.get(DIRECTION)];
			return anim;
		}
1317386
function forEls(parent, fn) {
    let i = 0;
    let child = parent.firstElementChild;
    while (child) {
        fn(child, i++);
        child = child.nextElementSibling;
    }
}
336455
function(el, fn) {
	  	if(!el || el === document) {
	  		return false;
	  	}

	  	// don't search elements above pswp__scroll-wrap
	  	if(el.getAttribute('class') && el.getAttribute('class').indexOf('pswp__scroll-wrap') > -1 ) {
	  		return false;
	  	}

	  	if( fn(el) ) {
	  		return el;
	  	}

	  	return _closestElement(el.parentNode, fn);
	}
233493
private void addNthLastChild() {
        for (Node node : nodes) {
            int count = 1;
            Node n = DOMHelper.getNextSiblingElement(node);
            while (n != null) {
                count++;
                n = DOMHelper.getNextSiblingElement(n);
            }
            
            if (specifier.isMatch(count)) {
                result.add(node);
            }
        }
    }
965855
function ( n ) {

    	var needChange = false;

    	if( n !== this.cn ){

	    	this.cn = n;

	    	switch( n ){

	    		case 'def': 
	    		   this.scroll.style.background = this.colors.scroll; 
	    		   this.bottom.style.background = this.colors.background;
	    		   this.bottom.style.color = this.colors.text;
	    		break;

	    		//case 'scrollDef': this.scroll.style.background = this.colors.scroll; break;
	    		case 'scrollOver': this.scroll.style.background = this.colors.select; break;
	    		case 'scrollDown': this.scroll.style.background = this.colors.down; break;

	    		//case 'bottomDef': this.bottom.style.background = this.colors.background; break;
	    		case 'bottomOver': this.bottom.style.background = this.colors.backgroundOver; this.bottom.style.color = '#FFF'; break;
	    		//case 'bottomDown': this.bottom.style.background = this.colors.select; this.bottom.style.color = '#000'; break;

	    	}

	    	needChange = true;

	    }

    	return needChange;

    }
21541
function ( n, side )
	{
		var i = n[side];
		while ( n = n.parentNode )
		{
			if ( n.nodeName == 'HTML' || n.nodeName == 'BODY' )
			{
				break;
			}
			i = n[side];
		}
		return i;
	}
1204795
function checkCondition(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  if ((l = checkIdent(i)) && tokens[i].value === 'when') i += l;
  else return 0;

  while (i < tokensLength) {
    if (l = checkBlock(i)) {
      tokens[i].condition_child = 0;
      break;
    } else if (l = checkFunction(i)) tokens[i].condition_child = 1;
    else if (l = checkBrackets(i)) tokens[i].condition_child = 2;
    else if (l = checkParentheses(i)) tokens[i].condition_child = 3;
    else if (l = checkVariable(i)) tokens[i].condition_child = 4;
    else if (l = checkIdent(i)) tokens[i].condition_child = 5;
    else if (l = checkNumber(i)) tokens[i].condition_child = 6;
    else if (l = checkDelim(i)) tokens[i].condition_child = 7;
    else if (l = checkOperator(i)) tokens[i].condition_child = 8;
    else if (l = checkCombinator(i)) tokens[i].condition_child = 9;
    else if (l = checkSC(i)) tokens[i].condition_child = 10;
    else if (l = checkString(i)) tokens[i].condition_child = 11;
    else return 0;

    i += l;
  }

  return i - start;
}