Opens the segments.
326519
private void open() {
    // Load existing log segments from disk.
    for (Segment segment : loadSegments()) {
      segments.put(segment.descriptor().index(), segment);
    }

    // If a segment doesn't already exist, create an initial segment starting at index 1.
    if (!segments.isEmpty()) {
      currentSegment = segments.lastEntry().getValue();
    } else {
      SegmentDescriptor descriptor = SegmentDescriptor.builder()
        .withId(1)
        .withVersion(1)
        .withIndex(1)
        .withMaxSegmentSize(storage.maxSegmentSize())
        .withMaxEntries(storage.maxEntriesPerSegment())
        .build();

      descriptor.lock();

      currentSegment = createSegment(descriptor);
      currentSegment.descriptor().update(System.currentTimeMillis());
      currentSegment.descriptor().lock();

      segments.put(1L, currentSegment);
    }
  }
316193
public void openCropping() {

        CmsCroppingParamBean param = new CmsCroppingParamBean(m_croppingParam);
        m_currentFormat.adjustCroppingParam(param);
        m_croppingDialog.show(param);
    }
1320366
def segments (self):
    """"""
    for n in xrange(len(self.vertices) - 1):
      yield Line(self.vertices[n], self.vertices[n + 1])

    yield Line(self.vertices[-1], self.vertices[0])
938863
def segment(self, eps, min_time):
        
        new_segments = []
        for segment in self.segments:
            segmented = segment.segment(eps, min_time)
            for seg in segmented:
                new_segments.append(Segment(seg))
        self.segments = new_segments
        return self
854065
def find_segment_first(self, *args, **kwargs):
        """"""

        for m in self.find_segments(*args, **kwargs):
            return m

        return None
1201767
private void open() {
    for (Snapshot snapshot : loadSnapshots()) {
      snapshots.put(snapshot.index(), snapshot);
    }

    if (!snapshots.isEmpty()) {
      currentSnapshot = snapshots.lastEntry().getValue();
    }
  }
567935
def postprocess_segments(self):
        """"""
        # make segs a list of mask arrays, it's easier to store
        # as there is a hdf5 equivalent
        for iseg, seg in enumerate(self.segs):
            mask = np.zeros(self._adata.shape[0], dtype=bool)
            mask[seg] = True
            self.segs[iseg] = mask
        # convert to arrays
        self.segs = np.array(self.segs)
        self.segs_tips = np.array(self.segs_tips)
1185452
def add_segment(self, segment):
        
        if self.segments:
            prev_seg = self.segments[-1]
            if prev_seg.mode == segment.mode and prev_seg.encoding == segment.encoding:
                # Merge segment with previous segment
                segment = _Segment(prev_seg.bits + segment.bits,
                                   prev_seg.char_count + segment.char_count,
                                   segment.mode, segment.encoding)
                self.bit_length -= len(prev_seg.bits)
                del self.segments[-1]
                del self.modes[-1]
        self.segments.append(segment)
        self.bit_length += len(segment.bits)
        self.modes.append(segment.mode)
710463
public void open() {
        if (!isAttached()) {
            RootPanel.get().add(this);
        }
        windowCount++;
        if(windowOverlay != null && !windowOverlay.isAttached()) {
            RootPanel.get().add(windowOverlay);
        }

        if (fullsceenOnMobile && Window.matchMedia(Resolution.ALL_MOBILE.asMediaQuery())) {
            setMaximize(true);
        }

        if (openAnimation == null) {
            getOpenMixin().setOn(true);
            OpenEvent.fire(this, true);
        } else {
            setOpacity(0);
            Scheduler.get().scheduleDeferred(() -> {
                getOpenMixin().setOn(true);
                openAnimation.animate(this, () -> OpenEvent.fire(this, true));
            });
        }
    }
961883
def segments(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.segments(index=self._name, **kwargs)
183250
private static boolean peek(ListIterator<Segment> segments, SegmentKind... kinds) {
    int start = segments.nextIndex();
    boolean success = false;
    for (SegmentKind kind : kinds) {
      if (!segments.hasNext() || segments.next().kind() != kind) {
        success = false;
        break;
      }
    }
    if (success) {
      return true;
    }
    restore(segments, start);
    return false;
  }
200064
def open(self, section_index=0):
        """"""
        uri = self._sections[section_index][1]
        if len(uri.split()) == 1:
            self._open_url(uri)
        else:
            if self._verbose:
                print "running command: %s" % uri
            p = popen(uri, shell=True)
            p.wait()
557707
public I withOpenStart() {

        if (this.start.isOpen()) {
            return this.getContext();
        } else {
            Boundary<T> b = Boundary.of(IntervalEdge.OPEN, this.start.getTemporal());
            return this.getFactory().between(b, this.end);
        }

    }
1132786
public function open()
    {
        if ($this->isOpen() === true) {
            $msg = "The MemoryStream is already open.";
            throw new MemoryStreamException($msg, $this, MemoryStreamException::ALREADY_OPEN);
        }

        $this->setOpen(true);
    }
1244031
def _parse_segments(self):
        
        reader = csv.reader(open(self._segment_file, 'rU'),
                            delimiter='\t')
        for row in reader:
            if reader.line_num == 1:  # skip header
                continue
            sql = '''INSERT INTO segments
                     (id, multiplicon, genome, list, first, last, ord)
                     VALUES (?,?,?,?,?,?,?)'''
            self._dbconn.execute(sql, row)
        self._dbconn.commit()
463953
public OutSegment openWriterSeq(long sequence)
  {
    int segmentSize = _segmentSizeNew;

    SegmentKelp segment = _segmentService.createSegment(segmentSize, getTableKey(), sequence);

    addTableSegmentLength(segmentSize);
    
    _activeSequenceSet.put(sequence, Boolean.TRUE);
    
    return new OutSegment(_table, _table.getTableService(), this, segment);
  }
82969
public void open() {
		Futures.transform(lcm, new Subscribe(subscriber));
		publishTask = Futures.transform(lcm, publisher);
	}