text:
package wint.maven.plugins.jetty;

import org.apache.commons.collections.CollectionUtils;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.codehaus.plexus.util.FileUtils;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.HandlerCollection;
import org.eclipse.jetty.util.Scanner;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.xml.XmlConfiguration;
import org.mortbay.jetty.plugin.ScanTargetPattern;

import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public abstract class WintJettyRunMojoBase extends AbstractJettyRunMojo {

    /**
     * If true, the <testOutputDirectory>
     * and the dependencies of <scope>test<scope>
     * will be put first on the runtime classpath.
     * @parameter default-value="false"
     */
    private boolean useTestClasspath;

    /**
     * The default location of the web.xml file. Will be used
     * if <webAppConfig><descriptor> is not set.
     *
     * @parameter expression="${maven.war.webxml}"
     * @readonly
     */
    private String webXml;

    /**
     * The directory containing generated classes.
     *
     * @parameter expression="${project.build.outputDirectory}"
     * @required
     *
     */
    private File classesDirectory;

    /**
     * The directory containing generated test classes.
     *
     * @parameter expression="${project.build.testOutputDirectory}"
     * @required
     */
    private File testClassesDirectory;

    /**
     * Root directory for all html/jsp etc files
     *
     * @parameter expression="${maven.war.src}"
     *
     */
    private File webAppSourceDirectory;

    /**
     * @parameter expression="${plugin.artifacts}"
     * @readonly
     */
    private List pluginArtifacts;

    /**
     * List of files or directories to additionally periodically scan for changes. Optional.
     * @parameter
     */
    private File[] scanTargets;

    /**
     * List of directories with ant-style <include> and <exclude> patterns
     * for extra targets to periodically scan for changes. Can be used instead of,
     * or in conjunction with <scanTargets>.Optional.
     * @parameter
     */
    private ScanTargetPattern[] scanTargetPatterns;

    /**
     * List of files on the classpath for the webapp
     */
    private List<File> classPathFiles;

    /**
     * Extra scan targets as a list
     */
    private List<File> extraScanTargets;

    public String getWebXml()
    {
        return this.webXml;
    }

    public File getClassesDirectory()
    {
        return this.classesDirectory;
    }

    public File getWebAppSourceDirectory()
    {
        return this.webAppSourceDirectory;
    }

    public void setClassPathFiles (List<File> list)
    {
        this.classPathFiles = new ArrayList<File>(list);
    }

    public List<File> getClassPathFiles ()
    {
        return this.classPathFiles;
    }

    public List<File> getExtraScanTargets ()
    {
        return this.extraScanTargets;
    }

    public void setExtraScanTargets(List<File> list)
    {
        this.extraScanTargets = list;
    }

    /**
     * Verify the configuration given in the pom.
     *
     * @see org.mortbay.jetty.plugin.AbstractJettyMojo#checkPomConfiguration()
     */
    public void checkPomConfiguration () throws MojoExecutionException
    {
        // check the location of the static content/jsps etc
        try
        {
            if ((getWebAppSourceDirectory() == null) || !getWebAppSourceDirectory().exists())
            {
                webAppSourceDirectory = new File (executedProject.getBasedir(), "src"+File.separator+"main"+File.separator+"webapp");
                getLog().info("webAppSourceDirectory "+getWebAppSourceDirectory() +" does not exist. Defaulting to "+webAppSourceDirectory.getAbsolutePath());
            }
            else
                getLog().info( "Webapp source directory = " + getWebAppSourceDirectory().getCanonicalPath());
        }
        catch (IOException e)
        {
            throw new MojoExecutionException("Webapp source directory does not exist", e);
        }

        // check reload mechanic
        if ( !"automatic".equalsIgnoreCase( reload ) && !"manual".equalsIgnoreCase( reload ) )
        {
            throw new MojoExecutionException( "invalid reload mechanic specified, must be 'automatic' or 'manual'" );
        }
        else
        {
            getLog().info("Reload Mechanic: " + reload );
        }

        // check the classes to form a classpath with
        try
        {
            //allow a webapp with no classes in it (just jsps/html)
            if (getClassesDirectory() != null)
            {
                if (!getClassesDirectory().exists())
                    getLog().info( "Classes directory "+ getClassesDirectory().getCanonicalPath()+ " does not exist");
                else
                    getLog().info("Classes = " + getClassesDirectory().getCanonicalPath());
            }
            else
                getLog().info("Classes directory not set");
        }
        catch (IOException e)
        {
            throw new MojoExecutionException("Location of classesDirectory does not exist");
        }

        setExtraScanTargets(new ArrayList<File>());
        if (scanTargets != null)
        {
            for (int i=0; i< scanTargets.length; i++)
            {
                getLog().info("Added extra scan target:"+ scanTargets[i]);
                getExtraScanTargets().add(scanTargets[i]);
            }
        }

        if (scanTargetPatterns!=null)
        {
            for (int i=0;i<scanTargetPatterns.length; i++)
            {
                Iterator itor = scanTargetPatterns[i].getIncludes().iterator();
                StringBuffer strbuff = new StringBuffer();
                while (itor.hasNext())
                {
                    strbuff.append((String)itor.next());
                    if (itor.hasNext())
                        strbuff.append(",");
                }
                String includes = strbuff.toString();

                itor = scanTargetPatterns[i].getExcludes().iterator();
                strbuff= new StringBuffer();
                while (itor.hasNext())
                {
                    strbuff.append((String)itor.next());
                    if (itor.hasNext())
                        strbuff.append(",");
                }
                String excludes = strbuff.toString();

                try
                {
                    List<File> files = FileUtils.getFiles(scanTargetPatterns[i].getDirectory(), includes, excludes);
                    itor = files.iterator();
                    while (itor.hasNext())
                        getLog().info("Adding extra scan target from pattern: "+itor.next());
                    List<File> currentTargets = getExtraScanTargets();
                    if(currentTargets!=null && !currentTargets.isEmpty())
                        currentTargets.addAll(files);
                    else
                        setExtraScanTargets(files);
                }
                catch (IOException e)
                {
                    throw new MojoExecutionException(e.getMessage());
                }
            }
        }
    }

    private List<File> getWebInfoClasses(Object o) {
        try {
            Field field = o.getClass().getDeclaredField("webInfClasses");
            field.setAccessible(true);
            return (List<File>)field.get(o);
        } catch (NoSuchFieldException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }

    private void setClasspathFiles(Object o, Object value) {
        try {
            Field field = o.getClass().getDeclaredField("classpathFiles");
            field.setAccessible(true);
            field.set(o, value);
        } catch (NoSuchFieldException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }

    public void configureWebApplication() throws Exception
    {
        super.configureWebApplication();

        //Set up the location of the webapp.
        //There are 2 parts to this: setWar() and setBaseResource(). On standalone jetty,
        //the former could be the location of a packed war, while the latter is the location
        //after any unpacking. With this mojo, you are running an unpacked, unassembled webapp,
        //so the two locations should be equal.
        Resource webAppSourceDirectoryResource = Resource.newResource(webAppSourceDirectory.getCanonicalPath());
        if (webAppConfig.getWar() == null)
            webAppConfig.setWar(webAppSourceDirectoryResource.toString());

        if (webAppConfig.getBaseResource() == null)
            webAppConfig.setBaseResource(webAppSourceDirectoryResource);

        // fixed
        List<File> files = getWebInfoClasses(webAppConfig);
        files.addAll(getClassesDirs());
       // webAppConfig.setWebInfClasses (getClassesDirs());
        webAppConfig.setWebInfLib(getDependencyFiles());

        // fixed
       // setClassPathFiles(setUpClassPath(webAppConfig.getWebInfClasses(), webAppConfig.getWebInfLib()));
        setClassPathFiles(setUpClassPath(files, webAppConfig.getWebInfLib()));

        //if we have not already set web.xml location, need to set one up
        if (webAppConfig.getDescriptor() == null)
        {
            //Has an explicit web.xml file been configured to use?
            if (webXml != null)
            {
                Resource r = Resource.newResource(webXml);
                if (r.exists() && !r.isDirectory())
                {
                    webAppConfig.setDescriptor(r.toString());
                }
            }

            //Still don't have a web.xml file: try the resourceBase of the webapp, if it is set
            if (webAppConfig.getDescriptor() == null && webAppConfig.getBaseResource() != null)
            {
                Resource r = webAppConfig.getBaseResource().addPath("WEB-INF/web.xml");
                if (r.exists() && !r.isDirectory())
                {
                    webAppConfig.setDescriptor(r.toString());
                }
            }

            //Still don't have a web.xml file: finally try the configured static resource directory if there is one
            if (webAppConfig.getDescriptor() == null && (webAppSourceDirectory != null))
            {
                File f = new File (new File (webAppSourceDirectory, "WEB-INF"), "web.xml");
                if (f.exists() && f.isFile())
                {
                    webAppConfig.setDescriptor(f.getCanonicalPath());
                }
            }
        }
        getLog().info( "web.xml file = "+webAppConfig.getDescriptor());

        // fixed
        if (webAppConfig.getClassPathFiles() == null) {
            setClasspathFiles(webAppConfig, getClassPathFiles());
           // webAppConfig.setClassPathFiles(getClassPathFiles());
        }

        getLog().info("Webapp directory = " + getWebAppSourceDirectory().getCanonicalPath());
    }

    public void configureScanner ()
            throws MojoExecutionException
    {
        // start the scanner thread (if necessary) on the main webapp
        final ArrayList<File> scanList = new ArrayList<File>();
        if (webAppConfig.getDescriptor() != null)
        {
            try
            {
                Resource r = Resource.newResource(webAppConfig.getDescriptor());
                scanList.add(r.getFile());
            }
            catch (IOException e)
            {
                throw new MojoExecutionException("Problem configuring scanner for web.xml", e);
            }
        }

        if (webAppConfig.getJettyEnvXml() != null)
        {
            try
            {
                Resource r = Resource.newResource(webAppConfig.getJettyEnvXml());
                scanList.add(r.getFile());
            }
            catch (IOException e)
            {
                throw new MojoExecutionException("Problem configuring scanner for jetty-env.xml", e);
            }
        }

        if (webAppConfig.getDefaultsDescriptor() != null)
        {
            try
            {
                if (!WebAppContext.WEB_DEFAULTS_XML.equals(webAppConfig.getDefaultsDescriptor()))
                {
                    Resource r = Resource.newResource(webAppConfig.getDefaultsDescriptor());
                    scanList.add(r.getFile());
                }
            }
            catch (IOException e)
            {
                throw new MojoExecutionException("Problem configuring scanner for webdefaults.xml", e);
            }
        }

        if (CollectionUtils.isNotEmpty(webAppConfig.getOverrideDescriptors()))
        {
            try
            {
                Resource r = Resource.newResource(webAppConfig.getOverrideDescriptors().get(0));
                scanList.add(r.getFile());
            }
            catch (IOException e)
            {
                throw new MojoExecutionException("Problem configuring scanner for webdefaults.xml", e);
            }
        }

        File jettyWebXmlFile = findJettyWebXmlFile(new File(getWebAppSourceDirectory(),"WEB-INF"));
        if (jettyWebXmlFile != null)
            scanList.add(jettyWebXmlFile);
        scanList.addAll(getExtraScanTargets());
        scanList.add(getExecutedProject().getFile());
        if (getClassPathFiles() != null) {
            scanList.addAll(getClassPathFiles());
        }
        setScanList(scanList);
        ArrayList<Scanner.BulkListener> listeners = new ArrayList<Scanner.BulkListener>();
        listeners.add(new Scanner.BulkListener()
        {
            public void filesChanged (List changes)
            {
                try
                {
                    boolean reconfigure = changes.contains(getExecutedProject().getFile().getCanonicalPath());
                    restartWebApp(reconfigure);
                }
                catch (Exception e)
                {
                    getLog().error("Error reconfiguring/restarting webapp after change in watched files",e);
                }
            }
        });
        setScannerListeners(listeners);
    }

    public void restartWebApp(boolean reconfigureScanner) throws Exception
    {
        getLog().info("restarting "+webAppConfig);
        getLog().debug("Stopping webapp ...");
        webAppConfig.stop();
        getLog().debug("Reconfiguring webapp ...");

        checkPomConfiguration();
        configureWebApplication();

        // check if we need to reconfigure the scanner,
        // which is if the pom changes
        if (reconfigureScanner)
        {
            getLog().info("Reconfiguring scanner after change to pom.xml ...");
            scanList.clear();
            scanList.add(new File(webAppConfig.getDescriptor()));
            if (webAppConfig.getJettyEnvXml() != null)
                scanList.add(new File(webAppConfig.getJettyEnvXml()));
            scanList.addAll(getExtraScanTargets());
            scanList.add(getExecutedProject().getFile());
            scanList.addAll(getClassPathFiles());
            getScanner().setScanDirs(scanList);
        }

        getLog().debug("Restarting webapp ...");
        webAppConfig.start();
        getLog().info("Restart completed at "+new Date().toString());
    }

    private List<File> getDependencyFiles ()
    {
        List<File> dependencyFiles = new ArrayList<File>();
        List<Resource> overlays = new ArrayList<Resource>();
        for ( Iterator<Artifact> iter = getExecutedProject().getArtifacts().iterator(); iter.hasNext(); )
        {
            Artifact artifact = (Artifact) iter.next();
            // Include runtime and compile time libraries, and possibly test libs too
            if(artifact.getType().equals("war"))
            {
                try
                {
                    Resource r=Resource.newResource("jar:"+artifact.getFile().toURI().toURL().toString()+"!/");
                    overlays.add(r);
                    getExtraScanTargets().add(artifact.getFile());
                }
                catch(Exception e)
                {
                    throw new RuntimeException(e);
                }
                continue;
            }
            if (((!Artifact.SCOPE_PROVIDED.equals(artifact.getScope())) && (!Artifact.SCOPE_TEST.equals( artifact.getScope())))
                    ||
                    (useTestClasspath && Artifact.SCOPE_TEST.equals( artifact.getScope())))
            {
                dependencyFiles.add(artifact.getFile());
                getLog().debug( "Adding artifact " + artifact.getFile().getName() + " for WEB-INF/lib " );
            }
        }

        webAppConfig.setOverlays(overlays);

        return dependencyFiles;
    }

    private List<File> setUpClassPath(List<File> webInfClasses, List<File> webInfJars)
    {
        List<File> classPathFiles = new ArrayList<File>();
        classPathFiles.addAll(webInfClasses);
        classPathFiles.addAll(webInfJars);

        if (getLog().isDebugEnabled())
        {
            for (int i = 0; i < classPathFiles.size(); i++)
            {
                getLog().debug("classpath element: "+ ((File) classPathFiles.get(i)).getName());
            }
        }
        return classPathFiles;
    }

    private List<File> getClassesDirs ()
    {
        List<File> classesDirs = new ArrayList<File>();

        //if using the test classes, make sure they are first
        //on the list
        if (useTestClasspath && (testClassesDirectory != null))
            classesDirs.add(testClassesDirectory);

        if (getClassesDirectory() != null)
            classesDirs.add(getClassesDirectory());

        return classesDirs;
    }

    public void finishConfigurationBeforeStart() throws Exception
    {
        HandlerCollection contexts = (HandlerCollection)server.getChildHandlerByClass(ContextHandlerCollection.class);
        if (contexts==null)
            contexts = (HandlerCollection)server.getChildHandlerByClass(HandlerCollection.class);

        for (int i=0; (this.contextHandlers != null) && (i < this.contextHandlers.length); i++)
        {
            contexts.addHandler(this.contextHandlers[i]);
        }
    }

    public void applyJettyXml() throws Exception
    {
        if (getJettyXmlFiles() == null)
            return;

        for ( File xmlFile : getJettyXmlFiles() )
        {
            getLog().info( "Configuring Jetty from xml configuration file = " + xmlFile.getCanonicalPath() );
            XmlConfiguration xmlConfiguration = new XmlConfiguration(xmlFile.toURI().toURL());
            xmlConfiguration.configure(this.server);
        }
    }

    public void execute() throws MojoExecutionException, MojoFailureException
    {
        super.execute();
    }
}


text:
#map {
        height: 100% !important;
      }

.controls {
  margin-top: 10px !important;
  border: 1px solid transparent !important;
  border-radius: 2px 0 0 2px !important;
  box-sizing: border-box !important;
  -moz-box-sizing: border-box !important;
  height: 32px !important;
  outline: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

#pac-input {
  background-color: #fff !important;
  font-family: Roboto !important;
  font-size: 15px !important;
  font-weight: 300 !important;
  margin-left: 12px !important;
  padding: 0 11px 0 13px !important;
  text-overflow: ellipsis !important;
  width: 300px !important;
}

#pac-input:focus {
  border-color: #4d90fe !important;
}

.pac-container {
  font-family: Roboto !important;
}

#type-selector {
  color: #fff !important;
  background-color: #4d90fe !important;
  padding: 5px 11px 0px 11px !important;
}

#type-selector label {
  font-family: Roboto !important;
  font-size: 13px !important;
  font-weight: 300 !important;
}

#target
{
    width: 345px !important;
}

#floating-panel {
  position: absolute;
  z-index: 5;
  background-color: #fff;
  padding: 3px;
  border: 1px solid #999;
  text-align: center;
  font-family: 'Roboto','sans-serif';
  line-height: 30px;
}

redpajama_set_name: RedPajamaGithub


text:
#include "ApplicationSettings.hh"
#include "Application.hh"
#include "Framebuffer.hh"
#include <QStandardPaths>

using clockwork::ApplicationSettings;

ApplicationSettings::ApplicationSettings() :
QSettings(QString("./clockwork-preferences.pro.user"), Format::IniFormat) {
//QSettings(QString("%1/configuration.ini").arg(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)), Format::IniFormat) {
}

bool
ApplicationSettings::isFpsCounterVisible() const {
	return value(Key::ShowFramesPerSecond, false).toBool();
}

void
ApplicationSettings::showFpsCounter(const bool visible) {
	if (isFpsCounterVisible() != visible) {
		setValue(Key::ShowFramesPerSecond, visible);
	}
}

bool
ApplicationSettings::isWindowBorderless() const {
	return value(Key::ShowBorderlessWindow, false).toBool();
}

void
ApplicationSettings::showBorderlessWindow(const bool visible) {
	if (isWindowBorderless() != visible) {
		setValue(Key::ShowBorderlessWindow, visible);
	}
}

clockwork::ShaderProgramIdentifier
ApplicationSettings::getShaderProgramIdentifier() const {
	using enum_traits = enum_traits<ShaderProgramIdentifier>;

	static_assert(std::is_same<int, enum_traits::Ordinal>::value);
	constexpr int DEFAULT_IDENTIFIER = enum_traits::ordinal(ShaderProgramIdentifier::Minimal);
	const int identifier = value(Key::ShaderProgramIdentifier, DEFAULT_IDENTIFIER).toInt();

	return enum_traits::enumerator(identifier);
}

void
ApplicationSettings::setShaderProgramIdentifier(const ShaderProgramIdentifier identifier) {
	if (getShaderProgramIdentifier() != identifier) {
		setValue(Key::ShaderProgramIdentifier, enum_traits<ShaderProgramIdentifier>::ordinal(identifier));
	}
}

clockwork::PrimitiveTopology
ApplicationSettings::getPrimitiveTopology() const {
	using enum_traits = enum_traits<PrimitiveTopology>;

	static_assert(std::is_same<int, enum_traits::Ordinal>::value);
	constexpr int DEFAULT_TOPOLOGY = enum_traits::ordinal(PrimitiveTopology::Triangle);
	const int topology = value(Key::PrimitiveTopology, DEFAULT_TOPOLOGY).toInt();

	return enum_traits::enumerator(topology);
}

void
ApplicationSettings::setPrimitiveTopology(const PrimitiveTopology topology) {
	if (getPrimitiveTopology() != topology) {
		setValue(Key::PrimitiveTopology, enum_traits<PrimitiveTopology>::ordinal(topology));
	}
}

bool
ApplicationSettings::isClippingEnabled() const {
	return value(Key::EnableClipping, true).toBool();
}

void
ApplicationSettings::enableClipping(const bool enable) {
	if (isClippingEnabled() != enable) {
		setValue(Key::EnableClipping, enable);
	}
}

bool
ApplicationSettings::isBackfaceCullingEnabled() const {
	return value(Key::EnableBackfaceCulling, true).toBool();
}

void
ApplicationSettings::enableBackfaceCulling(const bool enable) {
	if (isBackfaceCullingEnabled() != enable) {
		setValue(Key::EnableBackfaceCulling, enable);
	}
}

clockwork::PolygonMode
ApplicationSettings::getPolygonMode() const {
	using enum_traits = enum_traits<PolygonMode>;

	static_assert(std::is_same<int, enum_traits::Ordinal>::value);
	constexpr int DEFAULT_MODE = enum_traits::ordinal(PolygonMode::Fill);
	const int mode = value(Key::PolygonMode, DEFAULT_MODE).toInt();

	return enum_traits::enumerator(mode);
}

void
ApplicationSettings::setPolygonMode(const PolygonMode mode) {
	if (getPolygonMode() != mode) {
		setValue(Key::PolygonMode, enum_traits<PolygonMode>::ordinal(mode));
	}
}

clockwork::ShadeModel
ApplicationSettings::getShadeModel() const {
	using enum_traits = enum_traits<ShadeModel>;

	static_assert(std::is_same<int, enum_traits::Ordinal>::value);
	constexpr int DEFAULT_MODEL = enum_traits::ordinal(ShadeModel::Flat);
	const int model = value(Key::ShadeModel, DEFAULT_MODEL).toInt();

	return enum_traits::enumerator(model);
}

void
ApplicationSettings::setShadeModel(const ShadeModel model) {
	if (getShadeModel() != model) {
		setValue(Key::ShadeModel, enum_traits<ShadeModel>::ordinal(model));
	}
}

bool
ApplicationSettings::isLineAntiAliasingEnabled() const {
	return value(Key::EnableLineAntiAliasing, false).toBool();
}

void
ApplicationSettings::enableLineAntiAliasing(const bool enable) {
	if (isLineAntiAliasingEnabled() != enable) {
		setValue(Key::EnableLineAntiAliasing, enable);
	}
}

bool
ApplicationSettings::isScissorTestEnabled() const {
	return value(Key::EnableScissorTest, false).toBool();
}

void
ApplicationSettings::enableScissorTest(const bool enable) {
	if (isScissorTestEnabled() != enable) {
		setValue(Key::EnableScissorTest, enable);
	}
}

bool
ApplicationSettings::isStencilTestEnabled() const {
	return value(Key::EnableStencilTest, false).toBool();
}

void
ApplicationSettings::enableStencilTest(const bool enable) {
	if (isStencilTestEnabled() != enable) {
		setValue(Key::EnableStencilTest, enable);
	}
}

bool
ApplicationSettings::isDepthTestEnabled() const {
	return value(Key::EnableDepthTest, true).toBool();
}

void
ApplicationSettings::enableDepthTest(const bool enable) {
	if (isDepthTestEnabled() != enable) {
		setValue(Key::EnableDepthTest, enable);
	}
}

bool
ApplicationSettings::contains(const Key key) const {
	return QSettings::contains(ApplicationSettings::keyToString(key));
}

QVariant
ApplicationSettings::value(const Key key, const QVariant& defaultValue) const {
	return QSettings::value(ApplicationSettings::keyToString(key), defaultValue);
}

void
ApplicationSettings::setValue(const Key key, const QVariant& value) {
	QSettings::setValue(ApplicationSettings::keyToString(key), value);
}

QString
ApplicationSettings::keyToString(const Key key) {
	switch (key) {
		case Key::ShowBorderlessWindow:
			return "theme/ShowBorderlessWindow";
		case Key::ShowFramesPerSecond:
			return "debug/ShowFramesPerSecond";
		case Key::ShaderProgramIdentifier:
			return "renderingcontext/ShaderProgram";
		case Key::PrimitiveTopology:
			return "renderingcontext/PrimitiveTopology";
		case Key::EnableClipping:
			return "renderingcontext/EnableClipping";
		case Key::EnableBackfaceCulling:
			return "renderingcontext/EnableBackfaceCulling";
		case Key::PolygonMode:
			return "renderingcontext/PolygonMode";
		case Key::ShadeModel:
			return "renderingcontext/ShadeModel";
		case Key::EnableLineAntiAliasing:
			return "renderingcontext/EnableLineAntiAliasing";
		case Key::EnableScissorTest:
			return "renderingcontext/EnableScissorTest";
		case Key::EnableStencilTest:
			return "renderingcontext/EnableStencilTest";
		case Key::EnableDepthTest:
			return "renderingcontext/EnableDepthTest";
		default:
			qFatal("[ApplicationSettings::keyToString] Undefined key!");
	}
}


text:
#if !defined(XALAN_TraceListener_HEADER_GUARD)
#define XALAN_TraceListener_HEADER_GUARD

// Base include file.  Must be first.
#include "XSLTDefinitions.hpp"

namespace XALAN_CPP_NAMESPACE {

class TracerEvent;
class SelectionEvent;
class GenerateEvent;

class XALAN_XSLT_EXPORT TraceListener
{
public:

    TraceListener();

    virtual
    ~TraceListener();

    /**
     * Method that is called when a trace event occurs. The method is blocking.
     * It must return before processing continues.
     *
     * @param ev trace event
     */
    virtual void
    trace(const TracerEvent&    ev) = 0;

    /**
     * Method that is called just after the formatter listener is called.
     *
     * @param ev generate event
     */
    virtual void
    selected(const SelectionEvent&  ev) = 0;

    /**
     * Method that is called just after the formatter listener is called.
     *
     * @param ev generate event
     */
    virtual void
    generated(const GenerateEvent&  ev) = 0;

    struct TraceListenerTraceFunctor
    {
        TraceListenerTraceFunctor(const TracerEvent&    theEvent) :
            m_event(theEvent)
        {
        }

        void
        operator()(TraceListener*   theListener) const
        {
            theListener->trace(m_event);
        }

        const TracerEvent&  m_event;
    };

    struct TraceListenerSelectFunctor
    {
        TraceListenerSelectFunctor(const SelectionEvent&        theEvent) :
            m_event(theEvent)
        {
        }

        void
        operator()(TraceListener*   theListener) const
        {
            theListener->selected(m_event);
        }

        const SelectionEvent&   m_event;
    };

    struct TraceListenerGenerateFunctor
    {
        TraceListenerGenerateFunctor(const GenerateEvent&   theEvent) :
            m_event(theEvent)
        {
        }

        void
        operator()(TraceListener*   theListener) const
        {
            theListener->generated(m_event);
        }

        const GenerateEvent&    m_event;
    };

};

}

#endif //XALAN_TraceListener_HEADER_GUARD


text:
package acme

import (
	"bufio"
	"fmt"
	"os"

	"github.com/xenolf/lego/acme"
)

// Register the account with the ACME server
func (s *acmeService) Register() error {
	key, err := s.getPrivateKey()
	if err != nil {
		return maskAny(err)
	}

	registration, err := s.getRegistration()
	if err != nil {
		return maskAny(err)
	}

	user := acmeUser{
		Email:        s.Email,
		Registration: registration,
		PrivateKey:   key,
	}

	client, err := acme.NewClient(s.CADirectoryURL, user, s.KeyBits)
	if err != nil {
		return maskAny(err)
	}

	if registration == nil {
		registration, err = client.Register()
		if err != nil {
			return maskAny(err)
		}
		if err := s.saveRegistration(registration); err != nil {
			return maskAny(err)
		}

		user.Registration = registration
		client, err = acme.NewClient(s.CADirectoryURL, user, s.KeyBits)
		if err != nil {
			return maskAny(err)
		}
	}

	fmt.Printf("Find the terms here:%s\n", registration.TosURL)
	if err := confirm("Do you agree with these terms?"); err != nil {
		return maskAny(err)
	}

	if err := client.AgreeToTOS(); err != nil {
		return maskAny(err)
	}

	fmt.Printf(`
Registration succeeded:

Email       : %s
Private key : %s
Registration: %s

Save these files in a secure location.
`, s.Email, s.PrivateKeyPath, s.RegistrationPath)

	return nil
}

func confirm(question string) error {
	for {
		fmt.Printf("%s [yes|no]", question)
		bufStdin := bufio.NewReader(os.Stdin)
		line, _, err := bufStdin.ReadLine()
		if err != nil {
			return err
		}

		if string(line) == "yes" || string(line) == "y" {
			return nil
		}
		fmt.Println("Please enter 'yes' to confirm.")
	}
}


text:
package org.dtk.analysis.script.loader;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.Logger;
import java.util.regex.Pattern;

import org.apache.commons.lang.StringUtils;

/**
 * Abstract class that implements a module path resolving for the Dojo Toolkit
 * loader. Module identifiers are matched against the most specific first when
 * resolving modules to file paths. Base document location is used against the
 * module loader to generate the absolute URL references for files.
 *
 * @author James Thomas
 */

abstract public class AbstractModulePathResolver implements ModulePathResolver {
	/**
	 * Base URL for the module loader.
	 */
	protected URL baseUrl;

	/**
	 * Tree-structure which holds the matching module paths
	 * to resolve. Walking the tree reveals any matching configuration
	 * paths for module identifiers.
	 */
	protected ModulePath root = new ModulePath();

	/**
	 * Regular expression used to convert module identifiers to named parts
	 */
	protected Pattern pathElementPattern;

	/**
	 * Class logger for this instance.
	 */
	protected static Logger logger = Logger.getLogger(AbstractModulePathResolver.class.getName());

	/**
	 * Default constructor, passing in loader location and configuration paths for
	 * modules.
	 *
	 * @param baseUrl - Loader location directory
	 * @param modulePaths - Lookup for module paths to locations
	 */
	public AbstractModulePathResolver(URL baseUrl, Map<String, String> modulePaths) {
		this.baseUrl = baseUrl;
		setUpModulePathLookup(modulePaths);
	}

	/**
	 * Return local file path reference relative to the module loader.
	 *
	 * @param moduleIdentifier - Absolute module identifier
	 * @return Relative module path
	 */
	@Override
	public String getRelativePath(String moduleIdentifier) {
		return resolveModulePath(root, getPathElements(moduleIdentifier));
	}
	/**
	 * Return absolute file path for a resolved module identifier.
	 *
	 * @param moduleIdentifier - Absolute module identifier
	 * @return Absolute module location
	 */
	@Override
	public URL getAbsolutePath(String moduleIdentifier) {
		URL absolutePath = null;
		String relativePath = getRelativePath(moduleIdentifier);

		try {
			absolutePath = new URL(baseUrl, relativePath);
		} catch (MalformedURLException e) {
			logger.warning("Invalid relative encountered while constructing module path: " + relativePath);
		}

		return absolutePath;
	}

	/**
	 * Iterate through the configuration values for the specified:
	 * 		module paths -> locations
	 * lookup and convert module path to a linked list of tree nodes, with each path
	 * component being an edge.
	 * Nodes should contain the file location for the
	 * walked series of paths nodes.
	 * So the identifier "a/b/c" -> "../dir/" should become....
	 *      root
	 *	    /
	 *     a
	 *    /
	 *   b
	 *  /
	 * c ( value = "../dir/")
	 *
	 * @param modulePaths - Lookup for identifiers to locations
	 */
	protected void setUpModulePathLookup(Map<String, String> modulePaths) {
		Iterator<Entry<String, String>> pathIter = modulePaths.entrySet().iterator();
		ModulePath currentChild;

		while(pathIter.hasNext()) {
			Entry<String, String> pathEntry = pathIter.next();
			String pathMatcher = pathEntry.getKey(), pathValue = pathEntry.getValue();

			currentChild = root;

			for(String pathElement: getPathElements(pathMatcher)) {
				currentChild = createDescendentPath(currentChild, pathElement);
			}

			currentChild.setValue(pathValue);
		}
	}

	/**
	 * Create a module path identifier as a child node of the modulePath
	 * parent. If a node already exists, just return the current modulePath
	 * child.
	 *
	 * @param modulePath - Parent path element
	 * @param path - Module path identifier
	 * @return Module path
	 */
	protected ModulePath createDescendentPath(ModulePath modulePath, String path) {
		ModulePath descendentChild = modulePath.getDescedentPath(path);
		if (descendentChild == null) {
			descendentChild = modulePath.createDescendentPath(path);
		}
		return descendentChild;
	}

	/**
	 * Convert module path section into a series of path fragment,
	 * splitting on module format separator.
	 *
	 * @param pathMatcher - Module path matcher section
	 * @return List of path fragments
	 */
	protected List<String> getPathElements(String pathMatcher) {
		if (pathElementPattern == null) {
			pathElementPattern = Pattern.compile(Character.toString(getModulePathSeparator()), Pattern.LITERAL);
		}

		return new ArrayList<String>(Arrays.asList(pathElementPattern.split(pathMatcher)));
	}

	/**
	 * Walk module paths tree searching for a matching series of path fragments.
	 * Will return node value at deepest tree match discovered by recursively
	 * traversing the child nodes.
	 *
	 * @param currentNode - Module path tree node
	 * @param pathElements - List of path fragments to search against
	 * @return Matching module path
	 */
	protected String resolveModulePath(ModulePath currentNode, List<String> pathElements) {
		// If we have no next matching path to search or check, just return the current node value....
		if (pathElements.isEmpty() || !hasNextPathMatch(currentNode, pathElements)) {
			return constructResolvedPath(currentNode.getValue(), pathElements);
		}

		// Otherwise, grab the list head and keep searching...
		String nextPathMatch = pathElements.remove(0);
		return resolveModulePath(currentNode.getDescedentPath(nextPathMatch), pathElements);
	}

	/**
	 * Convert a series of remaining path fragments into a single path string
	 * along with a matching path location.
	 *
	 * @param pathPrefix - Path location
	 * @param pathParts - Unmatched path fragments
	 * @return Resolved path
	 */
	protected String constructResolvedPath(final String pathPrefix, final List<String> pathParts) {
		return String.format("%s/%s.js", pathPrefix, StringUtils.join(pathParts, "/"));
	}

	/**
	 * Check whether we have a descendant path to search.
	 *
	 * @param modulePath - Module path node
	 * @param pathElements - Path fragments to match
	 * @return Node has path
	 */
	protected boolean hasNextPathMatch(ModulePath modulePath, List<String> pathElements) {
		return modulePath.hasDescendantPath(pathElements.get(0));
	}

	/**
	 * Implementation-specific module path fragment separator
	 *
	 * @return Path separator
	 */
	abstract protected char getModulePathSeparator();

	/**
	 * Inline class to provide a tree-like structure,
	 * representing a series of string fragments to match against
	 * module paths. Nodes contain the file location that matches the
	 * descendent paths values.
	 */
    private class ModulePath {
        private String value = "..";
        private Map<String, ModulePath> paths = new HashMap<String, ModulePath>();

        public String getValue() {
        	return value;
        }

        public void setValue(String value) {
        	this.value = value;
        }

        public ModulePath getDescedentPath(String pathIdentifier) {
        	return paths.get(pathIdentifier);
        }

        public ModulePath createDescendentPath(String pathIdentifier) {
        	ModulePath modulePath = new ModulePath();
        	paths.put(pathIdentifier, modulePath);
        	return modulePath;
        }

        public boolean hasDescendantPath(String pathIdentifier) {
        	return paths.containsKey(pathIdentifier);
        }
    }
}


text:
module Resgen #nodoc
  Reality::Mda.define_system(Resgen, :default_descriptor_name => 'resources.rb') do |r|
    r.model_element(:repository)
    r.model_element(:catalog, :repository, :custom_initialize => true)
    r.model_element(:asset_directory, :catalog)
    r.model_element(:css_file, :asset_directory)
    r.model_element(:image_file, :asset_directory, :custom_initialize => true)
    r.model_element(:data_file, :asset_directory, :custom_initialize => true)
    r.model_element(:uibinder_file, :asset_directory)
    r.model_element(:uibinder_field, :uibinder_file, :access_method => :fields, :inverse_access_method => :field, :custom_initialize => true)
    r.model_element(:uibinder_image, :uibinder_file, :access_method => :images, :inverse_access_method => :image, :custom_initialize => true)
    r.model_element(:uibinder_data, :uibinder_file, :access_method => :datas, :inverse_access_method => :data, :custom_initialize => true)
    r.model_element(:uibinder_parameter, :uibinder_file, :access_method => :parameters, :inverse_access_method => :parameter, :custom_initialize => true)
    r.model_element(:uibinder_style, :uibinder_file, :access_method => :styles, :inverse_access_method => :style, :custom_initialize => true)
  end

  class Build
    class LoadDescriptor
      def pre_load
        Resgen.current_filename = self.filename
      end

      def post_load
        Resgen.current_filename = nil
      end
    end
  end

  class Runner < Reality::Generators::BaseRunner
    def pre_load(filename)
      Resgen.current_filename = filename
    end

    def post_load(filename)
      Resgen.current_filename = nil
    end
  end

  module TemplateSetManager #nodoc
    class << self
      def derive_default_helpers(options)
        helpers = []
        helpers << Resgen::Gwt::Helper if options[:file_type] == 'java'
        helpers
      end
    end
  end
end


text: define("dojox/editor/plugins/nls/ca/Save",({"save":"Desa"}));


text:
"use strict";

var TimelinesController = require('../../../controllers').TimelinesController

exports.addRoutes = function(app) {
  app.get('/v1/timelines/home',               TimelinesController.home)
  app.get('/v1/timelines/filter/discussions', TimelinesController.myDiscussions)
  app.get('/v1/timelines/filter/directs',     TimelinesController.directs)
  app.get('/v1/timelines/:username',          TimelinesController.posts)
  app.get('/v1/timelines/:username/likes',    TimelinesController.likes)
  app.get('/v1/timelines/:username/comments', TimelinesController.comments)
}


text:
var express = require('express'),
    router = express.Router(),
    auth = require('../../helpers/authorization.js'),
    appSettings = require('../utils/appSettings')

var appDesc = []
appDesc['apiSingle'] = 'portal'
appDesc['apiCollection'] = '/portal'
appDesc['folder'] = '/portal'
appDesc['singularName'] = "Configuration"
appDesc['pluralName'] = "Configurations"
// appDesc['newObject'] = new Event()

router.use(function(req, res, next) {
    appSettings.appPaths(req, res, appDesc)
    next()
})

router.get('/', auth.needsRole('ADMIN'), function(req, res, next) {
    res.render('admin/portal', {
        title: 'Admin Portal',
        user: req.user
    })
})

module.exports = router


text:
package com.amazonaws.services.eventbridge;

import javax.annotation.Generated;

import com.amazonaws.services.eventbridge.model.*;

/**
 * Abstract implementation of {@code AmazonEventBridgeAsync}. Convenient method forms pass through to the corresponding
 * overload that takes a request object and an {@code AsyncHandler}, which throws an
 * {@code UnsupportedOperationException}.
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AbstractAmazonEventBridgeAsync extends AbstractAmazonEventBridge implements AmazonEventBridgeAsync {

    protected AbstractAmazonEventBridgeAsync() {
    }

    @Override
    public java.util.concurrent.Future<ActivateEventSourceResult> activateEventSourceAsync(ActivateEventSourceRequest request) {

        return activateEventSourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ActivateEventSourceResult> activateEventSourceAsync(ActivateEventSourceRequest request,
            com.amazonaws.handlers.AsyncHandler<ActivateEventSourceRequest, ActivateEventSourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CancelReplayResult> cancelReplayAsync(CancelReplayRequest request) {

        return cancelReplayAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CancelReplayResult> cancelReplayAsync(CancelReplayRequest request,
            com.amazonaws.handlers.AsyncHandler<CancelReplayRequest, CancelReplayResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateApiDestinationResult> createApiDestinationAsync(CreateApiDestinationRequest request) {

        return createApiDestinationAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateApiDestinationResult> createApiDestinationAsync(CreateApiDestinationRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateApiDestinationRequest, CreateApiDestinationResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateArchiveResult> createArchiveAsync(CreateArchiveRequest request) {

        return createArchiveAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateArchiveResult> createArchiveAsync(CreateArchiveRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateArchiveRequest, CreateArchiveResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateConnectionResult> createConnectionAsync(CreateConnectionRequest request) {

        return createConnectionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateConnectionResult> createConnectionAsync(CreateConnectionRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateConnectionRequest, CreateConnectionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateEndpointResult> createEndpointAsync(CreateEndpointRequest request) {

        return createEndpointAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateEndpointResult> createEndpointAsync(CreateEndpointRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateEndpointRequest, CreateEndpointResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateEventBusResult> createEventBusAsync(CreateEventBusRequest request) {

        return createEventBusAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateEventBusResult> createEventBusAsync(CreateEventBusRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateEventBusRequest, CreateEventBusResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreatePartnerEventSourceResult> createPartnerEventSourceAsync(CreatePartnerEventSourceRequest request) {

        return createPartnerEventSourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreatePartnerEventSourceResult> createPartnerEventSourceAsync(CreatePartnerEventSourceRequest request,
            com.amazonaws.handlers.AsyncHandler<CreatePartnerEventSourceRequest, CreatePartnerEventSourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeactivateEventSourceResult> deactivateEventSourceAsync(DeactivateEventSourceRequest request) {

        return deactivateEventSourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeactivateEventSourceResult> deactivateEventSourceAsync(DeactivateEventSourceRequest request,
            com.amazonaws.handlers.AsyncHandler<DeactivateEventSourceRequest, DeactivateEventSourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeauthorizeConnectionResult> deauthorizeConnectionAsync(DeauthorizeConnectionRequest request) {

        return deauthorizeConnectionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeauthorizeConnectionResult> deauthorizeConnectionAsync(DeauthorizeConnectionRequest request,
            com.amazonaws.handlers.AsyncHandler<DeauthorizeConnectionRequest, DeauthorizeConnectionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeleteApiDestinationResult> deleteApiDestinationAsync(DeleteApiDestinationRequest request) {

        return deleteApiDestinationAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteApiDestinationResult> deleteApiDestinationAsync(DeleteApiDestinationRequest request,
            com.amazonaws.handlers.AsyncHandler<DeleteApiDestinationRequest, DeleteApiDestinationResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeleteArchiveResult> deleteArchiveAsync(DeleteArchiveRequest request) {

        return deleteArchiveAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteArchiveResult> deleteArchiveAsync(DeleteArchiveRequest request,
            com.amazonaws.handlers.AsyncHandler<DeleteArchiveRequest, DeleteArchiveResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeleteConnectionResult> deleteConnectionAsync(DeleteConnectionRequest request) {

        return deleteConnectionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteConnectionResult> deleteConnectionAsync(DeleteConnectionRequest request,
            com.amazonaws.handlers.AsyncHandler<DeleteConnectionRequest, DeleteConnectionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeleteEndpointResult> deleteEndpointAsync(DeleteEndpointRequest request) {

        return deleteEndpointAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteEndpointResult> deleteEndpointAsync(DeleteEndpointRequest request,
            com.amazonaws.handlers.AsyncHandler<DeleteEndpointRequest, DeleteEndpointResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeleteEventBusResult> deleteEventBusAsync(DeleteEventBusRequest request) {

        return deleteEventBusAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteEventBusResult> deleteEventBusAsync(DeleteEventBusRequest request,
            com.amazonaws.handlers.AsyncHandler<DeleteEventBusRequest, DeleteEventBusResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeletePartnerEventSourceResult> deletePartnerEventSourceAsync(DeletePartnerEventSourceRequest request) {

        return deletePartnerEventSourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeletePartnerEventSourceResult> deletePartnerEventSourceAsync(DeletePartnerEventSourceRequest request,
            com.amazonaws.handlers.AsyncHandler<DeletePartnerEventSourceRequest, DeletePartnerEventSourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeleteRuleResult> deleteRuleAsync(DeleteRuleRequest request) {

        return deleteRuleAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteRuleResult> deleteRuleAsync(DeleteRuleRequest request,
            com.amazonaws.handlers.AsyncHandler<DeleteRuleRequest, DeleteRuleResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DescribeApiDestinationResult> describeApiDestinationAsync(DescribeApiDestinationRequest request) {

        return describeApiDestinationAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribeApiDestinationResult> describeApiDestinationAsync(DescribeApiDestinationRequest request,
            com.amazonaws.handlers.AsyncHandler<DescribeApiDestinationRequest, DescribeApiDestinationResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DescribeArchiveResult> describeArchiveAsync(DescribeArchiveRequest request) {

        return describeArchiveAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribeArchiveResult> describeArchiveAsync(DescribeArchiveRequest request,
            com.amazonaws.handlers.AsyncHandler<DescribeArchiveRequest, DescribeArchiveResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DescribeConnectionResult> describeConnectionAsync(DescribeConnectionRequest request) {

        return describeConnectionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribeConnectionResult> describeConnectionAsync(DescribeConnectionRequest request,
            com.amazonaws.handlers.AsyncHandler<DescribeConnectionRequest, DescribeConnectionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DescribeEndpointResult> describeEndpointAsync(DescribeEndpointRequest request) {

        return describeEndpointAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribeEndpointResult> describeEndpointAsync(DescribeEndpointRequest request,
            com.amazonaws.handlers.AsyncHandler<DescribeEndpointRequest, DescribeEndpointResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DescribeEventBusResult> describeEventBusAsync(DescribeEventBusRequest request) {

        return describeEventBusAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribeEventBusResult> describeEventBusAsync(DescribeEventBusRequest request,
            com.amazonaws.handlers.AsyncHandler<DescribeEventBusRequest, DescribeEventBusResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DescribeEventSourceResult> describeEventSourceAsync(DescribeEventSourceRequest request) {

        return describeEventSourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribeEventSourceResult> describeEventSourceAsync(DescribeEventSourceRequest request,
            com.amazonaws.handlers.AsyncHandler<DescribeEventSourceRequest, DescribeEventSourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DescribePartnerEventSourceResult> describePartnerEventSourceAsync(DescribePartnerEventSourceRequest request) {

        return describePartnerEventSourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribePartnerEventSourceResult> describePartnerEventSourceAsync(DescribePartnerEventSourceRequest request,
            com.amazonaws.handlers.AsyncHandler<DescribePartnerEventSourceRequest, DescribePartnerEventSourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DescribeReplayResult> describeReplayAsync(DescribeReplayRequest request) {

        return describeReplayAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribeReplayResult> describeReplayAsync(DescribeReplayRequest request,
            com.amazonaws.handlers.AsyncHandler<DescribeReplayRequest, DescribeReplayResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DescribeRuleResult> describeRuleAsync(DescribeRuleRequest request) {

        return describeRuleAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DescribeRuleResult> describeRuleAsync(DescribeRuleRequest request,
            com.amazonaws.handlers.AsyncHandler<DescribeRuleRequest, DescribeRuleResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DisableRuleResult> disableRuleAsync(DisableRuleRequest request) {

        return disableRuleAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DisableRuleResult> disableRuleAsync(DisableRuleRequest request,
            com.amazonaws.handlers.AsyncHandler<DisableRuleRequest, DisableRuleResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<EnableRuleResult> enableRuleAsync(EnableRuleRequest request) {

        return enableRuleAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<EnableRuleResult> enableRuleAsync(EnableRuleRequest request,
            com.amazonaws.handlers.AsyncHandler<EnableRuleRequest, EnableRuleResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListApiDestinationsResult> listApiDestinationsAsync(ListApiDestinationsRequest request) {

        return listApiDestinationsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListApiDestinationsResult> listApiDestinationsAsync(ListApiDestinationsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListApiDestinationsRequest, ListApiDestinationsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListArchivesResult> listArchivesAsync(ListArchivesRequest request) {

        return listArchivesAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListArchivesResult> listArchivesAsync(ListArchivesRequest request,
            com.amazonaws.handlers.AsyncHandler<ListArchivesRequest, ListArchivesResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListConnectionsResult> listConnectionsAsync(ListConnectionsRequest request) {

        return listConnectionsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListConnectionsResult> listConnectionsAsync(ListConnectionsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListConnectionsRequest, ListConnectionsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListEndpointsResult> listEndpointsAsync(ListEndpointsRequest request) {

        return listEndpointsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListEndpointsResult> listEndpointsAsync(ListEndpointsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListEndpointsRequest, ListEndpointsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListEventBusesResult> listEventBusesAsync(ListEventBusesRequest request) {

        return listEventBusesAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListEventBusesResult> listEventBusesAsync(ListEventBusesRequest request,
            com.amazonaws.handlers.AsyncHandler<ListEventBusesRequest, ListEventBusesResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListEventSourcesResult> listEventSourcesAsync(ListEventSourcesRequest request) {

        return listEventSourcesAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListEventSourcesResult> listEventSourcesAsync(ListEventSourcesRequest request,
            com.amazonaws.handlers.AsyncHandler<ListEventSourcesRequest, ListEventSourcesResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListPartnerEventSourceAccountsResult> listPartnerEventSourceAccountsAsync(ListPartnerEventSourceAccountsRequest request) {

        return listPartnerEventSourceAccountsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListPartnerEventSourceAccountsResult> listPartnerEventSourceAccountsAsync(ListPartnerEventSourceAccountsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListPartnerEventSourceAccountsRequest, ListPartnerEventSourceAccountsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListPartnerEventSourcesResult> listPartnerEventSourcesAsync(ListPartnerEventSourcesRequest request) {

        return listPartnerEventSourcesAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListPartnerEventSourcesResult> listPartnerEventSourcesAsync(ListPartnerEventSourcesRequest request,
            com.amazonaws.handlers.AsyncHandler<ListPartnerEventSourcesRequest, ListPartnerEventSourcesResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListReplaysResult> listReplaysAsync(ListReplaysRequest request) {

        return listReplaysAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListReplaysResult> listReplaysAsync(ListReplaysRequest request,
            com.amazonaws.handlers.AsyncHandler<ListReplaysRequest, ListReplaysResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListRuleNamesByTargetResult> listRuleNamesByTargetAsync(ListRuleNamesByTargetRequest request) {

        return listRuleNamesByTargetAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListRuleNamesByTargetResult> listRuleNamesByTargetAsync(ListRuleNamesByTargetRequest request,
            com.amazonaws.handlers.AsyncHandler<ListRuleNamesByTargetRequest, ListRuleNamesByTargetResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListRulesResult> listRulesAsync(ListRulesRequest request) {

        return listRulesAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListRulesResult> listRulesAsync(ListRulesRequest request,
            com.amazonaws.handlers.AsyncHandler<ListRulesRequest, ListRulesResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListTagsForResourceResult> listTagsForResourceAsync(ListTagsForResourceRequest request) {

        return listTagsForResourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListTagsForResourceResult> listTagsForResourceAsync(ListTagsForResourceRequest request,
            com.amazonaws.handlers.AsyncHandler<ListTagsForResourceRequest, ListTagsForResourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListTargetsByRuleResult> listTargetsByRuleAsync(ListTargetsByRuleRequest request) {

        return listTargetsByRuleAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListTargetsByRuleResult> listTargetsByRuleAsync(ListTargetsByRuleRequest request,
            com.amazonaws.handlers.AsyncHandler<ListTargetsByRuleRequest, ListTargetsByRuleResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<PutEventsResult> putEventsAsync(PutEventsRequest request) {

        return putEventsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<PutEventsResult> putEventsAsync(PutEventsRequest request,
            com.amazonaws.handlers.AsyncHandler<PutEventsRequest, PutEventsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<PutPartnerEventsResult> putPartnerEventsAsync(PutPartnerEventsRequest request) {

        return putPartnerEventsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<PutPartnerEventsResult> putPartnerEventsAsync(PutPartnerEventsRequest request,
            com.amazonaws.handlers.AsyncHandler<PutPartnerEventsRequest, PutPartnerEventsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<PutPermissionResult> putPermissionAsync(PutPermissionRequest request) {

        return putPermissionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<PutPermissionResult> putPermissionAsync(PutPermissionRequest request,
            com.amazonaws.handlers.AsyncHandler<PutPermissionRequest, PutPermissionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<PutRuleResult> putRuleAsync(PutRuleRequest request) {

        return putRuleAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<PutRuleResult> putRuleAsync(PutRuleRequest request,
            com.amazonaws.handlers.AsyncHandler<PutRuleRequest, PutRuleResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<PutTargetsResult> putTargetsAsync(PutTargetsRequest request) {

        return putTargetsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<PutTargetsResult> putTargetsAsync(PutTargetsRequest request,
            com.amazonaws.handlers.AsyncHandler<PutTargetsRequest, PutTargetsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<RemovePermissionResult> removePermissionAsync(RemovePermissionRequest request) {

        return removePermissionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<RemovePermissionResult> removePermissionAsync(RemovePermissionRequest request,
            com.amazonaws.handlers.AsyncHandler<RemovePermissionRequest, RemovePermissionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<RemoveTargetsResult> removeTargetsAsync(RemoveTargetsRequest request) {

        return removeTargetsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<RemoveTargetsResult> removeTargetsAsync(RemoveTargetsRequest request,
            com.amazonaws.handlers.AsyncHandler<RemoveTargetsRequest, RemoveTargetsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<StartReplayResult> startReplayAsync(StartReplayRequest request) {

        return startReplayAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<StartReplayResult> startReplayAsync(StartReplayRequest request,
            com.amazonaws.handlers.AsyncHandler<StartReplayRequest, StartReplayResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest request) {

        return tagResourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<TagResourceResult> tagResourceAsync(TagResourceRequest request,
            com.amazonaws.handlers.AsyncHandler<TagResourceRequest, TagResourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<TestEventPatternResult> testEventPatternAsync(TestEventPatternRequest request) {

        return testEventPatternAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<TestEventPatternResult> testEventPatternAsync(TestEventPatternRequest request,
            com.amazonaws.handlers.AsyncHandler<TestEventPatternRequest, TestEventPatternResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UntagResourceResult> untagResourceAsync(UntagResourceRequest request) {

        return untagResourceAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UntagResourceResult> untagResourceAsync(UntagResourceRequest request,
            com.amazonaws.handlers.AsyncHandler<UntagResourceRequest, UntagResourceResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateApiDestinationResult> updateApiDestinationAsync(UpdateApiDestinationRequest request) {

        return updateApiDestinationAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateApiDestinationResult> updateApiDestinationAsync(UpdateApiDestinationRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateApiDestinationRequest, UpdateApiDestinationResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateArchiveResult> updateArchiveAsync(UpdateArchiveRequest request) {

        return updateArchiveAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateArchiveResult> updateArchiveAsync(UpdateArchiveRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateArchiveRequest, UpdateArchiveResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateConnectionResult> updateConnectionAsync(UpdateConnectionRequest request) {

        return updateConnectionAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateConnectionResult> updateConnectionAsync(UpdateConnectionRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateConnectionRequest, UpdateConnectionResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateEndpointResult> updateEndpointAsync(UpdateEndpointRequest request) {

        return updateEndpointAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateEndpointResult> updateEndpointAsync(UpdateEndpointRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateEndpointRequest, UpdateEndpointResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

}


text:
package emr

import (
	. "aliyun-openapi-go-sdk/core"
	"strconv"
)

type RunExecutePlanRequest struct {
	RpcRequest
	ExecutePlanId int
}

func (r *RunExecutePlanRequest) SetExecutePlanId(value int) {
	r.ExecutePlanId = value
	r.QueryParams.Set("ExecutePlanId", strconv.Itoa(value))
}
func (r *RunExecutePlanRequest) GetExecutePlanId() int {
	return r.ExecutePlanId
}

func (r *RunExecutePlanRequest) Init() {
	r.RpcRequest.Init()
	r.SetVersion(Version)
	r.SetAction("RunExecutePlan")
	r.SetProduct(Product)
}

type RunExecutePlanResponse struct {
}

func RunExecutePlan(req *RunExecutePlanRequest, accessId, accessSecret string) (*RunExecutePlanResponse, error) {
	var pResponse RunExecutePlanResponse
	body, err := ApiHttpRequest(accessId, accessSecret, req)
	if err != nil {
		return nil, err
	}
	ApiUnmarshalResponse(req.GetFormat(), body, &pResponse)
	return &pResponse, err
}


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@mipmap/ic_my_infor_girl_black" android:state_checked="true" />

    <item android:drawable="@mipmap/ic_my_infor_girl_gray" />
</selector>


text:
layout: default
---

## Week 3 - Overview

Students should be comfortable with the following at the end of this week:

* Rails
* MVC Architecture
* Rake
* Relational Database Basics
* Migrations
* Basic Heroku Deployment

## Monday

#### Lecture

* Project Review
  * Keyword arguments
  * Mocking tests
  * ||=
  * The OTHER of the 2 hardest problems in computer science: Cache invalidation
  * `File.open`
  * Floating point arithmetic
    * 129.95*10
    * 129.95*100
  * Params in URLs
  * " vs '
  * Don't overdo it on instance variables
  * Regular expressions
    * "Peter piper picked a peck of pickled peppers"
    * +, *, ?
    * \w, \d, \s, and their capital (opposite) versions
* Exercise: Build the simplest possible version of function that tells you whether an e-mail address is valid.  Then, if you have time, make it better.
* More regex
  * Capture groups
  * Using regex in Ruby
  * .match
  * .scan, .sub, .gsub
* Human Learning: agile development practices
  * Iterate (this gets back to feedback cycles).
  * Pair programming (this gets back to feedback cycles)
* Diagram: Feedback cycles of escalating size
* Monkey Patching: Change a string to add a .to_pig_latin

#### Notes

* My favorite tutorial for learning Regular Expressions is [RegexOne](http://regexone.com/)
* The best way to fiddle with Regex is [Rubular](http://rubular.com/)

#### Reading

* Continue [Git Immersion](http://gitimmersion.com/).  Get through Lab 30.
* [Pro Git regarding Branching and Merging](http://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)

#### Assignment

* [Employee Reviews](https://github.com/tiyd-rails-2015-01/employee_reviews)

## Tuesday

#### Lecture

* Assignment Review
* Rails Intro without models
  * Motivating Example: A rails app that asks me for my time zone, then gives me the time. (and maybe go back to this in future classes?)
  * [Code from example](https://github.com/tiyd-rails-2015-01/w3-2-example)
  * `strftime()`
* MVC
* Components of a URL
* Semantic versioning (e.g. 4.1.5)
* Gemfiles
* `bundle install`
* `rails new`
* `rails server`
* `rails console`
* `rails generate controller`
* IP addresses and ports
* The Router
* GET vs. POST
* HTML Forms
  * form
  * input
  * select
  * button
* Embedded Ruby
* Rails helpers for making form elements
* Rails params

#### Notes

* [`strftime()`](http://strftime.net/)

#### Reading

* Work on Ruby Koans through `about_triangle_project_2.rb`

#### Assignment

* [Motivational Quotation Generator](https://github.com/tiyd-rails-2015-01/motivational_quotations)

## Wednesday

#### Lecture

* Assignment Review
  * dissect select_tag
  * second parameter to options_for_select
  * private methods for non-actions
  * overuse of instance variables
  * Write your own validations (perhaps on a datetime to validate uniqueness of date)

* Models without databases
* Class methods
* Example: add a model to the quote generator.
* Exercise: Do what I just did!  Add a model to YOUR quote generator. <!-- This was not great. -->

* Database tables
* _on fields
* _at fields
* `t.timestamps`
* `rails generate model`
* Migrations
* `rake db:migrate`
* Scaffold

#### Reading

* Work on Ruby Koans through `about_dice_project.rb`

#### Assignment

* [Wallet](https://github.com/tiyd-rails-2015-01/wallet)

## Thursday

#### Lecture

* Assignment Review
  * rails generate migration
  * add_column, etc
  * links
  * rake routes
  * partials
  * rake db:drop and db:create
  * config.time_zone = 'Eastern Time (US & Canada)'
  * t.decimal :amount, precision: 5, scale: 2

* Human Learning from Monday:
  * Build fully-functional apps during each iteration.
  * Example: Build an ecommerce site for T-shirts.  You know you want it to:
    * Accept credit card payments from customers
    * Allow orders to be made for specific size and color of shirts
    * Allow color/size combos to be marked as out-of-stock
    * Send sale e-mails

* More model work
  * .all
  * .first
  * .order
  * .where
  * .count
  * Validations
  * Mention of `belongs_to` and `has_many`
* Exercise: Add at least two validations to your Rails app from last night. <!-- This went surprisingly well -->

* Heroku and the value of Shipping It
  * development vs production
  * `git remote` review
  * Set up account
  * Create new Heroku project
  * Move `sqlite3` gem
  * Add `pg` and `rails_12factor gems`
  * `bundle install --without production`
  * heroku add remote command
  * git push heroku master
  * heroku run rake db:migrate

#### Notes

* [Funny Names for Ruby Operators](http://ruby-operators.herokuapp.com/)
* [Heroku docs on installing Rails 4 apps](https://devcenter.heroku.com/articles/rails4)
* [Rails validations](http://apidock.com/rails/ActiveModel/Validations/ClassMethods/validates)

## Weekend Assignment - As Pairs

[Health Tracker](https://github.com/tiyd-rails-2015-01/health_tracker)


text:
module Usmu
  class Plugin
    # This class describes all the hooks available from Usmu Core.
    # @api hooks
    class CoreHooks
      # Hook to allow adding commands to the console UI.
      #
      # @param [Usmu::Ui::Console] ui The UI instance for this session.
      # @param [Commander::Runner] c The Commander instance to add commands to.
      def commands(ui, c); end

      # Hook to allow altering the list of files that are in the site.
      #
      # @param [Array<Usmu::Template::StaticFile>] renderables An array of renderables.
      # @param [Usmu::SiteGenerator] generator The site generator being used.
      #
      # @return [Array<Usmu::Template::StaticFile>] The altered list of renderables.
      def renderables_alter(renderables, generator); end
    end
  end
end


text:
@interface LYViewController ()

@end

@implementation LYViewController

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    [_delegate enablePanGesture];
}

- (void)viewDidDisappear:(BOOL)animated
{
    [super viewDidDisappear:animated];
    [_delegate disablePanGesture];
}

- (IBAction)toggleMenu:(id)sender
{
    [_delegate toggleMenuDidClicked];
}

@end