text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Bandwidth.Net;
using Bandwidth.Net.Model;
using Nancy;
using Nancy.TinyIoc;

namespace ConferenceWithAgentApp
{
    public class CallbackModule : NancyModule
    {
        public CallbackModule(TinyIoCContainer container)
        {
            var phoneNumber = container.Resolve<string>("phoneNumber");

            //home page (to show phone number to call)
            Get["/"] = p => string.Format("Call to {0}", phoneNumber);

            //catapult callback handler
            Post["/callback", true] = async (p, c) =>
            {
                using (var reader = new StreamReader(Request.Body, Encoding.UTF8))
                {
                    try
                    {
                        dynamic ev = BaseEvent.CreateFromString(await reader.ReadToEndAsync());
                        Trace.WriteLine("Came event " + ((BaseEvent)ev).EventType, "Callback");
                        await ProcessEvent(ev, container);
                    }
                    catch (Exception ex)
                    {
                        Trace.WriteLine(string.Format("{0} - {1}", Request.Url, ex.Message), "CallbackError");
                    }
                    return HttpStatusCode.OK;
                }
            };
        }

        private async Task ProcessEvent(IncomingCallEvent ev, TinyIoCContainer container)
        {
            var baseUrl = container.Resolve<string>("baseUrl");
            var phoneNumber = container.Resolve<string>("phoneNumber");
            var agentPhoneNumber = container.Resolve<string>("agentPhoneNumber");
            if (ev.To == phoneNumber)
            {
                //somebody called to application phone number
                var callbackUrl = baseUrl + "/callback";

                //create a conference
                var conference = await Conference.Create(new Dictionary<string, object>
                {
                    {"from", phoneNumber},
                    {"callbackUrl", callbackUrl}
                });

                //create a call to "agent" with enabled recording
                await Call.Create(new Dictionary<string, object>
                {
                    {"recordingEnabled", true},
                    {"to", agentPhoneNumber},
                    {"from", phoneNumber},
                    {"callbackUrl", callbackUrl},
                    {"tag", string.Format("{0}:{1}", ev.CallId, conference.Id)}
                });
            }
        }

        private async Task ProcessEvent(AnswerEvent ev, TinyIoCContainer container)
        {
            var phoneNumber = container.Resolve<string>("phoneNumber");
            var agentPhoneNumber = container.Resolve<string>("agentPhoneNumber");
            if (ev.From == phoneNumber && ev.To == agentPhoneNumber && !string.IsNullOrEmpty(ev.Tag))
            {
                // "agent" answered call
                var ids = ev.Tag.Split(':');
                var incomingCallId = ids[0];
                var conferenceId = ids[1];
                var conference = await Conference.Get(conferenceId);
                var incomingCall = await Call.Get(incomingCallId);

                //join it to the conference
                await conference.CreateMember(new Dictionary<string, object>
                {
                    {"callId", ev.CallId}
                });

                //answer incoming call (to the app number)
                await incomingCall.AnswerOnIncoming();

                //and join this call to the conference too
                await conference.CreateMember(new Dictionary<string, object>
                {
                    {"callId", incomingCallId}
                });
            }
        }

        private Task ProcessEvent(BaseEvent ev, TinyIoCContainer container)
        {
            //do nothing for other events
            return Task.FromResult(0);
        }
    }
}


text:
set -o errexit
set -o nounset
set -o pipefail

SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/..

if [[ "$(protoc --version)" != "libprotoc 3.0."* ]]; then
  echo "Generating protobuf requires protoc 3.0.x. Please download and
install the platform appropriate Protobuf package for your OS:

  https://github.com/google/protobuf/releases

To skip protobuf generation, set \$PROTO_OPTIONAL."
fi

rm -rf go-to-protobuf
go build -o _output/bin/go-to-protobuf github.com/openshift/api/vendor/k8s.io/code-generator/cmd/go-to-protobuf

go-to-protobuf \
--output-base="${GOPATH}/src" \
--apimachinery-packages='-k8s.io/apimachinery/pkg/util/intstr,-k8s.io/apimachinery/pkg/api/resource,-k8s.io/apimachinery/pkg/runtime/schema,-k8s.io/apimachinery/pkg/runtime,-k8s.io/apimachinery/pkg/apis/meta/v1,-k8s.io/apimachinery/pkg/apis/meta/v1alpha1,-k8s.io/api/core/v1' \
--go-header-file=${SCRIPT_ROOT}/hack/empty.txt \
--proto-import=${SCRIPT_ROOT}/vendor/github.com/gogo/protobuf/protobuf \
--proto-import=${SCRIPT_ROOT}/vendor \
--packages='github.com/openshift/api/apps/v1,github.com/openshift/api/authorization/v1,github.com/openshift/api/image/v1,github.com/openshift/api/network/v1,github.com/openshift/api/oauth/v1,github.com/openshift/api/project/v1,github.com/openshift/api/quota/v1,github.com/openshift/api/route/v1,github.com/openshift/api/security/v1,github.com/openshift/api/template/v1,github.com/openshift/api/user/v1'

redpajama_set_name: RedPajamaGithub


text:
backend
=======

A Symfony project created on May 7, 2017, 1:51 am.


text:
from __future__ import with_statement
import ConfigParser, os

confFilePath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'agents.ini')
cfgp = ConfigParser.ConfigParser()
with open(confFilePath) as file:
    cfgp.readfp(file)

for module_name in cfgp.sections():
    mod = __import__('popserver.agents', globals(), locals(), [module_name], -1)
    mod = getattr(mod, module_name)
    for prop in cfgp.items(module_name):
        setattr(mod, prop[0], prop[1])

# excepciones

class AgentException(Exception):
    """ clase base para todas las Exceptions emitidas por los agentes """
    pass

class ItemNotFoundException(AgentException):
    """ el item solicitado no pudo ser encontrado por el agente en el servicio remoto """
    pass


text:
# RT-Thread #

[中文页](README_zh.md) |

[![GitHub](https://img.shields.io/github/license/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/releases)
[![Build Status](https://travis-ci.org/RT-Thread/rt-thread.svg)](https://travis-ci.org/RT-Thread/rt-thread)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/RT-Thread/rt-thread?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![GitHub pull-requests](https://img.shields.io/github/issues-pr/RT-Thread/rt-thread.svg)](https://github.com/RT-Thread/rt-thread/pulls)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](https://github.com/RT-Thread/rt-thread/pulls)

RT-Thread is an open source IoT operating system from China, which has strong scalability: from a tiny kernel running on a tiny core, for example ARM Cortex-M0, or Cortex-M3/4/7, to a rich feature system running on MIPS32, ARM Cortex-A8, ARM Cortex-A9 DualCore etc.

## Overview ##

RT-Thread RTOS like a traditional real-time operating system. The kernel has real-time multi-task scheduling, semaphore, mutex, mail box, message queue, signal etc. However, it has three different things:

* Device Driver;
* Component;
* Dyanmic Module

The device driver is more like a driver framework, UART, IIC, SPI, SDIO, USB device/host, EMAC, MTD NAND etc. The developer can easily add low level driver and board configuration, then combined with the upper framework, he/she can use lots of features.

The Component is a software concept upon RT-Thread kernel, for example a shell (finsh/msh shell), virtual file system (FAT, YAFFS, UFFS, ROM/RAM file system etc), TCP/IP protocol stack (lwIP), POSIX (thread) interface etc. One component must be a directory under RT-Thread/Components and one component can be descripted by a SConscript file (then be compiled and linked into the system).

The Dyanmic Module, formerly named as User Applicaion (UA) is a dyanmic loaded module or library, it can be compiled standalone without Kernel. Each Dyanmic Module has its own object list to manage thread/semaphore/kernel object which was created or initialized inside this UA. More information about UA, please visit another [git repo](https://github.com/RT-Thread/rtthread-apps).

## Board Support Package ##

RT-Thread RTOS can support many architectures:

* ARM Cortex-M0
* ARM Cortex-M3/M4/7
* ARM Cortex-R4
* ARM Cortex-A8/A9
* ARM920T/ARM926 etc
* MIPS32
* x86
* Andes
* C-Sky
* RISC-V
* PowerPC

## License ##

RT-Thread is Open Source software under the Apache License 2.0 since RT-Thread v3.1.1. License and copyright information can be found within the code.

Since 9th of September 2018, PRs submitted by the community may be merged into the main line only after signing the Contributor License Agreement(CLA).

NOTE:

RT-Thread using the Apache license v2.0 is only launched after the release of v3.1.1, and is still in preparation right now.

## Usage ##

RT-Thread RTOS uses [scons](http://www.scons.org) as building system. Therefore, please install scons and Python 2.7 firstly.
So far, the RT-Thread scons building system support the command line compile or generate some IDE's project. There are some option varaibles in the scons building script (rtconfig.py):

* ```CROSS_TOOL``` the compiler which you want to use, gcc/keil/iar.
* ```EXEC_PATH``` the path of compiler.

In SConstruct file:

```RTT_ROOT``` This variable is the root directory of RT-Thread RTOS. If you build the porting in the bsp directory, you can use the default setting. Also, you can set the root directory in ```RTT_ROOT``` environment variable and not modify SConstruct files.

When you set these variables correctly, you can use command:

    scons

under BSP directory to simplely compile RT-Thread RTOS.

If you want to generate the IDE's project file, you can use command:

    scons --target=mdk/mdk4/mdk5/iar/cb -s

to generate the project file.

NOTE: RT-Thread scons building system will tailor the system according to your rtconfig.h configuration header file. For example, if you disable the lwIP in the rtconfig.h by commenting the ```#define RT_USING_LWIP```, the generated project file should have no lwIP related files.

## Contribution ##

Please refer the contributors in the github. Thank all of RT-Thread Developers.


text:
package main

import (
	"log"
	"os"
	"os/signal"
	"time"

	"github.com/codegangsta/cli"
	"github.com/opsee/zuul/registration"
)

const (
	version = "0.0.1"
)

func register(c *cli.Context) {
	interval := time.Second * 30

	customerID := c.String("customer-id")
	bastionID := c.String("bastion-id")
	instanceID := c.String("instance-id")
	nsqdHost := c.String("nsqd-host")
	exgID := c.String("execution-group-id")
	registration.IPFilePath = c.String("ip-file-path")
	//func NewService(interval time.Duration, nsqdHost string, customerID string, bastionID string, instanceID string) *nsqdService {
	svc := registration.NewProducer(interval, nsqdHost, customerID, bastionID, instanceID, exgID)

	sigs := make(chan os.Signal, 1)
	signal.Notify(sigs, os.Interrupt, os.Kill)

	svc.Start()

	s := <-sigs
	svc.Stop() // blocks
	log.Println("Got signal, exiting:", s)
}

func main() {
	app := cli.NewApp()
	app.Name = "register"
	app.Usage = "Announce that you have connected by sending a message to NSQD"
	app.Version = version
	app.Action = register
	app.Flags = []cli.Flag{
		cli.StringFlag{
			Name:  "customer-id, c",
			Value: os.Getenv("CUSTOMER_ID"),
		},
		cli.StringFlag{
			Name:  "bastion-id, b",
			Value: os.Getenv("BASTION_ID"),
		},
		cli.StringFlag{
			Name:  "instance-id, i",
			Value: os.Getenv("AWS_INSTANCE_ID"),
		},
		cli.StringFlag{
			Name:  "nsqd-host, n",
			Value: os.Getenv("NSQD_HOST"),
		},
		cli.StringFlag{
			Name:  "execution-group-id, e",
			Value: os.Getenv("EXECUTION_GROUP_ID"),
		},
		cli.StringFlag{
			Name:  "ip-file-path, f",
			Value: "/gozer/state/ip",
		},
	}

	app.Run(os.Args)
}


text:
package net.onrc.onos.core.datastore.utils;

/**
 * Interface to serialize object into byte[].
 *
 * Serializer instance is expected to be functional even if the
 * instance was shared among multiple threads.
 */
public interface Serializer {
    /**
     * Serializes a given object.
     *
     * @param obj the object to serialize
     * @return binary representation of the serialized object
     */
    public byte[] serialize(final Object obj);

    /**
     * Deserializes a given byte array.
     *
     * @param bytes binary representation of an Object
     * @return deserialized object
     */
    public <T> T deserialize(final byte[] bytes);
}


text:
package apple.foundation.enums;

import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.NInt;

@Generated
public final class NSAttributedStringMarkdownInterpretedSyntax {
    @Generated
    private NSAttributedStringMarkdownInterpretedSyntax() {
    }

    /**
     * Interpret the full Markdown syntax and produce all relevant attributes
     */
    @Generated @NInt public static final long Full = 0x0000000000000000L;
    /**
     * Parse all Markdown text, but interpret only attributes that apply to inline spans. Attributes that differentiate
     * blocks (e.g. NSPresentationIntentAttributeName) will not be applied. (Extended attributes apply to inline spans,
     * if allowed, and will also be interpreted.)
     */
    @Generated @NInt public static final long InlineOnly = 0x0000000000000001L;
    /**
     * Like …InlineOnly, but do not interpret multiple consecutive instances of whitespace as a single separator space.
     * All whitespace characters will appear in the result as they are specified in the source.
     */
    @Generated @NInt public static final long InlineOnlyPreservingWhitespace = 0x0000000000000002L;
}


text:
package jpbetz.cli;

import java.lang.reflect.Field;
import java.util.Map;

import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;

public class CommandSummary {
	private Command _instance;
	private String _name;
	private String _description;
	private Options _options;
	private Arguments _args;
	private Map<Option, Field> _optionFields;

	public CommandSummary(Command instance, String name, String description, Options options, Arguments args, Map<Option, Field> optionFields) {
		_instance = instance;
		_name = name;
		_description = description;
		_options = options;
		_args = args;
		_optionFields = optionFields;
	}

	public Command getInstance() {
    return _instance;
  }

	public String getName() {
    return _name;
  }

	public String getDescription() {
    return _description;
  }

	public Options getOptions() {
    return _options;
  }

	public Arguments getArgs() {
	  return _args;
  }

	public Map<Option, Field> getOptionFields() {
	  return _optionFields;
  }
}


text:
package org.jbpm.services.cdi.impl.query;

import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Instance;
import javax.inject.Inject;
import javax.inject.Named;

import org.dashbuilder.dataprovider.DataSetProviderRegistry;
import org.dashbuilder.dataset.DataSetManager;
import org.dashbuilder.dataset.def.DataSetDefRegistry;
import org.jbpm.kie.services.impl.query.QueryServiceImpl;
import org.jbpm.kie.services.impl.security.DeploymentRolesManager;
import org.jbpm.services.api.DeploymentEvent;
import org.jbpm.services.cdi.Activate;
import org.jbpm.services.cdi.Deactivate;
import org.jbpm.services.cdi.Deploy;
import org.jbpm.services.cdi.Undeploy;
import org.jbpm.shared.services.impl.TransactionalCommandService;
import org.kie.internal.identity.IdentityProvider;
import org.kie.internal.runtime.cdi.BootOnLoad;

@Named("QueryServiceCDIImpl-startable")
@BootOnLoad
@ApplicationScoped
public class QueryServiceCDIImpl extends QueryServiceImpl {

    @Inject
    private Instance<DataSetDefRegistry> dataSetDefRegistryInstance;
    @Inject
    private Instance<DataSetManager> dataSetManagerInstance;
    @Inject
    private Instance<DataSetProviderRegistry> providerRegistryInstance;

    @Inject
    @Override
    public void setIdentityProvider(IdentityProvider identityProvider) {
        super.setIdentityProvider(identityProvider);
    }

    @Inject
    @Override
    public void setCommandService(TransactionalCommandService commandService) {
        super.setCommandService(commandService);
    }

    @Inject
    @Override
    public void setDeploymentRolesManager(DeploymentRolesManager deploymentRolesManager) {
        super.setDeploymentRolesManager(deploymentRolesManager);
    }

    @PostConstruct
    @Override
    public void init() {
        if (!dataSetManagerInstance.isUnsatisfied()) {
            setDataSetManager(dataSetManagerInstance.get());
        }
        if (!dataSetDefRegistryInstance.isUnsatisfied()) {
            setDataSetDefRegistry(dataSetDefRegistryInstance.get());
        }
        if (!providerRegistryInstance.isUnsatisfied()) {
            setProviderRegistry(providerRegistryInstance.get());
        }
        super.init();
    }

    @Override
    public void onDeploy(@Observes@Deploy DeploymentEvent event) {
        super.onDeploy(event);
    }

    @Override
    public void onUnDeploy(@Observes@Undeploy DeploymentEvent event) {
        super.onUnDeploy(event);
    }

    @Override
    public void onActivate(@Observes@Activate DeploymentEvent event) {
        super.onActivate(event);
    }

    @Override
    public void onDeactivate(@Observes@Deactivate DeploymentEvent event) {
        super.onDeactivate(event);
    }

}


text:
package com.matianl.explore.java7concurrency.Chapter6.ch6_recipe07.src.com.packtpub.java7.concurrency.chapter6.recipe08.task;

/**
 * This class simulates a bank or a cash dispenser that takes money
 * from an account
 *
 */
public class Bank implements Runnable {

	/**
	 * The account affected by the operations
	 */
	private Account account;

	/**
	 * Constructor of the class. Initializes the account
	 * @param account The account affected by the operations
	 */
	public Bank(Account account) {
		this.account=account;
	}

	/**
	 * Core method of the Runnable
	 */
	@Override
	public void run() {
		for (int i=0; i<10; i++){
			account.subtractAmount(1000);
		}
	}

}


text:
\input{../lib.tex}
\doctitle{Conception plus détaillée de la dernière étape du procédé :
la synthèse d'ammoniac proprement dite}

\section{Introduction}
Contrairement à ce que nous avons fait précedement nous allons nous intéressé
plus en détails à la dernière étape: la synthèse d'ammoniac proprement dite.
Dans un premier temps, nous étudierons les contraintes thermodynamiques de
la réaction afin d'établir les conditions de cette réaction.
Dans un deuxième temps, nous simulerons le procédé à l'aide du logiciel
\textsc{Aspen+}.

\section{Etude thermodynamique}
\subsection{Etude qualitative des paramètres thermodynamiques }
\subsubsection{Pression}
Selon Le Chatelier: "Si une modification est imposée à un système chimique à
l'état d'équilibre, il s'ensuit la réaction chimique qui s'oppose en partie
à la modification imposée; le système évolue vers un nouvel état d'équilibre"
\cite{LeChatelier}.

A température et volume constants, la pression d'un gaz dépend directement
du nombre de moles de gaz contenu dans une enceinte. On en déduit donc qu'une
augmentation de la pression favorise une diminution du nombre de moles.

Or notre procédé est régit par la réaction suivante :
\begin{chemmath}
	N_2(g) + 3H_{2}O(g) \longrightarrow 2NH_3(g)
\end{chemmath}

On observe que le nombre de moles de gaz produites est inférieur au nombre
initial. Si nous voulons augmenter la quantité d'ammoniac produit, il faut
une haute pression.

Par ailleurs, une augmentation de la pression rapproche les molécules, ce qui
par conséquent augmente la possibilté que les molécules se heurtent aux
catalyseurs, favorisant ainsi la réaction.

Cependant, les infrastructures à mettre en place pour supporter des pressions
importantes reviennent cheres ainsi que le procédé pour maintenir une haute pression.

En pratique, on procéde à un compromis entre la quantité produite et le coût des opérations.
La pression est de l'ordre de \unit{200}{\bbar} \cite{HaberB}.

\subsubsection{Température}
Notre réaction est exothermique, on observe que son $\Delta H$ est négatif.
Selon Le Chatelier, un diminution de température favorisera la réaction
exothermique pour tempter de s'opposer à la diminution d'énergie \cite{LeChatelier}.
Si nous voulons augmenter la quantité d'ammoniac produit, il faut une basse température.
Nous pouvons observer sur le graphique \ref{fig:constantK}, que
la constante d'équilibre est élevée à basse température et faible à haute température.

\begin{figure}
	\centering
	\includegraphics[scale=0.48]{media/grapheK200-300.jpg}
	\caption{Résultat du calcul de la constante d'équilibre.}
	\label{fig:constantK}
\end{figure}

Cependant, à basse température la réaction est ralentie.

En pratique, on préfère produire une grande quantité d'ammoniac en un temps très court.
La température avoisine les \unit{400-500}{\degreecelsius} \cite{HaberB}.

\subsection{Etude quantitative des paramètres thermodynamiques }
Nous avions d'abord fait l'hypothèse que la synthèse était complète.
Nous pouvons maintenant l'analyser plus en détails en la considérant
à l'équilibre thermodynamique. Nous ferons ici l'hypothèse du gaz
parfait, une étude plus rigoureuse à l'aide du logiciel \textsc{Aspen+}
sera faite par la suite. Notons à l'avance que nous travaillerons
à pression constante étant donné que nous sommes dans un système ouvert.
On se rend vite compte qu'une conversion complète n'est pas réalisable.
Nous avons alors incorporé une boucle de recyclage des réactifs résiduels
afin de les renvoyer à l'entrée du réacteur. Cette boucle comprend une
purge afin d'éviter l'accumulation d'argon présent dans l'air.
% FIX : (et une surpression?)

Le tableau~\ref{tab:ammoniac} fait le bilan à l'équilibre thermodynamique.

\begin{table}[!ht]
	\begin{center}
		\begin{tabular}{c|ccc}
			Avancement &
			\multicolumn{1}{c!{\makebox[0pt]{+}}}{\ce{1/2N2_{(g)}}} &
			\multicolumn{1}{c!{\makebox[0pt]{$\rightleftharpoons$}}}{\ce{3/2H2_{(g)}}} &
			\ce{NH3_{(g)}} \\
			\hline
			$n_i$ & $n_1$ & $n_2$ & $0$ \\
			$n_{eq}(x)$ & $n_1 - \frac{x}{2}$ & $n_2 - \frac{3x}{2}$ & $x$ \\
			\hline
			$a(x)$ &
			%$\frac{2n_{1} - x}{2 n_{g,tot}} \frac{p_{tot}}{p \degree}$
			$\frac{2n_{1} - x}{2 n_{g,tot}} \frac{p_{tot}}{p\std}$ &
			$\frac{2n_{2} - 3x}{2 n_{g,tot}} \frac{p_{tot}}{p\std}$ &
			$\frac{x}{n_{g,tot}} \frac{p_{tot}}{p\std}$ \\
		\end{tabular}
		\caption{Tableau d'avancement de la réaction de synthèse de l'ammoniac.}
		\label{tab:ammoniac}
	\end{center}
\end{table}

Dans celui-ci, $n_1$, $n_2$ et $n_3$ sont respectivement les débits molaires
d'azote, d'hydrogène et d'argon. La variable $x$ est l'avancement de la réaction. De plus,la somme des débits molaires de gaz
à l'équilibre est : $n_{g,tot} = n_1 + n_2 + n_3 - x$.

On retire de cela et du tableau~\ref{tab:ammoniac}, une expression de la constante d'équilibre :

$$K(T) = \frac{4x\cdot p\std \cdot n_{g,tot}}{(2n_1 - x)^{1/2} (2n_2 - 3x)^{3/2} \cdot p_{tot}}.$$

Cette constante d'équilibre peut également être calculée en procédant de la même manière que pour le réformage primaire.
% Comment citer une section en latex ??

Pour aider à visualiser l'analyse quantitative de la réaction, nous vous renvoyons à la figure~\ref{fig:purge1}.

\begin{figure}
	\centering
	\includegraphics[scale=0.5]{media/reacteurNH3.jpg}
	\caption{Modélisation du recyclage des réactifs dans le réacteur de synthèse}
	\label{fig:purge1}
\end{figure}

En développant le problème dans le cas d'un recyclage avec purge, on a :

\begin{align}
	\notag
	\begin{cases}
	 n_1 = \ce{N2_{,in} + N2_{,rec}} \\
	 n_2 = \ce{H2_{,in} + H2_{,rec}} \\
	 n_3 = \ce{Ar_{in} + Ar_{rec}} \\
	\end{cases}
	 &  \text{et}  &
	\begin{cases}
	 \ce{N2_{,syn}} = n_1 - \frac{x}{2} \\
	 \ce{H2_{,syn}} = n_2 - \frac{3x}{2} \\
	 \ce{NH3_{,syn}} = x \\
	 \ce{Ar_{syn} = Ar_{in} + Ar_{rec}} \\
	\end{cases}
	\\
\end{align}

Les équations de gauche sont dues au recyclage et celles de droite
à la conservation de la matière. Ensuite, nous avons les trois relations
de la purge où nous posons un coefficient $k$ de proportion entre ce qui
est recyclé et ce qui sort du réacteur de synthèse. On fait l'hypothèse
que la purge enlève une proportion égale de moles pour chaque composé.

$$
\begin{cases}
 k\cdot \ce{N2_{,syn}} = \ce{N2_{,rec}} \\
 k\cdot \ce{H2_{,syn}} = \ce{H2_{,rec}} & k \in [0 \text{(ouvert)}, 1 \text{(fermé)}[ \\
 k\cdot \ce{Ar_{syn}} = \ce{Ar_{rec}} \\
\end{cases}
$$

Enfin, il nous reste à imposer que en régime l'argon rentrant doit être égal
à l'argon purgé. C'est indispensable pour éviter une accumulation du composé
dans le réacteur, et une baisse du rendement.
Il faut donc : $(1 - k)\ce{Ar_{syn}} = \ce{Ar_{in}}$.

A partir de ces différentes équations, nous pouvons exprimer l'ammoniac
sortant en fonction des composants à l'entrée, du coefficient, de la pression
totale et de la température. Les détails du calcul sont laissés à l'attention
du lecteur. Nous arrivons finalement à l'équation~\eqref{eq:finale}, qui peut
être résolue numériquement à l'aide de l'outil \textsc{Matlab}.

\begin{align}
	K(T) & = \frac{4x\cdot p\std \cdot (\ce{N2_{,in} + H2_{,in} + Ar_{in}} -
	\ce{NH3_{,syn}}(k + 1)) (1 - k)}{(\ce{2N2_{,in} - NH3_{,syn}})^{1/2} (\ce{2H2_{,in} - 3NH3_{,syn}})^{3/2} \cdot p_{tot}}
	\label{eq:finale}
\end{align}

Pour pouvoir complèter notre outil de gestion, nous exprimons les entrées
en fonction du débit d'ammoniac voulue, de $k$, de la pression et de la
température. Pour cela nous nous plaçons dans le cas idéal stœchiométrique,
où aucuns des composants n'est en excès. De plus, nous prenons en compte la
concentration d'argon naturellemnt dans l'air.

$$
\begin{cases}
 \ce{N2_{,in}} = \ce{78Ar_{in}}\\
 \ce{N2_{,in}} = \ce{1/3H2_{,in}} \\
\end{cases}
$$

A l'aide de notre programme \textsc{Matlab} résolvant l'équation finale~\eqref{eq:finale}  nous avons tracer des graphiques mettant en valeur nos résultats.

\begin{figure}
	\centering
	\includegraphics[scale=0.5]{media/purgeTemperature.jpg}
	\caption{Modélisation de la production de \chemform{NH_3} du procédé \textsc{Haber Bosh}}
	\label{fig:purgeTemperature}
\end{figure}

Le graphe \ref{fig:purgeTemperature} a été réalisé à une pression constante de \unit{270}{\bbar}, pour \unit{1}{\mole\per\second} de \chemform{N_2}, une purge de 10\% et pour des températures de \unit{300-800}{\kelvin}. On observe conformément à nos attentes que le débit de \chemform{NH_3} diminue lorsque la température augmente. Le rendement est proche de 100\% à température ambiante, cela s'explique également par le recyclage des réactifs. A \unit{800}{\kelvin} le rendement chute à 80\%.

\begin{figure}
	\centering
	\includegraphics[scale=0.5]{media/purgePression.jpg}
	\caption{Modélisation de la production de \chemform{NH_3} du procédé \textsc{Haber Bosh}}
	\label{fig:purgePression}
\end{figure}

Le graphe \ref{fig:purgePression} a été réalisé à une température constante de \unit{750}{\kelvin}, pour \unit{1}{\mole\per\second} de \chemform{N_2}, une purge de 10\% et pour des pressions de \unit{150-600}{\bbar}. On observe conformément à nos attentes que le débit de \chemform{NH_3} augmente lorsque la pression augmente aussi. A \unit{200}{bbar} le rendement est de l'ordre de 80\%, tandis que lorsque le pression est supérieure à \unit{450}{bbar} le rendement dépasse les 90\%.

\begin{figure}
	\centering
	\includegraphics[scale=0.5]{media/purge.jpg}
	\caption{Modélisation de la production de \chemform{NH_3} du procédé \textsc{Haber Bosh}}
	\label{fig:purge}
\end{figure}

Le graphe \ref{fig:purge} a été réalisé à une température constante de \unit{750}{\kelvin}, une pression constante de \unit{270}{\bbar}, pour \unit{1}{\mole\per\second} de \chemform{N_2} et pour des purges de 10\% à 100\%. On observe conformément à nos attentes que le débit de \chemform{NH_3} diminue lorsque la purge augmente. Lorsque la purge est totale le rendement est de 40\% tandis qu'avec une purge de 10\% nous atteignons 85\%.

\section{Utilisation du logiciel \textsc{Aspen+}}
Nous avons ensuite utilisée le logiciel \textsc{Aspen+}
afin de simuler la synthèse de l'ammoniac. Pour cela
nous avons construit le flow-sheet présenté à la figure
\ref{fig:flow-sheet-aspen}.

\begin{figure}
	\centering
	\rotatebox{90}{\includegraphics[scale=0.7]{media/flow-sheet.jpg}}
	\caption{Flow-sheet du procédé de synthèse de l'ammoniac
	réalisé avec \textsc{Aspen+}.}
	\label{fig:flow-sheet-aspen}
\end{figure}

Pour la simulation, nous avons utilisé la méthode
thermodynamique \textsc{SRK} qui est particulièrement
approprié pour les réactions entre gaz avec une pression
et une température élevée. Nous avons choisi d'utiliser
une purge de 4\%. La simulation nous fournit les résultats
présente à la figure \ref{fig:resultats-aspen}.

\begin{figure}
	\centering
	\rotatebox{90}{\includegraphics[scale=0.48]{media/results.jpg}}
	\caption{Résultats du procédé de synthèse de l'ammoniac
	réalisé avec \textsc{Aspen+}.}
	\label{fig:resultats-aspen}
\end{figure}

Ces résultats sont assez proches de ceux fournis par
l'outil de gestion. En effet, en prenant les valeurs
d'entrées nécessaires à la production à \unit{1000}{\kelvin} de
\unit{1500}{\ton\per\dday}, soit \unit{1019.40}{\mole\per\second},
de \chemform{NH_3} avec notre outil de gestion, notre simulation \textsc{Aspen+}
nous fournit un débit de \unit{955.949}{\mole\per\second} (ligne AMMON-01, colonne NH3-OUT),
soit un rendement de 93.77\%. Le débit de sortie de \chemform{NH_3}
est inférieur à celui obtenu avec notre outil de gestion étant donné que
ce dernier considère la réaction principale comme complète, tandis qu'\textsc{Aspen+}
rajoute la purge, nécessaire pour éviter l'accumulation d'\chemform{Ar}
mais ayant comme conséquence le défaussage d'une certaine quantité de
\chemform{N_2} et de \chemform{H_2}, et calcule également automatiquement un rendement
standard pour les réacteurs, séparateurs et tout composant de notre système
(nous pouvons d'ailleurs remarquer que la colonne NH3-OUT, indiquant le débit
de sortie supposé ne contenir que du \chemform{NH_3}, contient quand même du
\chemform{N_2}, \chemform{H_2} et \chemform{Ar},
tout simplement parce qu'Aspen représente la réalité des choses et
un séparateur n'est jamais parfait).

\biblio{sources-tache2}

\input{../footer.tex}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
<title>org.gradle.model (Gradle API 2.13)</title>
<meta name="date" content="2016-04-25">
<link rel="stylesheet" type="text/css" href="../../../javadoc.css" title="Style">

org.gradle.model

Interfaces

ModelMap

ModelSet

Classes

RuleSource

Exceptions

ConfigurationCycleException

InvalidModelRuleDeclarationException

InvalidModelRuleException

ModelRuleBindingException

ModelViewClosedException

WriteOnlyModelViewException

Annotation Types

Defaults

Each

Finalize

Managed

Model

Mutate

Path

RuleInput

Rules

RuleTarget

Unmanaged

Validate


text:
if(NOT DEFINED HUNTER_PACKAGE_INIT)
#	if(NOT DEFINED HUNTER_PACKAGE_DIR) #not set assume part of source tree
#		set(HUNTER_PACKAGE_DIR "${CMAKE_SOURCE_DIR}/packages/" CACHE STRING)
#	endif()

	set(ENV{HUNTER_ROOT} "${HUNTER_PACKAGE_DIR}")
	set(HUNTER_DIR "${CMAKE_SOURCE_DIR}/cmake/Hunter")

	find_package(Git)

	if(NOT GIT_FOUND)
		message(FATAL_ERROR "HunterPackage requires Git.")
	endif()

	if (NOT EXISTS ${HUNTER_DIR}/HunterGate.cmake)
#		message(STATUS "Getting HunterGate (https://github.com/hunter-packages/gate/blob/master/cmake)")
#		execute_process(
#			COMMAND "${GIT_EXECUTABLE}" clone https://github.com/hunter-packages/gate/blob/master/cmake ${HUNTER_DIR}
#			RESULT_VARIABLE error_code
#			OUTPUT_QUIET ERROR_QUIET
#		)
#		if(error_code)
#			message(FATAL_ERROR "Hunter failed to get the hash for HEAD")
#		endif()
		set(fileName "HunterGate.cmake")
		set(url "https://raw.githubusercontent.com/hunter-packages/gate/master/cmake/${fileName}")
		file(DOWNLOAD ${url}
			${HUNTER_DIR}/${fileName}
			STATUS status
			LOG log)

		list(GET status 0 statusCode)
		list(GET status 1 statusString)

		if(NOT statusCode EQUAL 0)
			message(FATAL_ERROR "error: downloading '${url}' failed
			error: ${statusCode} - ${statusString}
			log: ${log}")
		endif()
	endif()
	set(HUNTER_PACKAGE_INIT TRUE)
endif()

message(STATUS "Including HunterGate: ${HUNTER_DIR}/HunterGate.cmake")
include(${HUNTER_DIR}/HunterGate.cmake)


text:
import unittest
import testbase
import util
import gateway_mgmt
import config
import default_cluster

class TestCRC16( unittest.TestCase ):
    cluster = config.clusters[0]

    @classmethod
    def setUpClass( cls ):
        cls.conf_checker = default_cluster.initialize_starting_up_smr_before_redis( cls.cluster )
        assert cls.conf_checker != None, 'failed to initialize cluster'

    @classmethod
    def tearDownClass( cls ):
        testbase.defaultTearDown(cls)

    def setUp( self ):
        util.set_process_logfile_prefix( 'TestCRC16_%s' % self._testMethodName )
        return 0

    def tearDown( self ):
        return 0

    def test_single_thread_input( self ):
        util.print_frame()
        self.cluster = config.clusters[0]
        result = {}

        ip, port = util.get_rand_gateway( self.cluster )
        gw = gateway_mgmt.Gateway( ip )
        self.assertEquals( 0, gw.connect( ip, port ) )

        max = 5
        for idx in range( max ):
            cmd = 'set key%d 0\r\n' % (idx)
            gw.write( cmd )
            result[idx] = gw.read_until( '\r\n' )

        data_max = 65535
        for idx in range( max ):
            for cnt in range( 0, data_max ):
                gw.write( 'crc16 key%d %d\r\n' % (idx, cnt) )
                result[idx] = gw.read_until( '\r\n' )

        for idx in range( max - 1 ):
            self.assertEquals( result[idx], result[idx + 1] )


text:
<?php

namespace ZIMZIM\CPBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use ZIMZIM\CPBundle\Entity\Category;

class LoadCategoryData extends AbstractFixture implements OrderedFixtureInterface
{
    public function load(ObjectManager $om)
    {
        $filename = 'category_default.gif';

        $zimzim = new Category();
        $zimzim->setName('ZIMZIM HOME');
        $zimzim->setPath($filename);
        $om->persist($zimzim);
        $this->addReference('ZIMZIM-HOME', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('Un peu');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('ZIMZIM-HOME'));
        $om->persist($zimzim);
        $this->addReference('Un-peu', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('Beaucoup');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('ZIMZIM-HOME'));
        $om->persist($zimzim);
        $this->addReference('Beaucoup', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('Passionnément');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('ZIMZIM-HOME'));
        $om->persist($zimzim);
        $this->addReference('Passionnément', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('A la folie');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('ZIMZIM-HOME'));
        $om->persist($zimzim);
        $this->addReference('A-la-folie', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('Pas du tout');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('ZIMZIM-HOME'));
        $om->persist($zimzim);
        $this->addReference('Pas-du-tout', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('J\'adore');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('Un-peu'));
        $om->persist($zimzim);
        $this->addReference('1adore', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('Je deteste');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('Un-peu'));
        $om->persist($zimzim);
        $this->addReference('1deteste', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('J\'adore');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('Beaucoup'));
        $om->persist($zimzim);
        $this->addReference('2adore', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('Je deteste');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('Beaucoup'));
        $om->persist($zimzim);
        $this->addReference('2deteste', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('J\'adore');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('Passionnément'));
        $om->persist($zimzim);
        $this->addReference('3adore', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('Je deteste');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('Passionnément'));
        $om->persist($zimzim);
        $this->addReference('3deteste', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('J\'adore');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('A-la-folie'));
        $om->persist($zimzim);
        $this->addReference('4adore', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('Je deteste');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('A-la-folie'));
        $om->persist($zimzim);
        $this->addReference('4deteste', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('J\'adore');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('Pas-du-tout'));
        $om->persist($zimzim);
        $this->addReference('5adore', $zimzim);

        $zimzim = new Category();
        $zimzim->setName('Je deteste');
        $zimzim->setPath($filename);
        $zimzim->setParent($this->getReference('Pas-du-tout'));
        $om->persist($zimzim);
        $this->addReference('5deteste', $zimzim);

        $om->flush();
    }

    public function getOrder()
    {
        return 2;
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Toolkit.Icons
{
    [TemplatePart(Name = "OceanEllipse", Type = typeof(Ellipse))]
    [TemplatePart(Name = "LandPath", Type = typeof(Path))]
    [TemplatePart(Name = "GlobeScale", Type = typeof(ScaleTransform))]
    public class LargeWorldGlobe : Control
    {
        Ellipse OceanEllipse;
        Path LandPath;
        Brush oceanFill;
        Brush landFill;
        ScaleTransform GlobeScale;
        double scale = 1;
        LargeWorldGlobe world;
        bool expandOnMouseOver = false;

        public LargeWorldGlobe()
        {
            this.DefaultStyleKey = typeof(LargeWorldGlobe);
        }

        /// <summary>
        /// When overridden in a derived class, is invoked whenever application code or
        /// internal processes (such as a rebuilding layout pass) call
        /// <see cref="M:System.Windows.Controls.Control.ApplyTemplate"/>.
        /// </summary>
        public override void OnApplyTemplate()
        {
            world = this;
            OceanEllipse = GetTemplateChild("OceanEllipse") as Ellipse;
            LandPath = GetTemplateChild("LandPath") as Path;
            GlobeScale = GetTemplateChild("GlobeScale") as ScaleTransform;
            if (oceanFill != null)
                OceanEllipse.Fill = oceanFill;
            if (landFill != null)
                LandPath.Fill = landFill;
            if (scale != 1)
            {
                GlobeScale.ScaleX = scale;
                world.GlobeScale.ScaleY = scale;
            }
            if (expandOnMouseOver)
            {
                world.MouseEnter += globe_MouseEnter;
                world.MouseLeave += globe_MouseLeave;
            }
        }

        public Brush OceanFill
        {
            get { return (Brush)GetValue(OceanFillProperty); }
            set { SetValue(OceanFillProperty, value); }
        }

        public static readonly DependencyProperty OceanFillProperty =
            DependencyProperty.Register("OceanFill", typeof(Brush), typeof(LargeWorldGlobe), new PropertyMetadata(new SolidColorBrush(Color.FromArgb(255, 193, 97, 57)), OnOceanFillPropertyChanged));

        private static void OnOceanFillPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {

            LargeWorldGlobe globe = d as LargeWorldGlobe;
            Brush brush = e.NewValue as Brush;
            globe.oceanFill = brush;
            if (globe.OceanEllipse != null)
                globe.OceanEllipse.Fill = brush;
        }

        public Brush LandFill
        {
            get { return (Brush)GetValue(LandFillProperty); }
            set { SetValue(LandFillProperty, value); }
        }

        public static readonly DependencyProperty LandFillProperty =
            DependencyProperty.Register("LandFill", typeof(Brush), typeof(LargeWorldGlobe), new PropertyMetadata(new SolidColorBrush(Color.FromArgb(255, 193, 97, 57)), OnLandFillPropertyChanged));

        private static void OnLandFillPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            LargeWorldGlobe globe = d as LargeWorldGlobe;
            Brush brush = e.NewValue as Brush;
            globe.landFill = brush;
            if (globe.LandPath != null)
                globe.LandPath.Fill = brush;
        }

        public bool ExpandOnMouseOver
        {
            get { return (bool)GetValue(ExpandOnMouseOverProperty); }
            set { SetValue(ExpandOnMouseOverProperty, value); }
        }

        public static readonly DependencyProperty ExpandOnMouseOverProperty =
            DependencyProperty.Register("ExpandOnMouseOver", typeof(bool), typeof(LargeWorldGlobe), new PropertyMetadata(false, OnExpandOnMouseOverChanged));

        private static void OnExpandOnMouseOverChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            LargeWorldGlobe globe = d as LargeWorldGlobe;
            object obj = e.NewValue;
            if (obj != null)
            {
                globe.MouseEnter -= globe.globe_MouseEnter;
                globe.MouseLeave -= globe.globe_MouseLeave;
                bool expand = (bool)obj;
                globe.expandOnMouseOver = expand;
                if (expand)
                {
                    globe.MouseEnter += globe.globe_MouseEnter;
                    globe.MouseLeave += globe.globe_MouseLeave;
                }
            }
        }

        void globe_MouseLeave(object sender, MouseEventArgs e)
        {
            DoubleAnimation xda = new DoubleAnimation()
            {
                To = scale,
                Duration = new Duration(TimeSpan.FromSeconds(0.5))
            };
            DoubleAnimation yda = new DoubleAnimation()
            {
                To = scale,
                Duration = new Duration(TimeSpan.FromSeconds(0.5))
            };
            Storyboard sb = new Storyboard();
            Storyboard.SetTarget(xda, world.GlobeScale);
            Storyboard.SetTargetProperty(xda, new PropertyPath(ScaleTransform.ScaleXProperty));
            Storyboard.SetTarget(yda, world.GlobeScale);
            Storyboard.SetTargetProperty(yda, new PropertyPath(ScaleTransform.ScaleYProperty));
            sb.Children.Add(xda);
            sb.Children.Add(yda);
            sb.Begin();
        }

        void globe_MouseEnter(object sender, MouseEventArgs e)
        {
            double expandScale = scale * 1.25;
            DoubleAnimation xda = new DoubleAnimation()
            {
                To = expandScale,
                Duration = new Duration(TimeSpan.FromSeconds(0.5))
            };
            DoubleAnimation yda = new DoubleAnimation()
            {
                To = expandScale,
                Duration = new Duration(TimeSpan.FromSeconds(0.5))
            };
            Storyboard sb = new Storyboard();
            Storyboard.SetTarget(xda, world.GlobeScale);
            Storyboard.SetTargetProperty(xda, new PropertyPath(ScaleTransform.ScaleXProperty));
            Storyboard.SetTarget(yda, world.GlobeScale);
            Storyboard.SetTargetProperty(yda, new PropertyPath(ScaleTransform.ScaleYProperty));
            sb.Children.Add(xda);
            sb.Children.Add(yda);
            sb.Begin();
        }

        public double Scale
        {
            get { return (double)GetValue(ScaleProperty); }
            set { SetValue(ScaleProperty, value); }
        }

        public static readonly DependencyProperty ScaleProperty =
            DependencyProperty.Register("Scale", typeof(double), typeof(LargeWorldGlobe), new PropertyMetadata(1d, OnScalePropertyChanged));

        private static void OnScalePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {

            LargeWorldGlobe globe = d as LargeWorldGlobe;
            double value = Convert.ToDouble(e.NewValue);
            globe.scale = value;
            if (globe.GlobeScale != null)
            {
                globe.GlobeScale.ScaleX = value;
                globe.GlobeScale.ScaleY = value;
            }
        }

    }
}


text:
require 'test_helper'

class SessionsControllerTest < ActionController::TestCase

  def setup
    Rails.application.routes.draw do
      resource :session

      # Temporary definition for tests
      root :to => "session#show"
    end
  end

  USER_ID = 345

  def test_create_for_authenticated
    user_mock = Object.new
    def user_mock.id
      USER_ID
    end

    User.override_authenticate(user_mock)
    get :create
    User.restore_authenticate

    assert_equal(USER_ID, session[:user_id], "session[:user_id]")
    assert_redirected_to '/'
  end

  def test_create_for_not_authenticated
    User.override_authenticate(nil)
    get :create
    User.restore_authenticate

    assert_response :success
    assert_template :new
  end

  def test_destroy
    get :destroy, {}, {:user_id => USER_ID}

    assert_nil(session[:user_id], "session[:user_id]")
    assert_redirected_to '/'
  end
end

class User
  def self.override_authenticate(result)
    @@__kuma_result__ = result
    User.instance_eval do
      alias :authenticate_orig :authenticate
      alias :authenticate      :authenticate_overriden
    end
  end
  def self.restore_authenticate
    User.instance_eval do
      alias :authenticate :authenticate_orig
    end
  end

  def self.authenticate_overriden(name, password)
    return @@__kuma_result__
  end
end


text:
<?php

namespace Sylius\Bundle\SandboxBundle\Entity;

use FOS\CommentBundle\Entity\Comment as BaseComment;
use FOS\CommentBundle\Model\SignedCommentInterface;
use Symfony\Component\Security\Core\User\UserInterface;

/**
 * Comment entity.
 *
 * @author Саша Стаменковић <umpirsky@gmail.com>
 */
class Comment extends BaseComment implements SignedCommentInterface
{
    /**
     * Thread of this comment.
     *
     * @var Thread
     */
    protected $thread;

    /**
     * Author of the comment
     *
     * @var UserInterface
     */
    protected $author;

    /**
     * Sets comment author.
     *
     * @param UserInterface $author
     */
    public function setAuthor(UserInterface $author)
    {
        $this->author = $author;
    }

    /**
     * Gets author.
     *
     * @return UserInterface
     */
    public function getAuthor()
    {
        return $this->author;
    }

    /**
     * Gets author name.
     *
     * @return string
     */
    public function getAuthorName()
    {
        if (null === $this->getAuthor()) {
            return 'Anonymous';
        }

        return $this->getAuthor()->getUsername();
    }
}


text:
<?php

require '../vendor/autoload.php';

use RBM\SqlQuery\Select;
use RBM\SqlQuery\Filter;
use RBM\SqlQuery\Renderer\MySql;

Select::setDefaultRenderer(new MySql());

function printQuery($query){
    echo $query;
    echo PHP_EOL . PHP_EOL . "===========================" . PHP_EOL;
}


text:
$(document).ready(function() {
    var LocData = [{
            "name": "The Beer Cafe",
            "location": [28.629144, 77.2176282]
        },
        {
            "name": "Monkey Bar",
            "location": [28.63154144442592, 77.2163011815591]
        },
        {
            "name": "Route 04",
            "location": [28.634879682422973, 77.22027719020844]
        },
        {
            "name": "MyBar Headquarters",
            "location": [28.63159614132705, 77.21993347329604]
        },
        {
            "name": "Farzi Cafe",
            "location": [28.632583358124705, 77.22120783667748]
        }
    ];

    var mapModel = function() {
        var self = this;
        self.search = ko.observable("");
        self.allLocations = ko.observableArray([]);
        self.markers = ko.observableArray([]);
        self.filter = ko.observable("");

        var map = mapLoad();
        if (map == null) {
            console.log("Error Loading Map!");
            return;
        }
        self.map = ko.observable(map);
        getplacesFs(self.allLocations, self.map(), self.markers);
        self.filteredArray = ko.computed(function() {
            return ko.utils.arrayFilter(self.allLocations(), function(item) {
                if (item.name.toLowerCase().indexOf(self.filter().toLowerCase()) !== -1) {
                    if (item.marker != null)
                        item.marker.setMap(map);
                } else {
                    if (item.marker)
                        item.marker.setMap(null);
                }
                return item.name.toLowerCase().indexOf(self.filter().toLowerCase()) !== -1;
            });
        }, self);

        self.clickHandler = function(data) {
            mapCenter(data, self.map(), self.markers);
        };
    };

    /*
    Taken from:
    https://developers.google.com/maps/documentation/javascript/examples/marker-animations
    */

    function animateMarker(marker) {

        if (marker.setAnimation() == null) {
            marker.setAnimation(google.maps.Animation.BOUNCE);
            setTimeout(function() {
                marker.setAnimation(null);
            }, 720);
        } else {
            marker.setAnimation(null);
        }
    }

    function mapLoad() {
        var mapsettings = {
            center: new google.maps.LatLng(28.634879682422973, 77.22027719020844),
            zoom: 15,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        return new google.maps.Map(document.getElementById('canvas-view'), mapsettings);
    }

    function getplacesFs(allLocations, map, markers) {
        var location = [];
        var locdata = [];
        for (var loc in LocData) {
            baseuUrl = 'https://api.foursquare.com/v2/venues/search'
            var foursquareUrl = baseuUrl +
                '?client_id=MKFNW4NXFI5M4D0E44ZKSL4RGD0UOGVTYZQHNMCNSNNQMQGR' +
                '&client_secret=X3QTZOQ3RWQ2BVLDG50LHMSUCFX54TCPVGCJ40RVMAEYCNKB' +
                '&m=foursquare' +
                '&v=20161507' +
                '&query=' + LocData[loc]["name"] +
                '&ll=' + LocData[loc]["location"][0] + ',' + LocData[loc]["location"][1] +
                '&intent=match';

            $.getJSON(foursquareUrl, function(data) {
                if (data.response.venues) {
                    var item = data.response.venues[0];
                    allLocations.push(item);
                    location = {
                        lat: item.location.lat,
                        lng: item.location.lng,
                        name: item.name,
                        loc: item.location.address + " " + item.location.city + ", " + item.location.state + " " + item.location.postalCode
                    };
                    locdata.push(location);
                    setMarkers(allLocations, loc, location, map, markers);
                } else {
                    console.log("Error!! Couldn't find data ");
                    return;
                }
            });
        }
    }

    /*
      Taken from:
      https://developers.google.com/maps/documentation/javascript/examples/marker-animations
      */

    function setMarkers(allLocations, loc, data, map, markers) {
        var latlng = new google.maps.LatLng(data.lat, data.lng);
        var marker = new google.maps.Marker({
            position: latlng,
            map: map,
            animation: google.maps.Animation.DROP,
            content: data.name + "<br>" + data.loc
        });
        var infoWindow = new google.maps.InfoWindow({
            content: marker.content
        });
        marker.infowindow = infoWindow;
        markers.push(marker);
        allLocations()[allLocations().length - 1].marker = marker;

        google.maps.event.addListener(marker, 'click', function() {
            for (var i = 0; i < markers().length; i++) {
                markers()[i].infowindow.close();
            }
            infoWindow.open(map, marker);
        });

        google.maps.event.addListener(marker, 'click', function() {
            animateMarker(marker);
        });

    }

    ko.applyBindings(new mapModel());
});


text:
package scalikejdbc

import surfice.entity.UnsupportedQueryFilter

package object ext {
  private val validColumnNames = """[a-zA-Z][a-zA-Z0-9_\.]*""".r.pattern

  def column(name: String) : SQLSyntax =
    if( validColumnNames.matcher(name).matches() ) new SQLSyntax(name)
    else throw UnsupportedQueryFilter(s"Invalid property name: $name")
}


text:
/**
 * generated by http://RDFReactor.semweb4j.org ($Id: CodeGenerator.java 1765 2010-02-11 09:51:13Z max.at.xam.de $) on 21.12.12 17:00
 */
package com.xmlns.foaf;

import org.ontoware.aifbcommons.collection.ClosableIterator;
import org.ontoware.rdf2go.exception.ModelRuntimeException;
import org.ontoware.rdf2go.model.Model;
import org.ontoware.rdf2go.model.node.BlankNode;
import org.ontoware.rdf2go.model.node.URI;
import org.ontoware.rdf2go.model.node.impl.URIImpl;
import org.ontoware.rdfreactor.runtime.Base;

/**
 * This class manages access to these properties:
 *

 *
Depicts

 *
Thumbnail

 *

 *
 * This class was generated by RDFReactor on 21.12.12 17:00
 */
public class Image extends Document {

    /**
     *
     */
    private static final long serialVersionUID = 5568006818407354092L;

    /** http://xmlns.com/foaf/0.1/Image */
    public static final URI RDFS_CLASS = new URIImpl(
	    "http://xmlns.com/foaf/0.1/Image", false);

    /** http://xmlns.com/foaf/0.1/depicts */
    public static final URI DEPICTS = new URIImpl(
	    "http://xmlns.com/foaf/0.1/depicts", false);

    /** http://xmlns.com/foaf/0.1/thumbnail */
    public static final URI THUMBNAIL = new URIImpl(
	    "http://xmlns.com/foaf/0.1/thumbnail", false);

    /**
     * All property-URIs with this class as domain. All properties of all
     * super-classes are also available.
     */
    public static final URI[] MANAGED_URIS = {
	    new URIImpl("http://xmlns.com/foaf/0.1/depicts", false),
	    new URIImpl("http://xmlns.com/foaf/0.1/thumbnail", false) };

    // protected constructors needed for inheritance

    /**
     * Returns a Java wrapper over an RDF object, identified by URI. Creating
     * two wrappers for the same instanceURI is legal.
     *
     * @param model
     *            RDF2GO Model implementation, see http://rdf2go.semweb4j.org
     * @param classURI
     *            URI of RDFS class
     * @param instanceIdentifier
     *            Resource that identifies this instance
     * @param write
     *            if true, the statement (this, rdf:type, TYPE) is written to
     *            the model
     *
     *            [Generated from RDFReactor template rule #c1]
     */
    protected Image(Model model, URI classURI,
	    org.ontoware.rdf2go.model.node.Resource instanceIdentifier,
	    boolean write) {
	super(model, classURI, instanceIdentifier, write);
    }

    // public constructors

    /**
     * Returns a Java wrapper over an RDF object, identified by URI. Creating
     * two wrappers for the same instanceURI is legal.
     *
     * @param model
     *            RDF2GO Model implementation, see http://rdf2go.ontoware.org
     * @param instanceIdentifier
     *            an RDF2Go Resource identifying this instance
     * @param write
     *            if true, the statement (this, rdf:type, TYPE) is written to
     *            the model
     *
     *            [Generated from RDFReactor template rule #c2]
     */
    public Image(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceIdentifier,
	    boolean write) {
	super(model, RDFS_CLASS, instanceIdentifier, write);
    }

    /**
     * Returns a Java wrapper over an RDF object, identified by a URI, given as
     * a String. Creating two wrappers for the same URI is legal.
     *
     * @param model
     *            RDF2GO Model implementation, see http://rdf2go.ontoware.org
     * @param uriString
     *            a URI given as a String
     * @param write
     *            if true, the statement (this, rdf:type, TYPE) is written to
     *            the model
     * @throws ModelRuntimeException
     *             if URI syntax is wrong
     *
     *             [Generated from RDFReactor template rule #c7]
     */
    public Image(Model model, String uriString, boolean write)
	    throws ModelRuntimeException {
	super(model, RDFS_CLASS, new URIImpl(uriString, false), write);
    }

    /**
     * Returns a Java wrapper over an RDF object, identified by a blank node.
     * Creating two wrappers for the same blank node is legal.
     *
     * @param model
     *            RDF2GO Model implementation, see http://rdf2go.ontoware.org
     * @param bnode
     *            BlankNode of this instance
     * @param write
     *            if true, the statement (this, rdf:type, TYPE) is written to
     *            the model
     *
     *            [Generated from RDFReactor template rule #c8]
     */
    public Image(Model model, BlankNode bnode, boolean write) {
	super(model, RDFS_CLASS, bnode, write);
    }

    /**
     * Returns a Java wrapper over an RDF object, identified by a randomly
     * generated URI. Creating two wrappers results in different URIs.
     *
     * @param model
     *            RDF2GO Model implementation, see http://rdf2go.ontoware.org
     * @param write
     *            if true, the statement (this, rdf:type, TYPE) is written to
     *            the model
     *
     *            [Generated from RDFReactor template rule #c9]
     */
    public Image(Model model, boolean write) {
	super(model, RDFS_CLASS, model.newRandomUniqueURI(), write);
    }

    // /////////////////////////////////////////////////////////////////
    // typing

    /**
     * Return an existing instance of this class in the model. No statements are
     * written.
     *
     * @param model
     *            an RDF2Go model
     * @param instanceResource
     *            an RDF2Go resource
     * @return an instance of Image or null if none existst
     *
     *         [Generated from RDFReactor template rule #class0]
     */
    public static Image getInstance(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	return Base.getInstance(model, instanceResource, Image.class);
    }

    /**
     * Create a new instance of this class in the model. That is, create the
     * statement (instanceResource, RDF.type, http://xmlns.com/foaf/0.1/Image).
     *
     * @param model
     *            an RDF2Go model
     * @param instanceResource
     *            an RDF2Go resource
     *
     *            [Generated from RDFReactor template rule #class1]
     */
    public static void createInstance(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	Base.createInstance(model, RDFS_CLASS, instanceResource);
    }

    /**
     * @param model
     *            an RDF2Go model
     * @param instanceResource
     *            an RDF2Go resource
     * @return true if instanceResource is an instance of this class in the
     *         model
     *
     *         [Generated from RDFReactor template rule #class2]
     */
    public static boolean hasInstance(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	return Base.hasInstance(model, RDFS_CLASS, instanceResource);
    }

    /**
     * @param model
     *            an RDF2Go model
     * @return all instances of this class in Model 'model' as RDF resources
     *
     *         [Generated from RDFReactor template rule #class3]
     */
    public static ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllInstances(
	    Model model) {
	return Base.getAllInstances(model, RDFS_CLASS,
		org.ontoware.rdf2go.model.node.Resource.class);
    }

    /**
     * Remove rdf:type Image from this instance. Other triples are not affected.
     * To delete more, use deleteAllProperties
     *
     * @param model
     *            an RDF2Go model
     * @param instanceResource
     *            an RDF2Go resource
     *
     *            [Generated from RDFReactor template rule #class4]
     */
    public static void deleteInstance(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	Base.deleteInstance(model, RDFS_CLASS, instanceResource);
    }

    /**
     * Delete all (this, *, *), i.e. including rdf:type
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     */
    public static void deleteAllProperties(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	Base.deleteAllProperties(model, instanceResource);
    }

    // /////////////////////////////////////////////////////////////////
    // property access methods

    /**
     * @param model
     *            an RDF2Go model
     * @param objectValue
     * @return all A's as RDF resources, that have a relation 'Depiction' to
     *         this Image instance
     *
     *         [Generated from RDFReactor template rule #getallinverse1static]
     */
    public static ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllDepictions_Inverse(
	    Model model, Object objectValue) {
	return Base.getAll_Inverse(model, Thing.DEPICTION, objectValue);
    }

    /**
     * @return all A's as RDF resources, that have a relation 'Depiction' to
     *         this Image instance
     *
     *         [Generated from RDFReactor template rule #getallinverse1dynamic]
     */
    public ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllDepictions_Inverse() {
	return Base.getAll_Inverse(this.model, Thing.DEPICTION,
		this.getResource());
    }

    /**
     * @param model
     *            an RDF2Go model
     * @param objectValue
     * @return all A's as RDF resources, that have a relation 'Image' to this
     *         Image instance
     *
     *         [Generated from RDFReactor template rule #getallinverse1static]
     */
    public static ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllImages_Inverse(
	    Model model, Object objectValue) {
	return Base.getAll_Inverse(model, Person.IMAGE, objectValue);
    }

    /**
     * @return all A's as RDF resources, that have a relation 'Image' to this
     *         Image instance
     *
     *         [Generated from RDFReactor template rule #getallinverse1dynamic]
     */
    public ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllImages_Inverse() {
	return Base
		.getAll_Inverse(this.model, Person.IMAGE, this.getResource());
    }

    /**
     * @param model
     *            an RDF2Go model
     * @param objectValue
     * @return all A's as RDF resources, that have a relation 'Thumbnail' to
     *         this Image instance
     *
     *         [Generated from RDFReactor template rule #getallinverse1static]
     */
    public static ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllThumbnails_Inverse(
	    Model model, Object objectValue) {
	return Base.getAll_Inverse(model, Image.THUMBNAIL, objectValue);
    }

    /**
     * @return all A's as RDF resources, that have a relation 'Thumbnail' to
     *         this Image instance
     *
     *         [Generated from RDFReactor template rule #getallinverse1dynamic]
     */
    public ClosableIterator<org.ontoware.rdf2go.model.node.Resource> getAllThumbnails_Inverse() {
	return Base.getAll_Inverse(this.model, Image.THUMBNAIL,
		this.getResource());
    }

    /**
     * Check if org.ontoware.rdfreactor.generator.java.JProperty@30c0ef9 has at
     * least one value set
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @return true if this property has at least one value
     *
     *         [Generated from RDFReactor template rule #get0has-static]
     */
    public static boolean hasDepicts(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	return Base.has(model, instanceResource, DEPICTS);
    }

    /**
     * Check if org.ontoware.rdfreactor.generator.java.JProperty@30c0ef9 has at
     * least one value set
     *
     * @return true if this property has at least one value
     *
     *         [Generated from RDFReactor template rule #get0has-dynamic]
     */
    public boolean hasDepicts() {
	return Base.has(this.model, this.getResource(), DEPICTS);
    }

    /**
     * Check if org.ontoware.rdfreactor.generator.java.JProperty@30c0ef9 has the
     * given value (maybe among other values).
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be checked
     * @return true if this property contains (maybe among other) the given
     *         value
     *
     *         [Generated from RDFReactor template rule #get0has-value-static]
     */
    public static boolean hasDepicts(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    org.ontoware.rdf2go.model.node.Node value) {
	return Base.hasValue(model, instanceResource, DEPICTS, value);
    }

    /**
     * Check if org.ontoware.rdfreactor.generator.java.JProperty@30c0ef9 has the
     * given value (maybe among other values).
     *
     * @param value
     *            the value to be checked
     * @return true if this property contains (maybe among other) the given
     *         value
     *
     *         [Generated from RDFReactor template rule #get0has-value-dynamic]
     */
    public boolean hasDepicts(org.ontoware.rdf2go.model.node.Node value) {
	return Base.hasValue(this.model, this.getResource(), DEPICTS, value);
    }

    /**
     * Get all values of property Depicts as an Iterator over RDF2Go nodes
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @return a ClosableIterator of RDF2Go Nodes
     *
     *         [Generated from RDFReactor template rule #get7static]
     */
    public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllDepicts_asNode(
	    Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	return Base.getAll_asNode(model, instanceResource, DEPICTS);
    }

    /**
     * Get all values of property Depicts as an Iterator over RDF2Go nodes
     *
     * @return a ClosableIterator of RDF2Go Nodes
     *
     *         [Generated from RDFReactor template rule #get8dynamic]
     */
    public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllDepicts_asNode() {
	return Base.getAll_asNode(this.model, this.getResource(), DEPICTS);
    }

    /**
     * Get all values of property Depicts * @param model an RDF2Go model
     *
     * @param resource
     *            an RDF2Go resource
     * @return a ClosableIterator of $type
     *
     *         [Generated from RDFReactor template rule #get11static]
     */
    public static ClosableIterator<org.ontoware.rdfreactor.schema.owl.OwlThing> getAllDepicts(
	    Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	return Base.getAll(model, instanceResource, DEPICTS,
		org.ontoware.rdfreactor.schema.owl.OwlThing.class);
    }

    /**
     * Get all values of property Depicts * @return a ClosableIterator of $type
     *
     * [Generated from RDFReactor template rule #get12dynamic]
     */
    public ClosableIterator<org.ontoware.rdfreactor.schema.owl.OwlThing> getAllDepicts() {
	return Base.getAll(this.model, this.getResource(), DEPICTS,
		org.ontoware.rdfreactor.schema.owl.OwlThing.class);
    }

    /**
     * Get all values of property Depicts * @return a ClosableIterator of $type
     *
     * [Generated from RDFReactor template rule #get12dynamic]
     */
    public org.ontoware.rdfreactor.schema.owl.OwlThing getDepicts() {
	return Base.getAll_as(this.model, this.getResource(), DEPICTS,
		org.ontoware.rdfreactor.schema.owl.OwlThing.class).firstValue();
    }

    /**
     * Adds a value to property Depicts as an RDF2Go node
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be added
     *
     *            [Generated from RDFReactor template rule #add1static]
     */
    public static void addDepicts(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    org.ontoware.rdf2go.model.node.Node value) {
	Base.add(model, instanceResource, DEPICTS, value);
    }

    /**
     * Adds a value to property Depicts as an RDF2Go node
     *
     * @param value
     *            the value to be added
     *
     *            [Generated from RDFReactor template rule #add1dynamic]
     */
    public void addDepicts(org.ontoware.rdf2go.model.node.Node value) {
	Base.add(this.model, this.getResource(), DEPICTS, value);
    }

    /**
     * Adds a value to property Depicts from an instance of
     * org.ontoware.rdfreactor.schema.owl.OwlThing
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     *
     *            [Generated from RDFReactor template rule #add3static]
     */
    public static void addDepicts(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    org.ontoware.rdfreactor.schema.owl.OwlThing value) {
	Base.add(model, instanceResource, DEPICTS, value);
    }

    /**
     * Adds a value to property Depicts from an instance of
     * org.ontoware.rdfreactor.schema.owl.OwlThing
     *
     * [Generated from RDFReactor template rule #add4dynamic]
     */
    public void addDepicts(org.ontoware.rdfreactor.schema.owl.OwlThing value) {
	Base.add(this.model, this.getResource(), DEPICTS, value);
    }

    /**
     * Sets a value of property Depicts from an RDF2Go node. First, all existing
     * values are removed, then this value is added. Cardinality constraints are
     * not checked, but this method exists only for properties with no
     * minCardinality or minCardinality == 1.
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be set
     *
     *            [Generated from RDFReactor template rule #set1static]
     */
    public static void setDepicts(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    org.ontoware.rdf2go.model.node.Node value) {
	Base.set(model, instanceResource, DEPICTS, value);
    }

    /**
     * Sets a value of property Depicts from an RDF2Go node. First, all existing
     * values are removed, then this value is added. Cardinality constraints are
     * not checked, but this method exists only for properties with no
     * minCardinality or minCardinality == 1.
     *
     * @param value
     *            the value to be added
     *
     *            [Generated from RDFReactor template rule #set1dynamic]
     */
    public void setDepicts(org.ontoware.rdf2go.model.node.Node value) {
	Base.set(this.model, this.getResource(), DEPICTS, value);
    }

    /**
     * Sets a value of property Depicts from an instance of
     * org.ontoware.rdfreactor.schema.owl.OwlThing First, all existing values
     * are removed, then this value is added. Cardinality constraints are not
     * checked, but this method exists only for properties with no
     * minCardinality or minCardinality == 1.
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be added
     *
     *            [Generated from RDFReactor template rule #set3static]
     */
    public static void setDepicts(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    org.ontoware.rdfreactor.schema.owl.OwlThing value) {
	Base.set(model, instanceResource, DEPICTS, value);
    }

    /**
     * Sets a value of property Depicts from an instance of
     * org.ontoware.rdfreactor.schema.owl.OwlThing First, all existing values
     * are removed, then this value is added. Cardinality constraints are not
     * checked, but this method exists only for properties with no
     * minCardinality or minCardinality == 1.
     *
     * @param value
     *            the value to be added
     *
     *            [Generated from RDFReactor template rule #set4dynamic]
     */
    public void setDepicts(org.ontoware.rdfreactor.schema.owl.OwlThing value) {
	Base.set(this.model, this.getResource(), DEPICTS, value);
    }

    /**
     * Removes a value of property Depicts as an RDF2Go node
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be removed
     *
     *            [Generated from RDFReactor template rule #remove1static]
     */
    public static void removeDepicts(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    org.ontoware.rdf2go.model.node.Node value) {
	Base.remove(model, instanceResource, DEPICTS, value);
    }

    /**
     * Removes a value of property Depicts as an RDF2Go node
     *
     * @param value
     *            the value to be removed
     *
     *            [Generated from RDFReactor template rule #remove1dynamic]
     */
    public void removeDepicts(org.ontoware.rdf2go.model.node.Node value) {
	Base.remove(this.model, this.getResource(), DEPICTS, value);
    }

    /**
     * Removes a value of property Depicts given as an instance of
     * org.ontoware.rdfreactor.schema.owl.OwlThing
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be removed
     *
     *            [Generated from RDFReactor template rule #remove3static]
     */
    public static void removeDepicts(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    org.ontoware.rdfreactor.schema.owl.OwlThing value) {
	Base.remove(model, instanceResource, DEPICTS, value);
    }

    /**
     * Removes a value of property Depicts given as an instance of
     * org.ontoware.rdfreactor.schema.owl.OwlThing
     *
     * @param value
     *            the value to be removed
     *
     *            [Generated from RDFReactor template rule #remove4dynamic]
     */
    public void removeDepicts(org.ontoware.rdfreactor.schema.owl.OwlThing value) {
	Base.remove(this.model, this.getResource(), DEPICTS, value);
    }

    /**
     * Removes all values of property Depicts * @param model an RDF2Go model
     *
     * @param resource
     *            an RDF2Go resource
     *
     *            [Generated from RDFReactor template rule #removeall1static]
     */
    public static void removeAllDepicts(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	Base.removeAll(model, instanceResource, DEPICTS);
    }

    /**
     * Removes all values of property Depicts * [Generated from RDFReactor
     * template rule #removeall1dynamic]
     */
    public void removeAllDepicts() {
	Base.removeAll(this.model, this.getResource(), DEPICTS);
    }

    /**
     * Check if org.ontoware.rdfreactor.generator.java.JProperty@1ee1f114 has at
     * least one value set
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @return true if this property has at least one value
     *
     *         [Generated from RDFReactor template rule #get0has-static]
     */
    public static boolean hasThumbnails(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	return Base.has(model, instanceResource, THUMBNAIL);
    }

    /**
     * Check if org.ontoware.rdfreactor.generator.java.JProperty@1ee1f114 has at
     * least one value set
     *
     * @return true if this property has at least one value
     *
     *         [Generated from RDFReactor template rule #get0has-dynamic]
     */
    public boolean hasThumbnails() {
	return Base.has(this.model, this.getResource(), THUMBNAIL);
    }

    /**
     * Check if org.ontoware.rdfreactor.generator.java.JProperty@1ee1f114 has
     * the given value (maybe among other values).
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be checked
     * @return true if this property contains (maybe among other) the given
     *         value
     *
     *         [Generated from RDFReactor template rule #get0has-value-static]
     */
    public static boolean hasThumbnail(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    org.ontoware.rdf2go.model.node.Node value) {
	return Base.hasValue(model, instanceResource, THUMBNAIL, value);
    }

    /**
     * Check if org.ontoware.rdfreactor.generator.java.JProperty@1ee1f114 has
     * the given value (maybe among other values).
     *
     * @param value
     *            the value to be checked
     * @return true if this property contains (maybe among other) the given
     *         value
     *
     *         [Generated from RDFReactor template rule #get0has-value-dynamic]
     */
    public boolean hasThumbnail(org.ontoware.rdf2go.model.node.Node value) {
	return Base.hasValue(this.model, this.getResource(), THUMBNAIL, value);
    }

    /**
     * Get all values of property Thumbnail as an Iterator over RDF2Go nodes
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @return a ClosableIterator of RDF2Go Nodes
     *
     *         [Generated from RDFReactor template rule #get7static]
     */
    public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllThumbnails_asNode(
	    Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	return Base.getAll_asNode(model, instanceResource, THUMBNAIL);
    }

    /**
     * Get all values of property Thumbnail as an Iterator over RDF2Go nodes
     *
     * @return a ClosableIterator of RDF2Go Nodes
     *
     *         [Generated from RDFReactor template rule #get8dynamic]
     */
    public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllThumbnails_asNode() {
	return Base.getAll_asNode(this.model, this.getResource(), THUMBNAIL);
    }

    /**
     * Get all values of property Thumbnail * @param model an RDF2Go model
     *
     * @param resource
     *            an RDF2Go resource
     * @return a ClosableIterator of $type
     *
     *         [Generated from RDFReactor template rule #get11static]
     */
    public static ClosableIterator<Image> getAllThumbnails(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	return Base.getAll(model, instanceResource, THUMBNAIL, Image.class);
    }

    /**
     * Get all values of property Thumbnail * @return a ClosableIterator of
     * $type
     *
     * [Generated from RDFReactor template rule #get12dynamic]
     */
    public ClosableIterator<Image> getAllThumbnails() {
	return Base.getAll(this.model, this.getResource(), THUMBNAIL,
		Image.class);
    }

    /**
     * Get all values of property Thumbnail * @return a ClosableIterator of
     * $type
     *
     * [Generated from RDFReactor template rule #get12dynamic]
     */
    public Image getThumbnail() {
	return Base.getAll_as(this.model, this.getResource(), THUMBNAIL,
		Image.class).firstValue();
    }

    /**
     * Adds a value to property Thumbnail as an RDF2Go node
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be added
     *
     *            [Generated from RDFReactor template rule #add1static]
     */
    public static void addThumbnail(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    org.ontoware.rdf2go.model.node.Node value) {
	Base.add(model, instanceResource, THUMBNAIL, value);
    }

    /**
     * Adds a value to property Thumbnail as an RDF2Go node
     *
     * @param value
     *            the value to be added
     *
     *            [Generated from RDFReactor template rule #add1dynamic]
     */
    public void addThumbnail(org.ontoware.rdf2go.model.node.Node value) {
	Base.add(this.model, this.getResource(), THUMBNAIL, value);
    }

    /**
     * Adds a value to property Thumbnail from an instance of Image
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     *
     *            [Generated from RDFReactor template rule #add3static]
     */
    public static void addThumbnail(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    Image value) {
	Base.add(model, instanceResource, THUMBNAIL, value);
    }

    /**
     * Adds a value to property Thumbnail from an instance of Image
     *
     * [Generated from RDFReactor template rule #add4dynamic]
     */
    public void addThumbnail(Image value) {
	Base.add(this.model, this.getResource(), THUMBNAIL, value);
    }

    /**
     * Sets a value of property Thumbnail from an RDF2Go node. First, all
     * existing values are removed, then this value is added. Cardinality
     * constraints are not checked, but this method exists only for properties
     * with no minCardinality or minCardinality == 1.
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be set
     *
     *            [Generated from RDFReactor template rule #set1static]
     */
    public static void setThumbnail(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    org.ontoware.rdf2go.model.node.Node value) {
	Base.set(model, instanceResource, THUMBNAIL, value);
    }

    /**
     * Sets a value of property Thumbnail from an RDF2Go node. First, all
     * existing values are removed, then this value is added. Cardinality
     * constraints are not checked, but this method exists only for properties
     * with no minCardinality or minCardinality == 1.
     *
     * @param value
     *            the value to be added
     *
     *            [Generated from RDFReactor template rule #set1dynamic]
     */
    public void setThumbnail(org.ontoware.rdf2go.model.node.Node value) {
	Base.set(this.model, this.getResource(), THUMBNAIL, value);
    }

    /**
     * Sets a value of property Thumbnail from an instance of Image First, all
     * existing values are removed, then this value is added. Cardinality
     * constraints are not checked, but this method exists only for properties
     * with no minCardinality or minCardinality == 1.
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be added
     *
     *            [Generated from RDFReactor template rule #set3static]
     */
    public static void setThumbnail(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    Image value) {
	Base.set(model, instanceResource, THUMBNAIL, value);
    }

    /**
     * Sets a value of property Thumbnail from an instance of Image First, all
     * existing values are removed, then this value is added. Cardinality
     * constraints are not checked, but this method exists only for properties
     * with no minCardinality or minCardinality == 1.
     *
     * @param value
     *            the value to be added
     *
     *            [Generated from RDFReactor template rule #set4dynamic]
     */
    public void setThumbnail(Image value) {
	Base.set(this.model, this.getResource(), THUMBNAIL, value);
    }

    /**
     * Removes a value of property Thumbnail as an RDF2Go node
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be removed
     *
     *            [Generated from RDFReactor template rule #remove1static]
     */
    public static void removeThumbnail(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    org.ontoware.rdf2go.model.node.Node value) {
	Base.remove(model, instanceResource, THUMBNAIL, value);
    }

    /**
     * Removes a value of property Thumbnail as an RDF2Go node
     *
     * @param value
     *            the value to be removed
     *
     *            [Generated from RDFReactor template rule #remove1dynamic]
     */
    public void removeThumbnail(org.ontoware.rdf2go.model.node.Node value) {
	Base.remove(this.model, this.getResource(), THUMBNAIL, value);
    }

    /**
     * Removes a value of property Thumbnail given as an instance of Image
     *
     * @param model
     *            an RDF2Go model
     * @param resource
     *            an RDF2Go resource
     * @param value
     *            the value to be removed
     *
     *            [Generated from RDFReactor template rule #remove3static]
     */
    public static void removeThumbnail(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource,
	    Image value) {
	Base.remove(model, instanceResource, THUMBNAIL, value);
    }

    /**
     * Removes a value of property Thumbnail given as an instance of Image
     *
     * @param value
     *            the value to be removed
     *
     *            [Generated from RDFReactor template rule #remove4dynamic]
     */
    public void removeThumbnail(Image value) {
	Base.remove(this.model, this.getResource(), THUMBNAIL, value);
    }

    /**
     * Removes all values of property Thumbnail * @param model an RDF2Go model
     *
     * @param resource
     *            an RDF2Go resource
     *
     *            [Generated from RDFReactor template rule #removeall1static]
     */
    public static void removeAllThumbnails(Model model,
	    org.ontoware.rdf2go.model.node.Resource instanceResource) {
	Base.removeAll(model, instanceResource, THUMBNAIL);
    }

    /**
     * Removes all values of property Thumbnail * [Generated from RDFReactor
     * template rule #removeall1dynamic]
     */
    public void removeAllThumbnails() {
	Base.removeAll(this.model, this.getResource(), THUMBNAIL);
    }
}


text:
require 'simplecov'
require 'codeclimate-test-reporter'

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  CodeClimate::TestReporter::Formatter
]
SimpleCov.start

require 'victor_ops/client'
require 'json'

def file_fixture(filename)
  open(File.join(File.dirname(__FILE__), 'fixtures', "#{filename.to_s}")).read
end

def file_fixture_to_json(filename)
  JSON::parse(open(File.join(File.dirname(__FILE__), 'fixtures', "#{filename.to_s}")).read)
end

def file_fixture_path(filename)
  File.join(File.dirname(__FILE__), 'fixtures', "#{filename.to_s}")
end

def open_tmp_file(filename)
  open(File.join(File.dirname(__FILE__), '..', 'tmp', "#{filename.to_s}")).read
end

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = false
  end

  # config.filter_run :focus
  # config.run_all_when_everything_filtered = true
  # config.profile_examples = 10

  config.disable_monkey_patching!

  config.warnings = false

  if config.files_to_run.one?
    config.default_formatter = 'doc'
  end

  config.order = :random
  Kernel.srand config.seed

  config.after(:suite) do
    FileUtils.rm('tmp/test.db') if File.exist? 'tmp/test.rb'
  end
end


text:
package gov.va.isaac.gui.listview;

import gov.va.isaac.AppContext;
import gov.va.isaac.config.profiles.UserProfileManager;
import gov.va.isaac.init.SystemInit;
import gov.va.isaac.interfaces.gui.ApplicationWindowI;
import gov.va.isaac.interfaces.gui.views.DockedViewI;
import java.io.File;
import javafx.application.Application;
import javafx.concurrent.Task;
import javafx.scene.Scene;
import javafx.stage.Stage;
import org.glassfish.hk2.api.Rank;
import org.jvnet.hk2.annotations.Service;

/**
 * {@link ListViewRunner}
 *
 * @author Dan Armbrust
 */
@Service
@Rank (value = -50)
public class ListViewRunner extends Application implements ApplicationWindowI
{
	Stage primaryStage_;
	/**
	 * @see javafx.application.Application#start(javafx.stage.Stage)
	 */
	@Override
	public void start(Stage primaryStage) throws Exception
	{
		primaryStage_ = primaryStage;
		ListBatchView lv = AppContext.getService(ListBatchView.class);
		primaryStage.setScene(new Scene(lv.getView(), 1024, 800));
		primaryStage.show();
	}

	public static void main(String[] args) throws Exception
	{
		Exception dataStoreLocationInitException = SystemInit.doBasicSystemInit(new File("../../isaac-pa/app/"));
		if (dataStoreLocationInitException != null)
		{
			System.err.println("Configuration of datastore path failed.  DB will not be able to start properly!  " + dataStoreLocationInitException);
			System.exit(-1);
		}
		AppContext.getService(UserProfileManager.class).configureAutomationMode(new File("profiles"));
		launch(args);
	}

	/**
	 * @see gov.va.isaac.interfaces.gui.ApplicationWindowI#getPrimaryStage()
	 */
	@Override
	public Stage getPrimaryStage()
	{
		return primaryStage_;
	}

	/**
	 * @see gov.va.isaac.interfaces.gui.ApplicationWindowI#ensureDockedViewIsVisble(gov.va.isaac.interfaces.gui.views.DockedViewI)
	 */
	@Override
	public void ensureDockedViewIsVisble(DockedViewI view)
	{

	}

	/**
	 * @see gov.va.isaac.interfaces.gui.ApplicationWindowI#browseURL(java.lang.String)
	 */
	@Override
	public void browseURL(String url)
	{
	}

	@Override
	public void addBackgroundTask(Task<?> task)
	{
	}
}


text:
package com.rs.game.player.dialogues;

public class SimpleMessage extends Dialogue {

	@Override
	public void start() {
		String[] messages = new String[parameters.length];
		for(int i = 0; i < messages.length; i++)
			messages[i] = (String) parameters[i];
		sendDialogue(messages);
	}

	@Override
	public void run(int interfaceId, int componentId) {
		end();
	}

	@Override
	public void finish() {

	}

}


text:
namespace Presentation.Views.Abstractions
{
  public interface IView<T>
  {
    void Render(T data);
  }
}


text:
package cn.itdeer.modules.admin.security.entity;

import cn.itdeer.common.base.BaseEntity;
import javax.persistence.*;
import java.util.*;
import javax.persistence.Transient;

/**
 * 说明: 权限-用户-实体类
 * 创建人:Itdeer
 * 创建时间:2017-08-16 上午10:48.
 */

@Entity
@Table(name = "authority_user")
public class User extends BaseEntity{

    @Basic
    @Column(name = "user_name",columnDefinition="varchar(50) COMMENT '用户名'")
    private String userName;//用户名称

    @Basic
    @Column(name = "password",columnDefinition="varchar(50) COMMENT '密码'")
    private String password;//用户登录密码

    @Basic
    @Column(name = "email",columnDefinition="varchar(50) COMMENT '邮箱'")
    private String email;//用户Email

    @Basic
    @Column(name = "gender",columnDefinition="varchar(10) COMMENT '性别'")
    private String gender;//性别

    @Basic
    @Column(name = "mobile",columnDefinition="varchar(11) COMMENT '手机号码'")
    private String mobile;//手机号码

    @Basic
    @Column(name = "birthday",columnDefinition="varchar(20) COMMENT '生日'")
    private String birthday;//生日

    @Basic
    @Column(name = "nick_name",columnDefinition="varchar(50) COMMENT '昵称'")
    private String nickName;//昵称

    @Basic
    @Column(name = "user_type",columnDefinition="varchar(20) COMMENT '用户类型'")
    private String userType;// 0 Admin User  : !0  Other User

    @Basic
    @Column(name = "super_user",columnDefinition="varchar(10) COMMENT '是否是超级管理员'")
    private boolean superUser;//是否是超级管理员

    @Basic
    @Column(name = "password_update_time",columnDefinition="DATETIME COMMENT '密码更新时间'")
    private Date passwordUpdateTime = new Date();// 密码更新时间

    @Basic
    @Column(name = "login",columnDefinition="varchar(10) COMMENT '是否允许登录'")
    private boolean login;//是否允许登录

    @Basic
    @Column(name = "online",columnDefinition="varchar(10) COMMENT '是否在线'")
    private boolean online;//是否在线

    @Basic
    @Column(name = "active_status",columnDefinition="varchar(10) COMMENT '激活状态'")
    private boolean activeStatus;//激活状态

    @Basic
    @Column(name = "last_login_date",columnDefinition="DATETIME COMMENT '最后登录时间'")
    private Date lastLoginDate = new Date();//最后登录时间

    @Basic
    @Column(name = "last_login_ip",columnDefinition="varchar(20) COMMENT '最后登录IP'")
    private String lastLoginIp;//最后登录IP

    @Basic
    @Column(name = "picture_id",columnDefinition="varchar(50) COMMENT '头像图片ID'")
    private String pictureId;//头像图片ID

    @Basic
    @Column(name = "picture_url",columnDefinition="varchar(100) COMMENT '头像图片地址'")
    private String pictureUrl;//头像图片地址

    @Basic
    @Column(name = "province",columnDefinition="varchar(50) COMMENT '省份'")
    private String province;//省份

    @Basic
    @Column(name = "city",columnDefinition="varchar(50) COMMENT '城市'")
    private String city;//城市

    @Basic
    @Column(name = "home_town",columnDefinition="varchar(200) COMMENT '家乡地址'")
    private String homeTown;//家乡地址

    @Basic
    @Column(name = "dept_id",columnDefinition="varchar(200) COMMENT '部门ID'")
    private String deptId;//现在住址

    @Basic
    @Column(name = "dept_name",columnDefinition="varchar(50) COMMENT '部门名称'")
    private String deptName;//现在住址

    @Basic
    @Column(name = "address",columnDefinition="varchar(200) COMMENT '现在住址'")
    private String address;//现在住址

    @Transient
    private Set<Role> roles = new HashSet<Role>();//用户角色

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public boolean isSuperUser() {
        return superUser;
    }

    public void setSuperUser(boolean superUser) {
        this.superUser = superUser;
    }

    public Date getPasswordUpdateTime() {
        return passwordUpdateTime;
    }

    public void setPasswordUpdateTime(Date passwordUpdateTime) {
        this.passwordUpdateTime = passwordUpdateTime;
    }

    public boolean isLogin() {
        return login;
    }

    public void setLogin(boolean login) {
        this.login = login;
    }

    public boolean isOnline() {
        return online;
    }

    public void setOnline(boolean online) {
        this.online = online;
    }

    public boolean isActiveStatus() {
        return activeStatus;
    }

    public void setActiveStatus(boolean activeStatus) {
        this.activeStatus = activeStatus;
    }

    public Date getLastLoginDate() {
        return lastLoginDate;
    }

    public void setLastLoginDate(Date lastLoginDate) {
        this.lastLoginDate = lastLoginDate;
    }

    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }

    public String getPictureId() {
        return pictureId;
    }

    public void setPictureId(String pictureId) {
        this.pictureId = pictureId;
    }

    public String getPictureUrl() {
        return pictureUrl;
    }

    public void setPictureUrl(String pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getHomeTown() {
        return homeTown;
    }

    public void setHomeTown(String homeTown) {
        this.homeTown = homeTown;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Set<Role> getRoles() {
        return roles;
    }

    public void setRoles(Set<Role> roles) {
        this.roles = roles;
    }
}