text:
/*
 * This file is part of the DITA Open Toolkit project.
 * See the accompanying license.txt file for applicable licenses.
 */

/*
 * (c) Copyright IBM Corp. 2004, 2008 All Rights Reserved.
 */
package org.dita.dost.invoker;

import static org.dita.dost.util.Constants.*;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.Mapper;
import org.apache.tools.ant.types.XMLCatalog;
import org.dita.dost.exception.DITAOTException;
import org.dita.dost.log.DITAOTAntLogger;
import org.dita.dost.module.AbstractPipelineModule;
import org.dita.dost.module.XsltModule;
import org.dita.dost.pipeline.PipelineFacade;
import org.dita.dost.pipeline.PipelineHashIO;
import org.dita.dost.util.Job;

/**
 * Ant task for executing pipeline modules.
 *
 * @author Deborah Pickett
 */
public final class ExtensibleAntInvoker extends Task {

    /** Pipeline. */
    private final PipelineFacade pipeline;
    /** Pipeline attributes and parameters */
    private final Map<String, String> attrs = new HashMap<String, String>();
    /** Nested params. */
    private final ArrayList<Param> pipelineParams;
    /** Nested modules. */
    private final ArrayList<Module> modules;
    /** Temporary directory. */
    private File tempDir;

    /**
     * Constructor.
     */
    public ExtensibleAntInvoker() {
        super();
        pipeline = new PipelineFacade();
        pipelineParams = new ArrayList<Param>();
        modules = new ArrayList<Module>();
    }

    /**
     * Set message.
     * @param m message
     */
    public void setMessage(final String m) {
        attrs.put("message", m);
    }

    /**
     * Set input map.
     * @param inputmap input map file, may be relative or absolute
     */
    public void setInputmap(final String inputmap) {
        attrs.put(ANT_INVOKER_PARAM_INPUTMAP, inputmap);
    }

    /**
     * Set temporary directory.
     * @param tempdir temporary directory
     */
    public void setTempdir(final File tempdir) {
        this.tempDir = tempdir.getAbsoluteFile();
        attrs.put(ANT_INVOKER_PARAM_TEMPDIR, tempdir.getAbsolutePath());
    }

    /**
     * Handle nested parameters. Add the key/value to the pipeline hash, unless
     * the "if" attribute is set and refers to a unset property.
     * @return parameter
     */
    public Param createParam() {
        final Param p = new Param();
        pipelineParams.add(p);
        return p;
    }

    /**
     * Handle nested module elements.
     *
     * @since 1.6
     */
    public void addConfiguredModule(final Module m) {
        modules.add(m);
    }

    public void addConfiguredXslt(final Xslt xslt) {
        modules.add(xslt);
    }

    /**
     * Execution point of this invoker.
     * @throws BuildException exception
     */
    @Override
    public void execute() throws BuildException {
        if (modules.isEmpty()) {
            throw new BuildException("Module must be specified");
        }
        if (attrs.get(ANT_INVOKER_PARAM_BASEDIR) == null) {
            attrs.put(ANT_INVOKER_PARAM_BASEDIR, getProject().getBaseDir().getAbsolutePath());
        }
        for (final Param p : pipelineParams) {
            if (!p.isValid()) {
                throw new BuildException("Incomplete parameter");
            }
            final String ifProperty = p.getIf();
            final String unlessProperty = p.getUnless();
            if ((ifProperty == null || getProject().getProperties().containsKey(ifProperty))
                    && (unlessProperty == null || !getProject().getProperties().containsKey(unlessProperty))) {
                attrs.put(p.getName(), p.getValue());
            }
        }

        long start, end;
        final DITAOTAntLogger logger = new DITAOTAntLogger(getProject());
        logger.setTask(this);
        pipeline.setLogger(logger);
        pipeline.setJob(getJob(tempDir, getProject()));
        try {
            for (final Module m: modules) {
                final PipelineHashIO pipelineInput = new PipelineHashIO();
                for (final Map.Entry<String, String> e: attrs.entrySet()) {
                    pipelineInput.setAttribute(e.getKey(), e.getValue());
                }
                if (m instanceof Xslt) {
                    final Xslt xm = (Xslt) m;
                    final XsltModule x = new XsltModule();
                    x.setStyle(xm.style);
                    if (xm.in != null) {
                    	x.setSource(xm.in);
                    	x.setResult(xm.out);
                    } else {
	                    final Set<File> inc = readListFile(xm.includes, logger);
	                    inc.removeAll(readListFile(xm.excludes, logger));
	                    x.setIncludes(inc);
	                    x.setDestinationDir(xm.destDir != null ? xm.destDir : xm.baseDir);
	                    x.setSorceDir(xm.baseDir);
                    }
                    x.setFilenameParam(xm.filenameparameter);
                    x.setFiledirParam(xm.filedirparameter);
                    x.setReloadstylesheet(xm.reloadstylesheet);
                    x.setXMLCatalog(xm.xmlcatalog);
                    if (xm.mapper != null) {
                    	x.setMapper(xm.mapper.getImplementation());
                    }
                    for (final Param p : m.params) {
                        if (!p.isValid()) {
                            throw new BuildException("Incomplete parameter");
                        }
                        if (isValid(p.getIf(), p.getUnless())) {
                            x.setParam(p.getName(), p.getValue());
                        }
                    }
                    start = System.currentTimeMillis();
                    pipeline.execute(x, pipelineInput);
                    end = System.currentTimeMillis();
                } else {
                    for (final Param p : m.params) {
                        if (!p.isValid()) {
                            throw new BuildException("Incomplete parameter");
                        }
                        final String ifProperty = p.getIf();
                        final String unlessProperty = p.getUnless();
                        if ((ifProperty == null || getProject().getProperties().containsKey(ifProperty))
                                && (unlessProperty == null || !getProject().getProperties().containsKey(unlessProperty))) {
                            pipelineInput.setAttribute(p.getName(), p.getValue());
                        }
                    }
                    start = System.currentTimeMillis();
                    pipeline.execute(m.getImplementation(), pipelineInput);
                    end = System.currentTimeMillis();
                }
                logger.debug("Module processing took " + (end - start) + " ms");
            }
        } catch (final DITAOTException e) {
            throw new BuildException("Failed to run pipeline: " + e.getMessage(), e);
        }
    }

    /**
     * Get job configuration from Ant project reference or create new.
     *
     * @param tempDir configuration directory
     * @param project Ant project
     * @return job configuration
     */
    public static Job getJob(final File tempDir, final Project project) {
        Job job = (Job) project.getReference(ANT_REFERENCE_JOB);
        if (job != null && job.isStale(tempDir)) {
            project.log("Reload stale job configuration reference", Project.MSG_VERBOSE);
            job = null;
        }
        if (job == null) {
            try {
                job = new Job(tempDir);
            } catch (final IOException ioe) {
                throw new BuildException(ioe);
            }
            project.addReference(ANT_REFERENCE_JOB, job);
        }
        return job;
    }

    private Set<File> readListFile(final List<Xslt.IncludesFile> includes, final DITAOTAntLogger logger) {
    	final Set<File> inc = new HashSet<File>();
    	for (final Xslt.IncludesFile i: includes) {
            if (!isValid(i.ifProperty, null)) {
                continue;
            }
            BufferedReader r = null;
            try {
                r = new BufferedReader(new FileReader(i.file));
                for (String l = r.readLine(); l != null; l = r.readLine()) {
                    inc.add(new File(l));
                }
            } catch (IOException e) {
                logger.error("Failed to read includes file " + i.file + ": " + e.getMessage() , e);
            } finally {
                if (r != null) {
                    try {
                        r.close();
                    } catch (IOException e) {}
                }
            }
        }
    	return inc;
    }

    private boolean isValid(final String ifProperty, final String unlessProperty) {
        return (ifProperty == null || getProject().getProperties().containsKey(ifProperty))
                && (unlessProperty == null || !getProject().getProperties().containsKey(unlessProperty));
    }

    /**
     * Nested pipeline module element configuration.
     *
     * @since 1.6
     */
    public static class Module {

        public final List<Param> params = new ArrayList<Param>();
        private Class<? extends AbstractPipelineModule> cls;

        public void setClass(final Class<? extends AbstractPipelineModule> cls) {
            this.cls = cls;
        }

        public void addConfiguredParam(final Param p) {
            params.add(p);
        }

        public Class<? extends AbstractPipelineModule> getImplementation() {
            return cls;
        }

    }

    /**
     * Nested pipeline XSLT element configuration.
     * @author jelovirt
     *
     */
    public static class Xslt extends Module {

        private File style;
        private File baseDir;
        private File destDir;
        private File in;
        private File out;
        private final List<IncludesFile> includes = new ArrayList<IncludesFile>();
        private final List<IncludesFile> excludes = new ArrayList<IncludesFile>();
        private Mapper mapper;
        private String filenameparameter;
        private String filedirparameter;
        private XMLCatalog xmlcatalog;
        private boolean reloadstylesheet;

        // Ant setters

        public void setStyle(final File style) {
            this.style = style;
        }

        public void setBasedir(final File baseDir) {
            this.baseDir = baseDir;
        }

        public void setDestdir(final File destDir) {
            this.destDir = destDir;
        }

        public void setTaskname(final String taskname) {
        }

        public void setClasspathref(final String classpath) {
        	// Ignore classpathref attribute
        }

        public void setExtension(final String extension) {
        	// Ignore extension attribute
        }

        public void setReloadstylesheet(final boolean reloadstylesheet) {
        	this.reloadstylesheet = reloadstylesheet;
        }

        public void setIn(final File in) {
        	this.in = in;
        }

        public void setOut(final File out) {
        	this.out = out;
        }

        public void setIncludesfile(final File includesfile) {
              final IncludesFile i = new IncludesFile();
              i.setName(includesfile);
              includes.add(i);
        }

        public void setExcludesfile(final File excludesfile) {
            final IncludesFile i = new IncludesFile();
            i.setName(excludesfile);
            excludes.add(i);
        }

        public void setFilenameparameter(final String filenameparameter) {
            this.filenameparameter = filenameparameter;
        }

        public void setFiledirparameter(final String filedirparameter) {
            this.filedirparameter = filedirparameter;
        }

        public void addConfiguredXmlcatalog(final XMLCatalog xmlcatalog) {
            this.xmlcatalog = xmlcatalog;
        }

        public void addConfiguredMapper(final Mapper mapper) {
            this.mapper = mapper;
        }

        public void addConfiguredIncludesFile(final IncludesFile includesFile) {
            includes.add(includesFile);
        }

        public void addConfiguredExcludesFile(final IncludesFile excludesFile) {
            excludes.add(excludesFile);
        }

        public static class IncludesFile {
            private File file;
            private String ifProperty;
            public void setName(final File file) {
                this.file = file;
            }
            public void setIf(final String ifProperty) {
                this.ifProperty = ifProperty;
            }
        }

        /*public static class XMLCatalog {
            private String refid;
            public void setRefid(final String refid) {
                this.refid = refid;
            }
        }*/

    }

    /** Nested parameters. */
    public static class Param {

        private String name;
        private String value;
        private String ifProperty;
        private String unlessProperty;

        /**
         * Get parameter name.
         * @return parameter name, {@code null} if not set
         */
        public String getName() {
            return name;
        }

        /**
         * Validate that all required attributes have been set.
         * @return isValid {@code true} is valid object, otherwise {@code false}
         */
        public boolean isValid() {
            return (name != null && value != null);
        }

        /**
         * Set parameter name.
         * @param s name
         */
        public void setName(final String s) {
            name = s;
        }

        /**
         * Get parameter value.
         * @return parameter value, {@code null} if not set
         */
        public String getValue() {
            return value;
        }

        /**
         * Set parameter value.
         * @param v parameter value
         */
        public void setExpression(final String v) {
            value = v;
        }

        /**
         * Set parameter value.
         * @param v parameter value
         */
        public void setValue(final String v) {
            value = v;
        }

        /**
         * Set parameter file value.
         * @param v parameter file value
         */
        public void setLocation(final File v) {
            value = v.getPath();
        }

        /**
         * Get if condition property name
         * @return if condition parameter name, {@code null} if not set
         */
        public String getIf() {
            return ifProperty;
        }

        /**
         * Set if condition parameter name
         * @param p parameter name
         */
        public void setIf(final String p) {
            ifProperty = p;
        }

        /**
         * Get unless condition property name
         * @return unless condition parameter name, {@code null} if not set
         */
        public String getUnless() {
            return unlessProperty;
        }

        /**
         * Set unless condition parameter name
         * @param p parameter name
         */
        public void setUnless(final String p) {
            unlessProperty = p;
        }

    }

}


text:
package com.gynt.eddy.api;

public interface Nutrient {

	public Long getID();

	public String getName();

	public Quantity getQuantity();

}

redpajama_set_name: RedPajamaGithub


text:
package qj.tool.http.server;

import java.io.IOException;
import java.net.Socket;
import java.util.Map;

public class HttpServlet {

	public void service(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		String method = req.getMethod();
		if ("POST".equals(method)) {
			doPost(req, resp);
		} else if ("GET".equals(method)) {
			doGet(req, resp);
		}
	}
	public void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {

	}
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {

	}
	public Map<String,String> doConnect(HttpServletRequest req, Socket clientSk) throws IOException {
		return null;
	}
}


text:
=======
cfn-hup
=======

.. program:: cfn-hup

SYNOPSIS
========

``cfn-hup``

DESCRIPTION
===========
Implements cfn-hup CloudFormation functionality

OPTIONS
=======
.. cmdoption:: -c, --config

  Hook Config Directory, defaults to /etc/cfn/hooks.d

.. cmdoption:: -f, --no-daemon

  Do not run as a deamon

.. cmdoption:: -v, --verbose

  Verbose logging

BUGS
====
Heat bugs are managed through Launchpad <https://launchpad.net/heat-cfntools>


text:
<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
    <link rel="stylesheet" type="text/css" href="css/styles.css"/>

Pushing a simple page

    A simple page

A simple page with dark background

    Dark simple page

You can also have modals or weblayers

    Modals
    WebLayers

Sometimes, you will have to give data to the next or the previous page. This link does just that.

    Push with data

Same thing with a modal.

    Modal with data

Replacing the current view with an other one, without touching to the history, can be useful in some cases. For
        example, separating a form in multiple pages, as an alternative to modals, or for a side menu feature.

Here you can see it in action. Buttons bellow will replace the current view with another one.

    Replace
        with push animation
    Rough
        replace

On the next page below, you will be able to pop directly to the index

    navPopTo

What if you need to push a page that will be the new root page of your app? That's the goal of a replace with the
        'clearHistory' boolean. You won't be able to go back after this link.

    Replace with history reset


text:
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
//

package com.cloud.network.bigswitch;

import java.util.Locale;

import com.cloud.network.vpc.NetworkACLItem;
import com.google.gson.annotations.SerializedName;

/**
 * AclData contains information expected by Big Switch Controller
 * in ApplyBcfAclCommand
 */

public class AclData {
    @SerializedName("id") private String id;
    @SerializedName("priority") private int priority;
    @SerializedName("action") private String action;
    @SerializedName("ipproto") private String ipProto;
    @SerializedName("source") private AclNetwork source;
    @SerializedName("destination") private AclNetwork destination;

    public AclData(){
        this.id = null;
        this.priority = 0;
        this.action = null;
        this.ipProto = null;
        this.source = new AclNetwork();
        this.destination = new AclNetwork();
    }

    public class AclNetwork{
        @SerializedName("cidr") final private String cidr;
        @SerializedName("port") final private Integer port;

        public AclNetwork(){
            this.cidr = null;
            this.port = null;
        }

        public AclNetwork(final String cidr, final Integer port){
            this.cidr = cidr;
            this.port = port;
        }
    }

    public String getId() {
        return id;
    }
    public void setId(final String id) {
        this.id = id;
    }
    public int getPriority() {
        return priority;
    }
    public void setPriority(final int priority) {
        this.priority = priority;
    }
    public String getAction() {
        return action;
    }
    public void setAction(final String action) {
        if(action.equalsIgnoreCase(NetworkACLItem.Action.Allow.name())){
            this.action = "permit";
        } else {
            this.action = "deny";
        }
    }
    public String getIpProto() {
        return ipProto;
    }
    public void setIpProto(final String ipProto) {
        if (ipProto != null && !ipProto.equalsIgnoreCase("all")){
            switch(ipProto.toLowerCase(Locale.ENGLISH)){
            case "tcp":
                this.ipProto = "6";
                break;
            case "udp":
                this.ipProto = "17";
                break;
            case "icmp":
                this.ipProto = "1";
                break;
            default:
                throw new IllegalArgumentException("Protocol in ACL rule not supported");
            }
        }
    }
    public AclNetwork getSource() {
        return source;
    }
    public void setSource(final AclNetwork source) {
        this.source = source;
    }
    public AclNetwork getDestination() {
        return destination;
    }
    public void setDestination(final AclNetwork destination) {
        this.destination = destination;
    }
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="13" failures="13" name="com.msgsystems.week2prj.ProdusTest" time="0.076" errors="0" skipped="0">
  <properties>
    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
    <property name="sun.boot.library.path" value="C:\Program Files\Java\jdk1.8.0_91\jre\bin"/>
    <property name="java.vm.version" value="25.91-b14"/>
    <property name="java.vm.vendor" value="Oracle Corporation"/>
    <property name="maven.multiModuleProjectDirectory" value="C:\DEV\WorkSpace\week2prj"/>
    <property name="java.vendor.url" value="http://java.oracle.com/"/>
    <property name="path.separator" value=";"/>
    <property name="guice.disable.misplaced.annotation.check" value="true"/>
    <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
    <property name="file.encoding.pkg" value="sun.io"/>
    <property name="user.script" value=""/>
    <property name="user.country" value="US"/>
    <property name="sun.java.launcher" value="SUN_STANDARD"/>
    <property name="sun.os.patch.level" value=""/>
    <property name="test" value="com.msgsystems.week2prj.ProdusTest"/>
    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
    <property name="user.dir" value="C:\DEV\WorkSpace\week2prj"/>
    <property name="java.runtime.version" value="1.8.0_91-b14"/>
    <property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
    <property name="java.endorsed.dirs" value="C:\Program Files\Java\jdk1.8.0_91\jre\lib\endorsed"/>
    <property name="os.arch" value="amd64"/>
    <property name="java.io.tmpdir" value="C:\Users\simana\AppData\Local\Temp\"/>
    <property name="line.separator" value="
"/>
    <property name="java.vm.specification.vendor" value="Oracle Corporation"/>
    <property name="user.variant" value=""/>
    <property name="os.name" value="Windows 10"/>
    <property name="maven.ext.class.path" value="C:\DEV\IDE\NetBeans 8.2\java\maven-nblib\netbeans-eventspy.jar"/>
    <property name="classworlds.conf" value="C:\DEV\TOOLS\apache-maven-3.5.0\bin\..\bin\m2.conf"/>
    <property name="sun.jnu.encoding" value="Cp1252"/>
    <property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_91\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jre1.8.0_91\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk1.8.0_91\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Windows\SysWOW64\Empirum;C:\Program Files\Git\cmd;C:\DEV\TOOLS\apache-maven-3.5.0\bin;C:\Program Files\Java\jdk1.8.0_91\bin;C:\Program Files\TortoiseGit\bin;C:\Users\simana\AppData\Local\Microsoft\WindowsApps;;."/>
    <property name="maven.conf" value="C:\DEV\TOOLS\apache-maven-3.5.0\bin\../conf"/>
    <property name="java.specification.name" value="Java Platform API Specification"/>
    <property name="java.class.version" value="52.0"/>
    <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
    <property name="os.version" value="10.0"/>
    <property name="library.jansi.path" value="C:\DEV\TOOLS\apache-maven-3.5.0\bin\..\lib\jansi-native\windows64"/>
    <property name="user.home" value="C:\Users\simana"/>
    <property name="user.timezone" value="Europe/Athens"/>
    <property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
    <property name="java.specification.version" value="1.8"/>
    <property name="file.encoding" value="UTF-8"/>
    <property name="user.name" value="simana"/>
    <property name="java.class.path" value="C:\DEV\TOOLS\apache-maven-3.5.0\bin\..\boot\plexus-classworlds-2.5.2.jar"/>
    <property name="java.vm.specification.version" value="1.8"/>
    <property name="sun.arch.data.model" value="64"/>
    <property name="java.home" value="C:\Program Files\Java\jdk1.8.0_91\jre"/>
    <property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -Dtest=com.msgsystems.week2prj.ProdusTest -Dmaven.ext.class.path=C:\DEV\IDE\NetBeans 8.2\java\maven-nblib\netbeans-eventspy.jar -Dfile.encoding=UTF-8 surefire:test"/>
    <property name="java.specification.vendor" value="Oracle Corporation"/>
    <property name="user.language" value="en"/>
    <property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
    <property name="java.vm.info" value="mixed mode"/>
    <property name="java.version" value="1.8.0_91"/>
    <property name="java.ext.dirs" value="C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
    <property name="sun.boot.class.path" value="C:\Program Files\Java\jdk1.8.0_91\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_91\jre\classes"/>
    <property name="java.vendor" value="Oracle Corporation"/>
    <property name="maven.home" value="C:\DEV\TOOLS\apache-maven-3.5.0\bin\.."/>
    <property name="file.separator" value="\"/>
    <property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
    <property name="sun.cpu.endian" value="little"/>
    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
    <property name="sun.desktop" value="windows"/>
    <property name="sun.cpu.isalist" value="amd64"/>
  </properties>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testToString" time="0.069">
    <failure message="expected:<> but was:<Produs{id=0, name=null, pft=0, type=null, creation=14:18:21.187, creation1=13:18:21.194}>" type="junit.framework.ComparisonFailure">junit.framework.ComparisonFailure: expected:<> but was:<Produs{id=0, name=null, pft=0, type=null, creation=14:18:21.187, creation1=13:18:21.194}>
	at junit.framework.Assert.assertEquals(Assert.java:81)
	at junit.framework.Assert.assertEquals(Assert.java:87)
	at com.msgsystems.week2prj.ProdusTest.testToString(ProdusTest.java:189)
</failure>
    <system-out>toString
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testSetPft" time="0">
    <failure message="The test case is a prototype." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: The test case is a prototype.
	at junit.framework.Assert.fail(Assert.java:47)
	at com.msgsystems.week2prj.ProdusTest.testSetPft(ProdusTest.java:128)
</failure>
    <system-out>setPft
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testGetCreation1" time="0">
    <failure message="expected:<null> but was:<13:18:21.198>" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: expected:<null> but was:<13:18:21.198>
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.failNotEquals(Assert.java:282)
	at junit.framework.Assert.assertEquals(Assert.java:64)
	at junit.framework.Assert.assertEquals(Assert.java:71)
	at com.msgsystems.week2prj.ProdusTest.testGetCreation1(ProdusTest.java:39)
</failure>
    <system-out>getCreation1
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testGetName" time="0">
    <failure message="expected:<> but was:<null>" type="junit.framework.ComparisonFailure">junit.framework.ComparisonFailure: expected:<> but was:<null>
	at junit.framework.Assert.assertEquals(Assert.java:81)
	at junit.framework.Assert.assertEquals(Assert.java:87)
	at com.msgsystems.week2prj.ProdusTest.testGetName(ProdusTest.java:89)
</failure>
    <system-out>getName
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testGetPft" time="0.001">
    <failure message="The test case is a prototype." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: The test case is a prototype.
	at junit.framework.Assert.fail(Assert.java:47)
	at com.msgsystems.week2prj.ProdusTest.testGetPft(ProdusTest.java:116)
</failure>
    <system-out>getPft
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testGetCreation" time="0.001">
    <failure message="expected:<null> but was:<14:18:21.200>" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: expected:<null> but was:<14:18:21.200>
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.failNotEquals(Assert.java:282)
	at junit.framework.Assert.assertEquals(Assert.java:64)
	at junit.framework.Assert.assertEquals(Assert.java:71)
	at com.msgsystems.week2prj.ProdusTest.testGetCreation(ProdusTest.java:164)
</failure>
    <system-out>getCreation
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testSetType" time="0">
    <failure message="The test case is a prototype." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: The test case is a prototype.
	at junit.framework.Assert.fail(Assert.java:47)
	at com.msgsystems.week2prj.ProdusTest.testSetType(ProdusTest.java:153)
</failure>
    <system-out>setType
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testSetCreation" time="0.001">
    <failure message="The test case is a prototype." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: The test case is a prototype.
	at junit.framework.Assert.fail(Assert.java:47)
	at com.msgsystems.week2prj.ProdusTest.testSetCreation(ProdusTest.java:178)
</failure>
    <system-out>setCreation
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testSetId" time="0.001">
    <failure message="The test case is a prototype." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: The test case is a prototype.
	at junit.framework.Assert.fail(Assert.java:47)
	at com.msgsystems.week2prj.ProdusTest.testSetId(ProdusTest.java:78)
</failure>
    <system-out>setId
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testGetType" time="0.001">
    <failure message="The test case is a prototype." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: The test case is a prototype.
	at junit.framework.Assert.fail(Assert.java:47)
	at com.msgsystems.week2prj.ProdusTest.testGetType(ProdusTest.java:141)
</failure>
    <system-out>getType
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testGetId" time="0">
    <failure message="The test case is a prototype." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: The test case is a prototype.
	at junit.framework.Assert.fail(Assert.java:47)
	at com.msgsystems.week2prj.ProdusTest.testGetId(ProdusTest.java:66)
</failure>
    <system-out>getId
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testSetCreation1" time="0.001">
    <failure message="The test case is a prototype." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: The test case is a prototype.
	at junit.framework.Assert.fail(Assert.java:47)
	at com.msgsystems.week2prj.ProdusTest.testSetCreation1(ProdusTest.java:53)
</failure>
    <system-out>setCreation1
</system-out>
  </testcase>
  <testcase classname="com.msgsystems.week2prj.ProdusTest" name="testSetName" time="0.001">
    <failure message="The test case is a prototype." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: The test case is a prototype.
	at junit.framework.Assert.fail(Assert.java:47)
	at com.msgsystems.week2prj.ProdusTest.testSetName(ProdusTest.java:103)
</failure>
    <system-out>setName
</system-out>
  </testcase>
</testsuite>


text:
import warnings as _warnings
_warnings.resetwarnings()
_warnings.filterwarnings('error')

from tdi import html

template = html.from_string("""
<node tdi="item">
    <node tdi="nested">
        <node tdi="subnested"></node>
    </node>
    <xnode tdi="a"></xnode>
</node>
""".lstrip())

class Model(object):
    def render_item(self, node):
        node.nested.replace(self.replace_nested, node.a)
        return True

    def replace_nested(self, node):
        node['been'] = u'here'
        node.content = u'yes'

    def render_a(self, node):
        node.content = u"should not be here"

model = Model()
template.render(model)


text:
package reqlog

import (
	"encoding/base64"
	"encoding/binary"
	"time"

	"github.com/Sirupsen/logrus"
	"github.com/gin-gonic/gin"
	"golang.org/x/net/context"
)

var (
	HeaderReqID = "X-Reqid"
	KeyReqID    = "reqid"
)
var pid = uint32(time.Now().UnixNano() % 4294967291)

func genReqId() string {
	var b [12]byte
	binary.LittleEndian.PutUint32(b[:], pid)
	binary.LittleEndian.PutUint64(b[4:], uint64(time.Now().UnixNano()))
	return base64.URLEncoding.EncodeToString(b[:])
}

func ReqLoggerMiddleware(logger *logrus.Logger, timeFormat string, utc bool) gin.HandlerFunc {
	return func(c *gin.Context) {
		start := time.Now()

		reqid := c.Request.Header.Get("X-Reqid")
		if reqid == "" {
			reqid = genReqId()
			c.Request.Header.Set("X-Reqid", reqid)
		}

		path := c.Request.URL.Path
		c.Next()

		end := time.Now()
		latency := end.Sub(start)
		if utc {
			end = end.UTC()
		}

		entry := logger.WithFields(logrus.Fields{
			"reqid":      reqid,
			"status":     c.Writer.Status(),
			"method":     c.Request.Method,
			"path":       path,
			"ip":         c.ClientIP(),
			"latency":    latency,
			"user-agent": c.Request.UserAgent(),
			"time":       end.Format(timeFormat),
		})

		if len(c.Errors) > 0 {
			entry.Error(c.Errors.String())
		} else {
			entry.Info()
		}
	}
}

// usage: Entry(c).Debug(".....")
func Entry(c context.Context) *logrus.Entry {
	if ctx, ok := c.(*gin.Context); ok {
		return logrus.WithField(KeyReqID, ctx.Request.Header.Get(HeaderReqID))
	} else {
		return logrus.WithField(KeyReqID, c.Value(KeyReqID))
	}
}

func WithReqID(ctx context.Context, reqid string) context.Context {
	return context.WithValue(ctx, "reqid", reqid)
}

func Context(c *gin.Context) (ctx context.Context) {
	ctx = context.Background()
	reqID := c.Request.Header.Get(HeaderReqID)
	ctx = WithReqID(ctx, reqID)
	return
}

//---------------------------------------------------------------------------------


text:
namespace EDDiscovery.UserControls
{
    partial class UserControlSynthesis
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.dataViewScrollerPanel = new ExtendedControls.ExtPanelDataGridViewScroll();
            this.dataGridViewSynthesis = new BaseUtils.DataGridViewColumnHider();
            this.UpgradeCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Level = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.MaxCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.WantedCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Available = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Notes = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Recipe = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.vScrollBarCustomMC = new ExtendedControls.ExtScrollBar();
            this.chkNotHistoric = new ExtendedControls.ExtCheckBox();
            this.buttonMaterialFilter = new ExtendedControls.ExtButton();
            this.buttonFilterLevel = new ExtendedControls.ExtButton();
            this.buttonRecipeFilter = new ExtendedControls.ExtButton();
            this.buttonClear = new ExtendedControls.ExtButton();
            this.toolTip = new System.Windows.Forms.ToolTip(this.components);
            this.panelTop = new System.Windows.Forms.FlowLayoutPanel();
            this.extCheckBoxWordWrap = new ExtendedControls.ExtCheckBox();
            this.dataViewScrollerPanel.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewSynthesis)).BeginInit();
            this.panelTop.SuspendLayout();
            this.SuspendLayout();
            //
            // dataViewScrollerPanel
            //
            this.dataViewScrollerPanel.Controls.Add(this.dataGridViewSynthesis);
            this.dataViewScrollerPanel.Controls.Add(this.vScrollBarCustomMC);
            this.dataViewScrollerPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.dataViewScrollerPanel.InternalMargin = new System.Windows.Forms.Padding(0);
            this.dataViewScrollerPanel.Location = new System.Drawing.Point(0, 30);
            this.dataViewScrollerPanel.Name = "dataViewScrollerPanel";
            this.dataViewScrollerPanel.Size = new System.Drawing.Size(800, 542);
            this.dataViewScrollerPanel.TabIndex = 0;
            this.dataViewScrollerPanel.VerticalScrollBarDockRight = true;
            //
            // dataGridViewSynthesis
            //
            this.dataGridViewSynthesis.AllowDrop = true;
            this.dataGridViewSynthesis.AllowUserToAddRows = false;
            this.dataGridViewSynthesis.AllowUserToDeleteRows = false;
            this.dataGridViewSynthesis.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
            this.dataGridViewSynthesis.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridViewSynthesis.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.UpgradeCol,
            this.Level,
            this.MaxCol,
            this.WantedCol,
            this.Available,
            this.Notes,
            this.Recipe});
            this.dataGridViewSynthesis.Location = new System.Drawing.Point(0, 0);
            this.dataGridViewSynthesis.Name = "dataGridViewSynthesis";
            this.dataGridViewSynthesis.RowHeadersVisible = false;
            this.dataGridViewSynthesis.RowHeadersWidth = 25;
            this.dataGridViewSynthesis.ScrollBars = System.Windows.Forms.ScrollBars.None;
            this.dataGridViewSynthesis.Size = new System.Drawing.Size(784, 542);
            this.dataGridViewSynthesis.TabIndex = 1;
            this.dataGridViewSynthesis.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewModules_CellEndEdit);
            this.dataGridViewSynthesis.DragDrop += new System.Windows.Forms.DragEventHandler(this.dataGridViewSynthesis_DragDrop);
            this.dataGridViewSynthesis.DragOver += new System.Windows.Forms.DragEventHandler(this.dataGridViewSynthesis_DragOver);
            this.dataGridViewSynthesis.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dataGridViewSynthesis_MouseDown);
            this.dataGridViewSynthesis.MouseMove += new System.Windows.Forms.MouseEventHandler(this.dataGridViewSynthesis_MouseMove);
            //
            // UpgradeCol
            //
            this.UpgradeCol.HeaderText = "Upgrade/Mat";
            this.UpgradeCol.MinimumWidth = 50;
            this.UpgradeCol.Name = "UpgradeCol";
            this.UpgradeCol.ReadOnly = true;
            this.UpgradeCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // Level
            //
            this.Level.FillWeight = 50F;
            this.Level.HeaderText = "Level";
            this.Level.MinimumWidth = 50;
            this.Level.Name = "Level";
            this.Level.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // MaxCol
            //
            this.MaxCol.FillWeight = 25F;
            this.MaxCol.HeaderText = "Max";
            this.MaxCol.MinimumWidth = 50;
            this.MaxCol.Name = "MaxCol";
            this.MaxCol.ReadOnly = true;
            this.MaxCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // WantedCol
            //
            this.WantedCol.FillWeight = 25F;
            this.WantedCol.HeaderText = "Wanted";
            this.WantedCol.MinimumWidth = 50;
            this.WantedCol.Name = "WantedCol";
            this.WantedCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // Available
            //
            this.Available.FillWeight = 25F;
            this.Available.HeaderText = "Avail.";
            this.Available.MinimumWidth = 50;
            this.Available.Name = "Available";
            this.Available.ReadOnly = true;
            this.Available.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // Notes
            //
            this.Notes.FillWeight = 150F;
            this.Notes.HeaderText = "Notes";
            this.Notes.MinimumWidth = 50;
            this.Notes.Name = "Notes";
            this.Notes.ReadOnly = true;
            this.Notes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // Recipe
            //
            this.Recipe.FillWeight = 50F;
            this.Recipe.HeaderText = "Recipe";
            this.Recipe.MinimumWidth = 15;
            this.Recipe.Name = "Recipe";
            this.Recipe.ReadOnly = true;
            this.Recipe.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // vScrollBarCustomMC
            //
            this.vScrollBarCustomMC.ArrowBorderColor = System.Drawing.Color.LightBlue;
            this.vScrollBarCustomMC.ArrowButtonColor = System.Drawing.Color.LightGray;
            this.vScrollBarCustomMC.ArrowColorScaling = 0.5F;
            this.vScrollBarCustomMC.ArrowDownDrawAngle = 270F;
            this.vScrollBarCustomMC.ArrowUpDrawAngle = 90F;
            this.vScrollBarCustomMC.BorderColor = System.Drawing.Color.White;
            this.vScrollBarCustomMC.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.vScrollBarCustomMC.HideScrollBar = false;
            this.vScrollBarCustomMC.LargeChange = 0;
            this.vScrollBarCustomMC.Location = new System.Drawing.Point(784, 0);
            this.vScrollBarCustomMC.Maximum = -1;
            this.vScrollBarCustomMC.Minimum = 0;
            this.vScrollBarCustomMC.MouseOverButtonColor = System.Drawing.Color.Green;
            this.vScrollBarCustomMC.MousePressedButtonColor = System.Drawing.Color.Red;
            this.vScrollBarCustomMC.Name = "vScrollBarCustomMC";
            this.vScrollBarCustomMC.Size = new System.Drawing.Size(16, 542);
            this.vScrollBarCustomMC.SliderColor = System.Drawing.Color.DarkGray;
            this.vScrollBarCustomMC.SmallChange = 1;
            this.vScrollBarCustomMC.TabIndex = 0;
            this.vScrollBarCustomMC.ThumbBorderColor = System.Drawing.Color.Yellow;
            this.vScrollBarCustomMC.ThumbButtonColor = System.Drawing.Color.DarkBlue;
            this.vScrollBarCustomMC.ThumbColorScaling = 0.5F;
            this.vScrollBarCustomMC.ThumbDrawAngle = 0F;
            this.vScrollBarCustomMC.Value = -1;
            this.vScrollBarCustomMC.ValueLimited = -1;
            //
            // chkNotHistoric
            //
            this.chkNotHistoric.Appearance = System.Windows.Forms.Appearance.Button;
            this.chkNotHistoric.CheckBoxColor = System.Drawing.Color.Gray;
            this.chkNotHistoric.CheckBoxDisabledScaling = 0.5F;
            this.chkNotHistoric.CheckBoxInnerColor = System.Drawing.Color.White;
            this.chkNotHistoric.CheckColor = System.Drawing.Color.DarkBlue;
            this.chkNotHistoric.Image = global::EDDiscovery.Icons.Controls.TravelGrid_CursorToTop;
            this.chkNotHistoric.ImageButtonDisabledScaling = 0.5F;
            this.chkNotHistoric.ImageIndeterminate = null;
            this.chkNotHistoric.ImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.chkNotHistoric.ImageUnchecked = global::EDDiscovery.Icons.Controls.TravelGrid_CursorStill;
            this.chkNotHistoric.Location = new System.Drawing.Point(352, 1);
            this.chkNotHistoric.Margin = new System.Windows.Forms.Padding(0, 1, 8, 1);
            this.chkNotHistoric.MouseOverColor = System.Drawing.Color.CornflowerBlue;
            this.chkNotHistoric.Name = "chkNotHistoric";
            this.chkNotHistoric.Size = new System.Drawing.Size(28, 28);
            this.chkNotHistoric.TabIndex = 7;
            this.chkNotHistoric.TickBoxReductionRatio = 0.75F;
            this.toolTip.SetToolTip(this.chkNotHistoric, "When red, use the materials at the cursor to estimate, when green always use the " +
        "latest materials.");
            this.chkNotHistoric.UseVisualStyleBackColor = true;
            this.chkNotHistoric.CheckedChanged += new System.EventHandler(this.chkHistoric_CheckedChanged);
            //
            // buttonMaterialFilter
            //
            this.buttonMaterialFilter.Location = new System.Drawing.Point(176, 1);
            this.buttonMaterialFilter.Margin = new System.Windows.Forms.Padding(0, 1, 8, 1);
            this.buttonMaterialFilter.Name = "buttonMaterialFilter";
            this.buttonMaterialFilter.Size = new System.Drawing.Size(80, 23);
            this.buttonMaterialFilter.TabIndex = 4;
            this.buttonMaterialFilter.Text = "Material";
            this.toolTip.SetToolTip(this.buttonMaterialFilter, "Filter the table by the material type");
            this.buttonMaterialFilter.UseVisualStyleBackColor = true;
            this.buttonMaterialFilter.Click += new System.EventHandler(this.buttonMaterialFilter_Click);
            //
            // buttonFilterLevel
            //
            this.buttonFilterLevel.Location = new System.Drawing.Point(88, 1);
            this.buttonFilterLevel.Margin = new System.Windows.Forms.Padding(0, 1, 8, 1);
            this.buttonFilterLevel.Name = "buttonFilterLevel";
            this.buttonFilterLevel.Size = new System.Drawing.Size(80, 23);
            this.buttonFilterLevel.TabIndex = 3;
            this.buttonFilterLevel.Text = "Level";
            this.toolTip.SetToolTip(this.buttonFilterLevel, "Filter the table by the synthesis level");
            this.buttonFilterLevel.UseVisualStyleBackColor = true;
            this.buttonFilterLevel.Click += new System.EventHandler(this.buttonFilterLevel_Click);
            //
            // buttonRecipeFilter
            //
            this.buttonRecipeFilter.Location = new System.Drawing.Point(0, 1);
            this.buttonRecipeFilter.Margin = new System.Windows.Forms.Padding(0, 1, 8, 1);
            this.buttonRecipeFilter.Name = "buttonRecipeFilter";
            this.buttonRecipeFilter.Size = new System.Drawing.Size(80, 23);
            this.buttonRecipeFilter.TabIndex = 2;
            this.buttonRecipeFilter.Text = "Synthesis";
            this.toolTip.SetToolTip(this.buttonRecipeFilter, "Filter the table by the synthesis type");
            this.buttonRecipeFilter.UseVisualStyleBackColor = true;
            this.buttonRecipeFilter.Click += new System.EventHandler(this.buttonRecipeFilter_Click);
            //
            // buttonClear
            //
            this.buttonClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.buttonClear.Location = new System.Drawing.Point(264, 1);
            this.buttonClear.Margin = new System.Windows.Forms.Padding(0, 1, 8, 1);
            this.buttonClear.Name = "buttonClear";
            this.buttonClear.Size = new System.Drawing.Size(80, 23);
            this.buttonClear.TabIndex = 1;
            this.buttonClear.Text = "Clear";
            this.toolTip.SetToolTip(this.buttonClear, "Set all wanted values to zero");
            this.buttonClear.UseVisualStyleBackColor = true;
            this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click);
            //
            // toolTip
            //
            this.toolTip.ShowAlways = true;
            //
            // panelTop
            //
            this.panelTop.AutoSize = true;
            this.panelTop.Controls.Add(this.buttonRecipeFilter);
            this.panelTop.Controls.Add(this.buttonFilterLevel);
            this.panelTop.Controls.Add(this.buttonMaterialFilter);
            this.panelTop.Controls.Add(this.buttonClear);
            this.panelTop.Controls.Add(this.chkNotHistoric);
            this.panelTop.Controls.Add(this.extCheckBoxWordWrap);
            this.panelTop.Dock = System.Windows.Forms.DockStyle.Top;
            this.panelTop.Location = new System.Drawing.Point(0, 0);
            this.panelTop.Margin = new System.Windows.Forms.Padding(0);
            this.panelTop.Name = "panelTop";
            this.panelTop.Size = new System.Drawing.Size(800, 30);
            this.panelTop.TabIndex = 2;
            //
            // extCheckBoxWordWrap
            //
            this.extCheckBoxWordWrap.Appearance = System.Windows.Forms.Appearance.Button;
            this.extCheckBoxWordWrap.BackColor = System.Drawing.Color.Transparent;
            this.extCheckBoxWordWrap.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.extCheckBoxWordWrap.CheckBoxColor = System.Drawing.Color.White;
            this.extCheckBoxWordWrap.CheckBoxDisabledScaling = 0.5F;
            this.extCheckBoxWordWrap.CheckBoxInnerColor = System.Drawing.Color.White;
            this.extCheckBoxWordWrap.CheckColor = System.Drawing.Color.DarkBlue;
            this.extCheckBoxWordWrap.Cursor = System.Windows.Forms.Cursors.Default;
            this.extCheckBoxWordWrap.FlatAppearance.BorderColor = System.Drawing.SystemColors.ControlDarkDark;
            this.extCheckBoxWordWrap.FlatAppearance.CheckedBackColor = System.Drawing.Color.Green;
            this.extCheckBoxWordWrap.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
            this.extCheckBoxWordWrap.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Silver;
            this.extCheckBoxWordWrap.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.extCheckBoxWordWrap.Image = global::EDDiscovery.Icons.Controls.WordWrapOn;
            this.extCheckBoxWordWrap.ImageButtonDisabledScaling = 0.5F;
            this.extCheckBoxWordWrap.ImageIndeterminate = null;
            this.extCheckBoxWordWrap.ImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.extCheckBoxWordWrap.ImageUnchecked = global::EDDiscovery.Icons.Controls.WordWrapOff;
            this.extCheckBoxWordWrap.Location = new System.Drawing.Point(388, 1);
            this.extCheckBoxWordWrap.Margin = new System.Windows.Forms.Padding(0, 1, 8, 1);
            this.extCheckBoxWordWrap.MouseOverColor = System.Drawing.Color.CornflowerBlue;
            this.extCheckBoxWordWrap.Name = "extCheckBoxWordWrap";
            this.extCheckBoxWordWrap.Size = new System.Drawing.Size(28, 28);
            this.extCheckBoxWordWrap.TabIndex = 32;
            this.extCheckBoxWordWrap.TickBoxReductionRatio = 0.75F;
            this.toolTip.SetToolTip(this.extCheckBoxWordWrap, "Enable or disable word wrap");
            this.extCheckBoxWordWrap.UseVisualStyleBackColor = false;
            //
            // UserControlSynthesis
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.dataViewScrollerPanel);
            this.Controls.Add(this.panelTop);
            this.Name = "UserControlSynthesis";
            this.Size = new System.Drawing.Size(800, 572);
            this.dataViewScrollerPanel.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewSynthesis)).EndInit();
            this.panelTop.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private ExtendedControls.ExtPanelDataGridViewScroll dataViewScrollerPanel;
        private BaseUtils.DataGridViewColumnHider dataGridViewSynthesis;
        private ExtendedControls.ExtScrollBar vScrollBarCustomMC;
        private System.Windows.Forms.ToolTip toolTip;
        private ExtendedControls.ExtButton buttonClear;
        private ExtendedControls.ExtButton buttonRecipeFilter;
        private ExtendedControls.ExtButton buttonFilterLevel;
        private ExtendedControls.ExtButton buttonMaterialFilter;
        private ExtendedControls.ExtCheckBox chkNotHistoric;
        private System.Windows.Forms.DataGridViewTextBoxColumn UpgradeCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn Level;
        private System.Windows.Forms.DataGridViewTextBoxColumn MaxCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn WantedCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn Available;
        private System.Windows.Forms.DataGridViewTextBoxColumn Notes;
        private System.Windows.Forms.DataGridViewTextBoxColumn Recipe;
        private System.Windows.Forms.FlowLayoutPanel panelTop;
        private ExtendedControls.ExtCheckBox extCheckBoxWordWrap;
    }
}


text:
using System;
using System.Text;

namespace Alachisoft.NCache.Caching
{
    public enum TagComparisonType
    {
        BY_TAG = 1,
        ALL_MATCHING_TAGS,
        ANY_MATCHING_TAG,
        BY_WILDCARDTAG,
        DEFAULT
    }
}


text:
/*input an integer
output string consisting of the integer with commas inserted
convert the integer into a string
determine if the string is smaller than 3 numbers then output the integer as a string
if larger than three reverse insert a comma every three digits
reverse again then output
*/
//   function separate_comma(number){
//   number = number.toString();

//   var result = "";
//   if (number.length <= 3)
//     return number;
//   else if (number.length % 3 > 0){
//     var front = number.length% 3;}
//   else{
//     front = 3
//   }
//     result = result + number.slice(0,front)
//   for (var counter = 0+front; counter < number.length; counter += 3) {
//     result = result + ","+ number.slice(counter, counter+3 )
//   };
//   return result;

// }

/* Refactor */

 function separate_comma(number){

  number = number.toString();
  var size = number.length
  var result = "";

  if (size <= 3)
    return number;
  else if (size % 3 > 0){
    var front = size % 3;}
  else{
    front = 3;
  }

    result = result + number.slice(0,front)

  for (var counter = 0+front; counter < size; counter += 3) {
    result = result + ","+ number.slice(counter, counter+3 )
  };
  return result;

}

  // console.log (separate_comma(3300))
  // console.log (separate_comma(312345678900))

  function assert(test, message, test_number) {
  if (!test) {
    console.log(test_number + "false");
    throw "ERROR: " + message;
  }
  console.log(test_number + "true");
  return true;
}

assert(
  typeof separate_comma(330) === 'string',
 "The output of separate_comma should be a string.",
 "1. "
)

assert(
  separate_comma(330) === "330",
 "A value of 330 should return a string of 330.",
 "2. "
)
assert(
  separate_comma(3300300) === "3,300,300",
 "A value of 3330 should return a string of 3,330.",
 "3. "
)

// What was it like to approach the problem from the perspective of JavaScript? Did you approach the problem differently?
// It was simple when broken down into small steps, but I found fewer built in methods to play with.
// What did you learn about iterating over arrays in JavaScript?
// It is quite similar to iterating over arrays in Ruby, with the differences mostly being in syntax.
// What was different about solving this problem in JavaScript?
// Mostly just the language barriers, it was pretty easy after we learned how to phrase things.
// What built-in methods did you find to incorporate in your refactored solution?
// Nothing too fancy just slice and length.  Slice to break apart the string, and length see how many iterations we should do.


text:
package inujini_.hatate.data.meta;

import inujini_.sqlite.meta.ColumnProperty;
import inujini_.sqlite.meta.ISqlite;

public final class MetaSeries {

	public static final String TBL_NAME = "Series";
	public static final ColumnProperty Id = new ColumnProperty(
			"Id", ISqlite.FIELD_INTEGER, false, true, false, false, "", "");
	public static final ColumnProperty Name = new ColumnProperty(
			"Name", ISqlite.FIELD_TEXT, true, false, false, true, "", "");
	public static boolean hasPrimaryId() {
		return false;
	}
}


text:
<!DOCTYPE html>

	<meta charset="utf-8" />
	<title>VEIL</title>
	<meta name="description" content="" />
	<meta name="author" content="" />
	<meta name="viewport" content="initial-scale=1.0, width=device-width" />

	<link href="https://fonts.googleapis.com/css?family=Roboto:300,400" rel="stylesheet" type="text/css" />
	<link href="https://fonts.googleapis.com/css?family=Playfair+Display:400,700,900" rel="stylesheet">

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

	<link href="css/photoswipe.css" rel="stylesheet" type="text/css">
	<link href="css/photoswipe-skin.css" rel="stylesheet" type="text/css">

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

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

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

	<link href="img/favicon.ico" rel="shortcut icon" />
	<link href="img/apple-touch-icon.png" rel="apple-touch-icon" />

			Veil
			Menu

Default Home

Portfolio

Parallax Gallery

Thumbnail Gallery

About

Journal

Typography

Instagram

Facebook

johndoe@website.com

            <div class="swiper-slide" data-color="#111" data-caption='Enlightenment taste astrological deep cleansing'>

            <div class="swiper-slide" data-color="#111" data-caption='Nudist Esalen saturn retrograde promoting positive change'>

            <div class="swiper-slide" data-color="#111" data-caption='Spirit animal heartbeat of our ancestors fields'>

        			Enlightenment taste astrological deep cleansing

Ethos

					Sartorial blog banh mi, shabby chic roof party cred photo booth beard banjo poutine jean shorts gastropub.

Minimalistic Architecture

					Etsy sartorial flexitarian fap keytar, poutine umami hoodie narwhal

Pool Fashionista

					Locavore squid cornhole scenester green juice art party polaroid pabst.

Interior Design

					Asymmetrical organic helvetica master cleanse.

Coffee in the Afternoon

					Fixie celiac vinyl butcher organic gochujang distillery.

Greek Architecture

					 Forage tote bag tofu, authentic cray kickstarter green juice beard kogi butcher knausgaard hammock.

Portrait of a Lady

					Organic dreamcatcher thundercats, cliche viral selvage aesthetic direct trade meditation.

Visit to the Museum

					Post-ironic freegan put a bird on it seitan yr ethical.

				More

				Follow —

				Twitter
				Facebook

				Scroll up

				© 2017 Veil


text:
#ifndef MITKCLARONTRACKINGDEVICE_H_HEADER_INCLUDED_
#define MITKCLARONTRACKINGDEVICE_H_HEADER_INCLUDED_

#include <vector>
#include <mitkIGTConfig.h>
#include <mitkTrackingDevice.h>
#include <mitkClaronTool.h>
#include <itkMultiThreader.h>

//only include MicronTracker if cmake Variable is on else the ClaronInterfaceStub is included
#ifdef MITK_USE_MICRON_TRACKER
#include <mitkClaronInterface.h>
#else
#include <mitkClaronInterfaceStub.h>
#endif

namespace mitk
{
  /** Documentation:
  *   \brief An object of this class represents the MicronTracker device. You can add tools to this
  *          device, then open the connection and start tracking. The tracking device will then
  *          continuously update the tool coordinates.
  *   \ingroup IGT
  */
  class MITKIGT_EXPORT ClaronTrackingDevice : public TrackingDevice
  {
  public:

    mitkClassMacro(ClaronTrackingDevice, TrackingDevice);
    itkFactorylessNewMacro(Self)
    itkCloneMacro(Self)

    /**
    * @returns Returns true if the MicronTracker is installed on this build (means activated in CMAKE). False if not.
    */
    bool IsDeviceInstalled() override;

    /**
    * \brief Starts the tracking.
    * \return Returns true if the tracking is started. Throws an exception if an error occures.
    * @throw mitk::IGTHardwareException Throws an exception if there is an error during start tracking.
    */
    bool StartTracking() override;

    /**
    * \brief Stops the tracking.
    * \return Returns true if the tracking is stopped.
    */
    bool StopTracking() override;

    /**
    * \brief Opens the connection to the device. This have to be done before the tracking is started.
    * @throw mitk::IGTHardwareException Throws an exception if there is an error during open connection.
    */
    bool OpenConnection() override;

    /**
    * \brief Closes the connection and clears all resources.
    */
    bool CloseConnection() override;

    /**
    * \return Returns the number of tools which have been added to the device.
    */
    unsigned int GetToolCount() const override;

    /**
    * \param toolNumber The number of the tool which should be given back.
    * \return Returns the tool which the number "toolNumber". Returns nullptr, if there is
    * no tool with this number.
    */
    TrackingTool* GetTool(unsigned int toolNumber)  const override;

    /**
    * \brief Create a new Claron tool with toolName and fileName and add it to the list of tools
    *
    * This method will create a new ClaronTool object, load the tool definition file fileName,
    * set the tool name toolName and then add it to the list of tools.
    * It returns a pointer of type mitk::TrackingTool to the tool
    * that can be used to read tracking data from it.
    * This is the only way to add tools to ClaronTrackingDevice.
    *
    * \warning adding tools is not possible in tracking mode, only in setup and ready.
    */
    mitk::TrackingTool* AddTool(const char* toolName, const char* fileName);

    /**
    * \return Returns whether the MicronTracker is installed (means whether the C-Make-Variable "MITK_USE_MICRON_TRACKER" is set),
    *         so returns false in this case.
    * \deprecatedSince{2014_03} This method is deprecated, please use the static method IsDeviceInstalled() instead.
    */
    DEPRECATED(bool IsMicronTrackerInstalled());

    /** @brief Sets the directory where the calibration file of the MicronTracker can be found. */
    itkSetMacro(CalibrationDir,std::string);

  /** @brief Gets the current calibration directory. */
    itkGetMacro(CalibrationDir,std::string);

  protected:
    ClaronTrackingDevice();
    ~ClaronTrackingDevice() override;

    /**
    * \brief Adds a tool to the tracking device.
    *
    * \param tool  The tool which will be added.
    * \return Returns true if the tool has been added, false otherwise.
    */
    bool InternalAddTool(ClaronTool::Pointer tool);

    /**
    * \brief This method tracks tools as long as the variable m_Mode is set to "Tracking".
    * Tracking tools means grabbing frames from the camera an updating the tools.
    * @throw mitk::IGTHardwareException Throws an exception if there is an error during tracking of tools.
    */
    void TrackTools();

    /**
    * \brief Automatically detects tools in field of measurement of the tracking device.
    * Tools can only be detected if their calibration file is availiable in the directory
    * for calibration files.
    * \return Returns all detected Tools.
    */
    std::vector<ClaronTool::Pointer> DetectTools();

    /**
    * \return Returns all tools of the tracking device.
    */
    std::vector<ClaronTool::Pointer> GetAllTools();

    /**
    * \return Gives back the device which is represented by an object of the class ClaronInterface.
    */
    ClaronInterface* GetDevice();

    static ITK_THREAD_RETURN_TYPE ThreadStartTracking(void* data);

    std::vector<ClaronTool::Pointer> m_AllTools; ///< vector holding all tools
    ClaronInterface::Pointer m_Device; ///< represents the interface to the tracking hardware
    itk::MultiThreader::Pointer m_MultiThreader;
    int m_ThreadID;

    /** \brief The directory where the camera calibration files can be found */
    std::string m_CalibrationDir;
    /** \brief The directory where the tool calibration files can be found */
    std::string m_ToolfilesDir;
  };
}//mitk
#endif /* MITKCLARONTRACKINGDEVICE_H_HEADER_INCLUDED_ */


text:
package vtk.web.actions.publish;

import java.util.Arrays;
import org.jmock.Expectations;
import org.jmock.integration.junit4.JUnitRuleMockery;

import vtk.repository.Property;
import vtk.repository.resourcetype.PropertyTypeDefinition;
import vtk.repository.resourcetype.Value;
import vtk.repository.resourcetype.PropertyType.Type;
import vtk.repository.store.PrincipalMetadataImpl;
import vtk.security.Principal;
import vtk.security.PrincipalFactory;
import vtk.security.PrincipalImpl;

import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import vtk.repository.Resource;
import vtk.repository.store.Metadata;
import vtk.repository.store.PrincipalMetadata;
import vtk.repository.store.PrincipalMetadataDAO;

public class ApprovalViaEmailControllerTest {

    @Rule
    public final JUnitRuleMockery context = new JUnitRuleMockery();

    private ApprovalViaEmailController approvalViaEmailController;
    private PrincipalMetadataDAO pmDao;
    private PropertyTypeDefinition editorialContactsPropDef;

    @Before
    public void setUp() throws Exception {
        pmDao = context.mock(PrincipalMetadataDAO.class);
        editorialContactsPropDef = context.mock(PropertyTypeDefinition.class);

        approvalViaEmailController = new ApprovalViaEmailController();
        approvalViaEmailController.setEditorialContactsPropDef(editorialContactsPropDef);
        PrincipalFactory pf = new PrincipalFactory();
        pf.setPrincipalMetadataDao(pmDao);
        approvalViaEmailController.setPrincipalFactory(pf);
    }

    @Test
    public void getUserEmail() {
        final PrincipalImpl principal = new PrincipalImpl("oyvihatl@uio.no", Principal.Type.USER);

        final PrincipalMetadata pm = context.mock(PrincipalMetadata.class);

        context.checking(new Expectations() {
            {
                oneOf(pmDao).getMetadata(principal, null);
                will(returnValue(pm));

                oneOf(pm).getValue(PrincipalMetadataImpl.DESCRIPTION_ATTRIBUTE); will(returnValue(null));
                oneOf(pm).getValue(Metadata.URL_ATTRIBUTE); will(returnValue(null));

                oneOf(pm).getValues("email");
                will(returnValue(Arrays.asList(new String[] {"oyvind.hatland@usit.uio.no"})));
            }
        });

        assertEquals("oyvind.hatland@usit.uio.no", approvalViaEmailController.getUserEmail("oyvihatl@uio.no"));
        assertNull(approvalViaEmailController.getUserEmail("geir@ntnu.no"));
    }

    @Test
    public void getEditorialContactEmails() {

        final Resource resource = context.mock(Resource.class);
        final Property property = context.mock(Property.class);
        final Value[] values = new Value[] {
            new Value("vortex-core@usit.uio.no", Type.STRING),
            new Value("resin@ulrik.uio.no", Type.STRING)
        };

        context.checking(new Expectations(){
            {
                oneOf(resource).getProperty(editorialContactsPropDef);
                will(returnValue(property));
                oneOf(property).getValues();
                will(returnValue(values));
            }
        });

        assertEquals("vortex-core@usit.uio.no, resin@ulrik.uio.no",
                approvalViaEmailController.getEditorialContactEmails(resource));
    }
}


text:
Wild Exame
================================================================================
`Wild Exame` é um software web que permite gerir os exames de recuperação do ensino profissional

Requisitos
================================================================================

* PHP >= 5.4
* MCrypt PHP Extension
* MySQL Server

Contribuir
================================================================================

1. Faça uma copia deste Repositorio
2. Crie uma nova branch (`git checkout -b my-new-feature`)
3. Guardar as alterações (`git commit -am 'Add some feature'`)
4. Empurar as alterações (`git push origin my-new-feature`)
5. Crie um novo Pull Request neste repositorio

Licença
================================================================================

`Wild Exame` está licenciado sobre a Apache License, Version 2.0. Para a licença completa veja o ficheiro LICENSE.


text:
require "capistrano/git_version/version"
require "capistrano/git_version/tasks"
module Capistrano
  module GitVersion
    # Your code goes here...
  end
end


text:
subclass = require('subclassjs');

mongo = require('../../mongo');

var TomatoFactory = module.exports = subclass(function (pt) {
    'use strict';

    pt.constructor.getInstance = function () {

        return new this();

    };

    /**
     * Creates a tomato model from the object.
     *
     * @param {Object} obj The object
     * @return {Tomato}
     */
    pt.createFromObject = function (obj) {

        var now = new Date().getTime();

        if (!obj.createdAt) {
            obj.createAt = now;
        }

        obj.updatedAt = now;

        if (!obj.startedAt) {
            obj.startedAt = now;
        }

        if (!obj.endsAt) {
            obj.endsAt = now + 25 * 60 * 1000;
        }

        if (!obj.privacy) {
            obj.privacy = 'friend';
        }

        if (!obj.status) {
            obj.status = 'started';
        }

        if (!obj.accountId) {
            throw new Error('Account id is required for creating tomato object.');
        }

        if (typeof obj.tags === 'string' && obj.tags !== '') {

            obj.tags = obj.tags.trim().split(/\s+/);

        } else if (obj.tags instanceof Array) {

            // do nothing

        } else {

            obj.tags = [];

        }

        return new mongo.Tomato(obj);

    };

});


text:
module RocketPants

  require 'rocket_pants/error'

  # A simple map of data about errors that the rocket pants system can handle.
  class Errors

    @@errors = {}

    # Returns a hash of all known errors, keyed by their error name.
    # @return [Hash{Symbol => RocketPants::Error}] the hash of known errors.
    def self.all
      @@errors.dup
    end

    # Looks up a specific error from the given name, returning nil if none are found.
    # @param [#to_sym] name the name of the error to look up.
    # @return [Error, nil] the error class if found, otherwise nil.
    def self.[](name)
      @@errors[name.to_sym]
    end

    # Adds a given Error class in the list of all errors, making it suitable
    # for lookup via [].
    # @see Errors[]
    # @param [Error] error the error to register.
    def self.add(error)
      @@errors[error.error_name] = error
    end

    # Creates an error class to represent a given error state.
    # @param [Symbol] name the name of the given error
    # @param [Hash] options the options used to create the error class.
    # @option options [Symbol] :class_name the name of the class (under `RocketPants`), defaulting to the classified name.
    # @option options [Symbol] :error_name the name of the error, defaulting to the name parameter.
    # @option options [Symbol] :http_status the status code for the given error, doing nothing if absent.
    # @example Adding a RocketPants::NinjasUnavailable class w/ `:service_unavailable` as the status code:
    #   register! :ninjas_unavailable, :http_status => :service_unavailable
    def self.register!(name, options = {})
      klass_name = (options[:class_name] || name.to_s.classify).to_sym
      base_klass = options[:base] || Error
      raise ArgumentError, ":base must be a subclass of RocketPants::Error" unless base_klass <= Error
      klass = Class.new(base_klass)
      klass.error_name(options[:error_name] || name.to_s.underscore)
      klass.http_status(options[:http_status]) if options[:http_status].present?
      (options[:under] || RocketPants).const_set klass_name, klass
      add klass
      klass
    end

    # The default set of exceptions.
    register! :throttled,       :http_status => :service_unavailable
    register! :unauthenticated, :http_status => :unauthorized
    register! :invalid_version, :http_status => :not_found
    register! :not_implemented, :http_status => :service_unavailable
    register! :not_found,       :http_status => :not_found
    register! :bad_request,     :http_status => :bad_request
    register! :conflict,        :http_status => :conflict
    register! :forbidden,       :http_status => :forbidden

  end

  class InvalidResource < RocketPants::Error
    http_status :unprocessable_entity
    error_name  :invalid_resource

    # Errors are ActiveModel Errors
    attr_reader :errors

    def initialize(errors, *args)
      @errors = errors
      super *args
    end

    def context
      super.tap do |ctx|
        extras            = (ctx[:metadata] ||= {})
        extras[:messages] = errors.to_hash if errors
      end
    end

    Errors.add self

  end

end


text:
package org.snmp4j;

import java.util.EventListener;

/**
 * CommandResponder process incoming request, report and
 * notification PDUs. An event may only processed once. A command responder
 * must therefore set the processed member of the supplied
 * CommandResponderEvent object to true when it has
 * processed the PDU.
 *
 * @author Jochen Katz & Frank Fock
 * @version 1.0
 */
public interface CommandResponder extends EventListener {

  /**
   * Process an incoming request, report or notification PDU.
   * @param event
   *    a CommandResponderEvent instance containing the PDU to
   *    process and some additional information returned by the message
   *    processing model that decoded the SNMP message.
   */
  void processPdu(CommandResponderEvent event);

}


text:
package net.sf.jabref.gui.specialfields;

import java.util.List;

import net.sf.jabref.Globals;
import net.sf.jabref.gui.undo.NamedCompound;
import net.sf.jabref.gui.undo.UndoableFieldChange;
import net.sf.jabref.logic.l10n.Localization;
import net.sf.jabref.logic.specialfields.SpecialFieldsUtils;
import net.sf.jabref.model.FieldChange;
import net.sf.jabref.model.database.event.EntryAddedEvent;
import net.sf.jabref.model.entry.BibEntry;

import com.google.common.eventbus.Subscribe;

public class SpecialFieldDatabaseChangeListener {

    private static SpecialFieldDatabaseChangeListener INSTANCE;

    public static SpecialFieldDatabaseChangeListener getInstance() {
        if (SpecialFieldDatabaseChangeListener.INSTANCE == null) {
            SpecialFieldDatabaseChangeListener.INSTANCE = new SpecialFieldDatabaseChangeListener();
        }
        return SpecialFieldDatabaseChangeListener.INSTANCE;
    }

    @Subscribe
    public void listen(EntryAddedEvent event) {
        if (Globals.prefs.isKeywordSyncEnabled()) {
            final BibEntry entry = event.getBibEntry();
            // NamedCompount code similar to SpecialFieldUpdateListener
            NamedCompound nc = new NamedCompound(Localization.lang("Synchronized special fields based on keywords"));
            List<FieldChange> changes = SpecialFieldsUtils.syncSpecialFieldsFromKeywords(entry, Globals.prefs.getKeywordDelimiter());
            for(FieldChange change: changes) {
                nc.addEdit(new UndoableFieldChange(change));
            }

            // Don't insert the compound into the undoManager,
            // it would be added before the component which undoes the insertion of the entry and creates heavy problems
            // (which prohibits the undo the deleting multiple entries)
        }
    }

}