Reader callback for parsing layers.
@param {number} tag The tag.
@param {Object} layers The layers object.
@param {PBF} pbf The PBF.
509187
function layersPBFReader(tag, layers, pbf) {
  if (tag === 3) {
    const layer = {
      keys: [],
      values: [],
      features: []
    };
    const end = pbf.readVarint() + pbf.pos;
    pbf.readFields(layerPBFReader, layer, end);
    layer.length = layer.features.length;
    if (layer.length) {
      layers[layer.name] = layer;
    }
  }
}
98237
function parseTag(position, tokens) {
	let token;
	let tag = {
		name : null,
		self : false,
		open : true
	};

	while (token = tokens[position++]) {
		// tag's end found so parsing must stop
		if (token.type === TokenTypes.TagEnd) {
			break;
		}

		// save the tag's name and continue parsing
		if (!tag.name && token.type === TokenTypes.TagName) {
			tag.name = token.value;
			continue;
		}

		// if a "/" is found after the tag's name, then it's a self-closing tag
		if (token.type === TokenTypes.TagClose) {
			tag.self = tag.open = !!tag.name;
		}
	}

	return tag;
}
224616
public void add(TagLibTag libTag, Tag tag, FunctionLib[] flibs, SourceCode cfml) {
	tags.add(new TagData(libTag, tag, flibs, cfml));
    }
15262
function _layerCanFireEvent(layer, eventType) {
	// If events are disable and if
	// layer is tangible or event is not tangible
	return (!layer.disableEvents &&
		(!layer.intangible || $.inArray(eventType, tangibleEvents) === -1));
}
1003710
def is_tagged(self, layer):
        """"""
        # we have a number of special names that are not layers but instead
        # attributes of "words" layer
        if layer == ANALYSIS:
            if WORDS in self and len(self[WORDS]) > 0:
                return ANALYSIS in self[WORDS][0]
        elif layer == LAYER_CONLL:
            if LAYER_CONLL in self and len(self[LAYER_CONLL]) > 0:
                return PARSER_OUT in self[LAYER_CONLL][0]
        elif layer == LAYER_VISLCG3:
            if LAYER_VISLCG3 in self and len(self[LAYER_VISLCG3]) > 0:
                return PARSER_OUT in self[LAYER_VISLCG3][0]
        elif layer == LABEL:
            if WORDS in self and len(self[WORDS]) > 0:
                return LABEL in self[WORDS][0]
        elif layer == CLAUSE_ANNOTATION:
            if WORDS in self and len(self[WORDS]) > 0:
                return CLAUSE_ANNOTATION in self[WORDS][0]
        elif layer == WORDNET:
            if WORDS in self and len(self[WORDS]) > 0:
                if ANALYSIS in self[WORDS][0] and len(self[WORDS][0][ANALYSIS]) > 0:
                    return WORDNET in self[WORDS][0][ANALYSIS][0]
        else:
            return layer in self
        return False
1329605
function (map) {
		var layers = this._layers,
		    toBeReAdded = [],
		    layer;

		for (var id in layers) {
			layer = layers[id];
			if (layer._map) {
				toBeReAdded.push(layer);
				map._originalRemoveLayer(layer);
			}
		}

		return toBeReAdded;
	}
653848
public void setLayer(VectorLayer layer) {
		this.layer = layer;
		Object value = layerSelect.getValue();
		if (value == null || !value.equals(layer.getLabel())) {
			layerSelect.setValue(layer.getLabel());
		}
		empty();
	}
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);
        }

    }
893938
function ( layersMap ) {

			var rawStacks = fbxTree.Objects.AnimationStack;

			// connect the stacks (clips) up to the layers
			var rawClips = {};

			for ( var nodeID in rawStacks ) {

				var children = connections.get( parseInt( nodeID ) ).children;

				if ( children.length > 1 ) {

					// it seems like stacks will always be associated with a single layer. But just in case there are files
					// where there are multiple layers per stack, we'll display a warning
					console.warn( 'THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.' );

				}

				var layer = layersMap.get( children[ 0 ].ID );

				rawClips[ nodeID ] = {

					name: rawStacks[ nodeID ].attrName,
					layer: layer,

				};

			}

			return rawClips;

		}
1021275
function encodeTags(tags) {
  var bufLength = 0;
  var tagLengths = []
  
  for (var i = 0; i < tags.length; i++) {
    var tagLength = getTagLength(tags[i]);
    tagLengths.push(tagLength);
    bufLength += tagLength;
  }
  
  var buf = new Buffer(bufLength);
  var slicedBuf = buf;
  
  for (var i = 0; i < tags.length; i++) {
    encodeNumber(slicedBuf, tags[i], tagLengths[i]);
    slicedBuf = slicedBuf.slice(tagLengths[i]);
  }
  
  return buf;
}
1236847
public void setTags(java.util.Collection<java.util.Map<String, String>> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new java.util.ArrayList<java.util.Map<String, String>>(tags);
    }
771781
public void setTags(java.util.Collection<TagListEntry> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new java.util.ArrayList<TagListEntry>(tags);
    }
16467
function(layer, callback) {
    layer = layer == undefined ? 0: layer;
    var self = this;
    this.getTiles(function(urls) {
      if(!urls) {
        callback(null);
        return;
      }
      if(callback) {
        callback(self._tileJSONfromTiles(layer, urls));
      }
    });
  }
1052393
def chain(*layers):
    
    if len(layers) == 0:
        return FeedForward([])
    elif len(layers) == 1:
        return layers[0]
    else:
        return FeedForward(layers)
1215453
function(el, tagName, tagData) {
                var helperTagCallback = tagData.options.read('tags.' + tagName, {
                        isArgument: true,
                        proxyMethods: false
                    })
                    .value,
                    tagCallback = helperTagCallback || tags[tagName];

                // If this was an element like <foo-bar> that doesn't have a component, just render its content
                var scope = tagData.scope,
                    res;

                if (tagCallback) {
                    var reads = can.__clearReading();
                    res = tagCallback(el, tagData);
                    can.__setReading(reads);
                } else {
                    res = scope;
                }



                // If the tagCallback gave us something to render with, and there is content within that element
                // render it!
                if (res && tagData.subtemplate) {

                    if (scope !== res) {
                        scope = scope.add(res);
                    }
                    var result = tagData.subtemplate(scope, tagData.options);
                    var frag = typeof result === "string" ? can.view.frag(result) : result;
                    can.appendChild(el, frag);
                }
            }
1053943
function(layers) {
        if(OpenLayers.Util.isArray(layers)) {
            this.layers = layers;
            this.layer = new OpenLayers.Layer.Vector.RootContainer(
                this.id + "_container", {
                    layers: layers
                }
            );
        } else {
            this.layer = layers;
        }
    }
517052
function(layerContext, node) {
        var srs    = this.getChildValue(node);
        if (typeof layerContext.projections != "object") {
            layerContext.projections = {};
        }
        var values = srs.split(/ +/);
        for (var i=0, len=values.length; i<len; i++) {
            layerContext.projections[values[i]] = true;
        }
    }