This sets a VXR to be the first and last VXR in the VDR
557274
def _update_vdr_vxrheadtail(self, f, vdr_offset, VXRoffset):
        '''
        
        '''
        # VDR's VXRhead
        self._update_offset_value(f, vdr_offset+28, 8, VXRoffset)
        # VDR's VXRtail
        self._update_offset_value(f, vdr_offset+36, 8, VXRoffset)
225179
def _write_vxr(self, f, numEntries=None):
        '''
        
        '''

        f.seek(0, 2)
        byte_loc = f.tell()
        section_type = CDF.VXR_
        nextVXR = 0
        if (numEntries == None):
            nEntries = CDF.NUM_VXR_ENTRIES
        else:
            nEntries = int(numEntries)
        block_size = CDF.VXR_BASE_SIZE64 + (4 + 4 + 8) * nEntries
        nUsedEntries = 0
        firsts = [-1] * nEntries
        lasts = [-1] * nEntries
        offsets = [-1] * nEntries

        vxr = bytearray(block_size)
        vxr[0:8] = struct.pack('>q', block_size)
        vxr[8:12] = struct.pack('>i', section_type)
        vxr[12:20] = struct.pack('>q', nextVXR)
        vxr[20:24] = struct.pack('>i', nEntries)
        vxr[24:28] = struct.pack('>i', nUsedEntries)
        estart = 28 + 4*nEntries
        vxr[28:estart] = struct.pack('>%si' % nEntries, *firsts)
        eend = estart + 4*nEntries
        vxr[estart:eend] = struct.pack('>%si' % nEntries, *lasts)
        vxr[eend:block_size] = struct.pack('>%sq' % nEntries, *offsets)
        f.write(vxr)
        return byte_loc
1051885
public void marshalling(Xdr xdr) {
        xdr.setXid(_xid);
        xdr.putInt(_xid);
        xdr.putInt(_direction);
        xdr.putInt(_rpcVersion);
        xdr.putInt(_serviceProgram);
        xdr.putInt(_serviceVersion);
        xdr.putInt(_serviceProcedure);
        _credential.marshalling(xdr);
    }
315202
public void setFirstLast(boolean first, boolean last, boolean hideAdd) {

        CmsEditableGroupButtonsState state = (CmsEditableGroupButtonsState)getState(false);
        if ((state.isFirst() != first) || (state.isLast() != last)) {
            state.setFirst(first);
            state.setLast(last);
            state.setAddOptionHidden(hideAdd);
            markAsDirty();
        }
    }
1097221
public void setEndings(IntegerArray v) {
    if (FeatureTokens_Type.featOkTst && ((FeatureTokens_Type)jcasType).casFeat_endings == null)
      jcasType.jcas.throwFeatMissing("endings", "ch.epfl.bbp.uima.types.FeatureTokens");
    jcasType.ll_cas.ll_setRefValue(addr, ((FeatureTokens_Type)jcasType).casFeatCode_endings, jcasType.ll_cas.ll_getFSRef(v));}
981137
def set_last_position(self, last_position):
        
        last_position = last_position or {}
        last_position.setdefault('readed_streams', [])
        last_position.setdefault('stream_offset', {})
        self.last_position = last_position
939857
public void marshalling(Xdr xdr) {
        super.marshalling(xdr);
        xdr.putLong(_offset);
        xdr.putUnsignedInt(_size);
        xdr.putInt(_syncType);
        // opaque payload, pass payload size down to avoid enumerating the list
        // again
        if (_payload != null) {
            xdr.putPayloads(_payload, _size);
        }
    }
1314394
function RSADoPrivate(x) {
  if(this.p == null || this.q == null)
    return x.modPow(this.d, this.n);

  // TODO: re-calculate any missing CRT params
  var xp = x.mod(this.p).modPow(this.dmp1, this.p);
  var xq = x.mod(this.q).modPow(this.dmq1, this.q);

  while(xp.compareTo(xq) < 0)
    xp = xp.add(this.p);
  return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);
}
635347
public void marshalling(Xdr xdr) {
        super.marshalling(xdr);
        xdr.putString(_name);
        xdr.putByteArray(_toFileHandle);
        xdr.putString(_toName);
    }
765760
void assignPrimaryDatanode() {
    //assign the first alive datanode as the primary datanode

    if (targets.length == 0) {
      NameNode.stateChangeLog.warn("BLOCK*"
        + " INodeFileUnderConstruction.initLeaseRecovery:"
        + " No blocks found, lease removed.");
    }

    int previous = primaryNodeIndex;
    Block lastBlock = this.getLastBlock();
    // find an alive datanode beginning from previous.
    // This causes us to cycle through the targets on successive retries.
    for(int i = 1; i <= targets.length; i++) {
      int j = (previous + i)%targets.length;
      if (targets[j].isAlive) {
        DatanodeDescriptor primary = targets[primaryNodeIndex = j]; 
        primary.addBlockToBeRecovered(lastBlock, targets);
        NameNode.stateChangeLog.info("BLOCK* " + lastBlock
          + " recovery started, primary=" + primary);
        return;
      }
    }
  }
491823
def _setCurrentRev(self, rev, branch='default'):
        """"""
        self.lastRev[branch] = str(rev)
        return self.setState('lastRev', self.lastRev)
1367412
public void setX(float v) {
    if (DocumentElement_Type.featOkTst && ((DocumentElement_Type)jcasType).casFeat_x == null)
      jcasType.jcas.throwFeatMissing("x", "ch.epfl.bbp.uima.types.DocumentElement");
    jcasType.ll_cas.ll_setFloatValue(addr, ((DocumentElement_Type)jcasType).casFeatCode_x, v);}
514488
public void marshalling(Xdr xdr) {
        super.marshalling(xdr);
        xdr.putLong(_offset);
        xdr.putUnsignedInt(_size);
    }
1226250
def setStop(self, vehID, edgeID, pos=1., laneIndex=0, duration=2**31 - 1,
                flags=tc.STOP_DEFAULT, startPos=tc.INVALID_DOUBLE_VALUE, until=-1):
        
        self._connection._beginMessage(tc.CMD_SET_VEHICLE_VARIABLE, tc.CMD_STOP,
                                       vehID, 1 + 4 + 1 + 4 + len(edgeID) + 1 + 8 + 1 + 1 + 1 + 4 + 1 + 1 + 1 + 8 + 1 + 4)
        self._connection._string += struct.pack("!Bi", tc.TYPE_COMPOUND, 7)
        self._connection._packString(edgeID)
        self._connection._string += struct.pack("!BdBBBiBB", tc.TYPE_DOUBLE, pos,
                                                tc.TYPE_BYTE, laneIndex, tc.TYPE_INTEGER, duration, tc.TYPE_BYTE, flags)
        self._connection._string += struct.pack("!BdBi",
                                                tc.TYPE_DOUBLE, startPos, tc.TYPE_INTEGER, until)
        self._connection._sendExact()
338983
public static Last[][] setScoreVector(int x, int xb, int yb, int ye, int gop, int gep, int[] subs,
			boolean storing, int[][][] scores, int[] xyMax, int score) {
		Last[][] pointers;
		ensureScoringMatrixColumn(x, storing, scores);
		if (x == xb) {
			pointers = new Last[ye + 1][scores[0][0].length];
		} else {
			pointers = new Last[ye + 1][];
			pointers[0] = new Last[scores[0][0].length];
			for (int y = 1; y < scores[0].length; y++) {
				pointers[y] = setScorePoint(x, y, gop, gep, subs[y], scores);
				for (int z = 0; z < scores[0][0].length; z++) {
					if (scores[x][y][z] <= 0) {
						scores[x][y][z] = 0;
						pointers[y][z] = null;
					}
				}
				if (scores[x][y][0] > score) {
					xyMax[0] = x;
					xyMax[1] = y;
					score = scores[x][y][0];
				}
			}
		}
		return pointers;
	}
1063564
def _get_recrange(self, f, VXRoffset):
        '''
        
        '''
        f.seek(VXRoffset+20)
        # Num entries
        numEntries = int.from_bytes(f.read(4), 'big', signed=True)
        # used entries
        usedEntries = int.from_bytes(f.read(4), 'big', signed=True)
        # VXR's First record
        firstRec = int.from_bytes(f.read(4), 'big', signed=True)
        # VXR's Last record
        f.seek(VXRoffset+28+(4*numEntries+4*(usedEntries-1)))
        lastRec = int.from_bytes(f.read(4), 'big', signed=True)
        return firstRec, lastRec
670598
protected void updateLastCRLFInfo(int index, int pos, boolean isCR) {
        this.lastCRLFBufferIndex = index;
        this.lastCRLFPosition = pos;
        this.lastCRLFisCR = isCR;
    }