update with commands from the block
184854
def update_commands(self, commands_str):
        
        commands = dict(parse_qsl(commands_str, keep_blank_values=True))
        _if = commands.get("if", self._if)
        if _if:
            self._if = Condition(_if)
        self._set_int(commands, "max_length")
        self._set_int(commands, "min_length")
        self.color = self._check_color(commands.get("color"))

        self.not_zero = "not_zero" in commands or self.not_zero
        self.show = "show" in commands or self.show
        self.soft = "soft" in commands or self.soft
1119541
function updateActions() {
        this.plugin('done', function () {
          var cmd;
          if (envOptions['update-actions']) {
            // Don't disable actions since this is mostly for development.
            cmd = 'python manage.py update_actions';

            childProcess.exec(cmd, function (err, stdout, stderr) {
              console.log('\n' + BOLD + 'Updating Actions' + END_BOLD);
              console.log(stdout);
              if (stderr) {
                console.error(stderr);
              }
            });
          }
        });
      }
1101444
private void updateBlocks() {
        for (Block<S, L> block : splitBlocks) {
            // Ignore blocks that have no elements in their sub blocks.
            int inSubBlocks = block.getElementsInSubBlocks();
            if (inSubBlocks == 0) {
                continue;
            }

            boolean blockRemains = (inSubBlocks < block.size());

            boolean reuseBlock = !blockRemains;

            List<UnorderedCollection<State<S, L>>> subBlocks = block.getSubBlocks();
            // If there is only one sub block which contains all elements of
            // the block, then no split needs to be performed.
            if (!blockRemains && subBlocks.size() == 1) {
                block.clearSubBlocks();
                continue;
            }

            Iterator<UnorderedCollection<State<S, L>>> subBlockIt = subBlocks.iterator();

            if (reuseBlock) {
                UnorderedCollection<State<S, L>> first = subBlockIt.next();
                block.getStates().swap(first);
                updateBlockReferences(block);
            }

            while (subBlockIt.hasNext()) {
                UnorderedCollection<State<S, L>> subBlockStates = subBlockIt.next();

                if (blockRemains) {
                    for (State<S, L> state : subBlockStates) {
                        block.removeState(state.getBlockReference());
                    }
                }

                Block<S, L> subBlock = new Block<>(numBlocks++, subBlockStates);
                updateBlockReferences(subBlock);
                newBlocks.add(subBlock);
                addToPartition(subBlock);
            }

            newBlocks.add(block);
            block.clearSubBlocks();

            // If the split block previously was in the queue, add all newly
            // created blocks to the queue. Otherwise, it's enough to add
            // all but the largest
            if (removeFromSplitterQueue(block)) {
                addAllToSplitterQueue(newBlocks);
            } else {
                addAllButLargest(newBlocks);
            }
            newBlocks.clear();
        }

        splitBlocks.clear();
    }
1209515
def update(self):
        
        def process_result(result):
            self.raw = result
        return Command('get', self.path, process_result=process_result)
273865
def set_many(self, block, update_dict):
        
        for key, value in six.iteritems(update_dict):
            self.set(block, key, value)
567011
public function updateBlock(Block $block): void
    {
        $query = $this->connection->createQueryBuilder();
        $query
            ->update('ngbm_block')
            ->set('layout_id', ':layout_id')
            ->set('depth', ':depth')
            ->set('path', ':path')
            ->set('parent_id', ':parent_id')
            ->set('placeholder', ':placeholder')
            ->set('position', ':position')
            ->set('definition_identifier', ':definition_identifier')
            ->set('view_type', ':view_type')
            ->set('item_view_type', ':item_view_type')
            ->set('name', ':name')
            ->set('translatable', ':translatable')
            ->set('main_locale', ':main_locale')
            ->set('always_available', ':always_available')
            ->set('config', ':config')
            ->where(
                $query->expr()->eq('id', ':id')
            )
            ->setParameter('id', $block->id, Type::INTEGER)
            ->setParameter('layout_id', $block->layoutId, Type::INTEGER)
            ->setParameter('depth', $block->depth, Type::STRING)
            ->setParameter('path', $block->path, Type::STRING)
            ->setParameter('parent_id', $block->parentId, Type::INTEGER)
            ->setParameter('placeholder', $block->placeholder, Type::STRING)
            ->setParameter('position', $block->position, Type::INTEGER)
            ->setParameter('definition_identifier', $block->definitionIdentifier, Type::STRING)
            ->setParameter('view_type', $block->viewType, Type::STRING)
            ->setParameter('item_view_type', $block->itemViewType, Type::STRING)
            ->setParameter('name', $block->name, Type::STRING)
            ->setParameter('translatable', $block->isTranslatable, Type::BOOLEAN)
            ->setParameter('main_locale', $block->mainLocale, Type::STRING)
            ->setParameter('always_available', $block->alwaysAvailable, Type::BOOLEAN)
            ->setParameter('config', $block->config, Type::JSON_ARRAY);

        $this->applyStatusCondition($query, $block->status);

        $query->execute();
    }
300560
def update(self, *args, **kwargs):
        '''
        
        '''
        preprocess = kwargs.get('preprocess')
        for s in args:
            for e in s:
                self._dict_set(preprocess(e) if preprocess else e, True)
773276
def replace_blocks(self, blocks):
        """"""
        start = 0
        bulk_insert = self.bulk_insert
        blocks_len = len(blocks)
        select = 'SELECT ?,?,?,?,?'
        query = 'REPLACE INTO gauged_data (namespace, offset, `key`, ' \
            'data, flags) '
        execute = self.cursor.execute
        while start < blocks_len:
            rows = blocks[start:start+bulk_insert]
            params = [param for params in rows for param in params]
            insert = (select + ' UNION ') * (len(rows) - 1) + select
            execute(query + insert, params)
            start += bulk_insert
387643
synchronized void update(BlockInfo blockInfo, int curReplicas, 
                           int decommissionedReplicas,
                           int curExpectedReplicas,
                           int curReplicasDelta, int expectedReplicasDelta) {
    int oldReplicas = curReplicas-curReplicasDelta;
    int oldExpectedReplicas = curExpectedReplicas-expectedReplicasDelta;
    int curPri = getPriority(blockInfo, curReplicas, decommissionedReplicas, curExpectedReplicas);
    int oldPri = getPriority(blockInfo, oldReplicas, decommissionedReplicas, oldExpectedReplicas);
    if(NameNode.stateChangeLog.isDebugEnabled()) {
      NameNode.stateChangeLog.debug("UnderReplicationBlocks.update " + 
                                    blockInfo +
                                    " curReplicas " + curReplicas +
                                    " curExpectedReplicas " + curExpectedReplicas +
                                    " oldReplicas " + oldReplicas +
                                    " oldExpectedReplicas  " + oldExpectedReplicas +
                                    " curPri  " + curPri +
                                    " oldPri  " + oldPri);
    }
    if(oldPri != LEVEL && oldPri != curPri) {
      remove(blockInfo, oldPri);
    }
    if(curPri != LEVEL && priorityQueues.get(curPri).add(blockInfo)) {
      if (NameNode.stateChangeLog.isDebugEnabled()) {
        NameNode.stateChangeLog.debug(
                                      "BLOCK* NameSystem.UnderReplicationBlock.update:"
                                      + blockInfo
                                      + " has only "+curReplicas
                                      + " replicas and need " + curExpectedReplicas
                                      + " replicas so is added to neededReplications"
                                      + " at priority level " + curPri);
      }
    }
  }
28900
def update_with(&blk)
      self.class.options.each do |name, config|
        value = yield(config)
        @values[name] = value unless value.nil?
      end
    end
677616
def add_command(command=nil,&block)
      command = Commands::Command.new(&block) if block_given?
      current_connection.add_command(command)
    end
1052896
function (blockname) {
            this._stack.push(this._curblock);
            this._curblock = this._blocks[blockname];
            if (this.indentUnit && this._curblock) {
                this._updateIndent();
            }
        }
975567
function replaceBlocks(content, blocks) {
    var newContent = content.replace(/\{\{\-\%([\s\S]+?)\%\-\}\}/g, function(match, key) {
        var replacedWith = match;

        var block = blocks.get(key);
        if (block) {
            replacedWith = replaceBlocks(block.get('body'), blocks);
        }

        return replacedWith;
    });

    return newContent;
}
635059
def _update_state(self, change):
        
        self._block_updates = True
        try:
            self.position = self.axis.Location()
            self.direction = self.axis.Direction()
        finally:
            self._block_updates = False
1303045
def fill(*args, &block)
      ary = self.to_a
      ary.fill *args, &block
      self.replace ary
    end
120543
def update_state
      Thread.new do
        Dictionary.commands.each do |zone, commands|
          Dictionary.commands[zone].each do |command, info|
            info[:values].each do |value, _|
              if value == 'QSTN'
                send(Parser.parse(command + "QSTN"))
                # If we send any faster we risk making the stereo drop replies. 
                # A dropped reply is not necessarily indicative of the
                # receiver's failure to receive the command and change state
                # accordingly. In this case, we're only making queries, so we do
                # want to capture every reply.
                sleep DEFAULT_TIMEOUT
              end
            end
          end
        end
      end
    end
1267724
def set_many(self, block, update_dict):
        """"""
        updated_dict = {}

        # Generate a new dict with the correct mappings.
        for (key, value) in six.iteritems(update_dict):
            updated_dict[self._key(block, key)] = value

        self._kvs.set_many(updated_dict)