update resource with specific id
978606
public function update($id)
    {
        $success = false;
        $message = '';
        $user    = null;
        $code    = 0;

        try{
            $input = Input::put();
            /** in case request come from post http form */
            $input = is_null($input) ? Input::post() : $input;

            if($input['password'] != $input['confirm_password']){
                throw new Exception("Password and confirmation password not match", 1);
            }

            $user = Sentry::findUserById($id);

            $user->email        = $input['email'];
            $user->first_name   = $input['first_name'];
            $user->last_name    = $input['last_name'];

            if($input['password']){
                $user->password = $input['password'];
            }

            $success = $user->save();
            $code    = 200;
            $message = 'User updated sucessully';
        }catch(UserNotFoundException $e){
            $message = $e->getMessage();
            $code    = 404;
        }catch (Exception $e){
            $message = $e->getMessage();
            $code    = 500;
        }

        if(Request::isAjax()){
            Response::headers()->set('Content-Type', 'application/json');
            Response::setBody(json_encode(
                array(
                    'success'   => $success,
                    'data'      => ($user) ? $user->toArray() : $user,
                    'message'   => $message,
                    'code'      => $code
                )
            ));
        }else{
            Response::redirect($this->siteUrl('admin/user/'.$id.'/edit'));
        }
    }
886111
function update() {
    var $this = this,
      self = User.resourceConstructor().call(this, this.id);

    return self.update.apply(self, arguments).then(function (updated) {
      Utils.extend($this, updated, true);
      return updated;
    });
  }
910630
def update(self, id, data):
        
        self.db.execute([
            'UPDATE comments SET',
            ','.join(key + '=' + '?' for key in data),
            'WHERE id=?;'],
            list(data.values()) + [id])

        return self.get(id)
630077
def update_data_request(data_request_id, update_submission_data_request_data, opts = {})
      data, _status_code, _headers = update_data_request_with_http_info(data_request_id, update_submission_data_request_data, opts)
      data
    end
597855
def lock_resource_for_update(cls, resource_id, db_session):
        
        db_session = get_db_session(db_session)
        query = db_session.query(cls.model)
        query = query.filter(cls.model.resource_id == resource_id)
        query = query.with_for_update()
        return query.first()
576714
def update(self, params, path, **kwargs):
        
        self.client.request('POST', params, path, **kwargs)
806295
def update_admin_object_resource(name, server=None, **kwargs):
    '''
    
    '''
    if 'jndiName' in kwargs:
        del kwargs['jndiName']
    return _update_element(name, 'resources/admin-object-resource', kwargs, server)
1373954
public function updateIDValue(&$id)
    {
        $owner = $this->owner;
        if ($owner->Title) {
            $id = Convert::raw2url($owner->Title);
        }
    }
817544
protected void requestElementUpdate (
        String name, int index, Object value, Object oldValue, Transport transport)
    {
        // dispatch an attribute changed event
        postEvent(new ElementUpdatedEvent(_oid, name, value, index).
                  setOldValue(oldValue).setTransport(transport));
    }
1326811
def update_project(id, **kwargs):
    
    content = update_project_raw(id, **kwargs)
    if content:
        return utils.format_json(content)
957709
def update_id(self, sequence_id=None):
        """"""

        if sequence_id:
            self.sequence_id = sequence_id

        self._set_ids(force=True)

        if self.dataset:
            self._update_names()
1349622
def update(self, id):
        """"""
        # url('DataStores', id=ID)
        content = request.environ['wsgi.input'].read(int(request.environ['CONTENT_LENGTH']))
        content = content.decode('utf8')
        content = simplejson.loads(content)        
        result = meta.Session.query(DataStore).get(id)
        result.name = content['name']
        result.type = content['type']
        result.ogrstring = content['ogrstring']
        meta.Session.commit()
        response.status = 201
254848
def update(id, name)
      params = { :id => id, :name => name }
      requires params
      DataSift.request(:POST, 'historics/update', @config, params)
    end
1205804
def _update_record_with_id(self, identifier, rtype, content):
        """"""
        record = self._create_request_record(identifier, rtype, None, content,
                                             self._get_lexicon_option('ttl'),
                                             self._get_lexicon_option('priority'))

        self._request_modify_dns_record(record)
911135
def replace(self, resource, id_, document):
        """"""
        args = self._es_args(resource, refresh=True)
        document.pop('_id', None)
        document.pop('_type', None)
        self._update_parent_args(resource, args, document)
        return self.elastic(resource).index(body=document, id=id_, **args)
572520
def update(value, options = {})
      raise Diplomat::IdParameterRequired unless value['ID'] || value[:ID]

      custom_params = use_cas(@options)
      @raw = send_put_request(@conn, ['/v1/acl/update'], options, value, custom_params)
      parse_body
    end
920773
function update(req, res, next) {
  var params = {
    appId: req.params.id || req.body._id,
    forms: req.body.forms || []
  };
  forms.updateAppForms(req.connectionOptions, params, formsResultHandlers(constants.resultTypes.formProjects, req, next));
}