Creates the layer for weapons.
775337
def create_weapon_layer(weapon, hashcode, isSecond=False):
    """"""
    return pgnreader.parse_pagan_file(('%s%spgn%s' % (PACKAGE_DIR, os.sep, os.sep)) + weapon + '.pgn', hashcode, sym=False, invert=isSecond)
449559
function Layer(name, fn) {
  this.length = fn.length;
  this.name = name;
  this.fn = fn;
}
580427
protected function rotateLayersNinetyDegrees(): void
    {
        foreach ($this->layers as $i => $originalLayer) {
            $newLayer = new PackedLayer();
            foreach ($originalLayer->getItems() as $item) {
                $packedItem = new PackedItem($item->getItem(), $item->getY(), $item->getX(), $item->getZ(), $item->getLength(), $item->getWidth(), $item->getDepth());
                $newLayer->insert($packedItem);
            }
            $this->layers[$i] = $newLayer;
        }
    }
1314770
function() {
        var layer;
        for(var i=0; i<this.layers.length; ++i) {
            layer = this.layers[i];
            if(this.renderer && layer.renderer.getRenderLayerId() == this.id) {
                this.renderer.moveRoot(layer.renderer);
            }
        }
    }
869211
@Override
    protected void createLayers() {
        TileRendererLayer tileRendererLayer = AndroidUtil.createTileRendererLayer(this.tileCaches.get(0),
                this.mapView.getModel().mapViewPosition, getMapFile(), getRenderTheme(), false, true, false);
        this.mapView.getLayerManager().getLayers().add(tileRendererLayer);
    }
871657
function() {
      var self = this;

      var oldLayers = this.layers;
      this.layers = {};

      function findLayerView(layer) {
        var lv = _.find(oldLayers, function(layer_view) {
          var m = layer_view.model;
          return m.isEqual(layer);
        });
        return lv;
      }

      function canReused(layer) {
        return self.map.layers.find(function(m) {
          return m.isEqual(layer);
        });
      }

      // remove all
      for(var layer in oldLayers) {
        var layer_view = oldLayers[layer];
        if (!canReused(layer_view.model)) {
          layer_view.remove();
        }
      }

      this.map.layers.each(function(lyr) {
        var lv = findLayerView(lyr);
        if (!lv) {
          self._addLayer(lyr);
        } else {
          lv.setModel(lyr);
          self.layers[lyr.cid] = lv;
          self.trigger('newLayerView', lv, lv.model, self);
        }
      });

    }
120413
private HtmlContainer getOrCreateLayerContainer(Layer layer) {
		if (layerContainers.containsKey(layer)) {
			return layerContainers.get(layer);
		}
		HtmlContainer layerContainer = new HtmlGroup();
		layerContainer.asWidget().getElement().setId(layer.getId());
		layersModelContainer.add(layerContainer);
		layerContainers.put(layer, layerContainer);
		return layerContainer;
	}
391066
def addSRNLayers(self, inc, hidc, outc):
        
        self.addThreeLayers(inc, hidc, outc)
1165908
function() {

        // set the newly selected base layer
        for(var i=0, len=this.baseLayers.length; i<len; i++) {
            var layerEntry = this.baseLayers[i];
            if (layerEntry.inputElem.checked) {
                this.map.setBaseLayer(layerEntry.layer, false);
            }
        }

        // set the correct visibilities for the overlays
        for(var i=0, len=this.dataLayers.length; i<len; i++) {
            var layerEntry = this.dataLayers[i];
            layerEntry.layer.setVisibility(layerEntry.inputElem.checked);
        }

    }
733850
function (layer) {
		var $canvas, handle, h;
		if (layer._handles) {
			$canvas = $(this);
			// Remove handles from layer
			for (h = 0; h < layer._handles.length; h += 1) {
				handle = layer._handles[h];
				$canvas.removeLayer(handle);
			}
			layer._handles.length = 0;
		}
	}
602278
def init_weapon_list():
    """"""
    twohand = []
    for item in TWOHANDED_WEAPONS:
        twohand.append([item])

    onehand = []
    for item in ONEHANDED_WEAPONS:
        onehand.append([item])

    shield = SHIELDS

    dualwield_variations = []
    weapon_shield_variations = []

    for item in ONEHANDED_WEAPONS:
        for i in ONEHANDED_WEAPONS:
            dualwield_variations.append([item, i])
        for j in shield:
            weapon_shield_variations.append([j, item])

    return twohand + onehand + dualwield_variations + weapon_shield_variations
1108504
int addLayer(ChildDrawable layer) {
        final LayerState st = mLayerState;
        final int N = st.mChildren != null ? st.mChildren.length : 0;
        final int i = st.mNum;
        if (i >= N) {
            final ChildDrawable[] nu = new ChildDrawable[N + 10];
            if (i > 0) {
                System.arraycopy(st.mChildren, 0, nu, 0, i);
            }

            st.mChildren = nu;
        }

        st.mChildren[i] = layer;
        st.mNum++;
        st.invalidateCache();
        return i;
    }
120343
function() {

            var info = this.moduleInfo, name, i, j;

            // Create skin modules
            for (name in info) {

                if (lang.hasOwnProperty(info, name)) {
                    var m = info[name];
                    if (m && m.skinnable) {
                        // Y.log("skinning: " + name);
                        var o=this.skin.overrides, smod;
                        if (o && o[name]) {
                            for (i=0; i<o[name].length; i=i+1) {
                                smod = this._addSkin(o[name][i], name);
                            }
                        } else {
                            smod = this._addSkin(this.skin.defaultSkin, name);
                        }

                        m.requires.push(smod);
                    }
                }

            }

            var l = lang.merge(this.inserted); // shallow clone
            
            if (!this._sandbox) {
                l = lang.merge(l, env.modules);
            }

            // Y.log("Already loaded stuff: " + lang.dump(l, 0));

            // add the ignore list to the list of loaded packages
            if (this.ignore) {
                YUI.ObjectUtil.appendArray(l, this.ignore);
            }

            // remove modules on the force list from the loaded list
            if (this.force) {
                for (i=0; i<this.force.length; i=i+1) {
                    if (this.force[i] in l) {
                        delete l[this.force[i]];
                    }
                }
            }

            // expand the list to include superseded modules
            for (j in l) {
                // Y.log("expanding: " + j);
                if (lang.hasOwnProperty(l, j)) {
                    lang.augmentObject(l, this.getProvides(j));
                }
            }

            // Y.log("loaded expanded: " + lang.dump(l, 0));

            this.loaded = l;

        }
288554
def create_torso_layer(aspect, ip):
    ''''''
    layer = []
    if 'TOP' in aspect:
        layer = pgnreader.parse_pagan_file(FILE_TORSO, ip, invert=False, sym=True)
    return layer
317614
function(targets) {
        this.targets = [];
        if(targets && targets.length) {
            var target;
            for(var i=0, len=targets.length; i<len; ++i) {
                target = targets[i];
                if(target instanceof OpenLayers.Layer.Vector) {
                    this.addTargetLayer(target);
                } else {
                    this.addTarget(target);
                }
            }
        }
    }
1343626
function createLayers() {
  if (!this.serverless.service.layers) {
    this.serverless.service.layers = {};
  }
  this.serverless.service.layers['pythonRequirements'] = Object.assign(
    {
      artifact: path.join('.serverless', 'pythonRequirements.zip'),
      name: `${
        this.serverless.service.service
      }-${this.serverless.providers.aws.getStage()}-python-requirements`,
      description:
        'Python requirements generated by serverless-python-requirements.',
      compatibleRuntimes: [this.serverless.service.provider.runtime]
    },
    this.options.layer
  );

  return BbPromise.resolve();
}
782623
function buildLayerMatrix(g) {
  var layering = _.map(_.range(maxRank(g) + 1), function() { return []; });
  _.forEach(g.nodes(), function(v) {
    var node = g.node(v);
    var rank = node.rank;
    if (!_.isUndefined(rank)) {
      layering[rank][node.order] = v;
    }
  });
  return layering;
}