Set URL of existing item in Stocker's inventory
 @param item [String] item to update
 @param url [String] URL of item
189403
def url(item, url)
      data = read_file
      match_name(item)
      data[@@item]["url"] = url
      time(item)
      write_file(data)
    end
1212198
def <<(item)
      item = ensure_type(Item, item)

      original_item = find_item(item)

      if original_item
        original_item.quantity += (item.quantity || 1)
      else
        store << item
      end
    end
1275658
def url(style = :original, *args)
      if style.to_sym == :original
        original_url(*args)
      else
        named_url(style, *args)
      end
    end
61778
def PushItem(self, item, block=True):
    
    try:
      self._queue.put(item, block=block)
    except Queue.Full as exception:
      raise errors.QueueFull(exception)
314863
def opts_from_url(url)
      url = URI.parse(url) unless url.is_a?(URI)
      opts_from_non_params(url).merge opts_from_params(url.query)
    rescue URI::InvalidURIError
      {}
    end
1343219
@Api
	public void setUrl(String url) throws LayerException {
		try {
			this.url = url;
			Map<String, Object> params = new HashMap<String, Object>();
			params.put("url", url);
			DataStore store = DataStoreFactory.create(params);
			setDataStore(store);
		} catch (IOException ioe) {
			throw new LayerException(ioe, ExceptionCode.INVALID_SHAPE_FILE_URL, url);
		}
	}
371078
def _link_or_update_vars(self):
        
        for d, source in self.links.items():
            target = os.path.join(self.inventory_directory, d)
            source = os.path.join(self._config.scenario.directory, source)

            if not os.path.exists(source):
                msg = "The source path '{}' does not exist.".format(source)
                util.sysexit_with_message(msg)
            msg = "Inventory {} linked to {}".format(source, target)
            LOG.info(msg)
            os.symlink(source, target)
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
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)
732694
def update_model(self, url, text):
        
        min_hash = get_min_hash(text, self.too_common_shingles, self.num_perm)
        item_url = canonicalize_url(url)
        item_path, item_query = _parse_url(item_url)
        all_duplicates = [
            (url, self.seen_urls[url]) for url in self.lsh.query(min_hash)]
        duplicates = [(url, m.query) for url, m in all_duplicates
                      if m.path == item_path]
        # Hypothesis (1) - just paths
        n_path_nodup = self._nodup_filter(min_hash, (
            self.urls_by_path.get(item_path, set())
            .difference(url for url, _ in duplicates)))
        self.path_dupstats[item_path].update(len(duplicates), n_path_nodup)
        # Other hypotheses, if param is in the query
        for param, value in item_query.items():
            self._update_with_param(
                duplicates, min_hash, item_path, item_query, param, [value])
        # Other hypotheses, if param is not in the query
        for param in (
                self.params_by_path.get(item_path, set()) - set(item_query)):
            self._update_with_param(
                duplicates, min_hash, item_path, item_query, param,
                self.param_values.get((item_path, param), set()))
        # Update indexes
        for param, value in item_query.items():
            self.urls_by_path_q[item_path, _q_key(item_query)].add(item_url)
            item_qwp_key = _q_key(_without_key(item_query, param))
            self.urls_by_path_qwp[item_path, param, item_qwp_key].add(item_url)
            self.params_by_path[item_path].add(param)
            self.param_values[item_path, param].add(value)
        if not item_query:
            self.urls_by_path_q[item_path, ()].add(item_url)
        self.urls_by_path[item_path].add(item_url)
        if item_url in self.lsh:
            self.lsh.remove(item_url)
        self.lsh.insert(item_url, min_hash)
        self.seen_urls[item_url] = URLMeta(item_path, item_query, min_hash)
        if len(self.seen_urls) % 100 == 0:
            self.log_dupstats()
        return all_duplicates
439905
function setItem(itemName, itemValue) {
  data[itemName] = itemValue;
  if (localExists()) {
    // Convert object to string
    if ((0, _isObject2.default)(itemValue)) {
      itemValue = JSON.stringify(itemValue);
    }
    window.sessionStorage.setItem(itemName, itemValue);
  }
}
173972
def append(self, item):
        
        if self.url:
            raise TypeError('Menu items with URL cannot have childrens')

        # Look for already present common node
        if not item.is_leaf():
            for current_item in self.items:
                if item.name == current_item.name:
                    for children in item.items:
                        current_item.append(children)
                    return

        # First insertion
        self.items.append(item)
416750
def temp_upload_url(object_key, temp_url_key, expires_at = Time.now.to_i + 60)
      private_url("PUT", object_key, temp_url_key, expires_at)
    end
400214
def set_ocha_url(cls, url=None):
        # type: (str) -> None
        
        if url is None:
            url = cls._ochaurl_int
        cls._ochaurl = url
812173
public function update($item_key, $quantity)
    {
        $item = $this
            ->items
            ->find("Key", $item_key);
        
        if ($item && !$item->Locked) {
            // If we need to track stock, do it now
            if ($item->Stocked || $this->config()->check_stock_levels) {
                $item->checkStockLevel($quantity);
            }

            $item->Quantity = floor($quantity);
            
            $this->extend("onBeforeUpdate", $item);
            
            $this->save();
        } else {
            throw new Exception(_t("Checkout.UnableToEditItem", "Unable to change item's quantity"));
        }

        return false;
    }
350518
def update(self, item, dry_run=None):
        """"""
        logger.debug('Updating item. Item: {item} Table: {namespace}'.format(
            item=item,
            namespace=self.namespace
        ))

        if not dry_run:
            self.table.put_item(Item=item)

        return item
928544
def update(self, url, data):
        
        url = self.get_full_url(url)
        self.log.debug("update url : " + url)
        # Building request
        post_data = json.dumps(data).encode("UTF-8")
        request = urllib2.Request(url, post_data)
        request.add_header('Content-Type', 'application/json; charset=UTF-8')
        request.add_header('Accept', 'application/json')
        request.get_method = lambda: 'PUT'
        # Do request
        ret = self.do_request(request)
        self.log.debug("""put url : %(url)s : request time : %(time)s""",
                       {"url": url,
                        "time": self.last_req_time})
        return ret