Only runs when a model is selected with the default label, not with the custom label "trailing"
968269
function ( model ) {
                var trailing = this.collection.trailing && this.collection.trailing.id || this.collection.first().id,
                    view = this,

                    cbUpdateTrailing = function () {
                        view.collection.get( Math.round( this.trailingId ) ).select( { label: "trailing" } );
                    };

                // Animate the trailing element and make it catch up. Use the .select() method with the label
                // "trailing".
                $( { trailingId: trailing } ).animate(
                    { trailingId: model.id },
                    { step: cbUpdateTrailing, done: cbUpdateTrailing, duration: trailingLag }
                );
            }
361252
function onParsingComplete ()
  {
    // Validate defaultParam's value.
    $def = isset($this->props->defaultParam) ? $this->props->defaultParam : null;
    if (!empty($def)) {
      if (!$this->props->defines ($def))
        throw new ComponentException($this,
          "Invalid value for <kbd>defaultParam</kbd> on <b>&lt;{$this->getTagName()}></b>; parameter <kbd>$def</kbd> does not exist");

      // Move children to default parameter.
      if ($this->hasChildren ()) {
        $type = $this->props->getTypeOf ($def);
        if ($type != type::content && $type != type::metadata)
          throw new ComponentException($this, sprintf (
            "The macro's default parameter <kbd>$def</kbd> can't hold content because its type is <kbd>%s</kbd>.",
            type::getNameOf ($type)));

        $param = new Metadata($this->context, ucfirst ($def), $type);
        $this->props->set ($def, $param);
        $param->attachTo ($this);
        $param->setChildren ($this->getChildren ());
      }
    }
    elseif ($this->hasChildren ())
      throw new ComponentException ($this,
        'You may not specify content for this tag because it has no default property');
  }
1170374
private void labelIndicatorMouseExited(MouseEvent e) {
        JLabel label = ((JLabel) e.getSource());
        labelIndicatorSetColorsToDefaultState(label);
    }
876184
def register_for_app(
        self, app_label=None, exclude_models=None, exclude_model_classes=None
    ):
        
        models = []
        exclude_models = exclude_models or []
        app_config = django_apps.get_app_config(app_label)
        for model in app_config.get_models():
            if model._meta.label_lower in exclude_models:
                pass
            elif exclude_model_classes and issubclass(model, exclude_model_classes):
                pass
            else:
                models.append(model._meta.label_lower)
        self.register(models)
991891
function setDefault(levels, ecModel) {
    var globalColorList = ecModel.get('color');

    if (!globalColorList) {
        return;
    }

    levels = levels || [];
    var hasColorDefine;
    zrUtil.each(levels, function (levelDefine) {
        var model = new Model(levelDefine);
        var modelColor = model.get('color');

        if (model.get('itemStyle.color')
            || (modelColor && modelColor !== 'none')
        ) {
            hasColorDefine = true;
        }
    });

    if (!hasColorDefine) {
        var level0 = levels[0] || (levels[0] = {});
        level0.color = globalColorList.slice();
    }

    return levels;
}
155593
def submit(label, *args)
      options = args.extract_options!
      new_class = options[:class] || Bootstrap3FormBuilder.default_submit_style
      super(label, *(args << options.merge(:class => new_class)))
    end
487833
def model_changed(self, model, prop_name, info):
        

        # TODO: find nice solution
        # this in only required if the GUI is terminated via Ctrl+C signal
        if not self.view:
            # this means that the main window is currently under destruction
            return

        execution_engine = rafcon.core.singleton.state_machine_execution_engine
        label_string = str(execution_engine.status.execution_mode)
        label_string = label_string.replace("STATE_MACHINE_EXECUTION_STATUS.", "")
        self.view['execution_status_label'].set_text(label_string)

        current_execution_mode = execution_engine.status.execution_mode
        if current_execution_mode is StateMachineExecutionStatus.STARTED:
            self.view['step_buttons'].hide()
            self._set_single_button_active('button_start_shortcut')
        elif current_execution_mode is StateMachineExecutionStatus.PAUSED:
            self.view['step_buttons'].hide()
            self._set_single_button_active('button_pause_shortcut')
        elif execution_engine.finished_or_stopped():
            self.view['step_buttons'].hide()
            self._set_single_button_active('button_stop_shortcut')
        else:  # all step modes
            self.view['step_buttons'].show()
            self._set_single_button_active('button_step_mode_shortcut')
1246424
function labels (modelName, callback) {

    if (callback) {
        return get(modelName, true).getLabels(callback);
    }

    return get(modelName, true).getLabels();

}
674453
function handleRowColSelectionChange(rowOrCol) {
        var decoratorsField = ('_' + rowOrCol + 'SelectionClasses');
        model[decoratorsField].forEach(function (selectionDecorator) {
            grid.cellClasses.remove(selectionDecorator);
        });
        model[decoratorsField] = [];

        if (grid[rowOrCol + 'Model'].allSelected()) {
            var top = rowOrCol === 'row' ? Infinity : 0;
            var left = rowOrCol === 'col' ? Infinity : 0;
            var decorator = grid.cellClasses.create(top, left, 'selected', 1, 1, 'virtual');
            grid.cellClasses.add(decorator);
            model[decoratorsField].push(decorator);
        } else {
            grid[rowOrCol + 'Model'].getSelected().forEach(function (index) {
                var virtualIndex = grid[rowOrCol + 'Model'].toVirtual(index);
                var top = rowOrCol === 'row' ? virtualIndex : 0;
                var left = rowOrCol === 'col' ? virtualIndex : 0;
                var decorator = grid.cellClasses.create(top, left, 'selected', 1, 1, 'virtual');
                grid.cellClasses.add(decorator);
                model[decoratorsField].push(decorator);
            });
        }
    }
742142
def get_widget_label_for(self, fieldname, default=None):
        
        widget = self.get_widget_for(fieldname)
        if widget is None:
            return default
        return widget.label
1099704
def on_lstClassifications_itemSelectionChanged(self):
        
        self.clear_further_steps()
        classification = self.selected_classification()
        # Exit if no selection
        if not classification:
            return
        # Set description label
        self.lblDescribeClassification.setText(classification["description"])
        # Enable the next button
        self.parent.pbnNext.setEnabled(True)
1023661
function(attrs, options) {

            // begin lazo specific overrides
            var modelName = null;
            if (this.modelName) {
                if (_.isFunction(this.modelName)) {
                    modelName = this.modelName(attrs, options);
                }
                else {
                    modelName = this.modelName;
                }
            }
            // end lazo specific overrides

            if (attrs instanceof Backbone.Model) {
                if (!attrs.collection) attrs.collection = this;
                if (!attrs.name && modelName) attrs.name = modelName; // lazo specific
                return attrs;
            }
            options || (options = {});
            options.collection = this;

            // begin lazo specific overrides
            if (modelName) {
                options.name = modelName;
            }

            options.ctx = this.ctx;
            // end lazo specific overrides

            var model = new this.model(attrs, options);
            if (!model._validate(attrs, options)) {
                this.trigger('invalid', this, attrs, options);
                return false;
            }
            return model;
        }
239971
function(e) {
        var select = $(e.target),
            options = select.find('option'),
            opts = this.options,
            selected = [],
            label = [],
            self = this;

        // Fetch label from selected option
        options.each(function() {
            if (this.selected) {
                selected.push( this );
                label.push( self.readValue(this, opts.getOptionLabel) || this.textContent );
            }
        });

        // Reformat label if needed
        if (this.multiple) {
            var title = this.readValue(select, opts.getDefaultLabel),
                format = opts.multipleFormat,
                count = label.length;

            // Use default title if nothing selected
            if (!label.length && title) {
                label = title;

                // Display a counter for label
            } else if (format === 'count') {
                label = opts.countMessage
                    .replace('{count}', count)
                    .replace('{total}', options.length);

                // Display options as a list for label
            } else if (format === 'list') {
                var limit = opts.listLimit;

                label = label.splice(0, limit).join(', ');

                if (limit < count) {
                    label += ' ...';
                }
            }
        } else {
            label = label.join(', ');
        }

        // Set the label
        select.parent()
            .find(this.ns('label', 'select'))
            .text(label);

        this.fireEvent('change', [select.val(), selected]);
    }
1092275
private void onStartElement(QName name, XMLAttributes atts) {
    if (detecting) {
      detecting = false;
      loadDefaults();
    }
    if (defaults != null) {
      checkAndAddDefaults(name, atts);
    }
  }
1276501
function (model) {
            if (!this.ngModel) {
                return;
            }
            var index = this.selected.indexOf(model);
            if (index !== -1) {
                this.selected.splice(index, 1);
                if (this.multiple) {
                    this.ngModel.$setViewValue(this.selected);
                } else {
                    this.ngModel.$setViewValue(undefined);
                }
            }

        }
55028
def onLeftClickLabel(self, event):
        
        if event.Col == -1 and event.Row == -1:
            pass
        elif event.Col < 0:
            self.onSelectRow(event)
        elif event.Row < 0:
            self.drop_down_menu.on_label_click(event)
858688
function(options, select) {
                if (options.length === 0) {
                    return this.nonSelectedText;
                }
                else {
                    var selected = '';
                    var delimiter = this.delimiterText;

                    options.each(function () {
                        var label = ($(this).attr('label') !== undefined) ? $(this).attr('label') : $(this).text();
                        selected += label + delimiter;
                    });
                    return selected.substr(0, selected.length - 2);
                }
            }