Gets a default set of properties from the event
766628
def get_default_properties(event)
      client = event['client']
      check = event['check']
      {
        server_name: client['name'],
        server_ip: client['address'],
        subscriptions: client['subscriptions'].join(';'),
        environment: client['environment'],
        check_name: check['name'],
        check_command: check['command'],
        check_output: check['output'],
        timestamp: event['timestamp'].inspect
      }
    end
425248
function getSettings (def) {
  var settings = {}
  for (var s in def) {
    if (def.hasOwnProperty(s)) {
      if (s !== 'name' || s !== 'properties') {
        settings[ s ] = def[ s ]
      }
    }
  }
  return settings
}
65850
function defaults(obj, source) {
    obj = obj || {};

    for (var prop in source) {
        if (source.hasOwnProperty(prop) && obj[prop] === void 0) {
            obj[prop] = source[prop];
        }
    }

    return obj;
}
510042
def process_default(self, event):
        
        self._stats_lock.acquire()
        try:
            events = event.maskname.split('|')
            for event_name in events:
                count = self._stats.get(event_name, 0)
                self._stats[event_name] = count + 1
        finally:
            self._stats_lock.release()
246172
function (key) {
            var property = this.config[key.toLowerCase()];
            if (property && property.event) {
                return property.value;
            } else {
                return undefined;
            }
        }
75564
function defaultGetDefaultFieldNames(type) {
  // If this type cannot access fields, then return an empty set.
  if (!type.getFields) {
    return [];
  }

  const fields = type.getFields();

  // Is there an `id` field?
  if (fields['id']) {
    return ['id'];
  }

  // Is there an `edges` field?
  if (fields['edges']) {
    return ['edges'];
  }

  // Is there an `node` field?
  if (fields['node']) {
    return ['node'];
  }

  // Include all leaf-type fields.
  const leafFieldNames = [];
  Object.keys(fields).forEach(fieldName => {
    if (isLeafType(fields[fieldName].type)) {
      leafFieldNames.push(fieldName);
    }
  });
  return leafFieldNames;
}
464840
function() {

		var default_events = Lava.schema.system.DEFAULT_EVENTS,
			i = 0,
			count = default_events.length;

		for (; i < count; i++) {

			this._event_usage_counters[default_events[i]] = 1;
			this._initEvent(default_events[i]);

		}

	}
111099
def _prepare_defaults(self):
		""""""
		
		for name, field in self.__fields__.items():
			if field.assign:
				getattr(self, name)
1158977
@Override
    public int getDefaultPropertyIndex() {
        String defName = "";
        if ("".equals(defName)) {
            return -1;
        }
        PropertyDescriptor[] pd = getPropertyDescriptors();
        for (int i = 0; i < pd.length; i++) {
            if (pd[i].getName().equals(defName)) {
                return i;
            }
        }
        return -1;
    }
1101373
def GetDefault(self, container=None):
    """"""
    return rdfvalue.RDFBool(
        super(ProtoBoolean, self).GetDefault(container=container))
441908
@Nonnull
	private static Properties findDefaultProperties() {
		final InputStream in = SourceCodeFormatter.class.getClassLoader().getResourceAsStream(DEFAULT_PROPERTIES_PATH);
		final Properties p = new Properties();
		try {
			p.load(in);
		} catch (final IOException e) {
			throw new RuntimeException(String.format("Can not load resource %s", DEFAULT_PROPERTIES_PATH));
		}
		return p;
	}
568852
function defaults(options, defaultOptions) {
  options || (options = {});

  for (var opt in defaultOptions) {
    if (defaultOptions.hasOwnProperty(opt) && !options.hasOwnProperty(opt)) {
      options[opt] = defaultOptions[opt];
    }
  }

  return options;
}
906437
function () {
		var properties = this.properties;
		_.forEach(properties, function (prop, name) {
			prop = this.getProperty(name);
			this.stopListening(prop, EVENT_CHANGE);
		}, this);
	}
380701
@SuppressWarnings("checkstyle:regexp")
	public static void showDefaults() {
		final Properties defaultValues = new Properties();
		JanusConfig.getDefaultValues(defaultValues);
		NetworkConfig.getDefaultValues(defaultValues);
		try (OutputStream os = getConsoleLogger()) {
			defaultValues.storeToXML(os, null);
			os.flush();
		} catch (Throwable e) {
			e.printStackTrace();
		}
		getExiter().exit();
	}
1161158
function getDefaultProps() {
	return {
		data: [],
		rawdata: null, // Case you want to use your own inmutable data. Read prepareData() method for more info.
		indexed: null, // Case you want to use your own inmutable data. Read prepareData() method for more info.
		messages: messages,
		lang: 'ENG',
		rowFormater: null, // function to format values in render
		defaultSelection: null,
		hiddenSelection: null,
		multiSelect: false,
		listWidth: null,
		listHeight: 200,
		listRowHeight: 26,
		afterSelect: null, // Function Get selection and data
		afterSelectGetSelection: null, // Function Get just selection (no data)
		afterSearch: null,
		onEnter: null, // Optional - To do when key down Enter - SearchField
		fieldClass: null,
		listClass: null,
		listElementClass: null,
		className: null,
		placeholder: 'Search...',
		searchIcon: 'fa fa-search fa-fw',
		clearIcon: 'fa fa-times fa-fw',
		throttle: 160, // milliseconds
		minLength: 3,
		defaultSearch: null,
		autoComplete: 'off',
		idField: 'value',
		displayField: 'label',
		listShowIcon: true,
		filter: null, // Optional function (to be used when the displayField is an function too)
		filterField: null, // By default it will be the displayField
		allowsEmptySelection: false, // Put this to true to get a diferent ToolBar that allows select empty
	}
}
762146
function __getOwnPropertyValues(source) {
  var result = [];
  for (var name in source) {
    if (__hasOwnProperty(source, name)) {
      result.push(source[name]);
    }
  }
  return result;
}
415741
def event_info(self, event):
        """"""
        def default_func(event):
            return {}
        registry = {
                AxesImage : [pick_info.image_props],
                PathCollection : [pick_info.scatter_props, self._contour_info,
                                  pick_info.collection_props],
                Line2D : [pick_info.line_props, pick_info.errorbar_props],
                LineCollection : [pick_info.collection_props,
                                  self._contour_info,
                                  pick_info.errorbar_props],
                PatchCollection : [pick_info.collection_props,
                                   self._contour_info],
                PolyCollection : [pick_info.collection_props,
                                  pick_info.scatter_props],
                QuadMesh : [pick_info.collection_props],
                Rectangle : [pick_info.rectangle_props],
                }
        x, y = event.mouseevent.xdata, event.mouseevent.ydata
        props = dict(x=x, y=y, label=event.artist.get_label(), event=event)
        props['ind'] = getattr(event, 'ind', None)
        props['point_label'] = self._point_label(event)

        funcs = registry.get(type(event.artist), [default_func])

        # 3D artist don't share inheritance. Fall back to naming convention.
        if '3D' in type(event.artist).__name__:
            funcs += [pick_info.three_dim_props]

        for func in funcs:
            props.update(func(event))

        return props