Modify settings of a tracked class
550628
def _track_modify(self, cls, name, detail, keep, trace):
        
        self._observers[cls].modify(name, detail, keep, trace)
1342950
def track(*fields):
    
    def inner(cls):
        _track_class(cls, fields)
        _add_get_tracking_url(cls)
        return cls
    return inner
918103
def class_type_changed(self):
        
        if self.source_path.text():
            self.reset_avaliable(self.source_path.text())
277292
public void setTracking (boolean track)
    {
        if (track != _tracking) {
            _tracking = track;
            if (track) {
                _seenKeys = new HashSet<K>();
                _misses = _hits = 0;

                // oh boy, but to properly track we need to clear the hash
                clear();
            } else {
                _seenKeys = null;
            }
        }
    }
11047
function updateMarks(editor, diff, state, type, classes) {
    var vp = editor.getViewport();
    editor.operation(function() {
      if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {
        clearMarks(editor, state.marked, classes);
        markChanges(editor, diff, type, state.marked, vp.from, vp.to, classes);
        state.from = vp.from; state.to = vp.to;
      } else {
        if (vp.from < state.from) {
          markChanges(editor, diff, type, state.marked, vp.from, state.from, classes);
          state.from = vp.from;
        }
        if (vp.to > state.to) {
          markChanges(editor, diff, type, state.marked, state.to, vp.to, classes);
          state.to = vp.to;
        }
      }
    });
  }
604809
private void addPathsWithUnknownChangedSize(ChangesItem changesItem, ItemState state)
   {
      if (!state.isPersisted() && (state.isDeleted() || state.isRenamed()))
      {
         String itemPath = getPath(state.getData().getQPath());

         for (String trackedPath : quotaPersister.getAllTrackedNodes(rName, wsName))
         {
            if (itemPath.startsWith(trackedPath))
            {
               changesItem.addPathWithUnknownChangedSize(itemPath);
            }
         }
      }
   }
1169998
function modify(modifier, source, index, shift) {
  if (
    !this.isEnabled() &&
    source === Emitter.sources.USER &&
    !this.allowReadOnlyEdits
  ) {
    return new Delta();
  }
  let range = index == null ? null : this.getSelection();
  const oldDelta = this.editor.delta;
  const change = modifier();
  if (range != null) {
    if (index === true) {
      index = range.index; // eslint-disable-line prefer-destructuring
    }
    if (shift == null) {
      range = shiftRange(range, change, source);
    } else if (shift !== 0) {
      range = shiftRange(range, index, shift, source);
    }
    this.setSelection(range, Emitter.sources.SILENT);
  }
  if (change.length() > 0) {
    const args = [Emitter.events.TEXT_CHANGE, change, oldDelta, source];
    this.emitter.emit(Emitter.events.EDITOR_CHANGE, ...args);
    if (source !== Emitter.sources.SILENT) {
      this.emitter.emit(...args);
    }
  }
  return change;
}
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);
			}
		}
	}
1034177
def tunable(self, obj):
        """"""
        self.tune = dict()
        if 'tune' in obj:
            for tunable in MOUNT_TUNABLES:
                tunable_key = tunable[0]
                map_val(self.tune, obj['tune'], tunable_key)
                if tunable_key in self.tune and \
                   is_vault_time(self.tune[tunable_key]):
                    vault_time_s = vault_time_to_s(self.tune[tunable_key])
                    self.tune[tunable_key] = vault_time_s

        if 'description'in obj:
            self.tune['description'] = obj['description']
561071
def update_course_settings(self, course_id, allow_student_discussion_editing=None, allow_student_discussion_topics=None, allow_student_forum_attachments=None, allow_student_organized_groups=None, hide_distribution_graphs=None, hide_final_grades=None, home_page_announcement_limit=None, lock_all_announcements=None, restrict_student_future_view=None, restrict_student_past_view=None, show_announcements_on_home_page=None):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - course_id
        """ID"""
        path["course_id"] = course_id

        # OPTIONAL - allow_student_discussion_topics
        """Let students create discussion topics"""
        if allow_student_discussion_topics is not None:
            data["allow_student_discussion_topics"] = allow_student_discussion_topics

        # OPTIONAL - allow_student_forum_attachments
        """Let students attach files to discussions"""
        if allow_student_forum_attachments is not None:
            data["allow_student_forum_attachments"] = allow_student_forum_attachments

        # OPTIONAL - allow_student_discussion_editing
        """Let students edit or delete their own discussion posts"""
        if allow_student_discussion_editing is not None:
            data["allow_student_discussion_editing"] = allow_student_discussion_editing

        # OPTIONAL - allow_student_organized_groups
        """Let students organize their own groups"""
        if allow_student_organized_groups is not None:
            data["allow_student_organized_groups"] = allow_student_organized_groups

        # OPTIONAL - hide_final_grades
        """Hide totals in student grades summary"""
        if hide_final_grades is not None:
            data["hide_final_grades"] = hide_final_grades

        # OPTIONAL - hide_distribution_graphs
        """Hide grade distribution graphs from students"""
        if hide_distribution_graphs is not None:
            data["hide_distribution_graphs"] = hide_distribution_graphs

        # OPTIONAL - lock_all_announcements
        """Disable comments on announcements"""
        if lock_all_announcements is not None:
            data["lock_all_announcements"] = lock_all_announcements

        # OPTIONAL - restrict_student_past_view
        """Restrict students from viewing courses after end date"""
        if restrict_student_past_view is not None:
            data["restrict_student_past_view"] = restrict_student_past_view

        # OPTIONAL - restrict_student_future_view
        """Restrict students from viewing courses before start date"""
        if restrict_student_future_view is not None:
            data["restrict_student_future_view"] = restrict_student_future_view

        # OPTIONAL - show_announcements_on_home_page
        """Show the most recent announcements on the Course home page (if a Wiki, defaults to five announcements, configurable via home_page_announcement_limit)"""
        if show_announcements_on_home_page is not None:
            data["show_announcements_on_home_page"] = show_announcements_on_home_page

        # OPTIONAL - home_page_announcement_limit
        """Limit the number of announcements on the home page if enabled via show_announcements_on_home_page"""
        if home_page_announcement_limit is not None:
            data["home_page_announcement_limit"] = home_page_announcement_limit

        self.logger.debug("PUT /api/v1/courses/{course_id}/settings with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("PUT", "/api/v1/courses/{course_id}/settings".format(**path), data=data, params=params, no_data=True)
13442
function (obj) {
                var t = shared.tracker.getTracker(obj);
                t.tc().disable++;
                // Loop old props to find any to delete
                var oldProps = shared.utils.cloneArray(t.type().props());
                var newProps = Object.keys(obj);
                for(var i = 0; i < oldProps.length; i++) {
                    if(!obj.hasOwnProperty(oldProps[i]) || !shared.tracker.isPropTracked(obj, oldProps[i])) {
                        t.addDelete(obj, oldProps[i]);
                    } else {
                        // Remove any old ones for next step
                        var idx = newProps.indexOf(oldProps[i]);
                        newProps[idx] = null;
                    }
                }
                // Add any new props
                for(var i = 0; i < newProps.length; i++) {
                    if(newProps[i] !== null) {
                        t.addNew(obj, newProps[i], obj[newProps[i]]);
                        t.track(obj, newProps[i]);
                    }
                }
                if(t.hasChanges()) {
                    t.uprev(obj);
                }
                t.tc().disable--;
            }
1159373
def update(cls, settings):
        """"""
        for key, val in settings.__dict__.items():
            if key.startswith('_'):
                continue
            setattr(cls, key, val)
1090599
protected function updateReflectionData()
    {
        $this->log(sprintf('Found %s classes whose reflection data was not cached previously.', count($this->updatedReflectionData)), LogLevel::DEBUG);

        foreach (array_keys($this->updatedReflectionData) as $className) {
            $this->statusCache->set($this->produceCacheIdentifierFromClassName($className), '');
        }

        $data = [];
        $propertyNames = [
            'classReflectionData',
            'classSchemata',
            'annotatedClasses',
            'classesByMethodAnnotations'
        ];

        foreach ($propertyNames as $propertyName) {
            $data[$propertyName] = $this->$propertyName;
        }

        $this->reflectionDataCompiletimeCache->set('ReflectionData', $data);
    }
449038
private void updateDraggablePanelStateDelayed(DraggableState draggableState) {
    Handler handler = new Handler();
    switch (draggableState) {
      case MAXIMIZED:
        handler.postDelayed(new Runnable() {
          @Override public void run() {
            draggablePanel.maximize();
          }
        }, DELAY_MILLIS);
        break;
      case MINIMIZED:
        handler.postDelayed(new Runnable() {
          @Override public void run() {
            draggablePanel.minimize();
          }
        }, DELAY_MILLIS);
        break;
      case CLOSED_AT_LEFT:
        handler.postDelayed(new Runnable() {
          @Override public void run() {
            draggablePanel.setVisibility(View.GONE);
            draggablePanel.closeToLeft();
          }
        }, DELAY_MILLIS);
        break;
      case CLOSED_AT_RIGHT:
        handler.postDelayed(new Runnable() {
          @Override public void run() {
            draggablePanel.setVisibility(View.GONE);
            draggablePanel.closeToRight();
          }
        }, DELAY_MILLIS);
        break;
      default:
        draggablePanel.setVisibility(View.GONE);
        break;
    }
  }
635853
def change_class(self):
        
        self.toolbarcenterframe.config(text="Draw: {}".format(self.config.solar_class_name[self.solar_class_var.get()]))
881889
def _track(self, class_name):
        """"""
        if self._test_cases.get(class_name) is None:
            if self.streaming and self.header:
                self._write_test_case_header(class_name, self.stream)

            self._test_cases[class_name] = []
            if self.combined:
                self.combined_test_cases_seen.append(class_name)
115810
def begin_track(tuning, padding=2):
    """"""
    # find longest shorthand tuning base
    names = [x.to_shorthand() for x in tuning.tuning]
    basesize = len(max(names)) + 3

    # Build result
    res = []
    for x in names:
        r = ' %s' % x
        spaces = basesize - len(r)
        r += ' ' * spaces + '||' + '-' * padding
        res.append(r)
    return res