text:
package org.apache.jackrabbit.oak.plugins.document.rdb;

import static org.apache.jackrabbit.oak.plugins.document.rdb.RDBJDBCTools.closeResultSet;
import static org.apache.jackrabbit.oak.plugins.document.rdb.RDBJDBCTools.closeStatement;

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Nonnull;

import org.apache.jackrabbit.oak.plugins.document.rdb.RDBJDBCTools.PreparedStatementComponent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Defines variation in the capabilities of different RDBs.
 */
public enum RDBDocumentStoreDB {

    DEFAULT("default") {
    },

    H2("H2") {
        @Override
        public String checkVersion(DatabaseMetaData md) throws SQLException {
            return RDBJDBCTools.versionCheck(md, 1, 4, description);
        }

        @Override
        public String getInitializationStatement() {
            return "create alias if not exists unix_timestamp as $$ long unix_timestamp() { return System.currentTimeMillis()/1000L; } $$;";
        }

        @Override
        public String getCurrentTimeStampInSecondsSyntax() {
            return "select unix_timestamp()";
        }
    },

    DERBY("Apache Derby") {
        @Override
        public String checkVersion(DatabaseMetaData md) throws SQLException {
            return RDBJDBCTools.versionCheck(md, 10, 11, description);
        }

        @Override
        public boolean allowsCaseInSelect() {
            return false;
        }
    },

    POSTGRES("PostgreSQL") {
        @Override
        public String checkVersion(DatabaseMetaData md) throws SQLException {
            String result = RDBJDBCTools.versionCheck(md, 9, 5, 9, 4, description);

            if (result.isEmpty()) {
                // special case: we need 9.4.1208 or newer (see OAK-3977)
                if (md.getDriverMajorVersion() == 9 && md.getDriverMinorVersion() == 4) {
                    String versionString = md.getDriverVersion();
                    String scanfor = "9.4.";
                    int p = versionString.indexOf(scanfor);
                    if (p >= 0) {
                        StringBuilder build = new StringBuilder();
                        for (char c : versionString.substring(p + scanfor.length()).toCharArray()) {
                            if (c >= '0' && c <= '9') {
                                build.append(c);
                            } else {
                                break;
                            }
                        }
                        if (Integer.parseInt(build.toString()) < 1208) {
                            result = "Unsupported " + description + " driver version: " + md.getDriverVersion() + ", found build "
                                    + build + ", but expected at least build 1208";
                        }
                    }
                }
            }

            return result;
        }

        @Override
        public String getCurrentTimeStampInSecondsSyntax() {
            return "select extract(epoch from now())::integer";
        }

        @Override
        public String getTableCreationStatement(String tableName) {
            return ("create table " + tableName + " (ID varchar(512) not null primary key, MODIFIED bigint, HASBINARY smallint, DELETEDONCE smallint, MODCOUNT bigint, CMODCOUNT bigint, DSIZE bigint, DATA varchar(16384), BDATA bytea)");
        }

        @Override
        public String getAdditionalDiagnostics(RDBConnectionHandler ch, String tableName) {
            Connection con = null;
            PreparedStatement stmt = null;
            ResultSet rs = null;
            Map<String, String> result = new HashMap<String, String>();
            try {
                con = ch.getROConnection();
                String cat = con.getCatalog();
                stmt = con.prepareStatement("SELECT pg_encoding_to_char(encoding), datcollate FROM pg_database WHERE datname=?");
                stmt.setString(1, cat);
                rs = stmt.executeQuery();
                while (rs.next()) {
                    result.put("pg_encoding_to_char(encoding)", rs.getString(1));
                    result.put("datcollate", rs.getString(2));
                }
                con.commit();
            } catch (SQLException ex) {
                LOG.debug("while getting diagnostics", ex);
            } finally {
                closeResultSet(rs);
                closeStatement(stmt);
                ch.closeConnection(con);
            }
            return result.toString();
        }
    },

    DB2("DB2") {
        @Override
        public String checkVersion(DatabaseMetaData md) throws SQLException {
            return RDBJDBCTools.versionCheck(md, 10, 5, description);
        }

        @Override
        public String getCurrentTimeStampInSecondsSyntax() {
            return "select cast (days(current_timestamp - current_timezone) - days('1970-01-01') as integer) * 86400 + midnight_seconds(current_timestamp - current_timezone) from sysibm.sysdummy1";
        }

        public String getTableCreationStatement(String tableName) {
            return "create table " + tableName
                    + " (ID varchar(512) not null, MODIFIED bigint, HASBINARY smallint, DELETEDONCE smallint, MODCOUNT bigint, CMODCOUNT bigint, DSIZE bigint, DATA varchar(16384), BDATA blob("
                    + 1024 * 1024 * 1024 + "))";
        }

        public List<String> getIndexCreationStatements(String tableName) {
            List<String> statements = new ArrayList<String>();
            String pkName = tableName + "_pk";
            statements.add("create unique index " + pkName + " on " + tableName + " ( ID ) cluster");
            statements.add("alter table " + tableName + " add constraint " + pkName + " primary key ( ID )");
            statements.addAll(super.getIndexCreationStatements(tableName));
            return statements;
        }

        @Override
        public String getAdditionalDiagnostics(RDBConnectionHandler ch, String tableName) {
            Connection con = null;
            PreparedStatement stmt = null;
            ResultSet rs = null;
            Map<String, String> result = new HashMap<String, String>();
            try {
                con = ch.getROConnection();

                // schema name will only be available with JDK 1.7
                String conSchema = ch.getSchema(con);

                StringBuilder sb = new StringBuilder();
                sb.append("SELECT CODEPAGE, COLLATIONSCHEMA, COLLATIONNAME, TABSCHEMA FROM SYSCAT.COLUMNS WHERE COLNAME=? and COLNO=0 AND UPPER(TABNAME)=UPPER(?)");
                if (conSchema != null) {
                    conSchema = conSchema.trim();
                    sb.append(" AND UPPER(TABSCHEMA)=UPPER(?)");
                }
                stmt = con.prepareStatement(sb.toString());
                stmt.setString(1, "ID");
                stmt.setString(2, tableName);
                if (conSchema != null) {
                    stmt.setString(3, conSchema);
                }

                rs = stmt.executeQuery();
                while (rs.next() && result.size() < 20) {
                    String schema = rs.getString("TABSCHEMA").trim();
                    result.put(schema + ".CODEPAGE", rs.getString("CODEPAGE").trim());
                    result.put(schema + ".COLLATIONSCHEMA", rs.getString("COLLATIONSCHEMA").trim());
                    result.put(schema + ".COLLATIONNAME", rs.getString("COLLATIONNAME").trim());
                }
                stmt.close();
                con.commit();
            } catch (SQLException ex) {
                LOG.debug("while getting diagnostics", ex);
            } finally {
                closeResultSet(rs);
                closeStatement(stmt);
                ch.closeConnection(con);
            }
            return result.toString();
        }
    },

    ORACLE("Oracle") {
        @Override
        public String checkVersion(DatabaseMetaData md) throws SQLException {
            return RDBJDBCTools.versionCheck(md, 12, 1, 12, 1, description);
        }

        @Override
        public String getCurrentTimeStampInSecondsSyntax() {
            return "select (trunc(sys_extract_utc(systimestamp)) - to_date('01/01/1970', 'MM/DD/YYYY')) * 24 * 60 * 60 + to_number(to_char(sys_extract_utc(systimestamp), 'SSSSS')) from dual";
        }

        @Override
        public String getInitializationStatement() {
            // see https://issues.apache.org/jira/browse/OAK-1914
            // for some reason, the default for NLS_SORT is incorrect
            return ("ALTER SESSION SET NLS_SORT='BINARY'");
        }

        @Override
        public String getTableCreationStatement(String tableName) {
            // see https://issues.apache.org/jira/browse/OAK-1914
            return ("create table " + tableName + " (ID varchar(512) not null primary key, MODIFIED number, HASBINARY number, DELETEDONCE number, MODCOUNT number, CMODCOUNT number, DSIZE number, DATA varchar(4000), BDATA blob)");
        }

        @Override
        public String getAdditionalDiagnostics(RDBConnectionHandler ch, String tableName) {
            Connection con = null;
            Statement stmt = null;
            ResultSet rs = null;
            Map<String, String> result = new HashMap<String, String>();
            try {
                con = ch.getROConnection();
                stmt = con.createStatement();
                rs = stmt
                        .executeQuery("SELECT PARAMETER, VALUE from NLS_DATABASE_PARAMETERS WHERE PARAMETER IN ('NLS_COMP', 'NLS_CHARACTERSET')");
                while (rs.next()) {
                    result.put(rs.getString(1), rs.getString(2));
                }
                stmt.close();
                con.commit();
            } catch (SQLException ex) {
                LOG.debug("while getting diagnostics", ex);
            } finally {
                closeResultSet(rs);
                closeStatement(stmt);
                ch.closeConnection(con);
            }
            return result.toString();
        }
    },

    MYSQL("MySQL") {
        @Override
        public String checkVersion(DatabaseMetaData md) throws SQLException {
            return RDBJDBCTools.versionCheck(md, 5, 5, description);
        }

        @Override
        public String getCurrentTimeStampInSecondsSyntax() {
            return "select unix_timestamp()";
        }

        @Override
        public String getTableCreationStatement(String tableName) {
            // see https://issues.apache.org/jira/browse/OAK-1913
            return ("create table " + tableName + " (ID varbinary(512) not null primary key, MODIFIED bigint, HASBINARY smallint, DELETEDONCE smallint, MODCOUNT bigint, CMODCOUNT bigint, DSIZE bigint, DATA varchar(16000), BDATA longblob)");
        }

        @Override
        public FETCHFIRSTSYNTAX getFetchFirstSyntax() {
            return FETCHFIRSTSYNTAX.LIMIT;
        }

        @Override
        public PreparedStatementComponent getConcatQuery(final String appendData, final int dataOctetLimit) {
            return new PreparedStatementComponent() {

                @Override
                public String getStatementComponent() {
                    return "CONCAT(DATA, ?)";
                }

                @Override
                public int setParameters(PreparedStatement stmt, int startIndex) throws SQLException {
                    stmt.setString(startIndex++, appendData);
                    return startIndex;
                }
            };
        }

        @Override
        public String getAdditionalDiagnostics(RDBConnectionHandler ch, String tableName) {
            Connection con = null;
            PreparedStatement stmt = null;
            ResultSet rs = null;
            Map<String, String> result = new HashMap<String, String>();
            try {
                con = ch.getROConnection();
                stmt = con.prepareStatement("SHOW TABLE STATUS LIKE ?");
                stmt.setString(1, tableName);
                rs = stmt.executeQuery();
                while (rs.next()) {
                    result.put("collation", rs.getString("Collation"));
                }
                rs.close();
                stmt.close();
                stmt = con.prepareStatement(
                        "SHOW VARIABLES WHERE variable_name LIKE 'character\\_set\\_%' OR variable_name LIKE 'collation%' OR variable_name = 'max_allowed_packet'");
                rs = stmt.executeQuery();
                while (rs.next()) {
                    result.put(rs.getString(1), rs.getString(2));
                }
                rs.close();
                stmt.close();
                con.commit();
            } catch (SQLException ex) {
                LOG.debug("while getting diagnostics", ex);
            } finally {
                closeResultSet(rs);
                closeStatement(stmt);
                ch.closeConnection(con);
            }
            return result.toString();
        }
    },

    MSSQL("Microsoft SQL Server") {
        @Override
        public String checkVersion(DatabaseMetaData md) throws SQLException {
            return RDBJDBCTools.versionCheck(md, 11, 0, description);
        }

        @Override
        public String getTableCreationStatement(String tableName) {
            // see https://issues.apache.org/jira/browse/OAK-2395
            return ("create table " + tableName + " (ID varbinary(512) not null primary key, MODIFIED bigint, HASBINARY smallint, DELETEDONCE smallint, MODCOUNT bigint, CMODCOUNT bigint, DSIZE bigint, DATA nvarchar(4000), BDATA varbinary(max))");
        }

        @Override
        public FETCHFIRSTSYNTAX getFetchFirstSyntax() {
            return FETCHFIRSTSYNTAX.TOP;
        }

        @Override
        public PreparedStatementComponent getConcatQuery(final String appendData, final int dataOctetLimit) {
            return new PreparedStatementComponent() {

                @Override
                // this statement ensures that SQL server will generate an exception on overflow
                public String getStatementComponent() {
                    return "CASE WHEN LEN(DATA) < ? THEN (DATA + CAST(? AS nvarchar(" + dataOctetLimit
                            + "))) ELSE (DATA + CAST(DATA AS nvarchar(max))) END";
                }

                @Override
                public int setParameters(PreparedStatement stmt, int startIndex) throws SQLException {
                    stmt.setInt(startIndex++, dataOctetLimit - appendData.length());
                    stmt.setString(startIndex++, appendData);
                    return startIndex;
                }
            };
        }

        @Override
        public String getCurrentTimeStampInSecondsSyntax() {
            return "select datediff(second, dateadd(second, datediff(second, getutcdate(), getdate()), '1970-01-01'), getdate())";
        }

        @Override
        public String getAdditionalDiagnostics(RDBConnectionHandler ch, String tableName) {
            Connection con = null;
            PreparedStatement stmt = null;
            ResultSet rs = null;
            Map<String, String> result = new HashMap<String, String>();
            try {
                con = ch.getROConnection();
                String cat = con.getCatalog();
                stmt = con.prepareStatement("SELECT collation_name FROM sys.databases WHERE name=?");
                stmt.setString(1, cat);
                rs = stmt.executeQuery();
                while (rs.next()) {
                    result.put("collation_name", rs.getString(1));
                }
                rs.close();
                stmt.close();
                con.commit();
            } catch (SQLException ex) {
                LOG.debug("while getting diagnostics", ex);
            } finally {
                closeResultSet(rs);
                closeStatement(stmt);
                ch.closeConnection(con);
            }
            return result.toString();
        }
    };

    private static final Logger LOG = LoggerFactory.getLogger(RDBDocumentStoreDB.class);

    // whether to create indices
    private static final String CREATEINDEX = System.getProperty(
            "org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.CREATEINDEX", "");

    public enum FETCHFIRSTSYNTAX {
        FETCHFIRST, LIMIT, TOP
    };

    /**
     * Check the database brand and version
     */
    public String checkVersion(DatabaseMetaData md) throws SQLException {
        return "Unknown database type: " + md.getDatabaseProductName();
    }

    /**
     * Allows case in select. Default true.
     */
    public boolean allowsCaseInSelect() {
        return true;
    }

    /**
     * Query syntax for "FETCH FIRST"
     */
    public FETCHFIRSTSYNTAX getFetchFirstSyntax() {
        return FETCHFIRSTSYNTAX.FETCHFIRST;
    }

    /**
     * Query syntax for current time in ms since the epoch
     *
     * @return the query syntax or empty string when no such syntax is available
     */
    public String getCurrentTimeStampInSecondsSyntax() {
        // unfortunately, we don't have a portable statement for this
        return "";
    }

    /**
     * Returns the CONCAT function or its equivalent function or sub-query. Note
     * that the function MUST NOT cause a truncated value to be written!
     *
     * @param appendData
     *            string to be inserted
     * @param dataOctetLimit
     *            expected capacity of data column
     */
    public PreparedStatementComponent getConcatQuery(final String appendData, final int dataOctetLimit) {

        return new PreparedStatementComponent() {

            @Override
            public String getStatementComponent() {
                return "DATA || CAST(? AS varchar(" + dataOctetLimit + "))";
            }

            @Override
            public int setParameters(PreparedStatement stmt, int startIndex) throws SQLException {
                stmt.setString(startIndex++, appendData);
                return startIndex;
            }
        };
    }

    /**
     * Query for any required initialization of the DB.
     *
     * @return the DB initialization SQL string
     */
    public @Nonnull String getInitializationStatement() {
        return "";
    }

    /**
     * Table creation statement string
     *
     * @param tableName
     * @return the table creation string
     */
    public String getTableCreationStatement(String tableName) {
        return "create table "
                + tableName
                + " (ID varchar(512) not null primary key, MODIFIED bigint, HASBINARY smallint, DELETEDONCE smallint, MODCOUNT bigint, CMODCOUNT bigint, DSIZE bigint, DATA varchar(16384), BDATA blob("
                + 1024 * 1024 * 1024 + "))";
    }

    public List<String> getIndexCreationStatements(String tableName) {
        if (CREATEINDEX.equals("modified-id")) {
            return Collections.singletonList("create index " + tableName + "_MI on " + tableName + " (MODIFIED, ID)");
        } else if (CREATEINDEX.equals("id-modified")) {
            return Collections.singletonList("create index " + tableName + "_MI on " + tableName + " (ID, MODIFIED)");
        } else if (CREATEINDEX.equals("modified")) {
            return Collections.singletonList("create index " + tableName + "_MI on " + tableName + " (MODIFIED)");
        } else {
            return Collections.emptyList();
        }
    }

    public String getAdditionalDiagnostics(RDBConnectionHandler ch, String tableName) {
        return "";
    }

    protected String description;

    private RDBDocumentStoreDB(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return this.description;
    }

    @Nonnull
    public static RDBDocumentStoreDB getValue(String desc) {
        for (RDBDocumentStoreDB db : RDBDocumentStoreDB.values()) {
            if (db.description.equals(desc)) {
                return db;
            } else if (db == DB2 && desc.startsWith("DB2/")) {
                return db;
            }
        }

        LOG.error("DB type " + desc + " unknown, trying default settings");
        DEFAULT.description = desc + " - using default settings";
        return DEFAULT;
    }
}


text:
using MetaDslx.CodeAnalysis.Symbols;
using MetaDslx.VisualStudio.Compilation;
using MetaDslx.VisualStudio.Utilities;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.PooledObjects;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Tagging;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace MetaDslx.VisualStudio.Classification
{
    internal class ReferencesTagger : ITagger<ReferencesTag>
    {
        private ITextBuffer _textBuffer;
        private MetaDslxTaggerProvider _taggerProvider;
        private BackgroundCompilation _backgroundCompilation;
        private SymbolReferencesResult _symbols;

        public ReferencesTagger(MetaDslxMefServices mefServices, MetaDslxTaggerProvider taggerProvider, ITextBuffer textBuffer)
        {
            _taggerProvider = taggerProvider;
            _textBuffer = textBuffer;
            _backgroundCompilation = BackgroundCompilation.GetOrCreate(mefServices, textBuffer);
            _backgroundCompilation.CompilationChanged += CompilationChanged;
        }

        public static ReferencesTagger GetOrCreate(MetaDslxMefServices mefServices, MetaDslxTaggerProvider taggerProvider, ITextBuffer textBuffer)
        {
            return textBuffer.Properties.GetOrCreateSingletonProperty(() => new ReferencesTagger(
                mefServices,
                taggerProvider,
                textBuffer
            ));
        }

        public event EventHandler<SnapshotSpanEventArgs> TagsChanged;

        protected virtual void CompilationChanged(object sender, EventArgs e)
        {
            var compilationSnapshot = _backgroundCompilation.CompilationSnapshot;
            var symbols = compilationSnapshot.GetCompilationStepResult<SymbolReferencesResult>();
            if (_symbols != symbols)
            {
                Interlocked.Exchange(ref _symbols, symbols);
                ITextSnapshot textSnapshot = compilationSnapshot.Text;
                this.TagsChanged?.Invoke(this, new SnapshotSpanEventArgs(new SnapshotSpan(textSnapshot, Span.FromBounds(0, textSnapshot.Length))));
            }
        }

        public IEnumerable<ITagSpan<ReferencesTag>> GetTags(NormalizedSnapshotSpanCollection spans)
        {
            var compilationSnapshot = _backgroundCompilation.CompilationSnapshot;
            var symbols = compilationSnapshot?.GetCompilationStepResult<SymbolReferencesResult>();
            if (symbols == null) yield break;
            ITextSnapshot textSnapshot = compilationSnapshot.Text;
            if (textSnapshot == null || spans.Count == 0 || spans.First().Snapshot.Version != textSnapshot.Version) yield break;
            foreach (var symbol in symbols.Symbols)
            {
                var definitions = symbols.GetNameDefinitions(symbol);
                foreach (var defSpan in definitions)
                {
                    if (spans.IntersectsWith(defSpan))
                    {
                        var references = symbols.GetReferences(symbol);
                        yield return new TagSpan<ReferencesTag>(defSpan, new ReferencesTag(references));
                    }
                }
            }
        }

    }
}

redpajama_set_name: RedPajamaGithub


text:
"""Top-level presubmit script.

See https://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on the presubmit API built into depot_tools.
"""

import os
import sys

def PreCommitGo(input_api, output_api, pcg_mode):
  """Run go-specific checks via pre-commit-go (pcg) if it's in PATH."""
  if input_api.is_committing:
    error_type = output_api.PresubmitError
  else:
    error_type = output_api.PresubmitPromptWarning

  exe = 'pcg.exe' if sys.platform == 'win32' else 'pcg'
  pcg = None
  for p in os.environ['PATH'].split(os.pathsep):
    pcg = os.path.join(p, exe)
    if os.access(pcg, os.X_OK):
      break
  else:
    return [
      error_type(
        'pre-commit-go executable (pcg) could not be found in PATH. All Go '
        'checks are skipped. See https://github.com/maruel/pre-commit-go.')
    ]

  cmd = [pcg, 'run', '-m', ','.join(pcg_mode)]
  if input_api.verbose:
    cmd.append('-v')
  # pcg can figure out what files to check on its own based on upstream ref,
  # but on PRESUBMIT try builder upsteram isn't set, and it's just 1 commit.
  if os.getenv('PRESUBMIT_BUILDER', ''):
    cmd.extend(['-r', 'HEAD~1'])
  return input_api.RunTests([
    input_api.Command(
      name='pre-commit-go: %s' % ', '.join(pcg_mode),
      cmd=cmd,
      kwargs={},
      message=error_type),
  ])

def header(input_api):
  """Returns the expected license header regexp for this project."""
  current_year = int(input_api.time.strftime('%Y'))
  allowed_years = (str(s) for s in reversed(xrange(2011, current_year + 1)))
  years_re = '(' + '|'.join(allowed_years) + ')'
  license_header = (
    r'.*? Copyright %(year)s The Chromium Authors\. '
    r'All rights reserved\.\n'
    r'.*? Use of this source code is governed by a BSD-style license '
    r'that can be\n'
    r'.*? found in the LICENSE file\.(?: \*/)?\n'
  ) % {
    'year': years_re,
  }
  return license_header

def source_file_filter(input_api):
  """Returns filter that selects source code files only."""
  bl = list(input_api.DEFAULT_BLACK_LIST) + [
    r'.+\.pb\.go$',
    r'.+_string\.go$',
  ]
  wl = list(input_api.DEFAULT_WHITE_LIST) + [
    r'.+\.go$',
  ]
  return lambda x: input_api.FilterSourceFile(x, white_list=wl, black_list=bl)

def CommonChecks(input_api, output_api):
  results = []
  results.extend(
    input_api.canned_checks.CheckChangeHasNoStrayWhitespace(
      input_api, output_api,
      source_file_filter=source_file_filter(input_api)))
  results.extend(
    input_api.canned_checks.CheckLicense(
      input_api, output_api, header(input_api),
      source_file_filter=source_file_filter(input_api)))
  return results

def CheckChangeOnUpload(input_api, output_api):
  results = CommonChecks(input_api, output_api)
  results.extend(PreCommitGo(input_api, output_api, ['lint', 'pre-commit']))
  return results

def CheckChangeOnCommit(input_api, output_api):
  results = CommonChecks(input_api, output_api)
  results.extend(input_api.canned_checks.CheckChangeHasDescription(
      input_api, output_api))
  results.extend(input_api.canned_checks.CheckDoNotSubmitInDescription(
      input_api, output_api))
  results.extend(input_api.canned_checks.CheckDoNotSubmitInFiles(
      input_api, output_api))
  results.extend(PreCommitGo(
      input_api, output_api, ['continuous-integration']))
  return results


text:
<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title> 加载事件 </title>
    <script type="text/javascript">
        function message(){
            alert("加载中,请稍等…"); }
    </script>
</head>
<body onload="message()">
欢迎学习JavaScript。
</body>
</html>


text:
package com.netflix.genie.core.metrics.impl;

import com.netflix.genie.common.exceptions.GenieException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import java.util.concurrent.atomic.AtomicLong;

/**
 * Test case for GenieNodeStatistics.
 *
 * @author skrishnan
 * @author tgianos
 */
public class TestGenieNodeStatisticsImpl {

    private GenieNodeStatisticsImpl stats;

    /**
     * Setup the tests.
     */
    @Before
    public void setup() {
        this.stats = new GenieNodeStatisticsImpl();
    }

    /**
     * Test the initialize method.
     */
    @Test
    public void testInitialize() {
        this.stats.initialize();
    }

    /**
     * Test the shutdown method.
     */
    @Test
    public void testShutdown() {
        this.stats.shutdown();
    }

    /**
     * Test the counter that increments 200 error codes (success).
     */
    @Test
    public void test2xxCounter() {
        // incr 2xx count twice
        this.stats.setGenie2xxCount(new AtomicLong(0));
        this.stats.incrGenie2xxCount();
        this.stats.incrGenie2xxCount();
        Assert.assertEquals(2L, this.stats.getGenie2xxCount().longValue());
    }

    /**
     * Test the counter that increments 400 error codes (~bad requests).
     */
    @Test
    public void test4xxCounter() {
        // incr 4xx count 4 times
        this.stats.setGenie4xxCount(new AtomicLong(0));
        this.stats.incrGenie4xxCount();
        this.stats.incrGenie4xxCount();
        this.stats.incrGenie4xxCount();
        this.stats.incrGenie4xxCount();
        Assert.assertEquals(4L, this.stats.getGenie4xxCount().longValue());
    }

    /**
     * Test the counter that increments 500 error codes (server errors).
     */
    @Test
    public void test5xxCounter() {
        // incr 5xx count 5 times
        this.stats.setGenie5xxCount(new AtomicLong(0));
        this.stats.incrGenie5xxCount();
        this.stats.incrGenie5xxCount();
        this.stats.incrGenie5xxCount();
        this.stats.incrGenie5xxCount();
        this.stats.incrGenie5xxCount();
        Assert.assertEquals(5L, this.stats.getGenie5xxCount().longValue());
    }

    /**
     * Test the counter that increments job submissions.
     */
    @Test
    public void testJobSubCounter() {
        // incr job submissions once
        this.stats.setGenieJobSubmissions(new AtomicLong(0));
        this.stats.incrGenieJobSubmissions();
        Assert.assertEquals(1L, this.stats.getGenieJobSubmissions().longValue());
    }

    /**
     * Test the counter that increments job failures.
     */
    @Test
    public void testFailedJobCounter() {
        // incr failed jobs once
        this.stats.setGenieFailedJobs(new AtomicLong(0));
        this.stats.incrGenieFailedJobs();
        Assert.assertEquals(1L, this.stats.getGenieFailedJobs().longValue());
    }

    /**
     * Test the counter that increments job kills.
     */
    @Test
    public void testKilledJobCounter() {
        // incr killed jobs twice
        this.stats.setGenieKilledJobs(new AtomicLong(0));
        this.stats.incrGenieKilledJobs();
        this.stats.incrGenieKilledJobs();
        Assert.assertEquals(2L, this.stats.getGenieKilledJobs().longValue());
    }

    /**
     * Test the counter that increments job success.
     */
    @Test
    public void testSuccessJobCounter() {
        // incr successful jobs thrice
        this.stats.setGenieSuccessfulJobs(new AtomicLong(0));
        this.stats.incrGenieSuccessfulJobs();
        this.stats.incrGenieSuccessfulJobs();
        this.stats.incrGenieSuccessfulJobs();
        Assert.assertEquals(3L, this.stats.getGenieSuccessfulJobs().longValue());
    }

    /**
     * Test the counter that sets running job.
     *
     * @throws InterruptedException If the process is interrupted
     * @throws GenieException For any problem
     */
    @Test
    public void testRunningJobs() throws InterruptedException, GenieException {
        this.stats.setGenieRunningJobs(0);
        Assert.assertEquals(0, this.stats.getGenieRunningJobs().intValue());
    }

    /**
     * Test the counter for successful emails.
     */
    @Test
    public void testSuccessfulEmailCountCounter() {
        Assert.assertEquals(0L, this.stats.getSuccessfulEmailSentCount().get());
        this.stats.incrSuccessfulEmailCount();
        Assert.assertEquals(1L, this.stats.getSuccessfulEmailSentCount().get());
    }

    /**
     * Test the counter for failed emails.
     */
    @Test
    public void testFailedEmailCountCounter() {
        Assert.assertEquals(0L, this.stats.getFailedEmailSentCount().get());
        this.stats.incrFailedEmailCount();
        Assert.assertEquals(1L, this.stats.getFailedEmailSentCount().get());
    }

    /**
     * Test the counter for forwarded jobs.
     */
    @Test
    public void testGenieForwardedJobsCounter() {
        Assert.assertEquals(0L, this.stats.getGenieForwardedJobs().get());
        this.stats.incrGenieForwardedJobs();
        Assert.assertEquals(1L, this.stats.getGenieForwardedJobs().get());

        final long count = 584L;
        this.stats.setGenieForwardedJobs(new AtomicLong(count));
        Assert.assertEquals(count, this.stats.getGenieForwardedJobs().get());
    }

    /**
     * Test the counter for Genie running jobs 0 to 15 minutes.
     */
    @Test
    public void testGenieRunningJobs0To15mCounter() {
        Assert.assertEquals(0, this.stats.getGenieRunningJobs0To15m().get());
        final int count = 532;
        this.stats.setGenieRunningJobs0To15m(count);
        Assert.assertEquals(count, this.stats.getGenieRunningJobs0To15m().get());
    }

    /**
     * Test the counter for Genie running jobs 15 minutes to 2 hours.
     */
    @Test
    public void testGenieRunningJobs15mTo2hCounter() {
        Assert.assertEquals(0, this.stats.getGenieRunningJobs15mTo2h().get());
        final int count = 532;
        this.stats.setGenieRunningJobs15mTo2h(count);
        Assert.assertEquals(count, this.stats.getGenieRunningJobs15mTo2h().get());
    }

    /**
     * Test the counter for Genie running jobs 2 to 8 hours.
     */
    @Test
    public void testGenieRunningJobs2hTo8hCounter() {
        Assert.assertEquals(0, this.stats.getGenieRunningJobs2hTo8h().get());
        final int count = 53554;
        this.stats.setGenieRunningJobs2hTo8h(count);
        Assert.assertEquals(count, this.stats.getGenieRunningJobs2hTo8h().get());
    }

    /**
     * Test the counter for Genie running jobs 8 hours plus.
     */
    @Test
    public void testGenieRunningJobs8hPlusCounter() {
        Assert.assertEquals(0, this.stats.getGenieRunningJobs8hPlus().get());
        final int count = 5524;
        this.stats.setGenieRunningJobs8hPlus(count);
        Assert.assertEquals(count, this.stats.getGenieRunningJobs8hPlus().get());
    }

    /**
     * Test the counter for job submission retries.
     */
    @Test
    public void testJobSubmissionRetryCounter() {
        Assert.assertEquals(0L, this.stats.getJobSubmissionRetryCount().get());
        this.stats.incrJobSubmissionRetryCount();
        Assert.assertEquals(1L, this.stats.getJobSubmissionRetryCount().get());
    }
}


text:
password="password"

if [[ ! -f /usr/sbin/mysqld ]]; then
  rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
  yum install -y mysql-server mysql-devel
  service mysqld start
  chkconfig mysqld on
  mysql -u root -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${password}')"
fi


text:
import { refChange } from '../core/refChange';
import { ShareableBase } from './ShareableBase';

// Example of using ShareableBase as a base class in order to implement reference counting.
// When all references have been released, the destructor function is called.
/**
 * @hidden
 */
class Recyclable extends ShareableBase {
    // This flag is used to check that the destructor has been called.
    public isCleanedUp = false;
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    constructor(levelUp = 0) {
        super();
        this.setLoggingName('Recyclable');
        // You may then allocate resources here or in methods.
    }
    /**
     * This looks similar to the constructor.
     */
    protected resurrector(levelUp: number): void {
        // The first thing you should do is call the base class resurector, incrementing the level.
        super.resurrector(levelUp + 1);
        this.setLoggingName('Recyclable');
        // You may then re-allocate resources here or in methods.
    }
    protected destructor(levelUp: number): void {
        this.isCleanedUp = true;
        // The last thing you should do is to call the base class destructor, incrementing the level.
        super.destructor(levelUp + 1);
    }
}

/**
 * A mortal does not have a resurrector method.
 * We expect addRef on the zombie to throw an exception.
 * @hidden
 */
class Mortal extends ShareableBase {
    // This flag is used to check that the destructor has been called.
    public isCleanedUp = false;
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    constructor(levelUp = 0) {
        super();
        this.setLoggingName('Mortal');
        // You may then allocate resources here or in methods.
    }
    protected destructor(levelUp: number): void {
        this.isCleanedUp = true;
        // The last thing you should do is to call the base class destructor, incrementing the level.
        super.destructor(levelUp + 1);
    }
}

describe("ShareableBase", function () {
    describe("constructor", function () {
        it("destructor", function () {
            refChange('quiet');
            refChange('reset');
            refChange('quiet');
            refChange('start');
            const foo = new Recyclable();
            expect(foo.isCleanedUp).toBe(false);
            expect(foo.isZombie()).toBe(false);
            const refCount = foo.release();
            expect(refCount).toBe(0);
            expect(foo.isCleanedUp).toBe(true);
            expect(foo.isZombie()).toBe(true);
            refChange('stop');
            const outstanding = refChange('dump');
            expect(outstanding).toBe(0);
            refChange('quiet');
            refChange('reset');
        });
        it("resurrection of a Recyclable", function () {
            let refCount: number;
            let outstanding: number;
            refChange('quiet');
            refChange('reset');
            refChange('quiet');
            refChange('start');
            const foo = new Recyclable();
            expect(foo.isCleanedUp).toBe(false);
            expect(foo.isZombie()).toBe(false);
            refCount = foo.release();
            expect(refCount).toBe(0);
            expect(foo.isCleanedUp).toBe(true);
            expect(foo.isZombie()).toBe(true);
            refChange('stop');
            outstanding = refChange('dump');
            expect(outstanding).toBe(0);
            refChange('quiet');
            refChange('reset');
            // Here it comes...
            refChange('quiet');
            refChange('start');
            refCount = foo.addRef();
            expect(refCount).toBe(1);
            refCount = foo.release();
            expect(refCount).toBe(0);
            refChange('stop');
            outstanding = refChange('dump');
            expect(outstanding).toBe(0);
            refChange('quiet');
            refChange('reset');
        });
        it("resurrection of a Mortal", function () {
            let outstanding: number;
            refChange('quiet');
            refChange('reset');
            refChange('quiet');
            refChange('start');
            const foo = new Mortal();
            expect(foo.isCleanedUp).toBe(false);
            expect(foo.isZombie()).toBe(false);
            const refCount = foo.release();
            expect(refCount).toBe(0);
            expect(foo.isCleanedUp).toBe(true);
            expect(foo.isZombie()).toBe(true);
            refChange('stop');
            outstanding = refChange('dump');
            expect(outstanding).toBe(0);
            refChange('quiet');
            refChange('reset');
            // Here it comes...
            refChange('quiet');
            refChange('start');
            expect(function () { foo.addRef(); }).toThrow(new Error("`protected resurrector(levelUp: number): void` method should be implemented by `Mortal`."));
            refChange('stop');
            outstanding = refChange('dump');
            expect(outstanding).toBe(0);
            refChange('quiet');
            refChange('reset');
        });
    });
});


text:
import { UserPermission } from "./user-permission";

export class UserData {
    public id: number;
    public userName: string;
    public displayName: string;
    public permissions: UserPermission[];
}


text:
/*	$OpenBSD: ibcs2_wait.h,v 1.2 1996/08/02 20:35:19 niklas Exp $	*/
/*	$NetBSD: ibcs2_wait.h,v 1.2 1994/10/26 02:53:16 cgd Exp $	*/

/*
 * Copyright (c) 1994 Scott Bartram
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *      This product includes software developed by Scott Bartram.
 * 4. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef	_IBCS2_WAIT_H
#define	_IBCS2_WAIT_H

#define IBCS2_WUNTRACED		0x02
#define IBCS2_WNOHANG		0x01

#define IBCS2_WIFEXITED(stat)	((stat & 0xff) == 0)
#define IBCS2_WIFSIGNALED(stat)	((stat) && (stat == (stat & 0xff)))
#define IBCS2_WIFSTOPPED(stat)	((stat & 0xff) == 0x7f)

#define IBCS2_WEXITSTATUS(stat)	((stat >> 8) & 0xff)
#define IBCS2_WTERMSIG(stat)	(stat & 0x7f)
#define IBCS2_WSTOPSIG(stat)	((stat >> 8) & 0xff)

#endif /* _IBCS2_WAIT_H */


text:
<?php

namespace Oro\Bundle\SecurityBundle\Migrations\Schema\v1_0;

use Doctrine\DBAL\Schema\Schema;
use Oro\Bundle\MigrationBundle\Migration\Migration;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

class OroSecurityBundle implements Migration, ContainerAwareInterface
{
    /**
     * @var ContainerInterface
     */
    protected $container;

    /**
     * @inheritdoc
     */
    public function setContainer(ContainerInterface $container = null)
    {
        $this->container = $container;
    }

    /**
     * @inheritdoc
     */
    public function up(Schema $schema, QueryBag $queries)
    {
        //create symfony acl tables
        $this->container->get('security.acl.dbal.schema')->addToSchema($schema);
    }
}


text:
invoiced-go
========

This repository contains the Go client library for the [Invoiced](https://invoiced.com) API.

[![Build Status](https://travis-ci.com/Invoiced/invoiced-go.svg?branch=master)](https://travis-ci.com/Invoiced/invoiced-go)
[![Coverage Status](https://coveralls.io/repos/github/Invoiced/invoiced-go/badge.svg?branch=master)](https://coveralls.io/github/Invoiced/invoiced-go?branch=master)

## Installing

The Invoiced package can be installed like this:

```
go get -u https://github.com/Invoiced/invoiced-go/v2
```

## Requirements

- Go 1.11+

## Usage

First, you must instantiate a new client

```go
import "github.com/Invoiced/invoiced-go/v2/api"

client := api.New("API_KEY", false)
```

Then, API calls can be made like this:

```go
import "github.com/Invoiced/invoiced-go/v2"
import "fmt"

// Get all invoices with auto pagination
invoices, err := client.Invoice.ListAll(nil, nil)
if err != nil {
    panic(err)
}

// Let's print all the invoices
for _, invoice := range invoices {
    fmt.Println(invoice)
}

// Let's create a new customer
customer, err := client.Customer.Create(&invoiced.CustomerRequest{
	Name: invoiced.String("Test Customer")
})

if err != nil {
    panic(err)
}

fmt.Println("Customer Response => ", customer)

// Let's create a new invoice
invoice, err := client.Invoice.Create(&invoiced.InvoiceRequest{
    Customer: invoiced.Int64(customerResponse.Id),
    PaymentTerms: invoiced.String("NET 30"),
    Items: []*invoiced.LineItemRequest{
        {
            Description: invoiced.String("Retina MacBook Pro"),
            Quantity: invoiced.Float64(5),
            UnitCost: invoiced.Float64(1999.22),
        },
    },
})

if err != nil {
    panic(err)
}

fmt.Println("Invoice Response => ", invoice)
```

If you want to use the sandbox API instead then you must set the second argument on the client to `true` like this:

```go
client := api.New("SANDBOX_API_KEY", false)
```

## Developing

The test suite can be run with:

```
go test ./...
```


text:
[![CI Status](http://img.shields.io/travis/gabrielvieira/TFStepProgress.svg?style=flat)](https://travis-ci.org/gabrielvieira/TFStepProgress)
[![Version](https://img.shields.io/cocoapods/v/TFStepProgress.svg?style=flat)](http://cocoapods.org/pods/TFStepProgress)
[![License](https://img.shields.io/cocoapods/l/TFStepProgress.svg?style=flat)](http://cocoapods.org/pods/TFStepProgress)
[![Platform](https://img.shields.io/cocoapods/p/TFStepProgress.svg?style=flat)](http://cocoapods.org/pods/TFStepProgress)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

## Installation

TFStepProgress is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "TFStepProgress"
```

## Author

gabrielvieira, viera_frifri@hotmail.com

## License

TFStepProgress is available under the MIT license. See the LICENSE file for more info.


text:
if [ ! -n "$SDIRS" ]; then
    SDIRS=~/.sdirs
fi
touch $SDIRS

RED="0;31m"
GREEN="0;33m"

# save current directory to bookmarks
function save_mark {
    check_help $1
    _bookmark_name_valid "$@"
    if [ -z "$exit_message" ]; then
        _purge_line "$SDIRS" "export DIR_$1="
        CURDIR=$(echo $PWD| sed "s#^$HOME#\$HOME#g")
        echo "export DIR_$1=\"$CURDIR\"" >> $SDIRS
    fi
}

# jump to bookmark
function f {
    check_help $1
    source $SDIRS
    target="$(eval $(echo echo $(echo \$DIR_$1)))"
    if [ -d "$target" ]; then
        cd "$target"
    elif [ ! -n "$target" ]; then
        echo -e "\033[${RED}WARNING: '${1}' bashmark does not exist\033[00m"
    else
        echo -e "\033[${RED}WARNING: '${target}' does not exist\033[00m"
    fi
}

# print bookmark
function print_mark {
    check_help $1
    source $SDIRS
    echo "$(eval $(echo echo $(echo \$DIR_$1)))"
}

# delete bookmark
function delete_mark {
    check_help $1
    _bookmark_name_valid "$@"
    if [ -z "$exit_message" ]; then
        _purge_line "$SDIRS" "export DIR_$1="
        unset "DIR_$1"
    fi
}

# print out help for the forgetful
function check_help {
    if [ "$1" = "-h" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ] ; then
        echo ''
        echo 'save_makr <bookmark_name> - Saves the current directory as "bookmark_name"'
        echo 'g <bookmark_name> - Goes (cd) to the directory associated with "bookmark_name"'
        echo 'print_mark <bookmark_name> - Prints the directory associated with "bookmark_name"'
        echo 'delete_mark <bookmark_name> - Deletes the bookmark'
        echo 'list_mark                 - Lists all available bookmarks'
        kill -SIGINT $$
    fi
}

# list bookmarks with dirnam
function list_mark {
    check_help $1
    source $SDIRS

    # if color output is not working for you, comment out the line below '\033[1;32m' == "red"
    env | sort | awk '/DIR_.+/{split(substr($0,5),parts,"="); printf("\033[0;33m%-20s\033[0m %s\n", parts[1], parts[2]);}'

    # uncomment this line if color output is not working with the line above
    # env | grep "^DIR_" | cut -c5- | sort |grep "^.*="
}
# list bookmarks without dirname
function _l {
    source $SDIRS
    env | grep "^DIR_" | cut -c5- | sort | grep "^.*=" | cut -f1 -d "="
}

# validate bookmark name
function _bookmark_name_valid {
    exit_message=""
    if [ -z $1 ]; then
        exit_message="bookmark name required"
        echo $exit_message
    elif [ "$1" != "$(echo $1 | sed 's/[^A-Za-z0-9_]//g')" ]; then
        exit_message="bookmark name is not valid"
        echo $exit_message
    fi
}

# completion command
function _comp {
    local curw
    COMPREPLY=()
    curw=${COMP_WORDS[COMP_CWORD]}
    COMPREPLY=($(compgen -W '`_l`' -- $curw))
    return 0
}

# ZSH completion command
function _compzsh {
    reply=($(_l))
}

# safe delete line from sdirs
function _purge_line {
    if [ -s "$1" ]; then
        # safely create a temp file
        t=$(mktemp -t bashmarks.XXXXXX) || exit 1
        trap "rm -f -- '$t'" EXIT

        # purge line
        sed "/$2/d" "$1" > "$t"
        mv "$t" "$1"

        # cleanup temp file
        rm -f -- "$t"
        trap - EXIT
    fi
}

# bind completion command for g,p,d to _comp
if [ $ZSH_VERSION ]; then
    compctl -K _compzsh f
    compctl -K _compzsh print_mark
    compctl -K _compzsh delete_mark
else
    shopt -s progcomp
    complete -F _comp f
    complete -F _comp print_mark
    complete -F _comp delete_mark
fi


text:
class AddFirstLetterToOtherResources < ActiveRecord::Migration
  def self.up
    add_column :data_files,:first_letter,:string,:limit => 1
    add_column :data_file_versions,:first_letter,:string,:limit => 1
    add_column :models,:first_letter,:string,:limit => 1
    add_column :model_versions,:first_letter,:string,:limit => 1
    add_column :sops,:first_letter,:string,:limit => 1
    add_column :sop_versions,:first_letter,:string,:limit => 1
    add_column :assays,:first_letter,:string,:limit => 1
    add_column :studies,:first_letter,:string,:limit => 1
    add_column :investigations,:first_letter,:string,:limit => 1
  end

  def self.down
    remove_column :data_files,:first_letter
    remove_column :models,:first_letter
    remove_column :sops,:first_letter
    remove_column :data_file_versions,:first_letter
    remove_column :model_versions,:first_letter
    remove_column :sop_versions,:first_letter
    remove_column :assays,:first_letter
    remove_column :studies,:first_letter
    remove_column :investigations,:first_letter
  end
end


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Servicio extends CI_Controller {

	public function __construct()
    {
        parent::__construct();
        $this->load->model('grocery_CRUD_model');
        $this->load->database();
        $this->load->helper('url');
        $this->load->library('grocery_CRUD');

		     $session_data = $this->session->userdata('logged_in');
    }

    public function Crear()
		{
			$this->load->model('ModeloServicio');
			$session_data = $this->session->userdata('logged_in');
			if($session_data['rol_id']!='2')
				{
					redirect(base_url().'Login');
				}

			$data['EA'] = $this->ModeloServicio->EstadoA();
			$data['Resp'] = $this->ModeloServicio->Responsable();
			$data['Ser'] = $this->ModeloServicio->TServicio();
			$data['Asis'] = $this->ModeloServicio->Asistente();
			$data['Cli'] = $this->ModeloServicio->Clientes();

			$this->load->view('Head');
			$this->load->view('service/Crear',$data);
		}

	public function Insertar()
		{

			 $session_data = $this->session->userdata('logged_in');

			if($session_data['rol_id']!='2')
				{
					redirect(base_url().'Login');
				}

			$letra1 = $this->LetraAleatoria();
			$letra2 = $this->LetraAleatoria();
			$letra3 = $this->LetraAleatoria();
			$letra4 = $this->LetraAleatoria();
			$letra5 = $this->LetraAleatoria();
			$letra6 = $this->LetraAleatoria();

			$codbarra = date('Y').$letra2.$letra3.$letra4.$letra5.$this->input->post('servicio');

			$data = array(
					'codbarra'=>$codbarra,
					'tipo_servicio'=>$this->input->post('Ser'),
					'estado'=>$this->input->post('Est'),
					'responsable' => $session_data['id'],
					'asistente' => $this->input->post('Asis'),
					'cliente' => $this->input->post('Cli'),
					'maquina' => $this->input->post('Maq'),
					'descripcion' => $this->input->post('Desc'),
					'compromisos'=>$this->input->post('Comp')
			    );

			if($this->db->insert('servicio',$data))
				{
					redirect('Servicio/Consultar');
				}

		}

	public function LetraAleatoria(){
		$mis_letras = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N', 'O','P','Q','R','S','T','U','V','W','X','Y','Z');
		$num_aleatorio = mt_rand(0, 25);
		return $mis_letras[$num_aleatorio];
	}

	public function Consultar()
		{
			$this->load->model('ModeloServicio');
			$session_data = $this->session->userdata('logged_in');
			if($session_data['rol_id']!='2')
				{
					redirect(base_url().'Login');
				}
			$datos['EA'] = $this->ModeloServicio->EstadoA();
			$datos['Resp'] = $this->ModeloServicio->Responsable();
			$datos['Ser'] = $this->ModeloServicio->TServicio();
			$datos['Asis'] = $this->ModeloServicio->Asistente();
			$datos['Cli'] = $this->ModeloServicio->Clientes();
			$datos['Componente']= $this->ModeloServicio->ComponentesUsados();
			$datos['service']= $this->ModeloServicio->Servicio();

			$this->load->view('Head');
			$this->load->view('service/Consultar',$datos);

		}

	public function Ver($id=null)
		{
			$this->load->model('ModeloServicio');
			$session_data = $this->session->userdata('logged_in');
			if($session_data['rol_id']!='2')
				{
					redirect(base_url().'Login');
				}

			/*$this->db->where('id',$id);
			$this->db->select('*');
			$datos['ser'] = $this->db->get('servicio')->result();*/

			$this->db->where('servicio.id',$id);
			$datos['ser']= $this->ModeloServicio->Servicio();

			$this->load->view('Head');
			$this->load->view('service/Ver',$datos);
		}

	public function Editar($id=null)
		{
			$this->load->model('ModeloServicio');
			$session_data = $this->session->userdata('logged_in');
			if($session_data['rol_id']!='2')
				{
					redirect(base_url().'Login');
				}

			$this->db->where('id',$id);
			$datos['ser'] = $this->db->get('servicio')->result();

			$this->load->view('Head');
			$this->load->view('service/Editar',$datos);
		}

	public function Actualizar($id=null)
		{
			$session_data = $this->session->userdata('logged_in');
			if($session_data['rol_id']!='2')
				{
					redirect(base_url().'Login');
				}

            $data = array(

					'tipo_servicio'=>$this->input->post('Ser'),
					'estado'=>$this->input->post('Est'),
					'asistente' => $this->input->post('Asis'),
					'cliente' => $this->input->post('Cli'),
					'maquina' => $this->input->post('Maq'),
					'descripcion' => $this->input->post('Desc'),
					'compromisos'=>$this->input->post('Comp')
			    );

            $this->db->where('id',$id);
            $this->db->update('servicio',$data);

            redirect('Servicio/Consultar');
		}

	public function Eliminar($id=null)
		{
			$session_data = $this->session->userdata('logged_in');
			if($session_data['rol_id']!='2')
				{
					redirect(base_url().'Login');
				}

			$this->db->where('id',$id);
            $this->db->delete('servicio');
                redirect('Servicio/Consultar');
		}

	public function InsertarComponente()
		{

			 $session_data = $this->session->userdata('logged_in');

			if($session_data['rol_id']!='2')
				{
					redirect(base_url().'Login');
				}

			$data = array(
					'id_servicio'=>$this->input->post('Ser'),
					'nom_componente'=>$this->input->post('Nom'),
					'cantidad' => $this->input->post('Can'),
					'descripcion'=>$this->input->post('Des')
			    );

			if($this->db->insert('componentes_serv',$data))
				{
					redirect('Servicio/Consultar');
				}

		}

	public function VerComponentes($id=null)
		{
			$session_data = $this->session->userdata('logged_in');
			if($session_data['rol_id']!='2')
				{
					redirect(base_url().'Login');
				}

			if($this->db->where('id_servicio ='."'".$id."'")) {
				$this->db->select('*');
				$datos['comp'] = $this->db->get('componentes_serv')->result();

				$this->load->view('Head');
				$this->load->view('service/UsadosComponentes',$datos);
			}else{
				$datos['mensaje'] = 'No se han usuado componentes en esta Servicio';

				$this->load->view('Head');
				$this->load->view('service/UsadosComponentes',$datos);
			}

		}

}


text:
package drt.server.feeds.lgw

import akka.NotUsed
import akka.actor.{ActorSystem, Cancellable}
import akka.stream.scaladsl.Source
import akka.stream.{ActorAttributes, Supervision}
import bluebus.client.ServiceBusClient
import bluebus.configuration.SBusConfig
import drt.shared.FlightsApi.Flights
import drt.shared.api.Arrival
import org.slf4j.{Logger, LoggerFactory}
import server.feeds.{ArrivalsFeedResponse, ArrivalsFeedSuccess}

import scala.concurrent.duration._
import scala.concurrent.{ExecutionContextExecutor, Future}
import scala.language.postfixOps

object LGWFeed {
  def serviceBusClient(namespace: String, sasToKey: String, serviceBusUrl: String): ServiceBusClient = new ServiceBusClient(
    SBusConfig(new java.net.URL(serviceBusUrl), s"$namespace/to", s"${namespace}to", sasToKey)
  )
}

trait LGWAzureClientLike {
  def receive: Future[String]
}

case class LGWAzureClient(azureSasClient: ServiceBusClient) extends LGWAzureClientLike {
  override def receive: Future[String] = azureSasClient.receive
}

case class LGWFeed(lGWAzureClient: LGWAzureClient)(val system: ActorSystem) {
  val log: Logger = LoggerFactory.getLogger(getClass)
  val pollInterval: FiniteDuration = 100 milliseconds
  val initialDelayImmediately: FiniteDuration = 1 milliseconds

  implicit val executionContext: ExecutionContextExecutor = system.dispatcher

  def requestArrivals(): Future[List[Arrival]] = lGWAzureClient.receive.map(xmlString => {
    if (xmlString.trim().length > 0)
      ResponseToArrivals(xmlString).getArrivals
    else
      List()
  })

  def source(): Source[ArrivalsFeedResponse, Cancellable] = Source
    .tick(initialDelayImmediately, pollInterval, NotUsed)
    .withAttributes(ActorAttributes.supervisionStrategy(Supervision.restartingDecider))
    .mapAsync(1)(_ => requestArrivals().recover { case t =>
      log.error("Failed to fetch live arrivals", t)
      List()
    })
    .filter(_.nonEmpty)
    .map( arrivals => ArrivalsFeedSuccess(Flights(arrivals)))
    .conflate[ArrivalsFeedResponse] {
      case (ArrivalsFeedSuccess(Flights(existingFlights), _), ArrivalsFeedSuccess(Flights(newFlights), createdAt)) =>
        ArrivalsFeedSuccess(Flights(existingFlights ++ newFlights), createdAt)
    }
}


text:
from abc import ABCMeta, abstractmethod

class IdentityAbstractDriver(object):

    __metaclass__ = ABCMeta

    def __init__(self):
        self.config = None

    @abstractmethod
    def validate_config(self, config):
        return False

    @abstractmethod
    def create_user(self, username, password):
        pass

    @abstractmethod
    def change_password(self, username, password):
        pass

    @abstractmethod
    def delete_user(self, username):
        return False

    @abstractmethod
    def auth(self, username, password):
        return True

    @abstractmethod
    def user_exists(self, username):
        return False

class IdentityMissingDBConnectionException(Exception):

    def __init__(self, message):
        super(IdentityMissingDBConnectionException, self).__init__(message)


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>MagicMirror: testing::Message Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

MagicMirror
    0.1

Main Page

Related Pages

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

testing

Message

Public Member Functions |
List of all members

testing::Message Class Reference

Public Member Functions

 	Message (const Message &msg)

 	Message (const char *str)

template<typename T >

Message & 	operator<< (const T &val)

template<typename T >

Message & 	operator<< (T *const &pointer)

Message & 	operator<< (BasicNarrowIoManip val)

Message & 	operator<< (bool b)

Message & 	operator<< (const wchar_t *wide_c_str)

Message & 	operator<< (wchar_t *wide_c_str)

std::string 	GetString () const

 	Message (const Message &msg)

 	Message (const char *str)

template<typename T >

Message & 	operator<< (const T &val)

template<typename T >

Message & 	operator<< (T *const &pointer)

Message & 	operator<< (BasicNarrowIoManip val)

Message & 	operator<< (bool b)

Message & 	operator<< (const wchar_t *wide_c_str)

Message & 	operator<< (wchar_t *wide_c_str)

std::string 	GetString () const

The documentation for this class was generated from the following file:

deps/win32/debug/include/gtest/gtest-message.h

<address class="footer">
Generated on Tue Aug 25 2015 01:02:59 for MagicMirror by

 1.8.9.1
</address>


text:
from gevent import monkey
monkey.patch_all()

import datetime
import time
from gevent import Greenlet
from gevent import pywsgi
from gevent import queue

def current_time(body):
    current = start = datetime.datetime.now()
    end = start + datetime.timedelta(seconds=60)

    while current < end:
        current = datetime.datetime.now()
        body.put('
%s
' % current.strftime("%Y-%m-%d %I:%M:%S"))
        time.sleep(1)

    body.put('')
    body.put(StopIteration)

def handle(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/html')])
    body = queue.Queue()
    body.put(' ' * 1000)
    body.put("
Current Time:
")
    g = Greenlet.spawn(current_time, body)
    return body

server = pywsgi.WSGIServer(('127.0.0.1', 1234), handle)
print "Serving on http://127.0.0.1:1234..."
server.serve_forever()


text:
                        Webdev Padiwan extraordinaire drinking milk and kicking butt

(...and I'm all out of milk.)

A little bit
                        about me

I'm a native San Franciscan and have a passion for web development, community management, gaming, sports and fitness.  I'm a life-long learner who's looking to join a team where I can integrate my past experiences to learn, grow, make great things, and have some fun along the way.

I started my career in tech in Customer Support answering phones and emails while paying my way through college.  During my time at Zynga, I've collected multiple awards in the Customer Support.

From there, I moved into Community Management at Zynga  collected a few more awards.  I've also dipped my hand into game design by making several successful in-game features while providing storyline and tuning for quest features.  It was an awesome experience to see the positive feedback the players were saying about my features.  I then discovered that I wanted to make epic things that people are going to enjoy.

After being laid off at Zynga, I noticed that making things people love is what I wanted to persue.  I started to learn how to code on my own and then enrolled into Dev Bootcamp.  I graduated January 2015 and here I am.

My
                        ultimate goal

I want to keep learning and growing as an individual and as a developer.  There's so much to learn and experience out there that just thinking about it makes my head spin.

I know this sounds uber cheezy, but when I get to a point where I can help others, I want to give back. Ideally, I want to help anyone who wants to learn how to code.

One thing I remember from my days at Dev Bootcamp that really kept me grounded during those days when I'm stuck on a problem:

"Before you can know, you have to not know".


text:
/*
 * This file is part of the minit project.
 *
 * (c) Adrian Tofan http://di-objective-c.blogspot.com/
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

#import "ATInjector.h"
#import "ATInjectable.h"
#import "ATKey.h"
#import "ATProviderBlock.h"
#import "ATSingletonScope.h"
#import "ATModule.h"

// This implementation is not thread safe !

@implementation ATInjector
-(id) init{
  if (self = [super init]){
    bindings_ = [[NSMutableDictionary dictionaryWithCapacity:200] retain];
    singletonScope_ = [[ATSingletonScope alloc] init];
  }
  return self;
}

-(void) dealloc{
  [bindings_ release];
  [singletonScope_ release];
  [super dealloc];
}

#pragma mark Loading modules

// Creates injector instance and calls to helper configureModules: before
// returning it
+(ATInjector*) injectorWithModules:(NSArray*) modules{
    ATInjector *injector = [[[ATInjector alloc] init] autorelease];
    [injector configureModules:modules];
    return injector;
}

// creates a instance of each module and calls configure method on them
-(void) configureModules:(NSArray*) modules{
    for(Class moduleClass in modules){
      id module = [[[moduleClass alloc] init] autorelease];
      if([module isKindOfClass:[ATModule class]]){
        [(ATModule*)module configureWithBinder:self];
      }else {
        NSLog(@"%@ is not a ATModule. Unable to load configuration",[module description]);
      }
    }
}

#pragma mark Injection

// Tries to find a simple binding of |cls| and returns a wired instance. If there
// is no binding for |cls| builds and returns a instance.
-(id) instanceOf:(Class) cls{
  id result;
  ATKey *injectedKey = [ATKey keyWithClass:cls];
  ATProviderBlock provider = [bindings_ objectForKey:injectedKey];
  if ( nil != provider) { return provider(); }
  // I guess that there is no point in validating if the |cls| responds to
  // class_builder selector. If it dosen't it is a runtime error anyway
  result = [(id)cls class_builder:self];
  return result;
}

// Tries to find a named binding of |cls| and returns a wired instance. If there
// is no named binding returns nil
-(id) instanceOf:(Class) cls named:(NSString*)name{
  ATKey *injectedKey = [ATKey keyWithClass:cls named:name];
  ATProviderBlock provider = [bindings_ objectForKey:injectedKey];
  if ( nil != provider) { return provider();}
  return nil;
}

-(id) instanceOf:(Class) cls annotated:(Class) annotation{
  return NULL; // not implemented
}

-(ATProviderBlock) providerOf:(Class) cls{
  ATProviderBlock provider = [[(id)^{
    return [self instanceOf:cls];
  } copy] autorelease];
  return provider;
}

-(ATProviderBlock) providerOf:(Class) cls named:(NSString*)name{
  ATProviderBlock provider = [[(id)^{
    return [self instanceOf:cls named:name];
  } copy] autorelease];
  return provider;
}

// Retruns a provider block of |cls| annotated with annotated with |annotation|
-(ATProviderBlock) providerOf:(Class) cls annotated:(Class) annotation{
  ATProviderBlock provider = [[(id)^{
    return [self instanceOf:cls annotated:annotation];
  } copy] autorelease];
  return provider;
}

#pragma mark Bindings
// registers a |key| bounded |provider| in |bindings_|
-(void) setBinding:(ATProviderBlock)provider forKey:(ATKey*)key{
  [bindings_ setObject:provider
                forKey:key];
}

// binds a provider returning |obj| instance in |bindings_|
-(id<ATBinder>) bind:(Class) cls toInstance:(id) obj{
  ATKey *key = [ATKey keyWithClass:cls];
  ATProviderBlock provider = [[(id)^{
    return obj;
  } copy] autorelease];

  [bindings_ setObject:provider
                forKey:key];
  return self;
}

// Maps a provider capable of building |impl| to a |cls| key in |bindings_|
// Stores in |bindings_| a provider capable of building |impl|
-(id<ATBinder>) bind:(Class) cls toImplementation:(Class) impl{
  ATKey *key = [ATKey keyWithClass:cls];
  ATProviderBlock provider = [[(id)^{
    return [(id)impl class_builder:self];
  } copy] autorelease];

  [bindings_ setObject:provider
                forKey:key];
  return self;
}

// binds a provider returning |obj| instance in |bindings_| for a |name| named key
-(id<ATBinder>) bind:(Class) cls
               named:(NSString*) name
          toInstance:(id) obj{
  ATKey *key = [ATKey keyWithClass:cls named:name];
  ATProviderBlock provider = [[(id)^{
    return obj;
  } copy] autorelease];

  [bindings_ setObject:provider
                forKey:key];
  return self;
}

// Maps a provider capable of building |impl| to a |cls| named |name| key in
// |bindings_|
-(id<ATBinder>) bind:(Class) cls named:(NSString*) name toImplementation:(Class) impl{
  ATKey *key = [ATKey keyWithClass:cls named:name];
  ATProviderBlock provider = [[(id)^{
    return [(id)impl class_builder:self];
  } copy] autorelease];

  [self setBinding:provider forKey:key];
  return self;
}

// Maps a SCOPED provider capable of building |impl| to a |cls|  key in
// |bindings_|
-(id<ATBinder>) bind:(Class) cls
    toImplementation:(Class) impl
             inScope:(Class) scope{
  if (scope != [ATSingletonScope class]) {
    // Maybe we should die nicely instead?
    return [self bind:cls toImplementation:impl];
  }
  ATProviderBlock provider = [[(id)^{
    return [(id)impl class_builder:self];
  } copy] autorelease];
  ATKey *key = [ATKey keyWithClass:cls];
  ATProviderBlock scoped = [singletonScope_ scope:key unscoped:provider];
  [self setBinding:scoped forKey:key];
  return self;

}

// Maps a SCOPED provider capable of building |impl| to a |cls| named |name| key in
// |bindings_|
-(id<ATBinder>) bind:(Class) cls
               named:(NSString*) name
    toImplementation:(Class) impl
             inScope:(Class) scope{

  if (scope != [ATSingletonScope class]) {
    // Maybe we should die nicely instead?
    return [self bind:cls named:name toImplementation:impl];
  }
  ATProviderBlock provider = [[(id)^{
    return [(id)impl class_builder:self];
  } copy] autorelease];
  ATKey *key = [ATKey keyWithClass:cls named:name];
  ATProviderBlock scoped = [singletonScope_ scope:key unscoped:provider];
  [self setBinding:scoped forKey:key];
  return self;
}

-(id<ATBinder>) bind:(Class) cls
       annotatedWith:(Class) annotation
    toImplementation:(Class) impl{
  [NSException raise:NSInternalInconsistencyException
              format:@"Not implemented"];
  return nil;
}

-(id<ATBinder>) bind:(Class) cls
       annotatedWith:(Class) annotation
    toImplementation:(Class) impl
             inScope:(Class) scope{
  [NSException raise:NSInternalInconsistencyException
              format:@"Not implemented"];
  return nil;
}
@end


text:
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Jose Collazzi - Back End Team Lead</title>
</head>
<body>
<pre>

Exeter, UK                                                 Jose Collazzi
xxxxx  xxxxxxxx                                              xxxxxxxxxxx
EX4 XXX                                               xxxxxxxx@gmail.com

Back End Team Lead

Summary

This document specifies my curriculum vitae, I am a Software Developer
with 4 years of industry experience in Web Technologies using PHP.
During the last years I have been involved in most of new features
and improvements (architecture, code, database and Api) for a company
from early startup steps to enterprise level.

I love to turn ideas into reality using the best technical practices
and tools.

Copyright Notice

Copyright (C) Jose Collazzi (2015).

Status of This Document

Although this document is in a stable version you can always access
to the last one in https://uk.linkedin.com/in/josecollazzi
do not hetistate to sent a private message for more details.

Table of Contents

1. Experience ..................................................... 2

1.1. Back End Team Lead ........................................... 2
1.2. Developer .................................................... 2
1.3. Freelance Web Developer ...................................... 2

2. Education ...................................................... 2

2.1. Master Degree ................................................ 2
2.2. Bachelor Degree .............................................. 2

3. Other Information .............................................. 3

3.1. Languages .................................................... 3

c.v.                         Informational                      [Page 1]

RFC JC                     Back End Team Lead             September 2015

1.  Experience

1.1.  Back End Team Lead at blurGroup  2013 - present

During this phase the quality of the code and process have been
improved including peer review, UniTest, functional test and
continuous integration. I have worked in different tech projects
using the last technology and tools.

Technologies:

PHP, Symfony2, RabbitMQ, OAuth2, MySql, PhpStorm,
PhpUnit, phpspec, Doctrine, RESTful Api, Vagrant + ansible,
adaptation of the system to AWS.

1.2.  Developer at blurGroup   2011 - 2013

During this time my function was migrate from structured code to
oriented object approach and add new functionality to the system.

Technologies:

PHP, ZendStudio, PhpUnit, MySql, RESTful libraries for ZF2

1.3. Freelance Web Developer   2008 - 2011

I have build websites for small companies, as a freelance I have
worked in all the process including graphic design, architecture,
data base, programming and deployment.

Examples

http://www.everpc.net
http://grupoxandra.eu

Technologies:

jQuery, PHP, CodeIgniter

c.v.                         Informational                      [Page 2]

RFC JC                     Back End Team Lead             September 2015

2.  Education

2.1.  Master   2009-2010

Master's degree in development of applications and Web services
University of Alicante

The course was based in the creation of a project using .Net and
some others Microsoft technologies.

2.2.  Bachelor's degree 2002-2008

Computer Engineering
University of Alicante

3. Other information

3.1. Languages

Spanish: Native or bilingual proficiency
English: Professional working proficiency

c.v.                         Informational                      [Page 3]

RFC JC                     Back End Team Lead             September 2015
</pre>
</body>
</html>


text:
{-# LANGUAGE RecordWildCards, TypeFamilies, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, TupleSections #-}

module Aws.Sqs.Commands.SetQueueAttributes where

import           Aws.Response
import           Aws.Sqs.Info
import           Aws.Sqs.Metadata
import qualified Aws.Sqs.Model as M
import           Aws.Sqs.Query
import           Aws.Sqs.Response
import           Aws.Signature
import           Aws.Transaction
import qualified Data.Text                    as T
import qualified Data.Text.Encoding           as TE

data SetQueueAttributes = SetQueueAttributes{
  sqaAttribute :: M.QueueAttribute,
  sqaValue :: T.Text,
  sqaQueueName :: M.QueueName
}deriving (Show)

data SetQueueAttributesResponse = SetQueueAttributesResponse{
} deriving (Show)

instance ResponseConsumer r SetQueueAttributesResponse where
    type ResponseMetadata SetQueueAttributesResponse = SqsMetadata
    responseConsumer _ = sqsXmlResponseConsumer parse
      where
        parse _ = do
          return SetQueueAttributesResponse {}

instance SignQuery SetQueueAttributes  where
    type Info SetQueueAttributes  = SqsInfo
    signQuery SetQueueAttributes {..} = sqsSignQuery SqsQuery {
                                             sqsQueueName = Just sqaQueueName,
                                             sqsQuery = [("Action", Just "SetQueueAttributes"),
                                                        ("Attribute.Name", Just $ TE.encodeUtf8 $ M.printQueueAttribute sqaAttribute),
                                                        ("Attribute.Value", Just $ TE.encodeUtf8 sqaValue)]}

instance Transaction SetQueueAttributes SetQueueAttributesResponse


text:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <vector>

#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>

#include <vulkan/vulkan.h>
#include "vulkanexamplebase.h"

#define VERTEX_BUFFER_BIND_ID 0
#define ENABLE_VALIDATION false

// Vertex layout for this example
std::vector<vkMeshLoader::VertexLayout> vertexLayout =
{
	vkMeshLoader::VERTEX_LAYOUT_POSITION,
	vkMeshLoader::VERTEX_LAYOUT_NORMAL,
	vkMeshLoader::VERTEX_LAYOUT_COLOR
};

class VulkanExample : public VulkanExampleBase
{
public:
	bool displayNormals = true;

	struct {
		VkPipelineVertexInputStateCreateInfo inputState;
		std::vector<VkVertexInputBindingDescription> bindingDescriptions;
		std::vector<VkVertexInputAttributeDescription> attributeDescriptions;
	} vertices;

	struct {
		vkMeshLoader::MeshBuffer object;
	} meshes;

	struct {
		glm::mat4 projection;
		glm::mat4 model;
	} uboVS;

	struct {
		glm::mat4 projection;
		glm::mat4 model;
	} uboGS;

	struct {
		vkTools::UniformData VS;
		vkTools::UniformData GS;
	} uniformData;

	struct {
		VkPipeline solid;
		VkPipeline normals;
	} pipelines;

	VkPipelineLayout pipelineLayout;
	VkDescriptorSet descriptorSet;
	VkDescriptorSetLayout descriptorSetLayout;

	VulkanExample() : VulkanExampleBase(ENABLE_VALIDATION)
	{
		zoom = -8.0f;
		rotation = glm::vec3(0.0f, -25.0f, 0.0f);
		enableTextOverlay = true;
		title = "Vulkan Example - Geometry shader";
	}

	virtual ~VulkanExample()
	{
		// Clean up used Vulkan resources
		// Note : Inherited destructor cleans up resources stored in base class
		vkDestroyPipeline(device, pipelines.solid, nullptr);
		vkDestroyPipeline(device, pipelines.normals, nullptr);

		vkDestroyPipelineLayout(device, pipelineLayout, nullptr);
		vkDestroyDescriptorSetLayout(device, descriptorSetLayout, nullptr);

		vkMeshLoader::freeMeshBufferResources(device, &meshes.object);

		vkTools::destroyUniformData(device, &uniformData.VS);
		vkTools::destroyUniformData(device, &uniformData.GS);
	}

	void reBuildCommandBuffers()
	{
		if (!checkCommandBuffers())
		{
			destroyCommandBuffers();
			createCommandBuffers();
		}
		buildCommandBuffers();
	}

	void buildCommandBuffers()
	{
		VkCommandBufferBeginInfo cmdBufInfo = vkTools::initializers::commandBufferBeginInfo();

		VkClearValue clearValues[2];
		clearValues[0].color = { { 0.0f, 0.0f, 0.0f, 0.0f } };
		clearValues[1].depthStencil = { 1.0f, 0 };

		VkRenderPassBeginInfo renderPassBeginInfo = vkTools::initializers::renderPassBeginInfo();
		renderPassBeginInfo.renderPass = renderPass;
		renderPassBeginInfo.renderArea.offset.x = 0;
		renderPassBeginInfo.renderArea.offset.y = 0;
		renderPassBeginInfo.renderArea.extent.width = width;
		renderPassBeginInfo.renderArea.extent.height = height;
		renderPassBeginInfo.clearValueCount = 2;
		renderPassBeginInfo.pClearValues = clearValues;

		for (int32_t i = 0; i < drawCmdBuffers.size(); ++i)
		{
			// Set target frame buffer
			renderPassBeginInfo.framebuffer = frameBuffers[i];

			VK_CHECK_RESULT(vkBeginCommandBuffer(drawCmdBuffers[i], &cmdBufInfo));

			vkCmdBeginRenderPass(drawCmdBuffers[i], &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);

			VkViewport viewport = vkTools::initializers::viewport((float)width, (float)height, 0.0f, 1.0f
				);
			vkCmdSetViewport(drawCmdBuffers[i], 0, 1, &viewport);

			VkRect2D scissor = vkTools::initializers::rect2D(width, height, 0, 0);
			vkCmdSetScissor(drawCmdBuffers[i], 0, 1, &scissor);

			vkCmdSetLineWidth(drawCmdBuffers[i], 1.0f);

			vkCmdBindDescriptorSets(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSet, 0, NULL);

			VkDeviceSize offsets[1] = { 0 };
			vkCmdBindVertexBuffers(drawCmdBuffers[i], VERTEX_BUFFER_BIND_ID, 1, &meshes.object.vertices.buf, offsets);
			vkCmdBindIndexBuffer(drawCmdBuffers[i], meshes.object.indices.buf, 0, VK_INDEX_TYPE_UINT32);

			// Solid shading
			vkCmdBindPipeline(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelines.solid);
			vkCmdDrawIndexed(drawCmdBuffers[i], meshes.object.indexCount, 1, 0, 0, 0);

			// Normal debugging
			if (displayNormals)
			{
				vkCmdBindPipeline(drawCmdBuffers[i], VK_PIPELINE_BIND_POINT_GRAPHICS, pipelines.normals);
				vkCmdDrawIndexed(drawCmdBuffers[i], meshes.object.indexCount, 1, 0, 0, 0);
			}

			vkCmdEndRenderPass(drawCmdBuffers[i]);

			VK_CHECK_RESULT(vkEndCommandBuffer(drawCmdBuffers[i]));
		}
	}

	void loadMeshes()
	{
		loadMesh(getAssetPath() + "models/suzanne.obj", &meshes.object, vertexLayout, 0.25f);
	}

	void setupVertexDescriptions()
	{
		// Binding description
		vertices.bindingDescriptions.resize(1);
		vertices.bindingDescriptions[0] =
			vkTools::initializers::vertexInputBindingDescription(
				VERTEX_BUFFER_BIND_ID,
				vkMeshLoader::vertexSize(vertexLayout),
				VK_VERTEX_INPUT_RATE_VERTEX);

		// Attribute descriptions
		// Describes memory layout and shader positions
		vertices.attributeDescriptions.resize(3);

		// Location 0 : Position
		vertices.attributeDescriptions[0] =
			vkTools::initializers::vertexInputAttributeDescription(
				VERTEX_BUFFER_BIND_ID,
				0,
				VK_FORMAT_R32G32B32_SFLOAT,
				0);

		// Location 1 : Normals
		vertices.attributeDescriptions[1] =
			vkTools::initializers::vertexInputAttributeDescription(
				VERTEX_BUFFER_BIND_ID,
				1,
				VK_FORMAT_R32G32B32_SFLOAT,
				sizeof(float) * 3);

		// Location 2 : Color
		vertices.attributeDescriptions[2] =
			vkTools::initializers::vertexInputAttributeDescription(
				VERTEX_BUFFER_BIND_ID,
				2,
				VK_FORMAT_R32G32B32_SFLOAT,
				sizeof(float) * 6);

		// Assign to vertex buffer
		vertices.inputState = vkTools::initializers::pipelineVertexInputStateCreateInfo();
		vertices.inputState.vertexBindingDescriptionCount = (uint32_t)vertices.bindingDescriptions.size();
		vertices.inputState.pVertexBindingDescriptions = vertices.bindingDescriptions.data();
		vertices.inputState.vertexAttributeDescriptionCount = (uint32_t)vertices.attributeDescriptions.size();
		vertices.inputState.pVertexAttributeDescriptions = vertices.attributeDescriptions.data();
	}

	void setupDescriptorPool()
	{
		// Example uses two ubos
		std::vector<VkDescriptorPoolSize> poolSizes =
		{
			vkTools::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 2),
		};

		VkDescriptorPoolCreateInfo descriptorPoolInfo =
			vkTools::initializers::descriptorPoolCreateInfo(
				(uint32_t)poolSizes.size(),
				poolSizes.data(),
				2);

		VK_CHECK_RESULT(vkCreateDescriptorPool(device, &descriptorPoolInfo, nullptr, &descriptorPool));
	}

	void setupDescriptorSetLayout()
	{
		std::vector<VkDescriptorSetLayoutBinding> setLayoutBindings =
		{
			// Binding 0 : Vertex shader ubo
			vkTools::initializers::descriptorSetLayoutBinding(
				VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
				VK_SHADER_STAGE_VERTEX_BIT,
				0),
			// Binding 1 : Geometry shader ubo
			vkTools::initializers::descriptorSetLayoutBinding(
				VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
				VK_SHADER_STAGE_GEOMETRY_BIT,
				1)
		};

		VkDescriptorSetLayoutCreateInfo descriptorLayout =
			vkTools::initializers::descriptorSetLayoutCreateInfo(
				setLayoutBindings.data(),
				(uint32_t)setLayoutBindings.size());

		VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorLayout, nullptr, &descriptorSetLayout));

		VkPipelineLayoutCreateInfo pPipelineLayoutCreateInfo =
			vkTools::initializers::pipelineLayoutCreateInfo(
				&descriptorSetLayout,
				1);

		VK_CHECK_RESULT(vkCreatePipelineLayout(device, &pPipelineLayoutCreateInfo, nullptr, &pipelineLayout));
	}

	void setupDescriptorSet()
	{
		VkDescriptorSetAllocateInfo allocInfo =
			vkTools::initializers::descriptorSetAllocateInfo(
				descriptorPool,
				&descriptorSetLayout,
				1);

		VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &allocInfo, &descriptorSet));

		std::vector<VkWriteDescriptorSet> writeDescriptorSets =
		{
			// Binding 0 : Vertex shader shader ubo
			vkTools::initializers::writeDescriptorSet(
				descriptorSet,
				VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
				0,
				&uniformData.VS.descriptor),
			// Binding 1 : Geometry shader ubo
			vkTools::initializers::writeDescriptorSet(
				descriptorSet,
				VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
				1,
				&uniformData.GS.descriptor)
		};

		vkUpdateDescriptorSets(device, (uint32_t)writeDescriptorSets.size(), writeDescriptorSets.data(), 0, NULL);
	}

	void preparePipelines()
	{
		VkPipelineInputAssemblyStateCreateInfo inputAssemblyState =
			vkTools::initializers::pipelineInputAssemblyStateCreateInfo(
				VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST,
				0,
				VK_FALSE);

		VkPipelineRasterizationStateCreateInfo rasterizationState =
			vkTools::initializers::pipelineRasterizationStateCreateInfo(
				VK_POLYGON_MODE_FILL,
				VK_CULL_MODE_BACK_BIT,
				VK_FRONT_FACE_CLOCKWISE,
				0);

		VkPipelineColorBlendAttachmentState blendAttachmentState =
			vkTools::initializers::pipelineColorBlendAttachmentState(
				0xf,
				VK_FALSE);

		VkPipelineColorBlendStateCreateInfo colorBlendState =
			vkTools::initializers::pipelineColorBlendStateCreateInfo(
				1,
				&blendAttachmentState);

		VkPipelineDepthStencilStateCreateInfo depthStencilState =
			vkTools::initializers::pipelineDepthStencilStateCreateInfo(
				VK_TRUE,
				VK_TRUE,
				VK_COMPARE_OP_LESS_OR_EQUAL);

		VkPipelineViewportStateCreateInfo viewportState =
			vkTools::initializers::pipelineViewportStateCreateInfo(1, 1, 0);

		VkPipelineMultisampleStateCreateInfo multisampleState =
			vkTools::initializers::pipelineMultisampleStateCreateInfo(
				VK_SAMPLE_COUNT_1_BIT,
				0);

		std::vector<VkDynamicState> dynamicStateEnables = {
			VK_DYNAMIC_STATE_VIEWPORT,
			VK_DYNAMIC_STATE_SCISSOR,
			VK_DYNAMIC_STATE_LINE_WIDTH
		};
		VkPipelineDynamicStateCreateInfo dynamicState =
			vkTools::initializers::pipelineDynamicStateCreateInfo(
				dynamicStateEnables.data(),
				(uint32_t)dynamicStateEnables.size(),
				0);

		// Tessellation pipeline
		// Load shaders
		std::array<VkPipelineShaderStageCreateInfo, 3> shaderStages;

		shaderStages[0] = loadShader(getAssetPath() + "shaders/geometryshader/base.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
		shaderStages[1] = loadShader(getAssetPath() + "shaders/geometryshader/base.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
		shaderStages[2] = loadShader(getAssetPath() + "shaders/geometryshader/normaldebug.geom.spv", VK_SHADER_STAGE_GEOMETRY_BIT);

		VkGraphicsPipelineCreateInfo pipelineCreateInfo =
			vkTools::initializers::pipelineCreateInfo(
				pipelineLayout,
				renderPass,
				0);

		pipelineCreateInfo.pVertexInputState = &vertices.inputState;
		pipelineCreateInfo.pInputAssemblyState = &inputAssemblyState;
		pipelineCreateInfo.pRasterizationState = &rasterizationState;
		pipelineCreateInfo.pColorBlendState = &colorBlendState;
		pipelineCreateInfo.pMultisampleState = &multisampleState;
		pipelineCreateInfo.pViewportState = &viewportState;
		pipelineCreateInfo.pDepthStencilState = &depthStencilState;
		pipelineCreateInfo.pDynamicState = &dynamicState;
		pipelineCreateInfo.stageCount = (uint32_t)shaderStages.size();
		pipelineCreateInfo.pStages = shaderStages.data();
		pipelineCreateInfo.renderPass = renderPass;

		// Normal debugging pipeline
		VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCreateInfo, nullptr, &pipelines.normals));

		// Solid rendering pipeline
		shaderStages[0] = loadShader(getAssetPath() + "shaders/geometryshader/mesh.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
		shaderStages[1] = loadShader(getAssetPath() + "shaders/geometryshader/mesh.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
		pipelineCreateInfo.stageCount = 2;
		VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCreateInfo, nullptr, &pipelines.solid));
	}

	// Prepare and initialize uniform buffer containing shader uniforms
	void prepareUniformBuffers()
	{
		// Vertex shader uniform buffer block
		createBuffer(
			VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
			VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
			sizeof(uboVS),
			nullptr,
			&uniformData.VS.buffer,
			&uniformData.VS.memory,
			&uniformData.VS.descriptor);

		// Geometry shader uniform buffer block
		createBuffer(
			VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
			VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
			sizeof(uboGS),
			nullptr,
			&uniformData.GS.buffer,
			&uniformData.GS.memory,
			&uniformData.GS.descriptor);

		updateUniformBuffers();
	}

	void updateUniformBuffers()
	{
		// Vertex shader
		uboVS.projection = glm::perspective(glm::radians(60.0f), (float)width / (float)height, 0.001f, 256.0f);
		glm::mat4 viewMatrix = glm::translate(glm::mat4(), glm::vec3(0.0f, 0.0f, zoom));

		uboVS.model = viewMatrix * glm::translate(glm::mat4(), cameraPos);
		uboVS.model = glm::rotate(uboVS.model, glm::radians(rotation.x), glm::vec3(1.0f, 0.0f, 0.0f));
		uboVS.model = glm::rotate(uboVS.model, glm::radians(rotation.y), glm::vec3(0.0f, 1.0f, 0.0f));
		uboVS.model = glm::rotate(uboVS.model, glm::radians(rotation.z), glm::vec3(0.0f, 0.0f, 1.0f));

		uint8_t *pData;
		VK_CHECK_RESULT(vkMapMemory(device, uniformData.VS.memory, 0, sizeof(uboVS), 0, (void **)&pData));
		memcpy(pData, &uboVS, sizeof(uboVS));
		vkUnmapMemory(device, uniformData.VS.memory);

		// Geometry shader
		uboGS.model = uboVS.model;
		uboGS.projection = uboVS.projection;
		VK_CHECK_RESULT(vkMapMemory(device, uniformData.GS.memory, 0, sizeof(uboGS), 0, (void **)&pData));
		memcpy(pData, &uboGS, sizeof(uboGS));
		vkUnmapMemory(device, uniformData.GS.memory);
	}

	void draw()
	{
		VulkanExampleBase::prepareFrame();

		// Command buffer to be sumitted to the queue
		submitInfo.commandBufferCount = 1;
		submitInfo.pCommandBuffers = &drawCmdBuffers[currentBuffer];

		// Submit to queue
		VK_CHECK_RESULT(vkQueueSubmit(queue, 1, &submitInfo, VK_NULL_HANDLE));

		VulkanExampleBase::submitFrame();
	}

	void prepare()
	{
		VulkanExampleBase::prepare();
		loadMeshes();
		setupVertexDescriptions();
		prepareUniformBuffers();
		setupDescriptorSetLayout();
		preparePipelines();
		setupDescriptorPool();
		setupDescriptorSet();
		buildCommandBuffers();
		prepared = true;
	}

	virtual void render()
	{
		if (!prepared)
			return;
		draw();
	}

	virtual void viewChanged()
	{
		updateUniformBuffers();
	}

	void toggleNormals()
	{
		displayNormals = !displayNormals;
		reBuildCommandBuffers();
	}

	virtual void keyPressed(uint32_t keyCode)
	{
		switch (keyCode)
		{
		case KEY_N:
		case GAMEPAD_BUTTON_A:
			toggleNormals();
			break;
		}
	}

	virtual void getOverlayText(VulkanTextOverlay *textOverlay)
	{
#if defined(__ANDROID__)
		textOverlay->addText("Press \"Button A\" to toggle normals", 5.0f, 85.0f, VulkanTextOverlay::alignLeft);
#else
		textOverlay->addText("Press \"n\" to toggle normals", 5.0f, 85.0f, VulkanTextOverlay::alignLeft);
#endif
	}
};

DEFINE_VULKAN_APPLICATION_MANAGEMENT_FUNCTIONS();


text:
<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

        <referenceContainer name="content">
            <block class="Magento\Framework\View\Element\Text" name="content.noRoute">
                <action method="setText">
                    <argument translate="true" name="text" xsi:type="string"><![CDATA[
404 Error

Page not found.
]]></argument>
                </action>
            </block>
        </referenceContainer>

</page>


text:
package org.apache.hadoop.yarn.exceptions;

import org.apache.hadoop.yarn.api.ApplicationMasterProtocol;
import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;

/**
 * This exception is thrown when an Application Master tries to release
 * containers not belonging to it using
 * {@link ApplicationMasterProtocol#allocate(AllocateRequest)} API.
 */
public class InvalidContainerReleaseException extends YarnException {

  private static final long serialVersionUID = 13498237L;

  public InvalidContainerReleaseException(Throwable cause) {
    super(cause);
  }

  public InvalidContainerReleaseException(String message) {
    super(message);
  }

  public InvalidContainerReleaseException(String message,
      Throwable cause) {
    super(message, cause);
  }
}


text:
Additional header content

The MailMessageFromModel type exposes the following members.

## Properties

	Name	Description

![Public property](media/pubproperty.gif "Public property")![Code example](media/CodeExample.png "Code example")	Address
Gets or sets a e-mail address.

![Public property](media/pubproperty.gif "Public property")	IsDefault
When overridden in a derived class, gets a value indicating whether this instance contains the default.
 (Overrides BaseModel.IsDefault.)

![Public property](media/pubproperty.gif "Public property")	Properties
Gets or sets a reference to user-defined property list for this element.
 (Inherited from BaseModel(T).)

Back to Top

## See Also

#### Reference
MailMessageFromModel Class
iTin.Export.Model Namespace


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycol. eur. (Erlanga) 1: 6 (1822)

#### Original name
Erineum fagineum var. fagi-purpurei Pers.

### Remarks
null


text:
<!DOCTYPE html>
<script src='vendor/three.js/build/three.min.js'></script>
<script src='vendor/three.js/examples/js/modifiers/SubdivisionModifier.js'></script>

<script src='../threex.dilategeometry.js'></script>
<script src='../threex.atmospherematerial.js'></script>
<!-- include for threex.glowdatgui -->
<script src='vendor/three.js/examples/js/libs/dat.gui.min.js'></script>
<script src="../threex.atmospherematerialdatgui.js"></script>

<body style='margin: 0px; background-color: #000000; overflow: hidden;'><script>
	var renderer	= new THREE.WebGLRenderer();
	renderer.setSize( window.innerWidth, window.innerHeight );
	document.body.appendChild( renderer.domElement );

	var updateFcts	= [];
	var scene	= new THREE.Scene();
	var camera	= new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.01, 100 );
	camera.position.z = 3;

	//////////////////////////////////////////////////////////////////////////////////
	//		build original object						//
	//////////////////////////////////////////////////////////////////////////////////

	var geometry	= new THREE.TorusKnotGeometry(1-0.25, 0.25, 32*3, 32);
	var geometry	= new THREE.CubeGeometry(1,1,1, 3, 3, 3);

	geometry.computeVertexNormals();
	var material	= new THREE.MeshNormalMaterial();
	var mesh	= new THREE.Mesh( geometry, material );
	// mesh.visible	= false
	scene.add( mesh );

	//////////////////////////////////////////////////////////////////////////////////
	//		put the hallo around						//
	//////////////////////////////////////////////////////////////////////////////////

	// create the mesh for the halo with AtmosphereMaterial
	var geometry	= mesh.geometry.clone()

	var modifier	= new THREE.SubdivisionModifier(2)
	// mergeVertices(); is run in case of duplicated vertices
	geometry.mergeVertices();
	geometry.computeCentroids();
	geometry.computeFaceNormals();
	geometry.computeVertexNormals();
	modifier.modify(geometry)

	THREEx.dilateGeometry(geometry, 0.15)
	var material	= THREEx.createAtmosphereMaterial()
	material.side	= THREE.BackSide

	// var material	= new THREE.MeshBasicMaterial({
	// 	wireframe	: true,
	// 	color		: 'black',
	// })

	var meshHalo	= new THREE.Mesh(geometry, material );
	// meshHalo.
	scene.add( meshHalo );

	// // possible customisation of AtmosphereMaterial
	// material.uniforms.glowColor.value	= new THREE.Color('cyan')
	// material.uniforms.coeficient.value	= 0.2
	// material.uniforms.power.value		= 2.0

	// here is how to setup a datGUI for fine tuning
	var datGUI	= new dat.GUI()
	new THREEx.addAtmosphereMaterial2DatGui(material, datGUI)

	//////////////////////////////////////////////////////////////////////////////////
	//		Camera Controls							//
	//////////////////////////////////////////////////////////////////////////////////
	var mouse	= {x : 0, y : 0}
	document.addEventListener('mousemove', function(event){
		mouse.x	= (event.clientX / window.innerWidth ) - 0.5
		mouse.y	= (event.clientY / window.innerHeight) - 0.5
	}, false)
	updateFcts.push(function(delta, now){
		camera.position.x += (mouse.x*25 - camera.position.x) * (delta*3)
		camera.position.y += (mouse.y*25 - camera.position.y) * (delta*3)
		camera.lookAt( scene.position )
	})

	//////////////////////////////////////////////////////////////////////////////////
	//		render the scene						//
	//////////////////////////////////////////////////////////////////////////////////
	updateFcts.push(function(){
		renderer.render( scene, camera );
	})

	//////////////////////////////////////////////////////////////////////////////////
	//		loop runner							//
	//////////////////////////////////////////////////////////////////////////////////
	var lastTimeMsec= null
	requestAnimationFrame(function animate(nowMsec){
		// keep looping
		requestAnimationFrame( animate );
		// measure time
		lastTimeMsec	= lastTimeMsec || nowMsec-1000/60
		var deltaMsec	= Math.min(200, nowMsec - lastTimeMsec)
		lastTimeMsec	= nowMsec
		// call each update function
		updateFcts.forEach(function(updateFn){
			updateFn(deltaMsec/1000, nowMsec/1000)
		})
	})
</script></body>