Updates block stack.
329386
@Override
  public boolean shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent) {
    // We automatically traverse a hoisted function body when that function
    // is first referenced, so that the reference lists are in the right order.
    //
    // TODO(nicksantos): Maybe generalize this to a continuation mechanism
    // like in RemoveUnusedCode.
    if (NodeUtil.isHoistedFunctionDeclaration(n)) {
      Node nameNode = n.getFirstChild();
      Var functionVar = nodeTraversal.getScope().getVar(nameNode.getString());
      checkNotNull(functionVar);
      if (finishedFunctionTraverse.contains(functionVar)) {
        return false;
      }
      startedFunctionTraverse.add(functionVar);
    }

    // If node is a new basic block, put on basic block stack
    if (isBlockBoundary(n, parent)) {
      blockStack.add(new BasicBlock(peek(blockStack), n));
    }

    // Add the second x before the first one in "let [x] = x;". VariableReferenceCheck
    // relies on reference order to give a warning.
    if ((n.isDefaultValue() || n.isDestructuringLhs()) && n.hasTwoChildren()) {
      Scope scope = nodeTraversal.getScope();
      nodeTraversal.traverseInnerNode(n.getSecondChild(), n, scope);
      nodeTraversal.traverseInnerNode(n.getFirstChild(), n, scope);
      return false;
    }
    return true;
  }
1101567
synchronized void addBlock(Block block) {
    if (!isInitialized()) {
      return;
    }
    
    BlockScanInfo info = blockMap.get(block);
    if ( info != null ) {
      LOG.warn("Adding an already existing block " + block);
      delBlockInfo(info);
    }
    
    info = new BlockScanInfo(block);    
    info.lastScanTime = getNewBlockScanTime();
    
    addBlockInfo(info);
    adjustThrottler();
  }
1199185
def _set_update(self):
        
        try:
            self._updateStack = False
            stack_name = self._config.get('environment', {}).get('stack_name', None)
            response = self._cloudFormation.describe_stacks(StackName=stack_name)
            stack = response['Stacks'][0]
            if stack['StackStatus'] == 'ROLLBACK_COMPLETE':
                logging.info('stack is in ROLLBACK_COMPLETE status and should be deleted')
                del_stack_resp = self._cloudFormation.delete_stack(StackName=stack_name)
                logging.info('delete started for stack: {}'.format(stack_name))
                logging.debug('delete_stack returned: {}'.format(json.dumps(del_stack_resp, indent=4)))
                stack_delete = self.poll_stack()
                if not stack_delete:
                    return False

            if stack['StackStatus'] in ['CREATE_COMPLETE', 'UPDATE_COMPLETE', 'UPDATE_ROLLBACK_COMPLETE']:
                self._updateStack = True
        except:
            self._updateStack = False

        logging.info('update_stack: ' + str(self._updateStack))
        return True
1201248
def update_stack_list!
      if updater.nil? || !updater.alive?
        self.updater = Thread.new {
          loop do
            begin
              fetch_stacks
              sleep(stack_list_interval)
            rescue => e
              logger.error "Failure encountered on stack fetch: #{e.class} - #{e}"
            end
          end
        }
        true
      else
        false
      end
    end
792629
public void updateBlocks(World world, MBlockState state)
	{
		AxisAlignedBB[] aabbs = AABBUtils.getCollisionBoundingBoxes(world, state, true);
		for (AxisAlignedBB aabb : aabbs)
		{
			if (aabb == null)
				continue;

			for (BlockPos pos : BlockPosUtils.getAllInBox(aabb))
				world.neighborChanged(pos, state.getBlock(), state.getPos());
		}
	}
1241486
def update(self, iterable):
        """"""
        _lists = self._lists
        _maxes = self._maxes
        values = sorted(iterable)

        if _maxes:
            if len(values) * 4 >= self._len:
                values.extend(chain.from_iterable(_lists))
                values.sort()
                self._clear()
            else:
                _add = self.add
                for val in values:
                    _add(val)
                return

        _load = self._load
        _lists.extend(values[pos:(pos + _load)]
                      for pos in range(0, len(values), _load))
        _maxes.extend(sublist[-1] for sublist in _lists)
        self._len = len(values)
        del self._index[:]
156660
def notify_block_new(self, block):
        """"""
        payload = block.SerializeToString()
        self._notify(
            "consensus_notifier_notify_block_new", payload, len(payload))
273865
def set_many(self, block, update_dict):
        
        for key, value in six.iteritems(update_dict):
            self.set(block, key, value)
769259
private void block() {
        final long steps = this.limits.simpSteps;
        assert this.level == 0;
        assert !this.config.plain;
        if (!this.config.block) { return; }
        if (this.config.blkwait >= this.stats.simplifications) { return; }
        assert this.simplifier == Simplifier.TOPSIMP;
        this.simplifier = Simplifier.BLOCK;
        updateCands();
        final long limit;
        if (this.stats.simplifications <= this.config.blkrtc) { limit = Long.MAX_VALUE; } else { limit = this.stats.steps + 10 * steps / sizePenalty(); }
        while (this.empty == null && !this.candsBlock.empty() && this.stats.steps++ < limit) {
            final int cand = this.candsBlock.top();
            final long priority = this.candsBlock.priority(cand);
            this.candsBlock.pop(cand);
            if (priority == 0 || !var(cand).free()) { continue; }
            blockLit(cand);
            blockLit(-cand);
        }
        assert this.schedule;
        this.schedule = false;
        assert this.simplifier == Simplifier.BLOCK;
        this.simplifier = Simplifier.TOPSIMP;
    }
758534
private <T extends Block> void addBlock(Block currentBlock, List<T> blocks)
    {
        if (currentBlock != null && this.matcher.match(currentBlock)) {
            blocks.add((T) currentBlock);
        }
    }
295482
def update(self):
        """"""
        # For each plugins, call the update method
        for p in self._plugins:
            if self._plugins[p].is_disable():
                # If current plugin is disable
                # then continue to next plugin
                continue

            # Set the input method to SNMP
            self._plugins[p].input_method = 'snmp'
            self._plugins[p].short_system_name = self.system_name

            # Update the stats...
            try:
                self._plugins[p].update()
            except Exception as e:
                logger.error("Update {} failed: {}".format(p, e))
            else:
                # ... the history
                self._plugins[p].update_stats_history()
                # ... and the views
                self._plugins[p].update_views()
86549
private void moveToNextBlock() {
		blk = new BlockId(blk.fileName(), blk.number() - 1);
		pg.read(blk);
		currentRec = (Integer) pg.getVal(LogMgr.LAST_POS, INTEGER).asJavaVal();
	}
614416
def notify_update(self):
    """"""
    with self._lock:
      for event in self._update_events:
        event.set()
      self._update_events.clear()
601740
def update(self, callback=int):
        """"""
        # print(self._pending_modifications)
        add_var = self._pending_modifications.add_var
        if len(add_var) > 0:
            self._add_variables(add_var)
            self._pending_modifications.add_var = []
        callback()

        add_constr = self._pending_modifications.add_constr
        if len(add_constr) > 0:
            self._add_constraints(add_constr)
            self._pending_modifications.add_constr = []

        add_constr_sloppy = self._pending_modifications.add_constr_sloppy
        if len(add_constr_sloppy) > 0:
            self._add_constraints(add_constr_sloppy, sloppy=True)
            self._pending_modifications.add_constr_sloppy = []

        var_lb = self._pending_modifications.var_lb
        var_ub = self._pending_modifications.var_ub
        if len(var_lb) > 0 or len(var_ub) > 0:
            self._set_variable_bounds_on_problem(var_lb, var_ub)
            self._pending_modifications.var_lb = []
            self._pending_modifications.var_ub = []

        rm_var = self._pending_modifications.rm_var
        if len(rm_var) > 0:
            self._remove_variables(rm_var)
            self._pending_modifications.rm_var = []
        callback()

        rm_constr = self._pending_modifications.rm_constr
        if len(rm_constr) > 0:
            self._remove_constraints(rm_constr)
            self._pending_modifications.rm_constr = []
462848
def update(self, dict):
        """"""
        for k,v in dict.items():
            self[k] = v
962403
function doUpdateBlock(Userinfo $userinfo, Userinfo &$existinguser, $overwrite)
	{
		$changed = false;
		//check the blocked status
		if ($existinguser->block != $userinfo->block) {

			$update_block = $this->params->get('update_block', false);
			if ($update_block || $overwrite) {
				if ($userinfo->block) {
					//block the user
					try {
						$this->blockUser($userinfo, $existinguser);
						$changed = true;
					} catch (Exception $e) {
						$this->debugger->addError(Text::_('BLOCK_UPDATE_ERROR') . ' ' . $e->getMessage());
					}
					$changed = true;
				} else {
					//unblock the user
					try {
						$this->unblockUser($userinfo, $existinguser);
						$changed = true;
					} catch (Exception $e) {
						$this->debugger->addError(Text::_('BLOCK_UPDATE_ERROR') . ' ' . $e->getMessage());
					}
				}
			} else {
				//return a debug to inform we skipped this step
				$this->debugger->addDebug(Text::_('SKIPPED_BLOCK_UPDATE') . ': ' . $existinguser->block . ' -> ' . $userinfo->block);
			}
		}
		return $changed;
	}
1208626
def _update(self):
        """"""
        self.dataChanged.emit(self.createIndex(0, 0), self.createIndex(
            len(self.collection), len(self.header)))