Override: Add tracking entry after a line_item is added or removed
191700
def after_add_or_remove(line_item, options = {})
      line_item = super
      Spree::Cart::Event::Tracker.new(
        actor: order, target: line_item, total: order.total, variant_id: line_item.variant_id
      ).track
      line_item
    end
1142769
function() {
    // Remove all rows from tracker
    var tracker = this._aSelections || [],
        recId,
        removed = [];
    for(var j=tracker.length-1; j>-1; j--) {
       if(lang.isString(tracker[j])){
            recId = tracker.splice(j,1);
            removed[removed.length] = this.getRecord(lang.isArray(recId) ? recId[0] : recId);
        }
    }

    // Update tracker
    this._aSelections = tracker;

    // Update UI
    this._unselectAllTrEls();

    this.fireEvent("unselectAllRowsEvent", {records: removed});
}
940879
def update(self):
        
        rec = self._c.find_one({}, {self._fld: 1}, sort=[(self._fld, -1)], limit=1)
        if rec is None:
            self._pos = self._empty_pos()
        elif not self._fld in rec:
            _log.error("Tracking field not found. field={} collection={}"
                       .format(self._fld, self._c.name))
            _log.warn("Continuing without tracking")
            self._pos = self._empty_pos()
        else:
            self._pos = {self._fld: rec[self._fld]}
        return self
61311
def add_track(self, track):
        
        if not hasattr(track, 'bars'):
            raise UnexpectedObjectError("Unexpected object '%s', "
                    "expecting a mingus.containers.Track object" % track)
        self.tracks.append(track)
        self.selected_tracks = [len(self.tracks) - 1]
46326
def add_line(self, line, source, *lineno):
        """"""
        self.result.append(line, source, *lineno)
359414
protected function addAddCart()
    {
        if (!$this->isError()) {
            $id = $this->cart->add($this->getSubmitted());
            if (empty($id)) {
                $this->errorAndExit($this->text('Unexpected result'));
            }
            $this->line($id);
        }
    }
1130529
public function it_tracks_a_line_after_2_deletions()
    {
        $this->deleteLine(new LineNumber(5));
        $this->deleteLine(new LineNumber(5));

        $this->trackLine(new LineNumber(7))->getNumber()->shouldReturn(5);
    }
18442
def addItemTag(self, item, tag):
        
        if self.inItemTagTransaction:
            # XXX: what if item's parent is not a feed?
            if not tag in self.addTagBacklog:
                self.addTagBacklog[tag] = []                
            self.addTagBacklog[tag].append({'i': item.id, 's': item.parent.id})
            return "OK"
        else:
            return self._modifyItemTag(item.id, 'a', tag)
954537
def add_tracker(wfid, action, tracker_id, conditions, msg)

      tracker_id ||= [
        'tracker', wfid, action,
        Ruote.generate_subid(conditions.hash.to_s + msg.hash.to_s)
      ].collect(&:to_s).join('_')

      conditions =
        conditions && conditions.remap { |(k, v), h| h[k] = Array(v) }

      doc = @context.storage.get_trackers

      doc['trackers'][tracker_id] =
        { 'wfid' => wfid,
          'action' => action,
          'id' => tracker_id,
          'conditions' => conditions,
          'msg' => msg }

      r = @context.storage.put(doc)

      add_tracker(wfid, action, tracker_id, conditions, msg) if r
        # the put failed, have to redo the work

      tracker_id
    end
288196
private void addNewTracks() {
//		System.out.println("----------- Adding new tracks ---------------");

		tracker.spawnTracks();
		List<PointTrack> spawned = tracker.getNewTracks(null);

		// estimate 3D coordinate using stereo vision
		for( PointTrack t : spawned ) {
			Point2D3DTrack p = t.getCookie();
			if( p == null) {
				t.cookie = p = new Point2D3DTrack();
			}

			// discard point if it can't localized
			if( !pixelTo3D.process(t.x,t.y) || pixelTo3D.getW() == 0 ) {
				tracker.dropTrack(t);
			} else {
				Point3D_F64 X = p.getLocation();

				double w = pixelTo3D.getW();
				X.set(pixelTo3D.getX() / w, pixelTo3D.getY() / w, pixelTo3D.getZ() / w);

				// translate the point into the key frame
				// SePointOps_F64.transform(currToKey,X,X);
				// not needed since the current frame was just set to be the key frame

				p.lastInlier = tick;
				pixelToNorm.compute(t.x, t.y, p.observation);
			}
		}
	}
574937
def on_add(self, widget, new_dict=False):
        "
        self.semantic_data_counter += 1
        treeiter, path = self.get_selected_object()

        value = dict() if new_dict else "New Value"

        # get target dict path
        if treeiter:
            target_dict_path_as_list = self.tree_store[path][self.ID_STORAGE_ID]
            if not self.tree_store[path][self.IS_DICT_STORAGE_ID]:
                target_dict_path_as_list.pop()
        else:
            target_dict_path_as_list = []

        # generate key
        target_dict = self.model.state.get_semantic_data(target_dict_path_as_list)
        new_key_string = generate_semantic_data_key(list(target_dict.keys()))
        self.model.state.add_semantic_data(target_dict_path_as_list, value, new_key_string)

        self.reload_tree_store_data()

        # jump to new element
        self.select_entry(target_dict_path_as_list + [new_key_string])
        logger.debug("Added new semantic data entry!")
        return True
904350
def add_or_update(self, row, value, kind):
        """"""
        i = bisect.bisect_left(self.keys, row)

        # Are we simply replacing a key?
        if i < len(self.keys) and self.keys[i].row == row:
            self.keys[i].update(value, kind)
        else:
            self.keys.insert(i, TrackKey(row, value, kind))
550628
def _track_modify(self, cls, name, detail, keep, trace):
        
        self._observers[cls].modify(name, detail, keep, trace)
64983
def updateEntry(self):
        
        # form up new entry
        title = str(self.wtitle.text())
        comment = str(self.comment_doc.toPlainText())
        # process comment string -- eliminate single newlines, make double-newlines into separate paragraphs
        # exception are paragraphs that start with "#LOG:", these get special treatment and the single newlines are
        # left intact
        pars = []
        for paragraph in comment.split("\n\n"):
            if paragraph.startswith("LOG:"):
                pars.append(paragraph.replace("\n", "<BR>"))
            else:
                pars.append(paragraph.replace("\n", " "))
        comment = "\n".join(pars)
        # go through data products and decide what to do with each one
        busy = Purr.BusyIndicator()
        # get list of DPs
        dps, updated = self.wdplv.buildDPList()
        # emit signal for all newly-created DPs
        for dp in dps:
            if not dp.archived:
                self.emit(SIGNAL("creatingDataProduct"), dp.sourcepath)
        # update or return new entry
        if self.entry:
            self.entry.update(title=title, comment=comment, dps=dps)
            self.entry.save(refresh_index=updated)
            return self.entry
        else:
            return Purr.LogEntry(time.time(), title, comment, dps)
819638
def enterEvent( self, event ):
        
        item = self.trackerItem()
        if ( item ):
            item.setVisible(True)
1219621
private void update() {
                if (!uptodate) {
                        summary.clear();
                        distinctTraces.clear();
                        traces.clear();
                        addTraces(allTraces, false);
                        uptodate = true;
                }
        }
1136819
function updateTrack( newList, oldList, steps,  rawNewValue, oldKeyMap ){
    
    for(var i =0, slen = steps.length; i < slen ;i++){
      var step = steps[i];
      switch( step.mode){
        case 0 : //remove
          removeRange(step.index, step.len, group.children, oldKeyMap);
          break;
        case 1 : //insert
          addRange(step.index, step.index + step.len, newList, rawNewValue, oldKeyMap )
          break;
      }
    }     
    var children = group.children;
    for(var j=1, len = children.length; j < len; j++){
      var child = children[j];
      if( child ){
        child.data[variable] = newList[j-1];
        child.data[indexName] = j-1
      }
    }

    
  }