Adding the item value using Material Chips added on auto complete box
489382
protected boolean addItem(final Suggestion suggestion) {
        SelectionEvent.fire(MaterialAutoComplete.this, suggestion);
        if (getLimit() > 0) {
            if (suggestionMap.size() >= getLimit()) {
                return false;
            }
        }

        if (suggestionMap.containsKey(suggestion)) {
            return false;
        }

        final ListItem displayItem = new ListItem();
        displayItem.setStyleName(AddinsCssName.MULTIVALUESUGGESTBOX_TOKEN);

        if (getType() == AutocompleteType.TEXT) {
            suggestionMap.clear();
            itemBox.setText(suggestion.getReplacementString());
        } else {
            final MaterialChip chip = chipProvider.getChip(suggestion);
            if (chip == null) {
                return false;
            }

            registerHandler(chip.addClickHandler(event -> {
                if (chipProvider.isChipSelectable(suggestion)) {
                    if (itemsHighlighted.contains(displayItem)) {
                        chip.removeStyleName(selectedChipStyle);
                        itemsHighlighted.remove(displayItem);
                    } else {
                        chip.addStyleName(selectedChipStyle);
                        itemsHighlighted.add(displayItem);
                    }
                }
            }));

            if (chip.getIcon() != null) {
                registerHandler(chip.getIcon().addClickHandler(event -> {
                    if (chipProvider.isChipRemovable(suggestion)) {
                        suggestionMap.remove(suggestion);
                        list.remove(displayItem);
                        itemsHighlighted.remove(displayItem);
                        ValueChangeEvent.fire(MaterialAutoComplete.this, getValue());
                        suggestBox.showSuggestionList();
                    }
                }));
            }

            suggestionMap.put(suggestion, chip);
            displayItem.add(chip);
            list.insert(displayItem, list.getWidgetCount() - 1);
        }
        return true;
    }
945099
function(completer, completions) {
    // store array as trie
    tries[completer.name] = new Trie();
    for (var i = 0; i < completions.length; i++) {
      tries[completer.name].insert(completions[i]);
    }
    // store in localstorage as well
    var storageId = utils.getPersistencyId(yasqe, completer.persistent);
    if (storageId) yutils.storage.set(storageId, completions, "month", yasqe.options.onQuotaExceeded);
  }
657651
public Option addItem(String text, T value) {
        if (!values.contains(value)) {
            Option option = buildOption(text, value);
            values.add(value);
            listbox.add(option);
            return option;
        }
        return null;
    }
803316
def do_add_item(self, args):
        """"""
        if args.food:
            add_item = args.food
        elif args.sport:
            add_item = args.sport
        elif args.other:
            add_item = args.other
        else:
            add_item = 'no items'

        self.poutput("You added {}".format(add_item))
309339
function() {
    this.setColour(Blockly.Blocks.lists.HUE);
    this.appendDummyInput()
        .appendField(Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE);
    this.setPreviousStatement(true);
    this.setNextStatement(true);
    this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP);
    this.contextMenu = false;
  }
927278
function() {
			var todos = todosDB.getList();

			var completedCount = 0;
			for (var i = 0, len = todos.length; i < len; i++) {
				if (todos[i].completed) {
					completedCount++;
				}
			}

			var itemsLeft = todos.length - completedCount;

			this.updateItemsLeft(itemsLeft);
			this.updateCompletedButton(completedCount);

		}
1167424
def add_item(self, item):
        """"""
        _idx = len(self.items)
        self.items.update({"item_" + str(_idx + 1): item})
929390
function() {
    this.jsonInit({
      "message0": Blockly.Msg.CONTROLS_REPEAT_TITLE,
      "args0": [
        {
          "type": "input_value",
          "name": "TIMES",
          "check": "Number"
        }
      ],
      "previousStatement": null,
      "nextStatement": null,
      "colour": Blockly.Blocks.loops.HUE,
      "tooltip": Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,
      "helpUrl": Blockly.Msg.CONTROLS_REPEAT_HELPURL
    });
    this.appendStatementInput('DO')
        .appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  }
780418
def addItem(self, itemType, itemContents, itemID=None):
        

        if itemType not in self.noteDB.collection_names():
            fields = [(ii, pymongo.TEXT) for ii in itemContents]
            self.noteDB[itemType].ensure_index(fields)

        collection = self.noteDB[itemType]

        if itemID is None:
            itemContents['timestamps'] = [time.time()]
            itemID = self.getNewID()
            itemContents["ID"] = itemID
            collection.insert(itemContents)
        else:
            _id = collection.find_one({"ID": itemID})["_id"]
            timestamps = collection.find_one({"ID": itemID})["timestamps"]
            timestamps.append(time.time())
            itemContents["timestamps"] = timestamps
            itemContents["ID"] = itemID
            collection.update({"_id": _id}, itemContents)

        return itemID
8109
function () {
		var items = _.flatten(arguments);
		for (var i = 0, l = items.length; i < l; i++) {
			this.addItem(items[i], this.items.length);
		}
	}
890066
def add_item(name, checked = false, position = 'bottom')
      client.post("/checklists/#{id}/checkItems", {name: name, checked: checked, pos: position})
    end
706019
function TagsMaterialize(element, options)
    {
        this.itemsArray = [];

        this.$element = $(element);
        this.$element.hide();

        this.objectItems    = options && options.itemValue;
        this.placeholderText = element.hasAttribute('placeholder') ? this.$element.attr('placeholder') : '';
        this.inputSize      = Math.max(1, this.placeholderText.length);

        this.$container = $('<div class="materialize-tags"></div>');
        this.$input    = $('<input type="text" class="n-tag"  placeholder="' + this.placeholderText + '"/>').appendTo(this.$container);
        this.$label    = this.$element.parent().find('label');

        this.$element.before(this.$container);
        this.build(options);

        this.$label.on('click', function ()
        {
            $(this).addClass('active');
            $(this).addClass('infocus');
            $(this).next('.materialize-tags').find('input.n-tag').focus();
        });

        this.$input.on('focus', function ()
        {
            var label = $(this).parents('.materialize-tags').parent().find('label');
            $(this).parents('.materialize-tags').addClass('active');
 +            !label.hasClass('infocus') && label.addClass('infocus');

            if (!label.hasClass('active'))
            {
                label.addClass('active');
            }
        }).on('focusout', function ()
        {
            var parentContainer = $(this).parents('.materialize-tags'),
                tags            = parentContainer.find('span.chip');
            parentContainer.removeClass('active');
 +          parentContainer.parent().find('label').removeClass('infocus');
            // Verify if is empty and remove "active" class from label
            if (tags.length == 0 && $(this).val().length == 0)
            {
                parentContainer.parent().find('label').removeClass('active');
            }
        });
    }
1137730
private void setValueForItem(int index, int value) {
        if (index == HOUR_INDEX) {
            mCurrentHoursOfDay = value;
        } else if (index == MINUTE_INDEX) {
            mCurrentMinutes = value;
        } else if (index == AMPM_INDEX) {
            if (value == AM) {
                mCurrentHoursOfDay = mCurrentHoursOfDay % 12;
            } else if (value == PM) {
                mCurrentHoursOfDay = (mCurrentHoursOfDay % 12) + 12;
            }
        }
    }
398507
def add_item(xml, item, index)
      xml.tag! 'Item', :num => index do
        xml.tag! 'Code', item[:sku]
        xml.tag! 'Quantity', item[:quantity]
      end
    end
1119122
@Override
    public void add( MapItemValue miv ) {
        if ( len >= items.length ) {
            items = Arry.grow(items);
        }
        items[ len ] = miv;
        len++;
    }
1016561
protected function wizardAddFieldValue()
    {
        // Required
        $this->validatePrompt('title', $this->text('Title'), 'field_value');
        $this->validatePrompt('field_id', $this->text('Field ID'), 'field_value');

        // Optional
        $this->validatePrompt('color', $this->text('Color'), 'field_value', '');
        $this->validatePrompt('weight', $this->text('Weight'), 'field_value', 0);

        $this->validateComponent('field_value');
        $this->addFieldValue();
    }
498271
function() {
			var value = this.getTextInputValue();
			if (value) {
				var recentEntryArray = this.getRecentEntryArray();
				if (!recentEntryArray) {
					recentEntryArray = [];
				}
				
				var indexOfElement = this._getIndexOfValue(recentEntryArray, value); //check if a duplicate entry exists
				if (0 !== indexOfElement) {
					// element is either not in array, or not in first position
					if (-1 !== indexOfElement) {
						// element is in array, remove it because we want to add it to beginning
						recentEntryArray.splice(indexOfElement, 1);
					}
					
					//add new entry to beginning of array
					recentEntryArray.unshift({
						type: "proposal", //$NON-NLS-0$
						label: value, 
						value: value
					});
					this._storeRecentEntryArray(recentEntryArray);
					
					this._showRecentEntryButton();
				}
			}
		}