Change the strategies
769062
public static function setStrategies(array $strategies = null)
    {
        self::$factory = null;
        self::$factories = [];
        self::$strategies = $strategies;
    }
1235399
public void setInputLocalStrategy(int inputNum, LocalStrategy strategy) {
		this.config.setInteger(INPUT_LOCAL_STRATEGY_PREFIX + inputNum, strategy.ordinal());
	}
966873
public function change()
    {
        $table = $this->table('saved_searches');
        $table->changeColumn('type', 'string', [
            'default' => null,
            'limit' => 255,
            'null' => true,
        ]);
        $table->update();
    }
80659
def _run_strategies_for(scope, args) #:nodoc:
      self.winning_strategy = @winning_strategies[scope]
      return if winning_strategy && winning_strategy.halted?

      # Do not run any strategy if locked
      return if @locked

      if args.empty?
        defaults   = @config[:default_strategies]
        strategies = defaults[scope] || defaults[:_all]
      end

      (strategies || args).each do |name|
        strategy = _fetch_strategy(name, scope)
        next unless strategy && !strategy.performed? && strategy.valid?

        strategy._run!
        self.winning_strategy = @winning_strategies[scope] = strategy
        break if strategy.halted?
      end
    end
884709
def inherit_strategy(strategy)
      AvoDeploy::Deployment.instance.log.debug "Loading deployment strategy #{strategy.to_s}..."

      strategy_file_path = File.dirname(__FILE__) + "/strategy/#{strategy.to_s}.rb"

      if File.exist?(strategy_file_path)
        require strategy_file_path
      else
        raise RuntimeError, "The requested strategy '#{strategy.to_s}' does not exist"
      end
    end
128996
public function guessStrategy()
    {
        $strategy = new RsyncStrategy();

        if ($this->getEnvOption('releases', false)) {
            $strategy = new ReleasesStrategy();
        }

        $strategy->setRuntime($this);
        return $strategy;
    }
298625
public function change()
    {
        $table = $this->table('languages');
        $table->addColumn('is_rtl', 'boolean', [
            'default' => false,
            'null' => false,
        ]);
        $table->addColumn('trashed', 'datetime', [
            'default' => null,
            'null' => true,
        ]);
        $table->changeColumn('is_active', 'boolean', [
            'default' => true,
            'null' => false,
        ]);
        $table->renameColumn('short_code', 'code');
        $table->removeColumn('description');
        $table->update();
    }
65970
def invalidate(strategy, value = nil)
      (value = strategy; strategy = :id) unless strategy.is_a?(Symbol)
      # call the invalidate method of the chosen strategy
      @strategy_by_attribute[strategy].invalidate(value) if @strategy_by_attribute[strategy]
    end
427949
protected function prepareStrategies()
    {
        $strategy = new Strategy\AppConfigStrategy();
        $strategy->setObjectManager($this->objectManager);

        $this->addStrategy('AppConfig', $strategy);
    }
121667
public function setSaveStrategy($strategy)
    {
        if (!in_array($strategy, [self::SAVE_APPEND, self::SAVE_REPLACE])) {
            $msg = sprintf('Invalid save strategy "%s"', $strategy);
            throw new InvalidArgumentException($msg);
        }

        $this->_saveStrategy = $strategy;

        return $this;
    }
1030383
def strategy=(classifier)
      is_interchangeable?(classifier)
      if @strategy && classifier.category_count == 0
        previous_strategy = @strategy
        @strategy = classifier
        convert_categories_with_docs(previous_strategy)
      else
        @strategy = classifier
      end
    end
451658
public function change() {
		$table = $this->table('queued_tasks');

		$table->changeColumn('status', 'string', [
		    'length' => 255,
			'null' => true,
			'default' => null,
		]);

		$table->save();
	}
293064
protected function applyStrategies(\Jb\Bundle\TagCloudBundle\Model\TagCloud $tagCloud)
    {
        foreach ($this->strategies as $strategy) {
            $strategy->process($tagCloud);
        }
    }
798356
function Strategy(transports, options) {
  var strategy = this;

  if (!(strategy instanceof Strategy)) return new Strategy(transports, options);
  if (Object.prototype.toString.call(transports) !== '[object Array]') {
    options = transports;
    transports = [];
  }

  strategy.transports = [];     // List of active transports.
  strategy.transport = 0;       // Current selected transport id.
  strategy.length = 0;          // Amount of transports available.
  strategy.id = 0;              // ID generation pool.

  for (var i = 0; i < transports.length; i++) {
    strategy.push(transports[i]);
  }
}
21455
private void setStrategy(final ClassRealm realm, final Strategy strategy) {
        assert realm != null;
        assert strategy != null;

        try {
            Field field = realm.getClass().getDeclaredField("strategy");

            try {
                field.set(realm, strategy);
            }
            catch (IllegalAccessException ignore) {
                // try again
                field.setAccessible(true);

                try {
                    field.set(realm, strategy);
                }
                catch (IllegalAccessException e) {
                    throw new IllegalAccessError(e.getMessage());
                }
            }
        }
        catch (NoSuchFieldException e) {
            throw new Error(e);
        }
    }
42145
public function change()
    {
        $table = $this->table('notices');
        $table->addColumn('author', 'string', array('limit' => 16))
              ->addColumn('text', 'integer')
              ->addColumn('start_time', 'datetime')
              ->addColumn('end_time', 'datetime')
              ->addColumn('hidden', 'boolean', array('null' => false, 'default' => 0))
              ->addColumn('frontpage', 'boolean', array('null' => false, 'default' => 1))
              ->addColumn('sort_order', 'integer')
              ->create();

        $table->addForeignKey('text', 'text_story', 'id', array('delete'=> 'CASCADE', 'update'=> 'CASCADE'))
              ->addForeignKey('author', 'user', 'user', array('delete'=> 'CASCADE', 'update'=> 'CASCADE'))
              ->save();

    }
711196
function(map, terms) {
    for (var i = 0, l = terms.length; i < l; i++) {
        var curTerm = terms[i];
        map = map[curTerm];
        if (!map || curTerm === map) {
            return false; // no change
        } else if (isString(map)) {
            applyChange(terms, map, i);
            return true;
        }
    }
    // if we reach this place, it is a directory
    applyChange(terms, map['.'] || "index.js", terms.length);
    return true;
}