Update package in the store
@param {string} id - Package instance ID
@param {function} updater - update function
348823
function updateItem(id, updater) {
  return new Promise((resolve, reject) => {
    return instance.pkgs.then(db => {
      const obj = db.transaction(db.name, 'readwrite')
        .objectStore(db.name);
      const req = obj.get(id);
      req.onerror = event => reject(event);
      req.onsuccess = event => {
        const res = event.target.result;
        updater(res);
        const upd = obj.put(res);
        upd.onsuccess = () => resolve();
        upd.onerror = event => reject(event);
      };
    });
  });
}
1117801
public function update($id,Request $request)
    {
        $package = Package::findOrfail($id);
    	
        $package->name = $request->name;
        
        $package->description = $request->description;
        
        $package->string_composer = $request->string_composer;
        $package->description_does_what = $request->description_does_what;
        $package->dashboard_URL = $request->dashboard_URL;
        $package->github_URL = $request->github_URL;

        
        $package->save();

        return redirect('package');
    }
1007976
function(db, trans, is_caller_setversion) {

    var action = is_caller_setversion ? 'changing' : 'upgrading';
    goog.log.finer(me.logger, action + ' version to ' + db.version +
        ' from ' + old_version);

    // create store that we don't have previously
    for (var i = 0; i < schema.stores.length; i++) {
      // this is sync process.
      me.update_store_(db, trans, schema.stores[i]);
    }

    // delete stores
    var storeNames = /** @type {DOMStringList} */ (db.objectStoreNames);
    for (var n = storeNames.length, i = 0; i < n; i++) {
      if (!schema.hasStore(storeNames[i])) {
        db.deleteObjectStore(storeNames[i]);
        goog.log.finer(me.logger, 'store: ' + storeNames[i] + ' deleted.');
      }
    }
  }
948620
function remove(id) {
        var result = new $.Deferred();
        if (extensions[id] && extensions[id].installInfo) {
            Package.remove(extensions[id].installInfo.path)
                .done(function () {
                    extensions[id].installInfo = null;
                    result.resolve();
                    exports.trigger("statusChange", id);
                })
                .fail(function (err) {
                    result.reject(err);
                });
        } else {
            result.reject(StringUtils.format(Strings.EXTENSION_NOT_INSTALLED, id));
        }
        return result.promise();
    }
1058341
function updateSidebar() {

    var sidebarJSONPath = path.resolve(rootDir, srcSidebar);
    const sidebarText = fs.readFileSync(sidebarJSONPath).toString();
    var sidebarJSON = JSON.parse(sidebarText);
    sidebarJSON.docs.Packages = [];

    sidebarEntries
        .map((entry) => sidebarJSON.docs.Packages.push(entry))

    if (dryRun) {
        console.log("In website/sidebars.json, this script updates...\n" +
            "...the Packages array with the filepath to each package's index file.");
    } else {
        fs.writeFile(sidebarJSONPath, JSON.stringify(sidebarJSON, null, 2), 'utf8', (err) => {
            if (err) throw err;
            console.log(chalk.green(`${srcSidebar} was succesfully updated!`));
        }); 
    }

}
772733
public static FunctionUpdater updater(final String pathServiceSid, 
                                          final String pathSid, 
                                          final String friendlyName) {
        return new FunctionUpdater(pathServiceSid, pathSid, friendlyName);
    }
736884
function setId(element, id) {
    const currentId = getAttribute(element, 'id');

    if (currentId) {
        return currentId;
    }

    const newId = id || (`mui-id-${generateRandomString(6)}`);

    setAttribute(element, 'id', newId);

    return newId;
}
337543
function update() {
    var updateData = this._prepUpdate(this.single.update);
    var wheres = this.where();
    var returning = this.single.returning;
    return {
      sql: 'update ' + this.tableName + ' set ' + updateData.join(', ') + (wheres ? ' ' + wheres : '') + this._returning(returning),
      returning: returning
    };
  }
82476
def update_with_diff(self, identifier, new_instance):
        
        with self.flushing():
            instance = self.retrieve(identifier)
            before = Version(instance)
            self.merge(instance, new_instance)
            instance.updated_at = instance.new_timestamp()
            after = Version(instance)
        return instance, before - after
1354255
public function update($id, $args = [])
    {
        if ($args['status'] === 'activate') {
            activate_plugin($id, '', false, true);
        } elseif ($args['status'] === 'deactivate') {
            deactivate_plugins($id, true, false);
        }
    }
518161
function update(state, updater, description) {
    if (!state.__store__) {
        throw new Error('[Pastate] You can only operate pastate immutable state');
    }
    return state.__store__.update(state, updater, description);
}
217295
private function _store_update( $update, $store = true, $plugin_id = false ) {
            $this->_logger->entrance();

            if ( $update instanceof FS_Plugin_Tag ) {
                $update->updated = time();
            }

            if ( ! is_numeric( $plugin_id ) ) {
                $plugin_id = $this->_plugin->id;
            }

            $updates               = self::get_all_updates();
            $updates[ $plugin_id ] = $update;
            self::$_accounts->set_option( 'updates', $updates, $store );
        }
1127680
async function updatePackageJSON (version) {
  ['package.json'].forEach(async fileName => {
    const filePath = path.resolve(__dirname, '..', fileName)
    const file = require(filePath)
    file.version = version
    await writeFile(filePath, JSON.stringify(file, null, 2))
  })
}
444050
public synchronized U update(int i, Function<U, U> updater) {
    U updated = updater.apply(this.get(i));
    set(i, updated);
    return updated;
  }
167913
def update_product_version(id, **kwargs):
    
    content = update_product_version_raw(id, **kwargs)
    if content:
        return utils.format_json(content)
906836
def update(self, resource, id_, updates):
        """"""
        args = self._es_args(resource, refresh=True)
        if self._get_retry_on_conflict():
            args['retry_on_conflict'] = self._get_retry_on_conflict()

        updates.pop('_id', None)
        updates.pop('_type', None)
        self._update_parent_args(resource, args, updates)
        return self.elastic(resource).update(id=id_, body={'doc': updates}, **args)
400741
def list_update(self, id, title):
        
        id = self.__unpack_id(id)
        params = self.__generate_params(locals(), ['id'])
        return self.__api_request('PUT', '/api/v1/lists/{0}'.format(id), params)