Saves the instance.
979294
def save(self, commit=True):
        
        if self.instance.pk:
            # First handle updates
            post = super().save(commit=False)
            post.updated_by = self.user
            post.updates_count = F('updates_count') + 1
        else:
            post = Post(
                topic=self.topic,
                subject=self.cleaned_data['subject'],
                approved=self.perm_handler.can_post_without_approval(self.forum, self.user),
                content=self.cleaned_data['content'],
                enable_signature=self.cleaned_data['enable_signature'])
            if not self.user.is_anonymous:
                post.poster = self.user
            else:
                post.username = self.cleaned_data['username']
                post.anonymous_key = get_anonymous_user_forum_key(self.user)

        # Locks the topic if appropriate.
        lock_topic = self.cleaned_data.get('lock_topic', False)
        if lock_topic:
            self.topic.status = Topic.TOPIC_LOCKED
            self.topic.save()

        if commit:
            post.save()

        return post
16300
def save_self(execute_hooks = true)
      # short-circuit if the resource is not dirty
      return saved? unless dirty_self?

      if execute_hooks
        new? ? create_with_hooks : update_with_hooks
      else
        _persist
      end
      clean?
    end
1052369
def save(self):
        """"""
        self._connection.run(['change', '-i'], stdin=format(self), marshal_output=False)
        self._dirty = False
508741
def save(self, commit=True):
        """"""

        # walk through the document fields
        for field_name, field in iter_valid_fields(self._meta):
            setattr(self.instance, field_name, self.cleaned_data.get(field_name))

        if commit:
            self.instance.save()

        return self.instance
1297162
def save(self):
        
        res = self.cloud_manager._modify_storage(self, self.size, self.title)
        self._reset(**res['storage'])
743605
public function save()
    {
        // Save the session and get an identifier
        $id = $this->server->getSessionStorage()->create(
            $this->getOwnerType(),
            $this->getOwnerId(),
            $this->getClient()->getId(),
            $this->getClient()->getRedirectUri()
        );

        $this->setId($id);

        // Associate the scope with the session
        foreach ($this->getScopes() as $scope) {
            $this->server->getSessionStorage()->associateScope($this, $scope);
        }
    }
933375
def save(self):
        
        if 'save' not in self._supports:
            raise AssertionError('Can not save this object type')

        values = {}
        for key in [key for key in self.keys() if key not in self._save_ignore]:
            if not getattr(self, key) and getattr(self, key) != False:
                continue

            if isinstance(getattr(self, key, None), list):
                value = list()
                for item in getattr(self, key):
                    if isinstance(item, dict):
                        value.append(item)
                    elif hasattr(item, '_save_as'):
                        value.append(item._save_as())
                    elif hasattr(item, '_ref') and getattr(item, '_ref'):
                        value.append(getattr(item, '_ref'))
                    else:
                        LOGGER.warning('Cant assign %r', item)
                values[key] = value
            elif getattr(self, key, None):
                values[key] = getattr(self, key)
        if not self._ref:
            response = self._session.post(self._path, values)
        else:
            values['_ref'] = self._ref
            response = self._session.put(self._path, values)
        LOGGER.debug('Response: %r, %r', response.status_code, response.content)
        if 200 <= response.status_code <= 201:
            self.fetch()
            return True
        else:
            try:
                error = response.json()
                raise exceptions.ProtocolError(error['text'])
            except ValueError:
                raise exceptions.ProtocolError(response.content)
843281
public function save() : void
    {
        if ($this->base instanceof Persistable) {
            $this->persister->save($this->base);

            if ($this->logger) {
                $this->logger->info('Model saved successully');
            }
        }
    }
272859
def save_instances(self, path, binary=False, mode=SaveMode.LOCAL_SAVE):
        
        if binary:
            ret = lib.EnvBinarySaveInstances(self._env, path.encode(), mode)
        else:
            ret = lib.EnvSaveInstances(self._env, path.encode(), mode)
        if ret == 0:
            raise CLIPSError(self._env)

        return ret
824120
public function save()
    {
        $this->getHandler()->write($this->getId(), serialize($this->attributes));
        $this->started = false;
    }
885939
function save() {
    // we must reset the colour cache or it will keep bad colours after clipping
    $this->currentColour = null;
    $this->currentStrokeColour = null;
    $this->objects[$this->currentContents]['c'].=  "\nq";
  }
70165
def save(self):
        
        with Repo.db:
            self._do_save()
            our_name = inflector.singularize(Repo.table_name(self.__class__))
            for record in self._related_records:
                if not self._id:
                    related_key = associations.foreign_keys_for(
                        record.__class__)[our_name]
                    setattr(record, related_key, self.__id)
                record._do_save()
            for record in self._delete_related_records:
                record._do_destroy()
        self._finish_save()
1315686
def save(self):
        """"""
        if self.path:
            self._saveState(self.path)
        else:
            self.saveAs()
431980
def save(self):
        
        try:
            if self.exists() is False:
                self.db.session.add(self)
            # self.db.session.merge(self)
            self.db.session.commit()
        except (Exception, BaseException) as error:
            if current_app.config['DEBUG']:
                raise error
            return None
594374
def save(self):
        
        super(Samples, self).save()
        if self.metadata is not None:
            self.metadata.save()
712581
private function _save() : void
    {
        $this->_storage->save(
            $this->_host,
            $this->_storageKey,
            $this->_requestCount,
            $this->_timekeeper->getExpiration(),
            $this->getRemainingSeconds()
        );
    }
590946
def save(self):
		
		with open(self.configuration_file, 'w') as file_h:
			file_h.write(self._serializer('dumps', self._storage))