Update -------------
501282
public function update( $model, $config = [] ) {

		$attributes = isset( $config[ 'attributes' ] ) ? $config[ 'attributes' ] : [
			'countryId', 'provinceId', 'regionId', 'cityId',
			'title', 'cityName', 'regionName', 'provinceName', 'countryName', 'zip', 'subZip',
			'longitude', 'latitude', 'zoomLevel'
		];

		$model->countryName		= isset( $model->country ) ? $model->country->name : $model->countryName;
		$model->provinceName	= isset( $model->province ) ? $model->province->name : $model->provinceName;
		$model->regionName		= isset( $model->region ) ? $model->region->name : $model->regionName;

        $config[ 'attributes' ] = $attributes;

		return parent::update( $model, $config );
	}
1208626
def _update(self):
        """"""
        self.dataChanged.emit(self.createIndex(0, 0), self.createIndex(
            len(self.collection), len(self.header)))
737419
def __update(self):
        

        # I can not set the size attr because it is my property, so I set the width and height separately
        width, height = self.size
        super(BaseWidget, self).__setattr__("width", width)
        super(BaseWidget, self).__setattr__("height", height)
        super(BaseWidget, self).__setattr__(self.anchor, self.pos)
988194
def update(self, **kwargs):
        
        super(ModelQuerySet, self).update(_changed=True, **kwargs)
1158100
public function update()
    {
        // convert to criteria.
        $args = func_get_args();
        $attributes = array_shift($args);
        $criteria = call_user_func_array(array($this, 'argsToCriteria'), $args);

        // to SQL.
        $sql = $criteria->toUpdateSQL($attributes);

        // query.
        $sth = $this->query($sql, $criteria->getParams(), Database::TARGET_MASTER);
        return $sth->isSuccess();
    }
182204
protected function __update()
	{
		/** Rebase array indices */
		parent::__update();

		if ( $this->count() && $this->attribute instanceof DOMAttr ) {
			$this->attribute->value = (string) $this;
		}
	}
494514
public function updateDateModified()
    {
        $dateModified = Core::make('date')->toDB();
        $db = Database::connection();
        $db->update('TreeNodes', ['dateModified' => $dateModified], ['treeNodeID' => $this->getTreeNodeID()]);
    }
721988
def update(self, **params):
        
        self._current_params = self._transform_params(**params)
        self._current_stats = ModelStats()
102394
private function update()
    {
        $Eresus = Eresus_CMS::getLegacyKernel();

        $item = $Eresus->db->selectItem($this->table['name'], "`id`='" . arg('update') . "'");
        $old_file = $item['image'];
        $item['caption'] = arg('caption', 'dbsafe');
        $item['active'] = arg('active', 'int');
        if (arg('section'))
        {
            $item['section'] = '|' . implode('|', arg('section')) . '|';
        }
        $item['block'] = arg('block', 'dbsafe');
        $item['priority'] = arg('priority', 'int');
        $item['showFrom'] = arg('showFrom', 'dbsafe');
        $item['showTill'] = arg('showTill', 'dbsafe');
        $item['showCount'] = arg('showCount', 'int');
        $item['html'] = arg('html', 'dbsafe');
        $item['image'] = arg('image');
        $item['width'] = arg('width', 'int');
        $item['height'] = arg('height', 'int');
        $item['url'] = arg('url', 'dbsafe');
        $item['target'] = arg('target', 'dbsafe');

        if ($item['showTill'] == '')
        {
            unset($item['showTill']);
        }
        if (arg('flushShowCount'))
        {
            $item['shows'] = 0;
        }
        if (is_uploaded_file($_FILES['image']['tmp_name']))
        {
            $path = $Eresus->fdata . $this->name . '/';
            if (is_file($path . $old_file))
            {
                unlink($path . $old_file);
            }
            $filename = 'banner' . $item['id'] .
                substr($_FILES['image']['name'], strrpos($_FILES['image']['name'], '.'));
            upload('image', $path . $filename);
            $item['image'] = $filename;
        }

        $Eresus->db->updateItem($this->table['name'], $item, "`id`='" . $item['id'] . "'");

        if ($item['showTill'] == '')
        {
            $Eresus->db->query(
                "UPDATE " . $Eresus->db->prefix . $this->table['name'] .
                " SET `showTill` = NULL WHERE `id`='" . $item['id'] . "'");
        }

        HTTP::redirect(arg('submitURL'));
    }
1264551
def update(self, *args, **kwargs):
        
        if args:
            self.database.hmset(self.key, *args)
        else:
            self.database.hmset(self.key, kwargs)
805135
def update(self, data, key):
        """"""
        og_data = self.read()
        og_data[key] = data
        self.write(og_data)
383799
public function update()
    {
        /** @var array $relations array of structure_relation objects */
        $relations = null;

        // If CMSNav has old relations then delete it
        if (dbQuery('\samson\activerecord\structure_relation')->child_id($this->id)->exec($relations)) {
            /** @var \samson\activerecord\structure_relation $relation */
            foreach ($relations as $relation) {
                $relation->delete();
            }
        }

        // Update new fields
        $this->fillFields();
    }
576714
def update(self, params, path, **kwargs):
        
        self.client.request('POST', params, path, **kwargs)
1289709
def update(self, request, id):
        """"""
        try:
            object = self.model.objects.get(id=id)
        except self.model.DoesNotExist:
            return self._render(
                request = request,
                template = '404',
                context = {
                    'error': 'The %s could not be found.' % self.model.__name__.lower()
                },
                status = 404,
                prefix_template_path = False
            )

        fields = []
        for field in request.PATCH:

            try:
                self.model._meta.get_field_by_name(field)
            except FieldDoesNotExist:
                continue
            else:
                fields.append(field)

        Form = generate_form(
            model = self.model,
            form = self.form,
            fields = fields
        )

        form = Form(request.PATCH, instance=object)
        if form.is_valid():
            object = form.save()

            return self.show(request, id)
        else:
            return self._render(
                request = request,
                template = 'edit',
                context = {
                    'form': form
                },
                status = 400
            )
964761
def update(self, **kwargs):
    """"""
    for key, value in kwargs.items():
      setattr(self, key, value)
585431
function() {
		edbml.Update.prototype.update.call(this);
		var element = this.element();
		if (this._beforeUpdate(element)) {
			this._update(element);
			this._afterUpdate(element);
			this._report();
		}
	}
932474
public void update()
  {
    byte []code = new byte[_code.size()];

    System.arraycopy(_code.getBuffer(), 0, code, 0, _code.size());

    _codeAttr.setCode(code);

    if (_changeLength) {
      // XXX: really need more sophisticated solution
      ArrayList<Attribute> attrList = getCodeAttribute().getAttributes();
      for (int i = attrList.size() - 1; i >= 0; i--) {
        Attribute attr = attrList.get(i);

        if (attr.getName().equals("LineNumberTable"))
          attrList.remove(i);
      }
    }
  }