Called when a card is inserted.
        Adds a smart card to the smartcards tree.
514836
def OnAddCards(self, addedcards):
        """"""
        parentnode = self.root
        for cardtoadd in addedcards:
            childCard = self.AppendItem(parentnode, toHexString(cardtoadd.atr))
            self.SetItemText(childCard, toHexString(cardtoadd.atr))
            self.SetPyData(childCard, cardtoadd)
            self.SetItemImage(
                childCard, self.cardimageindex, wx.TreeItemIcon_Normal)
            self.SetItemImage(
                childCard, self.cardimageindex, wx.TreeItemIcon_Expanded)
            self.Expand(childCard)
        self.Expand(self.root)
        self.EnsureVisible(self.root)
        self.Repaint()
401795
@Override
	public void add(final WComponent component) {
		getCardContainer().add(component);
		CardManagerModel model = getComponentModel();

		if (model.visibleComponent == null) {
			model.visibleComponent = component;
		}
	}
697843
def insert(self, index = 0, *widgets):
        """"""
        for widget in widgets:
            self._add(widget, index)
            index +=1 # as we are moving forwards
        self._sort()
603208
protected function insert()
    {
        foreach ($this->scheduledForInsertion as $objectHashId => $entity) {
            // If this entity was a child of aggregate roots, then call its methods to set the aggregate root Id
            $this->entityRegistry->runAggregateRootCallbacks($entity);
            $className  = $this->entityRegistry->getClassName($entity);
            $dataMapper = $this->getDataMapper($className);

            $dataMapper->insert($entity);

            $this->entityRegistry->registerEntity($entity);
        }
    }
1138132
def insert(self, index, value):
        ''''''
        newnode = LookupTreeNode(index, value)
        level = 0
        node = self.root
        while True:
            ind = _getbits(newnode.index, level)
            level += 1
            child = node.children[ind]
            if child is None or child.index == newnode.index:
                if child:
                    assert child.value == newnode.value
                node.children[ind] = newnode
                break
            elif child.index == _root_index:
                # This is a branch
                node = child
            else:
                branch = LookupTreeNode()
                nind = _getbits(newnode.index, level)
                cind = _getbits(child.index, level)
                node.children[ind] = branch

                # Life gets tricky when...
                if nind == cind:
                    branch.children[cind] = child
                    # recurse
                    node = branch
                else:
                    branch.children[nind] = newnode
                    branch.children[cind] = child
                    break
1184049
function insertAfter(newNode, referenceNode) {
  if (!referenceNode.parentNode) {
    referenceNode = AFRAME.INSPECTOR.selectedEntity;
  }

  if (!referenceNode) {
    AFRAME.INSPECTOR.sceneEl.appendChild(newNode);
  } else {
    referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
  }
}
1111926
function () {
            newEdit = {
                type: "textInsert",
                content: newChild.content,
                parentID: newChild.parent.tagID
            };

            // text changes will generally have afterID and beforeID, but we make
            // special note if it's the first child.
            if (textAfterID) {
                newEdit.afterID = textAfterID;
            } else {
                newEdit.firstChild = true;
            }
            newEdits.push(newEdit);

            // The text node is in the new tree, so we move to the next new tree item
            newIndex++;
        }
378347
function addNodeToSlot (slot, node, insertBefore) {
  const isInDefaultMode = slot.assignedNodes().length === 0;
  registerNode(slot, node, insertBefore, eachNode => {
    if (isInDefaultMode) {
      slot.__insertBefore(eachNode, insertBefore !== undefined ? insertBefore : null);
    }
  });
}
1298529
def add_child(self, tree):
        '''
        '''
        tree.parent = self
        self.children.append(tree)
        return tree
1018361
def OnActivateReader(self, event):
        """"""
        item = event.GetItem()
        if item:
            itemdata = self.readertreepanel.readertreectrl.GetItemPyData(item)
            if isinstance(itemdata, smartcard.Card.Card):
                self.ActivateCard(itemdata)
            elif isinstance(itemdata, smartcard.reader.Reader.Reader):
                self.dialogpanel.OnActivateReader(itemdata)
        event.Skip()
417993
def ActivateCard(self, card):
        """"""
        if not hasattr(card, 'connection'):
            card.connection = card.createConnection()
            if None != self.parent.apdutracerpanel:
                card.connection.addObserver(self.parent.apdutracerpanel)
            card.connection.connect()
        self.dialogpanel.OnActivateCard(card)
990115
def on_touch_up(self, touch):
        
        if (
                'card' not in touch.ud or
                'layout' not in touch.ud or
                touch.ud['layout'] != self
        ):
            return
        if hasattr(touch.ud['card'], '_topdecked'):
            self.canvas.after.remove(touch.ud['card']._topdecked)
            del touch.ud['card']._topdecked
        if None not in (self.insertion_deck, self.insertion_card):
            # need to sync to adapter.data??
            card = touch.ud['card']
            del card.parent.decks[card.deck][card.idx]
            for i in range(0, len(card.parent.decks[card.deck])):
                card.parent.decks[card.deck][i].idx = i
            deck = self.decks[self.insertion_deck]
            if self.insertion_card >= len(deck):
                deck.append(card)
            else:
                deck.insert(self.insertion_card, card)
            card.deck = self.insertion_deck
            card.idx = self.insertion_card
            self.decks[self.insertion_deck] = deck
            self.insertion_deck = self.insertion_card = None
        self._trigger_layout()
758200
def attach(self, id, attributes=None, touch=True):
        
        if isinstance(id, orator.orm.Model):
            id = id.get_key()

        query = self.new_pivot_statement()

        if not isinstance(id, list):
            id = [id]

        query.insert(self._create_attach_records(id, attributes))

        if touch:
            self.touch_if_touching()
1155101
public void add(SchemaTableTree stt, String column, String alias) {
        add(stt.getSchemaTable(), column, stt.getStepDepth(), alias);
    }
1086579
def onTagAdd(self, name, func):
        '''
        

        '''
        # TODO allow name wild cards
        if '*' in name:
            self.ontagaddglobs.add(name, func)
        else:
            self.ontagadds[name].append(func)
658926
function safeInsert(root, curr, next) {
      root.insertBefore(curr, next.parentNode && next);
    }
574937
def on_add(self, widget, new_dict=False):
        "
        self.semantic_data_counter += 1
        treeiter, path = self.get_selected_object()

        value = dict() if new_dict else "New Value"

        # get target dict path
        if treeiter:
            target_dict_path_as_list = self.tree_store[path][self.ID_STORAGE_ID]
            if not self.tree_store[path][self.IS_DICT_STORAGE_ID]:
                target_dict_path_as_list.pop()
        else:
            target_dict_path_as_list = []

        # generate key
        target_dict = self.model.state.get_semantic_data(target_dict_path_as_list)
        new_key_string = generate_semantic_data_key(list(target_dict.keys()))
        self.model.state.add_semantic_data(target_dict_path_as_list, value, new_key_string)

        self.reload_tree_store_data()

        # jump to new element
        self.select_entry(target_dict_path_as_list + [new_key_string])
        logger.debug("Added new semantic data entry!")
        return True