Insert a single survey into a track
167463
public function insertAction()
    {
        if ($this->insertSnippets) {
            $params = $this->_processParameters($this->insertParameters);

            $this->addSnippets($this->insertSnippets, $params);
        }
    }
1050616
def add_sample(self, name, labels, value, timestamp=None, exemplar=None):
        """"""
        self.samples.append(Sample(name, labels, value, timestamp, exemplar))
1170427
def add_tracks(self, track):
        
        from trackhub import BaseTrack
        if isinstance(track, BaseTrack):
            self.add_child(track)
            self._tracks.append(track)
        else:
            for t in track:
                self.add_child(t)
                self._tracks.append(t)
45448
function init() {
  shift++;
  samples = new SamplePoints();
  samples.setBounds( new Rectangle( 25, 25 ).size( space.size.x - 25, space.size.y - 25 ), true );
  samples.poissonSampler( 6 ); // target 6px radius
}
891979
function(index) {
    var self = this;

    // Stop the current track.
    if (self.playlist[self.index].howl) {
      self.playlist[self.index].howl.stop();
    }

    // Reset progress.
    progress.style.width = '0%';

    // Play the new track.
    self.play(index);
  }
1092159
private void selectCandidateTracks() {
		// mark tracks in right frame that are active
		List<PointTrack> activeRight = trackerRight.getActiveTracks(null);
		for( PointTrack t : activeRight ) {
			RightTrackInfo info = t.getCookie();
			info.lastActiveList = tick;
		}

		int mutualActive = 0;
		List<PointTrack> activeLeft = trackerLeft.getActiveTracks(null);
		candidates.clear();
		for( PointTrack left : activeLeft ) {
			LeftTrackInfo info = left.getCookie();

//			if( info == null || info.right == null ) {
//				System.out.println("Oh Crap");
//			}

			// for each active left track, see if its right track has been marked as active
			RightTrackInfo infoRight = info.right.getCookie();
			if( infoRight.lastActiveList != tick ) {
				continue;
			}

			// check epipolar constraint and see if it is still valid
			if( stereoCheck.checkPixel(left, info.right) ) {
				info.lastConsistent = tick;
				candidates.add(left);
			}
			mutualActive++;
		}

//		System.out.println("Active Tracks: Left "+trackerLeft.getActiveTracks(null).size()+" right "+
//				trackerRight.getActiveTracks(null).size());
//		System.out.println("All Tracks:    Left "+trackerLeft.getAllTracks(null).size()+" right "+
//				trackerRight.getAllTracks(null).size());
//		System.out.println("Candidates = "+candidates.size()+" mutual active = "+mutualActive);
	}
887051
public void spawnTracksFromDetected() {
		// mark detected features with no matches as available
		FastQueue<AssociatedIndex> matches = associate.getMatches();

		int N = detector.getNumberOfFeatures();
		for( int i = 0; i < N; i++ )
			associated[i] = false;

		for( AssociatedIndex i : matches.toList() ) {
			associated[i.dst] = true;
		}

		// spawn new tracks for unassociated detected features
		for( int i = 0; i < N; i++ ) {
			if( associated[i])
				continue;

			Point2D_F64 p = detector.getLocation(i);

			TD d = detectedDesc.get(i);

			CombinedTrack<TD> track;

			if( tracksUnused.size() > 0 ) {
				track = tracksUnused.pop();
			} else {
				track = new CombinedTrack<>();
				track.desc = detector.createDescription();
				track.track = trackerKlt.createNewTrack();
			}

			// create the descriptor for tracking
			trackerKlt.setDescription((float)p.x,(float)p.y,track.track);
			// set track ID and location
			track.featureId = totalTracks++;
			track.desc.setTo(d);
			track.set(p);

			// update list of active tracks
			tracksPureKlt.add(track);
			tracksSpawned.add(track);
		}
	}
104673
def insert_one(self, document, **kwargs):
        
        self._arctic_lib.check_quota()
        return self._collection.insert_one(document, **kwargs)
287081
public void add(int position, SoundCloudTrack track) {
        if (mCurrentTrackIndex == -1) {
            mCurrentTrackIndex = 0;
        }
        mSoundCloudPlaylist.addTrack(position, track);
    }
134322
function (trackIndex, animation, loop, delay) {
		var entry = new spine.TrackEntry();
		entry.animation = animation;
		entry.loop = loop;
		entry.endTime = animation.duration;

		var last = this._expandToIndex(trackIndex);
		if (last) {
			while (last.next)
				last = last.next;
			last.next = entry;
		} else
			this.tracks[trackIndex] = entry;

		if (delay <= 0) {
			if (last)
				delay += last.endTime - this.data.getMix(last.animation, animation);
			else
				delay = 0;
		}
		entry.delay = delay;

		return entry;
	}
406293
def add(self, obj):
        
        obj.controller = self.controller
        # Is the track already loaded or created?
        track = self.tracks.get(obj.name)
        if track:
            if track == obj:
                return
            # hijack the track data
            obj.keys = track.keys
            obj.controller = track.controller
            self.tracks[track.name] = obj
            self.track_index[self.track_index.index(track)] = obj
        else:
            # Add a new track
            obj.controller = self.controller
            self.tracks[obj.name] = obj
            self.track_index.append(obj)
128134
def play_Track(self, track, channel=1, bpm=120):
        """"""
        self.notify_listeners(self.MSG_PLAY_TRACK, {'track': track, 'channel'
                              : channel, 'bpm': bpm})
        for bar in track:
            res = self.play_Bar(bar, channel, bpm)
            if res != {}:
                bpm = res['bpm']
            else:
                return {}
        return {'bpm': bpm}
308096
def set_nr_track(self, nr_track):
        
        self._set_attr(TRCK(encoding=3, text=str(nr_track)))
459963
def pockettopo2compass(txtfilename, exclude_splays=False, calculate_lrud=False):
    """"""
    print 'Converting PocketTopo data file %s ...' % txtfilename

    # Read our PocketTopo .TXT file, averaging triple-shots in the process
    infile = pockettopo.TxtFile.read(txtfilename, merge_duplicate_shots=True)

    cave_name = os.path.basename(txtfilename).rsplit('.', 1)[0].replace('_', ' ')
    outfilename = txtfilename.rsplit('.', 1)[0] + '.DAT'

    # Create the Compass DatFile in memory and start building, we'll write to file when done
    outfile = compass.DatFile(cave_name)

    for insurvey in infile:
        # Our Compass and PocketTopo Surveys are very similar...
        outsurvey = compass.Survey(
            insurvey.name, insurvey.date, comment=insurvey.comment, cave_name=cave_name, declination=insurvey.declination
        )
        outsurvey.length_units = 'M'
        outsurvey.passage_units = 'M'
        
        for inshot in insurvey:
            if inshot.is_splay and exclude_splays:
                continue  # skip

            # ...but the Shot data fields require some tweaking, see `shot2shot()` for details
            outshot = shot2shot(insurvey, inshot, calculate_lrud)
            outsurvey.add_shot(outshot)

        outfile.add_survey(outsurvey)

        # DEBUG
        #for station, splays in list(insurvey.splays.items()):
        #    print 'sta %s has %d splays' % (station, len(splays))

    # Finally all built, dump the whole DatFile/Surveys/Shots structure to file
    outfile.write(outfilename)
    print 'Wrote Compass data file %s .' % outfilename
393132
function encodeTrack(track) {
    var events = track.getEvents(), data = [],
        length = events.length, i,
        runningStatus = null, result;

    for (i = 0; i < length; i += 1) {
        result = encodeEvent(events[i], runningStatus);
        runningStatus = result.runningStatus;

        data[i] = result.data;
    }

    return encodeChunk('MTrk', buffer.Buffer.concat(data));
}
1325065
private void singleTableSimpleFiledInsert(ESSyncConfig config, Dml dml, Map<String, Object> data) {
        ESMapping mapping = config.getEsMapping();
        Map<String, Object> esFieldData = new LinkedHashMap<>();
        Object idVal = esTemplate.getESDataFromDmlData(mapping, data, esFieldData);

        if (logger.isTraceEnabled()) {
            logger.trace("Single table insert to es index, destination:{}, table: {}, index: {}, id: {}",
                config.getDestination(),
                dml.getTable(),
                mapping.get_index(),
                idVal);
        }
        esTemplate.insert(mapping, idVal, esFieldData);
    }
58078
def addTrack(self, track):
        
        # check state is valid
        self.__assertNotClosed()
        if track.kind not in ['audio', 'video']:
            raise InternalError('Invalid track kind "%s"' % track.kind)

        # don't add track twice
        self.__assertTrackHasNoSender(track)

        for transceiver in self.__transceivers:
            if transceiver.kind == track.kind:
                if transceiver.sender.track is None:
                    transceiver.sender.replaceTrack(track)
                    transceiver.direction = or_direction(transceiver.direction, 'sendonly')
                    return transceiver.sender

        transceiver = self.__createTransceiver(
            direction='sendrecv',
            kind=track.kind,
            sender_track=track)
        return transceiver.sender