Initialize a node with the readability object. Also checks the
className/id for special names to add to its score.

@param Element
@return void
547921
function initializeNode(node) {
  node.readability = { contentScore: 0 };

  switch (node.tagName) {
    case 'ARTICLE':
      node.readability.contentScore += 10;
      break;

    case 'SECTION':
      node.readability.contentScore += 8;
      break;

    case 'DIV':
      node.readability.contentScore += 5;
      break;

    case 'PRE':
    case 'TD':
    case 'BLOCKQUOTE':
      node.readability.contentScore += 3;
      break;

    case 'ADDRESS':
    case 'OL':
    case 'UL':
    case 'DL':
    case 'DD':
    case 'DT':
    case 'LI':
    case 'FORM':
      node.readability.contentScore -= 3;
      break;

    case 'H1':
    case 'H2':
    case 'H3':
    case 'H4':
    case 'H5':
    case 'H6':
    case 'TH':
      node.readability.contentScore -= 5;
      break;
  }

  if (node.attributes.itemscope) {
    node.readability.contentScore += 5;
    if (node.attributes.itemtype &&
        /blog|post|article/i.test(node.getAttribute('itemtype'))) {
      node.readability.contentScore += 30;
    }
  }

  node.readability.contentScore += getClassWeight(node);
}
628337
public function initialize(Event $event) {
		$table = $event->getSubject();
		if (!in_array(get_class($table), $this->config['tableClass'])) {
			return;
		}

		$this->_setValidators($table);
	}
278454
public void append(int element)
    {
        if (this.size == this.data.length)
        {
            expand();
        }
        this.data[this.size] = element;
        this.size += 1;
    }
552616
protected function init(DOMElement $element)
    {
        $this->parseType($element);
        $this->parseId($element, false);
        $this->parseName($element, false);

        $this->parseArgs($element);
    }
983917
protected function initializeRelatedElement()
    {
        $select = $this->getRelatedElement();

        $select->setName($name = $this->getRelatedForeignKeyName());
        $select->setModelAttributeKey($name);
        $select->setPath($this->getEmptyRelation()->getRelated()->getKeyName());
        $select->setModelForOptions(get_class($this->getEmptyRelation()->getRelated()));
        $select->setModel($this->getModelForElements());
        if ($display = $this->getRelatedElementDisplayName()) {
            $select->setDisplay($display);
        }
        $select->required();

        $this->unique(empty($this->unique) ? [$name]
            : array_merge([$name], $this->unique), trans('sleeping_owl::lang.form.unique'));

        if ($this->relatedWrapper) {
            $this->getElements()->forget(0);
            $column = new Column([$select]);
            $this->relatedWrapper->getElements()->prepend($column);
        }
    }
1984
public function init()
    {
        parent::init();
        //checks for the element id
        if (!isset($this->options['id'])) 
        {
            $this->options['id'] = $this->getId();
        }
        echo Html::beginTag('div', ['id' => $this->options['id']]); //opens the container
    }
1338761
public function init()
    {
        ob_start();
        ob_implicit_flush(false);

        //checks for the element id
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }
        
        parent::init();
    }
1143098
public function init()
    {

        //klucz
        $this->addElement((new Element\Select('object'))
            ->setLabel('form.stat.label.object.label')
            ->setRequired()
            ->addValidator(new \Mmi\Validator\NotEmpty)
            ->setMultioptions(\Cms\Model\Stat::getUniqueObjects()));

        //nazwa
        $this->addElement((new Element\Text('label'))
            ->setLabel('form.stat.label.label.label')
            ->setRequired()
            ->addValidator(new \Mmi\Validator\NotEmpty));

        //opis
        $this->addElement((new Element\Textarea('description'))
            ->setLabel('form.stat.label.description.label'));

        //submit
        $this->addElement((new Element\Submit('submit'))
            ->setLabel('form.stat.label.submit.label'));
    }
1310739
public void addElement(ObjectProperty element) {
        assertNotNull(element);
        if (elements == null) {
            elements = new ArrayList<ObjectProperty>();
        }
        elements.add(element);
        element.setParent(this);
    }
1149355
public static void add(Element element) {
        AssertUtils.assertNotNull(element);

        ProcessedInput processedInput = null;
        Overrider overrider = new Overrider(defaultOverride);

        overrider.override(XmlParameters.operationType, element.getTagName());

        if (element.hasAttribute(XmlParameters.outputHandler) == true) {
            overrider.override(XmlParameters.outputHandler, element.getAttribute(XmlParameters.outputHandler));
        }

        if (element.hasAttribute(XmlParameters.controlParamCount) == true) {
            overrider.override(XmlParameters.controlParamCount, Boolean.valueOf(element.getAttribute(XmlParameters.controlParamCount)));
        }

        if (element.hasAttribute(XmlParameters.generateKeys) == true) {
            overrider.override(XmlParameters.generateKeys, element.getAttribute(XmlParameters.generateKeys));
        }

        if (element.hasAttribute(XmlParameters.generateKeysColumns) == true) {
            overrider.override(XmlParameters.generateKeysColumns, element.getAttribute(XmlParameters.generateKeysColumns).split(","));
        }

        String name = element.getAttribute("id");
        String encodedQuery = element.getTextContent();

        xmlQueryString.put(name, encodedQuery);
        xmlOverrideMap.put(name, overrider);
    }
733058
private void add(Element element)
    {
        if (ivElements == null)
        {
            ivElements = new Element[DEFAULT_CAPACITY];
        }
        else if (ivTailIndex == ivElements.length)
        {
            // No more room at the tail of the array.  If we're completely out of
            // space (ivBaseIndex == 0), then we need a bigger array.  Otherwise,
            // determine if we can reset ivBaseIndex to 0 without needing to copy
            // more than half the elements.  If not, we allocate a new array.
            //
            // We choose to limit to half the array to avoid repeatedly copying
            // the array.  For example, if the array is full and ivBaseIndex == 0,
            // and we have a sequence of remove(0)/add(x), we do not want:
            //   - remove(0): ivBaseIndex++
            //   - add(x): copy 1..N to 0..N-1, ivBaseIndex=0, array[N] = x
            //   - remove(0): ivBaseIndex++
            //   - add(x): copy 1..N to 0..N-1, ivBaseIndex=0, array[N] = x
            //   - ...etc.

            int size = size();
            int halfCapacity = ivElements.length >> 1;
            if (ivHeadIndex > halfCapacity)
            {
                // Less than half of the array is full.  Rather than creating a new
                // array, just copy all the elements to the front.
                System.arraycopy(ivElements, ivHeadIndex, ivElements, 0, size);
                Arrays.fill(ivElements, ivHeadIndex, ivElements.length, null);
            }
            else
            {
                // Either we're completely out of space (ivBaseIndex == 0), or it
                // would be wasteful to continuously copy over half the elements.
                // Grow the array by half its current size.
                Element[] newElements = new Element[ivElements.length + halfCapacity];
                System.arraycopy(ivElements, ivHeadIndex, newElements, 0, size);
                ivElements = newElements;
            }

            ivHeadIndex = 0;
            ivTailIndex = size;
        }

        ivElements[ivTailIndex++] = element;
    }
876259
public synchronized void addElement(T element) {
		List<T> origList = ref.get().list;
		boolean isPresent = origList.contains(element);
		if (isPresent) {
			return;
		}
		
		List<T> newList = new ArrayList<T>(origList);
		newList.add(element);
		
		swapWithList(newList);
	}
739153
public function addElement($element) {
		if ($element instanceof HtmlButtongroups) {
			$this->elements []=$element;
		} else {
			$this->getLastButtonGroup()->addElement($element);
		}
	}
948665
public function addElement($element)
    {
        if ($this->processing === 'B') {
            $this->pdf->addBody($element);

            return;
        }

        if ($this->processing === 'H') {
            $this->pdf->addHeader($element);

            return;
        }

        if ($this->processing === 'F') {
            $this->pdf->addFooter($element);

            return;
        }
    }
1056435
function initializeNode (node) {
  if (!node || node.length === 0) {
    return 0
  }
  const tag = node.get(0).name
  if (nodeTypes.mostPositive.indexOf(tag) >= 0) {
    return 5 + getClassWeight(node)
  }
  if (nodeTypes.positive.indexOf(tag) >= 0) {
    return 3 + getClassWeight(node)
  }
  if (nodeTypes.negative.indexOf(tag) >= 0) {
    return -3 + getClassWeight(node)
  }
  if (nodeTypes.mostNegative.indexOf(tag) >= 0) {
    return -5 + getClassWeight(node)
  }
  return -1
}
1294989
public function init()
    {
        //checks for the element id
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }
        //checks for the class
        if (!isset($this->options['class'])) {
            $this->options['class'] = 'fullcalendar';
        }

        parent::init();
    }
544706
@NoExport
    public void initFormElement(Element formElement) {

        m_formWrapper = new CmsUgcWrapper(formElement, getSessionId());
        m_formWrapper.setFormSession(this);
    }