text:
package com.u2ware.springfield.view;

import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.util.ClassUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.view.AbstractView;

import com.u2ware.springfield.controller.EntityController;

public class ViewResolverSupport {

	private static final Logger logger = LoggerFactory.getLogger(ViewResolverSupport.class);

	private ResourceLoader resourceLoader;

	private String staticName;
	private Map<String,String> staticAttributes;

	private String[] baseLocations;
	private String baseExtension;

	private String[] sampleLocations;

	public void setResourceLoader(ResourceLoader resourceLoader) {
		this.resourceLoader = resourceLoader;
	}
	public void setStaticName(String staticName) {
		this.staticName = staticName;
	}
	public void setStaticAttributes(Map<String, String> staticAttributes) {
		this.staticAttributes = staticAttributes;
	}
	public void setBaseLocations(String[] baseLocations) {
		this.baseLocations = baseLocations;
	}
	public void setBaseExtension(String baseExtension) {
		this.baseExtension = baseExtension;
	}
	public String getStaticName() {
		return staticName;
	}
	public Map<String, String> getStaticAttributes() {
		return staticAttributes;
	}
	public String[] getBaseLocations() {
		return baseLocations;
	}
	public String getBaseExtension() {
		return baseExtension;
	}
	public String[] getSampleLocations() {
		return sampleLocations;
	}
	public void setSampleLocations(String[] sampleLocations) {
		this.sampleLocations = sampleLocations;
	}
	//////////////////////////////////////////////
	//
	//////////////////////////////////////////////
	private Map<String, String> attributesCSV(Map<String,String> target, String propString) {
		Map<String, String> staticAttributes = new HashMap<String, String>(target);
		if (propString != null) {
			StringTokenizer st = new StringTokenizer(propString, ",");
			while (st.hasMoreTokens()) {
				String tok = st.nextToken();
				int eqIdx = tok.indexOf("=");
				if (eqIdx == -1) {
					throw new IllegalArgumentException("Expected = in attributes CSV string '" + propString + "'");
				}
				if (eqIdx >= tok.length() - 2) {
					throw new IllegalArgumentException("At least 2 characters ([]) required in attributes CSV string '" + propString + "'");
				}
				String name = tok.substring(0, eqIdx);
				String value = tok.substring(eqIdx + 1);

				// Delete first and last characters of value: { and }
				value = value.substring(1);
				value = value.substring(0, value.length() - 1);

				staticAttributes.put(name, value);
			}
		}

		return staticAttributes;
	}

	public Map<String, String> attributes(String url){

		String viewName = url;
		int sId = viewName.indexOf(";");
		if(sId > 0){
			viewName = url.substring(0, sId);
		}

		int qIdx = viewName.indexOf("?");
		String query = (qIdx > 0) ? viewName.substring( qIdx + 1) : null;
		String uri = (qIdx > 0) ? viewName.substring(0, qIdx) : viewName;

		Map<String, String> attributes = attributesCSV(staticAttributes, query);

		String filename = StringUtils.getFilename(uri);
		String extension = StringUtils.getFilenameExtension(filename);
		String path =  uri.replaceAll(filename, "");
		String method = StringUtils.stripFilenameExtension(filename);

		attributes.put("path", path);
		attributes.put("method", method);
		attributes.put("extension", extension);

		logger.trace("viewQuery: "+query);
		logger.trace("viewUri: "+uri);
		logger.trace("viewUriPath: "+path);
		logger.trace("viewUriName: "+method);
		logger.trace("viewUriExtension: "+extension);

		////////////////////////////////////////////
		//
		////////////////////////////////////////////
		String methodKey = "webmvc.view.method."+method;
		String methodValue = attributes.get(methodKey);
		String name = (methodValue != null) ? methodValue : method;

		logger.trace("methodKey: "+methodKey);
		logger.trace("methodValue: "+methodValue);
		logger.trace("name: "+name);

		attributes.put("name", name);

		////////////////////////////////////////////
		//
		////////////////////////////////////////////
		String resolverKey = "webmvc.view.extension."+(extension != null ? extension : "none");
		String resolver = attributes.get(resolverKey);

		logger.trace("resolverKey: "+resolverKey);
		logger.trace("resolver: "+resolver);

		attributes.put("webmvc.view.resolver", resolver);

		String initialExt = (extension != null ? "."+extension : "");
		String initialPath = path + method + initialExt;
		logger.info("["+staticName+"] Negotiating view  :  "+initialPath);

		return attributes;
	}

	public boolean resolveViewNameByResolverName(Map<String, String> attr){
		if(staticName.equals(attr.get("webmvc.view.resolver"))){
 			return true;
		}
		return false;
	}

	//////////////////////////////////////////////
	//
	//////////////////////////////////////////////
	public String resolveViewNameByBaseExtension(Map<String, String> attr){

		if(ObjectUtils.isEmpty(baseLocations) || ! StringUtils.hasText(baseExtension) )
			return null;

        String extension = (attr.get("extension") != null ? "."+attr.get("extension") : "")+"."+baseExtension;
        String resource = null;

		////////////////////////////////////////////
        String path1 = attr.get("path") + attr.get("method") + extension;
        resource = findResource(attr, staticName, baseLocations, path1);
        if(resource != null) return resource;

		////////////////////////////////////////////
        String path2 = "/" + attr.get("method") + extension;
        resource = findResource(attr, staticName, baseLocations,path2);
        if(resource != null) return resource;

		////////////////////////////////////////////
        String path3 = attr.get("path") + attr.get("name") + extension;
        resource = findResource(attr, staticName, baseLocations, path3);
        if(resource != null) return resource;

		////////////////////////////////////////////
        String path4 = "/" + attr.get("name") + extension;
        resource = findResource(attr, staticName, baseLocations, path4);
        if(resource != null) return resource;

        return null;
	}

	//////////////////////////////////////////////
	//
	//////////////////////////////////////////////
	public String resolveViewNameBySampleLocations(Map<String, String> attr, String extension){

		String[] locations = sampleLocations;
		String customLocations = attr.get("webmvc.view.thymeleaf.sampleLocations");
		if(locations != null){
			locations = StringUtils.commaDelimitedListToStringArray(customLocations);
		}

        String resource = null;

        String path1 = "/" + attr.get("method") +"."+extension;
        resource = findResource(attr, "Sample Location", sampleLocations, path1);
        if(resource != null) return resource;

        String path2 = "/" + attr.get("name") +"."+extension;
        resource = findResource(attr, "Sample Location", sampleLocations, path2);
        if(resource != null) return resource;

        return null;
	}

	//////////////////////////////////////////////
	//
	//////////////////////////////////////////////
	private String findResource(Map<String, String> attr, String resolver, String[] locations, String path){
        for(String location : locations){
            String filename = location + path ;
        	Resource resource = resourceLoader.getResource(filename);
        	logger.info("["+resolver+"] Search view: "+resource);

        	if(resource.exists()){
            	//logger.info("["+resolver+"] Returning view:  "+filename);
        		if(! attr.containsKey("webmvc.view.uri")){
                	attr.put("webmvc.view.uri", filename);
        		}

        		if(! attr.containsKey("webmvc.view.name")){
                	attr.put("webmvc.view.name", StringUtils.getFilename(path));
        		}

        		return filename;
        	}
        }
        return null;
	}

	//////////////////////////////////////////////
	//
	//////////////////////////////////////////////
	public void addStaticAttributes(View view, Map<String, String> attr) {
		logger.info("staticAttributes  :  "+attr);
		if(view != null && ClassUtils.isAssignable(AbstractView.class, view.getClass())){

			AbstractView abstractView = (AbstractView)view;
			//abstractView.setAttributesCSV(getSpringfieldViewAttributesCVS(springfieldViewName));
			//String propString = resolveSpringfieldViewAttrsCVS(springfieldViewUrl);
			//abstractView.setAttributesCSV(propString);
        	//logger.info(propString);
        	abstractView.setAttributesMap(attr);
		}
	}

	private static String getRequestModelKey(Map<String, Object> model) {
		String modelKey = null;
		if(model.get(EntityController.MODEL_ENTITY) != null){
			modelKey = EntityController.MODEL_ENTITY;
		}else if(model.get(EntityController.MODEL_QUERY) != null){
			modelKey = EntityController.MODEL_QUERY;
		}else{
			return "";
		}
		return modelKey;
	}
	public static Object getRequestModel(Map<String, Object> model) {
		String modelKey = getRequestModelKey(model);
		return model.get(modelKey);
	}

	private static String getResponseModelKey(Map<String, Object> model) {
		String modelKey = null;
		if(model.get(EntityController.MODEL_ENTITY) != null){
			modelKey = EntityController.MODEL_ENTITY;
		}else if(model.get(EntityController.MODEL_QUERY_RESULT) != null){
			modelKey = EntityController.MODEL_QUERY_RESULT;
		}else{
			return "";
		}
		return modelKey;
	}
	public static Object getResponseModel(Map<String, Object> model) {
		String modelKey = getResponseModelKey(model);
		return model.get(modelKey);
	}
}


text:
<!--
  ~ Copyright (c) 2008-2019 Haulmont.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<window xmlns="http://schemas.haulmont.com/cuba/screen/window.xsd">
    <data>
        <collection id="userDc"
                    class="com.haulmont.cuba.security.entity.User"/>
    </data>
    <layout>
        <table id="table"
               dataContainer="userDc">
            <actions>
                <action id="create" type="create"/>
                <action id="edit" type="edit"/>
                <action id="remove" type="remove"/>
                <action id="test"/>
            </actions>
            <columns>
                <column id="name"/>
            </columns>
            <rows/>
            <buttonsPanel id="buttonsPanel"
                          alwaysVisible="true">
                <button id="createBtn" action="table.create"/>
                <button id="editBtn" action="table.edit"/>
                <button id="removeBtn" action="table.remove"/>
                <button id="testBtn" action="table.test" icon="CODE"/>
            </buttonsPanel>
        </table>
    </layout>
</window>

redpajama_set_name: RedPajamaGithub


text:
package com.liferay.arquillian.deploymentscenario.test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import com.liferay.arquillian.deploymentscenario.BndDeploymentScenarioGenerator;
import com.liferay.arquillian.test.ATest;

import java.io.File;
import java.io.IOException;

import java.util.List;
import java.util.jar.Attributes;
import java.util.jar.Manifest;

import org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription;
import org.jboss.arquillian.container.test.spi.client.deployment.DeploymentScenarioGenerator;
import org.jboss.arquillian.test.spi.TestClass;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.Node;

import org.junit.Test;

/**
 * @author Carlos Sierra Andrés
 */
public class BndDeploymentScenarioGeneratorTest {

	@Test
	public void testBundleGeneration() throws IOException {
		BndDeploymentScenarioGenerator bndDeploymentScenarioGenerator =
			new BndDeploymentScenarioGenerator() {

				@Override
				protected DeploymentScenarioGenerator
					getDefaultDeploymentScenarioGenerator() {

					return null;
			}
		};

		bndDeploymentScenarioGenerator.setBndFile(
			new File("target/test-classes/test.bnd"));

		List<DeploymentDescription> deploymentDescriptions =
			bndDeploymentScenarioGenerator.generate(new TestClass(ATest.class));

		assertEquals(1, deploymentDescriptions.size());

		DeploymentDescription deploymentDescription =
			deploymentDescriptions.get(0);

		Archive<?> archive = deploymentDescription.getArchive();

		Node object = archive.get("META-INF/MANIFEST.MF");

		assertNotNull("We must have a MANIFEST.MF", object);

		Manifest manifest = new Manifest(object.getAsset().openStream());

		Attributes mainAttributes = manifest.getMainAttributes();

		String importPackageValue = mainAttributes.getValue("Import-Package");

		assertFalse(
			"Package from the classes must not be imported",
			importPackageValue.contains(
				"com.liferay.arquillian.test.extras.a"));
		assertFalse(
			"Package from the classes must not be imported",
			importPackageValue.contains(
				"com.liferay.arquillian.test.extras.b"));

		assertTrue(
			"Should contain org.osgi.framework",
			importPackageValue.contains("org.osgi.framework"));

		assertNotNull(
			"Classes must be included",
			archive.get("com/liferay/arquillian/test/extras/a/A.class"));
		assertNotNull(
			"Classes must be included",
			archive.get("com/liferay/arquillian/test/extras/b/B.class"));
	}

	@Test
	public void testBundleGenerationWithCommonBnd() throws IOException {
		BndDeploymentScenarioGenerator bndDeploymentScenarioGenerator =
			new BndDeploymentScenarioGenerator() {

			@Override
			protected DeploymentScenarioGenerator
				getDefaultDeploymentScenarioGenerator() {

				return null;
			}
		};

		bndDeploymentScenarioGenerator.setBndFile(
			new File("target/test-classes/test.bnd"));

		File commonBndFile = new File("target/test-classes/common.bnd");

		bndDeploymentScenarioGenerator.setCommonBndFile(commonBndFile);

		List<DeploymentDescription> deploymentDescriptions =
			bndDeploymentScenarioGenerator.generate(new TestClass(ATest.class));

		assertEquals(1, deploymentDescriptions.size());

		DeploymentDescription deploymentDescription =
			deploymentDescriptions.get(0);

		Archive<?> archive = deploymentDescription.getArchive();

		Node object = archive.get("META-INF/MANIFEST.MF");

		assertNotNull("We must have a MANIFEST.MF", object);

		Manifest manifest = new Manifest(object.getAsset().openStream());

		Attributes mainAttributes = manifest.getMainAttributes();

		String importPackageValue = mainAttributes.getValue("Import-Package");

		assertFalse(
			"Package from the classes must not be imported",
			importPackageValue.contains(
				"com.liferay.arquillian.test.extras.a"));
		assertFalse(
			"Package from the classes must not be imported",
			importPackageValue.contains(
				"com.liferay.arquillian.test.extras.b"));

		String fooProperty = mainAttributes.getValue("Foo-Property");

		assertEquals("test", fooProperty);

		String fooBadProperty = mainAttributes.getValue("Foo-Bad-Property");

		assertEquals("${a.non.existant.property}", fooBadProperty);

		assertNotNull(
			"Classes must be included",
			archive.get("com/liferay/arquillian/test/extras/a/A.class"));
		assertNotNull(
			"Classes must be included",
			archive.get("com/liferay/arquillian/test/extras/b/B.class"));
	}

	@Test
	public void testBundleGenerationWithCommonBndFromSystemProperty()
		throws IOException {

		System.setProperty("sdk.dir", "target/test-classes");

		BndDeploymentScenarioGenerator bndDeploymentScenarioGenerator =
			new BndDeploymentScenarioGenerator() {

			@Override
			protected DeploymentScenarioGenerator
				getDefaultDeploymentScenarioGenerator() {

				return null;
			}
		};

		bndDeploymentScenarioGenerator.setBndFile(
			new File("target/test-classes/test.bnd"));

		List<DeploymentDescription> deploymentDescriptions =
			bndDeploymentScenarioGenerator.generate(new TestClass(ATest.class));

		assertEquals(1, deploymentDescriptions.size());

		DeploymentDescription deploymentDescription =
			deploymentDescriptions.get(0);

		Archive<?> archive = deploymentDescription.getArchive();

		Node object = archive.get("META-INF/MANIFEST.MF");

		assertNotNull("We must have a MANIFEST.MF", object);

		Manifest manifest = new Manifest(object.getAsset().openStream());

		Attributes mainAttributes = manifest.getMainAttributes();

		String importPackageValue = mainAttributes.getValue("Import-Package");

		assertFalse(
			"Package from the classes must not be imported",
			importPackageValue.contains(
				"com.liferay.arquillian.test.extras.a"));
		assertFalse(
			"Package from the classes must not be imported",
			importPackageValue.contains(
				"com.liferay.arquillian.test.extras.b"));

		String fooProperty = mainAttributes.getValue("Foo-Property");

		assertEquals("test", fooProperty);

		String fooBadProperty = mainAttributes.getValue("Foo-Bad-Property");

		assertEquals("${a.non.existant.property}", fooBadProperty);

		assertNotNull(
			"Classes must be included",
			archive.get("com/liferay/arquillian/test/extras/a/A.class"));
		assertNotNull(
			"Classes must be included",
			archive.get("com/liferay/arquillian/test/extras/b/B.class"));
	}

}


text:
Repository Tools
---------------------

### [Developer tools](/contrib/devtools) ###
Specific tools for developers working on this repository.
Contains the script `github-merge.py` for merging GitHub pull requests securely and signing them using GPG.

### [Linearize](/contrib/linearize) ###
Construct a linear, no-fork, best version of the blockchain.

### [Qos](/contrib/qos) ###

A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.

### [Seeds](/contrib/seeds) ###
Utility to generate the pnSeed[] array that is compiled into the client.

Build Tools and Keys
---------------------

### [Debian](/contrib/debian) ###
Contains files used to package bitcoind/bitcoin-qt
for Debian-based Linux systems. If you compile bitcoind/bitcoin-qt yourself, there are some useful files here.

### [Gitian-descriptors](/contrib/gitian-descriptors) ###
Notes on getting Gitian builds up and running using KVM.

### [Gitian-signing](/contrib/gitian-signing)
PGP keys used for signing Bitcoin ABC [Gitian release](/doc/release-process.md) results.

### [MacDeploy](/contrib/macdeploy) ###
Scripts and notes for Mac builds.

### [Gitian-build](/contrib/gitian-build.py) ###
Script for running full Gitian builds.

Test and Verify Tools
---------------------

### [TestGen](/contrib/testgen) ###
Utilities to generate test vectors for the data-driven Bitcoin tests.

### [Verify Binaries](/contrib/verifybinaries) ###
This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org.


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Freesia.Internal.Extensions;
using Freesia.Internal.Reflection;
using Freesia.Internal.Types;
using Freesia.Types;

namespace Freesia.Internal
{
    internal class SyntaxHighlighter<T> : CompilerConfig<T>
    {
        private static SyntaxInfo TranslateSyntaxInfo(CompilerToken t)
        {
            switch (t.Type)
            {
                case TokenType.UnaryPlus:
                case TokenType.UnaryMinus:
                case TokenType.Plus:
                case TokenType.Minus:
                case TokenType.Multiply:
                case TokenType.Divide:
                case TokenType.Modulo:
                case TokenType.ShiftLeft:
                case TokenType.ShiftRight:
                case TokenType.Equals:
                case TokenType.EqualsI:
                case TokenType.NotEquals:
                case TokenType.NotEqualsI:
                case TokenType.Regexp:
                case TokenType.Contains:
                case TokenType.ContainsI:
                case TokenType.And:
                case TokenType.Or:
                case TokenType.Not:
                case TokenType.LessThan:
                case TokenType.GreaterThan:
                case TokenType.LessThanEquals:
                case TokenType.GreaterThanEquals:
                case TokenType.NotRegexp:
                case TokenType.NotContains:
                case TokenType.NotContainsI:
                case TokenType.OpenBracket:
                case TokenType.CloseBracket:
                case TokenType.ArrayStart:
                case TokenType.ArrayEnd:
                case TokenType.ArrayDelimiter:
                case TokenType.IndexerStart:
                case TokenType.IndexerEnd:
                case TokenType.Lambda:
                case TokenType.ArrayNode:
                case TokenType.IndexerNode:
                case TokenType.PropertyAccess:
                case TokenType.InvokeMethod:
                    return new SyntaxInfo(t, SyntaxType.Operator) { TypeInfo = null };
                case TokenType.String:
                    return new SyntaxInfo(t, SyntaxType.String) { TypeInfo = typeof(string) };
                case TokenType.Double:
                    return new SyntaxInfo(t, SyntaxType.Constant) { TypeInfo = typeof(double) };
                case TokenType.Long:
                    return new SyntaxInfo(t, SyntaxType.Constant) { TypeInfo = typeof(long) };
                case TokenType.ULong:
                    return new SyntaxInfo(t, SyntaxType.Constant) { TypeInfo = typeof(ulong) };
                case TokenType.Bool:
                    return new SyntaxInfo(t, SyntaxType.Keyword) { TypeInfo = typeof(bool) };
                case TokenType.Null:
                    return new SyntaxInfo(t, SyntaxType.Keyword) { TypeInfo = null };
                case TokenType.Symbol:
                    return new SyntaxInfo(t, SyntaxType.Identifier) { TypeInfo = null /* to be determin */ };
                case TokenType.LambdaParameter:
                    return new SyntaxInfo(t, SyntaxType.Keyword) { TypeInfo = null /* to be determin */ };
                case TokenType.Error:
                    return new SyntaxInfo { Length = t.Length, Position = t.Position, SubType = t.Type, Type = SyntaxType.Error, Value = t.Value ?? "", TypeInfo = null };
                default:
                    throw new ParseException("#-1", t.Position);
            }
        }

        private static Type GetPropertyType(Type type, string name)
        {
            return type.GetCachedRuntimeProperties().Where(p => p.Name.CompareIgnoreCaseTo(name))
                .Select(p => p.PropertyType).FirstOrDefault();
        }

        private static bool IsExtendedMethod(Type type, string name)
        {
            if (!type.IsEnumerable()) return false;
            return Helper.GetEnumerableExtendedMethods().Any(name.CompareIgnoreCaseTo);
        }

        private static IEnumerable<MethodInfo> GetMethodInfo(string name)
        {
            return Helper.GetEnumerableExtendedMethodInfos().Where(m => m.Name.CompareIgnoreCaseTo(name));
        }

        private static void UpdateASTNodeType(ASTNode node, Type parentNodeType = null, EnvironmentMap<Type> lambdaEnv = null)
        {
            if (node == null) return;
            if (node.Token.Type == TokenType.Nop) return;
            var updatedParentNodeType = parentNodeType ?? typeof(T);

            // determine operator node type
            var info = TranslateSyntaxInfo(node.Token);
            // determine identifier type
            if (node.Token.Type == TokenType.Error) return;
            if (node.Token.Type == TokenType.Symbol || node.Token.Type == TokenType.LambdaParameter)
            {
                node.DeterminedType = GetPropertyType(updatedParentNodeType, node.Token.Value);
                if (updatedParentNodeType == typeof(UserFunctionTypePlaceholder))
                {
                    var func = Functions.Keys.FirstOrDefault(node.Token.Value.CompareIgnoreCaseTo);
                    if (func != null)
                    {
                        node.DeterminedType = Functions[func].GetType().GenericTypeArguments.Last();
                    }
                }
                if (parentNodeType == null && node.Token.Value.CompareIgnoreCaseTo(UserFunctionNamespace))
                {
                    node.DeterminedType = typeof(UserFunctionTypePlaceholder);
                }
                if (lambdaEnv != null && lambdaEnv.ContainsKey(node.Token.Value))
                {
                    node.DeterminedType = lambdaEnv[node.Token.Value];
                    node.Token.Type = TokenType.LambdaParameter;
                }
                if (node.DeterminedType == null)
                {
                    node.DeterminedType = IsExtendedMethod(updatedParentNodeType, node.Token.Value)
                        ? typeof(ExtendedMethodPlaceholder) : null;
                }
                if (node.DeterminedType == null)
                {
                    // error node
                    node.DeterminedType = info.TypeInfo;
                }
                return;
            }

            // process left node (and update ``node.Left.DeterminedType'' value)
            UpdateASTNodeType(node.Left, parentNodeType, lambdaEnv);
            // process right node
            UpdateASTNodeType(node.Right, node.Token.IsBooleanOperator || node.Token.Type == TokenType.ArrayNode || node.Token.Type == TokenType.ArrayDelimiter
                || node.Token.Type == TokenType.IndexerNode || node.Token.Type == TokenType.InvokeMethod || node.Left == null || node.Left.Token.IsBooleanOperator ?
                null : node.Left?.DeterminedType, lambdaEnv);

            // override array node type
            if (node.Token.Type == TokenType.ArrayNode)
            {
                node.DeterminedType = typeof(object[]);
                return;
            }

            // info is no Operator
            if (info.Type != SyntaxType.Operator)
            {
                node.DeterminedType = info.TypeInfo;
                return;
            }
            if (node.Token.Type == TokenType.PropertyAccess)
            {
                // propergate lhs type
                node.DeterminedType = node.Right?.DeterminedType ?? node.Left?.DeterminedType;
            }
            else if (node.Token.Type == TokenType.IndexerNode)
            {
                // propergate lhs type
                node.DeterminedType = node.Left.DeterminedType.GetUnderlyingElementType();
            }
            else if (node.Token.Type == TokenType.InvokeMethod)
            {
                // if left side node type is not ExtendedMethodPlaceholder
                if (node.Left?.DeterminedType != typeof(ExtendedMethodPlaceholder)) {/* error */return; }
                var ie = node.Left.Left.DeterminedType; // target IE<T>
                var methods = GetMethodInfo(node.Left.Right.Token.Value).ToArray();
                var args = ExpandArguments(node.Right).ToArray();
                if (methods.All(m => m.GetParameters().Length != args.Length + 1)) {/* error */return; }
                var elementType = ie.GetUnderlyingElementType();
                foreach (var arg in args)
                {
                    if (arg.Token.Type != TokenType.Lambda) continue;
                    // prepare lamda env
                    var env = lambdaEnv == null ? new EnvironmentMap<Type>() : new EnvironmentMap<Type>(lambdaEnv);
                    if (env.ContainsKey(arg.Left.Token.Value))
                    {
                        arg.Left.Token.Type = TokenType.Error;
                        continue;
                    }
                    // update lambda related ast
                    arg.Left.DeterminedType = elementType;
                    arg.Left.Token.Type = TokenType.LambdaParameter;
                    env[arg.Left.Token.Value] = arg.Left.DeterminedType;
                    UpdateASTNodeType(arg.Right, null, env);
                    arg.DeterminedType = arg.Right != null ? GetDelegateType(elementType, arg.Right.DeterminedType) : null;
                }
                // fill generic parameter
                var method = Helper.FindPreferredMethod(node.Left.Right.Token.Value,
                    new[] { ie.GetUnderlyingEnumerableType() }.Concat(args.Select(x => x.DeterminedType)).ToArray());
                node.DeterminedType = method?.ReturnType;
            }
            else
            {
                node.DeterminedType = typeof(bool);
            }
        }

        private static IEnumerable<SyntaxInfo> HighlightOne(ASTNode node)
        {
            if (node == null) yield break;
            if (node.Token.Type == TokenType.Nop) yield break;
            var info = TranslateSyntaxInfo(node.Token);
            // determine identifier type
            info.TypeInfo = node.DeterminedType;
            if (info.Type == SyntaxType.Identifier && node.DeterminedType == null)
            {
                info.Type = SyntaxType.Error;
            }
            // process left node (and update ``node.Left.DeterminedType'' value)
            var lhs = HighlightOne(node.Left).ToList();
            // process right node
            var rhs = HighlightOne(node.Right).ToList();
            // build enumerable
            foreach (var i in lhs) yield return i;
            yield return info;
            foreach (var i in rhs) yield return i;
        }

        private static Type GetDelegateType(Type elementType, Type determinedType)
        {
            if (elementType == null || determinedType == null) return null;
            return typeof(Func<,>).MakeGenericType(elementType, determinedType);
        }

        private static IEnumerable<ASTNode> ExpandArguments(ASTNode node)
        {
            if (node == null) yield break;
            if (node.Token.Type == TokenType.CloseBracket) { yield break; }
            if (node.Token.Type == TokenType.Nop) { yield break; }
            if (node.Token.Type == TokenType.ArrayDelimiter)
            {
                foreach (var n in ExpandArguments(node.Left)) { yield return n; }
                foreach (var n in ExpandArguments(node.Right)) { yield return n; }
                yield break;
            }
            yield return node;
        }

        private static IEnumerable<SyntaxInfo> SyntaxHighlightAST(IEnumerable<ASTNode> nodes)
        {
            if (nodes == null) yield break;
            foreach (var node in nodes)
            {
                UpdateASTNodeType(node);
                foreach (var i in HighlightOne(node)) yield return i;
            }
        }

        public static IEnumerable<SyntaxInfo> SyntaxHighlight(IEnumerable<IASTNode> ast)
        {
            if (ast == null) return Enumerable.Empty<SyntaxInfo>();
            var infos = SyntaxHighlightAST(ast.Cast<ASTNode>()).OrderBy(x => x.Position).ToArray();
            return infos;
        }
    }
}


text:
<link rel="import" href="../../bower_components/polymer/polymer.html">

<dom-module id="helper-component">

	<template>

			<input id="inputBox" type="text" value="{{filterText::input}}" placeholder="Search" on-input="input">

            <template id="componentsList" is="dom-repeat" items="{{ comp }}" filter="filterRoom" as="i">
				{{i.idName}}
            </template>

	</template>

</dom-module>


text:
<!---

This README is automatically generated from the comments in these files:
marked-element.html

Edit those files, and our readme bot will duplicate them over here!
Edit this file, and the bot will squash your changes :)

The bot does some handling of markdown. Please file a bug if it does the wrong
thing! https://github.com/PolymerLabs/tedium/issues

-->

[![Build Status](https://travis-ci.org/PolymerElements/marked-element.svg?branch=master)](https://travis-ci.org/PolymerElements/marked-element)

##<marked-element>

Element wrapper for the [marked](https://github.com/chjj/marked) library.

`<marked-element>` accepts Markdown source, and renders it to a child
element with the class `markdown-html`. This child element can be styled
as you would a normal DOM element. If you do not provide a child element
with the `markdown-html` class, the Markdown source will still be rendered,
but to a shadow DOM child that cannot be styled.

The Markdown source can be specified either via the `markdown` attribute:

```html
<marked-element markdown="`Markdown` is _awesome_!">
  <div class="markdown-html"></div>
</marked-element>
```

Or, you can provide it via a `<script type="text/markdown">` element child:

```html
<marked-element>
  <div class="markdown-html"></div>
  <script type="text/markdown">
    Check out my markdown!

    We can even embed elements without fear of the HTML parser mucking up their
    textual representation:

    ```html
    <awesome-sauce>
      <div>Oops, I'm about to forget to close this div.
    </awesome-sauce>
    ```
  </script>
</marked-element>
```

Note that the `<script type="text/markdown">` approach is *static*. Changes to
the script content will *not* update the rendered markdown!

### Styling

If you are using a child with the `markdown-html` class, you can style it
as you would a regular DOM element:

```css
.markdown-html p {
  color: red;
}

.markdown-html td:first-child {
  padding-left: 24px;
}
```


text:
<?php

/**
 * users module helper.
 *
 * @package    blueprint
 * @subpackage users
 * @author     Your name here
 * @version    SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class usersGeneratorHelper extends BaseUsersGeneratorHelper
{
}