ensure that control and library are loaded
187524
function getObjectFallback(oClassObject) {
				// some modules might not return a class definition, so we fallback to the global
				// this is against the AMD definition, but is required for backward compatibility
				if (!oClassObject) {
					Log.error("Control '" + sClassName + "' did not return a class definition from sap.ui.define.", "", "XMLTemplateProcessor");
					oClassObject = ObjectPath.get(sClassName);
				}
				if (!oClassObject) {
					Log.error("Can't find object class '" + sClassName + "' for XML-view", "", "XMLTemplateProcessor");
				}
				return oClassObject;
			}
949436
function() {
      'use strict';
      var controlName = util.determineArtifactName( this );
      this.controlDirname = util.determineArtifactDirName( this, path.join( 'includes', 'controls' ) );
      var laxarIntegrationTechnology = this.config.get( 'laxarIntegrationTechnology' ) || 'plain';

      this.placeholder = {
         name: controlName,
         angularDirectiveName: '',
         description: '',
         licenses: this.config.get( 'licenses' ),
         homepage: this.config.get( 'homepage' ),
         author: this.config.get( 'author' ),
         laxarIntegrationTechnology: laxarIntegrationTechnology,
         cssClassName: '',
         banner:  util.getBanner( this )
      };

      this.placeholder.dependencies = bowerDefaults.dependencies;
   }
1297638
public synchronized Object ensureControl()
    {
        if (_control == null)
        {
            //
            // See if the property map specifies an implementation class for the control; 
            // if not, use default binding.
            //

            String implBinding = null;
            BaseProperties bp = _properties.getPropertySet( BaseProperties.class );
            if ( bp != null )
                implBinding = bp.controlImplementation();
            else
                implBinding = ControlUtils.getDefaultControlBinding(_controlIntf);

            try
            {
                _implClass = _controlIntf.getClassLoader().loadClass(implBinding);

                //
                // Validate that the specified implementation class has an @ControlImplementation
                // annotation, else downstream requirements (such as having a valid control init
                // class) will not be met.
                //
                if (_implClass.getAnnotation(ControlImplementation.class) == null)
                {
                    throw new ControlException("@" + ControlImplementation.class.getName() + " annotation is missing from control implementation class: " + _implClass.getName());
                }
            }
            catch (ClassNotFoundException cnfe)
            {
                throw new ControlException("Unable to load control implementation: "  + implBinding, cnfe);
            }

            //
            // Cache the threading policy associated with the impl
            //
            Threading thr = (Threading)_implClass.getAnnotation(Threading.class);
            if ( thr != null )
                _threadingPolicy = thr.value();
            else
                _threadingPolicy = ThreadingPolicy.SINGLE_THREADED;    // default to single-threaded

            ensureThreadingBehaviour();

            try
            {
                //
                // Create and initialize the new instance
                //
                _control = _implClass.newInstance();

                try
                {
                    /*
                    Run the ImplInitializer.  This class is code generated based on metadata from a control
                    implementation.  If a Control implementation declares event handlers for the
                    ControlBeanContext or for the ResourceContext, executing this code generated class
                    will add the appropriate LifeCycle and / or Resource event listeners.
                     */
                    getImplInitializer().initialize(this, _control);
                    _hasServices = true;
                }
                catch (Exception e)
                {
                    throw new ControlException("Control initialization failure", e);
                }

                //
                // Once the control is initialized, then allow the associated context
                // to do any initialization.
                //
                ControlBeanContext cbcs = getBeanContextProxy();

                /*
                Implementation note: this call will run the LifeCycleListener(s) that have
                been wired-up to the ControlBeanContext object associated with this ControlBean.
                */
                cbcs.initializeControl();
            }
            catch (RuntimeException re) {
                // never mask RuntimeExceptions
                throw re;
            }
            catch (Exception e)
            {
                throw new ControlException("Unable to create control instance", e);
            }
        }

        //
        // If the implementation instance does not currently have contextual services, they
        // are lazily restored here.
        //
        if (!_hasServices)
        {
            getImplInitializer().initServices(this, _control);
            _hasServices = true;
        }

        return _control;
    }
89113
function(){
		if(shuttingDown == true)
			return;
		modules.logger.log("startup","ISNode System > Loading Dependencies...");
		loadCriticalModules();
		loadNonCriticalModules();
		loadInterfaceModules();
		startEventLoop();
		return true;
	}
1024216
void ensurePrestart() {
        int wc = workerCountOf(ctl.get());
        if (wc < corePoolSize)
            addWorker(null, true);
        else if (wc == 0)
            addWorker(null, false);
    }
578923
def _bind(self):
        """"""

        handlers = self.handlers

        # Main window events
        self.Bind(wx.EVT_MOVE, handlers.OnMove)
        self.Bind(wx.EVT_SIZE, handlers.OnSize)
        self.Bind(self.EVT_CMD_FULLSCREEN, handlers.OnToggleFullscreen)

        # Content changed event, adjusts title bar with star
        self.Bind(self.EVT_CONTENT_CHANGED, handlers.OnContentChanged)

        # Program state events

        self.Bind(self.EVT_CMD_TITLE, handlers.OnTitle)
        self.Bind(self.EVT_CMD_SAFE_MODE_ENTRY, handlers.OnSafeModeEntry)
        self.Bind(self.EVT_CMD_SAFE_MODE_EXIT, handlers.OnSafeModeExit)
        self.Bind(wx.EVT_CLOSE, handlers.OnClose)
        self.Bind(self.EVT_CMD_CLOSE, handlers.OnClose)
        self.Bind(self.EVT_SPELL_CHECK, handlers.OnSpellCheckToggle)

        # Preferences events

        self.Bind(self.EVT_CMD_PREFERENCES, handlers.OnPreferences)
        self.Bind(self.EVT_CMD_NEW_GPG_KEY, handlers.OnNewGpgKey)

        # Toolbar toggle events

        self.Bind(self.EVT_CMD_MAINTOOLBAR_TOGGLE,
                  handlers.OnMainToolbarToggle)
        self.Bind(self.EVT_CMD_MACROTOOLBAR_TOGGLE,
                  handlers.OnMacroToolbarToggle)
        self.Bind(self.EVT_CMD_WIDGETTOOLBAR_TOGGLE,
                  handlers.OnWidgetToolbarToggle)
        self.Bind(self.EVT_CMD_ATTRIBUTESTOOLBAR_TOGGLE,
                  handlers.OnAttributesToolbarToggle)
        self.Bind(self.EVT_CMD_FIND_TOOLBAR_TOGGLE,
                  handlers.OnFindToolbarToggle)
        self.Bind(self.EVT_CMD_ENTRYLINE_TOGGLE,
                  handlers.OnEntryLineToggle)
        self.Bind(self.EVT_CMD_MACROPANEL_TOGGLE,
                  handlers.OnMacroPanelToggle)
        self.Bind(self.EVT_CMD_TABLELIST_TOGGLE,
                  handlers.OnTableListToggle)
        self.Bind(aui.EVT_AUI_PANE_CLOSE, handlers.OnPaneClose)

        # File events

        self.Bind(self.EVT_CMD_NEW, handlers.OnNew)
        self.Bind(self.EVT_CMD_OPEN, handlers.OnOpen)
        self.Bind(self.EVT_CMD_SAVE, handlers.OnSave)
        self.Bind(self.EVT_CMD_SAVEAS, handlers.OnSaveAs)
        self.Bind(self.EVT_CMD_IMPORT, handlers.OnImport)
        self.Bind(self.EVT_CMD_EXPORT, handlers.OnExport)
        self.Bind(self.EVT_CMD_EXPORT_PDF, handlers.OnExportPDF)
        self.Bind(self.EVT_CMD_APPROVE, handlers.OnApprove)
        self.Bind(self.EVT_CMD_CLEAR_GLOBALS, handlers.OnClearGlobals)

        # Find events
        self.Bind(self.EVT_CMD_FOCUSFIND, handlers.OnFocusFind)

        # Format events
        self.Bind(self.EVT_CMD_FONTDIALOG, handlers.OnFontDialog)
        self.Bind(self.EVT_CMD_TEXTCOLORDIALOG, handlers.OnTextColorDialog)
        self.Bind(self.EVT_CMD_BGCOLORDIALOG, handlers.OnBgColorDialog)

        # Print events

        self.Bind(self.EVT_CMD_PAGE_SETUP, handlers.OnPageSetup)
        self.Bind(self.EVT_CMD_PRINT_PREVIEW, handlers.OnPrintPreview)
        self.Bind(self.EVT_CMD_PRINT, handlers.OnPrint)

        # Edit Events
        self.Bind(self.EVT_CMD_SELECT_ALL, handlers.OnSelectAll)

        # Clipboard events

        self.Bind(self.EVT_CMD_CUT, handlers.OnCut)
        self.Bind(self.EVT_CMD_COPY, handlers.OnCopy)
        self.Bind(self.EVT_CMD_COPY_RESULT, handlers.OnCopyResult)
        self.Bind(self.EVT_CMD_PASTE, handlers.OnPaste)
        self.Bind(self.EVT_CMD_PASTE_AS, handlers.OnPasteAs)

        # Help events

        self.Bind(self.EVT_CMD_MANUAL, handlers.OnManual)
        self.Bind(self.EVT_CMD_TUTORIAL, handlers.OnTutorial)
        self.Bind(self.EVT_CMD_FAQ, handlers.OnFaq)
        self.Bind(self.EVT_CMD_PYTHON_TURORIAL, handlers.OnPythonTutorial)
        self.Bind(self.EVT_CMD_DEPENDENCIES, handlers.OnDependencies)
        self.Bind(self.EVT_CMD_ABOUT, handlers.OnAbout)

        self.Bind(self.EVT_CMD_MACROREPLACE, handlers.OnMacroReplace)
        self.Bind(self.EVT_CMD_MACROEXECUTE, handlers.OnMacroExecute)
        self.Bind(self.EVT_CMD_MACROLOAD, handlers.OnMacroListLoad)
        self.Bind(self.EVT_CMD_MACROSAVE, handlers.OnMacroListSave)
167565
async function loadModulesConfig()
{
    if(!modulesLoaded)
    {
		for (let i = 0; i < modules.length; i++) {
			await applyBotDataSource(modules[i]);
        }
        
        modulesLoaded = true;
    }
}
822274
public boolean load(String name, boolean verify) {
        boolean loaded;

        try {
            System.loadLibrary(name);
            loaded = true;
        } catch (Throwable e) {
            loaded = false;
        }

        return loaded;
    }
395034
function OnBoardingCtrl($scope, $location, $rootScope, $window, $timeout, $sce, 
                        _bind, _req, _modules, _socket) {

  /****************************************************************************/
  /* INITIALIZATION                                                           */
  /****************************************************************************/
  /* Handhsaking [modules] */
  _socket.emit('handshake', 'modules');

  _socket.on('modules', function(state) {
      //console.log('========================================');
      //console.log(JSON.stringify(state, null, 2));
      //console.log('----------------------------------------');
    $scope.modules = state;
    if($scope.modules && $scope.modules.length > 0) {
      $scope.modules.forEach(function(m) {
        if(m.name === 'mod_strip') {
          if(m.installing) {
            if(m.install_status === 'dependencies') {
              $scope.step1_download_done = true;
            }
          }
        }
      });
    }
  });

  /****************************************************************************/
  /* STEPS                                                                    */
  /****************************************************************************/
  $scope.done_step0 = function() {

    $scope.step1_error = null;
    var to_install = ['mod_strip', 'mod_stats'];

    /* Detection of current state. */
    var module = {};

    if($scope.modules && $scope.modules.length > 0) {
      $scope.modules.forEach(function(m) {
        if(to_install.indexOf(m.name) !== -1) {
          module[m.name] = m;
        }
      });
    }

    /* Install to_install modules */
    async.series([
      function(cb_) {
        async.each(to_install, function(m, cb_) {
          if(module[m]) {
            return cb_();
          }
          _modules.add('github:breach/' + m).then(function(data) {
            module[m] = data.module;
            return cb_();
          }, function(reason) { return cb_(reason); });
        }, cb_);
      },
      function(cb_) {
        $scope.step1_add_done = true;
        async.each(to_install, function(m, cb_) {
          _modules.install(module[m].path).then(function(data) {
            return cb_();
          }, function(reason) { return cb_(reason); });
        }, cb_);
      },
      function(cb_) {
        $scope.step1_dependencies_done = true;
        async.each(to_install, function(m, cb_) {
          if(module[m].running) {
            return cb_();
          }
          _modules.run(module[m].path).then(function(data) {
            return cb_();
          }, function(reason) { return cb_(reason); });
        }, cb_);
      }
    ], function(err) {
      if(err) {
        $scope.step1_error = err.split(' at')[0];
      }
      else {
        $scope.step1_run_done = true;
      }
    });

    $('.onboarding').addClass('step-1');
    $('.onboarding').removeClass('step-0');
  };

  $scope.done_step1 = function() {
    $('.onboarding').addClass('step-2');
    $('.onboarding').removeClass('step-1');
  };

  $scope.done_step2 = function() {
    $('.onboarding').addClass('step-3');
    $('.onboarding').removeClass('step-2');
  };

  $scope.done_step3 = function() {
    $('.onboarding').addClass('step-4');
    $('.onboarding').removeClass('step-3');
  };

  $scope.done_step4 = function() {
    $location.path('/');
  };
}
686524
def load_library_handle(libname, path):
    """"""

    if path is None or path in ['None', 'none']:
        # Either could not find a library via ctypes or
        # user-configuration-file, or we could not find it in any of the
        # default locations, or possibly the user intentionally does not want
        # one of the libraries to load.
        return None

    try:
        if os.name == "nt":
            opj_lib = ctypes.windll.LoadLibrary(path)
        else:
            opj_lib = ctypes.CDLL(path)
    except (TypeError, OSError):
        msg = 'The {libname} library at {path} could not be loaded.'
        msg = msg.format(path=path, libname=libname)
        warnings.warn(msg, UserWarning)
        opj_lib = None

    return opj_lib
1008000
private void ensureFxmlLoaderInitialized() {

		if (fxmlLoader != null) {
			return;
		}

		fxmlLoader = loadSynchronously(resource, bundle);
		presenterProperty.set(fxmlLoader.getController());
	}
793681
def _IOC(cls, dir, op, structure=None):
        
        control = cls(dir, op, structure)

        def do(dev, **args):
            return control(dev, **args)
        return do
1261471
def bind(cls, app, *paths, methods=None, name=None, view=None):
        """"""
        # Register self in admin
        if view is None:
            app.ps.admin.register(cls)
            if not paths:
                paths = ('%s/%s' % (app.ps.admin.cfg.prefix, name or cls.name),)
            cls.url = paths[0]
        return super(AdminHandler, cls).bind(app, *paths, methods=methods, name=name, view=view)
697964
def require_self(func, *args, **kwargs):
    """"""

    try:
        __import__(package['name'])
    except ImportError:
        sys.stderr.write(
            "This component needs to be installed first. Run " +
            "`invoke install`\n")
        sys.exit(1)
    return func(*args, **kwargs)
1194665
def c_loadlib(self):
        """"""
        name = self._c_base_var()
        kernel32 = 'windll->kernel32.'
        if self.name == 'kernel32':
            loadlib = '{} = get_kernel32_base();\n'.format(
                'kernel32' if self.opts.no_structs
                else kernel32 + self.opts.base
            )
        else:
            loadlib = '{} = {}LoadLibraryA({}{});\n'.format(
                name,
                '' if self.opts.no_structs else kernel32,
                self.opts.prefix, self.name
            )
        return loadlib + self._c_null_check(name)
896283
static void load(final String lib)
   {
      AccessController.doPrivileged(new PrivilegedAction<Object>() 
      {
         public Object run()
         {
            System.load(lib);
            return null;
         }
      });
   }
182925
def ready(self, source):
        """"""

        from hfos.database import configschemastore
        configschemastore[self.name] = self.configschema

        self._start_server()

        if not self.insecure:
            self._drop_privileges()

        self.fireEvent(cli_register_event('components', cli_components))
        self.fireEvent(cli_register_event('drop_privileges', cli_drop_privileges))
        self.fireEvent(cli_register_event('reload_db', cli_reload_db))
        self.fireEvent(cli_register_event('reload', cli_reload))
        self.fireEvent(cli_register_event('quit', cli_quit))
        self.fireEvent(cli_register_event('info', cli_info))