text:
namespace {
// Returns the baudrate that corresponds to speed (which can either be a
// baudrate enum or an int). Returns 0 if the speed is not supported.
speed_t GetBaudrateEnum(int speed) {
  // Return speed if it's already a supported baudrate enum.
  switch (speed) {
    case B4800:
    case B9600:
    case B115200:
      return speed;
  }
  // Otherwise, assume its a number of bits per second and convert to enum.
  switch (speed) {
    case 4800:
      return B4800;
    case 9600:
      return B9600;
    case 115200:
      return B115200;
  }
  // Unsupported speed.
  return 0;
}
}  // anonymous namespace

bool Reader::Init(int fd, bool own) {
  fd_ = fd;
  own_fd_ = own;
  read_pos_ = insert_pos_ = 0;
  eof_ = false;

  // Make fd non-blocking
  int flags;
  if ((flags = fcntl(fd, F_GETFL, 0)) == -1) {
    return false;
  }
  if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1) {
    return false;
  }
  return true;
}

bool Reader::Open(const char *filename) {
  int fd = open(filename, O_RDWR | FD_CLOEXEC);
  if (fd == -1) {
    return false;
  }
  return Init(fd);
}

bool Reader::OpenSerial(const char *filename, int baudrate) {
  int fd = open(filename, O_RDWR | O_NOCTTY);
  if (fd == -1) {
    return false;
  }

  termios serial_params;
  tcgetattr(fd,&serial_params);

  serial_params.c_cflag = CS8 | CLOCAL | CREAD;
  serial_params.c_iflag = 0;
  serial_params.c_oflag = 0;

  const speed_t baudrate_enum = GetBaudrateEnum(baudrate);
  cfsetispeed(&serial_params, baudrate_enum);
  cfsetospeed(&serial_params, baudrate_enum);

  // input mode to non-canonical (raw?)
  serial_params.c_lflag = 0;

  if (tcsetattr(fd, TCSANOW, &serial_params) == -1) {
    return false;
  }

  return Init(fd);
}

Reader::~Reader() {
  // Close fd only if we own it.
  if (own_fd_ && fd_ != -1) {
    close(fd_);
  }
}

Reader::ReadState Reader::PeekChar(char *buffer, long timeout) {
  ReadState state;
  if (isEmpty()) {
    state = isReadable(timeout);
    if (state != READ_OK) {
      return state;
    }
    state = RefillBuffer();
    if (state != READ_OK) {
      return state;
    }
  }
  if (!isEmpty()) {
    buffer[0] = buffer_[read_pos_];
    return READ_OK;
  }
  return READ_ERROR;
}

Reader::ReadState Reader::ReadChar(char *buffer, long timeout) {
  ReadState state = PeekChar(buffer, timeout);
  if (state == READ_OK)
    read_pos_++;
  return state;
}

Reader::ReadState Reader::ReadLine(char *buffer, long size, long timeout,
                                   char separator) {
  StopWatch timer;
  while (true) {
    int offset;
    if (!isEmpty() && (offset = FindChar(separator)) != -1) {
      if (offset >= size) {
        return READ_OVERFLOW;
      }
      // copy line without trailing separator
      memcpy(buffer, buffer_ + read_pos_, offset);
      buffer[offset] = '\0'; // terminate string (replacing separator)
      if (eof_) {
        read_pos_ = insert_pos_ = 0;
      } else {
        read_pos_ += (offset + 1);
      }
      return READ_OK;
    }
    ReadState status = RefillBuffer();
    switch (status) {
      case READ_ERROR:
        return READ_ERROR;
      case READ_OVERFLOW:
        return READ_OVERFLOW;
      case READ_EOF:
        // Only return EOF, if buffer is flushed
        if (isEmpty()) {
          return READ_EOF;
        }
        break;
      case READ_TIMEOUT: // Means no data could be read without blocking
        {
          int time_left = timeout - timer.Elapsed();
          if (time_left <= 0) {
            return READ_TIMEOUT;
          }
          ReadState wait_state = isReadable(time_left);
          if (wait_state != READ_OK) {
            return wait_state;
          }
        }
        break;
      case READ_OK:
        break;
    }
  }
}

bool Reader::isFull() const {
  return (insert_pos_ - read_pos_) == sizeof(buffer_);
}

bool Reader::isEmpty() const {
  return read_pos_ == insert_pos_;
}

int Reader::FindChar(const char c) const {
  for (int i = 0; (read_pos_ + i) < insert_pos_; i++ ) {
    if (buffer_[read_pos_ + i] == c) {
      return i;
    }
  }
  if (eof_) {
    return insert_pos_ - read_pos_;
  }
  return -1;
}

Reader::ReadState Reader::isReadable(long timeout) const {
  pollfd poll_request;

  poll_request.fd = fd_;
  poll_request.events = POLLIN;

  int ret = poll(&poll_request, 1, timeout);
  // Since we have only one fd, we know from the return code
  // if we can read or not or there was an error.
  switch (ret) {
    case 0:
      return READ_TIMEOUT;
    case 1:
      return READ_OK;
    default:
      // Typically ret == -1 and errno set to a particular error code
      // This would also happen if reader is not initialized and
      // (fd == -1)
      return READ_ERROR;
  }
}

Reader::ReadState Reader::RefillBuffer() {
  // Before reading, compact the buffer again
  if (isEmpty()) {
    read_pos_ = 0;
    insert_pos_ = 0;
  } else if (isFull()) {
    return READ_OVERFLOW;
  } else if (read_pos_ > 0) {
    int size = insert_pos_ - read_pos_;
    memmove(buffer_, buffer_ + read_pos_, size);
    read_pos_ = 0;
    insert_pos_ = size;
  }

  // At this point buffer is left justified and has some
  // free space for reading data.
  ssize_t read_size = read(fd_, buffer_ + insert_pos_,
                           sizeof(buffer_) - insert_pos_);

  if (read_size == -1) {
    // No data is a special kind of error(s)
    if (errno == EAGAIN || errno == EWOULDBLOCK) {
      return READ_TIMEOUT;
    } else {
      return READ_ERROR;
    }
  } else if (read_size == 0) {
    eof_ = true;
    return READ_EOF;
  } else {
    insert_pos_ += read_size;
    return READ_OK;
  }
}


text:
For more information see our
[DC/OS Getting Started Guide](https://linkerd.io/getting-started/dcos/).

## Deploy webapp

```bash
dcos marathon app add webapp.json
```

## Deploy linkerd

Note the `linkerd-dcos.json` files assume 4 nodes. Modify this to equal the
total number of public+private nodes in your cluster.

Multiple linkerd configurations are described below. Pick the one that's most
appropriate for your setup. When testing configurations, be sure to set the
`PUBLIC_NODE` env variable to the external address of the public node in your
cluster.

### linkerd simple proxy

To deploy the most basic configuration, with linkerd as a proxy running on port
4140 for inbound requests, run:

```bash
dcos marathon app add simple-proxy/linkerd-dcos.json
```

Test this configuration with:

```bash
$ http_proxy=$PUBLIC_NODE:4140 curl -s http://webapp/hello
Hello world
```

### linkerd ingress configuration

To deploy linkerd with an ingress router running on port 4142 and an internal
router running on port 4140, run:

```bash
dcos marathon app add ingress/linkerd-dcos.json
```

Test this configuration with:

```bash
$ curl $PUBLIC_NODE:4242/hello
Hello world
```

### linkerd in linker-to-linker mode

To deploy linkerd in linker-to-linker mode, with outgoing traffic served on a
router running on port 4140, and incoming traffic served on a router running on
port 4141, run:

```bash
dcos marathon app add linker-to-linker/linkerd-dcos.json
```

Test this configuration with:

```bash
$ http_proxy=$PUBLIC_NODE:4140 curl -s http://webapp/hello
Hello world
```

### linkerd with namerd

#### namerd

Start by deploying namerd:

```bash
dcos marathon app add namerd/namerd-dcos.json
```

Test the namerd configuration with:

```bash
$ curl $PUBLIC_NODE:4180/api/1/dtabs/default
[{"prefix":"/marathonId","dst":"/#/io.l5d.marathon"},{"prefix":"/svc","dst":"/$/io.buoyant.http.domainToPathPfx/marathonId"}]
```

#### linkerd

Next deploy linkerd configured to talk to namerd when routing requests:

```bash
dcos marathon app add linkerd-with-namerd/linkerd-dcos.json
```

Test this configuration with:

```bash
$ http_proxy=$PUBLIC_NODE:4140 curl -s http://webapp/hello
Hello world
```

### linkerd with namerd in linker-to-linker mode

Deploy namerd as described in the previous section. Then deploy linkerd in
linker-to-linker mode, configured to talk to namerd when routing requests:

```bash
dcos marathon app add linker-to-linker-with-namerd/linkerd-dcos.json
```

Test this configuration with:

```bash
$ http_proxy=$PUBLIC_NODE:4140 curl -s http://webapp/hello
Hello world
```

### Application Groups

Marathon supports an "Application Group" concept, where applications are
deployed and named using a hierarchical path-based naming structure. Because the
linkerd config examples documented here all use the `domainToPathPfx` rewriting
namer, marathon applications within a group are routed by reversing the group
name into a domain-like name. For example, `webgroup/webapp-a/webapp-a1` becomes `webapp-a1.webapp-a.webgroup`:

```bash
dcos marathon group add webgroup.json
```

```bash
http_proxy=$PUBLIC_NODE:4140 curl webapp-a1.webapp-a.webgroup/hello
Hello world
```

redpajama_set_name: RedPajamaGithub


text:
namespace Microsoft.Azure.Management.Logic
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;
    using System.Collections;
    using System.Collections.Generic;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// WorkflowRunOperations operations.
    /// </summary>
    public partial interface IWorkflowRunOperations
    {
        /// <summary>
        /// Gets an operation for a run.
        /// </summary>
        /// <param name='resourceGroupName'>
        /// The resource group name.
        /// </param>
        /// <param name='workflowName'>
        /// The workflow name.
        /// </param>
        /// <param name='runName'>
        /// The workflow run name.
        /// </param>
        /// <param name='operationId'>
        /// The workflow operation id.
        /// </param>
        /// <param name='customHeaders'>
        /// The headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="Microsoft.Rest.SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        Task<AzureOperationResponse<WorkflowRun>> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string operationId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
    }
}


text:
<!DOCTYPE html>

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
  <title>Guillermo Cebollero</title>

  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link href="../css/font-awesome.min.css" rel="Stylesheet">
  <link href="../css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection"/>
  <link href="../css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
  <link href="../css/widget.css" type="text/css" rel="stylesheet" />

      CV Online

file_downloadDescargar en PDF

translate Change to English version

          Guillermo Cebollero
          guillermocebollero@gmail.com

portraitSobre mí

languageIdiomas

attach_fileHabilidades

contact_mailContacto

shareRedes sociales

file_downloadDescargar en PDF

translate Change to English version

errorPágina 404

      menu

  publish

            Guillermo

Sobre mí

        Actualmente soy estudiante a tiempo completo del grado de ingeniería informática en la universidad de Zaragoza.

        Tengo especial interés por los sistemas Cloud, Internet Of Things y la ciberseguridad, así como explorar nuevos entornos y retos.

perm_identity
Información Personal

account_circleGuillermo Cebollero Abadías.

event26 Julio 1993. Huesca, España.

placeJorge Manrique 18 1D. Zaragoza, España.

assignment
Educación

                  today
                  book
                  bookmark_border
                  place

                  Hasta 2017	Grado de
Ingeniería Informática	Especialidad de
Tecnologías de la Información	Universidad de Zaragoza

                  2011-2012	Grado de
Ingeniería Mecánica	Sin finalizar	Universidad de Zaragoza

                  2009-2011	Bachillerato	Modalidad de
Ciencias y Tecnología	Colegio Altoaragón
Huesca

work
Experiencia

Actividades universitarias

                    today
                    business

                    2016-2017	Delegado titulación
Ing. Informática

                    2012-2013 y 2015	Miembro de
Junta de Escuela

                    2012-2013 y 2015	Miembro de
Claustro universitario

                    2012-2013 y 2017	Miembro de
Delegación EINA

                    2011-2012
Delegado de clase

settings
Otras actividades

                    today
                    folder
                    folder_special
                    place

                    Abril
2016	NASA Space
Apps Challenge	Participante	Edificio Etopía
Zaragoza

                    Abril
2016	Arduino Day	Charlas y talleres	Edificio Etopía
Zaragoza

                    Octubre
2015	Intel IoT
Hackathlon	Participante	Campus río Ebro
Zaragoza

star
Otros datos

directions_carPermiso de conducción europeo tipo B.

              language
              Idiomas

Español

Nativo

Inglés

Intermedio

Pendiente de certificación Cambridge B2

              attach_file Habilidades

La escala va desde 1 (Conocimiento básico) hasta 5 (Experto).

                Javacode

1

2

3

4

5

                Mas info

                Javaclose

Desarrollo de aplicaciones medianas y grandes. Uso de wrappers, estructuras de datos, ficheros, conectividad socket.

                Androidcode

1

2

3

4

5

                Mas info

                Androidclose

Desarrollo de aplicaciones, conectividad con servidor, uso de periféricos, tecnología NFC.

                Administración Linuxcode

1

2

3

4

5

                Mas info

                Administración Linuxclose

Configuración, administración e implementación de políticas de seguridad en sistemas Linux. Entornos cloud.

addMas

                      HTML5+CSS+JScode

1

2

3

4

5

                      Mas info

                      HTML5+CSS+JSclose

Experiencia en proyecto pequeños y medios. Uso de frameworks, sesiones, responsive UI, etc.

                      Pythoncode

1

2

3

4

5

                      Mas info

                      Pythonclose

Experiencia en proyecto pequeños. Uso de estructuras de datos, manejo de ficheros y comunicación vía socket.

                      C++code

1

2

3

4

5

                      Mas info

                      C++close

Experiencia en proyecto pequeños y medios. Uso de estructuras de datos y manejo de ficheros.

              contact_mail Contacto

Rellene el formulario y le responderé lo antes posible.

Formulario no disponible. Disculpe las molestias

          <form class="col s10 offset-s2">

                <input id="first_name" type="text" class="validate">
                Nombre

                <input id="last_name" type="text" class="validate">
                Apellidos

                <input id="email" type="email" class="validate">
                Email

                  <input disabled value="Contacto vía web" id="disabled" type="text" class="validate">
                  Asunto

                  <textarea id="body" class="materialize-textarea"></textarea>
                  Mensaje

          </form>

            <button class="btn waves-effect waves-light indigo" type="submit" name="action">Enviarsend</button>

              share Redes sociales

Twitter Sígueme

            Tweet

LinkedIn

Guillermo Cebollero Abadias

Github

Agradecimientos

 Página web desarrollada con MaterializeCSS y fotos de @onlyyouqj

          Última modificación: DATE

Política de cookies

Política de cookies

Cookie es un fichero que se descarga en su ordenador al acceder a determinadas páginas web. Las cookies permiten a una página web, entre otras cosas, almacenar y recuperar información sobre los hábitos de navegación de un usuario o de su equipo y, dependiendo de la información que contengan y de la forma en que utilice su equipo, pueden utilizarse para reconocer al usuario.. El navegador del usuario memoriza cookies en el disco duro solamente durante la sesión actual ocupando un espacio de memoria mínimo y no perjudicando al ordenador. Las cookies no contienen ninguna clase de información personal específica, y la mayoría de las mismas se borran del disco duro al finalizar la sesión de navegador (las denominadas cookies de sesión).

La mayoría de los navegadores aceptan como estándar a las cookies y, con independencia de las mismas, permiten o impiden en los ajustes de seguridad las cookies temporales o memorizadas.

¿Qué tipos de cookies utiliza esta página web?

 Cookies técnicas: Son aquéllas que permiten al usuario la navegación a través de una página web, plataforma o aplicación y la utilización de las diferentes opciones o servicios que en ella existan como, por ejemplo, controlar el tráfico y la comunicación de datos, identificar la sesión, acceder a partes de acceso restringido, recordar los elementos que integran un pedido, realizar el proceso de compra de un pedido, realizar la solicitud de inscripción o participación en un evento, utilizar elementos de seguridad durante la navegación, almacenar contenidos para la difusión de videos o sonido o compartir contenidos a través de redes sociales.

 Cookies de personalización: Son aquéllas que permiten al usuario acceder al servicio con algunas características de carácter general predefinidas en función de una serie de criterios en el terminal del usuario como por ejemplo serian el idioma, el tipo de navegador a través del cual accede al servicio, la configuración regional desde donde accede al servicio, etc.

 Cookies de análisis: Son aquéllas que bien tratadas por nosotros o por terceros, nos permiten cuantificar el número de usuarios y así realizar la medición y análisis estadístico de la utilización que hacen los usuarios del servicio ofertado. Para ello se analiza su navegación en nuestra página web con el fin de mejorar la oferta de productos o servicios que le ofrecemos.

 Cookies de terceros: La Web de guillermocebollero.es puede utilizar servicios de terceros que, por cuenta de guillermocebollero.es, recopilaran información con fines estadísticos, de uso del Site por parte del usuario y para la prestacion de otros servicios relacionados con la actividad del Website y otros servicios de Internet.

              Aceptar


text:
const cursor = require('../utils/cursor')

function allocateLines () {
  process.stdout.write('\n')
}

function progressBarPlugin (sh) {
  const defaults = {
    showPercents: true,
    clearOnPause: true,
    width: 20,
    emptySymbol: sh.colors.gray('░'),
    fillSymbol: '▓'
  }

  const api = {
    progressBar: progressBar
  }

  return api

  function progressBar (opts) {
    opts = Object.assign({}, defaults, opts || {})
    let progress = 0
    let resumed = false

    const api = {
      set: set,
      resume: resume,
      pause: pause
    }

    return api

    function pause () {
      if (opts.clearOnPause && resumed) {
        cursor.prevLine()
        cursor.clearLine()
      }
      resumed = false
    }

    function resume () {
      allocateLines()
      resumed = true
      render()
    }

    function set (newProgress, message) {
      progress = Math.max(0, Math.min(1, newProgress))
      render(message)
      if (progress >= 1 && typeof opts.onComplete === 'function') {
        opts.onComplete(api)
      }
      return api
    }

    function render (message) {
      if (!resumed) return
      message = message ? ' - ' + sh.colors.gray(message) : ''
      let bar = ''
      let filledChars = Math.floor(progress * opts.width)
      let percents = opts.showPercents
        ? sh.colors.gray(' ' + Math.floor(progress * 100) + '%')
        : ''
      for (let i = 0; i < opts.width; i++) {
        bar += (i <= filledChars)
          ? opts.fillSymbol
          : opts.emptySymbol
      }
      const out = bar + percents + message
      cursor.prevLine()
      cursor.clearLine()
      process.stdout.write(out)
      cursor.nextLine()
    }
  }
}

module.exports = progressBarPlugin


text:
using System.Collections.Generic;
using System.Data;
using InformationManger;

namespace SchemaMaker
{

    public  class ProjectStructure
    {
        public  string Name { get; set; }
        public string connectionString { get; set; }
        public string DatabaseName { get; set; }
        public List<Table>  TableList { get; set; }
        public string path { get; set; }

        public ProjectStructure()
        {
            TableList=new List<Table>();
        }

    }

}


text:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="48dp"
    android:height="48dp"
    android:viewportWidth="48"
    android:viewportHeight="48"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="@android:color/white"
      android:pathData="M2,38V10H46V38ZM9.5,35H38.5V13H9.5Z"/>
</vector>


text:
import os
import defaults
import logic.defaultLogic

FMT = '.jpg'
USE = defaults.PHOTO_BASE["TWO_INCH"]
USES = [ defaults.PHOTO_BASE["ONE_INCH"],
         defaults.PHOTO_BASE["TWO_INCH"],
         defaults.PHOTO_BASE["SMALL_TWO_INCH"],
         defaults.PHOTO_BASE["ID_CARD"],
         defaults.PHOTO_BASE["NATIONAL_STUDENT"]]
PHOTO = os.path.join(
            os.path.dirname(os.path.abspath(__file__)),
            "../photo"
        )

PRINT_USES = [ defaults.PRINT_BASE["THREE_R"],
               defaults.PRINT_BASE["FOUR_R"],
               defaults.PRINT_BASE["FIVE_R"],
               defaults.PRINT_BASE["SIX_R"],
               defaults.PRINT_BASE["EIGHT_R"] ]
PRINT = os.path.join(
            os.path.dirname(os.path.abspath(__file__)),
            "../print"
        )

PRINTER = "printer_name"

RAW = os.path.join(
            os.path.dirname(os.path.abspath(__file__)),
            "../raw"
        )

ROT = False#True

SAVE = logic.defaultLogic.PhotoLogic
FILE = os.path.join(
            os.path.dirname(os.path.abspath(__file__)),
            "../students.csv"
        )

FULLSCREEN = False#True
NOEXIT = False#True

FONTSIZE = 48
LINESIZE = 120
LEFTMAR = 30
TOPLOC = 90


text:
Event handling can be done in many different ways, in this example I will be showing two types of event handling when a button is clicked.

* `ReadingTextField_5_1` - example for reading text field and printing on console.
* `ReadingTextField_5_2` - example for reading text field and displaying on gui.


text:
package de.tblsoft.solr.logic;

import de.tblsoft.solr.parser.SolrXmlParser;
import de.tblsoft.solr.util.IOUtils;
import de.tblsoft.solr.util.OutputStreamStringBuilder;

import java.io.OutputStream;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

/**
 * Unit test for simple App.
 */
public class SpecialCharacterExtractor extends SolrXmlParser {

    private Map<String, String> dictionary = new HashMap<String, String>();

    private Set<String> currentChars = new HashSet<String>();

    private String currentArticleCode;

    private String outputFileName;

    private String idField = "articleCode_exact";

    private String allowedChars = "[a-zA-Z0-9-]+";

    private int maxItems = 50;

    public void extractSpecialCharacters() throws Exception {
        parse();
        OutputStream out = IOUtils.getOutputStream(outputFileName);
        OutputStreamStringBuilder dict = new OutputStreamStringBuilder(out);
        for(Entry<String, String> entry: dictionary.entrySet()) {
            dict.append(entry.getKey());
            dict.append(" : ");
            if(entry.getValue().length() > maxItems) {
                dict.append(entry.getValue().substring(0, maxItems));
            } else {
                dict.append(entry.getValue());
            }
            dict.append("\n");
        }

        out.close();
        //Files.write(dict, new File("special-char-dict.txt"),Charset.forName("UTF-8"));

    }

    @Override
    public void field(String name, String value) {
        if(idField.equals(name)) {
            currentArticleCode = value;
        }

        value = value.replaceAll(allowedChars, "");

        for (int i = 0; i < value.length(); i++) {
            String valueChar = String.valueOf(value.charAt(i));
            currentChars.add(valueChar);

        }
    }

    @Override
    public void endDocument() {
        for(String value: currentChars) {
            String articleCodes = dictionary.get(value);
            if(articleCodes==null) {
                articleCodes = currentArticleCode;
            } else {
                articleCodes = articleCodes + "," + currentArticleCode;
            }
            dictionary.put(value, articleCodes);
        }
        currentChars = new HashSet<String>();
        this.currentArticleCode = null;
        super.endDocument();
    }

    public void setOutputFileName(String outputFileName) {
        this.outputFileName = outputFileName;
    }

    public void setMaxItems(int maxItems) {
        this.maxItems = maxItems;
    }

    public void setAllowedChars(String allowedChars) {
        this.allowedChars = allowedChars;
    }

    public void setIdField(String idField) {
        this.idField = idField;
    }
}


text:
import os
import time
import json
import traceback
import uno

from bookmarks.bookmark import BookmarksManagerBase, \
    BaseItem, Item, Separator, Container, TagContainer

import sys
is_python3 = sys.version_info[0] >= 3
del sys

class BookmarksManager(BookmarksManagerBase):
    """ Keeps JSON based bookmarks. """

    FILE_NAME = "bookmarks_%s.json"
    FILE_BASE_URL = "%%s/%s" % FILE_NAME
    DEFAULT_NAME = "Bookmarks"
    UNSORTED_DEFAULT_NAME = "Unsorted Bookmarks"

    BACKUP_DIR  = "bookmarks"
    DATE_FORMAT = "%Y-%m-%d"

    NAME_TAGS = "tags"
    NAME_BOOKMARKS = "bookmarks"
    NAME_UNSORTED = "unsorted"

    Managers = {}

    def get(ctx, id, name=""):
        """ Request to get container for command. """
        klass = BookmarksManager
        managers = klass.Managers
        if not id in managers:
            managers[id] = klass(ctx, id, name)
        return managers[id]

    def remove(id):
        klass = BookmarksManager
        try:
            klass.Managers.pop(id)
        except:
            pass

    get = staticmethod(get)
    remove = staticmethod(remove)

    def __init__(self, ctx, command, name=""):
        BookmarksManagerBase.__init__(self)
        self.unsorted = None
        self.ctx = ctx
        self.command = command
        self.last_modified = 0
        self.modified = False
        self.file_url = self.command_to_path(ctx, command)
        self.bookmark_name = name
        if self.file_url:
            self.open(self.file_url)

    def __repr__(self):
        return "<%s.%s %s at %s>" % (
            self.__class__.__module__,
            self.__class__.__name__, self.file_url, id(self))

    def set_modified(self, state=True):
        """ Update modified state. """
        self.modified = state
        self.last_modified = time.time()

    def is_modified_since(self, value):
        return value < self.last_modified

    def get_last_modified(self):
        return self.last_modified

    def has_location(self):
        """ Check the file exists. """
        return os.path.exists(uno.fileUrlToSystemPath(self.file_url))

    def create_base(self, name):
        """ Create base container. """
        obj = Container(name)
        obj.set_id(1)
        return obj

    def _read_from_file(self, file_url):
        """ Read string from the file. """
        import bookmarks.tools
        sfa = bookmarks.tools.create_service(
                self.ctx, "com.sun.star.ucb.SimpleFileAccess")
        io = sfa.openFileRead(file_url)
        ret = None
        if is_python3:
            try:
                text = bytes()
                while True:
                    n, data = io.readBytes(None, 0xffff)
                    text += data.value
                    if n < 0xffff:
                        break
            except Exception as e:
                print(e)
            ret = text.decode("utf-8")
        else:
            try:
                text = []
                while True:
                    n, data = io.readBytes(None, 0xffff)
                    text.append(data.value)
                    if n < 0xffff:
                        break
            except Exception as e:
                print(e)
            ret = "".join(text).decode("utf-8")
        io.closeInput()
        return ret

    def _write_to_file(self, file_url, text):
        """ Write text to the file. """
        import bookmarks.tools
        import uno
        sfa = bookmarks.tools.create_service(
                self.ctx, "com.sun.star.ucb.SimpleFileAccess")
        if sfa.exists(file_url):
            sfa.kill(file_url)
        io = sfa.openFileWrite(file_url)
        try:
            total = len(text)-1
            n = 0
            while True:
                io.writeBytes(uno.ByteSequence(text[n:n+0xffff]))
                n += 0xffff
                if n >= total:
                    break
        except Exception as e:
            print(e)
        io.closeOutput()

    def open(self, file_url=None, fallback=True):
        """ Open and load data. """
        def load_res():
            from bookmarks import RES_DIR, RES_FILE
            from bookmarks.tools import get_current_resource
            return get_current_resource(self.ctx, RES_DIR, RES_FILE)

        obj = None
        if file_url is None:
            file_url = self.file_url
        if self.has_location():
            s = self._read_from_file(file_url)
            obj = self.__class__.load(s)
        if not obj:
            if fallback:
                # search in extension package
                file_url = self.command_to_path(
                    self.ctx, self.command, fallback=True)
                if file_url:
                    s = self._read_from_file(file_url)
                    obj = self.__class__.load(s)
            if not obj:
                res = load_res()
                obj = self.create_simple_base(res)
        if file_url:
            self.file_url = file_url
        self.data = obj

        if self.NAME_BOOKMARKS in obj:
            self.base = obj[self.NAME_BOOKMARKS]
        else:
            res = load_res()
            self.base = self.create_base(res)

        if self.NAME_TAGS in obj:
            self.tags.update(obj[self.NAME_TAGS])

        if self.NAME_UNSORTED in obj:
            self.unsorted = obj[self.NAME_UNSORTED]
        else:
            res = load_res()
            self.unsorted = self.create_unsorted(res)

        self.reassign_all() # reduce id problem
        self.assign_id(self.unsorted)
        self.containers[self.unsorted.get_id()] = self.unsorted
        self.last_modified = time.time()
        self.update_tags(self.base)
        self.update_tags(self.unsorted)

    def store(self):
        """ Store into file. """
        if self.modified:
            self.backup() # ToDo configuration to enable/disable backup
            obj = {
                self.NAME_TAGS: self.tags,
                self.NAME_BOOKMARKS: self.base,
                self.NAME_UNSORTED: self.unsorted
            }
            s = self.__class__.dump(obj)
            self._write_to_file(self.file_url, s)
        #self.reassign_all()
        self.last_modified = time.time()
        self.modified = False

    def backup(self):
        """ Copy current file to backup. """
        from bookmarks.tools import get_config
        config = get_config(
            self.ctx, "/org.openoffice.Office.Common/Save/Document")
        if not config.CreateBackup:
            return
        from bookmarks import CONFIG_NODE_CONTROLLERS, NAME_BACKUP_DIRECTORY
        from bookmarks.tools import get_user_backup, join_url, copy_file
        try:
            backup_dir = None
            config = get_config(self.ctx, CONFIG_NODE_CONTROLLERS)
            if config.hasByName(self.command):
                _config = config.getByName(self.command)
                backup_dir = _config.getPropertyValue(NAME_BACKUP_DIRECTORY)

            if not backup_dir:
                backup_dir = join_url(get_user_backup(self.ctx), self.BACKUP_DIR)
            file_name = self.FILE_NAME % (
                    time.strftime(self.DATE_FORMAT) + \
                        "_" + self.command.split(":")[-1])
            copy_file(
                self.ctx,
                self.file_url,
                join_url(backup_dir, file_name)
            )
        except Exception as e:
            print(e)

    def load(s):
        """ Load JSON file as bookmarks from string. """
        obj = None
        try:
            if s:
                decoder = BookmarksJSONDecoder
                obj = json.loads(
                    s,
                    cls=decoder,
                    object_hook=decoder.obj_hook)
        except Exception as e:
            print(e)
            traceback.print_exc()
        return obj

    load = staticmethod(load)

    def dump(obj):
        """ Store bookmarks as JSON. """
        s = None
        try:
            encoder = BookmarksJSONEncoder
            s = json.dumps(
                obj,
                ensure_ascii=False,
                cls=encoder,
                #indent=4,
                sort_keys=True)
        except Exception as e:
            print(e)
        return s.encode("utf-8")

    dump = staticmethod(dump)

    def command_to_path(ctx, command, fallback=False):
        """ Command to file path in config. """
        parts = command.split(":", 1)
        if len(parts) == 2:
            if fallback:
                from bookmarks.tools import get_extension_dirurl, join_url
                dir_url = get_extension_dirurl(
                                ctx, command.replace(":", "."))
                if dir_url:
                    return join_url(
                        dir_url,
                        BookmarksManager.FILE_NAME % parts[1].lower())
            else:
                from bookmarks import CONFIG_NODE_CONTROLLERS, NAME_DATA_URL
                from bookmarks.tools import get_config, get_user_config
                config = get_config(ctx, CONFIG_NODE_CONTROLLERS)
                if config.hasByName(command):
                    _config = config.getByName(command)
                    data_url = _config.getByName(NAME_DATA_URL)
                    if data_url:
                        return data_url

                return BookmarksManager.FILE_BASE_URL % (
                        get_user_config(ctx), parts[1].lower())
        return ""

    command_to_path = staticmethod(command_to_path)

    def create_unsorted(res):
        klass = BookmarksManager
        def _(name):
            return res.get(name, name)
        unsorted = Container(_(klass.UNSORTED_DEFAULT_NAME))
        unsorted.id = -1
        return unsorted

    create_unsorted = staticmethod(create_unsorted)

    def create_base(res):
        klass = BookmarksManager
        from bookmarks import PROTOCOL_BOOKMARKS
        def _(name):
            return res.get(name, name)

        base = Container(_(klass.DEFAULT_NAME))
        children = base.children
        children += [
            Item(_("Bookmark ~This Document..."),
                "", PROTOCOL_BOOKMARKS + "AddThis"),
            Item(_("~Edit Bookmarks..."),
                "", PROTOCOL_BOOKMARKS + "Edit"),
            Separator()
        ]
        base.id = 1
        for i, child in enumerate(children):
            child.id = i +1
            child.parent = 1
        return base

    create_base = staticmethod(create_base)

    def create_simple_base(res):
        """ Create initial container. """
        klass = BookmarksManager

        return klass.pack(
            {},
            klass.create_base(res),
            klass.create_unsorted(res))

    create_simple_base = staticmethod(create_simple_base)

    def pack(tags, base, unsorted):
        klass = BookmarksManager
        return {
            klass.NAME_TAGS: tags,
            klass.NAME_BOOKMARKS: base,
            klass.NAME_UNSORTED: unsorted
        }

    pack = staticmethod(pack)

class BookmarksJSONBase(object):
    pass

class BookmarksJSONDecoder(BookmarksJSONBase, json.JSONDecoder):
    """ Customized decoder for bookmarks. """
    def obj_hook(o):
        try:
            return BaseItem.create(o)
        except:
            try:
                return TagContainer.create(o)
            except:
                return dict(o)

    obj_hook = staticmethod(obj_hook)

class BookmarksJSONEncoder(BookmarksJSONBase, json.JSONEncoder):
    """ Customized encoder for bookmarks. """
    def default(self, o):
        if isinstance(o, BaseItem) or isinstance(o, TagContainer):
            return o.as_json()
        else:
            return json.JSONEncoder.default(self, o)


text:
require 'spec_helper'

describe Harvest::User do
  it_behaves_like 'a json sanitizer', %w(cache_version)

  describe "#timezone" do
    it "should convert friendly timezone setting" do
      p = Harvest::User.new(:timezone => :cst)
      p.timezone.should == 'Central Time (US & Canada)'

      p = Harvest::User.new(:timezone => :est)
      p.timezone.should == 'Eastern Time (US & Canada)'

      p = Harvest::User.new(:timezone => :mst)
      p.timezone.should == 'Mountain Time (US & Canada)'

      p = Harvest::User.new(:timezone => :pst)
      p.timezone.should == 'Pacific Time (US & Canada)'

      p = Harvest::User.new(:timezone => 'pst')
      p.timezone.should == 'Pacific Time (US & Canada)'
    end

    it "should convert standard zones" do
      p = Harvest::User.new(:timezone => 'america/chicago')
      p.timezone.should == 'Central Time (US & Canada)'
    end

    it "should leave literal zones" do
      p = Harvest::User.new(:timezone => 'Central Time (US & Canada)')
      p.timezone.should == 'Central Time (US & Canada)'
    end
  end
end


text:
require 'qpid_messaging'

# Generates a random string of the specified length
def random_string(length = 8)
  (0...length).map{65.+(rand(25)).chr}.join
end


text:
import ApplicationSerializer from './application';

const { isArray } = Array;

export default ApplicationSerializer.extend({

  serialize(...args) {
    const json = ApplicationSerializer.prototype.serialize.apply(this, args);

    if (isArray(json.waivers)) {
      return {
        waivers: json.waivers,
        totalRecords: json.waivers.length,
      };
    }

    return json;
  }

});


text:
package net.nemerosa.ontrack.model.form;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.Validate;

@EqualsAndHashCode(callSuper = false)
@Data
public class Memo extends AbstractText<Memo> {

    private int rows = 3;

    protected Memo(String name) {
        super("memo", name);
    }

    public static Memo of(String name) {
        return new Memo(name);
    }

    public Memo rows(int value) {
        Validate.isTrue(value > 0);
        this.rows = value;
        return this;
    }

}


text:
package com.alibaba.druid.support.ibatis;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapSession;
import com.ibatis.sqlmap.engine.execution.SqlExecutor;
import com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient;
import com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate;
import com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactory;
import com.ibatis.sqlmap.engine.mapping.statement.MappedStatement;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

@SuppressWarnings("deprecation")
public class SqlMapClientWrapper extends SqlMapExecutorWrapper implements SqlMapClient, ExtendedSqlMapClient {

    protected final ExtendedSqlMapClient client;

    public SqlMapClientWrapper(ExtendedSqlMapClient client){
        super(client, client);
        this.client = client;

    }

    public ExtendedSqlMapClient getClient() {
        return this.client;
    }

    public void startTransaction() throws SQLException {
        client.startTransaction();
    }

    public void startTransaction(int transactionIsolation) throws SQLException {
        client.startTransaction(transactionIsolation);
    }

    public void commitTransaction() throws SQLException {
        client.commitTransaction();
    }

    public void endTransaction() throws SQLException {
        client.endTransaction();
    }

    public void setUserConnection(Connection connection) throws SQLException {
        client.setUserConnection(connection);
    }

    public Connection getUserConnection() throws SQLException {
        return client.getUserConnection();
    }

    public Connection getCurrentConnection() throws SQLException {
        return client.getCurrentConnection();
    }

    public DataSource getDataSource() {
        return client.getDataSource();
    }

    public SqlMapSession openSession() {
        SqlMapSession session = client.openSession();
        IbatisUtils.setClientImpl(session, clientImplWrapper);
        return new SqlMapSessionWrapper(client, session);
    }

    public SqlMapSession openSession(Connection conn) {
        SqlMapSession session = client.openSession(conn);
        IbatisUtils.setClientImpl(session, clientImplWrapper);
        return new SqlMapSessionWrapper(client, session);
    }

    public SqlMapSession getSession() {
        SqlMapSession session = client.getSession();
        IbatisUtils.setClientImpl(session, clientImplWrapper);
        return new SqlMapSessionWrapper(client, session);
    }

    public void flushDataCache() {
        client.flushDataCache();
    }

    public void flushDataCache(String cacheId) {
        client.flushDataCache(cacheId);
    }

    public MappedStatement getMappedStatement(String id) {
        return client.getMappedStatement(id);
    }

    public boolean isLazyLoadingEnabled() {
        return client.isLazyLoadingEnabled();
    }

    public boolean isEnhancementEnabled() {
        return client.isEnhancementEnabled();
    }

    public SqlExecutor getSqlExecutor() {
        return client.getSqlExecutor();
    }

    public SqlMapExecutorDelegate getDelegate() {
        return client.getDelegate();
    }

    public ResultObjectFactory getResultObjectFactory() {
        return client.getResultObjectFactory();
    }
}


text:
package ircu.navjotpanesar.com.ircu.pircbot;

public class ChatItem {
    public static final int PERMISSION_NORMAL = 0;
    public static final int PERMISSION_SYSTEM = 1;
    public static final int PERMISSION_OP = 2;

    private String from;
    private String body;
    private String channel;
    private int permissionLevel;

    public ChatItem(String from, String body, String channel) {
        this.from = from;
        this.body = body;
        this.channel = channel;
        this.permissionLevel = PERMISSION_NORMAL;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public int getPermissionLevel() {
        return permissionLevel;
    }

    public void setPermissionLevel(int permissionLevel) {
        this.permissionLevel = permissionLevel;
    }

}


text:
class TextValidator < ActiveModel::EachValidator
  INVALID_CONTROL = /[\x01-\x08\x0b\x0c\x0e-\x1f]/
  def text_acceptable?(value)
    return true if value.nil?
    return false unless value.valid_encoding?
    (value =~ INVALID_CONTROL).nil?
  end

  def validate_each(record, attribute, value)
    return if text_acceptable?(value)
    record.errors.add attribute, (options[:message] ||
                                  I18n.t('error_messages.valid_text'))
  end
end


text:
<?php

namespace spec\Aco\Domain\Aco;

use PhpSpec\ObjectBehavior;
use Aco\Domain\Aco\Url;
use Aco\Domain\Aco\ArticleSource;

class ArticleSourceSpec extends ObjectBehavior
{
    public function let(Url $url)
    {
        $this->beConstructedWith($url, 'content');
    }

    public function it_returns_data(Url $url)
    {
        $this->getUrl()->shouldReturn($url);
        $this->getContent()->shouldReturn('content');
    }

    public function it_can_compare_itself_to_others(Url $url, Url $url2)
    {
        $this->beConstructedWith(new Url('http://localhost'), 'content');
        $this->shouldBeEqual(new ArticleSource(new Url('http://localhost'), 'content'));
        $this->shouldNotBeEqual(new ArticleSource(new Url('http://localhost'), 'different content'));
        $this->shouldNotBeEqual(new ArticleSource(new Url('http://localhost2'), 'content'));
    }
}


text:
<?php
/**
 * Authsource listing template.
 *
 * This page lists all of the authentication sources for this instance.
 *
 * @author     Cory Collier <corycollier@corycollier.com>
 * @license    http://opensource.org/licenses/MIT  MIT License
 * @version    git: $Id$
 * @link       https://github.com/corycollier/simplesamlphp-module-themes
 * @see        https://github.com/simplesamlphp/simplesamlphp/
 * @since      File available since Release 1.3.0
 */
?>
<?php
$now = time();
$this->data['header'] = $this->t('{core:frontpage:page_title}');
$this->includeAtTemplateBase('includes/header.php');

$has_hosted_entries = is_array($this->data['metaentries']['hosted'])
  && count($this->data['metaentries']['hosted']);

$has_remote_entries = is_array($this->data['metaentries']['remote'])
  && count($this->data['metaentries']['remote']);
?>

<?php if ($has_hosted_entries) : ?>

Hosted Services

  <?php foreach ($this->data['metaentries']['hosted'] as $hm) : ?>

<?php echo $this->t(simplesamlphp_get_mtype($hm['metadata-set'])); ?>

Entity ID: <?php echo $hm['entityid']; ?>

      <?php if (isset($hm['deprecated']) && $hm['deprecated']) : ?>

Deprecated

      <?php endif; ?>
      <?php if ($hm['entityid'] !== $hm['metadata-index']) : ?>

Index: <?php echo $hm['metadata-index']; ?>

      <?php endif; ?>
      <?php if (!empty($hm['name'])) : ?>

<?php echo $this->getTranslation(SimpleSAML\Utils\Arrays::arrayize($hm['name'], 'en')); ?>

      <?php endif; ?>
      <?php if (!empty($hm['descr'])) : ?>

<?php echo $this->getTranslation(SimpleSAML\Utils\Arrays::arrayize($hm['descr'], 'en')); ?>

      <?php endif; ?>

 [ <a href="<?php echo $hm['metadata-url']; ?>">
          <?php echo $this->t('{core:frontpage:show_metadata}'); ?>
         ]

  <?php endforeach; ?>

<?php endif; ?>

<?php if ($has_remote_entries) : ?>

Trusted Remote Entries

<?php foreach($this->data['metaentries']['remote'] as $setkey => $set) : ?>
  <fieldset class="fancyfieldset">
    <legend><?php echo $this->t(simplesamlphp_get_mtype($setkey)); ?> (Trusted)</legend>

    <?php foreach($set as $entry) : ?>

        <?php
        // local variable assignments.
        $href    = simplesamlphp_get_entry_href($this, $setkey, $entry);
        $name    = simplesamlphp_get_entry_name($this, $entry);
        $expires = simplesamlphp_get_expires($this, $entry);
        ?>
        <a href="<?php echo $href; ?>"><?php echo $name; ?>
        <?php echo $expires; ?>

    <?php endforeach; ?>

  </fieldset>
<?php endforeach; ?>

<?php endif; ?>

<?php echo $this->t('{core:frontpage:tools}'); ?>

  <?php foreach ($this->data['links_federation'] as $link) : ?>

      <a href="<?php echo htmlspecialchars($link['href']); ?>">
        <?php echo $this->t($link['text']);?>

  <?php endforeach;?>

<?php if ($this->data['isadmin']) : ?>

  <?php $action = SimpleSAML_Module::getModuleURL('core/show_metadata.php'); ?>
  <form action="<?php echo $action; ?>" class="" method="get" >
    <fieldset>
      <legend>Lookup metadata</legend>

        Look up metadata for entity:
        <select name="set" id="setValues" class="form-control">
        <?php if ($has_remote_entries) : ?>
          <?php foreach($this->data['metaentries']['remote'] as $setkey => $set) : ?>
            <option value="<?php echo htmlspecialchars($setkey); ?>">
              <?php echo $this->t(simplesamlphp_get_mtype($setkey)); ?>
            </option>
          <?php endforeach; ?>
        <?php endif; ?>
        </select>

        Entity ID
        <input type="text" name="entityid" class="form-control">

        <input type="submit" value="Lookup" class="btn btn-default">

    </fieldset>
  </form>

<?php endif; ?>

<?php $this->includeAtTemplateBase('includes/footer.php');


text:
using WizBot.Modules.Administration.Services;

namespace WizBot.Modules.Administration;

public partial class Administration
{
    public partial class ReactionRoleCommands : WizBotModule
    {
        private readonly IReactionRoleService _rero;

        public ReactionRoleCommands(IReactionRoleService rero)
        {
            _rero = rero;
        }

        [Cmd]
        [RequireContext(ContextType.Guild)]
        [UserPerm(GuildPerm.ManageRoles)]
        [BotPerm(GuildPerm.ManageRoles)]
        public async Task ReactionRoleAdd(
            ulong messageId,
            string emoteStr,
            IRole role,
            int group = 0,
            int levelReq = 0)
        {
            if (group < 0)
                return;

            if (levelReq < 0)
                return;

            var msg = await ctx.Channel.GetMessageAsync(messageId);
            if (msg is null)
            {
                await ReplyErrorLocalizedAsync(strs.not_found);
                return;
            }

            if (ctx.User.Id != ctx.Guild.OwnerId && ((IGuildUser)ctx.User).GetRoles().Max(x => x.Position) <= role.Position)
            {
                await ReplyErrorLocalizedAsync(strs.hierarchy);
                return;
            }

            var emote = emoteStr.ToIEmote();
            await msg.AddReactionAsync(emote);
            var res = await _rero.AddReactionRole(ctx.Guild,
                msg,
                emoteStr,
                role,
                group,
                levelReq);

            await res.Match(
                _ => ctx.OkAsync(),
                fl =>
                {
                    _ = msg.RemoveReactionAsync(emote, ctx.Client.CurrentUser);
                    return !fl.IsPatronLimit
                        ? ReplyErrorLocalizedAsync(strs.limit_reached(fl.Quota))
                        : ReplyPendingLocalizedAsync(strs.feature_limit_reached_owner(fl.Quota, fl.Name));
                });
        }

        [Cmd]
        [RequireContext(ContextType.Guild)]
        [UserPerm(GuildPerm.ManageRoles)]
        [BotPerm(GuildPerm.ManageRoles)]
        public async Task ReactionRolesList(int page = 1)
        {
            if (--page < 0)
                return;

            var reros = await _rero.GetReactionRolesAsync(ctx.Guild.Id);

            await ctx.SendPaginatedConfirmAsync(page, curPage =>
            {
                var embed = _eb.Create(ctx)
                               .WithOkColor();

                var content = string.Empty;
                foreach (var g in reros.OrderBy(x => x.Group)
                                       .Skip(curPage * 10)
                                       .GroupBy(x => x.MessageId)
                                       .OrderBy(x => x.Key))
                {
                    var messageId = g.Key;
                    content +=
                        $"[{messageId}](https://discord.com/channels/{ctx.Guild.Id}/{g.First().ChannelId}/{g.Key})\n";

                    var groupGroups = g.GroupBy(x => x.Group);

                    foreach (var ggs in groupGroups)
                    {
                        content += $"`< {(g.Key == 0 ? ("Not Exclusive (Group 0)") : ($"Group {ggs.Key}"))} >`\n";

                        foreach (var rero in ggs)
                        {
                            content +=
                                $"\t{rero.Emote} -> {(ctx.Guild.GetRole(rero.RoleId)?.Mention ?? "<missing role>")}";
                            if (rero.LevelReq > 0)
                                content += $" (lvl {rero.LevelReq}+)";
                            content += '\n';
                        }
                    }

                }

                embed.WithDescription(string.IsNullOrWhiteSpace(content)
                    ? "There are no reaction roles on this server"
                    : content);

                return embed;
            }, reros.Count, 10);
        }

        [Cmd]
        [RequireContext(ContextType.Guild)]
        [UserPerm(GuildPerm.ManageRoles)]
        [BotPerm(GuildPerm.ManageRoles)]
        public async Task ReactionRolesRemove(ulong messageId)
        {
            var succ = await _rero.RemoveReactionRoles(ctx.Guild.Id, messageId);
            if (succ)
                await ctx.OkAsync();
            else
                await ctx.ErrorAsync();
        }

        [Cmd]
        [RequireContext(ContextType.Guild)]
        [UserPerm(GuildPerm.ManageRoles)]
        [BotPerm(GuildPerm.ManageRoles)]
        public async Task ReactionRolesDeleteAll()
        {
            await _rero.RemoveAllReactionRoles(ctx.Guild.Id);
            await ctx.OkAsync();
        }

        [Cmd]
        [RequireContext(ContextType.Guild)]
        [UserPerm(GuildPerm.ManageRoles)]
        [BotPerm(GuildPerm.ManageRoles)]
        [Ratelimit(60)]
        public async Task ReactionRolesTransfer(ulong fromMessageId, ulong toMessageId)
        {
            var msg = await ctx.Channel.GetMessageAsync(toMessageId);

            if (msg is null)
            {
                await ctx.ErrorAsync();
                return;
            }

            var reactions = await _rero.TransferReactionRolesAsync(ctx.Guild.Id, fromMessageId, toMessageId);

            if (reactions.Count == 0)
            {
                await ctx.ErrorAsync();
            }
            else
            {
                foreach (var r in reactions)
                {
                    await msg.AddReactionAsync(r);
                }
            }
        }
    }
}


text:
layout: news_item
title: Forum Math Emploi
date: 2014-12-03
author: Vincent
fullname: Vincent Huber
categories: [news]
tags: [cemosis]
---

Cemosis était représenté au [Forum Math Emploi](http://www.forum-emploi-maths.org/) pour présenter nos offres de formation, comme le Master de Sciences, spécialité [Calcul Scientifique et Mathématiques de l'information](http://csmi.math.unistra.fr/).


text:
package io.reinert.requestor.core;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.ListIterator;

/**
 * A manager for {@link RequestFilter} and {@link ResponseFilter}.
 *
 * @author Danilo Reinert
 */
class FilterManagerImpl implements FilterManager {

    private final List<RequestFilter.Provider> requestFilters = new ArrayList<RequestFilter.Provider>();
    private final List<ResponseFilter.Provider> responseFilters = new ArrayList<ResponseFilter.Provider>();

    @SuppressWarnings("unchecked")
    private List<RequestFilter.Provider> requestFiltersCopy = Collections.EMPTY_LIST;
    @SuppressWarnings("unchecked")
    private List<ResponseFilter.Provider> responseFiltersCopy = Collections.EMPTY_LIST;

    public FilterManagerImpl() {
    }

    /**
     * Wraps a {@link FilterManagerImpl} absorbing its filters.
     * It doesn't affect neither is affected by the wrapping manager.
     *
     * @param manager  a manager to wrap
     */
    public FilterManagerImpl(FilterManagerImpl manager) {
        final List<RequestFilter.Provider> managerRequestFilters = manager.getRequestFilters();
        this.requestFilters.addAll(managerRequestFilters);
        this.requestFiltersCopy = managerRequestFilters; // It's an immutable list
        final List<ResponseFilter.Provider> managerResponseFilters = manager.getResponseFilters();
        this.responseFilters.addAll(managerResponseFilters);
        this.responseFiltersCopy = managerResponseFilters; // It's an immutable list
    }

    @Override
    public Registration register(final RequestFilter requestFilter) {
        return register(new RequestFilter.Provider() {
            public RequestFilter getInstance() {
                return requestFilter;
            }
        });
    }

    @Override
    public Registration register(final RequestFilter.Provider provider) {
        addRequestFilter(provider);

        return new Registration() {
            public void cancel() {
                removeRequestFilter(provider);
            }
        };
    }

    @Override
    public Registration register(final ResponseFilter responseFilter) {
        return register(new ResponseFilter.Provider() {
            public ResponseFilter getInstance() {
                return responseFilter;
            }
        });
    }

    @Override
    public Registration register(final ResponseFilter.Provider provider) {
        addResponseFilter(provider);

        return new Registration() {
            public void cancel() {
                removeResponseFilter(provider);
            }
        };
    }

    /**
     * Returns an immutable copy of the filters.
     *
     * @return The request filters.
     */
    public List<RequestFilter.Provider> getRequestFilters() {
        return requestFiltersCopy;
    }

    /**
     * Returns an immutable copy of the filters.
     *
     * @return The response filters.
     */
    public List<ResponseFilter.Provider> getResponseFilters() {
        return responseFiltersCopy;
    }

    public ListIterator<RequestFilter.Provider> reverseRequestFiltersIterator() {
        return requestFiltersCopy.listIterator(requestFiltersCopy.size());
    }

    public ListIterator<ResponseFilter.Provider> reverseResponseFiltersIterator() {
        return responseFiltersCopy.listIterator(responseFiltersCopy.size());
    }

    private synchronized void addRequestFilter(RequestFilter.Provider requestFilter) {
        requestFilters.add(requestFilter);
        updateRequestFiltersCopy();
    }

    private synchronized void addResponseFilter(ResponseFilter.Provider responseFilter) {
        responseFilters.add(responseFilter);
        updateResponseFiltersCopy();
    }

    private synchronized void removeRequestFilter(RequestFilter.Provider requestFilter) {
        requestFilters.remove(requestFilter);
        updateRequestFiltersCopy();
    }

    private synchronized void removeResponseFilter(ResponseFilter.Provider responseFilter) {
        responseFilters.remove(responseFilter);
        updateResponseFiltersCopy();
    }

    private synchronized void updateRequestFiltersCopy() {
        requestFiltersCopy = Collections.unmodifiableList(requestFilters);
    }

    private synchronized void updateResponseFiltersCopy() {
        responseFiltersCopy = Collections.unmodifiableList(responseFilters);
    }
}


text:
package ceylon.modules.jboss.runtime;

import ceylon.modules.Configuration;
import com.redhat.ceylon.cmr.api.RepositoryManager;
import org.jboss.modules.ModuleLoader;

/**
 * Default Ceylon Modules runtime.
 *
 * @author Ales Justin
 */
public class JBossRuntime extends AbstractJBossRuntime {
    protected ModuleLoader createModuleLoader(Configuration conf) throws Exception {
        RepositoryManager repository = createRepository(conf);
        return new CeylonModuleLoader(repository, conf.autoExportMavenDependencies);
    }
}


text:
namespace SimpleUI {

template <typename ArgumentType>
class Delegate {
public:
	typedef void (*HandlerType)(ArgumentType arg);

	void Invoke(ArgumentType arg) {
		if (this->handler_list_.size()) {
			HandlerListType copy = this->handler_list_;
			for (HandlerListType::iterator iter = copy.begin();
					iter != copy.end();
					++iter) {
				(*iter)(arg);
			}
		}
	}

	void operator()(ArgumentType arg) {
		this->Invoke(arg);
	}

	void Add(HandlerType handler) {
		EnterCriticalSection(&this->cs_);
		this->handler_list_.push_back(handler);
		LeaveCriticalSection(&this->cs_);
	}

	void Remove(HandlerType handler) {
		EnterCriticalSection(&this->cs_);
		HandlerListType::iterator iter = std::find(this->handler_list_.begin(), this->handler_list_.end(), handler);
		if (iter != this->handler_list_.end()) {
			this->handler_list_.erase(iter);
		}
		LeaveCriticalSection(&this->cs_);
	}

	void RemoveAll() {
		EnterCriticalSection(&this->cs_);
		this->handler_list_.clear();
		LeaveCriticalSection(&this->cs_);
	}

	Delegate& operator+=(HandlerType handler) {
		this->Add(handler);
		return *this;
	}

	Delegate& operator-=(HandlerType handler) {
		this->Remove(handler);
		return *this;
	}

	Delegate() {InitializeCriticalSectionAndSpinCount(&this->cs_, 0x00000400);}
	~Delegate() {DeleteCriticalSection(&this->cs_);}
private:
	typedef std::list<HandlerType> HandlerListType;
	HandlerListType handler_list_;
	CRITICAL_SECTION cs_;
};

template <>
class Delegate<void> {
public:
	typedef void (*HandlerType)(void);

	void Invoke() {
		if (this->handler_list_.size()) {
			HandlerListType copy = this->handler_list_;
			for (HandlerListType::iterator iter = copy.begin();
					iter != copy.end();
					++iter) {
				(*iter)();
			}
		}
	}

	void operator()(void) {
		this->Invoke();
	}

	void Add(HandlerType handler) {
		EnterCriticalSection(&this->cs_);
		this->handler_list_.push_back(handler);
		LeaveCriticalSection(&this->cs_);
	}

	void Remove(HandlerType handler) {
		EnterCriticalSection(&this->cs_);
		HandlerListType::iterator iter = std::find(this->handler_list_.begin(), this->handler_list_.end(), handler);
		if (iter != this->handler_list_.end()) {
			this->handler_list_.erase(iter);
		}
		LeaveCriticalSection(&this->cs_);
	}

	void RemoveAll() {
		EnterCriticalSection(&this->cs_);
		this->handler_list_.clear();
		LeaveCriticalSection(&this->cs_);
	}

	Delegate& operator+=(HandlerType handler) {
		this->Add(handler);
		return *this;
	}

	Delegate& operator-=(HandlerType handler) {
		this->Remove(handler);
		return *this;
	}

	Delegate() {InitializeCriticalSectionAndSpinCount(&this->cs_, 0x00000400);}
	~Delegate() {DeleteCriticalSection(&this->cs_);}
private:
	typedef std::list<HandlerType> HandlerListType;
	HandlerListType handler_list_;
	CRITICAL_SECTION cs_;
};

} //namespace

#endif


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.lacv.marketplatform.services.impl;

import com.lacv.marketplatform.daos.UserRoleJpa;
import com.lacv.marketplatform.entities.UserRole;
import com.lacv.marketplatform.mappers.UserRoleMapper;
import com.lacv.marketplatform.services.UserRoleService;
import com.dot.gcpbasedot.dao.GenericDao;
import com.dot.gcpbasedot.service.EntityServiceImpl1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author nalvarez
 */
@Service("userRoleService")
public class UserRoleServiceImpl extends EntityServiceImpl1<UserRole> implements UserRoleService {

    @Autowired
    public UserRoleJpa userRoleJpa;

    @Autowired
    public UserRoleMapper userRoleMapper;

    @Override
    public GenericDao getGenericDao(){
        return userRoleJpa;
    }

}


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace finalProject {

    public partial class WebForm6 {

        /// <summary>
        /// firstname control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.TextBox firstname;

        /// <summary>
        /// lastname control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.TextBox lastname;

        /// <summary>
        /// Image1 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.Image Image1;

        /// <summary>
        /// username control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.TextBox username;

        /// <summary>
        /// password control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.TextBox password;

        /// <summary>
        /// email control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.TextBox email;

        /// <summary>
        /// error control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.Label error;

        /// <summary>
        /// signUp control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.Button signUp;
    }
}


text:
<?php

class RomanNumerals
{

    private function arabicToRomanMap()
    {
        return [
            1 => 'I',
            5 => 'V',
            10 => 'X',
            50 => 'L',
            100 => 'C',
            500 => 'D',
            1000 => 'M'
        ];
    }

    public function toRoman($number)
    {
        if (!$this->inBoundaries($number))
            throw new Exception();

        $arabicToRomanMap = $this->arabicToRomanMap();

        if (isset($arabicToRomanMap[$number]))
            return $arabicToRomanMap[$number];

        $nearest = $this->nearest($number);
        $difference = $number - $nearest;

        if ($difference < 0) {
            return $this->toRoman(abs($difference)) . $arabicToRomanMap[$nearest];
        }

        return $arabicToRomanMap[$nearest] . $this->toRoman($difference);
    }

    private function nearest($number)
    {
        $arabicToRomanMap = array_keys($this->arabicToRomanMap());

        $nearest = null;
        foreach ($arabicToRomanMap as $mapElement) {
            $currentDistance = abs($number - $mapElement);

            if ($nearest === null || $currentDistance < $nearest) {
                $nearest = $currentDistance;
                $min = $mapElement;
            }
        }

        return $min;
    }

    private function inBoundaries($number)
    {
        return $number ==! 0 && $number < 3000;
    }

}


text:
var event     = process.env.npm_lifecycle_event;
var watch     = event.includes('watch');
var prod      = event.includes('prod');
var webpack   = require('webpack');
var path      = require('path');
var AotPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
var config    = {};

     if (prod)  console.log("> \033[33mPRODUCTION BUILD\033[0m\n");
else if (watch) console.log("> \033[33mWATCH BUILD\033[0m\n");
else            console.log("> \033[33mDEVELOPMENT BUILD\033[0m\n");

config.mode = prod? 'production': 'development';

config.entry =
{
  'polyfills':
  [
    'core-js/es6',
    'core-js/es7/reflect',
    'core-js/client/shim',
    'zone.js/dist/zone'
  ],
  'example':
  [
    './webpack.init.js',
    'example/bootstrap.ts'
  ]
};

config.output =
{
  path: __dirname+'/dist',
  filename: '[name].js'
};

config.resolve =
{
  modules: ["src", "node_modules"],
  extensions: ['.ts', '.js', '.css', '.html'],
};

config.module =
{
  rules:
  [
    {test: /\.css$/,  loader: 'raw-loader'},
    {test: /\.html$/, loader: 'raw-loader'}
  ]
};

if (prod)
{
  config.module.rules.push(
    {test: /\.ts$/, loader: '@ngtools/webpack'}
  );
}
else
{
  config.module.rules.push(
    {test: /\.ts$/, loaders: ['awesome-typescript-loader', 'angular2-template-loader', 'angular-router-loader']}
  );
}

config.plugins = [];

if (prod)
{
  config.plugins.push(
    new AotPlugin(
    {
      tsConfigPath: './tsconfig.json',
      entryModule: __dirname+'/src/example/example.module#ExampleModule'
    })
  );
}

config.plugins.push(
  new webpack.ContextReplacementPlugin(/\@angular(\\|\/)core(\\|\/)esm5/, path.join(__dirname, './client')),
  new webpack.NoEmitOnErrorsPlugin(),
  new webpack.DefinePlugin({
    ENV: prod? JSON.stringify('production'): JSON.stringify('development')
  })
);

config.optimization =
{
  minimize: true,
  splitChunks:
  {
    cacheGroups:
    {
      commons:
      {
        name: "vendor",
        chunks: "initial"
      }
    }
  }
};

config.devServer =
{
  host: "0.0.0.0",
  port: '4200',
  historyApiFallback: true,
  quiet: true,
  stats: 'minimal',
  headers: { "Access-Control-Allow-Origin": "*" },
  disableHostCheck: true
};

config.stats =
{
  maxModules: 0,
  children: false,
  version: false,
  hash: false
};

console.log("Building...");
module.exports = config;


text:
* {
	margin: 0;
	padding: 0;
}

body {
	background: white;
    margin: 0;
    padding: 0;
    font-family: "verdana", Arial, Helvetica, sans-serif;
    font-size: 10pt;
    font-style: normal;
}

/*******************************
 *****  General elements  ******
 *******************************/
a {
	color: rgb(51, 102, 153);
}

ul {
	margin-top: 10px;
	margin-bottom: 10px;
}

li {
	margin-left: 25px;
}

p {
	margin-top: 10px;
	margin-bottom: 10px;
}

h1, h2, h3, h4, h5 {
	color: #336699;
}

span.bold {
	font-weight: bolder;
}

span.italics,span.italic {
	font-style: italic;
}

span.underline {
	text-decoration: underline;
}

span.fade {
    color: gray;
    font-size: 90%;
}

span.fade a {
    color: gray;
    text-decoration: none;
}

span.fade a:hover {
    color: blue;
    text-decoration: underline;
}

span.warn {
    color: red;
    font-weight: bolder;
}

p.hidden, span.hidden {
    display: none;
}

/*******************************
*****  Major components  ******
*******************************/
ul#ds-trail {
		margin: 5px 0 10px 190px;
}

div#ds-body {
		margin: 5px 0 10px 190px;
		/* min-width:600px; */
}

div#ds-options {
		border-right: 1px solid gray;
		padding: 0 5px 0 5px;
		position: absolute;
		top: 100px;
		left: 0;
		width: 160px;
		overflow: hidden;
}

div#ds-footer {
		clear: both;
		margin: 100px 0 10px 190px;
		border-top: 1px solid gray;
}

/*******************************
**********  Header  ***********
*******************************/
div#ds-header a span#ds-header-logo {
		width: 200px;
		height: 80px;
		float: left;
		background-image: url("../images/dspace-blue.gif");
		background-repeat: no-repeat;
}

div#ds-header a {
		text-decoration: none;
}

div#ds-header h1 {
		display: none;
}

div#ds-header h2 {
		clear: both;
		height: 15px;
		background-image: url("../images/stripe.gif");
		/*visibility: none;*/
		font-size: 0.001em; /* yeah it's still there but not really visible */
}

/* User box (login / profile) */
div#ds-user-box {
		position: absolute;
		top: 20px;
		right: 20px;
}

div#ds-user-box p {
		color: gray;
}

div#ds-user-box a {
		text-decoration: none;
		color: gray;
}

div#ds-user-box a:hover {
		text-decoration: underline;
}

/* Trail */
ul#ds-trail li.ds-trail-link {
		list-style: none;
		margin-left:0px;
}

ul#ds-trail li.ds-trail-link a:hover {
		text-decoration: underline;
}

ul#ds-trail li.ds-trail-link:after {
		content: " > ";
}

/*******************************
*******  Options list  ********
*******************************/

div#ds-options h3 {
		color: black;
		font-size: 1em;
}

div#ds-options h4 {
		color: black;
		font-size: 10pt;
		margin-top: 10px;

}

div#ds-options li {
		margin-top: 5px;
		margin-bottom: 5px;
		font-size: 10pt;
		margin-left: 25px;
}

div#ds-options div#artifactbrowser_Navigation_list_browse li {
		list-style: none;
		margin-left: 0px;
}

div#ds-options div#artifactbrowser_Navigation_list_browse ul ul li {
		list-style-image: url(../images/arrow.gif);
		margin-left: 25px;
}

div#ds-options div#artifactbrowser_Navigation_list_account ul li {
		list-style-image: url(../images/arrow.gif);
		margin-left: 25px;
}

div#ds-options div#artifactbrowser_Navigation_list_context ul li {
		list-style-image: url(../images/arrow.gif);
		margin-left: 25px;
}

div.ds-option-set {
		margin-bottom: 30px;
}

/* search box, in the option list */
#ds-search-option-head {
		background-color: #fefecd;
		padding-left: 2px;
}

div#ds-search-option {
		background-color: #fefecd;
		padding-top: 2px;
		padding-bottom: 10px;
		padding-left: 2px;
}

form#ds-search-form fieldset {
		border: none;
}

div#ds-search-option input.ds-text-field {
		width: 79px;
		font-size: 1em;
}

div#ds-search-option label {
		display: none;
}

div#ds-search-option a {
		font-weight: bold;
		font-size: .9em;
}

/*******************************
**********  Footer  ***********
*******************************/

div#ds-footer a span#ds-footer-logo {
		width: 250px;
		height: 250px;
		float: left;
		background-image: url("../images/manakin_logo.png");
		background-repeat: no-repeat;
		margin: 5px;
}

div#ds-footer a {
		text-decoration: none;
}

div#ds-footer a:hover {
		text-decoration: underline;
}

/*******************************
********  pagination  *********
*******************************/

div.pagination {
		position: relative;
		margin: 10px 20px 2px 20px;
}

div.pagination-masked {
		position: relative;
		margin: 10px 20px 10px 20px;
}

a.previous-page-link {
		position: absolute;
		left: 50px;
		bottom: 5px;
}

a.next-page-link {
		position: absolute;
		right: 50px;
		bottom: 5px;
}

p.pagination-info {
		position: relative;
		text-align: center;
		width: 50%;
		margin: 0 auto 5px auto;
}

ul.pagination-links {
		position: relative;
		text-align: center;
		width: 50%;
		margin: 0 auto 5px auto;
		padding: 0 0 0 0;
}

*.pagination-links li {
		list-style: none;
		display: inline;
		margin-right: 5px;
		font-weight: bolder;
		font-size: 90%;
}

/*******************************
******  Alphabet Lists  *******
*******************************/

ul.alphabet {
		text-align: center;
}

ul.alphabet li {
		list-style: none;
		display: inline;
		margin: 0 5px 0 5px;
		font-weight: bolder;
}

ul.alphabet a:hover {
		color: black;
}

/*******************************
******  Progress Lists  *******
*******************************/

ul.ds-progress-list {
		margin: 0px;
		padding-top: 2px;
		padding-bottom: 2px;
		text-align: center;
}

ul.ds-progress-list li {
		font-family: Arial, Helvetica, sans-serif;
		font-weight: bold;
		color: gray;
		overflow: hidden;
		display: inline;
		line-height: 20px;
}

ul.ds-progress-list li.current {
		color: black;
}

ul.ds-progress-list li.arrow {
		font-size: 200%;
		font-weight: bold;
		position: relative;
		top: 6px;
}

/*******************************
*******  Artifact List  *******
*******************************/

ul.ds-artifact-list {
		border: 1px solid gray;
		list-style-type: none;
		width: 95%;
}

ul.ds-artifact-list li.odd {
		background-color: rgb(238, 238, 238);
}

ul.ds-artifact-list li.even {
		background-color: rgb(255, 255, 255);
}

ul.ds-artifact-list li {
		position: relative;
		padding-bottom: 3px;
		padding-top: 3px;
		margin: 0 0 0 0;
		padding: 2px 5px 2px 5px;

}

ul.ds-artifact-list li div.artifact-description {
		width: 80%;
}

ul.ds-artifact-list li div.artifact-preview {
		margin: -30px 0px 0 auto;
		width: 15%;
}

ul.ds-artifact-list li div.artifact-info {
		font-size: 110%;
		padding-left: 25px;
}

ul.ds-artifact-list li div.artifact-title {
		font-family: Arial, Helvetica, sans-serif;
		font-size: 130%;
		font-weight: bolder;
}

span.date {
		font-style: italic;
}

/*******************************
*********  Tables  ************
*******************************/

table {
		clear: both;
		border-spacing: 0px;
		border: 1px solid gray;
		width: 95%;
}

tr.ds-table-header-row {
		color: inherit;
		background-color: rgb(218, 218, 218);
}

tr.ds-table-header-row.subheader {
		background-color: rgb(250, 250, 214);
}

th {
		padding: 4px 10px;
}

.subheader th {
		padding-left: 5px;
		font-weight: 100;
}

tr.ds-table-row.odd {
		color: inherit;
		background-color: rgb(238, 238, 238);
}

tr.ds-table-row.even {
		color: inherit;
		background-color: rgb(255, 255, 255);
}

td {
		padding: 3px 10px 5px 10px;
		border: none;
		font-size: inherit;
		background-color: inherit;
		color: inherit;
}

*.first-cell {
		vertical-align: middle;
		text-align: center;
}

.indent {
		padding-left: 35px;
		padding-right: 0;
}
.doubleIndent {
		padding-left: 55px;
		padding-right: 0;
}

th.indent {
		padding-left: 30px;
		padding-right: 0;
}
th.doubleIndent {
		padding-left: 50px;
		padding-right: 0;
}

/* metadata import rows
 * additions and deletions
 */

tr.ds-table-row.metadata-addition {
	background-color: #CCFFCC;
}

tr.ds-table-row.metadata-deletion {
	background-color: #CCCCCC;
}

tr.ds-table-row.metadata-addition td,tr.ds-table-row.metadata-deletion td {
	border-top: 1px solid black;
}

/*******************************
***********  forms  ***********
*******************************/

form.ds-interactive-div {

		width: 95%;
}

form.ds-interactive-div li.ds-form-item {
		/*display: block; */
		padding: 2px 0;
		width: 100%;
}

form.ds-interactive-div li {
		margin: 0;
}

form.ds-interactive-div li.odd {
		background-color: rgb(238, 238, 238);
}

form.ds-interactive-div li.even {
		background-color: rgb(255, 255, 255);
}

form.ds-interactive-div li.last {
		border-top: 2px solid gray;
		background-color: rgb(215, 215, 215);
}

li.ds-form-item {
		float: left;
		clear: both;
		width: 100%;
}

div.ds-form-content {
		float: left;
		clear: right;
		display: block;
		padding: 7px;
		width: 400px;
}

span.ds-form-label,label.ds-form-label {
		display: block;
		float: left;
		clear: left;
		padding: 5px 20px 5px 10px;
		width: 115px;
		font-weight: bold;
		vertical-align: middle;
		overflow: hidden;
}

/* Help, error, & in-line labels */
label.ds-composite-component {
		display: block;
		float: left;
		padding: 0px 5px 0 0px;
		font-size: 80%;
		color: black;
		background-color: inherit;
		text-align: left;
}

span.error {
		display: block;
		font-size: 100%;
		color: red;
		background-color: inherit;
		margin: 0;
}

span.field-help {
		display: block;
		margin-left: 5px;
		font-size: 90%;
		color: gray;
		background-color: inherit;
}

input.error,textarea.error,select.error {
		color: inherit;
		background-color: rgb(255, 245, 245);
		border-color: red;
}

span.composite-help {
		display: block;
		font-size: 90%;
		color: gray;
		background-color: inherit;
		text-align: left;
}

span.composite-help {
		display: block;
		font-size: 80%;
		color: black;
		background-color: inherit;
		text-align: left;
}

div.spacer {
		margin: 0;
		padding: 0;
		line-height: 0px;
		clear: both;
}

/* The composite field  */
span.ds-composite-field {
		display: table-row;
		padding: 2px;
}

*.ds-composite-field.ds-composite-component {
		display: table-cell;
		text-align: left;
		width: auto;
		padding-right: 10px;
}

*.ds-composite-field input,*.ds-composite-field textarea,*.ds-composite-field select {
		margin-right: 5px;
		margin-bottom: -2px;
}

/* Checkboxes and Radio buttons */
fieldset.ds-checkbox-field,fieldset.ds-radio-field {
		border: none;
		margin: 0;
		padding: 0;
}

fieldset.ds-checkbox-field legend,fieldset.ds-radio-field legend {
		display: none;
}

fieldset.ds-checkbox-field label,fieldset.ds-radio-field label {
		display: block;
}

/* Sub sections within a form */

fieldset.ds-form-list {
		border: 2px solid gray;
		padding: 0;
		margin-left: 0;
		margin-right: 0;
}

fieldset.ds-form-list ol {
		padding: 0;
		margin: 0;
		width: 100%;
}

fieldset.ds-form-list legend {
		color: #336699;
		background-color: inherit;
		font-size: 115%;
		font-weight: bolder;
		margin-left: 10px;
}

fieldset.thick legend {
		color: #336699;
		padding-left: 10px;
		padding-right: 30px;
}

fieldset.ds-form-sublist {
		border: 1px solid rgb(238, 238, 238);
		padding: 0;
		margin: 5px;
}

fieldset.ds-form-list ol {
		list-style-type: none;
}

/*******************************
*   Rules for specific pages  *
*******************************/

/** Navigation bar for browse-by pages */
form.navigation {
		max-width: 750px;
		margin: 0 auto 0 auto;
		border: 1px solid gray;
		background-color: rgb(238, 238, 238);
}

form.navigation p {
		text-align: center;
}

/* System wide alerts */
div#ds-system-wide-alert {
		background-color: rgb(255,240,220);
		border: 2px solid rgb(213,80,40);
		padding: 6px;
		margin: 10px 30px 10px 30px;
		color: rgb(213, 80, 40);
}

/* License text, used during submission to show a license */
div.license-text {
		border: 1px solid #666;
		background-color: #EEE;
		padding: 20px;
		margin: 20px;
		margin-top: 5px;
		font-family: monospace;
		font-size: 125%;
}

/** System generated notices, typicaly these follow any action in the administrative section. */
div.notice {
		background-color: rgb(238, 238, 238);
		border: 2px solid gray;
		padding: 6px;
		text-align: center;
		margin: 10px 30px 10px 30px;
}

/** Community & Collection homepage */

div.search-browse {
		border: 2px solid gray;
		background-color: rgb(238,238,238);
		padding: 0px 5px 0px 10px;
		width: 350px;
}

div.detail-view div.ds-logo-wrapper {
		text-align: right;
		margin-right: 30px;
		margin: -150px 30px 0px auto;
}

div.detail-view p {
		clear: both;
}

p.copyright-text {
		margin-top: 30px;
		width: 90%;
		font-style: italic;
		text-align: center;
		margin: 30px auto 0px auto;
}


text:
/**
 *
Virtual Surround Effect

 *

 * Functionality for using Virtual Surround Effect objects. Phonon includes support for _virtual surround_. This
 * involves taking multi-channel speaker-based audio data (stereo, quadraphonic, 5.1, or 7.1) and rendering audio for
 * each speaker using binaural rendering. In other words, the audio signal for each speaker is rendered as if it were
 * emanating from a point in space corresponding to the speaker's position. This allows users to experience, say, a 7.1
 * surround sound mix over regular stereo headphones.
 *

 * Virtual Surround also works as a fast way to get approximate binaural rendering. All sound sources can be panned to
 * some surround format (say 7.1); after they are mixed, the 7.1 surround mix can be rendered using virtual surround.
 * This can save CPU cycles, at the cost of spatialization accuracy.
 */
package de.kuschku.steamaudio.lib.virtualsurround;


text:
function(detect_target_architecture OUTPUT_VAR)
  try_run(run_result
    compile_result
    "${CMAKE_BINARY_DIR}"
    "${CMAKE_SOURCE_DIR}/cmake/target_arch_detect.cpp"
    COMPILE_OUTPUT_VARIABLE compiler_output
  )
  if (compile_result)
    message(FATAL_ERROR "Expected compile to fail")
  endif()
  string(REGEX MATCH "CMAKE_TARGET_ARCH_([a-zA-Z0-9_]+)" arch "${compiler_output}")
  # Strip out prefix
  string(REPLACE "CMAKE_TARGET_ARCH_" "" arch "${arch}")
  set(${OUTPUT_VAR} "${arch}" PARENT_SCOPE)
endfunction()


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Pseudospora maligna Zopf

### Remarks
null


text:
<?php
namespace AcceptanceTester;

class CRMOperatorSteps extends \AcceptanceTester
{
	function amInAddCustomerUi()
	{
		$I = $this;
		$I->amOnPage('/customers/add');
	}

	public function imagineCustomer()
	{
		$faker = \Faker\Factory::create();
		return [
			'CustomerRecord[name]'=>$faker->name,
			'CustomerRecord[birth_date]'=>$faker->date('Y-m-d'),
			'CustomerRecord[notes]'=>$faker->sentences(8),
			'CustomerRecord[number]'=>$faker->phoneNumber,
		];
	}
}


text:
<?php

namespace AppBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;

class BuscarTramiteType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('carnet', TextType::class);
    }

    public function configureOptions(OptionsResolver $resolver)
    {
//        $resolver->setDefaults(array(
//            'data_class' => 'AppBundle\Entity\Cargo'
//        ));
    }

    public function getName()
    {
        return 'buscarTramite';
    }
}


text:
require 'selenium-webdriver'
module GogoDriver
  class Entity
    attr_reader :driver

    def initialize
      @driver = Selenium::WebDriver.for(:chrome)
    end

    def go(url)
      @driver.navigate.to(url)
    end

    def reload
      @driver.navigate.refresh
    end

    def find(selector)
      @driver.find_element(css: selector)
    end

    def finds(selector)
      @driver.find_elements(css: selector)
    end

    def has?(selector)
      !!find(selector)
    rescue Selenium::WebDriver::Error::NoSuchElementError
      false
    end

    def has_text?(text)
      !!@driver.find_element({xpath: "//*[text()[contains(.,\"#{text}\")]]"})
    rescue Selenium::WebDriver::Error::NoSuchElementError
      false
    end

    def click(selector)
      has?(selector) ? find(selector).click : false
    end

    def submit
      $focus.submit if $focus
    end
  end
end

class Selenium::WebDriver::Element
  def fill(text)
    $focus = self
    send_key(text)
  end
end