inject <injects> into <values>
343825
def _random_inject(values, injects)
            used_indexes = {}
            count = injects.size > values.size ? values.size : injects.size
            (0...count).each do |i|
                inj = injects[i]
                times_inject = rand(values.size / injects.size / 10)
                times_inject = 1 if times_inject < 1
                times_inject.times do
                    rand_index = rand(values.size)
                    _loop do
                        break unless used_indexes.has_key? rand_index
                        rand_index = rand(values.size)
                    end
                    used_indexes[rand_index] = true
                    values[rand_index] = inj
                end
            end
        end
88344
function inject (taskKey) {
    var taskName = task[taskKey]

    try {
      var e = eval(taskName) // eslint-disable-line

      if (typeof e === 'function') {
        funcs[taskName] = e
      } else {
        funcs[taskName] = function () { return e }
      }
    } catch (err) {
      var msg = 'Task not compiled: ' + taskName + ' [' + taskKey + ']' + err
      throw new Error(msg)
    }
  }
138148
def attrs
      @attrs.inject({}) do |attrs, (key, value)|
        attrs.merge!(key => respond_to?(key) ? send(key) : value)
      end
    end
1004843
private ValueContainer[] addValues(ValueContainer[] target, ValueContainer[] source)
    {
        ValueContainer[] newArray;
        if(source != null && source.length > 0)
        {
            if(target != null)
            {
                newArray = new ValueContainer[target.length + source.length];
                System.arraycopy(target, 0, newArray, 0, target.length);
                System.arraycopy(source, 0, newArray, target.length, source.length);
            }
            else
            {
                newArray = source;
            }
        }
        else
        {
            newArray = target;
        }
        return newArray;
    }
1293497
function injectJs(jsList, content) {
        var script = jsList.reduce(function (prev, now) {
            var uri = now.uri;
            return [prev, '<script type="text/javascript" src="', uri, '"></script>\r\n'].join('');
        }, '');
        if (content.indexOf(settings.scriptTag) !== -1) {
            content = content.replace(settings.scriptTag, script);
        }
        else {
            content = content.replace(/<\/head>/, script + '\n$&');
        }
        return content;
    }
681738
function Injector(obj){
  var services = {};
  var get = name => {
    if(!(name in services)){
      const err = new Error(`[injector] service "${name}" not found`);
      return Promise.reject(err);
    }
    return services[name];
  };
  if(typeof obj === 'object')
    services = obj;
  if(typeof obj === 'function')
    get = obj;
  function resolve(name) {
    let service = get(name);
    if(typeof service === 'function')
      service = invoke(service);
    return service;
  };
  function invoke(fn, that){
    return Promise
    .all(getParameterNames(fn).map(resolve))
    .then(params => fn.apply(that, params));
  }
  return invoke;
}
671841
function add(values, value) {
  var self = this

  if (value) {
    self.map[values] = value
  } else {
    addAll(self.map, values)
  }

  return self
}
827650
def inject_context(self, __context_dict__=None, **context):
        
        context = context or __context_dict__
        self.context_keys |= set(context.keys())
        for key, value in context.items():
            setattr(self, key, value)
        for command in self.subcommands.values():
            command.inject_context(context)
1178298
function injectPreferences(currentEntitlements, pluginPreferences) {
  var newEntitlements = currentEntitlements;
  var content = generateAssociatedDomainsContent(pluginPreferences);

  newEntitlements[ASSOCIATED_DOMAINS] = content;

  return newEntitlements;
}
864719
function ValueMapper(input, options) {
  // Save input for later
  this.input = input;

  // Save placeholder middlewares
  this.middlewares = [];

  // Fallback options
  options = options || {};

  // Add each of the middlewares
  var middlewares = options.middlewares || [];
  middlewares.forEach(this.addMiddleware, this);
}
1368322
def inject(self, func, **kwargs):
        
        args, varargs, keywords, defaults = self._get_argspec(func)
        if defaults:
            required_args = args[:-len(defaults)]
            optional_args = args[len(required_args):]
        else:
            required_args = args
            optional_args = []
        values = [
            kwargs[arg] if arg in kwargs else self[arg]
            for arg in required_args
        ]
        if defaults:
            values.extend(
                kwargs[arg] if arg in kwargs else self.get(arg, default)
                for arg, default in zip(optional_args, defaults)
            )
        return func(*values)
20174
public static <T, R> R injectIntoTokens(
            String string,
            String separator,
            R injectedValue,
            Function2<R, String, R> function)
    {
        R result = injectedValue;
        for (StringTokenizer stringTokenizer = new StringTokenizer(string, separator); stringTokenizer.hasMoreTokens(); )
        {
            String token = stringTokenizer.nextToken();
            result = function.value(result, token);
        }
        return result;
    }
1030904
def inject(**bindings):
    

    def outer_wrapper(f):
        def function_wrapper(ff):
            for key, value in viewitems(bindings):
                bindings[key] = BindingKey(value)

            @functools.wraps(ff)
            def _inject(*args, **kwargs):
                inj = get_current_app().injector
                dependencies = inj.args_to_inject(
                    function=ff,
                    bindings=bindings,
                    owner_key=ff
                )
                dependencies.update(kwargs)
                try:
                    return ff(*args, **dependencies)
                except TypeError as e:
                    reraise(e, CallError(ff, args, dependencies, e))

            return _inject

        '''
        Just a convenience method - delegates everything to wrapper.
        '''

        def method_or_class_wrapper(*a, **kwargs):
            """
            Properly installs the injector into the object so that the injection can be performed.
            """
            inj = get_current_app().injector
            # Install injector into the self instance if this is a method call.
            inj.install_into(a[0])

            # Use the generic wrapper.
            inject_f = injector.inject(**bindings)
            # Call the method.
            return inject_f(f)(*a, **kwargs)

        if inspect.ismethod(f):
            return method_or_class_wrapper
        else:
            return function_wrapper(f)

    return outer_wrapper
1083388
def inject(self, inst, **renames):
        """"""
        if renames:
            di = self.clone(**renames)
        else:
            di = self
        pro = di._provides
        inst.__injections_source__ = di
        deps = getattr(inst, '__injections__', None)
        if deps:
            for attr, dep in deps.items():
                val = pro.get(dep.name)
                if val is None:
                    raise MissingDependencyError(dep.name)

                if not isinstance(val, dep.type):
                    raise TypeError("Wrong provider for {!r}".format(val))
                setattr(inst, attr, val)
        meth = getattr(inst, '__injected__', None)
        if meth is not None:
            meth()
        return inst
312306
def insert (self, properties, value):
        
        assert is_iterable_typed(properties, basestring)
        assert isinstance(value, basestring)
        self.__properties.append(properties)
        self.__values.append(value)
130991
def inject(*injections):
    ''''''
    def _decorate(func):
        def _decorated(*args, **kwargs):
            args = list(args)
            keys_to_inject = [name for name in injections if name not in kwargs]
            for key in keys_to_inject:
                kwargs[key] = get_current_scope().container.get(key)
            return func(*args, **kwargs)
        return _decorated
    return _decorate
782717
def convert(input, values = {})
      @map.inject(input) do |current, (pattern, expander)|
        params = pattern.params(current)
        params &&= Hash[values.merge(params).map { |k,v| [k.to_s, v] }]
        expander.expandable?(params) ? expander.expand(params) : current
      end
    end