Load a layer configuration object
@method setWiring
@param {Object} wiring layer configuration
326624
function(wiring) {
      this.clear();
      var i;
      if(YAHOO.lang.isArray(wiring.containers)) {
         for(i = 0 ; i < wiring.containers.length ; i++) {
            this.addContainer(wiring.containers[i]);
         }
      }
      if(YAHOO.lang.isArray(wiring.wires)) {
         for(i = 0 ; i < wiring.wires.length ; i++) {
            this.addWire(wiring.wires[i]);
         }
       }
   }
309806
function() {

    this.childspawn = null;
    this.connected = false;
    this.uncertain = false;
    this.config = null;
    this.debug = true;
}
288398
function reload() {
  eval($("#layerdef").val());

  // refresh buttons
  var t = '';
  for(var i=1;i<net.layers.length-1;i++) { // ignore input and regression layers (first and last)
    var butid = "button" + i;
    t += "<input id=\""+butid+"\" value=\"" + net.layers[i].layer_type +"\" type=\"submit\" onclick=\"updateLix("+i+")\" style=\"width:80px; height: 30px; margin:5px;\";>";
  }
  $("#layer_ixes").html(t);
  $("#button"+lix).css('background-color', '#FFA');
}
41308
function run_wiring(wiring, req, res, format) {
	
	 var filteredParams = req.query;
	// TODO
    /*filteredParams = params.dup
    filteredParams.delete("id")
    filteredParams.delete("action")
    filteredParams.delete("controller")
    filteredParams.delete("callback")
    filteredParams.delete("format")*/
	
	
	mySimpleflowRunWithActivity(wiring, req.current_user._id, format, "web", 
			filteredParams, false, req.wiring_collection, function(results) {
		
				if(format == "html") {
					// Reder the template
					if( !!wiring.template && !req.param("notemplate") ) {
						res.header('Content-Type', wiring.template_content_type);
						var output;
						try {
							output = ejs.render(wiring.template, {
								locals: {
									results: results,
									params: filteredParams
								}
							});
						} catch(ex) {
							output = "Error in your template: "+ex.message;
						}
						res.send(output);

					} 
					// Render the result of the "outputField" variable as a html document
					else if( req.param('outputField') ) {
						res.header('Content-Type', "text/html");
						if(results.hasOwnProperty(req.param('outputField'))) {
							res.send( results[req.param('outputField')] );
						}
						else {
							res.send( "No field called "+req.param('outputField') );
						}
			       }
				    else {
						// render run.ejs
						res.render('wirings/run', {
					        locals: {
									title: "Wiring "+wiring.name,
									action: "wirings",
									wiring: wiring,
									params: filteredParams,
									results: results
					        }
					    });
					}
				}
				/*else if(format == "xml") {
				}*/
				else if(format == "json") {
					
					if(req.param("callback")) {
						res.header('Content-Type', 'text/javascript');
						
						res.send("if(typeof "+req.param("callback")+" == 'function') {"+
									req.param("callback")+"("+JSON.stringify(results)+");} else {\n"+
									"if (typeof console!== 'undefined' && typeof console.log !== 'undefined'){\n"+
									"console.log('Error: Callback method not defined');}	}");
					}
					else {
						res.header('Content-Type', 'application/json');
						res.send(JSON.stringify(results));
					}
				}
				/*else if(format == "txt") {
					if results.keys.size == 1
						if results.values[0].is_a?(String)
							render :text => results.values[0]
							return
						end
					else
						# TODO: check if param outputField
					end

					render :text => "blabla"
				}*/		
				
	});
		
}
178010
def addLayers(self, *arg, **kw):
        
        netType = "serial"
        if "type" in kw:
            netType = kw["type"]
        self.addLayer('input', arg[0])
        hiddens = []
        if len(arg) > 3:
            hcount = 0
            for hidc in arg[1:-1]:
                name = 'hidden%d' % hcount
                self.addLayer(name, hidc)
                hiddens.append(name)
                hcount += 1
        elif len(arg) == 3:
                name = 'hidden'
                self.addLayer(name, arg[1])
                hiddens.append(name)
        elif len(arg) == 2:
            pass
        else:
            raise AttributeError("not enough layers! need >= 2")
        self.addLayer('output', arg[-1])
        lastName = "input"
        for name in hiddens:
            if netType == "parallel":
                self.connect('input', name)
                self.connect(name, 'output')
            else: # serial
                self.connect(lastName, name)
                lastName = name
        if netType == "serial" or lastName == "input":
            self.connect(lastName, "output")
257772
function setNodes(data){
        payload = data;

        if(kontx.args.deep === true){
            async.eachSeries(data, loadChild, sendNext);
        }
        else {
            sendNext();
        }
    }
4766
private void wireBdas(Collection<WebSphereBeanDeploymentArchive> wireFromBdas, Collection<WebSphereBeanDeploymentArchive> wireToBdas) {
        for (WebSphereBeanDeploymentArchive wireFromBda : wireFromBdas) {
            Collection<BeanDeploymentArchive> accessibleBdas = wireFromBda.getBeanDeploymentArchives();
            for (WebSphereBeanDeploymentArchive wireToBda : wireToBdas) {
                if ((wireToBda != wireFromBda) && ((accessibleBdas == null) || !accessibleBdas.contains(wireToBda))) {
                    wireFromBda.addBeanDeploymentArchive(wireToBda);
                }
            }
        }
    }
288883
public void setLayerOpacity(int alpha, int layer) {

        if ((alpha >= 0) && (alpha <= 100) && isAttached()) {
            Element colorbar;

            switch (layer) {
                case COLORBAR_A:
                    colorbar = m_colorA.getElement();
                    break;
                case COLORBAR_B:
                    colorbar = m_colorB.getElement();
                    break;
                case COLORBAR_C:
                    colorbar = m_colorC.getElement();
                    break;
                case COLORBAR_D:
                    colorbar = m_colorD.getElement();
                    break;
                default:
                    return;
            }
            colorbar.getStyle().setOpacity((1.0 * alpha) / 100);
            CmsTransparencyImpl.setTransparency(colorbar, alpha);
        }
    }
245741
function get_wiring( req, res, next) {
		req.wiring_collection.findOne({
					user_id: req.current_user._id, 
					_id: ObjectID.createFromHexString(req.param('id')) 
			}, function(error, wiring) {
				if(error) { throw error; }
				req.wiring = wiring;
				next();
			});
	}
924241
function(layerContext, node) {
        var style = {};
        this.runChildNodes(style, node);
        if(node.getAttribute("current") == "1") {
            style.current = true;
        }
        layerContext.styles.push(style);
    }
291128
function SetSettings(settings) {
		try { CFG = TLS.Fill(settings, CFG); Dbg = CFG.Debug } 
		catch (error) { LG.IF(error); }
	}
271313
function(map) {
        OpenLayers.Control.prototype.setMap.apply(this, arguments);
        var i, layers = this.layers || map.layers;
        for (i=layers.length-1; i>=0; --i) {
            this.addLayer({layer: layers[i]});
        }
        if (!this.layers) {
            map.events.on({
                addlayer: this.addLayer,
                removeLayer: this.removeLayer,
                scope: this
            });
        }
    }
910305
function(layerArray, layer) {
        if (layer.layersContext) {
            for (var i=0, len = layer.layersContext.length; i<len; i++) {
                var l = layer.layersContext[i];
                layerArray.push(l);
                if (l.layersContext) {
                    this.processLayer(layerArray, l);
                }
            }
        }
    }
1275238
function get_wiring_collection(req, res, next) {
		app.db.collection('wirings', function(error, wiring_collection) {
			if(error) { throw error; }
			else {
				req.wiring_collection = wiring_collection;
				next();
			}
		});
	}
567982
function(event, args) {
      var wire = args[0];
      // add the wire to the list if it isn't in
      if( WireIt.indexOf(wire, this.wires) == -1 ) {
         this.wires.push(wire);
         
         if(this.enableMouseEvents) {
            YAHOO.util.Event.addListener(wire.element, "mousemove", this.onWireMouseMove, this, true);
            YAHOO.util.Event.addListener(wire.element, "click", this.onWireClick, this, true);
         }
         
         // Re-Fire an event at the layer level
         this.eventAddWire.fire(wire);

			// Fire the layer changed event
			this.eventChanged.fire(this);
      }
   }
1159466
function(wireConfig) {
	
		var klass = WireIt.wireClassFromXtype(wireConfig.xtype);
   
      var src = wireConfig.src;
      var tgt = wireConfig.tgt;
   
      var terminal1 = this.containers[src.moduleId].getTerminal(src.terminal);
      var terminal2 = this.containers[tgt.moduleId].getTerminal(tgt.terminal);
      var wire = new klass( terminal1, terminal2, this.el, wireConfig);
      wire.redraw();
   
      return wire;
   }
1067372
def setLayer(self, layer):
        
        if layer == self._layer:
            return False

        self._layer = layer
        self.syncLayerData()

        return True