Sends all changes for base inventory, player's inventory, picked up itemStack and dragged itemStacks.
960864
@Override
	public void detectAndSendChanges()
	{
		playerInventoryCache.sendChanges();
		inventoryCaches.values().forEach(InventoryCache::sendChanges);

		//picked itemStack
		pickedItemStackCache.update();
		if (pickedItemStackCache.hasChanged())
			UpdateInventorySlotsMessage.updatePickedItemStack(pickedItemStackCache.get(), (EntityPlayerMP) owner, windowId);
	}
1336537
function (items, options) {


            options = options || {};
            _.defaults(options, {silent: false, index: this.$items.length});

            var index = options.index;

            if (!_.isArray(items)) {
                items = [items];
            }
            var item, itemIndex;
            for (var i = 0; i < items.length; i++) {
                item = items[i];
                if (item instanceof Bindable) {
                    item.bind('change', this._onItemChange, this);
                    item.bind('*', this._onItemEvent, this);
                }
                itemIndex = index + i;
                if (_.isUndefined(this.$items[itemIndex]) || itemIndex >= this.$items.length) {
                    this.$items[itemIndex] = item;
                } else {
                    this.$items.splice(itemIndex, 0, item);
                }
                if (options.silent !== true) {
                    this.trigger('add', {item: item, index: itemIndex});
                }
            }
        }
768138
def update_all_nodes(self):
        
        item_model_controller = self.item_model_controller
        if item_model_controller:
            if self.__node_counts_dirty:
                for item in self.__mapping.values():
                    if "tree_node" in item.data:  # don't update the root node
                        tree_node = item.data["tree_node"]
                        item.data["display"] = self.__display_for_tree_node(tree_node)
                        item_model_controller.data_changed(item.row, item.parent.row, item.parent.id)
                self.__node_counts_dirty = False
751999
def update(self, other_dict):
        """"""
        for key, value in iter_multi_items(other_dict):
            MultiDict.add(self, key, value)
548226
function () {
    var items = Array.prototype.slice.call(arguments);
    this.source.push.apply(this.source, items);
    this._updateInfo();

    // DEPRECATED
    this.emit("insert", items[0], this.length - 1);
    this.emit("update", { insert: items, index: this.length - 1});
  }
704434
def update(self, item, dry_run=None):
        """"""
        logger.debug('Updating item. Item: {item} Path: {data_file}'.format(
            item=item,
            data_file=self.data_file
        ))
        self.delete(item, dry_run=dry_run)
        return self.create(item, dry_run=dry_run)
1208152
def _preprocess_add_items(self, items):
        
        paths = []
        entries = []

        for item in items:
            if isinstance(item, string_types):
                paths.append(self._to_relative_path(item))
            elif isinstance(item, (Blob, Submodule)):
                entries.append(BaseIndexEntry.from_blob(item))
            elif isinstance(item, BaseIndexEntry):
                entries.append(item)
            else:
                raise TypeError("Invalid Type: %r" % item)
        # END for each item
        return (paths, entries)
1045553
def push(self, item):
        '''
        '''
        hash(item)
        heapq.heappush(self._items, item)
109352
function pushEdit (edits, item, added, removed) {
  var last = edits[edits.length - 1]

  if (last && last.added === added && last.removed === removed) {
    last.items.unshift(item) // Not push: edits get reversed later
  } else {
    edits.push({
      items: [item],
      added: added,
      removed: removed
    })
  }
}
1292528
public static void updateAll(DataStore dataStore, Iterable<Update> updates, Set<String> tags) {
        updateAll(dataStore, updates.iterator(), tags);
    }
1129818
@SafeVarargs
    public final void addAll(T... items) {
        final int length = items.length;
        if (length == 0) {
            return;
        }
        synchronized (mLock) {
            final int position = getItemCount();
            Collections.addAll(mObjects, items);
            notifyItemRangeInserted(position, length);
        }
    }
303324
private ItemStack handleDropSlot(MalisisSlot hoveredSlot, boolean fullStack)
	{
		ItemStack itemStack = hoveredSlot.getItemStack();
		if (itemStack.isEmpty() || !hoveredSlot.isState(PLAYER_EXTRACT))
			return itemStack;

		ItemUtils.ItemStackSplitter iss = new ItemUtils.ItemStackSplitter(hoveredSlot.getItemStack());
		iss.split(fullStack ? ItemUtils.FULL_STACK : 1);

		hoveredSlot.setItemStack(iss.source);
		//if (slot.hasChanged())
		hoveredSlot.onSlotChanged();
		owner.dropItem(iss.split, true);

		if (iss.amount != 0)
			hoveredSlot.onPickupFromSlot(owner, iss.split);

		return iss.split;
	}
214889
private ItemStack handleDropPickedStack(boolean fullStack)
	{
		ItemUtils.ItemStackSplitter iss = new ItemUtils.ItemStackSplitter(pickedItemStack);
		iss.split(fullStack ? ItemUtils.FULL_STACK : 1);

		owner.dropItem(iss.split, true);
		setPickedItemStack(iss.source);

		return iss.source;
	}
1032312
private ItemStack handleShiftClick(MalisisInventory inventory, MalisisSlot slot)
	{
		ItemStack itemStack = transferSlotOutOfInventory(inventory, slot);

		//replace what's left of the item back into the slot
		slot.setItemStack(itemStack);
		slot.onSlotChanged();
		return itemStack;
	}
215300
def refresh_items(self):
        
        old_items = self.items[:]# if self._dirty else []
        old_iter_data = self._iter_data# if self._dirty else {}
        iterable = self.windowed_iterable
        pattern_nodes = self.pattern_nodes
        new_iter_data = sortedmap()
        new_items = []

        if iterable is not None and len(pattern_nodes) > 0:
            for loop_index, loop_item in enumerate(iterable):
                iteration = old_iter_data.get(loop_item)
                if iteration is not None:
                    new_iter_data[loop_item] = iteration
                    new_items.append(iteration)
                    old_items.remove(iteration)
                    continue
                iteration = []
                new_iter_data[loop_item] = iteration
                new_items.append(iteration)
                for nodes, key, f_locals in pattern_nodes:
                    with new_scope(key, f_locals) as f_locals:
                        f_locals['loop_index'] = loop_index
                        f_locals['loop_item'] = loop_item
                        for node in nodes:
                            child = node(None)
                            if isinstance(child, list):
                                iteration.extend(child)
                            else:
                                iteration.append(child)
        
        # Add to old items list
        #self.old_items.extend(old_items)
        
        #if self._dirty:
        for iteration in old_items:
            for old in iteration:
                if not old.is_destroyed:
                    old.destroy()

        if len(new_items) > 0:
            expanded = []
            recursive_expand(sum(new_items, []), expanded)
            self.parent.insert_children(self, expanded)

        self.items = new_items# if self._dirty else new_items+old_items
        self._iter_data = new_iter_data
1277355
public static void updateSlots(int inventoryId, List<MalisisSlot> slots, EntityPlayerMP player, int windowId)
	{
		Packet packet = new Packet(inventoryId, windowId);
		for (MalisisSlot slot : slots)
			packet.addSlot(slot);
		MalisisCore.network.sendTo(packet, player);
	}
499872
def _add_new_items(self, config, seen):
        ''''''
        for (key, value) in self.items():
            if key not in seen:
                self._set_value(config, key, value)