text:
Resources API
*************

Dataset
=======

Create
------

.. _json-createdataset:

.. http:post:: (string:server_name)/nd/resource/dataset/(string:dataset_name)/

   :synopsis: Create a dataset

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Dataset name in NeuroData
   :type dataset_name: string

   :statuscode 201: Resource created
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      POST /nd/resource/dataset/kasthuri11/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: application/json

      {
        "dataset_name" : "kasthuri11",
        "ximagesize" : 2000,
        "yimagesize" : 2000,
        "zimagesize" : 100,
        "xvoxelres" : 5.0,
        "yvoxelres" : 5.0,
        "zvoxelres" : 10.0,
        "public" : 1
      }

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 201 Created
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

Get
---

.. _json-getdataset:

.. http:get:: (string:server_name)/nd/resource/dataset/(string:dataset_name)/

   :synopsis: Get a dataset

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Dataset name in NeuroData
   :type dataset_name: string

   :statuscode 200: OK. Get dataset information
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      GET /nd/resource/dataset/kasthuri11/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: text/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 201 Created
      Content-Type: application/json

      {
        "dataset_name" : "kasthuri11",
        "ximagesize" : 2000,
        "yimagesize" : 2000,
        "zimagesize" : 100,
        "xvoxelres" : 5.0,
        "yvoxelres" : 5.0,
        "zvoxelres" : 10.0,
        "public" : 1
      }

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

List
----

.. _json-listdataset:

.. http:get:: (string:server_name)/nd/resource/dataset/

   :synopsis: List all datasets owned by the user

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string

   :statuscode 200: OK. List of datasets returned
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      GET /nd/resource/dataset/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: text/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 200 OK
      Content-Type: application/json

      {
        "kasthuri11"
        "bock11"
        "lee15"
      }

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

List Public
-----------

.. _json-publicdataset:

.. http:get:: (string:server_name)/nd/resource/public/dataset/

   :synopsis: List all public datasets

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string

   :statuscode 200: OK. List of datasets returned
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      GET /nd/resource/public/dataset/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: text/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 200 OK
      Content-Type: application/json

      {
        "kasthuri11"
      }

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

Delete
------

.. _json-deletedataset:

.. http:delete:: (string:server_name)/nd/resource/dataset/(string:dataset_name)/

   :synopsis: Delete a dataset

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Dataset name
   :type dataset_name: string

   :statuscode 204: No content. Resource deleted
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      DELETE /nd/resource/dataset/kasthuri11/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: test/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 204 No Content
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

Project
=======

Create
------

.. _json-createproject:

.. http:post:: (string:server_name)/nd/resource/dataset/{string:dataset_name)/project/(string:project_name)/

   :synopsis: Create a project

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Name of dataset
   :type dataset_name: string
   :param project_name: Name of dataset
   :type project_name: string

   :statuscode 201: Resource created
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      POST /nd/resource/dataset/kasthuri11/project/kat11/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: application/json

      {
        "project_name" : "kat11",
        "host" : "localhost",
        "s3backend" : 1,
        "public" : 1,
        "kvserver" : "localhost",
        "kvengine" : "Redis",
      }

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 201 Created
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

Get
---

.. _json-getproject:

.. http:get:: (string:server_name)/nd/resource/dataset/{string:dataset_name)/project/(string:project_name)/

   :synopsis: Get a project

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Name of dataset
   :type dataset_name: string
   :param project_name: Name of dataset
   :type project_name: string

   :statuscode 201: Resource created
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      GET /nd/resource/dataset/kasthuri11/project/kat11/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: text/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 200 OK
      Content-Type: application/json

      {
        "project_name" : "kat11",
        "host" : "localhost",
        "s3backend" : 1,
        "public" : 1,
        "kvserver" : "localhost",
        "kvengine" : "Redis",
      }

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

Delete
------

.. _json-deleteproject:

.. http:delete:: (string:server_name)/nd/resource/dataset/(string:dataset_name)/project/(string:project_name)

   :synopsis: Delete a dataset

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Dataset name
   :type datset_name: string
   :param project_name: Project name
   :type project_name: string

   :statuscode 204: No content. Resource deleted
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      DELETE /nd/resource/dataset/kasthuri11/project/kat11/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: test/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 204 No Content
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

List
----

.. _json-listproject:

.. http:get:: (string:server_name)/nd/resource/dataset/(string:dataset_name)/project/

   :synopsis: List all projectss owned by the user for dataset_name

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Dataset name
   :type dataset_name: string

   :statuscode 200: OK. List of datasets returned
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      GET /nd/resource/kasthuri11/project/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: text/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 200 OK
      Content-Type: application/json

      {
        "kat11"
        "kat11cc"
        "kat11test"
      }

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 200 OK
      Content-Type: text/plain

Channel
=======

Create
------

.. _json-createchannel:

.. http:post:: (string:server_name)/nd/resource/dataset/(string:dataset_name)/project/(string:project_name)/channel/(string:channel_name)/

   :synopsis: Create a channel

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Name of dataset
   :type dataset_name: string
   :param: project_name: Name of project
   :type project_name: string
   :param: channel_name: Name of channel
   :type channel_name: string

   :statuscode 201: Resource created
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      POST /nd/resource/kasthuri11/project/kat11/channel/ch0/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: application/json

      {
        "channel_name" : "ch0",
        "channel_type" : "image",
        "channel_datatype" : "uint8",
        "startwindow" : 0,
        "endwindow" : 500,
      }

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 201 Created
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

Get
---

.. _json-getchannel:

.. http:get:: (string:server_name)/nd/resource/dataset/(string:dataset_name)/project/(string:project_name)/channel/(string:channel_name)/

   :synopsis: Create a channel

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Name of dataset
   :type dataset_name: string
   :param: project_name: Name of project
   :type project_name: string
   :param: channel_name: Name of channel
   :type channel_name: string

   :statuscode 200: OK. Channel information returned.
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      GET /nd/resource/kasthuri11/project/kat11/channel/ch0/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: text/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 200 OK
      Content-Type: application/json

      {
        "channel_name" : "ch0",
        "channel_type" : "image",
        "channel_datatype" : "uint8",
        "startwindow" : 0,
        "endwindow" : 500,
      }

   .. sourcecode:: http

      HTTP/1.1 200 OK
      Content-Type: application/json

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

Delete
------

.. _json-deletechannel:

.. http:delete:: (string:server_name)/nd/resource/dataset/(string:dataset_name)/project/(string:project_name)/channel/(string:channel_name)/

   :synopsis: Delete a channel

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Dataset name
   :type datset_name: string
   :param project_name: Project name
   :type project_name: string
   :param channel_name: Channel name
   :type channel_name: string

   :statuscode 204: No content. Resource deleted
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      DELETE /nd/resource/dataset/kasthuri11/project/kat11/channel/ch0/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: test/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 204 No Content
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

Token
=====

Create
------

.. _json-createtoken:

.. http:post:: (string:server_name)/nd/resource/dataset/(string:dataset_name)/project/(string:project_name)/token/(string:token_name)/

   :synopsis: Create a token

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Name of dataset
   :type dataset_name: string
   :param: project_name: Name of project
   :type project_name: string
   :param: token_name: Name of token
   :type token_name: string

   :statuscode 201: Resource created
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      POST /nd/resource/kasthuri11/project/kat11/token/kasthuri11/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: application/json

      {
        "token_name" : "kasthuri11",
        "public" : 1
      }

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 201 Created
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

Get
---

.. _json-gettoken:

.. http:get:: (string:server_name)/nd/resource/dataset/(string:dataset_name)/project/(string:project_name)/token/(string:token_name)/

   :synopsis: Create a token

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Name of dataset
   :type dataset_name: string
   :param: project_name: Name of project
   :type project_name: string
   :param: token_name: Name of token
   :type token_name: string

   :statuscode 200: OK. Channel information returned.
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      GET /nd/resource/kasthuri11/project/kat11/token/kasthuri11/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: text/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 200 OK
      Content-Type: application/json

      {
        "token_name" : "kasthuri11",
        "public" : 1
      }

   .. sourcecode:: http

      HTTP/1.1 200 OK
      Content-Type: application/json

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

Delete
------

.. _json-deletetoken:

.. http:delete:: (string:server_name)/nd/resource/dataset/(string:dataset_name)/project/(string:project_name)/token/(string:token_name)/

   :synopsis: Delete a token

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string
   :param dataset_name: Dataset name
   :type datset_name: string
   :param project_name: Project name
   :type project_name: string
   :param channel_name: Channel name
   :type channel_name: string

   :statuscode 204: No content. Resource deleted
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      DELETE /nd/resource/dataset/kasthuri11/project/kat11/token/kasthuri11/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: test/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 204 No Content
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain

List Public
-----------

.. _json-publictoken:

.. http:get:: (string:server_name)/nd/resource/public/token/

   :synopsis: List all public tokens

   :param server_name: Server Name in NeuroData. In the general case this is cloud.neurodata.io
   :type server_name: string

   :statuscode 200: OK. List of datasets returned
   :statuscode 400: Bad Request. Incorrect syntax
   :statuscode 403: Forbidden. Insufficient permissions.

   **Example Request**:

   .. sourcecode:: http

      GET /nd/resource/public/token/ HTTP/1.1
      Host: cloud.neurodata.io
      Content-Type: text/plain

   **Example Responses**:

   .. sourcecode:: http

      HTTP/1.1 200 OK
      Content-Type: application/json

      {
        "kasthuri11",
        "bock11"
      }

   .. sourcecode:: http

      HTTP/1.1 400 BadRequest
      Content-Type: text/plain

   .. sourcecode:: http

      HTTP/1.1 403 Forbidden
      Content-Type: text/plain


text:
title: With my socks for sleeping
image: assets/images/fulls/with-my-socks-for-sleeping.jpg
thumbnail: assets/images/thumbs/with-my-socks-for-sleeping.jpg
caption: With a mosquito teddy in the center of Milan at La Rinascente 🐻
---

redpajama_set_name: RedPajamaGithub


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

package org.apache.tapestry.workbench;

import org.apache.tapestry.IMarkupWriter;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.form.IFormComponent;
import org.apache.tapestry.valid.IValidator;
import org.apache.tapestry.valid.ValidationDelegate;

/**
 *
 *  @author Howard Lewis Ship
 *  @version $Id$
 *  @since 1.0.6
 *
 **/

public class WorkbenchValidationDelegate extends ValidationDelegate
{
    public void writeAttributes(
        IMarkupWriter writer,
        IRequestCycle cycle,
        IFormComponent component,
        IValidator validator)
    {
        if (isInError())
            writer.attribute("class", "field-error");
    }

    public void writeSuffix(
        IMarkupWriter writer,
        IRequestCycle cycle,
        IFormComponent component,
        IValidator validator)
    {
        if (isInError())
        {
            writer.print(" ");
            writer.beginEmpty("img");
            writer.attribute("src", "images/Warning-small.gif");
            writer.attribute("height", 20);
            writer.attribute("width", 20);
        }
    }

    public void writeLabelPrefix(
        IFormComponent component,
        IMarkupWriter writer,
        IRequestCycle cycle)
    {
        if (isInError(component))
        {
            writer.begin("span");
            writer.attribute("class", "label-error");
        }
    }

    public void writeLabelSuffix(
        IFormComponent component,
        IMarkupWriter writer,
        IRequestCycle cycle)
    {
        if (isInError(component))
            writer.end(); // <span>
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LightRiver.Net.Sockets
{
    public class TelegramExchangerHost
    {
        /// <summary>
        /// server address (IP address)
        /// </summary>
        public string Host { get; set; }

        /// <summary>
        /// connection port (between 0 ~ 65535)
        /// </summary>
        public string Port { get; set; }

        public TelegramExchangerHost(string host, string port)
        {
            Host = host;
            Port = port;
        }
    }
}


text:
/**
 * @fileoverview This panel plots the channel data send to the abbozza!-monitor.
 *
 * @author michael.brinkmeier@uni-osnabrueck.de (Michael Brinkmeier)
 */
package de.uos.inf.did.abbozza.monitor;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.util.Enumeration;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;

/**
 *
 * @author mbrinkmeier
 */
public class Graph extends javax.swing.JPanel implements TableModelListener {

    public final int TIMESTAMP = 0;
    public final int ROWCOUNT = 1;

    private TableMonitorModel tableModel;
    private int xType = ROWCOUNT;
    private int xInterval;

    private int xZoom = 1;
    private int yZoom = 1;

    private Color[] colors;

    private TableMonitorModel myTable;

    public Graph() {
        myTable = null;
        initComponents();
        colors = new Color[5];
        colors[0] = Color.RED;
        colors[1] = Color.GREEN;
        colors[2] = Color.CYAN;
        colors[3] = Color.ORANGE;
        colors[4] = Color.MAGENTA;
        this.setPreferredSize(new Dimension(512,getHeight()));
    }

    /**
     * Creates new form Graph
     */
    public Graph(TableMonitorModel table) {
        myTable = table;
        myTable.addTableModelListener(this);
        initComponents();
        colors = new Color[5];
        colors[0] = Color.RED;
        colors[1] = Color.GREEN;
        colors[2] = Color.CYAN;
        colors[3] = Color.ORANGE;
        colors[4] = Color.BLACK;
        // at most a tenth of a second
        this.setPreferredSize(new Dimension(512,getHeight()));
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents

    public void setTableModel(TableMonitorModel model) {
        myTable = model;
            int width = 0;
            if ( xType == TIMESTAMP ) {
                width = (int) ((myTable.getMaxTimestamp()-myTable.getMinTimestamp())/100);
            } else {
                width = myTable.getRowCount();
            }
        myTable.addTableModelListener(this);
        this.setPreferredSize(new Dimension(width,getHeight()));
        this.scrollRectToVisible(new Rectangle(width-1,0,width,0));
        this.revalidate();
    }

    public void paint(Graphics gr) {

        // Fill background
        Graphics2D gr2d = (Graphics2D) gr;
        gr.setColor(Color.BLACK);
        gr.fillRect(0,0,getWidth(), getHeight());

        Rectangle rect = this.getVisibleRect();

        // Draw marks
        // Digital marks
        gr.setColor(Color.GRAY);
        gr.drawLine(rect.x, (getHeight()-1)*6/7, rect.x+rect.width, (getHeight()-1)*6/7);
        gr.drawLine(rect.x, (getHeight()-1)*1/7, rect.x+rect.width, (getHeight()-1)*1/7);
        gr.drawString("low", rect.x + rect.width - 30, (getHeight()-1)*6/7 - 2);
        gr.drawString("high", rect.x + rect.width - 30, (getHeight()-1)*1/7 + 13);

        // 10 and 16 Bit marks
        for (int i=0; i < rect.width; i=i+20) {
            gr.drawLine(rect.x+i,getHeight()/2,rect.x+i+10,getHeight()/2);
            gr.drawLine(rect.x+i,getHeight()*3/4,rect.x+i+10,getHeight()*3/4);
            gr.drawLine(rect.x+i,getHeight()/4,rect.x+i+10,getHeight()/4);
        }
        gr.drawString("512",rect.x+5,getHeight()/2-2);
        gr.drawString("256",rect.x+5,getHeight()/4-2);
        gr.drawString("768",rect.x+5,getHeight()*3/4-2);
        gr.drawString("32768",rect.x+rect.width/2-15,getHeight()/2-2);
        gr.drawString("16348",rect.x+rect.width/2-15,getHeight()/4-2);
        gr.drawString("49152",rect.x+rect.width/2-15,getHeight()*3/4-2);

        int row = 0;
        Enumeration<TableMonitorModel.Entry> en = myTable.getEntries();
        while ( en.hasMoreElements() ) {
            TableMonitorModel.Entry entry = en.nextElement();
            for (int i = 0; i < 5; i++) {
                gr.setColor(colors[i]);
                int x = 0;
                int y = entry.values[i];
                switch ( myTable.getType(i) ) {
                    case '0' :
                        y = (getHeight()-1)*(6-5*y)/7;
                        break;
                    case '1' :
                        y = (getHeight()-1)*(1023-y)/1023;
                        break;
                    case '3' :
                        y = (getHeight()-1)*(32767-y)/65535;
                        break;
                    default:
                        y = (getHeight()-1)*(65535-y)/65535;
                }
                if ( xType == TIMESTAMP ) {
                    x = (int) (entry.timestamp/100);
                } else if ( xType == ROWCOUNT ) {
                    x = row;
                }
                gr.fillOval(x*xZoom-1,y*yZoom-1, 2, 2);
            }
            row++;
        }

        for ( int i = 0; i < 5; i++ ) {
            gr.setColor(colors[i]);
            gr.drawString("Kanal " + (i+1) , rect.x+15, rect.y+15+i*15);
        }
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables

    @Override
    public void tableChanged(TableModelEvent e) {
        boolean scroll = false;
        if (e.getSource() == myTable) {
            int width = 0;
            if ( xType == TIMESTAMP ) {
                width = (int) ((myTable.getMaxTimestamp()-myTable.getMinTimestamp())/100);
            } else {
                width = myTable.getRowCount();
            }
            Rectangle rect = getVisibleRect();
            if ( rect.x+rect.width >= getWidth() ) scroll = true;
            this.setPreferredSize(new Dimension(width,getHeight()));
            this.revalidate();
            if (scroll) this.scrollRectToVisible(new Rectangle(width-1,0,1,getHeight()));
            this.repaint();
        }
    }

}


text:
package me.dommi2212.BungeeBridge.packets;

import java.io.Serializable;

import me.dommi2212.BungeeBridge.BungeePacket;
import me.dommi2212.BungeeBridge.BungeePacketType;

/**
 * Packet used run command(s) from BungeeCord-Console.
 */
@SuppressWarnings("serial")
public class PacketRunCommand extends BungeePacket implements Serializable {

	private String[] commands;

	/**
	 * Instantiates a new PacketRunCommand.
	 *
	 * @param commands the command(s) to run with args.
	 */
	public PacketRunCommand(String... commands) {
		super(BungeePacketType.RUNCOMMAND, false);
		this.commands = commands;
	}

	/**
	 * Gets the commands.
	 *
	 * @return commands
	 */
	public String[] getCommands() {
		return commands;
	}

}


text:
<?xml version='1.0' encoding='utf-8' ?>
<resources>
  <string name='app_name'>Hello World</string>
  <string name='pulser'>Pulser String</string>
  <string name='party'>Party String</string>
</resources>


text:
/* ---------------------------------------------------------------------------- */
/*                  Atmel Microcontroller Software Support                      */
/*                       SAM Software Package License                           */
/* ---------------------------------------------------------------------------- */
/* Copyright (c) 2014, Atmel Corporation                                        */
/*                                                                              */
/* All rights reserved.                                                         */
/*                                                                              */
/* Redistribution and use in source and binary forms, with or without           */
/* modification, are permitted provided that the following condition is met:    */
/*                                                                              */
/* - Redistributions of source code must retain the above copyright notice,     */
/* this list of conditions and the disclaimer below.                            */
/*                                                                              */
/* Atmel's name may not be used to endorse or promote products derived from     */
/* this software without specific prior written permission.                     */
/*                                                                              */
/* DISCLAIMER:  THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR   */
/* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE   */
/* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,      */
/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,  */
/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF    */
/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING         */
/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                           */
/* ---------------------------------------------------------------------------- */

#ifndef _SAMV71_ACC_INSTANCE_
#define _SAMV71_ACC_INSTANCE_

/* ========== Register definition for ACC peripheral ========== */
#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  #define REG_ACC_CR                    (0x40044000U) /**< \brief (ACC) Control Register */
  #define REG_ACC_MR                    (0x40044004U) /**< \brief (ACC) Mode Register */
  #define REG_ACC_IER                   (0x40044024U) /**< \brief (ACC) Interrupt Enable Register */
  #define REG_ACC_IDR                   (0x40044028U) /**< \brief (ACC) Interrupt Disable Register */
  #define REG_ACC_IMR                   (0x4004402CU) /**< \brief (ACC) Interrupt Mask Register */
  #define REG_ACC_ISR                   (0x40044030U) /**< \brief (ACC) Interrupt Status Register */
  #define REG_ACC_ACR                   (0x40044094U) /**< \brief (ACC) Analog Control Register */
  #define REG_ACC_WPMR                  (0x400440E4U) /**< \brief (ACC) Write Protection Mode Register */
  #define REG_ACC_WPSR                  (0x400440E8U) /**< \brief (ACC) Write Protection Status Register */
#else
  #define REG_ACC_CR   (*(__O  uint32_t*)0x40044000U) /**< \brief (ACC) Control Register */
  #define REG_ACC_MR   (*(__IO uint32_t*)0x40044004U) /**< \brief (ACC) Mode Register */
  #define REG_ACC_IER  (*(__O  uint32_t*)0x40044024U) /**< \brief (ACC) Interrupt Enable Register */
  #define REG_ACC_IDR  (*(__O  uint32_t*)0x40044028U) /**< \brief (ACC) Interrupt Disable Register */
  #define REG_ACC_IMR  (*(__I  uint32_t*)0x4004402CU) /**< \brief (ACC) Interrupt Mask Register */
  #define REG_ACC_ISR  (*(__I  uint32_t*)0x40044030U) /**< \brief (ACC) Interrupt Status Register */
  #define REG_ACC_ACR  (*(__IO uint32_t*)0x40044094U) /**< \brief (ACC) Analog Control Register */
  #define REG_ACC_WPMR (*(__IO uint32_t*)0x400440E4U) /**< \brief (ACC) Write Protection Mode Register */
  #define REG_ACC_WPSR (*(__I  uint32_t*)0x400440E8U) /**< \brief (ACC) Write Protection Status Register */
#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */

#endif /* _SAMV71_ACC_INSTANCE_ */


text:
<?xml version="1.0"?>
<skillsets class="FDF10">
  <skillset id="FDFSS00001" title="Cellar Door Sales Induction">
    <units>
      <unit id="FDFCD2002A" title="Promote wine tourism information"/>
      <unit id="FDFCD2003A" title="Evaluate wines (standard)"/>
      <unit id="FDFCD2006A" title="Conduct a standard product tasting"/>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="SIRXCCS202" title="Interact with customers"/>
      <unit id="SITHFAB009A" title="Provide responsible service of alcohol"/>
    </units>
  </skillset>
  <skillset id="FDFSS00002" title="Cellar Hand Induction">
    <units>
      <unit id="FDFCEL2019A" title="Carry out transfer operations"/>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFOP2004A" title="Clean and sanitise equipment"/>
      <unit id="FDFWIN1001A" title="Identify key operations in wine production"/>
      <unit id="TLID2003A" title="Handle dangerous goods/hazardous substances"/>
    </units>
  </skillset>
  <skillset id="FDFSS00003" title="Chemical Handling Certification">
    <units>
      <unit id="AHCCHM101A" title="Follow basic chemical safety rules"/>
      <unit id="AHCCHM201A" title="Apply chemicals under supervision"/>
      <unit id="AHCCHM303A" title="Prepare and apply chemicals"/>
      <unit id="AHCCHM304A" title="Transport, handle and store chemicals"/>
    </units>
  </skillset>
  <skillset id="FDFSS00004" title="Confined Space">
    <units>
      <unit id="MSAPMOHS216A" title="Operate breathing apparatus"/>
      <unit id="MSAPMOHS217A" title="Gas test atmospheres"/>
      <unit id="MSAPMPER200C" title="Work in accordance with an issued permit"/>
      <unit id="MSAPMPER205C" title="Enter confined space"/>
    </units>
  </skillset>
  <skillset id="FDFSS00005" title="Distillation Operations">
    <units>
      <unit id="FDFCEL2004A" title="Perform single column lees stripping (continuous still brandy) operations"/>
      <unit id="FDFCEL2008A" title="Perform dual column distillation (continuous still brandy) operations"/>
      <unit id="FDFCEL2012A" title="Handle spirits"/>
      <unit id="FDFCEL2019A" title="Carry out transfer operations"/>
      <unit id="FDFCEL3005A" title="Perform rectification (continuous still) operations"/>
      <unit id="FDFOP2004A" title="Clean and sanitise equipment"/>
      <unit id="FDFOP2013A" title="Apply sampling procedures"/>
      <unit id="MSL973001A" title="Perform basic tests"/>
    </units>
  </skillset>
  <skillset id="FDFSS00006" title="Evaporator Station Operator">
    <units>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFOP2030A" title="Operate a process control interface"/>
      <unit id="FDFOP2034A" title="Operate an evaporation process"/>
      <unit id="FDFSUG210A" title="Operate a juice clarification process"/>
      <unit id="FDFSUG211A" title="Operate a mud filtration process"/>
      <unit id="FDFSUG212A" title="Chemically clean equipment"/>
      <unit id="FDFSUG225A" title="Collect and prepare samples"/>
    </units>
  </skillset>
  <skillset id="FDFSS00007" title="Food Safety">
    <units>
      <unit id="FDFFS1001A" title="Follow work procedures to maintain food safety"/>
      <unit id="FDFFS2001A" title="Implement the food safety program and procedures"/>
    </units>
  </skillset>
  <skillset id="FDFSS00008" title="Forklift Operations">
    <units>
      <unit id="TLID2010A" title="Operate a forklift"/>
    </units>
  </skillset>
  <skillset id="FDFSS00009" title="Fugal Operator">
    <units>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFOP2030A" title="Operate a process control interface"/>
      <unit id="FDFSUG214A" title="Operate a low grade fugal station"/>
      <unit id="FDFSUG215A" title="Operate a high grade fugal station"/>
      <unit id="FDFSUG225A" title="Collect and prepare samples"/>
    </units>
  </skillset>
  <skillset id="FDFSS00010" title="Hand Pruning Induction">
    <units>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFWGG2003A" title="Hand prune vines"/>
    </units>
  </skillset>
  <skillset id="FDFSS00011" title="Irrigation">
    <units>
      <unit id="FDFWGG2004A" title="Undertake irrigation systems maintenance activities"/>
      <unit id="FDFWGG2011A" title="Install irrigation components"/>
    </units>
  </skillset>
  <skillset id="FDFSS00012" title="Loco Driver">
    <units>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFSUG206A" title="Drive a cane locomotive"/>
    </units>
  </skillset>
  <skillset id="FDFSS00013" title="Manual Handling">
    <units>
      <unit id="TLID1001A" title="Shift materials safely using manual handling methods"/>
      <unit id="TLID1002A" title="Shift a load using manually-operated equipment"/>
    </units>
  </skillset>
  <skillset id="FDFSS00014" title="Mechanical Harvesting for Seasonal Workers">
    <units>
      <unit id="AHCMOM202A" title="Operate tractors"/>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFWGG2015A" title="Support mechanical harvesting operations"/>
      <unit id="FDFWGG2018A" title="Operate vineyard equipment"/>
    </units>
  </skillset>
  <skillset id="FDFSS00015" title="Platform Operator">
    <units>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFOP2030A" title="Operate a process control interface"/>
      <unit id="FDFSUG209A" title="Operate an extraction station"/>
      <unit id="FDFSUG217A" title="Operate a turbine"/>
      <unit id="FDFSUG306A" title="Monitor a sugar mill powerhouse"/>
    </units>
  </skillset>
  <skillset id="FDFSS00016" title="Responsible Service of Alcohol">
    <units>
      <unit id="SITHFAB009A" title="Provide responsible service of alcohol"/>
    </units>
  </skillset>
  <skillset id="FDFSS00017" title="Risk Management">
    <units>
      <unit id="FDFFS2001A" title="Implement the food safety program and procedures"/>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFWIN2002A" title="Identify and control risks in own work"/>
      <unit id="MSAENV272B" title="Participate in environmentally sustainable work practices"/>
      <unit id="MSS402051A" title="Apply quality standards"/>
    </units>
  </skillset>
  <skillset id="FDFSS00018" title="Seasonal Nursery Induction">
    <units>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFWGG2010A" title="Field graft vines"/>
    </units>
  </skillset>
  <skillset id="FDFSS00019" title="Sugar Boiler">
    <units>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFOP2030A" title="Operate a process control interface"/>
      <unit id="FDFSUG212A" title="Chemically clean equipment"/>
      <unit id="FDFSUG213A" title="Operate a pans station"/>
      <unit id="FDFSUG216A" title="Operate a crystalliser station process"/>
      <unit id="FDFSUG225A" title="Collect and prepare samples"/>
    </units>
  </skillset>
  <skillset id="FDFSS00020" title="Trellis Management">
    <units>
      <unit id="AHCMOM202A" title="Operate tractors"/>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFWGG2016A" title="Install and maintain vine trellis"/>
    </units>
  </skillset>
  <skillset id="FDFSS00021" title="Vintage Laboratory Operations">
    <units>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="MSL912001A" title="Work within a laboratory_field workplace (induction)"/>
      <unit id="MSL922001A" title="Record and present data"/>
      <unit id="MSL943002A" title="Participate in laboratory_field workplace safety"/>
      <unit id="MSL952001A" title="Collect routine site samples"/>
    </units>
  </skillset>
  <skillset id="FDFSS00022" title="Warehouse Induction">
    <units>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="TLIA2012A" title="Pick and process orders"/>
    </units>
  </skillset>
  <skillset id="FDFSS00023" title="Water Tender">
    <units>
      <unit id="FDFOHS2001A" title="Participate in OHS processes"/>
      <unit id="FDFOP2030A" title="Operate a process control interface"/>
      <unit id="FDFSUG217A" title="Operate a turbine"/>
      <unit id="FDFSUG219A" title="Operate a bagasse fuel supply system"/>
      <unit id="FDFSUG305A" title="Operate a boiler advanced"/>
    </units>
  </skillset>
  <skillset id="FDFSS00024" title="Wine Evaluation">
    <units>
      <unit id="FDFCD2003A" title="Evaluate wines (standard)"/>
      <unit id="FDFCD3001A" title="Evaluate wines (advanced)"/>
    </units>
  </skillset>
</skillsets>


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 clase23;

/**
 *
 * @author alumno
 */
public class FormulaUno {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        Carrera NuevaCarrera = new Carrera();

        NuevaCarrera.CorrerCarrera(5);

        Auto Ganador = NuevaCarrera.DameElGanador();

        Ganador.Mostrar();
    }

}


text:
#region [R# naming]
// ReSharper disable ArrangeTypeModifiers
// ReSharper disable UnusedMember.Local
// ReSharper disable FieldCanBeMadeReadOnly.Local
// ReSharper disable ArrangeTypeMemberModifiers
// ReSharper disable InconsistentNaming
#endregion
using System;
using System.Linq;
using NUnit.Framework;
using System.Threading.Tasks;
using FluentAssertions;

namespace NSpectator.Specs.Running
{
    [TestFixture]
    [Category("RunningSpecs")]
    public class Describe_method_level_befores : When_running_specs
    {
        class SpecClass : Spec
        {
            public static Action ContextLevelBefore = () => { };
            public static Action SubContextBefore = () => { };
            public static Func<Task> AsyncSubContextBefore = async () => { await Task.Delay(0); };

            // method- (or class-) level before
            void before_each()
            {
            }

            void method_level_context()
            {
                Before = ContextLevelBefore;

                Context["sub context"] = () =>
                {
                    Before = SubContextBefore;

                    It["needs an example or it gets filtered"] = Todo;
                };

                Context["sub context with async before"] = () =>
                {
                    BeforeAsync = AsyncSubContextBefore;

                    It["needs another example or it gets filtered"] = Todo;
                };
            }
        }

        [SetUp]
        public void Setup()
        {
            Run(typeof(SpecClass));
        }

        [Test]
        public void it_should_set_method_level_before()
        {
            // Could not find a way to actually verify that deep inside
            // 'BeforeInstance' there is a reference to 'SpecClass.before_each()'

            classContext.BeforeInstance.Should().NotBeNull();
        }

        [Test]
        [Category("Async")]
        public void it_should_not_set_async_method_level_before()
        {
            classContext.BeforeInstanceAsync.Should().BeNull();
        }

    }
}


text:
package io.requery.converter;

import io.requery.Converter;

import java.net.URI;

/**
 * Converter for a {@link URI}
 */
public class URIConverter implements Converter<URI, String> {

    @Override
    public Class<URI> getMappedType() {
        return URI.class;
    }

    @Override
    public Class<String> getPersistedType() {
        return String.class;
    }

    @Override
    public Integer getPersistedSize() {
        return null;
    }

    @Override
    public String convertToPersisted(URI value) {
        return value == null ? null : value.toString();
    }

    @Override
    public URI convertToMapped(Class<? extends URI> type, String value) {
        return value == null ? null : URI.create(value);
    }
}


text:
/*
* Given the config url and params, possibly prepend the global url
* in front of the config url.
*/
const { startsWith }	= require('../../utils/mout');
const _ = require('lodash');

const substitute = require('../substitute');
const localOnly = require('./localOnly');

const URL_PROPERTY_ERROR_MESSAGE = '`url` in global configuration is deprecated. Use `baseUrl` instead.';

function processUrl (config, params) {

	if (localOnly(config, 'baseUrl')) {
		return substitute(config.url, params);
	}

	if (this._globalOptions.url) {
		if (process.env.NODE_ENV === 'development') {
			throw new Error(URL_PROPERTY_ERROR_MESSAGE);
		} else {
			// eslint-disable-next-line no-console
			console.warn(URL_PROPERTY_ERROR_MESSAGE);
		}
	}

	//Ordering is significant - if globals true, global should run first
	const subbedGlobalUrl = substitute(this._globalOptions.baseUrl || this._globalOptions.url, params);
	const subbedUrl = (
		config.url === '' ?
		config.url :
		substitute(config.url, params)
	);

	// Add the URL
	return (
		_.isString(subbedGlobalUrl) &&
		!startsWith(subbedUrl, 'http://') &&
		!startsWith(subbedUrl, 'https://') ?
		subbedGlobalUrl + subbedUrl :
		subbedUrl
	);

}

module.exports = function (config, params) {
	const processedUrl = processUrl.call(this, config, params);
	if (_.isString(processedUrl) && processedUrl !== '') {
		return processedUrl;
	} else {
		throw new Error('A valid URL has not been supplied.');
	}
};


text:
package cli

type SousConfig struct {
}

func init() { TopLevelCommands["config"] = &SousConfig{} }

const sousConfigHelp = `
view and edit sous configuration

usage: sous config [<key> [value]]

Invoking sous config with no arguments lists all configuration key/value pairs.
If you pass just a single argument (a key) sous config will output just the
value of that key. You can set a key by providing both a key and a value.
`

func (sc *SousConfig) Help() string { return sousConfigHelp }


text:
Imports System.Collections.ObjectModel
Imports BVSoftware.BVC5.Core

Partial Class BVModules_Controls_ProductReviewsList
    Inherits System.Web.UI.UserControl

    Private _Title As String = String.Empty
    Private _MinimumRating As Integer = 1
    Private _IgnoreBadKarma As Boolean = False
    Private _IgnoreAnonymousReviews As Boolean = False
    Private _CategoryId As String = String.Empty
    Private _NumberOfItems As Integer = 10
    Private _TruncateReview As Boolean = False
    Private _TruncateReviewLength As Integer = 9999
    Private _DateFormat As String = "M/d/yyyy"
    Private _PreContentHtml As String = String.Empty
    Private _PostContentHtml As String = String.Empty

#Region " Properties "

    Public Property Title() As String
        Get
            Return Me._Title
        End Get
        Set(ByVal value As String)
            Me._Title = value
        End Set
    End Property

    Public Property MinimumRating() As Integer
        Get
            Return Me._MinimumRating
        End Get
        Set(ByVal value As Integer)
            Me._MinimumRating = value
        End Set
    End Property

    Public Property IgnoreBadKarma() As Boolean
        Get
            Return Me._IgnoreBadKarma
        End Get
        Set(ByVal value As Boolean)
            Me._IgnoreBadKarma = value
        End Set
    End Property

    Public Property IgnoreAnonymousReviews() As Boolean
        Get
            Return Me._IgnoreAnonymousReviews
        End Get
        Set(ByVal value As Boolean)
            Me._IgnoreAnonymousReviews = value
        End Set
    End Property

    Public Property CategoryId() As String
        Get
            Return Me._CategoryId
        End Get
        Set(ByVal value As String)
            Me._CategoryId = value
        End Set
    End Property

    Public Property NumberOfItems() As Integer
        Get
            Return Me._NumberOfItems
        End Get
        Set(ByVal value As Integer)
            Me._NumberOfItems = value
        End Set
    End Property

    Public Property TruncateReview() As Boolean
        Get
            Return Me._TruncateReview
        End Get
        Set(ByVal value As Boolean)
            Me._TruncateReview = value
        End Set
    End Property

    Public Property TruncateReviewLength() As Integer
        Get
            Return Me._TruncateReviewLength
        End Get
        Set(ByVal value As Integer)
            Me._TruncateReviewLength = value
        End Set
    End Property

    Public Property DateFormat() As String
        Get
            Return Me._DateFormat
        End Get
        Set(ByVal value As String)
            Me._DateFormat = value
        End Set
    End Property

#End Region

    Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
        MyBase.OnInit(e)

        Me.EnableViewState = False
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If String.IsNullOrEmpty(Me.Title) Then
            Me.hTitle.Visible = False
        Else
            Me.hTitle.InnerText = Me.Title
        End If

        Dim productReviews As Collection(Of Catalog.ProductReview) = Catalog.ProductReview.FindLatestProductReviews(Me.MinimumRating, Me.IgnoreBadKarma, Me.IgnoreAnonymousReviews, Me.CategoryId, Me.NumberOfItems)
        Me.rpProductReviewList.DataSource = productReviews
        Me.rpProductReviewList.DataBind()
    End Sub

    Protected Sub rpProductReviewList_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rpProductReviewList.ItemDataBound
        If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then
            Dim pr As Catalog.ProductReview = CType(e.Item.DataItem, Catalog.ProductReview)

            If pr IsNot Nothing Then

                Dim imgReviewRating As Image = CType(e.Item.FindControl("imgReviewRating"), Image)
                If imgReviewRating IsNot Nothing Then
                    If WebAppSettings.ProductReviewShowRating = True Then
                        imgReviewRating.ImageUrl = Catalog.ProductReview.GetStarImageUrl(pr.Rating)
                        imgReviewRating.AlternateText = String.Format("{0} Star{1}", pr.Rating.ToString(), If(pr.Rating > 1, "s", String.Empty))
                    Else
                        imgReviewRating.Visible = False
                    End If
                End If

                Dim lblName As Label = CType(e.Item.FindControl("lblName"), Label)
                If lblName IsNot Nothing Then
                    lblName.Text = Catalog.ProductReview.GetUserNameForDisplay(pr.UserID)
                End If

                Dim lblReviewDate As Label = CType(e.Item.FindControl("lblReviewDate"), Label)
                If lblReviewDate IsNot Nothing Then
                    lblReviewDate.Text = pr.ReviewDate.ToString(Me.DateFormat)
                End If

                Dim lblReviewDescription As Label = CType(e.Item.FindControl("lblReviewDescription"), Label)
                If lblReviewDescription IsNot Nothing Then
                    If Not String.IsNullOrEmpty(pr.Description) Then
                        If Me.TruncateReview AndAlso pr.Description.Length > Me.TruncateReviewLength Then
                            Dim pos As Integer = pr.Description.Substring(0, Me.TruncateReviewLength).LastIndexOf(" ")
                            If pos > 0 Then
                                lblReviewDescription.Text = pr.Description.Substring(0, pos) + "…"
                            Else
                                lblReviewDescription.Text = pr.Description.Substring(0, Me.TruncateReviewLength) + "…"
                            End If
                        Else
                            lblReviewDescription.Text = pr.Description
                        End If
                    End If
                End If

                ' display product
                Dim p As Catalog.Product = Catalog.InternalProduct.FindByBvinLight(pr.ProductBvin)

                If p IsNot Nothing AndAlso Not String.IsNullOrEmpty(p.Bvin) Then
                    Dim lnkProductName As HyperLink = CType(e.Item.FindControl("lnkProductName"), HyperLink)
                    If lnkProductName IsNot Nothing Then
                        lnkProductName.Text = p.ProductName
                        lnkProductName.ToolTip = If(Not String.IsNullOrEmpty(p.MetaTitle), p.MetaTitle, String.Empty)
                        lnkProductName.NavigateUrl = Utilities.UrlRewriter.BuildUrlForProduct(p, Me.Page)
                    End If

                    Dim ucSingleProductDisplay As BaseSingleProductDisplay = e.Item.FindControl("ucSingleProductDisplay")
                    If ucSingleProductDisplay IsNot Nothing Then
                        ucSingleProductDisplay.LoadWithProduct(p)
                    End If
                End If
            End If
        End If
    End Sub

End Class


text:
namespace gpdxl
{
	using namespace gpos;

	// fwd decl
	class CXMLSerializer;

	//---------------------------------------------------------------------------
	//	@class:
	//		CDXLDatumInt8
	//
	//	@doc:
	//		Class for representing DXL datums of type long int
	//
	//---------------------------------------------------------------------------
	class CDXLDatumInt8 : public CDXLDatum
	{
		private:
		// long int value
			LINT m_val;

			// private copy ctor
			CDXLDatumInt8(const CDXLDatumInt8 &);

		public:
			// ctor
			CDXLDatumInt8
				(
				CMemoryPool *mp,
				IMDId *mdid_type,
				BOOL is_null,
				LINT val
				);

			// dtor
			virtual
			~CDXLDatumInt8(){};

		// accessor of value
			LINT Value() const;

			// serialize the datum as the given element
			virtual
			void Serialize(CXMLSerializer *xml_serializer);

			// datum type
			virtual
			EdxldatumType GetDatumType() const
			{
				return CDXLDatum::EdxldatumInt8;
			}

			// conversion function
			static
			CDXLDatumInt8 *Cast
				(
				CDXLDatum *dxl_datum
				)
			{
			GPOS_ASSERT(NULL != dxl_datum);
			GPOS_ASSERT(CDXLDatum::EdxldatumInt8 == dxl_datum->GetDatumType());

				return dynamic_cast<CDXLDatumInt8*>(dxl_datum);
			}
	};
}

#endif // !GPDXL_CDXLDatumInt8_H

// EOF


text:
package com.box.l10n.mojito.service.drop;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * To configure the service that import/export drops.
 *
 * @author jaurambault
 */
@Component
@ConfigurationProperties("l10n.drop-service")
public class DropServiceConfig {

  /** Week offset (from the current week) used when computing the drop name. */
  int dropNameWeekOffset = 0;

  /**
   * User for imported translations If this is not set, then the authenticated user in context who
   * is importing the drop is used for all imported translations
   */
  String dropImporterUsername;

  public int getDropNameWeekOffset() {
    return dropNameWeekOffset;
  }

  public void setDropNameWeekOffset(int dropNameWeekOffset) {
    this.dropNameWeekOffset = dropNameWeekOffset;
  }

  public String getDropImporterUsername() {
    return dropImporterUsername;
  }

  public void setDropImporterUsername(String dropImporterUsername) {
    this.dropImporterUsername = dropImporterUsername;
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1">
	<ChartOfCharacteristicTypes uuid="dabae379-6356-497a-aab5-cf102f16a72a">
		<InternalInfo>
			<xr:GeneratedType name="ChartOfCharacteristicTypesObject.ВопросыДляАнкетирования" category="Object">
				<xr:TypeId>0bd966ca-bade-4b20-a01e-9b6015934833</xr:TypeId>
				<xr:ValueId>f45889c1-e657-4f3f-ae42-57486c5cd7ab</xr:ValueId>
			</xr:GeneratedType>
			<xr:GeneratedType name="ChartOfCharacteristicTypesRef.ВопросыДляАнкетирования" category="Ref">
				<xr:TypeId>be283033-405b-45ba-9ba3-50b6bd1acc2e</xr:TypeId>
				<xr:ValueId>79d13041-f7db-4b7e-95d4-4e42faa955ab</xr:ValueId>
			</xr:GeneratedType>
			<xr:GeneratedType name="ChartOfCharacteristicTypesSelection.ВопросыДляАнкетирования" category="Selection">
				<xr:TypeId>484cc5f7-7141-4621-837f-a61c1d109957</xr:TypeId>
				<xr:ValueId>b4c8b7ff-6f6b-4252-bf94-e257592b923a</xr:ValueId>
			</xr:GeneratedType>
			<xr:GeneratedType name="ChartOfCharacteristicTypesList.ВопросыДляАнкетирования" category="List">
				<xr:TypeId>a4e50147-66a0-4d23-80d3-25d27ad6505a</xr:TypeId>
				<xr:ValueId>bb858256-0140-4288-945e-8280ad7f8962</xr:ValueId>
			</xr:GeneratedType>
			<xr:GeneratedType name="Characteristic.ВопросыДляАнкетирования" category="Characteristic">
				<xr:TypeId>808f2ab1-3da5-4133-91b7-808f8815bfb8</xr:TypeId>
				<xr:ValueId>b5855429-1df2-49d3-b091-4deeb1398cf2</xr:ValueId>
			</xr:GeneratedType>
			<xr:GeneratedType name="ChartOfCharacteristicTypesManager.ВопросыДляАнкетирования" category="Manager">
				<xr:TypeId>b13ff4d8-cd1c-4c29-bb09-4fd3f1d6603e</xr:TypeId>
				<xr:ValueId>94d822b6-167f-4429-9409-00045ea71669</xr:ValueId>
			</xr:GeneratedType>
		</InternalInfo>
		<Properties>
			<Name>ВопросыДляАнкетирования</Name>
			<Synonym>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Вопросы для анкетирования</v8:content>
				</v8:item>
			</Synonym>
			<Comment/>
			<UseStandardCommands>true</UseStandardCommands>
			<IncludeHelpInContents>false</IncludeHelpInContents>
			<CharacteristicExtValues>Catalog.ВариантыОтветовАнкет</CharacteristicExtValues>
			<Type>
				<v8:Type>cfg:CatalogRef._ДемоНоменклатура</v8:Type>
				<v8:Type>xs:boolean</v8:Type>
				<v8:Type>cfg:CatalogRef._ДемоПодразделения</v8:Type>
				<v8:Type>xs:string</v8:Type>
				<v8:Type>xs:dateTime</v8:Type>
				<v8:Type>xs:decimal</v8:Type>
				<v8:Type>cfg:CatalogRef._ДемоПартнеры</v8:Type>
				<v8:Type>cfg:CatalogRef.ВариантыОтветовАнкет</v8:Type>
				<v8:NumberQualifiers>
					<v8:Digits>15</v8:Digits>
					<v8:FractionDigits>3</v8:FractionDigits>
					<v8:AllowedSign>Any</v8:AllowedSign>
				</v8:NumberQualifiers>
				<v8:StringQualifiers>
					<v8:Length>1024</v8:Length>
					<v8:AllowedLength>Variable</v8:AllowedLength>
				</v8:StringQualifiers>
				<v8:DateQualifiers>
					<v8:DateFractions>Date</v8:DateFractions>
				</v8:DateQualifiers>
			</Type>
			<Hierarchical>true</Hierarchical>
			<FoldersOnTop>true</FoldersOnTop>
			<CodeLength>9</CodeLength>
			<CodeAllowedLength>Variable</CodeAllowedLength>
			<DescriptionLength>100</DescriptionLength>
			<CodeSeries>WholeCharacteristicKind</CodeSeries>
			<CheckUnique>true</CheckUnique>
			<Autonumbering>true</Autonumbering>
			<DefaultPresentation>AsDescription</DefaultPresentation>
			<StandardAttributes>
				<xr:StandardAttribute name="PredefinedDataName">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
				<xr:StandardAttribute name="ValueType">
					<xr:LinkByType/>
					<xr:FillChecking>ShowError</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
				<xr:StandardAttribute name="Description">
					<xr:LinkByType/>
					<xr:FillChecking>ShowError</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Наименование вопроса для представления в списке вопросов. Не выводится респонденту.</v8:content>
						</v8:item>
					</xr:ToolTip>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
				<xr:StandardAttribute name="Code">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Код вопроса в плане видов характеристик</v8:content>
						</v8:item>
					</xr:ToolTip>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
				<xr:StandardAttribute name="IsFolder">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
				<xr:StandardAttribute name="Parent">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>true</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Группа вопросов для анкетирования.</v8:content>
						</v8:item>
					</xr:ToolTip>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Группа вопросов</v8:content>
						</v8:item>
					</xr:Synonym>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:type="xr:DesignTimeRef">ChartOfCharacteristicTypes.ВопросыДляАнкетирования.EmptyRef</xr:FillValue>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
				<xr:StandardAttribute name="Predefined">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
				<xr:StandardAttribute name="DeletionMark">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
				<xr:StandardAttribute name="Ref">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
			</StandardAttributes>
			<Characteristics/>
			<PredefinedDataUpdate>Auto</PredefinedDataUpdate>
			<EditType>InDialog</EditType>
			<QuickChoice>false</QuickChoice>
			<ChoiceMode>BothWays</ChoiceMode>
			<InputByString>
				<xr:Field>ChartOfCharacteristicTypes.ВопросыДляАнкетирования.StandardAttribute.Description</xr:Field>
				<xr:Field>ChartOfCharacteristicTypes.ВопросыДляАнкетирования.StandardAttribute.Code</xr:Field>
			</InputByString>
			<CreateOnInput>DontUse</CreateOnInput>
			<SearchStringModeOnInputByString>Begin</SearchStringModeOnInputByString>
			<ChoiceDataGetModeOnInputByString>Directly</ChoiceDataGetModeOnInputByString>
			<FullTextSearchOnInputByString>DontUse</FullTextSearchOnInputByString>
			<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
			<DefaultObjectForm>ChartOfCharacteristicTypes.ВопросыДляАнкетирования.Form.ФормаЭлемента</DefaultObjectForm>
			<DefaultFolderForm/>
			<DefaultListForm>ChartOfCharacteristicTypes.ВопросыДляАнкетирования.Form.ФормаСписка</DefaultListForm>
			<DefaultChoiceForm>ChartOfCharacteristicTypes.ВопросыДляАнкетирования.Form.ФормаВыбора</DefaultChoiceForm>
			<DefaultFolderChoiceForm/>
			<AuxiliaryObjectForm/>
			<AuxiliaryFolderForm/>
			<AuxiliaryListForm/>
			<AuxiliaryChoiceForm/>
			<AuxiliaryFolderChoiceForm/>
			<BasedOn/>
			<DataLockFields/>
			<DataLockControlMode>Managed</DataLockControlMode>
			<FullTextSearch>Use</FullTextSearch>
			<ObjectPresentation>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Вопрос для анкетирования</v8:content>
				</v8:item>
			</ObjectPresentation>
			<ExtendedObjectPresentation/>
			<ListPresentation/>
			<ExtendedListPresentation/>
			<Explanation/>
		</Properties>
		<ChildObjects>
			<Attribute uuid="337370e0-1021-4887-9d38-6c3833c90a5b">
				<Properties>
					<Name>Формулировка</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Формулировка</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>xs:string</v8:Type>
						<v8:StringQualifiers>
							<v8:Length>300</v8:Length>
							<v8:AllowedLength>Variable</v8:AllowedLength>
						</v8:StringQualifiers>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Формулировка вопроса, как её увидит респондент</v8:content>
						</v8:item>
					</ToolTip>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>true</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillFromFillingValue>false</FillFromFillingValue>
					<FillValue xsi:type="xs:string"/>
					<FillChecking>ShowError</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<Indexing>DontIndex</Indexing>
					<Use>ForItem</Use>
					<FullTextSearch>Use</FullTextSearch>
				</Properties>
			</Attribute>
			<Attribute uuid="0ff569eb-d5b8-4ab1-ac77-5e5afd6d44d0">
				<Properties>
					<Name>ТипОтвета</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Тип ответа</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>cfg:EnumRef.ТипыОтветовНаВопрос</v8:Type>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Тип ответа на вопрос</v8:content>
						</v8:item>
					</ToolTip>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillFromFillingValue>true</FillFromFillingValue>
					<FillValue xsi:type="xr:DesignTimeRef">Enum.ТипыОтветовНаВопрос.EmptyRef</FillValue>
					<FillChecking>ShowError</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<Indexing>Index</Indexing>
					<Use>ForItem</Use>
					<FullTextSearch>Use</FullTextSearch>
				</Properties>
			</Attribute>
			<Attribute uuid="d6f01f1c-801b-4776-ae11-48236103f76a">
				<Properties>
					<Name>ТребуетсяКомментарий</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Требуется комментарий</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>xs:boolean</v8:Type>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Признак необходимости прокомментировать данный ответ респондентом</v8:content>
						</v8:item>
					</ToolTip>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillFromFillingValue>false</FillFromFillingValue>
					<FillValue xsi:type="xs:boolean">false</FillValue>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<Indexing>DontIndex</Indexing>
					<Use>ForItem</Use>
					<FullTextSearch>Use</FullTextSearch>
				</Properties>
			</Attribute>
			<Attribute uuid="b6fe68cf-657b-40e0-af2e-247607a86519">
				<Properties>
					<Name>ПояснениеКомментария</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Пояснение комментария</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>xs:string</v8:Type>
						<v8:StringQualifiers>
							<v8:Length>150</v8:Length>
							<v8:AllowedLength>Variable</v8:AllowedLength>
						</v8:StringQualifiers>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Текст, который будет отображаться как пояснение к полю комментарий вопроса</v8:content>
						</v8:item>
					</ToolTip>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillFromFillingValue>false</FillFromFillingValue>
					<FillValue xsi:type="xs:string"/>
					<FillChecking>ShowError</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<Indexing>DontIndex</Indexing>
					<Use>ForItem</Use>
					<FullTextSearch>Use</FullTextSearch>
				</Properties>
			</Attribute>
			<Attribute uuid="9b0b8191-94b7-428f-be86-e9e4cd24a72f">
				<Properties>
					<Name>ЗаполнятьАвтоматически</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Заполнять автоматически</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>xs:boolean</v8:Type>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Доступен для предопределенных вопросов</v8:content>
						</v8:item>
					</ToolTip>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillFromFillingValue>false</FillFromFillingValue>
					<FillValue xsi:type="xs:boolean">false</FillValue>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<Indexing>DontIndex</Indexing>
					<Use>ForItem</Use>
					<FullTextSearch>Use</FullTextSearch>
				</Properties>
			</Attribute>
			<Attribute uuid="a923dbcb-7146-4445-ad17-f4a32c16a837">
				<Properties>
					<Name>Длина</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Длина</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>xs:decimal</v8:Type>
						<v8:NumberQualifiers>
							<v8:Digits>10</v8:Digits>
							<v8:FractionDigits>0</v8:FractionDigits>
							<v8:AllowedSign>Nonnegative</v8:AllowedSign>
						</v8:NumberQualifiers>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Длина строкового или числового типа ответа</v8:content>
						</v8:item>
					</ToolTip>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillFromFillingValue>false</FillFromFillingValue>
					<FillValue xsi:type="xs:decimal">0</FillValue>
					<FillChecking>ShowError</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<Indexing>DontIndex</Indexing>
					<Use>ForItem</Use>
					<FullTextSearch>Use</FullTextSearch>
				</Properties>
			</Attribute>
			<Attribute uuid="41dec792-1d1a-4e06-a54b-a86193b98225">
				<Properties>
					<Name>МинимальноеЗначение</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Минимальное значение</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>xs:decimal</v8:Type>
						<v8:NumberQualifiers>
							<v8:Digits>15</v8:Digits>
							<v8:FractionDigits>0</v8:FractionDigits>
							<v8:AllowedSign>Any</v8:AllowedSign>
						</v8:NumberQualifiers>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Минимально возможное значение ответа</v8:content>
						</v8:item>
					</ToolTip>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillFromFillingValue>false</FillFromFillingValue>
					<FillValue xsi:type="xs:decimal">0</FillValue>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<Indexing>DontIndex</Indexing>
					<Use>ForItem</Use>
					<FullTextSearch>Use</FullTextSearch>
				</Properties>
			</Attribute>
			<Attribute uuid="52257beb-3e0c-4681-b430-9690398cd13a">
				<Properties>
					<Name>МаксимальноеЗначение</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Максимальное значение</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>xs:decimal</v8:Type>
						<v8:NumberQualifiers>
							<v8:Digits>15</v8:Digits>
							<v8:FractionDigits>0</v8:FractionDigits>
							<v8:AllowedSign>Any</v8:AllowedSign>
						</v8:NumberQualifiers>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Максимально возможное значение ответа</v8:content>
						</v8:item>
					</ToolTip>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillFromFillingValue>false</FillFromFillingValue>
					<FillValue xsi:type="xs:decimal">0</FillValue>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<Indexing>DontIndex</Indexing>
					<Use>ForItem</Use>
					<FullTextSearch>Use</FullTextSearch>
				</Properties>
			</Attribute>
			<Attribute uuid="135e637c-c28e-4547-8da2-d897dca54cb2">
				<Properties>
					<Name>Точность</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Точность</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>xs:decimal</v8:Type>
						<v8:NumberQualifiers>
							<v8:Digits>1</v8:Digits>
							<v8:FractionDigits>0</v8:FractionDigits>
							<v8:AllowedSign>Nonnegative</v8:AllowedSign>
						</v8:NumberQualifiers>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Точность числовых ответов</v8:content>
						</v8:item>
					</ToolTip>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillFromFillingValue>false</FillFromFillingValue>
					<FillValue xsi:nil="true"/>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<Indexing>DontIndex</Indexing>
					<Use>ForItem</Use>
					<FullTextSearch>Use</FullTextSearch>
				</Properties>
			</Attribute>
			<Attribute uuid="245be006-6d0a-4c9e-97c5-f3c2ddd734f7">
				<Properties>
					<Name>АгрегироватьСуммуВОтчетах</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Агрегировать сумму в отчетах</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>xs:boolean</v8:Type>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Признак определяет, будет ли выполняться агрегирование ответов на данный вопрос в отчете "Анализ опроса"</v8:content>
						</v8:item>
					</ToolTip>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillFromFillingValue>false</FillFromFillingValue>
					<FillValue xsi:nil="true"/>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<Indexing>DontIndex</Indexing>
					<Use>ForItem</Use>
					<FullTextSearch>Use</FullTextSearch>
				</Properties>
			</Attribute>
			<Form>ФормаЭлемента</Form>
			<Form>ФормаВыбора</Form>
			<Form>ФормаСписка</Form>
		</ChildObjects>
	</ChartOfCharacteristicTypes>
</MetaDataObject>


text:
@implementation UITextView (Select)
- (NSRange)selectedRange
{
    UITextPosition* beginning = self.beginningOfDocument;

    UITextRange* selectedRange = self.selectedTextRange;
    UITextPosition* selectionStart = selectedRange.start;
    UITextPosition* selectionEnd = selectedRange.end;

    NSInteger location = [self offsetFromPosition:beginning toPosition:selectionStart];
    NSInteger length = [self offsetFromPosition:selectionStart toPosition:selectionEnd];

    return NSMakeRange(location, length);
}
- (void)selectAllText {
    UITextRange *range = [self textRangeFromPosition:self.beginningOfDocument toPosition:self.endOfDocument];
    [self setSelectedTextRange:range];
}

- (void)setSelectedRange:(NSRange)range {
    UITextPosition *beginning = self.beginningOfDocument;
    UITextPosition *startPosition = [self positionFromPosition:beginning offset:range.location];
    UITextPosition *endPosition = [self positionFromPosition:beginning offset:NSMaxRange(range)];
    UITextRange *selectionRange = [self textRangeFromPosition:startPosition toPosition:endPosition];
    [self setSelectedTextRange:selectionRange];
}
@end


text:
<?php

/**
 * Crypt_DiffieHellman_Math_Exception
 */
require_once 'Crypt/DiffieHellman/Math/Exception.php';

/**
 * Crypt_DiffieHellman_Math_BigInteger_Exception
 *
 * @category   Encryption
 * @package    Crypt_DiffieHellman
 * @author     Pádraic Brady <padraic.brady@yahoo.com>
 * @copyright  2005-2007 Pádraic Brady
 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
 * @link       http://
 * @version    @package_version@
 * @access     public
 */
class Crypt_DiffieHellman_Math_BigInteger_Exception extends Crypt_DiffieHellman_Math_Exception
{}


text:
package env
import (
	"os"
	"errors"
	"strconv"
)

func GetOr(key string, fallback string) string {
	if val, found := os.LookupEnv(key); found {
		return val
	}
	return fallback
}

func GetOrInt(key string, fallback int) (int, error) {
	if strVal, found := os.LookupEnv(key); found != false {
		if val,err := strconv.Atoi(strVal); err == nil {
			return val, nil
		} else {
			return 0, errors.New("Failed to make int from ENV " + key + ": " + err.Error())
		}
	} else {
		return fallback, nil
	}
}


text:
#region license

#endregion

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Permissions;

[assembly: AssemblyTitle("MediaFoundation .Net Library")]
[assembly: AssemblyDescription(".NET Interfaces for calling MediaFoundation.  See http://mfnet.sourceforge.net/")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: Guid("106ce403-2382-4c3d-ab55-fcb43e09f245")]
[assembly: AssemblyVersion("2.0.0.*")]
[assembly: AssemblyFileVersion("2.0.0.0")]
#if DEBUG
[assembly: AssemblyProduct("Debug Version")]
#else
[assembly : AssemblyProduct("Release Version")]
#endif
[assembly: AssemblyCopyright("GNU Lesser General Public License v2.1")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, UnmanagedCode = true)]


text:
using namespace llvm;

/// IVUseShouldUsePostIncValue - We have discovered a "User" of an IV expression
/// and now we need to decide whether the user should use the preinc or post-inc
/// value.  If this user should use the post-inc version of the IV, return true.
///
/// Choosing wrong here can break dominance properties (if we choose to use the
/// post-inc value when we cannot) or it can end up adding extra live-ranges to
/// the loop, resulting in reg-reg copies (if we use the pre-inc value when we
/// should use the post-inc value).
static bool IVUseShouldUsePostIncValue(Instruction *User, Value *Operand,
                                       const Loop *L, DominatorTree *DT) {
  // If the user is in the loop, use the preinc value.
  if (L->contains(User)) return false;

  BasicBlock *LatchBlock = L->getLoopLatch();
  if (!LatchBlock)
    return false;

  // Ok, the user is outside of the loop.  If it is dominated by the latch
  // block, use the post-inc value.
  if (DT->dominates(LatchBlock, User->getParent()))
    return true;

  // There is one case we have to be careful of: PHI nodes.  These little guys
  // can live in blocks that are not dominated by the latch block, but (since
  // their uses occur in the predecessor block, not the block the PHI lives in)
  // should still use the post-inc value.  Check for this case now.
  PHINode *PN = dyn_cast<PHINode>(User);
  if (!PN || !Operand) return false; // not a phi, not dominated by latch block.

  // Look at all of the uses of Operand by the PHI node.  If any use corresponds
  // to a block that is not dominated by the latch block, give up and use the
  // preincremented value.
  for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
    if (PN->getIncomingValue(i) == Operand &&
        !DT->dominates(LatchBlock, PN->getIncomingBlock(i)))
      return false;

  // Okay, all uses of Operand by PN are in predecessor blocks that really are
  // dominated by the latch block.  Use the post-incremented value.
  return true;
}

namespace {

/// Hold the state used during post-inc expression transformation, including a
/// map of transformed expressions.
class PostIncTransform {
  TransformKind Kind;
  PostIncLoopSet &Loops;
  ScalarEvolution &SE;
  DominatorTree &DT;

  DenseMap<const SCEV*, const SCEV*> Transformed;

public:
  PostIncTransform(TransformKind kind, PostIncLoopSet &loops,
                   ScalarEvolution &se, DominatorTree &dt):
    Kind(kind), Loops(loops), SE(se), DT(dt) {}

  const SCEV *TransformSubExpr(const SCEV *S, Instruction *User,
                               Value *OperandValToReplace);

protected:
  const SCEV *TransformImpl(const SCEV *S, Instruction *User,
                            Value *OperandValToReplace);
};

} // namespace

/// Implement post-inc transformation for all valid expression types.
const SCEV *PostIncTransform::
TransformImpl(const SCEV *S, Instruction *User, Value *OperandValToReplace) {

  if (const SCEVCastExpr *X = dyn_cast<SCEVCastExpr>(S)) {
    const SCEV *O = X->getOperand();
    const SCEV *N = TransformSubExpr(O, User, OperandValToReplace);
    if (O != N)
      switch (S->getSCEVType()) {
      case scZeroExtend: return SE.getZeroExtendExpr(N, S->getType());
      case scSignExtend: return SE.getSignExtendExpr(N, S->getType());
      case scTruncate: return SE.getTruncateExpr(N, S->getType());
      default: llvm_unreachable("Unexpected SCEVCastExpr kind!");
      }
    return S;
  }

  if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
    // An addrec. This is the interesting part.
    SmallVector<const SCEV *, 8> Operands;
    const Loop *L = AR->getLoop();
    // The addrec conceptually uses its operands at loop entry.
    Instruction *LUser = L->getHeader()->begin();
    // Transform each operand.
    for (SCEVNAryExpr::op_iterator I = AR->op_begin(), E = AR->op_end();
         I != E; ++I) {
      Operands.push_back(TransformSubExpr(*I, LUser, nullptr));
    }
    // Conservatively use AnyWrap until/unless we need FlagNW.
    const SCEV *Result = SE.getAddRecExpr(Operands, L, SCEV::FlagAnyWrap);
    switch (Kind) {
    case NormalizeAutodetect:
      // Normalize this SCEV by subtracting the expression for the final step.
      // We only allow affine AddRecs to be normalized, otherwise we would not
      // be able to correctly denormalize.
      // e.g. {1,+,3,+,2} == {-2,+,1,+,2} + {3,+,2}
      // Normalized form:   {-2,+,1,+,2}
      // Denormalized form: {1,+,3,+,2}
      //
      // However, denormalization would use the a different step expression than
      // normalization (see getPostIncExpr), generating the wrong final
      // expression: {-2,+,1,+,2} + {1,+,2} => {-1,+,3,+,2}
      if (AR->isAffine() &&
          IVUseShouldUsePostIncValue(User, OperandValToReplace, L, &DT)) {
        const SCEV *TransformedStep =
          TransformSubExpr(AR->getStepRecurrence(SE),
                           User, OperandValToReplace);
        Result = SE.getMinusSCEV(Result, TransformedStep);
        Loops.insert(L);
      }
#if 0
      // This assert is conceptually correct, but ScalarEvolution currently
      // sometimes fails to canonicalize two equal SCEVs to exactly the same
      // form. It's possibly a pessimization when this happens, but it isn't a
      // correctness problem, so disable this assert for now.
      assert(S == TransformSubExpr(Result, User, OperandValToReplace) &&
             "SCEV normalization is not invertible!");
#endif
      break;
    case Normalize:
      // We want to normalize step expression, because otherwise we might not be
      // able to denormalize to the original expression.
      //
      // Here is an example what will happen if we don't normalize step:
      //  ORIGINAL ISE:
      //    {(100 /u {1,+,1}<%bb16>),+,(100 /u {1,+,1}<%bb16>)}<%bb25>
      //  NORMALIZED ISE:
      //    {((-1 * (100 /u {1,+,1}<%bb16>)) + (100 /u {0,+,1}<%bb16>)),+,
      //     (100 /u {0,+,1}<%bb16>)}<%bb25>
      //  DENORMALIZED BACK ISE:
      //    {((2 * (100 /u {1,+,1}<%bb16>)) + (-1 * (100 /u {2,+,1}<%bb16>))),+,
      //     (100 /u {1,+,1}<%bb16>)}<%bb25>
      //  Note that the initial value changes after normalization +
      //  denormalization, which isn't correct.
      if (Loops.count(L)) {
        const SCEV *TransformedStep =
          TransformSubExpr(AR->getStepRecurrence(SE),
                           User, OperandValToReplace);
        Result = SE.getMinusSCEV(Result, TransformedStep);
      }
#if 0
      // See the comment on the assert above.
      assert(S == TransformSubExpr(Result, User, OperandValToReplace) &&
             "SCEV normalization is not invertible!");
#endif
      break;
    case Denormalize:
      // Here we want to normalize step expressions for the same reasons, as
      // stated above.
      if (Loops.count(L)) {
        const SCEV *TransformedStep =
          TransformSubExpr(AR->getStepRecurrence(SE),
                           User, OperandValToReplace);
        Result = SE.getAddExpr(Result, TransformedStep);
      }
      break;
    }
    return Result;
  }

  if (const SCEVNAryExpr *X = dyn_cast<SCEVNAryExpr>(S)) {
    SmallVector<const SCEV *, 8> Operands;
    bool Changed = false;
    // Transform each operand.
    for (SCEVNAryExpr::op_iterator I = X->op_begin(), E = X->op_end();
         I != E; ++I) {
      const SCEV *O = *I;
      const SCEV *N = TransformSubExpr(O, User, OperandValToReplace);
      Changed |= N != O;
      Operands.push_back(N);
    }
    // If any operand actually changed, return a transformed result.
    if (Changed)
      switch (S->getSCEVType()) {
      case scAddExpr: return SE.getAddExpr(Operands);
      case scMulExpr: return SE.getMulExpr(Operands);
      case scSMaxExpr: return SE.getSMaxExpr(Operands);
      case scUMaxExpr: return SE.getUMaxExpr(Operands);
      default: llvm_unreachable("Unexpected SCEVNAryExpr kind!");
      }
    return S;
  }

  if (const SCEVUDivExpr *X = dyn_cast<SCEVUDivExpr>(S)) {
    const SCEV *LO = X->getLHS();
    const SCEV *RO = X->getRHS();
    const SCEV *LN = TransformSubExpr(LO, User, OperandValToReplace);
    const SCEV *RN = TransformSubExpr(RO, User, OperandValToReplace);
    if (LO != LN || RO != RN)
      return SE.getUDivExpr(LN, RN);
    return S;
  }

  llvm_unreachable("Unexpected SCEV kind!");
}

/// Manage recursive transformation across an expression DAG. Revisiting
/// expressions would lead to exponential recursion.
const SCEV *PostIncTransform::
TransformSubExpr(const SCEV *S, Instruction *User, Value *OperandValToReplace) {

  if (isa<SCEVConstant>(S) || isa<SCEVUnknown>(S))
    return S;

  const SCEV *Result = Transformed.lookup(S);
  if (Result)
    return Result;

  Result = TransformImpl(S, User, OperandValToReplace);
  Transformed[S] = Result;
  return Result;
}

/// Top level driver for transforming an expression DAG into its requested
/// post-inc form (either "Normalized" or "Denormalized").
const SCEV *llvm::TransformForPostIncUse(TransformKind Kind,
                                         const SCEV *S,
                                         Instruction *User,
                                         Value *OperandValToReplace,
                                         PostIncLoopSet &Loops,
                                         ScalarEvolution &SE,
                                         DominatorTree &DT) {
  PostIncTransform Transform(Kind, Loops, SE, DT);
  return Transform.TransformSubExpr(S, User, OperandValToReplace);
}


text:
var env = require('../env');

var name = "navigate-to-alerts";

casper.test.begin('navigate to alerts page', 5, function(test) {

  env.init();

  casper.thenOpen(env.root, function() {
    test.assertExists(env.cpuLink, "common navigation is initialized");
    test.assertVisible(env.alertsLink);
  });

  env.waitForAndClick(env.alertsLink, name, env.defaultTimeOut);

  casper.waitForPopup(env.root + "/alerts.html", function() {
    test.assertEquals(this.popups.length, 1);
  }, env.screencapFailure(name), env.defaultTimeOut);

  casper.withPopup(env.root + "/alerts.html", function() {
    casper.waitUntilVisible("tr", function() {
      test.assertVisible("thead");
      test.assertVisible("tr");
    }, env.screencapFailure(name), env.defaultTimeOut);
  });

  casper.then(function() {
    env.writeCoverage(this, name);
  });

  casper.run(function() {
    casper.mainPage.close();
    test.done();
  });
});