Initialize a Guard.
 @param [Hash] options the custom Guard options
 Call once when Guard starts. Please override initialize method to init stuff.
 @raise [:task_has_failed] when start has failed
186170
def start
      throw([:task_has_failed], "Guard::RemoteSync options invalid") unless options_valid?
      Guard::Compat::UI.info "Guard::RemoteSync started in source directory '#{File.expand_path @source.directory}'"
      Guard::Compat::UI.notify("Guard::RemoteSync is running in directory #{File.expand_path @source.directory}", notifier_options)
      if @command.test
        @command.sync if options[:sync_on_start]
      else
        throw([:task_has_failed], "Guard::RemoteSync rsync failed, please check your configurations, directories, permissions, and maybe even your ssh details ( set up a public key possibly )")
      end

    end
253616
private static void init(ClassLoader classLoader, SecurityManager securityManager, Set<String> securedClasses) {
		if (classLoader == null)
			throw new IllegalArgumentException("A class loader must be provided");
		
		if (securityManager == null)
			throw new IllegalArgumentException("A security manager must be provided");
		
		if (securedClasses == null)
			throw new IllegalArgumentException("Secured classes cannot be null");
		
		Security.securityManager = securityManager;

		ClassPool cp = ClassPool.getDefault();

		for (String securedClass : securedClasses) {
			secure(classLoader, cp, securedClass);
		}
	}
1036108
function(options) {
      self.consoleLog('sync - init called');

      self.config = JSON.parse(JSON.stringify(self.defaults));
      for (var i in options) {
        self.config[i] = options[i];
      }

      //prevent multiple monitors from created if init is called multiple times
      if(!self.init_is_called){
        self.init_is_called = true;
        self.datasetMonitor();
      }
      defaultCloudHandler.init(self.config.cloudUrl, self.config.cloudPath);
    }
135504
protected function init()
    {
        $this->addOption('d')
            ->alias('delay')
            ->defaultValue(0)
            ->description('Delay time for failed job to wait next run.');

        $this->addOption('a')
            ->alias('all')
            ->defaultValue(false)
            ->description('Retry all failed jobs.');
    }
1324508
function init() {
    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

    dayStartsAt = options.dayStartsAt || DEFAULT_DAY_STARTS_AT;
    nightStartsAt = options.nightStartsAt || DEFAULT_NIGHT_STARTS_AT;
  }
118857
function(options) {
        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
        this.events = new OpenLayers.Events(this);
    }
381045
function init(grid) {
      options = $.extend(true, {}, _defaults, options);
      _grid = grid;
      if (options.enableForCells) _grid.onMouseEnter.subscribe(handleMouseEnter);
      if (options.enableForHeaderCells) _grid.onHeaderMouseEnter.subscribe(handleHeaderMouseEnter);
    }
984176
function(options) {
  // task id
  this.id = -1;

  // task name
  this.name = options.name || sNoTaskName;

  // task has no parent
  this.parent = options.parent || null;

  // save run function
  this.run = options.run;

  // create a queue of subtasks to run
  this.subtasks = [];

  // error flag
  this.error = false;

  // state of the task
  this.state = READY;

  // number of times the task has been blocked (also the number
  // of permits needed to be released to continue running)
  this.blocks = 0;

  // timeout id when sleeping
  this.timeoutId = null;

  // no swap time yet
  this.swapTime = null;

  // no user data
  this.userData = null;

  // initialize task
  // FIXME: deal with overflow
  this.id = sNextTaskId++;
  sTasks[this.id] = this;
  if(sVL >= 1) {
    forge.log.verbose(cat, '[%s][%s] init', this.id, this.name, this);
  }
}
569621
void init() {
		if (! isEnabled()) {
			loggerConfig.info("Ted prime instance check is disabled");
			return;
		}
		this.primeTaskId = context.tedDaoExt.findPrimeTaskId();

		int periodMs = context.config.intervalDriverMs();
		this.postponeSec = (int)Math.round((1.0 * periodMs * TICK_SKIP_COUNT + 500 + 500) / 1000); // 500ms reserve, 500 for rounding up

		becomePrime();

		loggerConfig.info("Ted prime instance check is enabled, primeTaskId={} isPrime={} postponeSec={}", primeTaskId, isPrime, postponeSec);
		initiated = true;
	}
1138038
def initialize_copy(other)
      @trigger_group = other
      @triggers = nil
      @chained_calls = []
      @errors = []
      @warnings = []
      @options = @options.dup
      @options.delete(:name) # this will be inferred (or set further down the line)
      @options.each do |key, value|
        @options[key] = value.dup rescue value
      end
    end
135631
function(options) {
      options = options || { };

      this.callSuper('initialize', options);

      this.set('rx', options.rx || 0);
      this.set('ry', options.ry || 0);

      this.set('width', this.get('rx') * 2);
      this.set('height', this.get('ry') * 2);
    }
1014956
def init_options_parser(options)
      OptionParser.new do |opts|
        opts.banner = "Usage:\n"\
        "\tsshez add <alias> (role@host) [options]\n"\
        "\tsshez connect <alias>\n"\
        "\tsshez remove <alias>\n\tsshez list\n"\
        "\tsshez reset\n"
        opts.separator ''
        opts.separator 'Specific options:'
        options_for_add(opts, options)
        # signals that we are in testing mode
        opts.on('-t', '--test', 'Writes nothing') {options.test = true}
        common_options(opts, options)
      end # OptionParser.new
    end
315754
static public function initialize()
    {
        if (!self::$_instance) {
            $cn = get_called_class();
            self::$_instance = new $cn();
            self::$_instance->name = substr($cn, 0, strpos($cn, '\\'));
        }
        self::$_instance->boot();
        
        if (Rails::cli())
            Rails::console()->run();
    }
656004
function StateManager(options) {
    // Initial state is pending
    this.state = states.pending;

    // If a state is passed in, then we go ahead and initialize the state manager with it
    if (options && options.state) {
      this.transition(options.state, options.value, options.context);
    }
  }
1100054
@SuppressWarnings("unchecked")
	@Override
	public void initialize() {
		// grab a handle to the hash table from the iteration broker
		if (taskContext instanceof AbstractIterativePactTask) {
			AbstractIterativePactTask<?, ?> iterativeTaskContext = (AbstractIterativePactTask<?, ?>) taskContext;
			String identifier = iterativeTaskContext.brokerKey();
			this.hashTable = (CompactingHashTable<IT1>) SolutionSetBroker.instance().get(identifier);
		} else {
			throw new RuntimeException("The task context of this driver is no iterative task context.");
		}
		
		TypeSerializer<IT1> buildSideSerializer = hashTable.getBuildSideSerializer();
		TypeComparator<IT1> buildSideComparator = hashTable.getBuildSideComparator().duplicate();
		
		probeSideSerializer = taskContext.<IT2>getInputSerializer(0).getSerializer();
		probeSideComparator = taskContext.getInputComparator(0);
		
		solutionSideRecord = buildSideSerializer.createInstance();
		
		TypePairComparatorFactory<IT1, IT2> pairCompFactory = taskContext.getTaskConfig().getPairComparatorFactory(taskContext.getUserCodeClassLoader());
		pairComparator = pairCompFactory.createComparator21(buildSideComparator, probeSideComparator);
	}
1091281
function init(options) {
    self.email = options.email;
    self.key = options.token;
    self.cloudflareClient = new CloudFlareClient(options.email, options.token);
  }
733763
protected void init() {
        log.debug("taskworker {} initializing...", this);

        scheduleVisibilityTimeoutExtender(task, new Date(), task.getVisibilityTimeout());

        log.debug("taskworker {} initialized", this);
        initialized = true;

    }