Registers a JS file that needs to be included in the header of the HTML file,
but after jQuery and AngularJS.

@param library  The name of the sub-folder of the resources folder.
@param resource The name of the resource file within the library folder.
772352
public static void addResourceToHeadButAfterJQuery(String library, String resource) {
		addResource(resource, library, library + "#" + resource, RESOURCE_KEY);
	}
716981
private void readResource(Document.Resources.Resource resource)
   {
      Resource mpxjResource = m_projectFile.addResource();
      mpxjResource.setName(resource.getName());
      mpxjResource.setResourceCalendar(m_calendarMap.get(resource.getCalendarID()));
      mpxjResource.setStandardRate(new Rate(resource.getCost(), resource.getCostTimeUnit()));
      mpxjResource.setEmailAddress(resource.getEMail());
      mpxjResource.setGroup(resource.getGroup());
      //resource.getHyperlinks()
      mpxjResource.setUniqueID(resource.getID());
      //resource.getMarkerID()
      mpxjResource.setNotes(resource.getNote());
      mpxjResource.setID(Integer.valueOf(resource.getOutlineNumber()));
      //resource.getStyleProject()
      mpxjResource.setType(resource.getSubType() == null ? resource.getType() : resource.getSubType());
   }
1368688
function(resource) {
		var resource = Docs.escapeResourceName(resource);
		if (resource == '') {
			$('.resource ul.endpoints').slideUp();
			return;
		}

		$('li#resource_' + resource).removeClass('active');

		var elem = $('li#resource_' + resource + ' ul.endpoints');
		elem.slideUp();
	}
1115809
@OverrideOnDemand
  protected void addGlobalAndPerRequestCSSAndJS (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,
                                                 @Nonnull final HCHtml aHtml)
  {
    final boolean bRegular = HCSettings.isUseRegularResources ();
    final HCHead aHead = aHtml.head ();

    // Add configured and per-request CSS
    final ICommonsOrderedSet <ICSSPathProvider> aCSSs = PhotonCSS.getAllRegisteredCSSIncludesForGlobal ();
    PhotonCSS.getAllRegisteredCSSIncludesForThisRequest (aCSSs);

    // Add each CSS separately
    for (final ICSSPathProvider aCSS : aCSSs)
      aHead.addCSS (PhotonHTMLHelper.getCSSNode (aRequestScope, aCSS, bRegular));

    // Add all configured and per-request JS
    final ICommonsOrderedSet <IJSPathProvider> aJSs = PhotonJS.getAllRegisteredJSIncludesForGlobal ();
    PhotonJS.getAllRegisteredJSIncludesForThisRequest (aJSs);

    // Add each JS separately
    for (final IJSPathProvider aJS : aJSs)
      aHead.addJS (PhotonHTMLHelper.getJSNode (aRequestScope, aJS, bRegular));
  }

  /**
   * Overridable method to fill head and body.
   *
   * @param aRequestScope
   *        Current request scope
   * @param aHtml
   *        Created (empty) HTML node
   * @param aDisplayLocale
   *        The display locale of the current request
   */
  protected abstract void fillHeadAndBody (@Nonnull IRequestWebScopeWithoutResponse aRequestScope,
                                           @Nonnull HCHtml aHtml,
                                           @Nonnull Locale aDisplayLocale);

  @Nonnull
  public final HCHtml createHTML (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope) throws ForcedRedirectException
  {
    final Locale aDisplayLocale = RequestSettings.getDisplayLocale (aRequestScope);
    final IHCConversionSettingsToNode aConversionSettings = HCSettings.getConversionSettings ();

    // Create the surrounding HTML element
    final HCHtml aHtml = createHCHtml (aDisplayLocale);

    // Main content filling
    fillHeadAndBody (aRequestScope, aHtml, aDisplayLocale);

    // customize, finalize and extract resources
    // This must be done before the CSS and JS are included because per-request
    // resource registration happens inside
    HCRenderer.prepareForConversion (aHtml, aHtml.body (), aConversionSettings);

    // Add global and per-request CSS and JS
    addGlobalAndPerRequestCSSAndJS (aRequestScope, aHtml);

    // Extract and merge all inline out-of-band nodes
    if (aConversionSettings.isExtractOutOfBandNodes ())
    {
      final ICommonsList <IHCNode> aOOBNodes = aHtml.getAllOutOfBandNodesWithMergedInlineNodes ();
      aHtml.addAllOutOfBandNodesToHead (aOOBNodes);
    }

    // Merge all external CSS and JS nodes
    PhotonHTMLHelper.mergeExternalCSSAndJSNodes (aRequestScope,
                                                 aHtml.head (),
                                                 PhotonAppSettings.isMergeCSSResources (),
                                                 PhotonAppSettings.isMergeJSResources (),
                                                 PhotonAppManager.getWebSiteResourceBundleMgr ());

    // Move scripts to body? If so, after aggregation!
    if (HCSettings.isScriptsInBody ())
      aHtml.moveScriptElementsToBody ();

    // This is only required so that the additional CSS/JS nodes on the head get
    // the correct EHCNodeState
    if (false)
      HCRenderer.prepareForConversion (aHtml.head (), aHtml.body (), aConversionSettings);

    return aHtml;
  }

  @Override
  public String toString ()
  {
    return new ToStringGenerator (this).getToString ();
  }
}
293111
function( name, definition )
	{
		if ( this.registered[ name ] )
			throw '[CKEDITOR.resourceManager.add] The resource name "' + name + '" is already registered.';

		CKEDITOR.fire( name + CKEDITOR.tools.capitalize( this.fileName ) + 'Ready',
				this.registered[ name ] = definition || {} );
	}
345117
protected void setResource(CmsObject cms, CmsResource resource) {

        m_resource = CmsJspResourceWrapper.wrap(cms, resource);
    }
414555
public function addResource(string ...$resource)
    {
        foreach ($resource as $_resource)
        {
            $this->resourceRegistry->save($_resource);
        }
    }
1150339
public static void registerResource(Object resource, TaskManager tm) {
		if (resource == null) return;
		synchronized (resources) {
			resources.put(resource, tm);
		}
	}
161237
public void setResources(java.util.Collection<String> resources) {
        if (resources == null) {
            this.resources = null;
            return;
        }

        this.resources = new java.util.ArrayList<String>(resources);
    }
30481
private void handleConfigurableResources(FacesContext context,
                                             boolean provideJQuery,
                                             boolean provideBootstrap,
                                             List<UIComponent> resources,
                                             UIViewRoot view) {
        boolean isResourceAccepted;

        for (UIComponent resource : resources) {
            final String resourceLibrary = (String) resource.getAttributes().get("library");
            final String resourceName = (String) resource.getAttributes().get("name");
            isResourceAccepted = true;

            if (resourceName != null && CONFIGURABLE_LIBRARY_NAME.equals(resourceLibrary)) {
                if (!provideJQuery && resourceName.equals("butterfaces-third-party-jquery.js")) {
                    isResourceAccepted = false;
                } else if (!provideBootstrap && resourceName.equals("butterfaces-third-party-bootstrap.js")) {
                    isResourceAccepted = false;
                }
            }

            if (!isResourceAccepted)
                removeResource(context, resource, view);
        }
    }
284942
@Override
    public void addResource(String namespace, String service, Object resource) {
        ServiceEndPoint endPoint = toEndPoint(namespace, service, resource);
        _environment.lifecycle().manage(new ManagedRegistration(_serviceRegistry, endPoint));
        _environment.jersey().register(resource);
    }
1010682
protected void addJsFiles(JavaScriptObject files) {

        JsArray<CmsFileInfo> cmsFiles = files.cast();
        List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>();
        for (int i = 0; i < cmsFiles.length(); ++i) {
            fileObjects.add(cmsFiles.get(i));
        }
        addFiles(fileObjects);
    }
640449
private void initReader(Object obj) {
		if (obj instanceof WorkingDirectoryLocationAware) {
			((WorkingDirectoryLocationAware) obj).setWorkingDirectory(workingDirectory);
		}
		if (obj instanceof ServletContextAware) {
			((ServletContextAware) obj).setServletContext(servletContext);
		}

		if (obj instanceof ResourceBrowser) {
			if (obj instanceof ResourceGenerator) {
				resourceGeneratorInfoProviders.add(0, (ResourceBrowser) obj);
			} else {
				servletCtxResourceBrowser = (ResourceBrowser) obj;
			}
		}
	}
1033194
public function registerResource(Resources\Resource $resource)
  {
      $this->resources[strtolower($resource->getName())] = $resource;
  }
907496
public function setJSFromFile(string $filename, Scopable $scope = null, bool $relativeToRootPath = true): void
    {
        $this->jsElement = new HtmlFromFile($filename, $scope, $relativeToRootPath);
    }
1106029
public void setResources(java.util.Collection<Resource> resources) {
        if (resources == null) {
            this.resources = null;
            return;
        }

        this.resources = new java.util.ArrayList<Resource>(resources);
    }
399697
public void addCssResource(final ApplicationResource resource) {
		WApplicationModel model = getOrCreateComponentModel();
		if (model.cssResources == null) {
			model.cssResources = new ArrayList<>();
		} else if (model.cssResources.contains(resource)) {
			return;
		}
		model.cssResources.add(resource);
		MemoryUtil.checkSize(model.cssResources.size(), this.getClass().getSimpleName());
	}