Method: configureLayers
As soon as all the layers are loaded, cycle through them and
hide or show them.
515823
function() {

        if (this.layers.length == this.map.layers.length) { 
            this.map.events.unregister('addlayer', this, this.configureLayers);

            for(var i=0, len=this.layers.length; i<len; i++) {
                
                var layer = this.map.layers[i];
                var c = this.layers.charAt(i);
                
                if (c == "B") {
                    this.map.setBaseLayer(layer);
                } else if ( (c == "T") || (c == "F") ) {
                    layer.setVisibility(c == "T");
                }
            }
        }
    }
1277524
protected function loadConfig()
    {
        $this->hook->trigger(self::HOOK_LOAD_CONFIG_BEFORE);
        $this->config->load();
        $this->hook->trigger(self::HOOK_LOAD_CONFIG_AFTER);
    }
1069008
def set_widgets(self):
        """"""
        on_the_fly_metadata = {}
        layer_purpose = self.parent.step_kw_purpose.selected_purpose()
        on_the_fly_metadata['layer_purpose'] = layer_purpose['key']
        if layer_purpose != layer_purpose_aggregation:
            subcategory = self.parent.step_kw_subcategory.\
                selected_subcategory()
            if layer_purpose == layer_purpose_exposure:
                on_the_fly_metadata['exposure'] = subcategory['key']
            if layer_purpose == layer_purpose_hazard:
                on_the_fly_metadata['hazard'] = subcategory['key']
        inasafe_fields = self.parent.get_existing_keyword(
            'inasafe_fields')
        inasafe_default_values = self.parent.get_existing_keyword(
            'inasafe_default_values')
        on_the_fly_metadata['inasafe_fields'] = inasafe_fields
        on_the_fly_metadata['inasafe_default_values'] = inasafe_default_values
        self.field_mapping_widget.set_layer(
            self.parent.layer, on_the_fly_metadata)
        self.field_mapping_widget.show()
        self.main_layout.addWidget(self.field_mapping_widget)
258502
public synchronized void clear() {
		_layerCache.clear();
		_moduleCache.clear();
		_gzipCache.clear();
		for (IGenericCache cache : _namedCaches.values()) {
			cache.clear();
		}
	}
933604
public void initGradientsView() {
        try (MemoryWorkspace ws = Nd4j.getMemoryManager().scopeOutOfWorkspaces()) {
            if (layers == null)
                init();

            int nLayers = layers.length;

            //First: Work out total length of params
            long paramLength = 0;
            val nParamsPerLayer = new long[nLayers];
            for (int i = 0; i < nLayers; i++) {
                NeuralNetConfiguration conf = layerWiseConfigurations.getConf(i);
                nParamsPerLayer[i] = conf.getLayer().initializer().numParams(conf);
                paramLength += nParamsPerLayer[i];
            }

            if(paramLength > 0) {
                flattenedGradients = Nd4j.create(flattenedParams.dataType(), new long[]{1, paramLength}, 'f'); //No need to initialize, as each layer will do it each iteration anyway
            }

            long paramsSoFar = 0;
            for (int i = 0; i < layers.length; i++) {
                if (nParamsPerLayer[i] == 0)
                    continue; //This layer doesn't have any parameters...
                INDArray thisLayerGradView = flattenedGradients.get(NDArrayIndex.interval(0,0,true),
                        NDArrayIndex.interval(paramsSoFar, paramsSoFar + nParamsPerLayer[i]));
                layers[i].setBackpropGradientsViewArray(thisLayerGradView);
                paramsSoFar += nParamsPerLayer[i];
            }
        }
    }
1154165
public function toggleAll()
    {
        Project::all()->each(function ($project) {
            $this->enableProject(!$project->enabled, $project);
        });
    }
509034
def swapConfigPanels(self, event):
        
        for id, panel in enumerate(self.configPanels):
            panel.Hide()
        self.activeSelection = event.Selection
        self.configPanels[event.Selection].Show()
        self._parent.Layout()
692796
function() {
          module.debug('Toggling pop-up');
          if( module.is.hidden() ) {
            module.hideAll();
            module.show();
          }
          else {
            module.hide();
          }
        }
696225
public function loadConfigurations(): void
	{
		foreach ($this->plugins as $plugin) {
			$plugin['inst']->setupPlugin($plugin['config']);
			$plugin['inst']->loadPluginConfiguration();
		}
	}
1355205
function() {
        for (var i=0, len=this.layers.length; i<len; i++) {
            var layer = this.layers[i];
            this.setLayerZIndex(layer, i);
        }
    }
994330
function() {
            var layers = this.children,
                len = layers.length,
                n;

            for(n = 0; n < len; n++) {
                layers[n].clear();
            }
            return this;
        }
1336541
public void configure() {
	  if (configurator != null && !underConfiguration.get() &&
			  underConfiguration.compareAndSet(false, true)) {
		 try {
			  configurator.configure(this);
		 } finally {
			 underConfiguration.set(false);
		 }
	  }
  }
1234901
public function onConfigUpdated()
    {
        parent::onConfigUpdated();

        if (($order = ini_get('request_order')) || ($order = ini_get('variables_order'))) {
            $this->variablesOrder = $order;
        } else {
            $this->variablesOrder = null;
        }
    }
338398
function(config) {
        _cleanup();

        if (!config) config = {};

        _global = config.global || {};
        _partners = config.partners || {};

        if (!_loaded) _loaded = true;
        this.trigger('dynamicConfigChanged');
      }
876280
function(visible) {
        var cache = OpenLayers.Layer.Google.cache[this.map.id];
        var map = this.map;
        if (cache) {
            var type = this.type;
            var layers = map.layers;
            var layer;
            for (var i=layers.length-1; i>=0; --i) {
                layer = layers[i];
                if (layer instanceof OpenLayers.Layer.Google &&
                            layer.visibility === true && layer.inRange === true) {
                    type = layer.type;
                    visible = true;
                    break;
                }
            }
            var container = this.mapObject.getDiv();
            if (visible === true) {
                if (container.parentNode !== map.div) {
                    if (!cache.rendered) {
                        var me = this;
                        google.maps.event.addListenerOnce(this.mapObject, 'tilesloaded', function() {
                            cache.rendered = true;
                            me.setGMapVisibility(me.getVisibility());
                            me.moveTo(me.map.getCenter());
                        });
                    } else {
                        map.div.appendChild(container);
                        cache.googleControl.appendChild(map.viewPortDiv);
                        google.maps.event.trigger(this.mapObject, 'resize');
                    }
                }
                this.mapObject.setMapTypeId(type);                
            } else if (cache.googleControl.hasChildNodes()) {
                map.div.appendChild(map.viewPortDiv);
                map.div.removeChild(container);
            }
        }
    }
1183632
private synchronized static void initConfigs() {
        for (int i = 0; i < moduleIDs.length; i++) {
            // add module configs one by one
            //addModuleInfo(moduleIDs[i] + modulePrefix);
            // don't do validation since in pre-defined module
            getConfigFromXMLFile(getXmlFileName(modulePrefix + moduleIDs[i]), true, false);
        }
    }
901200
private function initializeOnDemand()
    {
        if ($this->initialized === false) {
            $this->arrayConfig->setData($this->configMapper->fetchAll());
            $this->initialized = true;
        }
    }