This is temporary until we start creating Cells of the different type (buffer vs. native)
777605
public Cell reconcileCounter(Cell cell)
    {
        assert this instanceof CounterCell : "Wrong class type: " + getClass();

        // No matter what the counter cell's timestamp is, a tombstone always takes precedence. See CASSANDRA-7346.
        if (cell instanceof DeletedCell)
            return cell;

        assert (cell instanceof CounterCell) : "Wrong class type: " + cell.getClass();

        // live < live last delete
        if (timestamp() < ((CounterCell) cell).timestampOfLastDelete())
            return cell;

        long timestampOfLastDelete = ((CounterCell) this).timestampOfLastDelete();

        // live last delete > live
        if (timestampOfLastDelete > cell.timestamp())
            return this;

        // live + live. return one of the cells if its context is a superset of the other's, or merge them otherwise
        ByteBuffer context = CounterCell.contextManager.merge(value(), cell.value());
        if (context == value() && timestamp() >= cell.timestamp() && timestampOfLastDelete >= ((CounterCell) cell).timestampOfLastDelete())
            return this;
        else if (context == cell.value() && cell.timestamp() >= timestamp() && ((CounterCell) cell).timestampOfLastDelete() >= timestampOfLastDelete)
            return cell;
        else // merge clocks and timestamps.
            return new BufferCounterCell(name(),
                                         context,
                                         Math.max(timestamp(), cell.timestamp()),
                                         Math.max(timestampOfLastDelete, ((CounterCell) cell).timestampOfLastDelete()));
    }
778230
@SuppressWarnings("unused")
    private void allocateDataChannel(int channelType) {
        switch (channelType) {
            case NORMALS:
                m_normals = ByteBuffer.allocateDirect(
                        m_numVertices * 3 * SIZEOF_FLOAT);
                m_normals.order(ByteOrder.nativeOrder());
                break;
            case TANGENTS:
                m_tangents = ByteBuffer.allocateDirect(
                        m_numVertices * 3 * SIZEOF_FLOAT);
                m_tangents.order(ByteOrder.nativeOrder());
                break;
            default:
                throw new IllegalArgumentException("unsupported channel type");
        }
    }
229300
public void init()
  {
    _offset = 0;

    if (_tempBuffer == null) {
      _tempBuffer = TempBuffer.create();
      _buffer = _tempBuffer.buffer();
      _bufferEnd = _buffer.length;
    }
  }
102065
function clearCell(opts: Options, change: Change, cell: Block): Change {
    const newBlock = Block.create({ type: opts.typeContent });
    const { nodes } = cell;

    // Insert a new empty node
    change.insertNodeByKey(cell.key, 0, newBlock, { normalize: false });

    // Remove all previous nodes
    nodes.forEach(node => {
        change.removeNodeByKey(node.key);
    });

    change.normalizeNodeByKey(cell.key);

    return change;
}
1159639
@SuppressWarnings("unchecked")
	private <T> T toType(String cell,DataType  dataType)
	{
		
		switch(dataType)
		{
			case Long: return cell != null && cell.length() > 0 ? (T)Long.valueOf(cell) : (T)Long.valueOf(-1); 
			default: return (T)cell;
		}
	}
1258249
function createBasicCell(rowIndex, colIndex, nodeName) {
  return {
    nodeName: nodeName || 'TD',
    colspan: 1,
    rowspan: 1,
    content: BASIC_CELL_CONTENT,
    elementIndex: {
      rowIndex,
      colIndex
    }
  };
}
599923
function(rawBuffer) {
    if (rawBuffer && this.offset === 0) return this.buffer;

    var out = new Buffer(8);
    this.buffer.copy(out, 0, this.offset, this.offset + 8);
    return out;
  }
507063
function bufferFromArrayBuffer(arrayBuffer) {
  const buffer = Buffer.alloc(arrayBuffer.byteLength);
  const view = new Uint8Array(arrayBuffer);

  for (let i = 0; i < buffer.length; ++i) {
    buffer[i] = view[i];
  }

  return buffer;
}
820594
function(){
		var piece = this.getcell_excell(); /* piece : cell or excell */
		if(piece.isnull || (this.mouseCell===piece && !this.mouseend)){ return;}

		if(this.mousestart && (piece!==this.cursor.getobj() || piece.ques!==51)){
			this.setcursor(piece);
			this.mousereset();
		}
		else if((this.mousestart && this.cursor.getNumOfTarget(piece)<2) || this.mouseend){
			this.inputqnum_main(piece);
			this.mousereset();
		}
		else{
			this.mouseCell = piece;
			this.inputselect_cell51(piece);
		}
	}
146681
function Buf(buffer) {
  this._initialSize = 64 * 1024;
  this._stepSize = this._initialSize;
  this._pos = 0;

  if (typeof buffer === 'number') {
    this._initialSize = buffer;
  }
  if (buffer instanceof Buffer) {
    this._buf = buffer;
  } else {
    this._buf = new Buffer(this._initialSize);
  }
}
366616
private void reallocateBuffer(int newCapacity) {

        byte[] newBuffer = new byte[newCapacity];
        System.arraycopy(m_buffer, 0, newBuffer, 0, Math.min(m_size, newCapacity));
        m_buffer = newBuffer;
    }
1334173
function(){
		var cell = this.getcell();
		if(cell.isnull || cell===this.mouseCell){ return;}
		if(this.inputData===null){ this.decIC(cell);}

		this.mouseCell = cell;

		if(cell.numberRemainsUnshaded && cell.qnums.length!==0 && (this.inputData===1||(this.inputData===2 && !this.puzzle.painter.enablebcolor))){ return;}
		if(this.RBShadeCell && this.inputData===1){
			if(this.firstCell.isnull){ this.firstCell = cell;}
			var cell0 = this.firstCell;
			if(((cell0.bx&2)^(cell0.by&2))!==((cell.bx&2)^(cell.by&2))){ return;}
		}

		(this.inputData===1?cell.setShade:cell.clrShade).call(cell);
		cell.setQsub(this.inputData===2?1:0);

		cell.draw();
	}
19706
function fromBufferWithMime( type, bufferContent, options, cb, withPath ) {
  if ( typeof type === 'string' &&
       bufferContent &&
       bufferContent instanceof Buffer &&
       ( typeof options === 'function' || typeof cb === 'function' ) ) {
    _writeBufferToDisk( bufferContent, function( newPath ) {
      fromFileWithMimeAndPath( type, newPath, options, cb );
    });
  } else {
    _returnArgsError( arguments );
  }
}
307819
function createRow(
    opts: Options,
    columns: number,
    getCellContent?: (column: number) => Node[]
): Block {
    const cellNodes = Range(0, columns)
        .map(i =>
            createCell(opts, getCellContent ? getCellContent(i) : undefined)
        )
        .toList();

    return Block.create({
        type: opts.typeRow,
        nodes: cellNodes
    });
}
459980
function createVertexBufferObjects(renderState) {
    if (m_geomData) {
      if (renderState) {
        m_context = renderState.m_context;
      }
      var numberOfSources = m_geomData.numberOfSources(),
          i, j, k, bufferId = null, keys, ks, numberOfPrimitives, data;

      for (i = 0; i < numberOfSources; i += 1) {
        bufferId = m_context.createBuffer();
        m_context.bindBuffer(vgl.GL.ARRAY_BUFFER, bufferId);
        data = m_geomData.source(i).data();
        if (!(data instanceof Float32Array)) {
          data = new Float32Array(data);
        }
        m_context.bufferData(vgl.GL.ARRAY_BUFFER, data,
                      m_dynamicDraw ? vgl.GL.DYNAMIC_DRAW :
                      vgl.GL.STATIC_DRAW);

        keys = m_geomData.source(i).keys();
        ks = [];

        for (j = 0; j < keys.length; j += 1) {
          ks.push(keys[j]);
        }

        m_bufferVertexAttributeMap[i] = ks;
        m_buffers[i] = bufferId;
      }

      numberOfPrimitives = m_geomData.numberOfPrimitives();
      for (k = 0; k < numberOfPrimitives; k += 1) {
        bufferId = m_context.createBuffer();
        m_context.bindBuffer(vgl.GL.ARRAY_BUFFER, bufferId);
        m_context.bufferData(vgl.GL.ARRAY_BUFFER,
          m_geomData.primitive(k).indices(), vgl.GL.STATIC_DRAW);
        m_buffers[i] = bufferId;
        i += 1;
      }

      m_glCompileTimestamp.modified();
    }
  }
824009
function(){
		var pos = this.getpos(0);
		if(this.prevPos.equals(pos)){ return;}

		var cell = this.prevPos.getc();
		if(!cell.isnull){
			if(cell.qnum!==-1){
				var dir = this.prevPos.getdir(pos,2);
				if(dir!==cell.NDIR){
					cell.setQdir(cell.qdir!==dir?dir:0);
					cell.draw();
				}
			}
		}
		this.prevPos = pos;
	}
282083
function convertBasicCell (cell) {
  return _.pickBy(_.assign({
    renderer: convertRenderer(cell)
  }, _.pick(cell, CARRY_OVER_PROPERTIES)))
}