text:
<?php

namespace Core42\Authentication;

use Zend\Authentication\AuthenticationServiceInterface;
use Zend\Authentication\Result;
use Zend\Authentication\Storage\StorageInterface;

class AuthenticationService implements AuthenticationServiceInterface
{
    /**
     * @var StorageInterface
     */
    protected $storage = null;

    /**
     * @var Result
     */
    protected $authResult;

    /**
     * Constructor
     *
     * @param  StorageInterface $storage
     */
    public function __construct(StorageInterface $storage = null)
    {
        if (null !== $storage) {
            $this->setStorage($storage);
        }
    }

    /**
     * Returns the persistent storage handler
     *
     * Session storage is used by default unless a different storage adapter has been set.
     *
     * @return StorageInterface
     */
    public function getStorage()
    {
        return $this->storage;
    }

    /**
     * Sets the persistent storage handler
     *
     * @param  StorageInterface $storage
     * @return AuthenticationService Provides a fluent interface
     */
    public function setStorage(StorageInterface $storage)
    {
        $this->storage = $storage;

        return $this;
    }

    /**
     * @param Result $authResult
     * @return $this
     */
    public function setAuthResult(Result $authResult)
    {
        $this->authResult = $authResult;

        return $this;
    }

    /**
     * Authenticates and provides an authentication result
     *
     * @return Result
     */
    public function authenticate()
    {
        if (empty($this->authResult)) {
            if ($this->hasIdentity()) {
                $this->clearIdentity();
            }

            return new Result(
                Result::FAILURE_UNCATEGORIZED,
                null,
                ['no result set']
            );
        }

        if ($this->hasIdentity()) {
            $this->clearIdentity();
        }

        if ($this->authResult->isValid()) {
            $this->getStorage()->write($this->authResult->getIdentity());
        }

        $result = $this->authResult;
        $this->authResult = null;

        return $result;
    }

    /**
     * Returns true if and only if an identity is available
     *
     * @return bool
     */
    public function hasIdentity()
    {
        return !$this->getStorage()->isEmpty();
    }

    /**
     * Returns the authenticated identity or null if no identity is available
     *
     * @return mixed|null
     */
    public function getIdentity()
    {
        $storage = $this->getStorage();

        if ($storage->isEmpty()) {
            return;
        }

        return $storage->read();
    }

    /**
     * Clears the identity
     *
     * @return void
     */
    public function clearIdentity()
    {
        $this->getStorage()->clear();
    }
}


text:
package amiregistry

import (
	"fmt"
	"net/http"
)

const MaxRetryCount = 2

type reliableHttp interface {
	Get(url string) (resp *http.Response, err error)
}

type reliableHttpImpl struct {
	underlyingGet func(url string) (resp *http.Response, err error)
}

func newHttp() reliableHttpImpl {
	return reliableHttpImpl{
		underlyingGet: http.Get,
	}
}

func (i reliableHttpImpl) Get(url string) (resp *http.Response, err error) {
	var r *http.Response
	var e error

	c := 0
	for c <= MaxRetryCount {
		c++
		r, e = i.underlyingGet(url)
		if e == nil {
			return r, nil
		}
	}

	return nil, fmt.Errorf("max retry count exceeded: %v", e)
}

redpajama_set_name: RedPajamaGithub


text:
package org.jasig.cas.adaptors.generic;

import org.jasig.cas.authentication.HttpBasedServiceCredential;
import org.jasig.cas.authentication.UsernamePasswordCredential;
import org.junit.Test;

import javax.security.auth.login.AccountNotFoundException;
import javax.security.auth.login.FailedLoginException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashSet;
import java.util.Set;

import static org.junit.Assert.*;

/**
 * @author Scott Battaglia
 * @since 3.0.0
 */
public class RejectUsersAuthenticationHandlerTests {

    private final Set<String> users;

    private final RejectUsersAuthenticationHandler authenticationHandler;

    public RejectUsersAuthenticationHandlerTests() throws Exception {
        this.users = new HashSet<>();

        this.users.add("scott");
        this.users.add("dima");
        this.users.add("bill");

        this.authenticationHandler = new RejectUsersAuthenticationHandler();

        this.authenticationHandler.setUsers(this.users);
    }

    @Test
    public void verifySupportsProperUserCredentials() throws Exception {
        final UsernamePasswordCredential c = new UsernamePasswordCredential();

        c.setUsername("fff");
        c.setPassword("rutgers");
        assertNotNull(this.authenticationHandler.authenticate(c));
    }

    @Test
    public void verifyDoesntSupportBadUserCredentials() {
        try {
            assertFalse(this.authenticationHandler
                .supports(new HttpBasedServiceCredential(new URL(
                    "http://www.rutgers.edu"), org.jasig.cas.authentication.TestUtils.getRegisteredService())));
        } catch (final MalformedURLException e) {
            fail("Could not resolve URL.");
        }
    }

    @Test(expected=FailedLoginException.class)
    public void verifyFailsUserInMap() throws Exception {
        final UsernamePasswordCredential c = new UsernamePasswordCredential();

        c.setUsername("scott");
        c.setPassword("rutgers");
        this.authenticationHandler.authenticate(c);
    }

    @Test
    public void verifyPassesUserNotInMap() throws Exception {
        final UsernamePasswordCredential c = new UsernamePasswordCredential();

        c.setUsername("fds");
        c.setPassword("rutgers");

        assertNotNull(this.authenticationHandler.authenticate(c));
    }

    @Test(expected = AccountNotFoundException.class)
    public void verifyPassesNullUserName() throws Exception {
        final UsernamePasswordCredential c = new UsernamePasswordCredential();

        c.setUsername(null);
        c.setPassword("user");

        this.authenticationHandler.authenticate(c);
    }

    @Test(expected = AccountNotFoundException.class)
    public void verifyPassesNullUserNameAndPassword() throws Exception {
        this.authenticationHandler.authenticate(new UsernamePasswordCredential());
    }
}


text:
WebFontConfig = {
  google: {
    families: ['Droid Sans']
  },
  loading: function() {},
  active: function() {},
  inactive: function() {},
  fontloading: function(familyName, fvd) {},
  fontactive: function(familyName, fvd) {},
  fontinactive: function(familyName, fvd) {}
};


text:
<?php
/**
 * (c) CupcakePHP: The Rapid and Tasty Development Framework.
 *
 * PHP version 5.5.12
 *
 * @author  Ge Bender <gesianbender@gmail.com>
 * @license http://www.opensource.org/licenses/mit-license.php MIT License
 * @version GIT: <git_id>
 * @link    http://cupcake.simplesys.com.br
 */
namespace Cupcake\helpers;

use FileUpload\Validator\Simple;
use FileUpload\PathResolver\Simple as PathResolverSimple;
use FileUpload\Validator\MimeTypeValidator;
use FileUpload\Validator\SizeValidator;
use FileUpload\FileUpload;
use Cupcake\Flash;

class JQFileUpload extends \Cupcake\Helper
{

    public $validator = [];
    public $mimeTypeValidator;
    public $sizeValidator;
    public $pathresolver;
    public $filesystem;

    public function __construct($app)
    {
        parent::__construct($app);

        $this->simpleValidator(1024 * 1024, ['image/png', 'image/jpeg']);
        $this->setSimplePathresolver($app['GPS']->getUploadFolder());
        $this->setSimpleFileSystem();
    }

    public function upload($field)
    {
        if (@$_FILES[$field]) {
            $fileupload = new FileUpload($_FILES[$field], $_SERVER);

            $this->pathresolver = new PathResolverSimple(dirname(dirname(dirname(dirname(__DIR__)))).'/Apps/'.$this->app['route']['appName'].'/uploads');
            $fileupload->setPathResolver($this->pathresolver);
            $result = $fileupload->setFileSystem($this->filesystem);

            foreach ($this->validator as $validator) {
                $fileupload->addValidator($validator);
            }

            $result = $fileupload->processAll();
            $this->checkForErrors($result);

            return $result;
        }
        return false;
    }

    public function checkForErrors($result)
    {
        $erros = ['Tipo de arquivo não permitido. Envie PNG ou JPG', 'Imagem muito grande. Tamanho máximo: 1 mega.'];
        foreach ($result[0] as $upload) {
            if ($upload->error !== 0) {
                Flash::alert($erros[$upload->error_code]);
            }
        }
    }

    /**
     * @param int $size
     * @param array $mimeTypes
     */
    public function simpleValidator($size, $mimeTypes)
    {
        $this->validator[] = new Simple($size, $mimeTypes);
    }

    /**

     * @param array $mimeTypes
     */
    public function mimeTypeValidator($mimeTypes)
    {
        $this->validator[] = new MimeTypeValidator($mimeTypes);
    }

    /**
     * @param string $max
     * @param string $min
     */
    public function sizeValidator($max, $min)
    {
        $this->validator[] = new SizeValidator($max, $min);
    }

    /**
     * @param string $path
     */
    public function setSimplePathResolver($path)
    {
        $this->pathresolver = new \FileUpload\PathResolver\Simple($path);
    }

    public function setSimpleFileSystem()
    {
        $this->filesystem = new \FileUpload\FileSystem\Simple();
    }

}


text:
declare module "xoauth2" {
  import { Readable } from "stream"

  export interface AccessToken {
    // TODO
  }

  class XOAuth2Generator extends Readable {
    getToken(cb: (err: Error, token: string) => unknown): void
    updateToken(accessToken: string, timeout: number): void
    generateToken(cb: (err: Error, token: string) => unknown): void
  }

  export function createXOAuth2Generator(options: {
    user: string
    accessUrl?: string
    clientId: string
    clientSecret: string
    refreshToken: string
    accessToken?: AccessToken
    timeout?: number
    customHeaders?: Record<string, string>
    customParams?: Record<string, string>
  }): XOAuth2Generator

  // With options for Google service account
  export function createXOAuth2Generator(options: {
    service: string
    user: string
    scope: string
    privateKey: string
    serviceRequestTimeout?: number
    accessUrl?: string
    accessToken?: AccessToken
    timeout?: number
    customHeaders?: Record<string, string>
    customParams?: Record<string, string>
  }): XOAuth2Generator
}


text:
/**
 *
 */
package com.neu.pdp.pageRank.core.colVersion;

import java.io.IOException;

import org.apache.hadoop.io.DoubleWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Mapper.Context;

import com.neu.pdp.pageRank.resources.SourceRankPair;

/**
 * @author ideepakkrishnan
 *
 */
public class RowColumnMapper extends Mapper<Object, Text, LongWritable, SourceRankPair> {

	public void map(Object key, Text value, Context context
            ) throws IOException, InterruptedException {

		Long col;
		String val = "";

		String strLine = value.toString();

		if (strLine != null && strLine.length() > 0) {
			// Split the record and fetch page name
			String strLineSplit[] = strLine.split("\t");
			col = Long.parseLong(strLineSplit[0]);

			// Safety check
			if (strLineSplit.length > 1) {
				val = strLineSplit[1];

				String[] rowAndVals = val.split(",");

				for (String element : rowAndVals) {
					String[] rowAndVal = element.split(":");
					try {
						Long row = Long.parseLong(rowAndVal[0]);
						double cj = Double.parseDouble(rowAndVal[1]);

						SourceRankPair p = new SourceRankPair(
								new Text(""),
								new LongWritable(col),
								new DoubleWritable(cj));

						context.write(new LongWritable(row), p);
					} catch (Exception e) {
						// Do nothing
					}
				}
			}
		}

	}

}


text:
package com.navercorp.pinpoint.collector.service;

import com.navercorp.pinpoint.collector.dao.ApplicationTraceIndexDao;
import com.navercorp.pinpoint.collector.dao.HostApplicationMapDao;
import com.navercorp.pinpoint.collector.dao.TraceDao;
import com.navercorp.pinpoint.common.server.bo.SpanBo;
import com.navercorp.pinpoint.common.server.bo.SpanChunkBo;
import com.navercorp.pinpoint.common.server.bo.SpanEventBo;
import com.navercorp.pinpoint.common.trace.ServiceType;
import com.navercorp.pinpoint.loader.service.ServiceTypeRegistryService;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TraceService {
    private final Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private TraceDao traceDao;

    @Autowired
    private ApplicationTraceIndexDao applicationTraceIndexDao;

    @Autowired
    private HostApplicationMapDao hostApplicationMapDao;

    @Autowired
    private StatisticsService statisticsService;

    @Autowired
    private ServiceTypeRegistryService registry;

    public void insertSpanChunk(final SpanChunkBo spanChunkBo) {
        traceDao.insertSpanChunk(spanChunkBo);
        final ServiceType applicationServiceType = getApplicationServiceType(spanChunkBo);
        final List<SpanEventBo> spanEventList = spanChunkBo.getSpanEventBoList();
        if (spanEventList != null) {
            // TODO need to batch update later.
            insertSpanEventList(spanEventList, applicationServiceType, spanChunkBo.getApplicationId(), spanChunkBo.getAgentId(), spanChunkBo.getEndPoint());
        }
    }

    private ServiceType getApplicationServiceType(SpanChunkBo spanChunk) {
        final short applicationServiceTypeCode = spanChunk.getApplicationServiceType();
        return registry.findServiceType(applicationServiceTypeCode);
    }

    public void insertSpan(final SpanBo spanBo) {
        traceDao.insert(spanBo);
        applicationTraceIndexDao.insert(spanBo);
        insertAcceptorHost(spanBo);
        insertSpanStat(spanBo);
        insertSpanEventStat(spanBo);
    }

    private void insertAcceptorHost(SpanEventBo spanEvent, String applicationId, ServiceType serviceType) {
        final String endPoint = spanEvent.getEndPoint();
        if (endPoint == null) {
            logger.debug("endPoint is null. spanEvent:{}", spanEvent);
            return;
        }
        final String destinationId = spanEvent.getDestinationId();
        if (destinationId == null) {
            logger.debug("destinationId is null. spanEvent:{}", spanEvent);
            return;
        }
        hostApplicationMapDao.insert(endPoint, destinationId, spanEvent.getServiceType(), applicationId, serviceType.getCode());
    }

    private void insertAcceptorHost(SpanBo span) {
        // save host application map
        // acceptor host is set at profiler module only when the span is not the kind of root span
        final String acceptorHost = span.getAcceptorHost();
        if (acceptorHost == null) {
            logger.debug("acceptorHost is null {}", span);
            return;
        }
        final String spanApplicationName = span.getApplicationId();
        final short applicationServiceTypeCode = getApplicationServiceType(span).getCode();

        final String parentApplicationName = span.getParentApplicationId();
        final short parentServiceType = span.getParentApplicationServiceType();

        final ServiceType spanServiceType = registry.findServiceType(span.getServiceType());
        if (spanServiceType.isQueue()) {
            hostApplicationMapDao.insert(span.getEndPoint(), spanApplicationName, applicationServiceTypeCode, parentApplicationName, parentServiceType);
        } else {
            hostApplicationMapDao.insert(acceptorHost, spanApplicationName, applicationServiceTypeCode, parentApplicationName, parentServiceType);
        }
    }

    private ServiceType getApplicationServiceType(SpanBo span) {
        // Check if applicationServiceType is set. If not, use span's service type.
        final short applicationServiceTypeCode = span.getApplicationServiceType();
        return registry.findServiceType(applicationServiceTypeCode);
    }

    private void insertSpanStat(SpanBo span) {
        final ServiceType applicationServiceType = getApplicationServiceType(span);
        final ServiceType spanServiceType = registry.findServiceType(span.getServiceType());

        final boolean isError = span.getErrCode() != 0;
        int bugCheck = 0;
        if (span.getParentSpanId() == -1) {
            if (spanServiceType.isQueue()) {
                // create virtual queue node
                statisticsService.updateCaller(span.getAcceptorHost(), spanServiceType, span.getRemoteAddr(), span.getApplicationId(), applicationServiceType, span.getEndPoint(), span.getElapsed(), isError);

                statisticsService.updateCallee(span.getApplicationId(), applicationServiceType, span.getAcceptorHost(), spanServiceType, span.getAgentId(), span.getElapsed(), isError);
            } else {
                // create virtual user
                statisticsService.updateCaller(span.getApplicationId(), ServiceType.USER, span.getAgentId(), span.getApplicationId(), applicationServiceType, span.getAgentId(), span.getElapsed(), isError);

                // update the span information of the current node (self)
                statisticsService.updateCallee(span.getApplicationId(), applicationServiceType, span.getApplicationId(), ServiceType.USER, span.getAgentId(), span.getElapsed(), isError);
            }
            bugCheck++;
        }

        // save statistics info only when parentApplicationContext exists
        // when drawing server map based on statistics info, you must know the application name of the previous node.
        if (span.getParentApplicationId() != null) {
            String parentApplicationName = span.getParentApplicationId();
            logger.debug("Received parent application name. {}", parentApplicationName);

            ServiceType parentApplicationType = registry.findServiceType(span.getParentApplicationServiceType());

            // create virtual queue node if current' span's service type is a queue AND :
            // 1. parent node's application service type is not a queue (it may have come from a queue that is traced)
            // 2. current node's application service type is not a queue (current node may be a queue that is traced)
            if (spanServiceType.isQueue()) {
                if (!applicationServiceType.isQueue() && !parentApplicationType.isQueue()) {
                    // emulate virtual queue node's accept Span and record it's acceptor host
                    hostApplicationMapDao.insert(span.getRemoteAddr(), span.getAcceptorHost(), spanServiceType.getCode(), parentApplicationName, parentApplicationType.getCode());
                    // emulate virtual queue node's send SpanEvent
                    statisticsService.updateCaller(span.getAcceptorHost(), spanServiceType, span.getRemoteAddr(), span.getApplicationId(), applicationServiceType, span.getEndPoint(), span.getElapsed(), isError);

                    parentApplicationName = span.getAcceptorHost();
                    parentApplicationType = spanServiceType;
                }
            }

            statisticsService.updateCallee(span.getApplicationId(), applicationServiceType, parentApplicationName, parentApplicationType, span.getAgentId(), span.getElapsed(), isError);
            bugCheck++;
        }

        // record the response time of the current node (self).
        // blow code may be conflict of idea above callee key.
        // it is odd to record reversely, because of already recording the caller data at previous node.
        // the data may be different due to timeout or network error.

        statisticsService.updateResponseTime(span.getApplicationId(), applicationServiceType, span.getAgentId(), span.getElapsed(), isError);

        if (bugCheck != 1) {
            logger.warn("ambiguous span found(bug). span:{}", span);
        }
    }

    private void insertSpanEventStat(SpanBo span) {

        final List<SpanEventBo> spanEventList = span.getSpanEventBoList();
        if (CollectionUtils.isEmpty(spanEventList)) {
            return;
        }
        if (logger.isDebugEnabled()) {
            logger.debug("handle spanEvent size:{}", spanEventList.size());
        }

        final ServiceType applicationServiceType = getApplicationServiceType(span);
        // TODO need to batch update later.
        insertSpanEventList(spanEventList, applicationServiceType, span.getApplicationId(), span.getAgentId(), span.getEndPoint());
    }

    private void insertSpanEventList(List<SpanEventBo> spanEventList, ServiceType applicationServiceType, String applicationId, String agentId, String endPoint) {

        for (SpanEventBo spanEvent : spanEventList) {
            final ServiceType spanEventType = registry.findServiceType(spanEvent.getServiceType());

            if (isAlias(spanEventType, spanEvent)) {
                insertAcceptorHost(spanEvent, applicationId, applicationServiceType);
                continue;
            }

            if (!spanEventType.isRecordStatistics()) {
                continue;
            }

            final String spanEventApplicationName = spanEvent.getDestinationId();
            final String spanEventEndPoint = spanEvent.getEndPoint();

            // if terminal update statistics
            final int elapsed = spanEvent.getEndElapsed();
            final boolean hasException = spanEvent.hasException();

            /*
             * save information to draw a server map based on statistics
             */
            // save the information of caller (the spanevent that called span)
            statisticsService.updateCaller(applicationId, applicationServiceType, agentId, spanEventApplicationName, spanEventType, spanEventEndPoint, elapsed, hasException);

            // save the information of callee (the span that spanevent called)
            statisticsService.updateCallee(spanEventApplicationName, spanEventType, applicationId, applicationServiceType, endPoint, elapsed, hasException);
        }
    }

    private boolean isAlias(ServiceType spanEventType, SpanEventBo forDebugEvent) {
        if (!spanEventType.isAlias()) {
            return false;
        }
        if (spanEventType.isRecordStatistics()) {
            logger.error("ServiceType with ALIAS should NOT have RECORD_STATISTICS {}", forDebugEvent);
            return false;
        }
        return true;
    }
}


text:
Order Book

        <select [(ngModel)]="filter.pair" (ngModelChange)="applyFilter({pair: $event})">
            <option *ngFor="let pair of pairs" [ngValue]="pair">
                {{ pair.title }}
            </option>
        </select>
        <select [(ngModel)]="filter.group" (ngModelChange)="applyFilter({group: $event})">
            <option *ngFor="let group of groups" [ngValue]="group">
                {{ group.title }}
            </option>
        </select>


text:
using System;

namespace HaveIBeenPwned
{
    internal class DisplayAttribute : Attribute
    {
        public string Name { get; set; }
    }
}


text:
          {{ site.title }}

{{ site.description }}

      Home

      {% comment %}
        The code below dynamically generates a sidebar nav of pages with
        `layout: page` in the front-matter. See readme for usage.
      {% endcomment %}

      {% assign pages_list = site.pages %}
      {% for node in pages_list %}
        {% if node.title != null %}
          {% if node.layout == "page" %}
            {{ node.title }}
          {% endif %}
        {% endif %}
      {% endfor %}

© {{ site.time | date: '%Y' }}. All rights reserved.


text:
.example-inside-test-folder {
    font-weight: bold;
}


text:
import React, {Component} from 'react';
import {connect} from 'react-redux';
import Immutable from 'immutable';

import NumOfLine from 'common/components/NumOfLine';

import styles from './ForeignCounter.less'

class ForeignCounter extends Component {

	render()
	{
		const {
			      items,
		      } = this.props;

		let itemElements = items.map((item) => {
			return (
				<NumOfLine
					key={item.get('id')}
					numOf={item.get('name')}
					num={item.get('count')}
				/>
			)
		})

		let content;
		if (itemElements.size > 0)
		{
			content = itemElements
		}
		else
		{
			content = (

					No foreign counter items :(

			)
		}

		return (

Foreign Counter Items

				{content}

		);
	}
}

const mapStateToProps = (state, ownProps) =>
{
	const items = state['App'].getIn(['windows', 'main', 'CounterItems'], Immutable.Map())

	return {
		items,
	}
};

export default connect(mapStateToProps)(ForeignCounter)


text:
import collections
import numpy as np

def test_no_duplicates_in_np__all__():
    # Regression test for gh-10198.
    dups = {k: v for k, v in collections.Counter(np.__all__).items() if v > 1}
    assert len(dups) == 0


text:
using System;
using System.IO;
using System.Xml;
using XenCenterLib;
using NUnit.Framework;

namespace XenAdminTests.MiscTests
{
    [TestFixture, Category(TestCategories.UICategoryB)]
    class BasicXMLResolverTests
    {
        [Test]
        public void TestEntityGetReturnsEmptyMemoryStream()
        {
            XmlResolver basic = new BasicXMLResolver();
            object returnedObject = basic.GetEntity(new Uri("http://www.nonesense.com"), "role", typeof(BasicXMLResolver));
            Assert.AreEqual(typeof(MemoryStream), returnedObject.GetType());
            MemoryStream rms = returnedObject as MemoryStream;
            Assert.AreEqual(0,rms.Length);
            rms.Close();
        }
    }
}


text:
NS_ASSUME_NONNULL_BEGIN

@class ApptentiveMessageCenterInteraction;

@interface ApptentiveAboutViewController : UIViewController

@end

NS_ASSUME_NONNULL_END


text:
package com.thinkaurelius.titan.diskstorage.keycolumnvalue;

import com.google.common.collect.ImmutableList;
import com.thinkaurelius.titan.diskstorage.BackendException;
import com.thinkaurelius.titan.diskstorage.Entry;
import com.thinkaurelius.titan.diskstorage.EntryList;
import com.thinkaurelius.titan.diskstorage.StaticBuffer;

import java.util.List;
import java.util.Map;

/**
 * Interface to a data store that has a BigTable like representation of its data. In other words, the data store is comprised of a set of rows
 * each of which is uniquely identified by a key. Each row is composed of a column-value pairs. For a given key, a subset of the column-value
 * pairs that fall within a column interval can be quickly retrieved.
 *

 * This interface provides methods for retrieving and mutating the data.
 *

 * In this generic representation keys, columns and values are represented as ByteBuffers.
 *

 * See {@linktourl http://en.wikipedia.org/wiki/BigTable}
 *
 * @author Matthias Bröcheler (me@matthiasb.com);
 */
public interface KeyColumnValueStore {

    public static final List<Entry> NO_ADDITIONS = ImmutableList.of();
    public static final List<StaticBuffer> NO_DELETIONS = ImmutableList.of();

    /**
     * Retrieves the list of entries (i.e. column-value pairs) for a specified query.
     *
     * @param query Query to get results for
     * @param txh   Transaction
     * @return List of entries up to a maximum of "limit" entries
     * @throws com.thinkaurelius.titan.diskstorage.BackendException when columnEnd < columnStart
     * @see KeySliceQuery
     */
    public EntryList getSlice(KeySliceQuery query, StoreTransaction txh) throws BackendException;

    /**
     * Retrieves the list of entries (i.e. column-value pairs) as specified by the given {@link SliceQuery} for all
     * of the given keys together.
     *
     * @param keys  List of keys
     * @param query Slicequery specifying matching entries
     * @param txh   Transaction
     * @return The result of the query for each of the given keys as a map from the key to the list of result entries.
     * @throws com.thinkaurelius.titan.diskstorage.BackendException
     */
    public Map<StaticBuffer,EntryList> getSlice(List<StaticBuffer> keys, SliceQuery query, StoreTransaction txh) throws BackendException;

    /**
     * Verifies acquisition of locks {@code txh} from previous calls to
     * {@link #acquireLock(StaticBuffer, StaticBuffer, StaticBuffer, StoreTransaction)}
     * , then writes supplied {@code additions} and/or {@code deletions} to
     * {@code key} in the underlying data store. Deletions are applied strictly
     * before additions. In other words, if both an addition and deletion are
     * supplied for the same column, then the column will first be deleted and
     * then the supplied Entry for the column will be added.
     *

     *

     *

     * Implementations which don't support locking should skip the initial lock
     * verification step but otherwise behave as described above.
     *
     * @param key       the key under which the columns in {@code additions} and
     *                  {@code deletions} will be written
     * @param additions the list of Entry instances representing column-value pairs to
     *                  create under {@code key}, or null to add no column-value pairs
     * @param deletions the list of columns to delete from {@code key}, or null to
     *                  delete no columns
     * @param txh       the transaction to use
     * @throws com.thinkaurelius.titan.diskstorage.locking.PermanentLockingException if locking is supported by the implementation and at least
     *                          one lock acquisition attempted by
     *                          {@link #acquireLock(StaticBuffer, StaticBuffer, StaticBuffer, StoreTransaction)}
     *                          has failed
     */
    public void mutate(StaticBuffer key, List<Entry> additions, List<StaticBuffer> deletions, StoreTransaction txh) throws BackendException;

    /**
     * Attempts to claim a lock on the value at the specified {@code key} and
     * {@code column} pair. These locks are discretionary.
     *

     *

     *

     * If locking fails, implementations of this method may, but are not
     * required to, throw {@link com.thinkaurelius.titan.diskstorage.locking.PermanentLockingException}.
     * This method is not required
     * to determine whether locking actually succeeded and may return without
     * throwing an exception even when the lock can't be acquired. Lock
     * acquisition is only only guaranteed to be verified by the first call to
     * {@link #mutate(StaticBuffer, List, List, StoreTransaction)} on any given
     * {@code txh}.
     *

     *

     *

     * The {@code expectedValue} must match the actual value present at the
     * {@code key} and {@code column} pair. If the true value does not match the
     * {@code expectedValue}, the lock attempt fails and
     * {@code LockingException} is thrown. This method may check
     * {@code expectedValue}. The {@code mutate()} mutate is required to check
     * it.
     *

     *

     *

     * When this method is called multiple times on the same {@code key},
     * {@code column}, and {@code txh}, calls after the first have no effect.
     *

     *

     *

     * Locks acquired by this method must be automatically released on
     * transaction {@code commit()} or {@code rollback()}.
     *

     *

     *

     * Implementations which don't support locking should throw
     * {@link UnsupportedOperationException}.
     *
     * @param key
     *            the key on which to lock
     * @param column
     *            the column on which to lock
     * @param expectedValue
     *            the expected value for the specified key-column pair on which
     *            to lock (null means the pair must have no value)
     * @param txh
     *            the transaction to use
     * @throws com.thinkaurelius.titan.diskstorage.locking.PermanentLockingException
     *             the lock could not be acquired due to contention with other
     *             transactions or a locking-specific storage problem
     */
    public void acquireLock(StaticBuffer key, StaticBuffer column, StaticBuffer expectedValue, StoreTransaction txh) throws BackendException;

    /**
     * Returns a {@link KeyIterator} over all keys that fall within the key-range specified by the given query and have one or more columns matching the column-range.
     * Calling {@link KeyIterator#getEntries()} returns the list of all entries that match the column-range specified by the given query.
     *

     * This method is only supported by stores which keep keys in byte-order.
     *
     * @param query
     * @param txh
     * @return
     * @throws com.thinkaurelius.titan.diskstorage.BackendException
     */
    public KeyIterator getKeys(KeyRangeQuery query, StoreTransaction txh) throws BackendException;

    /**
     * Returns a {@link KeyIterator} over all keys in the store that have one or more columns matching the column-range. Calling {@link KeyIterator#getEntries()}
     * returns the list of all entries that match the column-range specified by the given query.
     *

     * This method is only supported by stores which do not keep keys in byte-order.
     *
     * @param query
     * @param txh
     * @return
     * @throws com.thinkaurelius.titan.diskstorage.BackendException
     */
    public KeyIterator getKeys(SliceQuery query, StoreTransaction txh) throws BackendException;
    // like current getKeys if column-slice is such that it queries for vertex state property

    /**
     * Returns the name of this store. Each store has a unique name which is used to open it.
     *
     * @return store name
     * @see KeyColumnValueStoreManager#openDatabase(String)
     */
    public String getName();

    /**
     * Closes this store
     *
     * @throws com.thinkaurelius.titan.diskstorage.BackendException
     */
    public void close() throws BackendException;

}


text:
//
//  _FVMappedDataProvider.m
//  FileView
//
//  Created by Adam Maxwell on 7/14/08.

#import "_FVMappedDataProvider.h"
#import "FVObject.h"
#import "FVUtilities.h"
#import <pthread.h>
#import <sys/mman.h>
#import <sys/stat.h>
#import <libkern/OSAtomic.h>

typedef struct _FVMappedRegion {
    NSZone *zone;
    char   *path;
    void   *mapregion;
    off_t   length;
} FVMappedRegion;

static volatile int32_t _mappedDataSizeKB = 0;
#define MAX_MAPPED_SIZE_KB 400000

// This is intentionally low, since I don't know what the limit is, and sysctl doesn't say.  The max number of file descriptors is ~255 per process, but I can actually mmap ~28,000 files on 10.5.4.  We should never see even this many in practice, though.
#define MAX_MAPPED_PROVIDER_COUNT 254

static const void *__FVGetMappedRegion(void *info);
static void __FVReleaseMappedRegion(void *info);
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5)
// 10.5 and later
const CGDataProviderDirectCallbacks _FVMappedDataProviderDirectCallBacks = { 0, __FVGetMappedRegion, NULL, NULL, __FVReleaseMappedRegion };
#else
// missing in 10.8 SDK
const CGDataProviderDirectAccessCallbacks _FVMappedDataProviderCallBacks = { __FVGetMappedRegion, NULL, NULL, __FVReleaseMappedRegion };
#endif

static CFMutableDictionaryRef _dataProviders = NULL;
static pthread_mutex_t _providerLock = PTHREAD_MUTEX_INITIALIZER;

@interface _FVProviderInfo : FVObject
{
@public;
    CGDataProviderRef _provider;
    NSUInteger        _refCount;
}
@end

@implementation _FVMappedDataProvider

+ (void)initialize
{
    FVINITIALIZE(_FVMappedDataProvider);
    _dataProviders = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
}

+ (BOOL)maxSizeExceeded
{
    return _mappedDataSizeKB > MAX_MAPPED_SIZE_KB || CFDictionaryGetCount(_dataProviders) >= MAX_MAPPED_PROVIDER_COUNT;
}

+ (unsigned char)maxProviderCount;
{
    return MAX_MAPPED_PROVIDER_COUNT;
}

+ (CGDataProviderRef)newDataProviderForURL:(NSURL *)aURL
{
    pthread_mutex_lock(&_providerLock);
    _FVProviderInfo *pInfo = (id)CFDictionaryGetValue(_dataProviders, (CFURLRef)aURL);
    if (nil == pInfo && CFDictionaryGetCount(_dataProviders) < MAX_MAPPED_PROVIDER_COUNT) {
        pInfo = [_FVProviderInfo new];
        pInfo->_refCount = 0;
        pInfo->_provider = NULL;

        const char *path = [[aURL path] fileSystemRepresentation];
        /*
         Open the file so no one unlinks it until we're done here (may be a temporary PS file).  This means that stat and the assertion here will succeed if the file still exists.  The provider is supposed to handle mmap failures gracefully, so we just close the file descriptor when the provider info is set up.
         */
        int fd = open(path, O_RDONLY);
        fcntl(fd, F_NOCACHE, 1);
        struct stat sb;
        if (-1 != fd && -1 != fstat(fd, &sb)) {

            // don't mmap network/firewire/usb filesystems
            NSAssert1(FVCanMapFileAtURL(aURL), @"%@ is not safe for mmap()", aURL);
            fcntl(fd, F_NOCACHE, 1);

            NSZone *zone = [self zone];
            FVMappedRegion *mapInfo = NSZoneMalloc(zone, sizeof(FVMappedRegion));
            mapInfo->zone = zone;
            mapInfo->path = NSZoneCalloc(zone, strlen(path) + 1, sizeof(char));
            strcpy(mapInfo->path, path);
            mapInfo->length = sb.st_size;
            // map immediately instead of lazily in __FVGetMappedRegion, since someone might edit the file
            mapInfo->mapregion = mmap(0, mapInfo->length, PROT_READ, MAP_PRIVATE, fd, 0);
            if (mapInfo->mapregion == MAP_FAILED) {
                perror("failed to mmap file");
                mapInfo->mapregion = NULL;
            }
            else {
                bool swap;
                do {
                    int32_t newSize = _mappedDataSizeKB + (mapInfo->length) / 1024;
                    swap = OSAtomicCompareAndSwap32Barrier(_mappedDataSizeKB, newSize, &_mappedDataSizeKB);
                } while (false == swap);
            }
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5)
            pInfo->_provider = CGDataProviderCreateDirect(mapInfo, mapInfo->length, &_FVMappedDataProviderDirectCallBacks);
#else
            // if compiled for 10.4, check for the symbol before using it
            if (NULL != CGDataProviderCreateDirect)
                pInfo->_provider = CGDataProviderCreateDirect(mapInfo, mapInfo->length, &_FVMappedDataProviderDirectCallBacks);
            else
                pInfo->_provider = CGDataProviderCreateDirectAccess(mapInfo, mapInfo->length, &_FVMappedDataProviderCallBacks);
#endif
        }
        close(fd);
        CFDictionarySetValue(_dataProviders, (CFURLRef)aURL, pInfo);
        [pInfo release];
    }
    if (pInfo) pInfo->_refCount++;
    pthread_mutex_unlock(&_providerLock);
    return pInfo ? pInfo->_provider : NULL;
}

+ (void)releaseProviderForURL:(NSURL *)aURL
{
    pthread_mutex_lock(&_providerLock);
    _FVProviderInfo *pInfo = (id)CFDictionaryGetValue(_dataProviders, (CFURLRef)aURL);
    if (pInfo) {
        NSAssert1(pInfo->_refCount > 0, @"Mapped provider refcount underflow for %@", [aURL path]);
        pInfo->_refCount--;
        if (pInfo->_refCount == 0) {
            CGDataProviderRelease(pInfo->_provider);
            CFDictionaryRemoveValue(_dataProviders, aURL);
        }
    }
    pthread_mutex_unlock(&_providerLock);
}

@end

@implementation _FVProviderInfo
@end

static const void *__FVGetMappedRegion(void *info)
{
    FVMappedRegion *mapInfo = info;
    return mapInfo->mapregion;
}

static void __FVReleaseMappedRegion(void *info)
{
    FVMappedRegion *mapInfo = info;
    NSZoneFree(mapInfo->zone, mapInfo->path);
    if (mapInfo->mapregion) munmap(mapInfo->mapregion, mapInfo->length);
    bool swap;
    do {
        int32_t newSize = _mappedDataSizeKB - (mapInfo->length) / 1024;
        swap = OSAtomicCompareAndSwap32Barrier(_mappedDataSizeKB, newSize, &_mappedDataSizeKB);
    } while (false == swap);
    NSZoneFree(mapInfo->zone, info);
}


text:
ActiveRecord::Schema.define(:version => 20110830054823) do

  create_table "active_admin_comments", :force => true do |t|
    t.integer  "resource_id",   :null => false
    t.string   "resource_type", :null => false
    t.integer  "author_id"
    t.string   "author_type"
    t.text     "body"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "namespace"
  end

  add_index "active_admin_comments", ["author_type", "author_id"], :name => "index_active_admin_comments_on_author_type_and_author_id"
  add_index "active_admin_comments", ["namespace"], :name => "index_active_admin_comments_on_namespace"
  add_index "active_admin_comments", ["resource_type", "resource_id"], :name => "index_admin_notes_on_resource_type_and_resource_id"

  create_table "admin_users", :force => true do |t|
    t.string   "email",                                 :default => "", :null => false
    t.string   "encrypted_password",     :limit => 128, :default => "", :null => false
    t.string   "reset_password_token"
    t.datetime "reset_password_sent_at"
    t.datetime "remember_created_at"
    t.integer  "sign_in_count",                         :default => 0
    t.datetime "current_sign_in_at"
    t.datetime "last_sign_in_at"
    t.string   "current_sign_in_ip"
    t.string   "last_sign_in_ip"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "admin_users", ["email"], :name => "index_admin_users_on_email", :unique => true
  add_index "admin_users", ["reset_password_token"], :name => "index_admin_users_on_reset_password_token", :unique => true

  create_table "backs", :force => true do |t|
    t.integer  "amount"
    t.text     "comment"
    t.integer  "user_id"
    t.integer  "project_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "backs", ["project_id"], :name => "index_backs_on_project_id"
  add_index "backs", ["user_id"], :name => "index_backs_on_user_id"

  create_table "beta_invites", :force => true do |t|
    t.string   "email"
    t.string   "name"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "change_roles", :force => true do |t|
    t.string   "real_name"
    t.string   "state"
    t.text     "description"
    t.text     "more"
    t.integer  "phone"
    t.string   "role"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "ckeditor_assets", :force => true do |t|
    t.string   "data_file_name",                  :null => false
    t.string   "data_content_type"
    t.integer  "data_file_size"
    t.integer  "assetable_id"
    t.string   "assetable_type",    :limit => 30
    t.string   "type",              :limit => 30
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "ckeditor_assets", ["assetable_type", "assetable_id"], :name => "idx_ckeditor_assetable"
  add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], :name => "idx_ckeditor_assetable_type"

  create_table "comments", :force => true do |t|
    t.text     "body"
    t.integer  "project_id"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "delayed_jobs", :force => true do |t|
    t.integer  "priority",   :default => 0
    t.integer  "attempts",   :default => 0
    t.text     "handler"
    t.text     "last_error"
    t.datetime "run_at"
    t.datetime "locked_at"
    t.datetime "failed_at"
    t.string   "locked_by"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"

  create_table "favorites", :force => true do |t|
    t.integer  "project_id"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "galleries", :force => true do |t|
    t.string   "title"
    t.text     "description"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "galleries", ["user_id"], :name => "index_galleries_on_user_id"

  create_table "galleries_files", :force => true do |t|
    t.integer  "upload_id"
    t.integer  "gallery_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "galleries_files", ["gallery_id"], :name => "index_galleries_files_on_gallery_id"

  create_table "leads", :force => true do |t|
    t.string   "title"
    t.integer  "project_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "featimage_file_name"
    t.string   "featimage_content_type"
    t.integer  "featimage_file_size"
    t.datetime "featimage_updated_at"
  end

  add_index "leads", ["project_id"], :name => "index_leads_on_project_id"

  create_table "microposts", :force => true do |t|
    t.string   "content"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "ref"
    t.integer  "ref_id"
  end

  add_index "microposts", ["created_at"], :name => "index_microposts_on_created_at"
  add_index "microposts", ["user_id"], :name => "index_microposts_on_user_id"

  create_table "pages", :force => true do |t|
    t.string   "title"
    t.text     "body"
    t.integer  "admin_user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "projects", :force => true do |t|
    t.string   "title"
    t.text     "description"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "user_id",     :null => false
    t.integer  "money"
    t.text     "state"
    t.string   "video_link"
    t.datetime "deadline"
  end

  create_table "proposals", :force => true do |t|
    t.string   "title"
    t.text     "description"
    t.text     "rewards"
    t.text     "more"
    t.integer  "money"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "state"
  end

  add_index "proposals", ["created_at"], :name => "index_proposals_on_created_at"
  add_index "proposals", ["money"], :name => "index_proposals_on_money"
  add_index "proposals", ["user_id"], :name => "index_proposals_on_user_id"

  create_table "proptoprojs", :force => true do |t|
    t.integer  "proposal_id"
    t.integer  "project_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "proptoprojs", ["project_id", "proposal_id"], :name => "index_proptoprojs_on_project_id_and_proposal_id", :unique => true
  add_index "proptoprojs", ["project_id"], :name => "index_proptoprojs_on_project_id"
  add_index "proptoprojs", ["proposal_id"], :name => "index_proptoprojs_on_proposal_id"

  create_table "relationships", :force => true do |t|
    t.integer  "follower_id"
    t.integer  "followed_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "relationships", ["followed_id"], :name => "index_relationships_on_followed_id"
  add_index "relationships", ["follower_id", "followed_id"], :name => "index_relationships_on_follower_id_and_followed_id", :unique => true
  add_index "relationships", ["follower_id"], :name => "index_relationships_on_follower_id"

  create_table "rewards", :force => true do |t|
    t.integer  "amount_min"
    t.integer  "amount_max"
    t.text     "description"
    t.integer  "project_id",  :null => false
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "rewards", ["project_id"], :name => "index_rewards_on_project_id"

  create_table "roles", :force => true do |t|
    t.string   "name"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "roles_users", :id => false, :force => true do |t|
    t.integer "role_id"
    t.integer "user_id"
  end

  create_table "taggings", :force => true do |t|
    t.integer  "tag_id"
    t.integer  "taggable_id"
    t.string   "taggable_type"
    t.integer  "tagger_id"
    t.string   "tagger_type"
    t.string   "context"
    t.datetime "created_at"
  end

  add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
  add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"

  create_table "tags", :force => true do |t|
    t.string "name"
  end

  create_table "updates", :force => true do |t|
    t.string   "title"
    t.text     "body"
    t.integer  "project_id"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "state"
    t.string   "data_file_name"
    t.string   "data_content_type"
    t.integer  "data_file_size"
    t.datetime "data_updated_at"
  end

  create_table "uploads", :force => true do |t|
    t.string   "picture_file_name"
    t.string   "picture_content_type"
    t.integer  "picture_file_size"
    t.datetime "picture_updated_at"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "users", :force => true do |t|
    t.string   "email",                                 :default => "", :null => false
    t.string   "encrypted_password",     :limit => 128, :default => "", :null => false
    t.string   "reset_password_token"
    t.datetime "reset_password_sent_at"
    t.datetime "remember_created_at"
    t.integer  "sign_in_count",                         :default => 0
    t.datetime "current_sign_in_at"
    t.datetime "last_sign_in_at"
    t.string   "current_sign_in_ip"
    t.string   "last_sign_in_ip"
    t.string   "password_salt"
    t.string   "confirmation_token"
    t.datetime "confirmed_at"
    t.datetime "confirmation_sent_at"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "avatar_file_name"
    t.string   "avatar_content_type"
    t.integer  "avatar_file_size"
    t.datetime "avatar_updated_at"
    t.text     "username"
    t.text     "bio"
    t.string   "link"
    t.string   "city"
    t.string   "weibo"
    t.string   "alias"
  end

  add_index "users", ["email"], :name => "index_users_on_email", :unique => true
  add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true

end


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

namespace Yodiwo.Projects.GrovePi
{
    public class GPIO : GrovePiSensor
    {
        #region Constructor
        internal GPIO(Pin pin, Transport transport, int period = 0) : base(pin, transport, period)
        {
            this.OnGetContinuousDatacb += OnGetButtonSensorData;
        }
        #endregion

        #region Functions
        //------------------------------------------------------------------------------------------------------------------------
        public override void ReadContinuously()
        {
            SharpPy msg = new SharpPy()
            {
                operation = RWCMD.DRRead,
                payload = "",

            };
            base.ReadContinuously(msg);
        }
        //------------------------------------------------------------------------------------------------------------------------
        public void OnGetButtonSensorData(object data)
        {
#if DEBUG
            Console.WriteLine("Get GPIO SensorData");
#endif
        }
        //------------------------------------------------------------------------------------------------------------------------
        #endregion
    }
}


text:
package com.teamderpy.victusludus.parts;

/**
 * The Class Material.
 */
public class Material {

	/** The id. */
	private String id;

	/** The name. */
	private String name = "";

	/** The description. */
	private String description = "";

	/** The density. */
	private int density = 100;

	/** The mass. */
	private int mass = 100;

	/** The hardness. */
	private int hardness = 100;

	/** The elasticity. */
	private int elasticity = 100;

	/** The rigidity. */
	private int rigidity = 100;

	/** The compressibility. */
	private int compressibility = 100;

	/** The toughness. */
	private int toughness = 100;

	/** The melting point. */
	private int meltingPoint = 4000;

	/** The boiling point. */
	private int boilingPoint = 8000;

	/**
	 * Gets the name.
	 *
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * Sets the name.
	 *
	 * @param name the new name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * Gets the description.
	 *
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Sets the description.
	 *
	 * @param description the new description
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * Gets the density.
	 *
	 * @return the density
	 */
	public int getDensity() {
		return density;
	}

	/**
	 * Sets the density.
	 *
	 * @param density the new density
	 */
	public void setDensity(int density) {
		this.density = density;
	}

	/**
	 * Gets the mass.
	 *
	 * @return the mass
	 */
	public int getMass() {
		return mass;
	}

	/**
	 * Sets the mass.
	 *
	 * @param mass the new mass
	 */
	public void setMass(int mass) {
		this.mass = mass;
	}

	/**
	 * Gets the hardness.
	 *
	 * @return the hardness
	 */
	public int getHardness() {
		return hardness;
	}

	/**
	 * Sets the hardness.
	 *
	 * @param hardness the new hardness
	 */
	public void setHardness(int hardness) {
		this.hardness = hardness;
	}

	/**
	 * Gets the toughness.
	 *
	 * @return the toughness
	 */
	public int getToughness() {
		return toughness;
	}

	/**
	 * Sets the toughness.
	 *
	 * @param toughness the new toughness
	 */
	public void setToughness(int toughness) {
		this.toughness = toughness;
	}

	/**
	 * Gets the id.
	 *
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * Sets the id.
	 *
	 * @param id the new id
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * Gets the melting point.
	 *
	 * @return the melting point
	 */
	public int getMeltingPoint() {
		return meltingPoint;
	}

	/**
	 * Sets the melting point.
	 *
	 * @param meltingPoint the new melting point
	 */
	public void setMeltingPoint(int meltingPoint) {
		this.meltingPoint = meltingPoint;
	}

	/**
	 * Gets the boiling point.
	 *
	 * @return the boiling point
	 */
	public int getBoilingPoint() {
		return boilingPoint;
	}

	/**
	 * Sets the boiling point.
	 *
	 * @param boilingPoint the new boiling point
	 */
	public void setBoilingPoint(int boilingPoint) {
		this.boilingPoint = boilingPoint;
	}

	/**
	 * Gets the elasticity.
	 *
	 * @return the elasticity
	 */
	public int getElasticity() {
		return elasticity;
	}

	/**
	 * Sets the elasticity.
	 *
	 * @param elasticity the new elasticity
	 */
	public void setElasticity(int elasticity) {
		this.elasticity = elasticity;
	}

	/**
	 * Gets the rigidity.
	 *
	 * @return the rigidity
	 */
	public int getRigidity() {
		return rigidity;
	}

	/**
	 * Sets the rigidity.
	 *
	 * @param rigidity the new rigidity
	 */
	public void setRigidity(int rigidity) {
		this.rigidity = rigidity;
	}

	/**
	 * Gets the compressibility.
	 *
	 * @return the compressibility
	 */
	public int getCompressibility() {
		return compressibility;
	}

	/**
	 * Sets the compressibility.
	 *
	 * @param compressibility the new compressibility
	 */
	public void setCompressibility(int compressibility) {
		this.compressibility = compressibility;
	}
}


text:
#import <math.h>
#import <set>
#import <map>
#import "Identifiable.h"
#import "Drawable.h"
#import "DataLayer.h"
#import "LayerThread.h"
#import "TextureAtlas.h"
#import "SelectionManager.h"
#import "LayoutManager.h"
#import "Scene.h"

namespace WhirlyKit
{

/// Used to track the visual representation of screen space objects
class ScreenSpaceRep : public Identifiable
{
public:
    ScreenSpaceRep();
    ~ScreenSpaceRep() { }

    // Clear the contents out of the scene
    void clearContents(ChangeSet &changes);

    // Enable/disable marker related features
    void enableContents(bool enable,ChangeSet &changes);

    SimpleIDSet drawIDs;

    float fade;
};

typedef std::set<ScreenSpaceRep *,IdentifiableSorter> ScreenSpaceRepSet;

#define kWKScreenSpaceManager "WKScreenSpaceManager"

/** The Screen Space manager handles drawables that live in 2D space.
    This replaces the screen space generator that used to run on the main thread.
  */
class ScreenSpaceManager : public SceneManager
{
public:
    ScreenSpaceManager();
    virtual ~ScreenSpaceManager();

    /// A simple geometric representation used in shapes
    class SimpleGeometry
    {
    public:
        SimpleGeometry();
        SimpleGeometry(SimpleIdentity texID,SimpleIdentity programID,RGBAColor color,const std::vector<Point2f> &coords,const std::vector<TexCoord> &texCoords);

        SimpleIdentity texID;
        SimpleIdentity programID;
        RGBAColor color;
        std::vector<Point2f> coords;
        std::vector<TexCoord> texCoords;
    };

    /** Simple convex shape to be drawn on the screen.
     It has a texture and a list of vertices as well as
     the usual minVis/maxVis values and draw priority.
     */
    class ConvexShape : public Identifiable
    {
    public:
        ConvexShape();

        /// Center location
        Point3f worldLoc;
        /// If true we'll use the rotation.  If not, we won't.
        bool useRotation;
        /// Rotation clockwise from north
        float rotation;
        /// If we're fading in or out, these are used
        NSTimeInterval fadeUp,fadeDown;
        /// Sort by draw priority
        int drawPriority;
        /// Visual range
        float minVis,maxVis;
        /// 2D offset to be applied (probably from the layout engine)
        Point2f offset;
        /// false if we're not to draw this one
        bool enable;

        /// List of geometry we'll transform to the destination
        std::vector<SimpleGeometry> geom;
    };

    /// Add a set of shapes identified by a single ID
    SimpleIdentity addShapes(const std::vector<ConvexShape> &shapes,ChangeSet &changes);

    /// Enable/disable shapes
    void enableShapes(const SimpleIDSet &shapeIDs,bool enable,ChangeSet &changes);

    /// Remove a set of shapes
    void removeShapes(const SimpleIDSet &shapeIDs,ChangeSet &changes);

protected:
    pthread_mutex_t shapeLock;
    ScreenSpaceRepSet shapeReps;
};

}


text:
require 'test_helper'

class ProductScopeTest < ActiveSupport::TestCase
  context "ProductScope" do
    setup do
      @numbers = %w{one two three four five six}
      @taxonomy = Taxonomy.find_or_create_by_name("test_taxonomy")
      @taxons = (0..1).map{|x|
        Taxon.find_by_name("test_taxon_#{x}") ||
          Taxon.create(:name => "test_taxon_#{x}", :taxonomy_id => @taxonomy.id)
      }
      @products = (0..4).map do |x|
        unless pr = Product.find_by_name("test product #{@numbers[x]}")
          pr = Factory(:product,
            :price => (x+1)*10,
            :name => "test product #{@numbers[x]}"
          )
          pr.taxons << @taxons[x%2]
          pr.save
        end
        pr
      end
    end

    should "allow for creating named scope from searchlogic" do
      @ps = ProductScope.new({
          # I'm almost sure noone will use it, so t'll be automatically generated,
          # on first hit, and that's what we're testing
          :name => "product_option_types_option_type_created_at_null",
          :arguments => []
        })
      assert @ps.valid?
    end

    should "allow for creating named scope from Scopes::Product" do
      @ps = ProductScope.new({
          :name => "price_between",
          :arguments => [1,2]
        })
      assert @ps.valid?
    end

    should "find products" do
      @ps = ProductScope.new({
          # I'm almost sure noone will use it, so t'll be automatically generated,
          # on first hit, and that's what we're testing
          :name => "price_between",
          :arguments => [10, 30]
        })
      assert @ps.valid?
      products = Product.find(:all, :joins => :master, :conditions => ["variants.price between ? AND ?", 10, 30])
      assert_equal(products.map(&:name), @ps.products.map(&:name))
    end

    teardown do
      Taxonomy.delete_all "name like 'test_%'"
      Taxon.delete_all "name like 'test_%'"
      @products && @products.each(&:destroy)
    end
  end
end


text:
import csv
def format_csv(list):
  out = open("/home/unmesh/Downloads/out.csv", "wb")
  writer = csv.writer(out, delimiter=',')

  with open(list[1], 'rb') as csvfile:
      for row in csvfile.readlines():
        #print row
        #new_row = row
        columns = row.split(',')
        full_name = columns[2]
        names = full_name.split(' ')
        last_name = names[-1]

        last_name_first = last_name
        print last_name + ":"
        l = len(names)
        for i in range (0,l-1):
          last_name_first += " "
          last_name_first += names[i]
          print names[i]

        print last_name_first
        new_row = columns[0] + ","+ columns[1] +"," + last_name_first

        for i in range (3,10):
          new_row += "," + columns[i]

        print new_row
        writer.writerow([new_row])

if __name__ == "__main__":
	import sys
	format_csv(list(sys.argv))


text:
<?php
$output = $category = $orderby = $options = $el_class = '';
extract( shortcode_atts( array(
    'category' => false,
    'orderby' => 'name',
    'options' => '',
    'limit' => -1,
    'el_class' => ''
), $atts ) );
$options = explode(",", $options);
if (in_array("images", $options)) $atts['images'] = true;
if (in_array("name", $options)) $atts['name'] = true;
if (in_array("description", $options)) $atts['description'] = true;
if (in_array("rating", $options)) $atts['rating'] = true;

$el_class = $this->getExtraClass($el_class);

$output = '
';
$type = 'WP_Widget_Links';
$args = array();

ob_start();
the_widget( $type, $atts, $args );
$output .= ob_get_clean();

$output .= '
' . $this->endBlockComment('vc_wp_links') . "\n";

echo $output;


text:
/**
 * @typedef {import("../productions/dictionary.js").Dictionary} Dictionary
 *
 * @param {*} idlType
 * @param {import("../validator.js").Definitions} defs
 * @param {object} [options]
 * @param {boolean} [options.useNullableInner] use when the input idlType is nullable and you want to use its inner type
 * @return {{ reference: *, dictionary: Dictionary }} the type reference that ultimately includes dictionary.
 */
export function idlTypeIncludesDictionary(
  idlType,
  defs,
  { useNullableInner } = {}
) {
  if (!idlType.union) {
    const def = defs.unique.get(idlType.idlType);
    if (!def) {
      return;
    }
    if (def.type === "typedef") {
      const { typedefIncludesDictionary } = defs.cache;
      if (typedefIncludesDictionary.has(def)) {
        // Note that this also halts when it met indeterminate state
        // to prevent infinite recursion
        return typedefIncludesDictionary.get(def);
      }
      defs.cache.typedefIncludesDictionary.set(def, undefined); // indeterminate state
      const result = idlTypeIncludesDictionary(def.idlType, defs);
      defs.cache.typedefIncludesDictionary.set(def, result);
      if (result) {
        return {
          reference: idlType,
          dictionary: result.dictionary,
        };
      }
    }
    if (def.type === "dictionary" && (useNullableInner || !idlType.nullable)) {
      return {
        reference: idlType,
        dictionary: def,
      };
    }
  }
  for (const subtype of idlType.subtype) {
    const result = idlTypeIncludesDictionary(subtype, defs);
    if (result) {
      if (subtype.union) {
        return result;
      }
      return {
        reference: subtype,
        dictionary: result.dictionary,
      };
    }
  }
}

/**
 * @param {*} dict dictionary type
 * @param {import("../validator.js").Definitions} defs
 * @return {boolean}
 */
export function dictionaryIncludesRequiredField(dict, defs) {
  if (defs.cache.dictionaryIncludesRequiredField.has(dict)) {
    return defs.cache.dictionaryIncludesRequiredField.get(dict);
  }
  // Set cached result to indeterminate to short-circuit circular definitions.
  // The final result will be updated to true or false.
  defs.cache.dictionaryIncludesRequiredField.set(dict, undefined);
  let result = dict.members.some((field) => field.required);
  if (!result && dict.inheritance) {
    const superdict = defs.unique.get(dict.inheritance);
    if (!superdict) {
      // Assume required members in the supertype if it is unknown.
      result = true;
    } else if (dictionaryIncludesRequiredField(superdict, defs)) {
      result = true;
    }
  }
  defs.cache.dictionaryIncludesRequiredField.set(dict, result);
  return result;
}


text:
package info.openmods.calc.utils;

import com.google.common.collect.Maps;
import java.util.Map;

public abstract class DefaultMap<K, V> {

	private final Map<K, V> cache = Maps.newHashMap();

	public V getOrCreate(K key) {
		V value = cache.get(key);

		if (value == null) {
			value = create(key);
			cache.put(key, value);
		}

		return value;
	}

	public V remove(K key) {
		return cache.remove(key);
	}

	protected abstract V create(K key);
}


text:
package apps::kingdee::eas::mode::transaction;

use base qw(centreon::plugins::templates::counter);

use strict;
use warnings;
use Digest::MD5 qw(md5_hex);

sub set_counters {
    my ($self, %options) = @_;

    $self->{maps_counters_type} = [
        { name => 'global', type => 0, cb_prefix_output => 'prefix_global_output', skipped_code => { -10 => 1 } },
    ];

    $self->{maps_counters}->{global} = [
        { label => 'active', nlabel => 'transactions.active.count', set => {
                key_values => [ { name => 'active_count' } ],
                output_template => 'active: %s',
                perfdatas => [
                    { value => 'active_count', template => '%s', min => 0 },
                ],
            }
        },
        { label => 'timedout', nlabel => 'transactions.timedout.count', display_ok => 0, set => {
                key_values => [ { name => 'timedout_count' } ],
                output_template => 'timed out: %s',
                perfdatas => [
                    { value => 'timedout_count', template => '%s', min => 0 },
                ],
            }
        },
        { label => 'committed', nlabel => 'transactions.committed.count', set => {
                key_values => [ { name => 'committed_count', diff => 1 } ],
                output_template => 'committed: %s',
                perfdatas => [
                    { value => 'committed_count', template => '%s', min => 0 },
                ],
            }
        },
        { label => 'rolledback', nlabel => 'transactions.rolledback.count', set => {
                key_values => [ { name => 'rolledback_count', diff => 1 } ],
                output_template => 'rolledback: %s',
                perfdatas => [
                    { value => 'rolledback_count', template => '%s', min => 0 },
                ],
            }
        },
        { label => 'created', nlabel => 'transactions.created.count', set => {
                key_values => [ { name => 'transaction_count', diff => 1 } ],
                output_template => 'created: %s',
                perfdatas => [
                    { value => 'transaction_count', template => '%s', min => 0 },
                ],
            }
        },
        { label => 'time-total', nlabel => 'transactions.time.total.milliseconds', set => {
                key_values => [ { name => 'total_transaction_time', diff => 1 } ],
                output_template => 'total time: %s ms',
                perfdatas => [
                    { value => 'total_transaction_time', template => '%s', min => 0, unit => 'ms' },
                ],
            }
        },
        { label => 'time-max', nlabel => 'transactions.time.max.milliseconds', display_ok => 0, set => {
                key_values => [ { name => 'max_transaction_time', diff => 1 } ],
                output_template => 'max time: %s ms',
                perfdatas => [
                    { value => 'max_transaction_time', template => '%s', min => 0, unit => 'ms' },
                ],
            }
        },
        { label => 'timeout-default', nlabel => 'transactions.timeout.default.count', display_ok => 0, set => {
                key_values => [ { name => 'default_timeout' } ],
                output_template => 'default timeout: %s',
                perfdatas => [
                    { value => 'default_timeout', template => '%s', min => 0 },
                ],
            }
        },
    ];
}

sub prefix_global_output {
    my ($self, %options) = @_;

    return 'transactions ';
}

sub new {
    my ($class, %options) = @_;
    my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1, force_new_perfdata => 1);
    bless $self, $class;

    $options{options}->add_options(arguments => {
        'urlpath:s' => { name => 'url_path', default => "/easportal/tools/nagios/checktransaction.jsp" },
    });

    return $self;
}

sub manage_selection {
    my ($self, %options) = @_;

    my $webcontent = $options{custom}->request(path => $self->{option_results}->{url_path});
    if ($webcontent !~ /TransactionCount=\d+/i) {
        $self->{output}->add_option_msg(short_msg => 'Cannot find transaction status.');
        $self->{output}->option_exit();
    }

    $self->{global} = {};
    $self->{global}->{transaction_count} = $1 if ($webcontent =~ /TransactionCount=(\d+)\s/i);
    $self->{global}->{total_transaction_time} = $1 if ($webcontent =~ /TotalTransactionTime=(\d+)\s/i);
    $self->{global}->{committed_count} = $1 if ($webcontent =~ /CommittedCount=(\d+)\s/i);
    $self->{global}->{rolledback_count} = $1 if ($webcontent =~ /RolledbackCount=(\d+)\s/i);
    $self->{global}->{active_count} = $1 if ($webcontent =~ /ActiveCount=(\d+)\s/i);
    $self->{global}->{max_transaction_time} = $1 if ($webcontent =~ /MaxTransactionTime=(\d+)\s/i);
    $self->{global}->{default_timeout} = $1 if ($webcontent =~ /DefaultTimeout=(\d+)\s/i);
    $self->{global}->{timedout_count} = $1 if ($webcontent =~ /TimedOutCount=(\d+)\s/i);

    $self->{cache_name} = 'kingdee_' . $self->{mode} . '_' . $options{custom}->get_hostname() . '_' . $options{custom}->get_port() . '_' .
        (defined($self->{option_results}->{filter_counters}) ? md5_hex($self->{option_results}->{filter_counters}) : md5_hex('all'));
}

1;

__END__

=head1 MODE

Check EAS application EJB transaction status.

=over 8

=item B<--urlpath>

Set path to get status page. (Default: '/easportal/tools/nagios/checktransaction.jsp')

=item B<--warning-*> B<--critical-*>

Thresholds.
Can be: 'active', 'timedout', 'committed',
'rolledback', 'created', 'time-total', 'time-max',
'timeout-default'.

=back

=cut


text:
{% extends "registration/base.html" %}

{% load bootstrap_tags %}
{% load static %}

{% block body %}

Welcome to GottaCon, {{ registered_user.first_name }}

                        In order to join the network you must download and run this program below.

                        This will screen your computer for the following requirements:

Antivirus Installed

Firewall Enabled

File and Printer Sharing Disabled

DHCP Enabled

                    Download

                        If you are a mac user or are having issues, you will have to be manually verified.

                        Contact the nearest LAN staff for assistance.

Please run the validation tool.

Once it has analyzed your computer it will display the results here.

Retry Download

                    Firewall: Success

                    Antivirus:  Antivirus is out of date.

                    DHCP:  DHCP configuration error detected.

            Enter override code

            <button type="button" class="close" data-dismiss="modal">×Close</button>

Override

            <form method="post" action="{% url 'override_verification' %}">
                {% csrf_token %}
                {{ override_form|as_bootstrap }}

                    <button type="submit" class="btn btn-primary btn-block">Submit</button>

            </form>

{% endblock body %}

{% block scripts %}

{% endblock scripts %}


text:
namespace EIDSS.Reports.Document.Veterinary.LivestockInvestigation
{
    partial class DiagnosisReport
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

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

        #region Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DiagnosisReport));
            this.Detail = new DevExpress.XtraReports.UI.DetailBand();
            this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand();
            this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
            this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableRow4 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableRow5 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableRow6 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell();
            this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand();
            this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
            this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
            this.diagnosisDataSet1 = new EIDSS.Reports.Document.Veterinary.LivestockInvestigation.DiagnosisDataSet();
            this.spRepVetDiagnosisTableAdapter = new EIDSS.Reports.Document.Veterinary.LivestockInvestigation.DiagnosisDataSetTableAdapters.spRepVetDiagnosisTableAdapter();
            this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
            this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
            ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.diagnosisDataSet1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            //
            // Detail
            //
            resources.ApplyResources(this.Detail, "Detail");
            this.Detail.Name = "Detail";
            this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F);
            this.Detail.StylePriority.UsePadding = false;
            this.Detail.StylePriority.UseTextAlignment = false;
            //
            // PageHeader
            //
            this.PageHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.xrTable1});
            resources.ApplyResources(this.PageHeader, "PageHeader");
            this.PageHeader.Name = "PageHeader";
            this.PageHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            this.PageHeader.StylePriority.UsePadding = false;
            this.PageHeader.StylePriority.UseTextAlignment = false;
            //
            // xrTable1
            //
            resources.ApplyResources(this.xrTable1, "xrTable1");
            this.xrTable1.Name = "xrTable1";
            this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.xrTableRow1,
            this.xrTableRow3,
            this.xrTableRow4,
            this.xrTableRow5,
            this.xrTableRow6});
            this.xrTable1.StylePriority.UseFont = false;
            this.xrTable1.StylePriority.UseTextAlignment = false;
            //
            // xrTableRow1
            //
            this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell2,
            this.xrTableCell3,
            this.xrTableCell1,
            this.xrTableCell16});
            resources.ApplyResources(this.xrTableRow1, "xrTableRow1");
            this.xrTableRow1.Name = "xrTableRow1";
            this.xrTableRow1.StylePriority.UseFont = false;
            //
            // xrTableCell2
            //
            resources.ApplyResources(this.xrTableCell2, "xrTableCell2");
            this.xrTableCell2.Name = "xrTableCell2";
            //
            // xrTableCell3
            //
            resources.ApplyResources(this.xrTableCell3, "xrTableCell3");
            this.xrTableCell3.Name = "xrTableCell3";
            //
            // xrTableCell1
            //
            resources.ApplyResources(this.xrTableCell1, "xrTableCell1");
            this.xrTableCell1.Name = "xrTableCell1";
            //
            // xrTableCell16
            //
            resources.ApplyResources(this.xrTableCell16, "xrTableCell16");
            this.xrTableCell16.Name = "xrTableCell16";
            //
            // xrTableRow3
            //
            this.xrTableRow3.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell5,
            this.xrTableCell6,
            this.xrTableCell4,
            this.xrTableCell17});
            resources.ApplyResources(this.xrTableRow3, "xrTableRow3");
            this.xrTableRow3.Name = "xrTableRow3";
            //
            // xrTableCell5
            //
            resources.ApplyResources(this.xrTableCell5, "xrTableCell5");
            this.xrTableCell5.Name = "xrTableCell5";
            //
            // xrTableCell6
            //
            this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.strTentativeDiagnosis")});
            resources.ApplyResources(this.xrTableCell6, "xrTableCell6");
            this.xrTableCell6.Name = "xrTableCell6";
            //
            // xrTableCell4
            //
            this.xrTableCell4.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.strTentativeDiagnosisCode")});
            resources.ApplyResources(this.xrTableCell4, "xrTableCell4");
            this.xrTableCell4.Name = "xrTableCell4";
            //
            // xrTableCell17
            //
            this.xrTableCell17.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.datTentativeDiagnosisDate", "{0:dd/MM/yyyy}")});
            resources.ApplyResources(this.xrTableCell17, "xrTableCell17");
            this.xrTableCell17.Name = "xrTableCell17";
            //
            // xrTableRow4
            //
            this.xrTableRow4.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell7,
            this.xrTableCell8,
            this.xrTableCell13,
            this.xrTableCell18});
            resources.ApplyResources(this.xrTableRow4, "xrTableRow4");
            this.xrTableRow4.Name = "xrTableRow4";
            //
            // xrTableCell7
            //
            resources.ApplyResources(this.xrTableCell7, "xrTableCell7");
            this.xrTableCell7.Name = "xrTableCell7";
            //
            // xrTableCell8
            //
            this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.strTentativeDiagnosis1")});
            resources.ApplyResources(this.xrTableCell8, "xrTableCell8");
            this.xrTableCell8.Name = "xrTableCell8";
            //
            // xrTableCell13
            //
            this.xrTableCell13.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.strTentativeDiagnosis1Code")});
            resources.ApplyResources(this.xrTableCell13, "xrTableCell13");
            this.xrTableCell13.Name = "xrTableCell13";
            //
            // xrTableCell18
            //
            this.xrTableCell18.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.datTentativeDiagnosis1Date", "{0:dd/MM/yyyy}")});
            resources.ApplyResources(this.xrTableCell18, "xrTableCell18");
            this.xrTableCell18.Name = "xrTableCell18";
            //
            // xrTableRow5
            //
            this.xrTableRow5.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell9,
            this.xrTableCell10,
            this.xrTableCell14,
            this.xrTableCell19});
            resources.ApplyResources(this.xrTableRow5, "xrTableRow5");
            this.xrTableRow5.Name = "xrTableRow5";
            //
            // xrTableCell9
            //
            resources.ApplyResources(this.xrTableCell9, "xrTableCell9");
            this.xrTableCell9.Name = "xrTableCell9";
            //
            // xrTableCell10
            //
            this.xrTableCell10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.strTentativeDiagnosis2")});
            resources.ApplyResources(this.xrTableCell10, "xrTableCell10");
            this.xrTableCell10.Name = "xrTableCell10";
            //
            // xrTableCell14
            //
            this.xrTableCell14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.strTentativeDiagnosis2Code")});
            resources.ApplyResources(this.xrTableCell14, "xrTableCell14");
            this.xrTableCell14.Name = "xrTableCell14";
            //
            // xrTableCell19
            //
            this.xrTableCell19.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.datTentativeDiagnosis2Date", "{0:dd/MM/yyyy}")});
            resources.ApplyResources(this.xrTableCell19, "xrTableCell19");
            this.xrTableCell19.Name = "xrTableCell19";
            //
            // xrTableRow6
            //
            this.xrTableRow6.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell11,
            this.xrTableCell12,
            this.xrTableCell15,
            this.xrTableCell20});
            resources.ApplyResources(this.xrTableRow6, "xrTableRow6");
            this.xrTableRow6.Name = "xrTableRow6";
            //
            // xrTableCell11
            //
            resources.ApplyResources(this.xrTableCell11, "xrTableCell11");
            this.xrTableCell11.Name = "xrTableCell11";
            //
            // xrTableCell12
            //
            this.xrTableCell12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.strFinalDiagnosis")});
            resources.ApplyResources(this.xrTableCell12, "xrTableCell12");
            this.xrTableCell12.Name = "xrTableCell12";
            //
            // xrTableCell15
            //
            this.xrTableCell15.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.strFinalDiagnosisCode")});
            resources.ApplyResources(this.xrTableCell15, "xrTableCell15");
            this.xrTableCell15.Name = "xrTableCell15";
            //
            // xrTableCell20
            //
            this.xrTableCell20.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepVetDiagnosis.datFinalDiagnosisDate", "{0:dd/MM/yyyy}")});
            resources.ApplyResources(this.xrTableCell20, "xrTableCell20");
            this.xrTableCell20.Name = "xrTableCell20";
            //
            // PageFooter
            //
            resources.ApplyResources(this.PageFooter, "PageFooter");
            this.PageFooter.Name = "PageFooter";
            this.PageFooter.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
            //
            // ReportHeader
            //
            this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.xrLabel1});
            resources.ApplyResources(this.ReportHeader, "ReportHeader");
            this.ReportHeader.Name = "ReportHeader";
            this.ReportHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            this.ReportHeader.StylePriority.UsePadding = false;
            //
            // xrLabel1
            //
            this.xrLabel1.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
            resources.ApplyResources(this.xrLabel1, "xrLabel1");
            this.xrLabel1.Name = "xrLabel1";
            this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            this.xrLabel1.StylePriority.UseBorders = false;
            this.xrLabel1.StylePriority.UseFont = false;
            this.xrLabel1.StylePriority.UseTextAlignment = false;
            //
            // diagnosisDataSet1
            //
            this.diagnosisDataSet1.DataSetName = "DiagnosisDataSet";
            this.diagnosisDataSet1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
            //
            // spRepVetDiagnosisTableAdapter
            //
            this.spRepVetDiagnosisTableAdapter.ClearBeforeFill = true;
            //
            // topMarginBand1
            //
            resources.ApplyResources(this.topMarginBand1, "topMarginBand1");
            this.topMarginBand1.Name = "topMarginBand1";
            //
            // bottomMarginBand1
            //
            resources.ApplyResources(this.bottomMarginBand1, "bottomMarginBand1");
            this.bottomMarginBand1.Name = "bottomMarginBand1";
            //
            // DiagnosisReport
            //
            this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
            this.Detail,
            this.PageHeader,
            this.PageFooter,
            this.ReportHeader,
            this.topMarginBand1,
            this.bottomMarginBand1});
            this.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
            | DevExpress.XtraPrinting.BorderSide.Right)
            | DevExpress.XtraPrinting.BorderSide.Bottom)));
            this.DataAdapter = this.spRepVetDiagnosisTableAdapter;
            this.DataMember = "spRepVetDiagnosis";
            this.DataSource = this.diagnosisDataSet1;
            resources.ApplyResources(this, "$this");
            this.ExportOptions.Xls.SheetName = resources.GetString("DiagnosisReport.ExportOptions.Xls.SheetName");
            this.ExportOptions.Xlsx.SheetName = resources.GetString("DiagnosisReport.ExportOptions.Xlsx.SheetName");
            this.Version = "14.1";
            ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.diagnosisDataSet1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();

        }

        #endregion

        private DevExpress.XtraReports.UI.DetailBand Detail;
        private DevExpress.XtraReports.UI.PageHeaderBand PageHeader;
        private DevExpress.XtraReports.UI.PageFooterBand PageFooter;
        private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader;
        private DevExpress.XtraReports.UI.XRLabel xrLabel1;
        private DevExpress.XtraReports.UI.XRTable xrTable1;
        private DevExpress.XtraReports.UI.XRTableRow xrTableRow1;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
        private DevExpress.XtraReports.UI.XRTableRow xrTableRow3;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell6;
        private DevExpress.XtraReports.UI.XRTableRow xrTableRow4;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
        private DevExpress.XtraReports.UI.XRTableRow xrTableRow5;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
        private DevExpress.XtraReports.UI.XRTableRow xrTableRow6;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell11;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell12;
        private DiagnosisDataSet diagnosisDataSet1;
        private EIDSS.Reports.Document.Veterinary.LivestockInvestigation.DiagnosisDataSetTableAdapters.spRepVetDiagnosisTableAdapter spRepVetDiagnosisTableAdapter;
        private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1;
        private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell16;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell17;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell13;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell18;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell14;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell19;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell15;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell20;
    }
}


text:
package org.apache.samza.container.grouper.stream

import org.apache.samza.container.TaskName
import org.junit.Test
import scala.collection.JavaConverters._

class TestGroupBySystemStreamPartition extends GroupByTestBase {
  import GroupByTestBase._

  // Building manually to avoid just duplicating a logic potential logic error here and there
  // From base class provided set
  val expected = Map(new TaskName(aa0.toString) -> Set(aa0).asJava,
                     new TaskName(aa1.toString) -> Set(aa1).asJava,
                     new TaskName(aa2.toString) -> Set(aa2).asJava,
                     new TaskName(ab1.toString) -> Set(ab1).asJava,
                     new TaskName(ab2.toString) -> Set(ab2).asJava,
                     new TaskName(ac0.toString) -> Set(ac0).asJava).asJava

  override def getGrouper: SystemStreamPartitionGrouper = new GroupBySystemStreamPartition

  @Test def groupingWorks() {
    verifyGroupGroupsCorrectly(allSSPs, expected)
  }
}


text:
/*!
 * Utility for popping up information in the GUI.
 *
 * \author Stephen Plaza (plaza.stephen@gmail.com)
*/

#ifndef MESSAGEBOX_H
#define MESSAGEBOX_H

#include <QMessageBox>

/*!
 * Class that creates a message box from a string that
 * requires the user to click okay to close the box.
*/
class MessageBox {
  public:
    /*!
     * Constructor that creates a QMessageBox.
     * \param message char * message
    */
    MessageBox(const char * message)
    {
        msgbox.setText(message);
        msgbox.exec();
    }
  private:
    //! pop-up box with message
    QMessageBox msgbox;
};

#endif


text:
/* Linux-specific definitions: */

/* Define various structure offsets to simplify cross-compilation.  */

/* FIXME: Currently these are only used in getcontext.S, which is only used
   for a local unwinder, so we can use the compile-time ABI.  At a later date
   we will want all three here, to use for signal handlers.  Also, because
   of the three ABIs, gen-offsets.c can not quite generate this file.  */

/* Offsets for MIPS Linux "ucontext_t":  */

#if _MIPS_SIM == _ABIO32

# define LINUX_UC_FLAGS_OFF	0x0
# define LINUX_UC_LINK_OFF	0x4
# define LINUX_UC_STACK_OFF	0x8
# define LINUX_UC_MCONTEXT_OFF	0x18
# define LINUX_UC_SIGMASK_OFF	0x268
# define LINUX_UC_MCONTEXT_PC	0x20
# define LINUX_UC_MCONTEXT_GREGS	0x28

#elif _MIPS_SIM == _ABIN32

# define LINUX_UC_FLAGS_OFF	0x0
# define LINUX_UC_LINK_OFF	0x4
# define LINUX_UC_STACK_OFF	0x8
# define LINUX_UC_MCONTEXT_OFF	0x18
# define LINUX_UC_SIGMASK_OFF	0x270
# define LINUX_UC_MCONTEXT_PC	0x258
# define LINUX_UC_MCONTEXT_GREGS	0x18

#elif _MIPS_SIM == _ABI64

# define LINUX_UC_FLAGS_OFF	0x0
# define LINUX_UC_LINK_OFF	0x8
# define LINUX_UC_STACK_OFF	0x10
# define LINUX_UC_MCONTEXT_OFF	0x28
# define LINUX_UC_SIGMASK_OFF	0x280
# define LINUX_UC_MCONTEXT_PC	0x268
# define LINUX_UC_MCONTEXT_GREGS	0x28

#endif


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 The Chromium Authors. All rights reserved.
     Use of this source code is governed by a BSD-style license that can be
     found in the LICENSE file. -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/autofill_assistant_bottom_sheet_toolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingTop="@dimen/autofill_assistant_toolbar_vertical_padding"
    android:paddingBottom="@dimen/autofill_assistant_toolbar_vertical_padding"
    android:orientation="horizontal"
    android:gravity="center_horizontal">

    <ImageView
        android:id="@+id/swipe_indicator"
        android:layout_width="36dp"
        android:layout_height="@dimen/autofill_assistant_toolbar_swipe_handle_height"
        android:layout_gravity="center_horizontal"
        android:src="@drawable/autofill_assistant_swipe_indicator"
        tools:ignore="ContentDescription" />

</LinearLayout>


text:
<?php
/**
 *	Brewery
 *
 *	Brewery is an object oriented, agile and scalable RESTful web applications framework built for PHP 5.4 and later, which focuses on structured and enterprise-worthy application development for cloud based services and applications.
 *
 *	@link http://brewphp.org
 *
 *	@author Robin Grass <hej@carbin.se>
 *
 *	@license http://opensource.org/licenses/LGPL-2.1 The GNU Lesser General Public License, version 2.1
 */

/* @namespace Exceptions */
namespace Brewery\Services\Exceptions;

/* Deny direct file access */
if(!defined('BREWERY_ROOT_PATH')) exit;

/**
 *	AutoloaderServiceException
 *
 *	Autoloader service specific exception class.
 *
 *	@vendor Brewery
 *	@package Services\Exceptions
 *
 *	@version 1.0
 *
 *	@author Robin Grass <hej@carbin.se>
 */
class AutoloaderServiceException extends \Brewery\Exceptions\Exception {}


text:
:: continue only after enter is pressed
:: Unlike set /p= will not save the typed non-enter keys
:: in the buffer
:: http://ss64.org/viewtopic.php?id=1695
runas /user:# "" >nul 2>&1