text:
import os
import sys
import unittest

from coalib import coala, coala_ci
from coala_utils.ContextManagers import prepare_file
from tests.TestUtilities import bear_test_module, execute_coala

class coalaCITest(unittest.TestCase):

    def setUp(self):
        self.old_argv = sys.argv

    def tearDown(self):
        sys.argv = self.old_argv

    def test_log(self, debug=False):
        retval, stdout, stderr = execute_coala(
            coala_ci.main, 'coala-ci', '--help', debug=debug)
        self.assertIn('usage: coala', stdout)
        self.assertIn('Use of `coala-ci` executable is deprecated', stderr)
        self.assertEqual(retval, 0,
                         'coala must return zero when successful')

    def test_log_debug(self):
        self.test_log(debug=True)

    def test_nonexistent(self, debug=False):
        retval, stdout, stderr = execute_coala(
            coala.main, 'coala', '--non-interactive', '-c', 'nonex', 'test')
        self.assertFalse(stdout)
        self.assertRegex(
             stderr,
             ".*\\[ERROR\\].*Requested coafile '.*' does not exist")
        self.assertNotEqual(retval, 0,
                            'coala must return nonzero when errors occured')

        retval, stdout, stderr = execute_coala(
            coala.main, 'coala', '-c', 'nonex',
            '--show-bears', '--filter-by-language', 'Python')
        self.assertNotIn(
             stderr,
             "Requested coafile '.coafile' does not exist")

        retval, stdout, stderr = execute_coala(
            coala.main, 'coala', '-c', 'nonex', '--show-bears')
        self.assertIn(
             stderr,
             "Requested coafile '.coafile' does not exist")

    def test_nonexistent_debug(self):
        self.test_nonexistent(debug=True)

    def test_find_no_issues(self, debug=False):
        with bear_test_module(), \
                prepare_file(['#include <a>'], None) as (lines, filename):
            retval, stdout, stderr = execute_coala(coala.main, 'coala',
                                                   '--non-interactive',
                                                   '-c', os.devnull,
                                                   '-f', filename,
                                                   '-b',
                                                   'SpaceConsistencyTestBear',
                                                   '--settings',
                                                   'use_spaces=True',
                                                   debug=debug)
            self.assertEqual('Executing section cli...\n', stdout)
            if not debug:
                self.assertFalse(stderr)
            else:
                # in debug mode, log_level is also set to DEBUG, causing
                # stderr output
                self.assertTrue(stderr)
            self.assertEqual(retval, 0,
                             'coala must return zero when successful')

    def test_find_no_issues_debug(self):
        self.test_find_no_issues(debug=True)

    def test_find_issues(self, debug=False):
        with bear_test_module(), \
                prepare_file(['#fixme'], None) as (lines, filename):
            retval, stdout, stderr = execute_coala(coala.main, 'coala',
                                                   '--non-interactive',
                                                   '-c', os.devnull,
                                                   '-b', 'LineCountTestBear',
                                                   '-f', filename,
                                                   debug=debug)
            self.assertIn('This file has 1 lines.',
                          stdout,
                          'The output should report count as 1 lines')
            self.assertIn('This result has no patch attached.', stderr)
            self.assertNotEqual(retval, 0,
                                'coala must return nonzero when errors occured')

    def test_find_issues_debug(self):
        self.test_find_issues(debug=True)

    def test_show_patch(self, debug=False):
        with bear_test_module(), \
             prepare_file(['\t#include <a>'], None) as (lines, filename):
            retval, stdout, stderr = execute_coala(
                coala.main, 'coala', '--non-interactive',
                '-c', os.devnull,
                '-f', filename,
                '-b', 'SpaceConsistencyTestBear',
                '--settings', 'use_spaces=True',
                debug=debug)
            self.assertIn('Line contains ', stdout)  # Result message is shown
            self.assertIn("Applied 'ShowPatchAction'", stderr)
            self.assertEqual(retval, 5,
                             'coala must return exitcode 5 when it '
                             'autofixes the code.')

    def test_show_patch_debug(self):
        self.test_show_patch(debug=True)

    def test_fail_acquire_settings(self, debug=False):
        with bear_test_module():
            retval, stdout, stderr = execute_coala(coala.main, 'coala',
                                                   '--non-interactive', '-b',
                                                   'SpaceConsistencyTestBear',
                                                   '-c', os.devnull,
                                                   debug=debug)
            self.assertFalse(stdout)
            self.assertIn('During execution, we found that some', stderr)
            self.assertNotEqual(retval, 0,
                                'coala was expected to return non-zero')

    def test_fail_acquire_settings_debug(self):
        with self.assertRaisesRegex(
                AssertionError,
                r'During execution, we found that some required settings '
                r'were not provided.'
        ):
            self.test_fail_acquire_settings(debug=True)

    def test_limit_files_affirmative(self):
        sample_text = '\t#include <a>'
        with open('match.cpp', 'w') as match, \
                open('noMatch.cpp', 'w') as no_match:
            match.write(sample_text)
            no_match.write(sample_text)
        with bear_test_module():
            retval, stdout, stderr = execute_coala(
                coala.main, 'coala', '--non-interactive',
                '-c', os.devnull,
                '--limit-files', 'match*',
                '-f', 'match.cpp', 'noMatch.cpp',
                '-b', 'SpaceConsistencyTestBear',
                '--settings', 'use_spaces=True')
            os.remove('match.cpp')
            os.remove('noMatch.cpp')
            self.assertIn('match.cpp', stdout)
            self.assertNotIn('noMatch.cpp', stdout)
            self.assertIn("Applied 'ShowPatchAction'", stderr)
            self.assertEqual(retval, 5,
                             'coala must return exitcode 5 when it '
                             'autofixes the code.')

    def test_limit_files_negative(self):
        with bear_test_module(), \
                prepare_file(['\t#include <a>'], None) as (lines, filename):
            retval, stdout, stderr = execute_coala(
                coala.main, 'coala', '--non-interactive',
                '-c', os.devnull,
                '--limit-files', 'some_pattern',
                '-f', filename,
                '-b', 'SpaceConsistencyTestBear',
                '--settings', 'use_spaces=True',)
            self.assertEqual('Executing section cli...\n', stdout)
            self.assertFalse(stderr)
            self.assertEqual(retval, 0,
                             'coala must return zero when successful')


text:
GitaJob Stats

Curated with
       since {{moment(scrapes[scrapes.length-1].created).format('MMMM Do YYYY')}}

Get notified when there are new jobs at

        Open Positions at

               Avg  of open positions

{{averageScrapes[0].count | number: 0}}

               of  crawls

{{scrapes.length}}

               Longest living position, {{oldestAge}}

{{oldest}}

        Remote Positions

        Engineering Positions

        Most positions opened on

          <uib-progressbar ng-repeat="r in sumDayOfWeek" ng-if="r.sum > 2" value="r.sum"  max="sumDayOfWeek[0].sum">
            {{moment().isoWeekday(r._id.day).format('dddd')}} {{r.sum}}
          </uib-progressbar>

        Top 5 Locations of Positions

               Average lifespan of a Engineering position

{{engineerlifespan}}

               Average lifespan of a position

{{averageLifespan}}

redpajama_set_name: RedPajamaGithub


text:
/**
!! This is not a class. It's a ES6 module.
@module utils
@class ExtractOnline
**/
import Ember from 'ember';
const { Logger } = Ember;

/**
Used to extract record from the payload received from your data source.

@method extractTargetRecordFromPayload
@param store {DS.Store}
@param typeClass {DS.Model}
@param recordToExtractFrom  {Object} payload from which the record will be extracted
@return extracted target {Object}
**/
var extractTargetRecordFromPayload = function extractTargetRecordFromPayload(store, typeClass, recordToExtractFrom) {
  let modelName = typeClass.modelName;
  let payload = store.serializerFor(modelName).normalizePayload(recordToExtractFrom);
  let modelNameInPayload;
  for (var prop in payload) {
    var mName = store.serializerFor(modelName).modelNameFromPayloadKey(prop);
    if (mName === modelName) {
      modelNameInPayload = prop;
      break;
    }
  }
  if (!modelNameInPayload) {
    Logger.error("You try to persist payload that doesn't have any properties for model:", typeClass, "Please check your API response or serializer");
    return null;
  }
  return payload[modelNameInPayload];
};

export { extractTargetRecordFromPayload };
export default extractTargetRecordFromPayload;


text:
/* The standard CSS for doxygen 1.8.6 */

body, table, div, p, dl {
    font: 400 14px/22px Helvetica, 'Segoe UI', Arial, freesans, sans-serif;
    word-wrap: break-word;
}

code {
    font: 12px Consolas, "Liberation Mono", Courier, monospace;
    font-size: 85%;
    white-space: pre-wrap;
    padding: 1px 5px;
    padding: 0;
    background-color: #ddd;
    vertical-align: baseline;
}

body {
    background-image: url(bodybg.png);
    margin: 0 auto;
}

div.contents {
    width: 980px;
    margin: 0 auto;
    padding: 15px 15px;
    border: 1px solid rgb(10, 80, 122);
    background-color: #fff;
}

span.arrow {
    height: 13px;
}


text:
package com.google.cloud.spring.data.datastore.it;

import com.google.cloud.spring.data.datastore.core.mapping.Entity;
import java.util.Objects;
import org.springframework.data.annotation.Id;

/** A test class that uses embedded relationships to represent a tree. */
@Entity
public class EmbeddableTreeNode {
  @Id long value;

  EmbeddableTreeNode left;

  EmbeddableTreeNode right;

  public EmbeddableTreeNode(long value, EmbeddableTreeNode left, EmbeddableTreeNode right) {
    this.value = value;
    this.left = left;
    this.right = right;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    EmbeddableTreeNode treeNode = (EmbeddableTreeNode) o;
    return this.value == treeNode.value
        && Objects.equals(this.left, treeNode.left)
        && Objects.equals(this.right, treeNode.right);
  }

  @Override
  public int hashCode() {

    return Objects.hash(this.value, this.left, this.right);
  }

  @Override
  public String toString() {
    return "EmbeddableTreeNode{"
        + "value="
        + this.value
        + ", left="
        + this.left
        + ", right="
        + this.right
        + '}';
  }
}


text:
package com.jcabi.github;

import com.jcabi.aspects.Immutable;
import java.io.IOException;
import java.util.EnumMap;
import javax.validation.constraints.NotNull;

/**
 * Github search.
 *
 * @author Carlos Miranda (miranda.cma@gmail.com)
 * @version $Id$
 * @since 0.8
 * @see Search API
 */
@Immutable
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
public interface Search {

    /**
     * Github we're in.
     *
     * @return Github
     */
    @NotNull(message = "Github is never NULL")
    Github github();

    /**
     * Search repositories.
     *
     * @param keywords The search keywords
     * @param sort The sort field
     * @param order The sort order
     * @return Repos
     * @throws IOException If there is any I/O problem
     * @see Search repositories
     */
    @NotNull(message = "Iterable of repos is never NULL")
    Iterable<Repo> repos(
        @NotNull(message = "Search keywords can't be NULL") String keywords,
        @NotNull(message = "Sort field can't be NULL") String sort,
        @NotNull(message = "Sort order can't be NULL") Order order
    ) throws IOException;

    /**
     * Search issues.
     *
     * @param keywords The search keywords
     * @param sort The sort field
     * @param order The sort order
     * @param qualifiers The search qualifier
     * @return Issues
     * @throws IOException If there is any I/O problem
     * @see Search issues
     * @checkstyle ParameterNumberCheck (7 lines)
     */
    @NotNull(message = "Iterable of issues is never NULL")
    Iterable<Issue> issues(
        @NotNull(message = "Search keywords can't be NULL") String keywords,
        @NotNull(message = "Sort field can't be NULL") String sort,
        @NotNull(message = "Sort order can't be NULL") Order order,
        @NotNull(message = "Search qualifiers can't be NULL")
        EnumMap<Qualifier, String> qualifiers)
        throws IOException;

    /**
     * Search users.
     *
     * @param keywords The search keywords
     * @param sort The sort field
     * @param order The sort order
     * @return Users
     * @throws IOException If there is any I/O problem
     * @see Search users
     */
    @NotNull(message = "Iterable of users is never NULL")
    Iterable<User> users(
        @NotNull(message = "Search keywords can't be NULL") String keywords,
        @NotNull(message = "Sort field can't be NULL") String sort,
        @NotNull(message = "Sort order can't be NULL") Order order)
        throws IOException;

    /**
     * Search code.
     *
     * @param keywords The search keywords
     * @param sort The sort field
     * @param order The sort order
     * @return Contents
     * @throws IOException If there is any I/O problem
     * @see Search code
     */
    @NotNull(message = "Iterable of users is never NULL")
    Iterable<Content> codes(
        @NotNull(message = "Search keywords can't be NULL") String keywords,
        @NotNull(message = "Sort field can't be NULL") String sort,
        @NotNull(message = "Sort order can't be NULL") Order order)
        throws IOException;

    enum Qualifier implements StringEnum {
        /**
         * The search by issues or pull request only.
         */
        TYPE("type"),
        /**
         * Qualifies which fields are searched.
         *
With this qualifier you can restrict the search to just
         * the title, body, comments, or any combination of these.

         */
        IN("in"),
        /**
         * Finds issues created by a certain user.
         */
        AUTHOR("author"),
        /**
         * Finds issues that are assigned to a certain user.
         */
        ASSIGNEE("assignee"),
        /**
         * Finds issues that mention a certain user.
         */
        MENTIONS("mentions"),
        /**
         * Finds issues that a certain user commented on.
         */
        COMMENTER("commenter"),
        /**
         * Finds issues that were either created by a certain user.
         *
Or assigned to that user, mention that user,
         *  or were commented on by that user.

         */
        INVOLVES("involves"),
        /**
         * Finds issues or pull requests which mention a particular team within
         * an organization which the user is a member of.
        */
        TEAM("team"),
        /**
         * Filter issues based on whether they're open or closed.
         */
        STATE("state"),
        /**
         * Filters issues based on their labels.
         */
        LABEL("label"),
        /**
         * Filters items missing certain metadata.
         */
        NO("no"),
        /**
         * Searches for issues within repositories matching a certain language.
         */
        LANGUAGE("language"),
        /**
         * Searches for items within repositories that match a certain state.
         */
        IS("is"),
        /**
         * Filters issues based on date of creation.
         */
        CREATED("created"),
        /**
         * Filters issues based on date last updated.
         */
        UPDATED("updated"),
        /**
         * Filters pull requests based on the date when they were merged.
         */
        MERGED("merged"),
        /**
         * Filters issues based on the date when they were closed.
         */
        CLOSED("closed"),
        /**
         * Filters issues based on the quantity of comments.
         */
        COMMENTS("comments"),
        /**
         * Limits searches to a specific user.
         */
        USER("user"),
        /**
         * Limits searches to a specific repository.
         */
        REPO("repo");

        /**
         * Search qualifier.
         */
        private final transient String qualifier;

        /**
         * Ctor.
         * @param key Search qualifier
         */
        Qualifier(final String key) {
            this.qualifier = key;
        }

        /**
         * Get search qualifier.
         * @return String
         */
        @Override
        @NotNull(message = "identifier string is never NULL")
        public String identifier() {
            return this.qualifier;
        }
    }

    enum Order implements StringEnum {
        /**
         * Sorting ascending.
         */
        ASC("asc"),
        /**
         * Sorting descending.
         */
        DESC("desc");

        /**
         * The sort order.
         */
        private final transient String order;

        /**
         * Ctor.
         * @param key The sort order
         */
        Order(final String key) {
            this.order = key;
        }

        /**
         * Get sort order.
         * @return String
         */
        @Override
        @NotNull(message = "identifier string is never NULL")
        public String identifier() {
            return this.order;
        }
    }
}


text:
namespace Math
{
    __forceinline UINT64 RandomUInt64()
    {
        UINT64 result;
        BYTE *bytes = (BYTE *)&result;
        for(UINT byteIndex = 0; byteIndex < sizeof(UINT64); byteIndex++)
        {
            bytes[byteIndex] = rand() & 255;
        }
        return result;
    }

	template<class T>
	T UniformRandom()
	{
		// TODO: Replace with a better thing (Mersenne twister?) at some point...
		return rnd();
	}

	template<class T>
	T UniformRandom(T minval, T maxval)
	{
		T t = UniformRandom<T>();
		return (1-t)*minval + t*maxval;
	}

	template<class T>
	UINT MultinomialRandom(const Vector<T>& params)
	{
		UINT result = 0;
		T x = UniformRandom<T>();
		T probAccum = (T) 1e-6;		// Small episilon to avoid numerical issues
		UINT k = params.Length();
		for (; result < k; result++)
		{
			probAccum += params[result];
			if (x <= probAccum) break;
		}
		return result;
	}

	template<class T>
	T GaussianRandom()
	{
		// Box-Muller method
		T minval = (T)(0.0) + std::numeric_limits<T>::min();
		T maxval = (T)(1.0) - std::numeric_limits<T>::min();
		T u = UniformRandom<T>(minval, maxval);
		T v = UniformRandom<T>(minval, maxval);
		T result = (T)(sqrt(-2 * log(u)) * cos(2*PI*v));

		// Note: sqrt(-2 * log(u)) * sin(2*PI*v) is also a valid choice

		return result;
	}

	template<class T>
	T GaussianRandom(T mean, T sd)
	{
		return mean + sd*GaussianRandom<T>();
	}

	template<class T>
	void GaussianRandomMultivar(Vector<T>& outSample, UINT dim)
	{
		outSample.ReSize(dim);
		for (UINT i = 0; i < dim; i++)
			outSample[i] = GaussianRandom<T>();
	}

	template<class T>
	void GaussianRandomMultivar(const Vector<T>& mean, const DenseMatrix<T>& sigma, Vector<T>& outSample)
	{
		// Draw sample Z from standard normal distribution
		Vector<T> Z;
		UINT dim = mean.Length();
		GaussianRandomMultivar<T>(Z, dim);

		// Compute A = U(S^0.5), where sigma = US(U^T)
		Vector<T> eigvals; DenseMatrix<T> eigvecs;
		sigma.EigenSystem(eigvals, eigvecs);
		DenseMatrix<T> diag(dim, dim); diag.Clear(0.0);
		for (UINT i = 0; i < dim; i++)
			diag(i,i) = sqrt(eigvals[i]);
		DenseMatrix<T> A(dim, dim);
		DenseMatrix<T>::Multiply(A, eigvecs, diag);

		// Finalize sample as mean + A*Z
		DenseMatrix<T>::Multiply(outSample, A, Z);
		for (UINT i = 0; i < dim; i++)
			outSample[i] += mean[i];
	}

	template<class T>
	void GaussianRandomMultivar(const Vector<T>& mean, const DenseMatrix<T>& sigma, Vector< Vector<T> >& outSamples, UINT numSamples)
	{
		UINT dim = mean.Length();

		// Compute A = U(S^0.5), where sigma = US(U^T)
		Vector<T> eigvals; DenseMatrix<T> eigvecs;
		sigma.EigenSystem(eigvals, eigvecs);
		DenseMatrix<T> diag(dim, dim); diag.Clear(0.0);
		for (UINT i = 0; i < dim; i++)
			diag(i,i) = sqrt(eigvals[i]);
		DenseMatrix<T> A(dim, dim);
		DenseMatrix<T>::Multiply(A, eigvecs, diag);

		UINT currSize = outSamples.Length();
		outSamples.ReSize(currSize + numSamples);
		for (UINT samp = 0; samp < numSamples; samp++)
		{
			// Draw sample Z from standard normal distribution
			Vector<T> Z;
			GaussianRandomMultivar<T>(Z, dim);

			// Finalize sample as mean + A*Z
			Vector<T>& outSample = outSamples[currSize+samp];
			DenseMatrix<T>::Multiply(outSample, A, Z);
			for (UINT i = 0; i < dim; i++)
				outSample[i] += mean[i];
		}
	}
}


text:
package org.xlcloud.console.groups.controllers;

import javax.annotation.PostConstruct;
import javax.faces.context.Flash;
import javax.inject.Inject;
import javax.inject.Named;

import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.xlcloud.console.accounts.controllers.AccountBean;
import org.xlcloud.console.controllers.i18n.MessageController;
import org.xlcloud.console.controllers.request.RequestParameters;
import org.xlcloud.console.controllers.request.path.VcmsGuiPathParams;
import org.xlcloud.console.entitlements.controllers.EntitlementDictionaryBean;
import org.xlcloud.console.entitlements.scope.predicates.AccountGroupPredicate;
import org.xlcloud.console.groups.repository.GroupsRepository;
import org.xlcloud.console.scope.ViewScoped;

import org.xlcloud.service.Group;
import org.xlcloud.service.exception.VcmsDuplicatedEntityException;
import org.xlcloud.service.exception.VcmsException;

/**
 *
The controller class, which is used to create a new group.

 *
 *
Scenario:
 *

 *
Set group details using {@link #setGroup(Group)},

 *
Invoke group creation {@link #createGroup()}.

 *

 *

 *
 * @author Andrzej Stasiak, AMG.net
 */
@Named
@ViewScoped
public class GroupCreateBean {

    private static final Logger LOG = Logger.getLogger(GroupCreateBean.class);

    public static final String DEFAULT_ON_SUCCESS_REDIRECT = "/";

    private static final String PARAM_GROUP_ID_PARAM_TOKEN = "\\{group.id\\}";

    @Inject
    protected GroupsRepository groupsRepository;

    @Inject
    protected RequestParameters requestParameters;

    @Inject
    private MessageController messages;

    @Inject
    private Flash facesFlash;

    @Inject
    private EntitlementDictionaryBean entitlementsDictionaryBean;

    private Group group;

    private Long accountId;

    /**
     * Initializes bean by setting account id for a new group
     * and by filtering available group entitlements.
     */
    @PostConstruct
    public void initialize() {
        if(accountId == null && requestParameters.hasParameter(VcmsGuiPathParams.ACCOUNT_ID)) {
            accountId = this.getRequestedAccountId();
        }

        group = new Group();
        group.setAccountId(accountId);

        entitlementsDictionaryBean.setPredicate(new AccountGroupPredicate());
    }

    /**
     *
Creates a new group by invoking groups api service.

     *
Remember to set group details first: {@link #setGroup(Group)}

     *
It also assigns selected entitlements to newly created group.

     *
     * @return redirection url - requested by user or default redirection url: {@link #DEFAULT_ON_SUCCESS_REDIRECT}
     */
    public String createGroup() {
        try {
            LOG.debug("Creating group "+group.getName()+" "+group.getAccountId());

            group = groupsRepository.createGroup(group);
            groupsRepository.assignEntitlements(group, entitlementsDictionaryBean.getSelectedExplicitEntitlementDictionaries());

            messages.addMessage("groups.new.created");

            return getRedirectionURL();
        } catch(VcmsDuplicatedEntityException exception) {
            messages.addMessage("groups.validation.duplicated");
            return null;
        }  catch (VcmsException exception) {
            messages.addMessage("error");
            return null;
        }
    }

    /**
     * Returns the group details
     * @return group details
     */
    public Group getGroup() {
        return group;
    }

    /**
     * Sets the value of {@link #group}
     * @param group group
     */
    public void setGroup(Group group) {
        this.group = group;
    }

    /**
     * Returns the value of requested account id
     * @return requested account id
     */
    public Long getAccountId() {
        return accountId;
    }

    /**
     * Returns the value of {@link #entitlementsDictionaryBean}
     * @return entitlements dictionary bean
     */
    public EntitlementDictionaryBean getEntitlementsDictionaryBean() {
        return entitlementsDictionaryBean;
    }

    private String getRedirectionURL() {
        String redirectionURL = getRequestedRedirection();

        if (StringUtils.isEmpty(redirectionURL)) {
            redirectionURL = DEFAULT_ON_SUCCESS_REDIRECT;
        }
        redirectionURL = redirectionURL.replaceAll(PARAM_GROUP_ID_PARAM_TOKEN, String.valueOf(group.getId()));

        redirectionURL += ( redirectionURL.contains("?") ? "&" : "?" );
        redirectionURL += "faces-redirect=true";

        return redirectionURL;
    }

    private Long getRequestedAccountId() {
        String parameter = this.requestParameters.getParameter(VcmsGuiPathParams.ACCOUNT_ID);
        return StringUtils.isBlank(parameter) ? null : Long.valueOf(parameter);
    }

    private String getRequestedRedirection() {
        return this.requestParameters.getParameter("onSuccessRedirect");
    }
}


text:
package org.hisp.dhis.dataapproval.exceptions;

/**
 * @author Jim Grace
 */
public class UserMayNotApproveDataException
    extends DataApprovalException
{
    public UserMayNotApproveDataException()
    {
        super();
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$USER_HOME$/vagrant/vagrant-puppet-local/www/pscl/symfony/.idea/Psyclassics.iml" filepath="$USER_HOME$/vagrant/vagrant-puppet-local/www/pscl/symfony/.idea/Psyclassics.iml" />
    </modules>
  </component>
</project>


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC
		"-//mybatis.org//DTD Mapper 3.0//EN"
		"http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.sinotrans.transport.mapper">

	<sql id="findByOrderCondition">
		<if test="null != condition.orderBillNo and '' != condition.orderBillNo">
			and o.ORDE_BILL_NO like '%'|| #{condition.orderBillNo}||'%'
		</if>
		<if test="null != condition.orderShipName and '' != condition.orderShipName">
			and o.ORDE_SHIP_NAME like '%'|| #{condition.orderShipName}||'%'
		</if>
		<if test="null != condition.orderSailing and '' != condition.orderSailing">
			and o.ORDE_SAILING like '%'||#{condition.orderSailing}||'%'
		</if>
		<if test="null != condition.containerCaseNo and '' != condition.containerCaseNo">
			and ct.CONT_CASE_NO like '%'|| #{condition.containerCaseNo}||'%'
			and ct.CONT_ORDE_ID = o.ORDE_ID
			and ct.REC_STATUS = #{condition.recStatus}
		</if>
		<if test="null == condition.employeeVerify"> <!--管理员审核中心无此功能-->
			<if test="null !=condition.orderChangeState and 0 != condition.orderChangeState">
				and o.orde_change_state = #{condition.orderChangeState}
			</if>
			<if test="null !=condition.orderToGbsState and 0 != condition.orderToGbsState">
				and o.orde_togbs_state = #{condition.orderToGbsState}
			</if>
		</if>
		<if test="null !=condition.userId and '' != condition.userId">  <!--user-->
			and (o.creator = #{condition.userId}
			<if test="null != condition.ownerCompanyArr">  <!--#{condition.ownerCompanyArr} (41,42)-->
				or o.creator in
				<foreach item="itemOut" index="index" collection="#{condition.ownerCompanyArr}.keySet()" open="" separator="" close="">
					<foreach collection="itemOut" index="index" item="item" open="(" separator="," close=")">
						'${item}'
					</foreach>
				</foreach>
			</if>
			<if test="null != condition.orderGoodOwnerCode">
				or o.ORDE_GOOD_OWNER_CODE = #{condition.orderGoodOwnerCode}
			</if>
			)
		</if>
		<if test="null !=condition.orderTranCompany and 0 != condition.orderTranCompany"> <!--employee-->
			<if test="null == condition.employeeVerify"> <!--employee notice-->
				 and o.orde_change_state != 0
			</if>
			and o.ORDE_STATE != 1
			and o.ORDE_TRAN_COMPANY = #{condition.orderTranCompany}
		</if>
		and o.REC_STATUS = #{condition.recStatus}
		<!--and n.REC_STATUS = #{condition.recStatus}-->
	</sql>

	<select id="SearchImportOrderList" parameterType="map" resultType="hashmap">
		<include refid="util.PRE_SQL"></include>
		select distinct(o.ORDE_ID), o.ORDE_BILL_NO, o.ORDE_WHARF, o.ORDE_SHIP_NAME, o.ORDE_SAILING, o.ORDE_STATE, o.ORDE_ARRIVAL_DATE, o.ORDE_SHIP_AGENCY, o.ORDE_TOTAL_CASE,
		nvl(o.orde_change_state,0) orde_change_state, nvl(o.ORDE_TOGBS_STATE, 0) ORDE_TOGBS_STATE, o.ORDE_CHANGE_TIME, o.ORDE_ORDERING_TIME, o.CREATOR
		<if test="null == condition.employeeVerify">
			<if test="null != condition.userId and '' != condition.userId">
				, (select case when nvl(count(n.orcn_id), 0) = 0 then 0
				when nvl(count(n.orcn_id), 0) > 0 then 1
				end as if_light
				from orde_change_notice n where n.orcn_orde_id = o.orde_id and n.ORCN_IS_CUSTOMER_READ = 0 and n.REC_STATUS = #{condition.recStatus}) if_light
			</if>
			<if test="null !=condition.peopleType and 2 == condition.peopleType">  <!--user-->
				, (select case when nvl(count(n.orcn_id), 0) = 0 then 0
				when nvl(count(n.orcn_id), 0) > 0 then 1
				end as if_light
				from orde_change_notice n where n.orcn_orde_id = o.orde_id and n.ORCN_IS_SERVICE_READ = 0 and n.REC_STATUS = #{condition.recStatus}) if_light
			</if>
			<if test="null !=condition.peopleType and 3 == condition.peopleType">  <!--user-->
				, (select case when nvl(count(n.orcn_id), 0) = 0 then 0
				when nvl(count(n.orcn_id), 0) > 0 then 1
				end as if_light
				from orde_change_notice n where n.orcn_orde_id = o.orde_id and n.ORCN_IS_DISPATCH_READ = 0 and n.REC_STATUS = #{condition.recStatus}) if_light
			</if>
		</if>
		from ORDERD o <if test="null != condition.containerCaseNo and '' != condition.containerCaseNo">, CONTAINER ct</if>
		<!--from <if test="null != condition.containerCaseNo and '' != condition.containerCaseNo"> CONTAINER ct</if>,-->
		<!--ORDERD o left join orde_change_notice n on n.orcn_orde_id = o.orde_id-->
		where o.orde_type = 1
		<if test="null != condition.orderArrivalDateFrom and '' != condition.orderArrivalDateFrom">
			and o.ORDE_ARRIVAL_DATE >= to_date(#{condition.orderArrivalDateFrom},'yyyy-MM-dd')
		</if>
		<if test="null != condition.orderSailingDateTo and '' != condition.orderSailingDateTo">
			and o.ORDE_ARRIVAL_DATE <= to_date(#{condition.orderArrivalDateTo},'yyyy-MM-dd')
		</if>
		<include refid="findByOrderCondition"/>
		and <include refid="util.COMMON_DYN_SQL" />
		and <include refid="util.DATA_AUTH" />
		<include refid="util.POST_SQL"></include>
	</select>

	<select id="SearchExportOrderList" parameterType="map" resultType="hashmap">
		<include refid="util.PRE_SQL"></include>
		select distinct(o.ORDE_ID), o.ORDE_BILL_NO, o.ORDE_WHARF, o.ORDE_SHIP_NAME, o.ORDE_SAILING, o.ORDE_STATE, o.ORDE_SAILING_DATE, o.ORDE_ENTER_PORT, o.ORDE_DESTINATION_PORT, o.ORDE_SHIPPING_CODE,
		nvl(o.orde_change_state,0) orde_change_state, nvl(o.ORDE_TOGBS_STATE, 0) ORDE_TOGBS_STATE, o.ORDE_CHANGE_TIME, o.ORDE_ORDERING_TIME, o.ORDE_GOOD_OWNER, o.CREATOR
		<if test="null == condition.employeeVerify">
			<if test="null != condition.userId and '' != condition.userId">
				, (select case when nvl(count(n.orcn_id), 0) = 0 then 0
				when nvl(count(n.orcn_id), 0) > 0 then 1
				end as if_light
				from orde_change_notice n where n.orcn_orde_id = o.orde_id and n.ORCN_IS_CUSTOMER_READ = 0 and n.REC_STATUS = #{condition.recStatus}) if_light
			</if>
			<if test="null !=condition.peopleType and 2 == condition.peopleType">  <!--user-->
				, (select case when nvl(count(n.orcn_id), 0) = 0 then 0
				when nvl(count(n.orcn_id), 0) > 0 then 1
				end as if_light
				from orde_change_notice n where n.orcn_orde_id = o.orde_id and n.ORCN_IS_SERVICE_READ = 0 and n.REC_STATUS = #{condition.recStatus}) if_light
			</if>
			<if test="null !=condition.peopleType and 3 == condition.peopleType">  <!--user-->
				, (select case when nvl(count(n.orcn_id), 0) = 0 then 0
				when nvl(count(n.orcn_id), 0) > 0 then 1
				end as if_light
				from orde_change_notice n where n.orcn_orde_id = o.orde_id and n.ORCN_IS_DISPATCH_READ = 0 and n.REC_STATUS = #{condition.recStatus}) if_light
			</if>
		</if>
		from ORDERD o <if test="null != condition.containerCaseNo and '' != condition.containerCaseNo">, CONTAINER ct</if>
		where o.orde_type = 2
		<if test="null != condition.orderSailingDateFrom and '' != condition.orderSailingDateFrom">
			and o.ORDE_SAILING_DATE >= to_date(#{condition.orderSailingDateFrom},'yyyy-MM-dd')
		</if>
		<if test="null != condition.orderSailingDateTo and '' != condition.orderSailingDateTo">
			and o.ORDE_SAILING_DATE <= to_date(#{condition.orderSailingDateTo},'yyyy-MM-dd')
		</if>
		<include refid="findByOrderCondition"/>
		and <include refid="util.COMMON_DYN_SQL" />
		and <include refid="util.DATA_AUTH" />
		<include refid="util.POST_SQL"></include>
	</select>
</mapper>


text:
require_relative "test_helper"
require "ninja_server"

class NinjaServerTest < Minitest::Unit::TestCase
  def setup
    NinjaServer
  end

  def test_server
  end
end


text:
[![CI Status](http://img.shields.io/travis/mrandall/APIClient.svg?style=flat)](https://travis-ci.org/mrandall/APIClient)
[![Version](https://img.shields.io/cocoapods/v/APIClient.svg?style=flat)](http://cocoapods.org/pods/APIClient)
[![License](https://img.shields.io/cocoapods/l/APIClient.svg?style=flat)](http://cocoapods.org/pods/APIClient)
[![Platform](https://img.shields.io/cocoapods/p/APIClient.svg?style=flat)](http://cocoapods.org/pods/APIClient)

## Objective

1. Pattern to define all types (GET, POST, Multi-part, Streaming, POST with query in URL, ...) of requests with a single protocol.
2. Pattern to optionally make this same object also responsible for what may need to a happen between a network request completing and the completion of updating the client applications state with a response.
3. Pattern to easily map Alamofire Response objects to Alamofire Response objects which contain an client application specific error. Allow this to happen on the API level or individual API request level.
4. Not get in the way of anything Alamofire can do.

## Usage

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Installation

APIClient is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "APIClient"
```

## Author

mrandall

## License

APIClient is available under the MIT license. See the LICENSE file for more info.


text:
evolvenode coffeescript plugin

## NOTE!
**NOT** ready for production.


text:
<Page navigatingTo="navigatingTo"
  xmlns:lv="nativescript-telerik-ui/listview"
  xmlns:d="pages/drawer"
  xmlns:ab="pages/action-bar"
  xmlns:drawer="nativescript-telerik-ui/sidedrawer"
  xmlns:js="nativescript-joystick">

  <ab:action-bar-template />

  <drawer:RadSideDrawer
    id="side-drawer"
    drawerSize="260"
    xmlns:drawer="nativescript-telerik-ui/sidedrawer">

    <drawer:RadSideDrawer.drawerContent>
      <d:drawer-content />
    </drawer:RadSideDrawer.drawerContent>

    <drawer:RadSideDrawer.drawerTransition>
      <drawer:PushTransition />
    </drawer:RadSideDrawer.drawerTransition>

    <drawer:RadSideDrawer.mainContent>
      <StackLayout class="m-t-5">
        <Button text="Start" tap="{{ startJoystick }}" class="btn btn-primary" />
        <Button text="Stop" tap="{{ stopJoystick }}" class="btn btn-primary" />
        <StackLayout orientation="horizontal">
          <js:JoyStick
            padColor="black"
            buttonColor="white"
            width="50%"
            vertical="{{speed}}">
          </js:JoyStick>
          <js:JoyStick
            padColor="blue"
            buttonColor="red"
            width="50%"
            horizontal="{{turnSpeed}}">
          </js:JoyStick>
        </StackLayout>
      </StackLayout>
    </drawer:RadSideDrawer.mainContent>
  </drawer:RadSideDrawer>
</Page>


text:
{-# OPTIONS_GHC -Wall -Werror #-}

-- | Facilities for parsing escape sequences.  Functions defined in
-- this file interpret escapes based on the C/C++ standard, expanded
-- to accomodate Unicode characters.
module Text.Escapes.ByteString(
       fromEscapeChar,
       fromEscape
       ) where

import Data.ByteString.UTF8

import qualified Text.Escapes as Escapes

-- | Map the character in a single-character escape to the escaped
-- character if preceeded by a backslash.
--
-- Example: the character @'n'@ is mapped to the character @'\n'@.
fromEscapeChar :: Char -> Char
fromEscapeChar = Escapes.fromEscapeChar

fromEscape :: ByteString -> Char
fromEscape = Escapes.fromEscape . toString


text:
angular.module('app.dashboard').controller('CateogryCtrl', ['$rootScope', '$scope', '$filter','dialog', 'categoryService', function($rootScope, $scope, $filter,dialog,categoryService) {
    $rootScope.title="图书分类管理";
    var ctrl = this;

    ctrl.getCategoryList = getCategoryList;

    function getCategoryList(tableState) {

        var tableParams = {
            searchKeywords: ctrl.searchKeywords,
            field: tableState.sort.predicate,
            dir: tableState.sort.reverse ? 'asc' : 'desc',
            pageSize: tableState.pagination.number,
            pageNumber: Math.floor(tableState.pagination.start / tableState.pagination.number) + 1,
        };

        categoryService.getDataTable().success(function(response) {
            if (response.meta.success) {
                ctrl.categoryDataTable = response.data;

            } else {
                dialog.alert("获取图书分类列表失败");
                console.log(response.meta.message);
            }

        });
    }

}]);


text:
<?php namespace Wright\Settings;

use Symfony\Component\Yaml\Yaml;

$container->bind(SettingsInterface::class, YamlSettings::class, [

    'source_filesystem' => $container->get('source_filesystem'),

    'yaml' => $container->definition(Yaml::class)
]);


text:
dadish.github.io
================


text:
<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
  xmlns:gwt='urn:import:com.google.gwt.user.client.ui'
  xmlns:uf='urn:import:org.uberfire.client.common'>

  <ui:with field='resources' type='org.uberfire.client.resources.CommonResources'/>
  <ui:with field='altedImages' type='org.uberfire.client.resources.CommonAltedImages'/>

  <gwt:HTMLPanel>

        <gwt:Label ui:field="titleLabel"></gwt:Label>

        <uf:ImageButton ui:field="closeButton" img='{altedImages.close}'></uf:ImageButton>

  </gwt:HTMLPanel>

</ui:UiBinder>


text:
package org.vitrivr.adampro.web.main

import org.vitrivr.adampro.web.controller.{WebServer, AdamController}
import org.vitrivr.adampro.communication.RPCClient

/**
  * adamtwo
  *
  * Ivan Giangreco
  * March 2016
  */
object ClientStartup {
  val httpPort = 9099

  val grpcHost = "localhost"
  val grpcPort = 5890

  def main(args: Array[String]): Unit = {
    val grpc = RPCClient(grpcHost, grpcPort)

    val web = new WebServer(httpPort, new AdamController(grpc)).main(Array[String]())
  }
}


text:
"""A module that contains an algorithm for multiple-objects tracking"""

import cv2
import numpy as np
import copy

class MultipleObjectsTracker:
    """Multiple-objects tracker

        This class implements an algorithm for tracking multiple objects in
        a video sequence.
        The algorithm combines a saliency map for object detection and
        mean-shift tracking for object tracking.
    """
    def __init__(self, min_area=400, min_shift2=5):
        """Constructor

            This method initializes the multiple-objects tracking algorithm.

            :param min_area: Minimum area for a proto-object contour to be
                             considered a real object
            :param min_shift2: Minimum distance for a proto-object to drift
                               from frame to frame ot be considered a real
                               object
        """
        self.object_roi = []
        self.object_box = []

        self.min_cnt_area = min_area
        self.min_shift2 = min_shift2

        # Setup the termination criteria, either 100 iteration or move by at
        # least 1 pt
        self.term_crit = (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT,
                          100, 1)

    def advance_frame(self, frame, proto_objects_map):
        """Advances the algorithm by a single frame

            This method tracks all objects via the following steps:
             - adds all bounding boxes from saliency map as potential
               targets
             - finds bounding boxes from previous frame in current frame
               via mean-shift tracking
             - combines the two lists by removing duplicates

            certain targets are discarded:
             - targets that are too small
             - targets that don't move

            :param frame: New input RGB frame
            :param proto_objects_map: corresponding proto-objects map of the
                                      frame
            :returns: frame annotated with bounding boxes around all objects
                      that are being tracked
        """
        self.tracker = copy.deepcopy(frame)

        # build a list of all bounding boxes
        box_all = []

        # append to the list all bounding boxes found from the
        # current proto-objects map
        box_all = self._append_boxes_from_saliency(proto_objects_map, box_all)

        # find all bounding boxes extrapolated from last frame
        # via mean-shift tracking
        box_all = self._append_boxes_from_meanshift(frame, box_all)

        # only keep those that are both salient and in mean shift
        if len(self.object_roi) == 0:
            group_thresh = 0  # no previous frame: keep all form saliency
        else:
            group_thresh = 1  # previous frame + saliency
        box_grouped, _ = cv2.groupRectangles(box_all, group_thresh, 0.1)

        # update mean-shift bookkeeping for remaining boxes
        self._update_mean_shift_bookkeeping(frame, box_grouped)

        # draw remaining boxes
        for (x, y, w, h) in box_grouped:
            cv2.rectangle(self.tracker, (x, y), (x + w, y + h),
                          (0, 255, 0), 2)

        return self.tracker

    def _append_boxes_from_saliency(self, proto_objects_map, box_all):
        """Adds to the list all bounding boxes found with the saliency map

            A saliency map is used to find objects worth tracking in each
            frame. This information is combined with a mean-shift tracker
            to find objects of relevance that move, and to discard everything
            else.

            :param proto_objects_map: proto-objects map of the current frame
            :param box_all: append bounding boxes from saliency to this list
            :returns: new list of all collected bounding boxes
        """
        # find all bounding boxes in new saliency map
        box_sal = []
        cnt_sal, _ = cv2.findContours(proto_objects_map, 1, 2)
        for cnt in cnt_sal:
            # discard small contours
            if cv2.contourArea(cnt) < self.min_cnt_area:
                continue

            # otherwise add to list of boxes found from saliency map
            box = cv2.boundingRect(cnt)
            box_all.append(box)

        return box_all

    def _append_boxes_from_meanshift(self, frame, box_all):
        """Adds to the list all bounding boxes found with mean-shift tracking

            Mean-shift tracking is used to track objects from frame to frame.
            This information is combined with a saliency map to discard
            false-positives and focus only on relevant objects that move.

            :param frame: current RGB image frame
            :box_all: append bounding boxes from tracking to this list
            :returns: new list of all collected bounding boxes
        """
        hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)

        for i in xrange(len(self.object_roi)):
            roi_hist = copy.deepcopy(self.object_roi[i])
            box_old = copy.deepcopy(self.object_box[i])

            dst = cv2.calcBackProject([hsv], [0], roi_hist, [0, 180], 1)
            ret, box_new = cv2.meanShift(dst, tuple(box_old), self.term_crit)
            self.object_box[i] = copy.deepcopy(box_new)

            # discard boxes that don't move
            (xo, yo, wo, ho) = box_old
            (xn, yn, wn, hn) = box_new

            co = [xo + wo/2, yo + ho/2]
            cn = [xn + wn/2, yn + hn/2]
            if (co[0]-cn[0])**2 + (co[1]-cn[1])**2 >= self.min_shift2:
                box_all.append(box_new)

        return box_all

    def _update_mean_shift_bookkeeping(self, frame, box_grouped):
        """Preprocess all valid bounding boxes for mean-shift tracking

            This method preprocesses all relevant bounding boxes (those that
            have been detected by both mean-shift tracking and saliency) for
            the next mean-shift step.

            :param frame: current RGB input frame
            :param box_grouped: list of bounding boxes
        """
        hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)

        self.object_roi = []
        self.object_box = []
        for box in box_grouped:
            (x, y, w, h) = box
            hsv_roi = hsv[y:y + h, x:x + w]
            mask = cv2.inRange(hsv_roi, np.array((0., 60., 32.)),
                               np.array((180., 255., 255.)))
            roi_hist = cv2.calcHist([hsv_roi], [0], mask, [180], [0, 180])
            cv2.normalize(roi_hist, roi_hist, 0, 255, cv2.NORM_MINMAX)

            self.object_roi.append(roi_hist)
            self.object_box.append(box)


text:
using System;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Xml;
using System.Xml.Serialization;
using SubSonic;
using SubSonic.Utilities;
namespace DalSic
{
	/// <summary>
	/// Strongly-typed collection for the LabTempResultadoDetalle class.
	/// </summary>
    [Serializable]
	public partial class LabTempResultadoDetalleCollection : ActiveList<LabTempResultadoDetalle, LabTempResultadoDetalleCollection>
	{
		public LabTempResultadoDetalleCollection() {}

        /// <summary>
		/// Filters an existing collection based on the set criteria. This is an in-memory filter
		/// Thanks to developingchris for this!
        /// </summary>
        /// <returns>LabTempResultadoDetalleCollection</returns>
		public LabTempResultadoDetalleCollection Filter()
        {
            for (int i = this.Count - 1; i > -1; i--)
            {
                LabTempResultadoDetalle o = this[i];
                foreach (SubSonic.Where w in this.wheres)
                {
                    bool remove = false;
                    System.Reflection.PropertyInfo pi = o.GetType().GetProperty(w.ColumnName);
                    if (pi.CanRead)
                    {
                        object val = pi.GetValue(o, null);
                        switch (w.Comparison)
                        {
                            case SubSonic.Comparison.Equals:
                                if (!val.Equals(w.ParameterValue))
                                {
                                    remove = true;
                                }
                                break;
                        }
                    }
                    if (remove)
                    {
                        this.Remove(o);
                        break;
                    }
                }
            }
            return this;
        }

	}
	/// <summary>
	/// This is an ActiveRecord class which wraps the LAB_Temp_ResultadoDetalle table.
	/// </summary>
	[Serializable]
	public partial class LabTempResultadoDetalle : ActiveRecord<LabTempResultadoDetalle>, IActiveRecord
	{
		#region .ctors and Default Settings

		public LabTempResultadoDetalle()
		{
		  SetSQLProps();
		  InitSetDefaults();
		  MarkNew();
		}

		private void InitSetDefaults() { SetDefaults(); }

		public LabTempResultadoDetalle(bool useDatabaseDefaults)
		{
			SetSQLProps();
			if(useDatabaseDefaults)
				ForceDefaults();
			MarkNew();
		}

		public LabTempResultadoDetalle(object keyID)
		{
			SetSQLProps();
			InitSetDefaults();
			LoadByKey(keyID);
		}

		public LabTempResultadoDetalle(string columnName, object columnValue)
		{
			SetSQLProps();
			InitSetDefaults();
			LoadByParam(columnName,columnValue);
		}

		protected static void SetSQLProps() { GetTableSchema(); }

		#endregion

		#region Schema and Query Accessor
		public static Query CreateQuery() { return new Query(Schema); }
		public static TableSchema.Table Schema
		{
			get
			{
				if (BaseSchema == null)
					SetSQLProps();
				return BaseSchema;
			}
		}

		private static void GetTableSchema()
		{
			if(!IsSchemaInitialized)
			{
				//Schema declaration
				TableSchema.Table schema = new TableSchema.Table("LAB_Temp_ResultadoDetalle", TableType.Table, DataService.GetInstance("sicProvider"));
				schema.Columns = new TableSchema.TableColumnCollection();
				schema.SchemaName = @"dbo";
				//columns

				TableSchema.TableColumn colvarIdProtocolo = new TableSchema.TableColumn(schema);
				colvarIdProtocolo.ColumnName = "idProtocolo";
				colvarIdProtocolo.DataType = DbType.Int32;
				colvarIdProtocolo.MaxLength = 0;
				colvarIdProtocolo.AutoIncrement = false;
				colvarIdProtocolo.IsNullable = false;
				colvarIdProtocolo.IsPrimaryKey = true;
				colvarIdProtocolo.IsForeignKey = false;
				colvarIdProtocolo.IsReadOnly = false;
				colvarIdProtocolo.DefaultSetting = @"";
				colvarIdProtocolo.ForeignKeyTableName = "";
				schema.Columns.Add(colvarIdProtocolo);

				TableSchema.TableColumn colvarIdEfector = new TableSchema.TableColumn(schema);
				colvarIdEfector.ColumnName = "idEfector";
				colvarIdEfector.DataType = DbType.Int32;
				colvarIdEfector.MaxLength = 0;
				colvarIdEfector.AutoIncrement = false;
				colvarIdEfector.IsNullable = false;
				colvarIdEfector.IsPrimaryKey = true;
				colvarIdEfector.IsForeignKey = false;
				colvarIdEfector.IsReadOnly = false;
				colvarIdEfector.DefaultSetting = @"";
				colvarIdEfector.ForeignKeyTableName = "";
				schema.Columns.Add(colvarIdEfector);

				TableSchema.TableColumn colvarIdDetalleProtocolo = new TableSchema.TableColumn(schema);
				colvarIdDetalleProtocolo.ColumnName = "idDetalleProtocolo";
				colvarIdDetalleProtocolo.DataType = DbType.Int32;
				colvarIdDetalleProtocolo.MaxLength = 0;
				colvarIdDetalleProtocolo.AutoIncrement = false;
				colvarIdDetalleProtocolo.IsNullable = false;
				colvarIdDetalleProtocolo.IsPrimaryKey = true;
				colvarIdDetalleProtocolo.IsForeignKey = false;
				colvarIdDetalleProtocolo.IsReadOnly = false;
				colvarIdDetalleProtocolo.DefaultSetting = @"";
				colvarIdDetalleProtocolo.ForeignKeyTableName = "";
				schema.Columns.Add(colvarIdDetalleProtocolo);

				TableSchema.TableColumn colvarCodigoNomenclador = new TableSchema.TableColumn(schema);
				colvarCodigoNomenclador.ColumnName = "codigoNomenclador";
				colvarCodigoNomenclador.DataType = DbType.AnsiString;
				colvarCodigoNomenclador.MaxLength = 50;
				colvarCodigoNomenclador.AutoIncrement = false;
				colvarCodigoNomenclador.IsNullable = true;
				colvarCodigoNomenclador.IsPrimaryKey = false;
				colvarCodigoNomenclador.IsForeignKey = false;
				colvarCodigoNomenclador.IsReadOnly = false;

						colvarCodigoNomenclador.DefaultSetting = @"('')";
				colvarCodigoNomenclador.ForeignKeyTableName = "";
				schema.Columns.Add(colvarCodigoNomenclador);

				TableSchema.TableColumn colvarCodigo = new TableSchema.TableColumn(schema);
				colvarCodigo.ColumnName = "codigo";
				colvarCodigo.DataType = DbType.String;
				colvarCodigo.MaxLength = 50;
				colvarCodigo.AutoIncrement = false;
				colvarCodigo.IsNullable = false;
				colvarCodigo.IsPrimaryKey = false;
				colvarCodigo.IsForeignKey = false;
				colvarCodigo.IsReadOnly = false;
				colvarCodigo.DefaultSetting = @"";
				colvarCodigo.ForeignKeyTableName = "";
				schema.Columns.Add(colvarCodigo);

				TableSchema.TableColumn colvarOrdenArea = new TableSchema.TableColumn(schema);
				colvarOrdenArea.ColumnName = "ordenArea";
				colvarOrdenArea.DataType = DbType.Int32;
				colvarOrdenArea.MaxLength = 0;
				colvarOrdenArea.AutoIncrement = false;
				colvarOrdenArea.IsNullable = false;
				colvarOrdenArea.IsPrimaryKey = false;
				colvarOrdenArea.IsForeignKey = false;
				colvarOrdenArea.IsReadOnly = false;
				colvarOrdenArea.DefaultSetting = @"";
				colvarOrdenArea.ForeignKeyTableName = "";
				schema.Columns.Add(colvarOrdenArea);

				TableSchema.TableColumn colvarOrden = new TableSchema.TableColumn(schema);
				colvarOrden.ColumnName = "orden";
				colvarOrden.DataType = DbType.Int32;
				colvarOrden.MaxLength = 0;
				colvarOrden.AutoIncrement = false;
				colvarOrden.IsNullable = false;
				colvarOrden.IsPrimaryKey = false;
				colvarOrden.IsForeignKey = false;
				colvarOrden.IsReadOnly = false;
				colvarOrden.DefaultSetting = @"";
				colvarOrden.ForeignKeyTableName = "";
				schema.Columns.Add(colvarOrden);

				TableSchema.TableColumn colvarArea = new TableSchema.TableColumn(schema);
				colvarArea.ColumnName = "area";
				colvarArea.DataType = DbType.String;
				colvarArea.MaxLength = 50;
				colvarArea.AutoIncrement = false;
				colvarArea.IsNullable = false;
				colvarArea.IsPrimaryKey = false;
				colvarArea.IsForeignKey = false;
				colvarArea.IsReadOnly = false;
				colvarArea.DefaultSetting = @"";
				colvarArea.ForeignKeyTableName = "";
				schema.Columns.Add(colvarArea);

				TableSchema.TableColumn colvarGrupo = new TableSchema.TableColumn(schema);
				colvarGrupo.ColumnName = "grupo";
				colvarGrupo.DataType = DbType.String;
				colvarGrupo.MaxLength = 500;
				colvarGrupo.AutoIncrement = false;
				colvarGrupo.IsNullable = false;
				colvarGrupo.IsPrimaryKey = false;
				colvarGrupo.IsForeignKey = false;
				colvarGrupo.IsReadOnly = false;
				colvarGrupo.DefaultSetting = @"";
				colvarGrupo.ForeignKeyTableName = "";
				schema.Columns.Add(colvarGrupo);

				TableSchema.TableColumn colvarItem = new TableSchema.TableColumn(schema);
				colvarItem.ColumnName = "item";
				colvarItem.DataType = DbType.String;
				colvarItem.MaxLength = 500;
				colvarItem.AutoIncrement = false;
				colvarItem.IsNullable = false;
				colvarItem.IsPrimaryKey = false;
				colvarItem.IsForeignKey = false;
				colvarItem.IsReadOnly = false;
				colvarItem.DefaultSetting = @"";
				colvarItem.ForeignKeyTableName = "";
				schema.Columns.Add(colvarItem);

				TableSchema.TableColumn colvarObservaciones = new TableSchema.TableColumn(schema);
				colvarObservaciones.ColumnName = "observaciones";
				colvarObservaciones.DataType = DbType.String;
				colvarObservaciones.MaxLength = 500;
				colvarObservaciones.AutoIncrement = false;
				colvarObservaciones.IsNullable = false;
				colvarObservaciones.IsPrimaryKey = false;
				colvarObservaciones.IsForeignKey = false;
				colvarObservaciones.IsReadOnly = false;
				colvarObservaciones.DefaultSetting = @"";
				colvarObservaciones.ForeignKeyTableName = "";
				schema.Columns.Add(colvarObservaciones);

				TableSchema.TableColumn colvarEsTitulo = new TableSchema.TableColumn(schema);
				colvarEsTitulo.ColumnName = "esTitulo";
				colvarEsTitulo.DataType = DbType.AnsiString;
				colvarEsTitulo.MaxLength = 2;
				colvarEsTitulo.AutoIncrement = false;
				colvarEsTitulo.IsNullable = false;
				colvarEsTitulo.IsPrimaryKey = false;
				colvarEsTitulo.IsForeignKey = false;
				colvarEsTitulo.IsReadOnly = false;
				colvarEsTitulo.DefaultSetting = @"";
				colvarEsTitulo.ForeignKeyTableName = "";
				schema.Columns.Add(colvarEsTitulo);

				TableSchema.TableColumn colvarDerivado = new TableSchema.TableColumn(schema);
				colvarDerivado.ColumnName = "derivado";
				colvarDerivado.DataType = DbType.String;
				colvarDerivado.MaxLength = 100;
				colvarDerivado.AutoIncrement = false;
				colvarDerivado.IsNullable = false;
				colvarDerivado.IsPrimaryKey = false;
				colvarDerivado.IsForeignKey = false;
				colvarDerivado.IsReadOnly = false;
				colvarDerivado.DefaultSetting = @"";
				colvarDerivado.ForeignKeyTableName = "";
				schema.Columns.Add(colvarDerivado);

				TableSchema.TableColumn colvarUnidad = new TableSchema.TableColumn(schema);
				colvarUnidad.ColumnName = "unidad";
				colvarUnidad.DataType = DbType.String;
				colvarUnidad.MaxLength = 500;
				colvarUnidad.AutoIncrement = false;
				colvarUnidad.IsNullable = false;
				colvarUnidad.IsPrimaryKey = false;
				colvarUnidad.IsForeignKey = false;
				colvarUnidad.IsReadOnly = false;
				colvarUnidad.DefaultSetting = @"";
				colvarUnidad.ForeignKeyTableName = "";
				schema.Columns.Add(colvarUnidad);

				TableSchema.TableColumn colvarHiv = new TableSchema.TableColumn(schema);
				colvarHiv.ColumnName = "hiv";
				colvarHiv.DataType = DbType.Boolean;
				colvarHiv.MaxLength = 0;
				colvarHiv.AutoIncrement = false;
				colvarHiv.IsNullable = true;
				colvarHiv.IsPrimaryKey = false;
				colvarHiv.IsForeignKey = false;
				colvarHiv.IsReadOnly = false;
				colvarHiv.DefaultSetting = @"";
				colvarHiv.ForeignKeyTableName = "";
				schema.Columns.Add(colvarHiv);

				TableSchema.TableColumn colvarMetodo = new TableSchema.TableColumn(schema);
				colvarMetodo.ColumnName = "metodo";
				colvarMetodo.DataType = DbType.String;
				colvarMetodo.MaxLength = 500;
				colvarMetodo.AutoIncrement = false;
				colvarMetodo.IsNullable = false;
				colvarMetodo.IsPrimaryKey = false;
				colvarMetodo.IsForeignKey = false;
				colvarMetodo.IsReadOnly = false;
				colvarMetodo.DefaultSetting = @"";
				colvarMetodo.ForeignKeyTableName = "";
				schema.Columns.Add(colvarMetodo);

				TableSchema.TableColumn colvarValorReferencia = new TableSchema.TableColumn(schema);
				colvarValorReferencia.ColumnName = "valorReferencia";
				colvarValorReferencia.DataType = DbType.String;
				colvarValorReferencia.MaxLength = 500;
				colvarValorReferencia.AutoIncrement = false;
				colvarValorReferencia.IsNullable = false;
				colvarValorReferencia.IsPrimaryKey = false;
				colvarValorReferencia.IsForeignKey = false;
				colvarValorReferencia.IsReadOnly = false;
				colvarValorReferencia.DefaultSetting = @"";
				colvarValorReferencia.ForeignKeyTableName = "";
				schema.Columns.Add(colvarValorReferencia);

				TableSchema.TableColumn colvarOrden1 = new TableSchema.TableColumn(schema);
				colvarOrden1.ColumnName = "orden1";
				colvarOrden1.DataType = DbType.Int32;
				colvarOrden1.MaxLength = 0;
				colvarOrden1.AutoIncrement = false;
				colvarOrden1.IsNullable = false;
				colvarOrden1.IsPrimaryKey = false;
				colvarOrden1.IsForeignKey = false;
				colvarOrden1.IsReadOnly = false;
				colvarOrden1.DefaultSetting = @"";
				colvarOrden1.ForeignKeyTableName = "";
				schema.Columns.Add(colvarOrden1);

				TableSchema.TableColumn colvarMuestra = new TableSchema.TableColumn(schema);
				colvarMuestra.ColumnName = "muestra";
				colvarMuestra.DataType = DbType.String;
				colvarMuestra.MaxLength = 2;
				colvarMuestra.AutoIncrement = false;
				colvarMuestra.IsNullable = false;
				colvarMuestra.IsPrimaryKey = false;
				colvarMuestra.IsForeignKey = false;
				colvarMuestra.IsReadOnly = false;
				colvarMuestra.DefaultSetting = @"";
				colvarMuestra.ForeignKeyTableName = "";
				schema.Columns.Add(colvarMuestra);

				TableSchema.TableColumn colvarConresultado = new TableSchema.TableColumn(schema);
				colvarConresultado.ColumnName = "conresultado";
				colvarConresultado.DataType = DbType.Int32;
				colvarConresultado.MaxLength = 0;
				colvarConresultado.AutoIncrement = false;
				colvarConresultado.IsNullable = false;
				colvarConresultado.IsPrimaryKey = false;
				colvarConresultado.IsForeignKey = false;
				colvarConresultado.IsReadOnly = false;
				colvarConresultado.DefaultSetting = @"";
				colvarConresultado.ForeignKeyTableName = "";
				schema.Columns.Add(colvarConresultado);

				TableSchema.TableColumn colvarResultado = new TableSchema.TableColumn(schema);
				colvarResultado.ColumnName = "resultado";
				colvarResultado.DataType = DbType.String;
				colvarResultado.MaxLength = 4000;
				colvarResultado.AutoIncrement = false;
				colvarResultado.IsNullable = true;
				colvarResultado.IsPrimaryKey = false;
				colvarResultado.IsForeignKey = false;
				colvarResultado.IsReadOnly = false;
				colvarResultado.DefaultSetting = @"";
				colvarResultado.ForeignKeyTableName = "";
				schema.Columns.Add(colvarResultado);

				TableSchema.TableColumn colvarCodigo2 = new TableSchema.TableColumn(schema);
				colvarCodigo2.ColumnName = "codigo2";
				colvarCodigo2.DataType = DbType.String;
				colvarCodigo2.MaxLength = 50;
				colvarCodigo2.AutoIncrement = false;
				colvarCodigo2.IsNullable = false;
				colvarCodigo2.IsPrimaryKey = false;
				colvarCodigo2.IsForeignKey = false;
				colvarCodigo2.IsReadOnly = false;
				colvarCodigo2.DefaultSetting = @"";
				colvarCodigo2.ForeignKeyTableName = "";
				schema.Columns.Add(colvarCodigo2);

				TableSchema.TableColumn colvarProfesionalVal = new TableSchema.TableColumn(schema);
				colvarProfesionalVal.ColumnName = "profesional_val";
				colvarProfesionalVal.DataType = DbType.String;
				colvarProfesionalVal.MaxLength = 500;
				colvarProfesionalVal.AutoIncrement = false;
				colvarProfesionalVal.IsNullable = false;
				colvarProfesionalVal.IsPrimaryKey = false;
				colvarProfesionalVal.IsForeignKey = false;
				colvarProfesionalVal.IsReadOnly = false;

						colvarProfesionalVal.DefaultSetting = @"('')";
				colvarProfesionalVal.ForeignKeyTableName = "";
				schema.Columns.Add(colvarProfesionalVal);

				BaseSchema = schema;
				//add this schema to the provider
				//so we can query it later
				DataService.Providers["sicProvider"].AddSchema("LAB_Temp_ResultadoDetalle",schema);
			}
		}
		#endregion

		#region Props

		[XmlAttribute("IdProtocolo")]
		[Bindable(true)]
		public int IdProtocolo
		{
			get { return GetColumnValue<int>(Columns.IdProtocolo); }
			set { SetColumnValue(Columns.IdProtocolo, value); }
		}

		[XmlAttribute("IdEfector")]
		[Bindable(true)]
		public int IdEfector
		{
			get { return GetColumnValue<int>(Columns.IdEfector); }
			set { SetColumnValue(Columns.IdEfector, value); }
		}

		[XmlAttribute("IdDetalleProtocolo")]
		[Bindable(true)]
		public int IdDetalleProtocolo
		{
			get { return GetColumnValue<int>(Columns.IdDetalleProtocolo); }
			set { SetColumnValue(Columns.IdDetalleProtocolo, value); }
		}

		[XmlAttribute("CodigoNomenclador")]
		[Bindable(true)]
		public string CodigoNomenclador
		{
			get { return GetColumnValue<string>(Columns.CodigoNomenclador); }
			set { SetColumnValue(Columns.CodigoNomenclador, value); }
		}

		[XmlAttribute("Codigo")]
		[Bindable(true)]
		public string Codigo
		{
			get { return GetColumnValue<string>(Columns.Codigo); }
			set { SetColumnValue(Columns.Codigo, value); }
		}

		[XmlAttribute("OrdenArea")]
		[Bindable(true)]
		public int OrdenArea
		{
			get { return GetColumnValue<int>(Columns.OrdenArea); }
			set { SetColumnValue(Columns.OrdenArea, value); }
		}

		[XmlAttribute("Orden")]
		[Bindable(true)]
		public int Orden
		{
			get { return GetColumnValue<int>(Columns.Orden); }
			set { SetColumnValue(Columns.Orden, value); }
		}

		[XmlAttribute("Area")]
		[Bindable(true)]
		public string Area
		{
			get { return GetColumnValue<string>(Columns.Area); }
			set { SetColumnValue(Columns.Area, value); }
		}

		[XmlAttribute("Grupo")]
		[Bindable(true)]
		public string Grupo
		{
			get { return GetColumnValue<string>(Columns.Grupo); }
			set { SetColumnValue(Columns.Grupo, value); }
		}

		[XmlAttribute("Item")]
		[Bindable(true)]
		public string Item
		{
			get { return GetColumnValue<string>(Columns.Item); }
			set { SetColumnValue(Columns.Item, value); }
		}

		[XmlAttribute("Observaciones")]
		[Bindable(true)]
		public string Observaciones
		{
			get { return GetColumnValue<string>(Columns.Observaciones); }
			set { SetColumnValue(Columns.Observaciones, value); }
		}

		[XmlAttribute("EsTitulo")]
		[Bindable(true)]
		public string EsTitulo
		{
			get { return GetColumnValue<string>(Columns.EsTitulo); }
			set { SetColumnValue(Columns.EsTitulo, value); }
		}

		[XmlAttribute("Derivado")]
		[Bindable(true)]
		public string Derivado
		{
			get { return GetColumnValue<string>(Columns.Derivado); }
			set { SetColumnValue(Columns.Derivado, value); }
		}

		[XmlAttribute("Unidad")]
		[Bindable(true)]
		public string Unidad
		{
			get { return GetColumnValue<string>(Columns.Unidad); }
			set { SetColumnValue(Columns.Unidad, value); }
		}

		[XmlAttribute("Hiv")]
		[Bindable(true)]
		public bool? Hiv
		{
			get { return GetColumnValue<bool?>(Columns.Hiv); }
			set { SetColumnValue(Columns.Hiv, value); }
		}

		[XmlAttribute("Metodo")]
		[Bindable(true)]
		public string Metodo
		{
			get { return GetColumnValue<string>(Columns.Metodo); }
			set { SetColumnValue(Columns.Metodo, value); }
		}

		[XmlAttribute("ValorReferencia")]
		[Bindable(true)]
		public string ValorReferencia
		{
			get { return GetColumnValue<string>(Columns.ValorReferencia); }
			set { SetColumnValue(Columns.ValorReferencia, value); }
		}

		[XmlAttribute("Orden1")]
		[Bindable(true)]
		public int Orden1
		{
			get { return GetColumnValue<int>(Columns.Orden1); }
			set { SetColumnValue(Columns.Orden1, value); }
		}

		[XmlAttribute("Muestra")]
		[Bindable(true)]
		public string Muestra
		{
			get { return GetColumnValue<string>(Columns.Muestra); }
			set { SetColumnValue(Columns.Muestra, value); }
		}

		[XmlAttribute("Conresultado")]
		[Bindable(true)]
		public int Conresultado
		{
			get { return GetColumnValue<int>(Columns.Conresultado); }
			set { SetColumnValue(Columns.Conresultado, value); }
		}

		[XmlAttribute("Resultado")]
		[Bindable(true)]
		public string Resultado
		{
			get { return GetColumnValue<string>(Columns.Resultado); }
			set { SetColumnValue(Columns.Resultado, value); }
		}

		[XmlAttribute("Codigo2")]
		[Bindable(true)]
		public string Codigo2
		{
			get { return GetColumnValue<string>(Columns.Codigo2); }
			set { SetColumnValue(Columns.Codigo2, value); }
		}

		[XmlAttribute("ProfesionalVal")]
		[Bindable(true)]
		public string ProfesionalVal
		{
			get { return GetColumnValue<string>(Columns.ProfesionalVal); }
			set { SetColumnValue(Columns.ProfesionalVal, value); }
		}

		#endregion

		//no foreign key tables defined (0)

		//no ManyToMany tables defined (0)

		#region ObjectDataSource support

		/// <summary>
		/// Inserts a record, can be used with the Object Data Source
		/// </summary>
		public static void Insert(int varIdProtocolo,int varIdEfector,int varIdDetalleProtocolo,string varCodigoNomenclador,string varCodigo,int varOrdenArea,int varOrden,string varArea,string varGrupo,string varItem,string varObservaciones,string varEsTitulo,string varDerivado,string varUnidad,bool? varHiv,string varMetodo,string varValorReferencia,int varOrden1,string varMuestra,int varConresultado,string varResultado,string varCodigo2,string varProfesionalVal)
		{
			LabTempResultadoDetalle item = new LabTempResultadoDetalle();

			item.IdProtocolo = varIdProtocolo;

			item.IdEfector = varIdEfector;

			item.IdDetalleProtocolo = varIdDetalleProtocolo;

			item.CodigoNomenclador = varCodigoNomenclador;

			item.Codigo = varCodigo;

			item.OrdenArea = varOrdenArea;

			item.Orden = varOrden;

			item.Area = varArea;

			item.Grupo = varGrupo;

			item.Item = varItem;

			item.Observaciones = varObservaciones;

			item.EsTitulo = varEsTitulo;

			item.Derivado = varDerivado;

			item.Unidad = varUnidad;

			item.Hiv = varHiv;

			item.Metodo = varMetodo;

			item.ValorReferencia = varValorReferencia;

			item.Orden1 = varOrden1;

			item.Muestra = varMuestra;

			item.Conresultado = varConresultado;

			item.Resultado = varResultado;

			item.Codigo2 = varCodigo2;

			item.ProfesionalVal = varProfesionalVal;

			if (System.Web.HttpContext.Current != null)
				item.Save(System.Web.HttpContext.Current.User.Identity.Name);
			else
				item.Save(System.Threading.Thread.CurrentPrincipal.Identity.Name);
		}

		/// <summary>
		/// Updates a record, can be used with the Object Data Source
		/// </summary>
		public static void Update(int varIdProtocolo,int varIdEfector,int varIdDetalleProtocolo,string varCodigoNomenclador,string varCodigo,int varOrdenArea,int varOrden,string varArea,string varGrupo,string varItem,string varObservaciones,string varEsTitulo,string varDerivado,string varUnidad,bool? varHiv,string varMetodo,string varValorReferencia,int varOrden1,string varMuestra,int varConresultado,string varResultado,string varCodigo2,string varProfesionalVal)
		{
			LabTempResultadoDetalle item = new LabTempResultadoDetalle();

				item.IdProtocolo = varIdProtocolo;

				item.IdEfector = varIdEfector;

				item.IdDetalleProtocolo = varIdDetalleProtocolo;

				item.CodigoNomenclador = varCodigoNomenclador;

				item.Codigo = varCodigo;

				item.OrdenArea = varOrdenArea;

				item.Orden = varOrden;

				item.Area = varArea;

				item.Grupo = varGrupo;

				item.Item = varItem;

				item.Observaciones = varObservaciones;

				item.EsTitulo = varEsTitulo;

				item.Derivado = varDerivado;

				item.Unidad = varUnidad;

				item.Hiv = varHiv;

				item.Metodo = varMetodo;

				item.ValorReferencia = varValorReferencia;

				item.Orden1 = varOrden1;

				item.Muestra = varMuestra;

				item.Conresultado = varConresultado;

				item.Resultado = varResultado;

				item.Codigo2 = varCodigo2;

				item.ProfesionalVal = varProfesionalVal;

			item.IsNew = false;
			if (System.Web.HttpContext.Current != null)
				item.Save(System.Web.HttpContext.Current.User.Identity.Name);
			else
				item.Save(System.Threading.Thread.CurrentPrincipal.Identity.Name);
		}
		#endregion

        #region Typed Columns

        public static TableSchema.TableColumn IdProtocoloColumn
        {
            get { return Schema.Columns[0]; }
        }

        public static TableSchema.TableColumn IdEfectorColumn
        {
            get { return Schema.Columns[1]; }
        }

        public static TableSchema.TableColumn IdDetalleProtocoloColumn
        {
            get { return Schema.Columns[2]; }
        }

        public static TableSchema.TableColumn CodigoNomencladorColumn
        {
            get { return Schema.Columns[3]; }
        }

        public static TableSchema.TableColumn CodigoColumn
        {
            get { return Schema.Columns[4]; }
        }

        public static TableSchema.TableColumn OrdenAreaColumn
        {
            get { return Schema.Columns[5]; }
        }

        public static TableSchema.TableColumn OrdenColumn
        {
            get { return Schema.Columns[6]; }
        }

        public static TableSchema.TableColumn AreaColumn
        {
            get { return Schema.Columns[7]; }
        }

        public static TableSchema.TableColumn GrupoColumn
        {
            get { return Schema.Columns[8]; }
        }

        public static TableSchema.TableColumn ItemColumn
        {
            get { return Schema.Columns[9]; }
        }

        public static TableSchema.TableColumn ObservacionesColumn
        {
            get { return Schema.Columns[10]; }
        }

        public static TableSchema.TableColumn EsTituloColumn
        {
            get { return Schema.Columns[11]; }
        }

        public static TableSchema.TableColumn DerivadoColumn
        {
            get { return Schema.Columns[12]; }
        }

        public static TableSchema.TableColumn UnidadColumn
        {
            get { return Schema.Columns[13]; }
        }

        public static TableSchema.TableColumn HivColumn
        {
            get { return Schema.Columns[14]; }
        }

        public static TableSchema.TableColumn MetodoColumn
        {
            get { return Schema.Columns[15]; }
        }

        public static TableSchema.TableColumn ValorReferenciaColumn
        {
            get { return Schema.Columns[16]; }
        }

        public static TableSchema.TableColumn Orden1Column
        {
            get { return Schema.Columns[17]; }
        }

        public static TableSchema.TableColumn MuestraColumn
        {
            get { return Schema.Columns[18]; }
        }

        public static TableSchema.TableColumn ConresultadoColumn
        {
            get { return Schema.Columns[19]; }
        }

        public static TableSchema.TableColumn ResultadoColumn
        {
            get { return Schema.Columns[20]; }
        }

        public static TableSchema.TableColumn Codigo2Column
        {
            get { return Schema.Columns[21]; }
        }

        public static TableSchema.TableColumn ProfesionalValColumn
        {
            get { return Schema.Columns[22]; }
        }

        #endregion
		#region Columns Struct
		public struct Columns
		{
			 public static string IdProtocolo = @"idProtocolo";
			 public static string IdEfector = @"idEfector";
			 public static string IdDetalleProtocolo = @"idDetalleProtocolo";
			 public static string CodigoNomenclador = @"codigoNomenclador";
			 public static string Codigo = @"codigo";
			 public static string OrdenArea = @"ordenArea";
			 public static string Orden = @"orden";
			 public static string Area = @"area";
			 public static string Grupo = @"grupo";
			 public static string Item = @"item";
			 public static string Observaciones = @"observaciones";
			 public static string EsTitulo = @"esTitulo";
			 public static string Derivado = @"derivado";
			 public static string Unidad = @"unidad";
			 public static string Hiv = @"hiv";
			 public static string Metodo = @"metodo";
			 public static string ValorReferencia = @"valorReferencia";
			 public static string Orden1 = @"orden1";
			 public static string Muestra = @"muestra";
			 public static string Conresultado = @"conresultado";
			 public static string Resultado = @"resultado";
			 public static string Codigo2 = @"codigo2";
			 public static string ProfesionalVal = @"profesional_val";

		}
		#endregion

		#region Update PK Collections

        #endregion

        #region Deep Save

        #endregion
	}
}


text: J2OBJC_INTERFACE_TYPE_LITERAL_SOURCE(AMAnalyticsProvider)


text:
<?xml version="1.0" encoding="UTF-8"?>

<rootTag>
  <Award>
    <AwardTitle>PostDoctoral Research Fellowship</AwardTitle>
    <AwardEffectiveDate>09/01/2012</AwardEffectiveDate>
    <AwardExpirationDate>08/31/2016</AwardExpirationDate>
    <AwardAmount>150000</AwardAmount>
    <AwardInstrument>
      <Value>Fellowship</Value>
    </AwardInstrument>
    <Organization>
      03040000
      <Directorate>
        <LongName>Direct For Mathematical & Physical Scien</LongName>
      </Directorate>
      <Division>
        <LongName>Division Of Mathematical Sciences</LongName>
      </Division>
    </Organization>
    <ProgramOfficer>
      <SignBlockName>Bruce P. Palka</SignBlockName>
    </ProgramOfficer>
    <AbstractNarration>This award is made as part of the FY 2012 Mathematical Sciences Postdoctoral Research Fellowships Program. These fellowships support a research and training plan at a host institution in the mathematical sciences, including applications to other disciplines. The title of the research fellowship awarded to Owen G. Gwilliam is "Construction and mathematical applications of quantum field theories." The host institution for the fellowship is University of California, Berkeley, and the sponsoring scientist is Dr. Nicolai Reshetikhin.</AbstractNarration>
    <MinAmdLetterDate>04/06/2012</MinAmdLetterDate>
    <MaxAmdLetterDate>04/06/2012</MaxAmdLetterDate>
    <ARRAAmount/>
    <AwardID>1204826</AwardID>
    <Investigator>
      <FirstName>Owen</FirstName>
      <LastName>Gwilliam</LastName>
      <EmailAddress/>
      <StartDate>04/06/2012</StartDate>
      <EndDate/>
      <RoleCode>Principal Investigator</RoleCode>
    </Investigator>
    <Institution>
      <Name>Gwilliam Owen G</Name>
      <CityName>Olympia</CityName>
      <ZipCode>985012326</ZipCode>
      <PhoneNumber/>
      <StreetAddress/>
      <CountryName>United States</CountryName>
      <StateName>Washington</StateName>
      <StateCode>WA</StateCode>
    </Institution>
    <ProgramElement>
      7335
      <Text>WORKFORCE IN THE MATHEMAT SCI</Text>
    </ProgramElement>
    <ProgramReference>
      9219
      <Text>POSTDOCTORAL FELLOWSHIPS IN MATH SCIENCE</Text>
    </ProgramReference>
  </Award>
</rootTag>


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

namespace LocalAudioBroadcast.Data {
    class AudioUtil {

        /// <summary>
        /// Converts little-endian 16bit LPCM samples to big-endian.
        /// </summary>
        /// <param name="data"></param>
        /// <param name="offset"></param>
        /// <param name="count"></param>
        public static void L16leToL16be(byte[] data, int offset, int count) {
            byte temp;
            for (int i = offset; i < offset + count; i += 2) {
                temp = data[i];
                data[i] = data[i + 1];
                data[i + 1] = temp;
            }
        }
    }
}


text:
import chai, {expect} from "chai"

import dirtyChai from "dirty-chai"
chai.use(dirtyChai)

import {PromiseReadable} from "../src/promise-readable"

import {And, Feature, Given, Scenario, Then, When} from "./lib/steps"

import {MockStreamReadable} from "./lib/mock-stream-readable"

Feature('Test promise-readable module for once("error") method', () => {
  Scenario("Wait for error from stream without error", () => {
    let promiseFulfilled = false
    let promiseReadable: PromiseReadable<MockStreamReadable>
    let stream: MockStreamReadable

    Given("Readable object", () => {
      stream = new MockStreamReadable()
    })

    And("PromiseReadable object", () => {
      promiseReadable = new PromiseReadable(stream)
    })

    When('I wait for "error" event', () => {
      promiseReadable.once("error").then(() => {
        promiseFulfilled = true
      })
    })

    And('"data" event is emitted', () => {
      stream.emit("data", Buffer.from("chunk1"))
    })

    And('another "data" event is emitted', () => {
      stream.emit("data", Buffer.from("chunk2"))
    })

    And('"close" event is emitted', () => {
      stream.emit("end")
    })

    Then("promise returns no result", () => {
      expect(promiseFulfilled).to.be.true()
    })
  })

  Scenario("Wait for error from stream with error", () => {
    let error: Error
    let promiseReadable: PromiseReadable<MockStreamReadable>
    let stream: MockStreamReadable

    Given("Readable object", () => {
      stream = new MockStreamReadable()
    })

    And("PromiseReadable object", () => {
      promiseReadable = new PromiseReadable(stream)
    })

    When('I wait for "error" event', () => {
      promiseReadable.once("error").catch(err => {
        error = err
      })
    })

    And('"data" event is emitted', () => {
      stream.emit("data", Buffer.from("chunk1"))
    })

    And('"error" event is emitted', () => {
      stream.emit("error", new Error("boom"))
    })

    Then("promise is rejected", () => {
      expect(error).to.be.an("error").with.property("message", "boom")
    })
  })

  Scenario("Wait for error from stream with emitted error", () => {
    let error: Error
    let promiseReadable: PromiseReadable<MockStreamReadable>
    let stream: MockStreamReadable

    Given("Readable object", () => {
      stream = new MockStreamReadable()
    })

    And("PromiseReadable object", () => {
      promiseReadable = new PromiseReadable(stream)
    })

    And('"data" event is emitted', () => {
      stream.emit("data", Buffer.from("chunk1"))
    })

    When('I wait for "error" event', () => {
      promiseReadable.once("error").catch(err => {
        error = err
      })
    })

    And('"error" event is emitted', () => {
      stream.emit("error", new Error("boom"))
    })

    Then("promise is rejected", () => {
      expect(error).to.be.an("error").with.property("message", "boom")
    })
  })

  Scenario("Read non-Readable stream", () => {
    let chunk: string | Buffer | undefined
    let promiseReadable: PromiseReadable<MockStreamReadable>
    let stream: MockStreamReadable

    Given("Non-Readable object", () => {
      stream = new MockStreamReadable()
      stream.readable = false
    })

    And("PromiseReadable object", () => {
      promiseReadable = new PromiseReadable(stream)
    })

    When("I call read method", async () => {
      chunk = await promiseReadable.read()
    })

    And('"data" event is emitted', () => {
      stream.emit("data", Buffer.from("chunk1"))
    })

    Then("promise returns undefined value", () => {
      expect(chunk).to.be.undefined()
    })
  })
})


text:
package org.springframework.boot.actuate.autoconfigure.health;

import java.util.Map;

import org.junit.jupiter.api.Test;

import org.springframework.boot.actuate.health.CompositeHealthContributor;
import org.springframework.boot.actuate.health.DefaultHealthContributorRegistry;
import org.springframework.boot.actuate.health.HealthContributorRegistry;
import org.springframework.boot.actuate.health.HealthIndicator;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.entry;
import static org.mockito.Mockito.mock;

/**
 * Tests for {@link HealthContributorRegistryHealthIndicatorRegistryAdapter}.
 *
 * @author Phillip Webb
 */
class HealthContributorRegistryHealthIndicatorRegistryAdapterTests {

	private HealthContributorRegistry contributorRegistry = new DefaultHealthContributorRegistry();

	private HealthContributorRegistryHealthIndicatorRegistryAdapter adapter = new HealthContributorRegistryHealthIndicatorRegistryAdapter(
			this.contributorRegistry);

	@Test
	void createWhenContributorRegistryIsNullThrowsException() {
		assertThatIllegalArgumentException()
				.isThrownBy(() -> new HealthContributorRegistryHealthIndicatorRegistryAdapter(null))
				.withMessage("ContributorRegistry must not be null");
	}

	@Test
	void registerDelegatesToContributorRegistry() {
		HealthIndicator healthIndicator = mock(HealthIndicator.class);
		this.adapter.register("test", healthIndicator);
		assertThat(this.contributorRegistry.getContributor("test")).isSameAs(healthIndicator);
	}

	@Test
	void unregisterDelegatesToContributorRegistry() {
		HealthIndicator healthIndicator = mock(HealthIndicator.class);
		this.contributorRegistry.registerContributor("test", healthIndicator);
		HealthIndicator unregistered = this.adapter.unregister("test");
		assertThat(unregistered).isSameAs(healthIndicator);
		assertThat(this.contributorRegistry.getContributor("test")).isNull();
	}

	@Test
	void unregisterWhenContributorRegistryResultIsNotHealthIndicatorReturnsNull() {
		CompositeHealthContributor healthContributor = mock(CompositeHealthContributor.class);
		this.contributorRegistry.registerContributor("test", healthContributor);
		HealthIndicator unregistered = this.adapter.unregister("test");
		assertThat(unregistered).isNull();
		assertThat(this.contributorRegistry.getContributor("test")).isNull();
	}

	@Test
	void getDelegatesToContributorRegistry() {
		HealthIndicator healthIndicator = mock(HealthIndicator.class);
		this.contributorRegistry.registerContributor("test", healthIndicator);
		assertThat(this.adapter.get("test")).isSameAs(healthIndicator);
	}

	@Test
	void getWhenContributorRegistryResultIsNotHealthIndicatorReturnsNull() {
		CompositeHealthContributor healthContributor = mock(CompositeHealthContributor.class);
		this.contributorRegistry.registerContributor("test", healthContributor);
		assertThat(this.adapter.get("test")).isNull();
	}

	@Test
	void getAllDelegatesToContributorRegistry() {
		HealthIndicator healthIndicator = mock(HealthIndicator.class);
		this.contributorRegistry.registerContributor("test", healthIndicator);
		Map<String, HealthIndicator> all = this.adapter.getAll();
		assertThat(all).containsOnly(entry("test", healthIndicator));
	}

	@Test
	void getAllWhenContributorRegistryContainsNonHealthIndicatorInstancesReturnsFilteredMap() {
		CompositeHealthContributor healthContributor = mock(CompositeHealthContributor.class);
		this.contributorRegistry.registerContributor("test1", healthContributor);
		HealthIndicator healthIndicator = mock(HealthIndicator.class);
		this.contributorRegistry.registerContributor("test2", healthIndicator);
		Map<String, HealthIndicator> all = this.adapter.getAll();
		assertThat(all).containsOnly(entry("test2", healthIndicator));
	}

}


text:
//
//  ESBeaconUpdateConfig.h
//  EstimoteSDK
//
//  Config object for |ESBulkUpdater|. It describes what needs to be updated
//  in each beacon. If the value is nil, that beacon's property won't be changed.
//
//  Version: 2.3.2
//  Created by Marcin Klimek on 06/03/14.
//  Copyright (c) 2014 Estimote. All rights reserved.

#import <Foundation/Foundation.h>
#import "ESTBeaconDefinitions.h"

@interface ESTBeaconUpdateConfig : NSObject <NSCoding, NSCopying>

/**
 *  To what advertising interval beacon should be changed.
 */
@property (nonatomic, strong) NSNumber *advInterval;

/**
 *  To what broadcasting power beacon should be changed.
 */
@property (nonatomic, strong) NSNumber *power;

/**
 *  Flag for switching state of basic power mode.
 *  Recommended use: [NSNumber numberWithInt:ESTBeaconPowerSavingMode].
 */
@property (nonatomic, strong) NSNumber *basicPowerMode;

/**
 *  Flag for switching state of smart power mode.
 *  Recommended use: [NSNumber numberWithInt:ESTBeaconPowerSavingMode].
 */
@property (nonatomic, strong) NSNumber *smartPowerMode;

/**
 *  Flag for switching state of Estimote Secure UUID.
 *  Recommended use: [NSNumber numberWithInt:ESTBeaconPowerSavingMode].
 */
@property (nonatomic, strong) NSNumber *estimoteSecureUUID;

@end


text:
package com.cloud.hypervisor.kvm.resource.wrapper;

import org.apache.log4j.Logger;
import org.libvirt.Connect;
import org.libvirt.LibvirtException;

import com.cloud.agent.api.Answer;
import com.cloud.agent.api.NetworkRulesVmSecondaryIpCommand;
import com.cloud.hypervisor.kvm.resource.LibvirtComputingResource;
import com.cloud.resource.CommandWrapper;
import com.cloud.resource.ResourceWrapper;

@ResourceWrapper(handles =  NetworkRulesVmSecondaryIpCommand.class)
public final class LibvirtNetworkRulesVmSecondaryIpCommandWrapper extends CommandWrapper<NetworkRulesVmSecondaryIpCommand, Answer, LibvirtComputingResource> {

    private static final Logger s_logger = Logger.getLogger(LibvirtOvsVpcRoutingPolicyConfigCommandWrapper.class);

    @Override
    public Answer execute(final NetworkRulesVmSecondaryIpCommand command, final LibvirtComputingResource libvirtComputingResource) {
        boolean result = false;
        try {
            final LibvirtUtilitiesHelper libvirtUtilitiesHelper = libvirtComputingResource.getLibvirtUtilitiesHelper();

            final Connect conn = libvirtUtilitiesHelper.getConnectionByVmName(command.getVmName());
            result = libvirtComputingResource.configureNetworkRulesVMSecondaryIP(conn, command.getVmName(), command.getVmMac(), command.getVmSecIp(), command.getAction());
        } catch (final LibvirtException e) {
            s_logger.debug("Could not configure VM secondary IP! => " + e.getLocalizedMessage());
        }

        return new Answer(command, result, "");
    }
}


text:
/*
  This file contains classes to describe the structure of different
  objects used in the application. It also contains a utils service
  which holds different functions that are useful for other files.
*/

/* tslint:disable:max-classes-per-file */
import { Injectable } from '@angular/core';
import { Storage } from '@ionic/storage';
import { Events } from 'ionic-angular';

/**
 * Class to describe the structure of an application
 */
export class Application {
  public _id: string;
  public devEnvironment: string;
  public user: string;
  public environmentOnline: boolean;
  public appOnline: boolean;
  public port: number;
  public virtualTiles: string[];
  constructor(_id: string,
              devEnvironment: string,
              user: string,
              environmentOnline: boolean,
              appOnline: boolean,
              port: number,
              virtualTiles: string[]) {
    this._id = _id;
    this.devEnvironment = devEnvironment;
    this.user = user;
    this.environmentOnline = environmentOnline;
    this.appOnline = appOnline;
    this.port = port;
    this.virtualTiles = virtualTiles;
  }
}

/**
 * Class to describe the structure of a command
 */
export class CommandObject {
  public name: string;
  public properties: string[];
  constructor(name: string, properties: string[]) {
    this.name = name;
    this.properties = properties;
  }
}

/**
 * Class for the devices, this makes it possible to specify the
 * device type in typescript to avoid getting invalid device-objects
 */
export class Device {
  public id: string;
  public tileId: string;
  public name: string;
  public connected: boolean;
  public lastDiscovered: number;
  constructor(id: string, tileId: string, name: string, connected: boolean, lastDiscovered?: number) {
    this.id = id;
    // IOS and android gets different id from the ble, so we use the tilename as a second id
    this.tileId = tileId;
    this.name = name;
    this.connected = connected;
    this.lastDiscovered = lastDiscovered !== undefined ? lastDiscovered : (new Date()).getTime();
  }
}

/**
 * Class to describe a login data object
 */
export class LoginData {
  public user: string;
  public host: string;
  public port: number;
  public remember?: boolean;
  constructor(user: string, host: string, port: number, remember?: boolean) {
    this.user = user;
    this.host = host;
    this.port = port;
    this.remember = remember;
  }
}

/**
 * Class to describe the structure of a virtual tile
 */
export class VirtualTile {
  public _id: string;
  public virtualName: string;
  public application: string;
  public tile: any;
  public __v: number;
}

/**
 * Class to describe the structure of a log entry
 */
export class LogEntry {
  public message: string;
  public datetime: string;
  constructor(message: string, datetime: string) {
    this.message = message;
    this.datetime = datetime;
  }
}

@Injectable()
export class UtilsService {
  constructor(public storage: Storage,
              public events: Events) { }
  /**
   * Convert a string to an attay of bytes
   */
  public convertStringtoBytes = (str: String): any => {
    try {
      let dataArray = new Uint8Array(str.length);
      for (let i = 0; i < str.length; i ++) {
        dataArray[i] = str.charCodeAt(i);
      }
      return dataArray;
    }  catch (err) {
      return null;
    }
  }

  /**
   * Returns an object with name and properties from the inputstring
   * @param {string} eventString - A string on the format eventName,properties...
   */
  public getEventStringAsObject = (eventString: string): CommandObject => {
    const params = eventString.split(',');
    if (params.length > 1) {
      return new CommandObject(params[0], params.slice(1));
    }
    return null;
  }

  /**
   * Returns a string representing the given commandObject
   * @param {CommansObject} cmdObj - the command to turn into a string
   */
  public getCommandObjectAsString = (cmdObj: CommandObject): string => {
    return `${cmdObj.name},${cmdObj.properties.toString()}`;
  }

  /**
   * Verify the input of user login making sure it is only valid characters
   * @param {string} user - username
   * @param {string} host - api host address
   */
  public verifyLoginCredentials = (user: string = null, host: string = null): boolean => {
    const validUsername = user.match(/^[a-zA-Z0-9\_\-\.]+$/);
    const validHost = host.match(/^([0-9]{1,3}.){3}[0-9]{1,3}/) || host.match(/^[a-zA-Z0-9\_\-\.]+$/);
    return validUsername !== null && validHost !== null;
  }

  /**
   * Capitalize a string
   * @param {string} string - a string
   */
  public capitalize = (str: string): string => {
    return str.charAt(0).toUpperCase() + str.slice(1);
  }
}

export default { UtilsService };


text:
layout: compress
---

{% include base_path %}

<!doctype html>
<html lang="{{ site.locale | slice: 0,2 | default: "en" }}" class="no-js">
  <head>

    <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="/assets/js/com.alybadawy.external_links.js"></script>
    <script defer src="/assets/js/alexpearce.js"></script>

    {% include head.html %}
    {% include head/custom.html %}

  </head>

  <body>

    {% include browser-upgrade.html %}
    {% include masthead.html %}

    {{ content }}

    <div class="page__footer">
      <footer>
        {% include footer/custom.html %}
        {% include footer.html %}
      </footer>
    </div>

    {% include scripts.html %}

  </body>
</html>