increase the TestRPC blocks by a specific count recursively
485977
function increaseBlockRecursively(provider, count, total, callback) {
  // if the count hits the total, stop the recursion
  if (count >= total) {
    callback(null, true);
  } else {
    // else mine a block
    provider.sendAsync({
      method: 'evm_mine',
    }, (mineError) => {
      if (mineError) {
        callback(`while mining to increase block: ${JSON.stringify(mineError)}`, null);
      } else {
        increaseBlockRecursively(provider, count + 1, total, callback);
      }
    });
  }
}
475026
private void upgradeLeafBlock(ReadStream is,
                                TableEntry10 table,
                                TableUpgrade upgradeTable,
                                Page10 page)
    throws IOException
  {
    TempBuffer tBuf = TempBuffer.create();
    
    byte []buffer = tBuf.buffer();
    
    int blobLen = BitsUtil.readInt16(is);
    
    is.readAll(buffer, 0, blobLen);
    
    int rowDataLen = BitsUtil.readInt16(is);
    int rowOffset = buffer.length - rowDataLen;
    
    is.readAll(buffer, rowOffset, rowDataLen);
    
    int rowLen = table.rowLength();
    int keyLen = table.keyLength();
    
    while (rowOffset < buffer.length) {
      int code = buffer[rowOffset] & CODE_MASK;
      
      switch (code) {
      case INSERT:
        rowInsert(table.row(), upgradeTable, buffer, rowOffset);
        
        rowOffset += rowLen;
        break;
        
      case REMOVE:
        rowOffset += keyLen + STATE_LENGTH;
        break;
        
      default:
        System.out.println("UNKNOWN: " + Integer.toHexString(code));
        return;
      }
    }
    
    tBuf.free();
  }
834533
def do_blockrep(self, line):
        """"""
        mns = self._split_args(line, 1, -1)
        self._command_processor.get_session().get_replication_policy().add_blocked(mns)
        self._print_info_if_verbose(
            "Set {} as blocked replication target(s)".format(", ".join(mns))
        )
490949
def insertBulkBlock(self, blockDump):
        
        #We first check if the first lumi section has event_count or not
        frst = True
        if (blockDump['files'][0]['file_lumi_list'][0]).get('event_count') == None: frst = False
        # when frst == True, we are looking for event_count == None in the data, if we did not find None (redFlg = False), 
        # eveything is good. Otherwise, we have to remove all even_count in lumis and raise exception.
        # when frst == False, weare looking for event_count != None in the data, if we did not find Not None (redFlg = False),        # everything is good. Otherwise, we have to remove all even_count in lumis and raise exception.     
        redFlag = False
        if frst == True:
            eventCT = (fl.get('event_count') == None for f in  blockDump['files'] for fl in f['file_lumi_list'])
        else:                 
            eventCT = (fl.get('event_count') != None for f in  blockDump['files'] for fl in f['file_lumi_list'])

        redFlag = any(eventCT)
        if redFlag:
            for f in blockDump['files']:
                for fl in f['file_lumi_list']:
                    if 'event_count' in fl: del fl['event_count']
        result =  self.__callServer("bulkblocks", data=blockDump, callmethod='POST' )
        if redFlag:
            raise dbsClientException("Mixed event_count per lumi in the block: %s" %blockDump['block']['block_name'], 
                                    "The block was inserted into DBS, but you need to check if the data is valid.")
        else:
            return result
953057
def update_counter(self, bucket, key, value, w=None, dw=None, pw=None,
                       returnvalue=False):
        
        raise NotImplementedError
862309
function(test) {
			var context = this.loopContext;
			var forkContext = this.forkContext;

			context.test = test;

			// Creates paths of `continue` statements.
			if (!context.continueForkContext.empty) {
				context.continueForkContext.add(forkContext.head);
				var testSegments = context.continueForkContext.makeNext(0, -1);

				forkContext.replaceHead(testSegments);
			}
		}
656348
void copyBlocksTo(RegularFile target, int count) {
    int start = blockCount - count;
    int targetEnd = target.blockCount + count;
    target.expandIfNecessary(targetEnd);

    System.arraycopy(this.blocks, start, target.blocks, target.blockCount, count);
    target.blockCount = targetEnd;
  }
1348835
private int countLiveNodes(Block b, Iterator<DatanodeDescriptor> nodeIter) {
    int live = 0;
    Collection<DatanodeDescriptor> nodesCorrupt = null;
    if (corruptReplicas.size() != 0) {
      nodesCorrupt = corruptReplicas.getNodes(b);
    }
    while (nodeIter.hasNext()) {
      DatanodeDescriptor node = nodeIter.next();
      if (((nodesCorrupt != null) && (nodesCorrupt.contains(node))) ||
        node.isDecommissionInProgress() || node.isDecommissioned()) {
        // do nothing
      } else {
        live++;
      }
    }
    return live;
  }
1330592
function increaseProviderTime(provider, time, callback) {
  if (typeof time !== 'number') {
    callback('error while increasing TestRPC provider time, time value must be a number.', null);
    return;
  }

  provider.sendAsync({
    method: 'evm_increaseTime',
    params: [time],
  }, (increaseTimeError) => {
    if (increaseTimeError) {
      callback(`error while increasing TestRPC provider time: ${JSON.stringify(increaseTimeError)}`, null);
    } else {
      provider.sendAsync({
        method: 'evm_mine',
      }, (mineError) => {
        if (mineError) {
          callback(`while mining block to increase time on TestRPC provider: ${JSON.stringify(mineError)}`, null);
        } else {
          callback(null, true);
        }
      });
    }
  });
}
1289447
protected synchronized void incrNumBlockFixSimulationSuccess(long incr) {
    if (incr < 0) {
      throw new IllegalArgumentException("Cannot increment by negative value " +
                                         incr);
    }
    
    RaidNodeMetrics.getInstance(RaidNodeMetrics.DEFAULT_NAMESPACE_ID).
      blockFixSimulationSuccess.inc(incr);
    numBlockFixSimulationSuccess += incr;
  }
593087
def add_copies(self, node, parent, elem, minel):
        """"""
        rep = 0 if minel is None else int(minel.arg) - 1
        for i in range(rep):
            parent.append(copy.deepcopy(elem))
270209
def block_ranges(start_block, last_block, step=5):
    

    if last_block is not None and start_block > last_block:
        raise TypeError(
            "Incompatible start and stop arguments.",
            "Start must be less than or equal to stop.")

    return (
        (from_block, to_block - 1)
        for from_block, to_block
        in segment_count(start_block, last_block + 1, step)
    )
8591
def mul_block(self, index, val):
        """"""
        self._prepare_cache_slice(index)
        self.msinds[self.cache_slice] *= val
471993
function reRunBlock(block, index, callback){
  growing:
  for(var i=index; i<block.length; i++){ //iterate over the block [body, header, etck] *
    var code=block[i].substr(0,2);//                                            |      |
    if (code=== ">>") {//The only tag  by deffault                         |    |      |
      printBrand(block[i]);//                                              |    |      |
    /*  if(block[i].substr(2)==="default"){                                |    |      |
        if(callback) callback();// // fixes the bug of last element        |    |      |
        else recallback();//                                               |    v      |
      }//                                                                  |           |
   */ //                                                                   v           |
    }//                                                                                |
    for(var ii=0; ii<taggies.length;ii++){//                                           |
        //match user taggies and control if there are some seeds  so executes... *     |
        if(taggies[ii].code === code){//                                         |     |
          if (code[0]==="x") {//user lib needs all control-->callback-mode       |     |
            interf=true;//                                                       |     |
            interfPath="../"+taggies[ii].path+"/index.js";//                     |     |
            indexb=i+1;//                                                        |     |
            scionBlock=block;//                                                  |     |
            scionName= block[i];//                                               |     |
            break growing;//  BREAK THE TWO LOOPS                                |     |
          }//if there are no seeds then, executes next                    |      |     |
           var audreySeed= require("../"+taggies[ii].path+"/index.js");// |      |     |
           var seed= audreySeed();//                                      |      |     |
           var callbackname=block[i];//                                   |      |     |
           seed.grow(callbackname, terminal);//                           V      |     |
        }//                                                                      |     |
    }//                                                                          |     |
   //if it's the last element, callback                                          |     |
     if(i===block.length-1){ //                                    |             |     |
              if(callback) callback();//                           |             |     |
              else recallback();//if it's other                    v             |     |
        }//                                                                      v     |
  }//                                                                                  v
  if(interf){//if the element was a seed then executes interface
    interf=undefined;
    recallback= callback;
    runInterf(block);
  }

}
367827
def p_generate_block(self, p):
        ''
        p[0] = Block(p[2], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
531149
def add_blocks(self, perc_blocked=30):
        
        self.refresh_stats()
        #print(self.show_grid_stats())
        while (100*(self.tot_blocked-10))/self.tot_pix < perc_blocked - 1:
            self.add_block()
            self.refresh_stats()
807911
protected void updatePredecessorsWithCheckMode(TreePath tp, boolean check) {
        TreePath parentPath = tp.getParentPath();
        // If it is the root, stop the recursive calls and return
        if (parentPath == null) {
            return;
        }       
        CheckedNode parentCheckedNode = nodesCheckingState.get(parentPath);
        DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) parentPath.getLastPathComponent();     
        parentCheckedNode.allChildrenSelected = true;
        parentCheckedNode.isSelected = false;
        for (int i = 0 ; i < parentNode.getChildCount() ; i++) {                
            TreePath childPath = parentPath.pathByAddingChild(parentNode.getChildAt(i));
            CheckedNode childCheckedNode = nodesCheckingState.get(childPath);           
            // It is enough that even one subtree is not fully selected
            // to determine that the parent is not fully selected
            if (!allSelected(childCheckedNode)) {
                parentCheckedNode.allChildrenSelected = false;      
            }
            // If at least one child is selected, selecting also the parent
            if (childCheckedNode.isSelected) {
                parentCheckedNode.isSelected = true;
            }
        }
        if (parentCheckedNode.isSelected) {
            checkedPaths.add(parentPath);
        } else {
            checkedPaths.remove(parentPath);
        }
        // Go to upper predecessor
        updatePredecessorsWithCheckMode(parentPath, check);
    }