Appends the frames in the other Frames into the tail of self.
 It is destructive like Array does.
331661
def concat other_frames
      raise TypeError unless other_frames.kind_of?(Frames)
      # data
      this_data = Tempfile.new 'this', binmode: true
      self.frames_data_as_io this_data
      other_data = Tempfile.new 'other', binmode: true
      other_frames.frames_data_as_io other_data
      this_size = this_data.size
      other_data.rewind
      while d = other_data.read(BUFFER_SIZE) do
        this_data.print d
      end
      other_data.close!
      # meta
      other_meta = other_frames.meta.collect do |m|
        x = m.dup
        x[:offset] += this_size
        x
      end
      @meta.concat other_meta
      # close
      overwrite this_data
      this_data.close!
      self
    end
1367699
public static Frame create(String[] headers, double[][] rows) {
    Futures fs = new Futures();
    Vec[] vecs = new Vec[rows[0].length];
    Key keys[] = new Vec.VectorGroup().addVecs(vecs.length);
    for( int c = 0; c < vecs.length; c++ ) {
      AppendableVec vec = new AppendableVec(keys[c]);
      NewChunk chunk = new NewChunk(vec, 0);
      for( int r = 0; r < rows.length; r++ )
        chunk.addNum(rows[r][c]);
      chunk.close(0, fs);
      vecs[c] = vec.close(fs);
    }
    fs.blockForPending();
    return new Frame(headers, vecs);
  }
1187966
def add_children(self, frames, after=None):
        '''
        
        '''
        if after is not None:
            # if there's an 'after' parameter, add the frames in reverse so the order is
            # preserved.
            for frame in reversed(frames):
                self.add_child(frame, after=after)
        else:
            for frame in frames:
                self.add_child(frame)
774090
protected void appendCopy(RoaringArray sa, int index) {
    extendArray(1);
    this.keys[this.size] = sa.keys[index];
    this.values[this.size] = sa.values[index].clone();
    this.size++;
  }
1096719
public void createChunks(String frameKey, byte[] expectedTypes, int chunkId, int totalNumRows, int[] maxVecSizes) throws IOException {
        ab.put1(ExternalFrameHandler.INIT_BYTE);
        ab.put1(ExternalFrameHandler.CREATE_FRAME);
        ab.putStr(frameKey);
        this.expectedTypes = expectedTypes;
        ab.putA1(expectedTypes);
        ab.putA4(maxVecSizes);
        ab.putInt(totalNumRows);
        ab.putInt(chunkId);
        writeToChannel(ab, channel);
    }
1037854
public ListBuffer<A> appendArray(A[] xs) {
        for (A x : xs) {
            append(x);
        }
        return this;
    }
924046
def push(self, x):
        
        if isinstance(x, Frame):
            frame = x
        else:
            frame = Frame(x)
        self.stack.append(frame)
        #log.debug('push: (%s)\n%s', Repr(frame), Repr(self.stack))
        return frame
1124258
public WsByteBuffer[] buildFrameArrayForWrite() {
        WsByteBuffer[] output;

        int headerSize = SIZE_FRAME_BEFORE_PAYLOAD;
        if (PADDED_FLAG) {
            headerSize = SIZE_FRAME_BEFORE_PAYLOAD + 1;
        }
        WsByteBuffer frameHeaders = getBuffer(headerSize);
        byte[] frame;
        if (frameHeaders.hasArray()) {
            frame = frameHeaders.array();
        } else {
            frame = super.createFrameArray();
        }

        // add the first 9 bytes of the array
        setFrameHeaders(frame, utils.FRAME_TYPE_DATA);

        // set up the frame payload
        int frameIndex = SIZE_FRAME_BEFORE_PAYLOAD;

        // add pad length field
        if (PADDED_FLAG) {
            utils.Move8BitstoByteArray(paddingLength, frame, frameIndex);
            frameIndex++;
        }
        frameHeaders.put(frame, 0, headerSize);
        frameHeaders.flip();

        // create padding and put in return buffer array
        if (PADDED_FLAG) {
            WsByteBuffer padding = getBuffer(paddingLength);
            for (int i = 0; i < paddingLength; i++) {
                padding.put((byte) 0);
            }
            padding.flip();
            output = new WsByteBuffer[3];
            output[0] = frameHeaders;
            output[1] = dataBuffer;
            output[2] = padding;
        }
        // create the output buffer array
        else {
            output = new WsByteBuffer[2];
            output[0] = frameHeaders;
            output[1] = dataBuffer;
        }
        return output;
    }
375368
function() {
    var node = this.firstViewNode;
    var next;

    if (node.parentNode !== this) {
      // Remove all the nodes and put them back into this fragment
      while (node) {
        next = (node === this.lastViewNode) ? null : node.nextSibling;
        this.appendChild(node);
        node = next;
      }
    }

    this.detached();
  }
1192525
private void writePrimitiveArrayFallback(Object array) {
        writeAMF3();
        buf.put(AMF3.TYPE_ARRAY);
        
        if (hasReference(array)) {
            putInteger(getReferenceId(array) << 1);
            return;
        }
        storeReference(array);
        
        amf3_mode += 1;
        int count = Array.getLength(array);
        putInteger(count << 1 | 1);
        putString("");
        for (int i = 0; i < count; i++) {
            Serializer.serialize(this, Array.get(array, i));
        }
        amf3_mode -= 1;
    }
544936
def _create_empty_array(self, frames, always_2d, dtype):
        """"""
        import numpy as np
        if always_2d or self.channels > 1:
            shape = frames, self.channels
        else:
            shape = frames,
        return np.empty(shape, dtype, order='C')
1280343
def _flush_buffered_frames(self):
        '''
        
        '''
        # In the rare case (a bug) where this is called but send_frame thinks
        # they should be buffered, don't clobber.
        frames = self._output_frame_buffer
        self._output_frame_buffer = []
        for frame in frames:
            self.send_frame(frame)
434775
private void putFrame() {
    final int nLocal = currentFrame[1];
    final int nStack = currentFrame[2];
    if (symbolTable.getMajorVersion() < Opcodes.V1_6) {
      // Generate a StackMap attribute entry, which are always uncompressed.
      stackMapTableEntries.putShort(currentFrame[0]).putShort(nLocal);
      putAbstractTypes(3, 3 + nLocal);
      stackMapTableEntries.putShort(nStack);
      putAbstractTypes(3 + nLocal, 3 + nLocal + nStack);
      return;
    }
    final int offsetDelta =
        stackMapTableNumberOfEntries == 0
            ? currentFrame[0]
            : currentFrame[0] - previousFrame[0] - 1;
    final int previousNlocal = previousFrame[1];
    final int nLocalDelta = nLocal - previousNlocal;
    int type = Frame.FULL_FRAME;
    if (nStack == 0) {
      switch (nLocalDelta) {
        case -3:
        case -2:
        case -1:
          type = Frame.CHOP_FRAME;
          break;
        case 0:
          type = offsetDelta < 64 ? Frame.SAME_FRAME : Frame.SAME_FRAME_EXTENDED;
          break;
        case 1:
        case 2:
        case 3:
          type = Frame.APPEND_FRAME;
          break;
        default:
          // Keep the FULL_FRAME type.
          break;
      }
    } else if (nLocalDelta == 0 && nStack == 1) {
      type =
          offsetDelta < 63
              ? Frame.SAME_LOCALS_1_STACK_ITEM_FRAME
              : Frame.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED;
    }
    if (type != Frame.FULL_FRAME) {
      // Verify if locals are the same as in the previous frame.
      int frameIndex = 3;
      for (int i = 0; i < previousNlocal && i < nLocal; i++) {
        if (currentFrame[frameIndex] != previousFrame[frameIndex]) {
          type = Frame.FULL_FRAME;
          break;
        }
        frameIndex++;
      }
    }
    switch (type) {
      case Frame.SAME_FRAME:
        stackMapTableEntries.putByte(offsetDelta);
        break;
      case Frame.SAME_LOCALS_1_STACK_ITEM_FRAME:
        stackMapTableEntries.putByte(Frame.SAME_LOCALS_1_STACK_ITEM_FRAME + offsetDelta);
        putAbstractTypes(3 + nLocal, 4 + nLocal);
        break;
      case Frame.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED:
        stackMapTableEntries
            .putByte(Frame.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED)
            .putShort(offsetDelta);
        putAbstractTypes(3 + nLocal, 4 + nLocal);
        break;
      case Frame.SAME_FRAME_EXTENDED:
        stackMapTableEntries.putByte(Frame.SAME_FRAME_EXTENDED).putShort(offsetDelta);
        break;
      case Frame.CHOP_FRAME:
        stackMapTableEntries.putByte(Frame.SAME_FRAME_EXTENDED + nLocalDelta).putShort(offsetDelta);
        break;
      case Frame.APPEND_FRAME:
        stackMapTableEntries.putByte(Frame.SAME_FRAME_EXTENDED + nLocalDelta).putShort(offsetDelta);
        putAbstractTypes(3 + previousNlocal, 3 + nLocal);
        break;
      case Frame.FULL_FRAME:
      default:
        stackMapTableEntries.putByte(Frame.FULL_FRAME).putShort(offsetDelta).putShort(nLocal);
        putAbstractTypes(3, 3 + nLocal);
        stackMapTableEntries.putShort(nStack);
        putAbstractTypes(3 + nLocal, 3 + nLocal + nStack);
    }
  }
1121718
public static INDArray[] append(INDArray[] history, INDArray append) {
        INDArray[] appended = new INDArray[history.length];
        appended[0] = append;
        System.arraycopy(history, 0, appended, 1, history.length - 1);
        return appended;
    }
998278
def frameify(self, state, data):
        """"""

        # Pull in any partially-processed data
        data = state.recv_buf + data

        # Loop over the data
        while data:
            if not state.frame_start:
                try:
                    idx = data.index(self.prefix + self.begin)
                except ValueError:
                    # Can't find the start of a frame...
                    break

                # Advance data to the beginning of the frame (just
                # after the marker)
                data = data[idx + len(self.prefix) + 1:]
                state.frame_start = True

            # Now that data is sitting at the frame start, let's find
            # the frame ending
            try:
                idx = data.index(self.prefix + self.end)
            except ValueError:
                # Can't find the end of the frame...
                break

            # OK, extract the frame and advance the data
            frame = data[:idx]
            data = data[idx + len(self.prefix) + 1:]
            state.frame_start = (self.begin == self.end)

            # Now we need to unstuff the frame
            frame = self.prefix.join(frame.split(self.prefix + self.nop))

            # Yield the frame
            try:
                yield frame
            except FrameSwitch:
                break

        # Put any remaining data back into the buffer
        state.recv_buf = data
30555
private Pair<Map<String, Frame>, Map<String, Set<String>>> fetchFrames() {
    Map<String, Frame> all_frames = null;
    Map<String, Set<String>> all_frames_cols = null;

    if (this.find_compatible_frames) {
      // caches for this request
      all_frames = Frames.fetchAll();
      all_frames_cols = new TreeMap<String, Set<String>>();

      for (Map.Entry<String, Frame> entry : all_frames.entrySet()) {
        all_frames_cols.put(entry.getKey(), new TreeSet<String>(Arrays.asList(entry.getValue()._names)));
      }
    }
    return new Pair<Map<String, Frame>, Map<String, Set<String>>>(all_frames, all_frames_cols);
  }
587925
function(){
    var gl = this.gl;
    gl.deleteFramebuffer( this.fbo );
    
    for (var i = 0; i < this.attachmentsList.length; i++) {
      this.attachmentsList[i].dispose();
    }
    this.attachmentsList = null;
    this.attachments     = null;

    this.valid = false;
    this.fbo   = null;
    this.gl    = null;
  }