LOADING FUNCTIONS
972026
private function loadWithSource($Source)
    {
        if (empty ($Source)) {
            return array();
        }
        if ($this->settingUseSyckIsPossible && function_exists ('syck_load')) {
            $array = syck_load (implode ('', $Source));

            return is_array($array) ? $array : array();
        }

        $this->path = array();
        $this->result = array();
        $cnt = count($Source);

        for ($i = 0; $i < $cnt; $i++) {
            $line = $Source[$i];

            $this->indent = strlen($line) - strlen(ltrim($line));
            $tempPath = $this->getParentPathByIndent($this->indent);
            $line = self::stripIndent($line, $this->indent);

            if (self::isComment($line)) {
                continue;
            }
            if (self::isEmpty($line)) {
                continue;
            }

            $this->path = $tempPath;
            $literalBlockStyle = self::startsLiteralBlock($line);

            if ($literalBlockStyle) {
                $line = rtrim ($line, $literalBlockStyle . " \n");
                $literalBlock = '';
                $line .= $this->LiteralPlaceHolder;
                $literal_block_indent = strlen($Source[$i+1]) - strlen(ltrim($Source[$i+1]));

                while (++$i < $cnt && $this->literalBlockContinues($Source[$i], $this->indent)) {
                    $literalBlock = $this->addLiteralLine(
                        $literalBlock, $Source[$i], $literalBlockStyle, $literal_block_indent
                    );
                }

                $i--;
            }

            while (++$i < $cnt && self::greedilyNeedNextLine($line)) {
                $line = rtrim($line, " \n\t\r") . ' ' . ltrim($Source[$i], " \t");
            }

            $i--;

            if (strpos($line, '#')) {
                if (strpos($line, '"') === false && strpos($line, "'") === false) {
                    $line = preg_replace('/\s+#(.+)$/','',$line);
                }
            }

            $lineArray = $this->parseLine($line);

            if ($literalBlockStyle) {
                $lineArray = $this->revertLiteralPlaceHolder ($lineArray, $literalBlock);
            }

            $this->addArray($lineArray, $this->indent);

            foreach ($this->delayedPath as $indent => $delayedPath) {
                $this->path[$indent] = $delayedPath;
            }

            $this->delayedPath = array();

        }

        return $this->result;
    }
275731
function _load()
    {
        $file = $this->_getFilePath();
        if (! file_exists($file) )
            ## nothing to import, no data written yet!
            return;

        ErrorStack::handleError(E_ALL);
        ##  \\\\\
        $data = include $file;
        $data = $this->getDataInterchange()->retrieveBackward($data);
        ##  /////
        if ( $exception = ErrorStack::handleDone() )
            throw new exReadError('Error While Read Data.', $exception->getCode(), $exception);


        if (! is_array($data) )
            throw new exDataMalformed('Error Data Structure, it must be array.');

        $this->data = $data;
    }
731363
def loading(self):
        """"""
        if getattr(self, '_initialized', False):
            raise ValueError("Already loading")
        self._initialized = False
        yield
        self._initialized = True
1297600
public void loadFunctions(CatalogContext catalogContext) {
        final CatalogMap<Function> catalogFunctions = catalogContext.database.getFunctions();
        // Remove obsolete tokens
        for (UserDefinedFunctionRunner runner : m_udfs.values()) {
            // The function that the current UserDefinedFunctionRunner is referring to
            // does not exist in the catalog anymore, we need to remove its token.
            if (catalogFunctions.get(runner.m_functionName) == null) {
                FunctionForVoltDB.deregisterUserDefinedFunction(runner.m_functionName);
            }
        }
        // Build new UDF runners
        ImmutableMap.Builder<Integer, UserDefinedFunctionRunner> builder =
                            ImmutableMap.<Integer, UserDefinedFunctionRunner>builder();
        for (final Function catalogFunction : catalogFunctions) {
            final String className = catalogFunction.getClassname();
            Class<?> funcClass = null;
            try {
                funcClass = catalogContext.classForProcedureOrUDF(className);
            }
            catch (final ClassNotFoundException e) {
                if (className.startsWith("org.voltdb.")) {
                    String msg = String.format(ORGVOLTDB_FUNCCNAME_ERROR_FMT, className);
                    VoltDB.crashLocalVoltDB(msg, false, null);
                }
                else {
                    String msg = String.format(UNABLETOLOAD_ERROR_FMT, className);
                    VoltDB.crashLocalVoltDB(msg, false, null);
                }
            }
            Object funcInstance = null;
            try {
                funcInstance = funcClass.newInstance();
            }
            catch (InstantiationException | IllegalAccessException e) {
                throw new RuntimeException(String.format("Error instantiating function \"%s\"", className), e);
            }
            assert(funcInstance != null);
            builder.put(catalogFunction.getFunctionid(), new UserDefinedFunctionRunner(catalogFunction, funcInstance));
        }

        loadBuiltInJavaFunctions(builder);
        m_udfs = builder.build();
    }
1132674
def load(self, *args, **kwargs):
        """"""
        self._generate_scene_func(self._scenes, 'load', False, *args, **kwargs)
579671
function preloader( items, preloadFunction, callback ) {

    var itemc = items.length;
    var loadc = 0;

    // called by preloadFunction to notify result
    function _check( err, id ) {
        updateProgress(1);
        if ( err ) {
            alert('Failed to load ' + id + ': ' + err);
        }
        loadc++;
        if ( itemc == loadc ) callback();
    }

    progressTotalCount += items.length;

    // queue each item for fetching
    items.forEach(function(item) {
        preloadFunction( item, _check);
    });
}
1136304
public function load()
    {
      $args = Ensure::Input(func_get_args());
      $props = $args->get();
      foreach ($props as $k => $prop)
        $this->{$k} = $prop;
    }
1104512
function loadJS(src, callback, attrs, timeout, fail, complete) {
    if ($.isObject(src)) {
        callback = src.callback;
        attrs = src.attrs;
        timeout = src.timeout;
        fail = src.fail;
        complete = src.complete;
        src = src.src;
        return loadJS(src, callback, attrs, timeout, fail, complete);
    }
    var script = document.createElement('script');
    var done = false;
    if ($.isObject(attrs)) {
        for (var i in attrs) {
            script.setAttribute(i, attrs[i]);
        }
    }
    var urls = getPath(src);
    src = script.src = urls[0];
    script.async = true;
    script.type = 'text/javascript';
    script.charset = defaultConfig.charset;
    complete = $.isFunction(complete) ? complete : emptyFn;
    script.onload = script.onreadystatechange = function(e) {
        e = e || cleanObj
        if (!done && (e.type === 'load' || /loaded|complete|undefined/.test(script.readyState))) {
            done = true;
            removeNode(script);
            mapLoaded[src] = 'loaded';
            $.isFunction(callback) && callback();
            complete('load');
        }
    };
    script.onerror = function() {
        done = true;
        mapLoaded[src] = 'error';
        $.isFunction(fail) && fail();
        complete('error');
    };
    timeout = $.isNumber(timeout) ? timeout : defaultConfig.timeout;
    if (timeout) {
        setTimeout(function() {
            if (!done) {
                done = true;
                mapLoaded[src] = 'timeout';
                complete('timeout');
            }
        }, timeout);
    }
    mapLoaded[src] = 'pending';
    head.insertBefore(script, base);
    return _;
}
1039743
function onload() {
		// Create pattern
		pattern = ctx.createPattern(img, params.repeat);
		// Run callback function if defined
		if (params.load) {
			params.load.call($canvases[0], pattern);
		}
	}
1287409
protected function loadFunctions() : void
    {
        $this->extendForTranslator();
        $this->extendForWidget();
        $this->extendForSiteUrl();
        $this->extendForGetUrl();
        $this->extendForQueryParams();
        $this->extendForPagination();
        $this->extendForVarDump();
    }
866955
function load()
    {
        $content = trim(file_get_contents($this->file));
        $this->data = explode("\n",$content);
    }
442636
function load (arr, fn) {
  function process (i) {
    if (!arr[i]) return fn();
    create(arr[i], function () {
      process(++i);
    });
  };

  process(0);
}
666450
function load(dirPath) {

    findFiles(dirPath, function(filePath){
        collection.push( require(filePath) );
    })

    function findFiles(dirPath, callback){
        fs.readdir(dirPath, function(err, files) {
            files.forEach(function(file){
                fs.stat(dirPath + '/' + file, function(err, stats) {
                    if(stats.isFile()) {
                        callback(dirPath + '/' + file);
                    }
                    if(stats.isDirectory()) {
                        getDirectoryFiles(dirPath + '/' + file, callback);
                    }
                });
            });
        });
    }
}
325557
public static void load(Context cx, Scriptable thisObj,
                            Object[] args, Function funObj)
    {
        Shell shell = (Shell)getTopLevelScope(thisObj);
        for (int i = 0; i < args.length; i++) {
            shell.processSource(cx, Context.toString(args[i]));
        }
    }
861775
function loadHooks() {
  var events = this._events;
  var jsFile = /\.js$/i;
  var hooksPath = this.fullPath('hook');
  var loadedHooks = [];
  if (fs.existsSync(hooksPath)) {
    var files = protos.util.ls(hooksPath, jsFile);
    for (var cb,idx,evt,file,len=files.length,i=0; i < len; i++) {
      file = files[i];
      evt = file.replace(jsFile, '');
      loadedHooks.push(evt);
      cb = protos.require(hooksPath + '/' + file, true);
      if (cb instanceof Function) {
        if (RELOADING) {
          var origCb = this.hooks[evt];
          if (origCb instanceof Function) {
            // Hook was added previously
            if (events[evt] instanceof Array) {
              idx = events[evt].indexOf(origCb);
              if (idx >= 0) {
                // If old function is in events array, replace it
                events[evt][idx] = this.hooks[evt] = cb;
              } else {
                // Otherwise, append to events array (add a new event handler)
                events[evt].push(cb);
                this.hooks[evt] = cb;
              }
            } else if (events[evt] instanceof Function) {
              if (events[evt] === origCb) {
                // If evt has only one callback, replace it
                events[evt] = this.hooks[evt] = cb;
              } else {
                // Otherwise, create an array with the old and new events
                events[evt] = [origCb, cb];
              }
            } // No else clause is needed here, it's either Function or Array
          } else {
            // This is a new event handler
            this.hooks[evt] = cb;
            this.on(evt, cb);
          }
        } else {
          // Add the event handler normally
          this.hooks[evt] = cb;
          this.on(evt, cb);
        }
      }
    }
  }

  // Remove any inexisting hooks
  for (evt in this.hooks) {
    if (loadedHooks.indexOf(evt) === -1) {
      app.removeListener(evt, this.hooks[evt]);
      delete this.hooks[evt];
    }
  }

}
960988
def init_functions(connection):
    """"""
    if settings.CFG["db"]["create_functions"]:
        print("Refreshing SQL functions...")
        for file in path.template_files("../sql/", exts=[".sql"]):
            func = sa.DDL(path.template_str(file))
            LOG.info("Loading: '%s' into database", file)
            connection.execute(func)
            connection.commit()
83028
final protected function _loadData()
    {
        if (!$this->isLoaded()) {
            $this->_object_set = new ArrayObject();
            foreach ($this->_getData() as $object) {
                $this->insert($object);
            }
        }
    }