text:
using System.IO;

internal static class Module1
{

    public static void Main()
    {
        SolidEdgeFileProperties.PropertySets propertySets = null;
        SolidEdgeFileProperties.Properties properties = null;
        SolidEdgeFileProperties.Property property = null;

        string BaseFileName = "C:\\\\Asm1.asm";
        string fileName = null;
        FileInfo fileInfo = new FileInfo(BaseFileName);
        bool IsFOA = false;
        int MemCnt = 0;
        System.Array MemNames = null;

        Console.WriteLine("Processing '{0}'.", BaseFileName);

        try
        {
            if (fileInfo.Exists == false)
            {
                throw new FileNotFoundException("File not found.", BaseFileName);
            }

            // Create a new instance of PropertySets.
            propertySets = new SolidEdgeFileProperties.PropertySets();

            // Open the file in readonly mode.
            propertySets.Open(BaseFileName, true);
            propertySets.IsFileFamilyOfAssembly(BaseFileName, IsFOA);
            if (IsFOA)
            {
                propertySets.GetFamilyOfAssemblyMemberNames(BaseFileName, MemCnt, MemNames);
                foreach (var MemName in MemNames)
                {
                    fileName = BaseFileName + "!" + MemName;
                    propertySets.Open(fileName, true);
                    // Loop through the PropertySets.
                    for (int i = 0; i < propertySets.Count; i++)
                    {
                        // Get a reference to the current PropertySet.
                        properties = (SolidEdgeFileProperties.Properties)propertySets(i);

                        Console.WriteLine(properties.Name);

                        // Loop through the properties for the current PropertySet.
                        for (int j = 0; j < properties.Count; j++)
                        {
                            // Get a reference to the current PropertySet.
                            property = (SolidEdgeFileProperties.Property)properties(j);

                            object propertyValue = null;
                            string typeName = "Unknown";

                            // property.Value can throw an exception!
                            try
                            {
                                // Attempt to get the property value.
                                propertyValue = property.Value;
                                typeName = propertyValue.GetType().FullName;
                            }
                            catch (System.Exception ex)
                            {
                                propertyValue = ex.Message;
                            }

                            Console.WriteLine("\t" + "{0} ({1}) = '{2}'", property.Name, typeName, propertyValue);
                        }
                    }
                }
            }
            else
            {
                // Loop through the PropertySets.
                for (int i = 0; i < propertySets.Count; i++)
                {
                    // Get a reference to the current PropertySet.
                    properties = (SolidEdgeFileProperties.Properties)propertySets(i);

                    Console.WriteLine(properties.Name);

                    // Loop through the properties for the current PropertySet.
                    for (int j = 0; j < properties.Count; j++)
                    {
                        // Get a reference to the current PropertySet.
                        property = (SolidEdgeFileProperties.Property)properties(j);

                        object propertyValue = null;
                        string typeName = "Unknown";

                        // property.Value can throw an exception!
                        try
                        {
                            // Attempt to get the property value.
                            propertyValue = property.Value;
                            typeName = propertyValue.GetType().FullName;
                        }
                        catch (System.Exception ex)
                        {
                            propertyValue = ex.Message;
                        }

                        Console.WriteLine("\t" + "{0} ({1}) = '{2}'", property.Name, typeName, propertyValue);
                    }
                }
            }
        }
        catch (System.Exception ex)
        {
            Console.WriteLine(ex.Message);
        }
        finally
        {
            if (propertySets != null)
            {
                propertySets.Close();
            }
        }
    }

}


text:
// ---------------------------------------------------------------------------
// <copyright file="SeekToConditionItemView.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
// ---------------------------------------------------------------------------

//-----------------------------------------------------------------------
// <summary>Defines the SeekToConditionItemView class.</summary>
//-----------------------------------------------------------------------

namespace Microsoft.Exchange.WebServices.Data
{
    using System;
    using System.Collections.Generic;
    using System.Text;

    /// <summary>
    /// Represents the view settings in a folder search operation.
    /// </summary>
    public sealed class SeekToConditionItemView : ViewBase
    {
        private int pageSize;
        private ItemTraversal traversal;
        private SearchFilter condition;
        private OffsetBasePoint offsetBasePoint = OffsetBasePoint.Beginning;
        private OrderByCollection orderBy = new OrderByCollection();
        private ServiceObjectType serviceObjType;

        /// <summary>
        /// Gets the type of service object this view applies to.
        /// </summary>
        /// <returns>A ServiceObjectType value.</returns>
        internal override ServiceObjectType GetServiceObjectType()
        {
            return this.serviceObjType;
        }

        /// <summary>
        /// Sets the type of service object this view applies to.
        /// </summary>
        /// <param name="objType">Service object type</param>
        internal void SetServiceObjectType(ServiceObjectType objType)
        {
            this.serviceObjType = objType;
        }

        /// <summary>
        /// Writes the attributes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void WriteAttributesToXml(EwsServiceXmlWriter writer)
        {
            if (this.serviceObjType == ServiceObjectType.Item)
            {
                writer.WriteAttributeValue(XmlAttributeNames.Traversal, this.Traversal);
            }
        }

        /// <summary>
        /// Gets the name of the view XML element.
        /// </summary>
        /// <returns>XML element name.</returns>
        internal override string GetViewXmlElementName()
        {
            return XmlElementNames.SeekToConditionPageItemView;
        }

        internal override string GetViewJsonTypeName()
        {
            return "SeekToConditionPageView";
        }

        /// <summary>
        /// Validates this view.
        /// </summary>
        /// <param name="request">The request using this view.</param>
        internal override void InternalValidate(ServiceRequestBase request)
        {
            base.InternalValidate(request);
        }

        /// <summary>
        /// Write to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        internal override void InternalWriteViewToXml(EwsServiceXmlWriter writer)
        {
            base.InternalWriteViewToXml(writer);

            writer.WriteAttributeValue(XmlAttributeNames.BasePoint, this.OffsetBasePoint);

            if (this.Condition != null)
            {
                writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.Condition);
                this.Condition.WriteToXml(writer);
                writer.WriteEndElement(); // Restriction
            }
        }

        /// <summary>
        /// Internals the write paging to json.
        /// </summary>
        /// <param name="jsonView">The json view.</param>
        /// <param name="service">The service.</param>
        internal override void InternalWritePagingToJson(JsonObject jsonView, ExchangeService service)
        {
            base.InternalWritePagingToJson(jsonView, service);
            jsonView.Add(XmlAttributeNames.BasePoint, this.OffsetBasePoint);

            if (this.Condition != null)
            {
                JsonObject jsonCondition = new JsonObject();
                jsonCondition.Add(XmlElementNames.Item, this.Condition.InternalToJson(service));

                jsonView.Add(XmlElementNames.Condition, jsonCondition);
            }
        }

        /// <summary>
        /// Internals the write search settings to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="groupBy">The group by.</param>
        internal override void InternalWriteSearchSettingsToXml(EwsServiceXmlWriter writer, Grouping groupBy)
        {
            if (groupBy != null)
            {
                groupBy.WriteToXml(writer);
            }
        }

        /// <summary>
        /// Writes the grouping to json.
        /// </summary>
        /// <param name="service">The service.</param>
        /// <param name="groupBy"></param>
        /// <returns></returns>
        internal override object WriteGroupingToJson(ExchangeService service, Grouping groupBy)
        {
            if (groupBy != null)
            {
                return ((IJsonSerializable)groupBy).ToJson(service);
            }
            else
            {
                return null;
            }
        }

        /// <summary>
        /// Gets the maximum number of items or folders the search operation should return.
        /// </summary>
        /// <returns>The maximum number of items that should be returned by the search operation.</returns>
        internal override int? GetMaxEntriesReturned()
        {
            return this.PageSize;
        }

        /// <summary>
        /// Writes OrderBy property to XML.
        /// </summary>
        /// <param name="writer">The writer</param>
        internal override void WriteOrderByToXml(EwsServiceXmlWriter writer)
        {
            this.orderBy.WriteToXml(writer, XmlElementNames.SortOrder);
        }

        /// <summary>
        /// Adds the json properties.
        /// </summary>
        /// <param name="jsonRequest">The json request.</param>
        /// <param name="service">The service.</param>
        internal override void AddJsonProperties(JsonObject jsonRequest, ExchangeService service)
        {
            if (this.serviceObjType == ServiceObjectType.Item)
            {
                jsonRequest.Add(XmlAttributeNames.Traversal, this.Traversal);
            }

            jsonRequest.Add(XmlElementNames.SortOrder, ((IJsonSerializable)this.orderBy).ToJson(service));
        }

        /// <summary>
        /// Writes to XML.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <param name="groupBy">The group by clause.</param>
        internal override void WriteToXml(EwsServiceXmlWriter writer, Grouping groupBy)
        {
            if (this.serviceObjType == ServiceObjectType.Item)
            {
                this.GetPropertySetOrDefault().WriteToXml(writer, this.GetServiceObjectType());
            }

            writer.WriteStartElement(XmlNamespace.Messages, this.GetViewXmlElementName());

            this.InternalWriteViewToXml(writer);

            writer.WriteEndElement(); // this.GetViewXmlElementName()
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SeekToConditionItemView"/> class.
        /// </summary>
        /// <param name="condition">Condition to be used when seeking.</param>
        /// <param name="pageSize">The maximum number of elements the search operation should return.</param>
        public SeekToConditionItemView(SearchFilter condition, int pageSize)
        {
            this.Condition = condition;
            this.PageSize = pageSize;
            this.serviceObjType = ServiceObjectType.Item;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SeekToConditionItemView"/> class.
        /// </summary>
        /// <param name="condition">Condition to be used when seeking.</param>
        /// <param name="pageSize">The maximum number of elements the search operation should return.</param>
        /// <param name="offsetBasePoint">The base point of the offset.</param>
        public SeekToConditionItemView(
            SearchFilter condition,
            int pageSize,
            OffsetBasePoint offsetBasePoint)
            : this(condition, pageSize)
        {
            this.OffsetBasePoint = offsetBasePoint;
        }

        /// <summary>
        /// The maximum number of items or folders the search operation should return.
        /// </summary>
        public int PageSize
        {
            get
            {
                return this.pageSize;
            }

            set
            {
                if (value <= 0)
                {
                    throw new ArgumentException(Strings.ValueMustBeGreaterThanZero);
                }

                this.pageSize = value;
            }
        }

        /// <summary>
        /// Gets or sets the base point of the offset.
        /// </summary>
        public OffsetBasePoint OffsetBasePoint
        {
            get { return this.offsetBasePoint; }
            set { this.offsetBasePoint = value; }
        }

        /// <summary>
        /// Gets or sets the condition for seek. Available search filter classes include SearchFilter.IsEqualTo,
        /// SearchFilter.ContainsSubstring and SearchFilter.SearchFilterCollection. If SearchFilter
        /// is null, no search filters are applied.
        /// </summary>
        public SearchFilter Condition
        {
            get
            {
                return this.condition;
            }

            set
            {
                if (value == null)
                {
                    throw new ArgumentNullException("Condition");
                }

                this.condition = value;
            }
        }

        /// <summary>
        /// Gets or sets the search traversal mode. Defaults to ItemTraversal.Shallow.
        /// </summary>
        public ItemTraversal Traversal
        {
            get { return this.traversal; }
            set { this.traversal = value; }
        }

        /// <summary>
        /// Gets the properties against which the returned items should be ordered.
        /// </summary>
        public OrderByCollection OrderBy
        {
            get { return this.orderBy; }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<!doctype html>

  <meta charset="utf-8">
  <title>JBehave Navigator</title>
  <link rel="stylesheet" href="style/navigator.css">
  <link rel="stylesheet" type="text/css" href="style/jquery-ui.css"/>

Stories

Scenarios

Search: <input ng-model="query"/>

		               Status
		               Path
		               Description
		               Meta
                       Narrative
                       Duration

                        {{performable.status}}
		                {{performable.story.path}}
		                {{performable.story.description.descriptionAsString}}

		                    @{{property["@name"]}} {{property["@value"]}}

		                {{performable.localizedNarrative|newline_to_comma}}
		                {{performable.timing.durationInMillis}}

Search: <input ng-model="query"/>

                       Status
                       Title
                       Meta
                       Story

                        {{performable.status}}
                        {{performable.scenario.title}}

                            @{{property["@name"]}} {{property["@value"]}}

                            {{performable.storyPath}}


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
    <property name="mediumtext" value="TEXT" dbms="postgresql" />
    <property name="mediumtext" value="MEDIUMTEXT" />
    <changeSet author="alena (generated)" id="dump1">
        <addColumn tableName="instance">
            <column name="service_index_id" type="BIGINT">
            </column>
        </addColumn>
    </changeSet>
    <changeSet author="alena (generated)" id="dump2">
        <addForeignKeyConstraint baseColumnNames="service_index_id" baseTableName="instance" constraintName="fk_instance__service_index_id" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="id" referencedTableName="service_index"/>
    </changeSet>
</databaseChangeLog>


text:
<?php

include '../controller/php/clase.php';

error_reporting(E_ALL^E_NOTICE);
$estatus   = "0";
$nProducto = $_POST['nProducto'];
$nContacto = $_POST['nContacto'];
$nEmpresa  = $_POST['nEmpresa'];
$precio    = $_POST['precio'];
$telefono  = $_POST['telefono'];
$direccion = $_POST['direccion'];
$marca     = $_POST['marca'];
$correo    = $_POST['correo'];
$imagen    = $_POST['imagen'];

$oConexion = new conectorDB;
$insert    = "INSERT INTO tbl_cotizacion (estatus, nombreProducto, nombreContacto, empresa, precio, telefono, direccion, marca, correo, imagen, fecha) VALUES ('$estatus', '$nProducto', '$nContacto', '$nEmpresa', '$precio', '$telefono', '$direccion','$marca', '$correo','$imagen', NOW())";

$registrar = $oConexion->consultarBD($insert);

?>


text:
#pragma once

#include <type_traits>
#include "internals/default_value.h"
#include "internals/traits.h"

namespace SJParser {

/** Enum with member presence options */
enum class Presence {
  /** Optional member */
  Optional
};

/** @brief Member of object or union parsers specification.
 *
 * This structure holds a specification of individual member for object and
 * union parsers.
 *
 * @tparam NameT Type of member name
 *
 * @tparam ParserT Type of member parser
 */
template <typename NameT, typename ParserT> struct Member {
  /** Member name */
  NameT name;
  /** Member parser */
  ParserT parser;

  /** Is this member optional */
  bool optional = false;

  /** Default value */
  DefaultValue<ParserT> default_value;

  /** @brief Constructor
   *
   * @param [in] name Member name.
   *
   * @param [in] parser Member parser, can be an lvalue reference or an rvalue.
   */
  Member(NameT name, ParserT &&parser);

  /** @brief Constructor
   *
   * Creates an optional member.
   *
   * @param [in] name Member name.
   *
   * @param [in] parser Member parser, can be an lvalue reference or an rvalue.
   *
   * @param [in] presence Presence enum, indicates that this is an optional
   * member.
   */
  Member(NameT name, ParserT &&parser, Presence presence);

  /** @brief Constructor
   *
   * Creates an optional member with a default value, can be used only with
   * storage parsers.
   *
   * @param [in] name Member name.
   *
   * @param [in] parser Member parser, can be an lvalue reference or an rvalue.
   *
   * @param [in] presence Presence enum, indicates that this is an optional
   * member.
   *
   * @param [in] default_value Default value.
   */
  template <typename ParserU = std::decay_t<ParserT>>
  Member(NameT name, ParserT &&parser, Presence presence,
         typename ParserU::ValueType default_value);

  /** Move constructor. */
  Member(Member &&other) noexcept;

  /** Move assignment operator */
  Member<NameT, ParserT> &operator=(Member &&other) noexcept;

  /** @cond INTERNAL Boilerplate. */
  ~Member() = default;
  Member(const Member &) = delete;
  Member &operator=(const Member &) = delete;
  /** @endcond */

 private:
  constexpr void checkTemplateParameters();
};

template <typename ParserT>
Member(const char *, ParserT &&)->Member<std::string, ParserT>;

template <typename ParserT> Member(int, ParserT &&)->Member<int64_t, ParserT>;

template <typename ParserT> Member(float, ParserT &&)->Member<double, ParserT>;

template <typename NameT, typename ParserT>
Member(NameT, ParserT &&)->Member<NameT, ParserT>;

template <typename ParserT>
Member(const char *, ParserT &&, Presence)->Member<std::string, ParserT>;

template <typename ParserT>
Member(int, ParserT &&, Presence)->Member<int64_t, ParserT>;

template <typename ParserT>
Member(float, ParserT &&, Presence)->Member<double, ParserT>;

template <typename NameT, typename ParserT>
Member(NameT, ParserT &&, Presence)->Member<NameT, ParserT>;

template <typename ParserT, typename ValueT>
Member(const char *, ParserT &&, Presence, ValueT)
    ->Member<std::string, ParserT>;

template <typename ParserT, typename ValueT>
Member(int, ParserT &&, Presence, ValueT)->Member<int64_t, ParserT>;

template <typename ParserT, typename ValueT>
Member(float, ParserT &&, Presence, ValueT)->Member<double, ParserT>;

template <typename NameT, typename ParserT, typename ValueT>
Member(NameT, ParserT &&, Presence, ValueT)->Member<NameT, ParserT>;

/****************************** Implementations *******************************/

template <typename NameT, typename ParserT>
Member<NameT, ParserT>::Member(NameT name, ParserT &&parser)
    : name{std::move(name)}, parser{std::forward<ParserT>(parser)} {
  checkTemplateParameters();
}

template <typename NameT, typename ParserT>
Member<NameT, ParserT>::Member(NameT name, ParserT &&parser,
                               Presence /*presence*/)
    : name{std::move(name)},
      parser{std::forward<ParserT>(parser)},
      optional{true} {
  checkTemplateParameters();
}

template <typename NameT, typename ParserT>
template <typename ParserU>
Member<NameT, ParserT>::Member(NameT name, ParserT &&parser,
                               Presence /*presence*/,
                               typename ParserU::ValueType default_value)
    : name{std::move(name)},
      parser{std::forward<ParserT>(parser)},
      optional{true},
      default_value{std::move(default_value)} {
  checkTemplateParameters();
}

template <typename NameT, typename ParserT>
Member<NameT, ParserT>::Member(Member &&other) noexcept
    : name{std::move(other.name)},
      parser{std::forward<ParserT>(other.parser)},
      optional{other.optional},
      default_value{std::move(other.default_value)} {}

template <typename NameT, typename ParserT>
Member<NameT, ParserT> &Member<NameT, ParserT>::operator=(
    Member &&other) noexcept {
  name = std::move(other.name);
  parser = std::forward<ParserT>(other.parser);
  optional = other.optional;
  default_value = std::move(other.default_value);

  return *this;
}

template <typename NameT, typename ParserT>
constexpr void Member<NameT, ParserT>::checkTemplateParameters() {
  // Formatting disabled because of a bug in clang-format
  // clang-format off
  static_assert(
      std::is_same_v<NameT, int64_t>
      || std::is_same_v<NameT, bool>
      || std::is_same_v<NameT, double>
      || std::is_same_v<NameT, std::string>,
      "Invalid type used for Member name, only int64_t, bool, double or "
      "std::string are allowed");
  // clang-format on
  static_assert(std::is_base_of_v<TokenParser, std::decay_t<ParserT>>,
                "Invalid parser used in Member");
}

}  // namespace SJParser


text:
import { fakeState } from "../../../__test_support__/fake_state";
import {
  buildResourceIndex,
} from "../../../__test_support__/resource_index_builder";
import { fakeWebAppConfig } from "../../../__test_support__/fake_state/resources";
const mockState = fakeState();
const config = fakeWebAppConfig();
config.body.highlight_modified_settings = true;
mockState.resources = buildResourceIndex([config]);
jest.mock("../../../redux/store", () => ({
  store: {
    getState: () => mockState,
    dispatch: jest.fn(),
  },
}));

import { getModifiedClassName } from "../default_values";

describe("getModifiedClassName()", () => {
  it("returns class name", () => {
    expect(getModifiedClassName("encoder_enabled_x", 1, "arduino")).toEqual("");
    expect(getModifiedClassName("encoder_enabled_x", 0, "arduino"))
      .toEqual("modified");
  });
});


text:
from src import model
from src.model import User, Pin, Category, Vote
from flask import Flask, flash, render_template, request, session
from flask.ext.jsonpify import jsonify
from flask.ext.sqlalchemy import SQLAlchemy
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
import time

def connectToDatabase():
    """
    Connect to our SQLite database and return a Session object
    """
    session = model.db
    return session


text:
package net.binggl.login.core;

import com.google.inject.AbstractModule;
import com.google.inject.Scopes;

import net.binggl.login.core.repository.LoginRepository;
import net.binggl.login.core.repository.UserRepository;
import net.binggl.login.core.repository.impl.MongoDbLoginRepository;
import net.binggl.login.core.repository.impl.MongoDbUserRepository;
import net.binggl.login.core.service.CacheService;
import net.binggl.login.core.service.LoginService;
import net.binggl.login.core.service.SessionService;
import net.binggl.login.core.service.TokenService;
import net.binggl.login.core.service.UserService;
import net.binggl.login.core.service.impl.UserServiceImpl;
import net.binggl.login.core.service.impl.NinjaCacheService;
import net.binggl.login.core.service.impl.NinjaJwtTokenService;
import net.binggl.login.core.service.impl.NinjaLoginService;
import net.binggl.login.core.service.impl.NinjaSessionService;

public class CoreModule extends AbstractModule {

	@Override
    protected void configure() {
		 bind(UserRepository.class).to(MongoDbUserRepository.class);
		 bind(LoginRepository.class).to(MongoDbLoginRepository.class);
		 bind(UserService.class).to(UserServiceImpl.class);
		 bind(TokenService.class).to(NinjaJwtTokenService.class);
		 bind(CacheService.class).to(NinjaCacheService.class).in(Scopes.SINGLETON);
		 bind(LoginService.class).to(NinjaLoginService.class);
		 bind(SessionService.class).to(NinjaSessionService.class);
	}
}


text:
using DevApp.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Threax.AspNetCore.Models;

namespace DevApp.ModelSchemas
{
    //[PluralName("ValueWoots")]
    [RequireAuthorization(typeof(Roles), nameof(Roles.EditValues))]
    //[RequireAuthorization(Roles.EditValues)] //Alt syntax, not ideal
    //[KeyType(typeof(int))]
    //[KeyType(typeof(String))]
    //[KeyType(typeof(KeyTestEnum))]
    //[UiControllerName("Admin")]
    //[KeyName("DifferentKeyId")]
    public abstract class Value
    {
        [Required]
        [MaxLength(450)]
        //[Display(Name = "WootName")]
        [UiOrder]
        //[DefineNullValueLabel("Any")]
        //[Queryable(required:true, showOnUi:false)]
        //[Queryable]
        //[AbstractOnQuery]
        //[AbstractOnEntity]
        //[AbstractOnInputModel]
        //[AbstractOnViewModel]
        public String Name { get; set; }

        //[Queryable]
        //public int CoolThing { get; set; }

        //[Queryable]
        //public Guid ForeignKey { get; set; }

        //[Queryable]
        //public Guid? OptionalForeignKey { get; set; }

        //[NoInputModel]
        //[UiOrder]
        //public int NotOnInput { get; set; }

        //[NoEntity]
        //[UiOrder]
        //public int NotOnEntity { get; set; }

        //[NoViewModel]
        //[UiOrder]
        //public int NotOnView { get; set; }

        //public KeyTestEnum? KeyTestEnum { get; set; }

        //public int? NullableIntTest { get; set; }

        //[TextAreaUiType]
        //public String Description { get; set; }
    }
}


text:
<?php

include(dirname(__FILE__).'/../../bootstrap/unit.php');
include(dirname(__FILE__).'/../../bootstrap/database.php');

$t = new lime_test(1, new lime_output_color());
$t->pass('This test always passes.');


text:
policy::PolicyService* GetPolicyService(Profile* profile) {
  return profile->GetProfilePolicyConnector()->policy_service();
}


text:
#include <stdlib.h>
#include <string.h>
#include <es.h>
#include <es/ref.h>
#include <es/handle.h>
#include <es/interlocked.h>
#include <es/base/ICache.h>
#include "core.h"
#include "memoryStream.h"

// #define VERBOSE

#define PAGE_SIZE        (4 * 1024)
#define PAGE_TABLE_SIZE  (16 * PAGE_SIZE)
#define BUF_SIZE         (PAGE_TABLE_SIZE)

static  u8 ReadBuf[BUF_SIZE];
static  u8 WriteBuf[BUF_SIZE];

static void SetData(u8* buf, long size)
{
    while (0 < size)
    {
        *buf++ = 'A' + size-- % 26;
    }
}

static long Verify(long size, MemoryStream* backingStore)
{
    es::Cache* cache = es::Cache::createInstance(backingStore);
    if (!cache)
    {
        esReport("Unable to create cache\n");
        return -1;
    }

    es::Stream* stream = cache->getStream();
    if (!stream)
    {
        esReport("Unable to create stream\n");
        return -1;
    }

    SetData(WriteBuf, size);

    long ret;
    ret = stream->write(WriteBuf, size);
    if (ret != size)
    {
        ret = -1;
        goto ERROR;
    }

#ifdef VERBOSE
    esReport("-> write: %d ", ret);
#endif // VERBOSE
    stream->flush();

    stream->release();
    cache->release();

    cache = es::Cache::createInstance(backingStore);
    stream = cache->getStream();
    ret = stream->read(ReadBuf, size);
    if (ret != size)
    {
        ret = -1;
        goto ERROR;
    }
#ifdef VERBOSE
    esReport("read: %d ", ret);
#endif // VERBOSE

    if (memcmp(ReadBuf, WriteBuf, ret) != 0)
    {
        ret = -1;
    }
    else
    {
        ret = 0;
    }

ERROR:
    stream->release();
    cache->release();

    return ret;
}

int main()
{
    int result = 1;

    Object* root = NULL;

    esInit(&root);
    esReport("Check read() and write().\n");

    MemoryStream* backingStore = new MemoryStream(0);
    if (!backingStore)
    {
        esReport("Bad alloc. (backingStore)\n");
        return 1;
    }

    long size;

    // write and read data less than the size of a page.
    result = Verify(1, backingStore);
    if (result < 0)
    {
        goto ERROR;
    }

    result = Verify(8, backingStore);
    if (result < 0)
    {
        goto ERROR;
    }

    result = Verify(PAGE_TABLE_SIZE, backingStore);
    if (result < 0)
    {
        goto ERROR;
    }

    /* Omit due to the memory size limitation.
    result = Verify(cacheFactory, PAGE_TABLE_SIZE * 2, backingStore);
    if (result < 0)
    {
        goto ERROR;
    }
    */

    backingStore->release();
    esReport("done.\n");
    return 0;

ERROR:
    backingStore->release();
    esReport("*** ERROR ***\n");
    return 1;
}


text:
/* global Raven:true */
(function() {
    'use strict';

    /**
     * @ngdoc module
     * @name mm.exceptionHandler
     *
     * @description
     * The `mm.exceptionHandler` module override Angular's default {@link https://docs.angularjs.org/api/ng/service/$exceptionHandler `$exceptionHandler`}, it
     * preserves the default behaviour (logging to the console by {@link `mm.Logger`) but also posts the error to {@link https://getsentry.com/ `Sentry`)
     * or some custom reporting tool.
     *
     * # Usage
     * See {@link mm.exceptionHandler.$exceptionHandler#usage `$exceptionHandler`} for an example of configuring and using `$exceptionHandler`.
     *
     */

    /**
     * @ngdoc provider
     * @name $exceptionHandlerProvider
     * @module mm.exceptionHandler
     * @requires ng.$window
     * @requires ng.$injector
     * @requires mm.Logger
     *
     * @description
     * Use the `$exceptionHandlerProvider` to configure where to post errors. $exceptionHandlerProvider can posts error to `Sentry` or some custom reporting tool
     * see usage below.
     *
     * @usage
     * By default posting error to reporting tool is turn off. This can be turn on by configuring the `$exceptionHandlerProvider` like this (custom reporting tool):
     *
     * ```js
     *   angular.module('customExceptionHandlerDemo', []).config(['$exceptionHandlerProvider', function (cfg) {
     *      cfg.setConfigAppErrorPrefix('demoApp');
     *      cfg.setConfigCustomDns('http://localhost:3000/error');
     *   }]);
     * ```
     * > **Note:** You need to provide your own back end implementation that accept `post` json request.
     *
     * or post error to `Sentry` like this:
     *
     * ```html
     * <script src="//cdn.ravenjs.com/1.1.15/raven.min.js"></script>
     * ```
     * ```js
     *   angular.module('sentryExceptionHandlerProviderDemo', []).config(['$exceptionHandlerProvider', function (cfg) {
     *      var ravenConfig = {logger: 'javascript'};
     *      cfg.setConfigAppErrorPrefix('demoApp');
     *      cfg.setConfigRavenDns(''https://7be...............491@app.getsentry.com/2...2');
     *      cfg.setConfigRavenConfig(ravenConfig);
     *   }]);
     * ```
     * > **Note:** You need to create Sentry account to be able to send error data to {@link https://getsentry.com/ `Sentry`).
     */
    function $exceptionHandlerProvider() {
        /**
         * @description
         * Exception handler configuration. appErrorPrefix is optional type. If you want to use error reporting tool then at
         * least one of the `ravenDns` or `customDns` has to be defined.
         *
         * @private
         * @type {{appErrorPrefix: string, ravenDns: null, ravenConfig: null, customDns: null}}
         */
        var config = {
            appErrorPrefix: '', // optional
            ravenDns: null,
            ravenConfig: null, // optional
            customDns: null
        };
        /**
         * @ngdoc method
         * @name $exceptionHandlerProvider#setConfigAppErrorPrefix
         *
         * @description
         * Set app error prefix.
         *
         * @param {string=} _appErrorPrefix - an optional app error prefix
         */
        this.setConfigAppErrorPrefix = function(_appErrorPrefix) {
            config.appErrorPrefix = _appErrorPrefix || config.appErrorPrefix;
        };
        /**
         * @ngdoc method
         * @name $exceptionHandlerProvider#setConfigAppErrorPrefix
         *
         * @description
         * Set the raven DNS.
         *
         * @param {string} _ravenDns - an valid raven DNS
         */
        this.setConfigRavenDns = function(_ravenDns) {
            if (!_ravenDns) {
                throw new Error('RavenDNS must be set!');
            }
            config.ravenDns = _ravenDns;
        };
        /**
         * @ngdoc method
         * @name $exceptionHandlerProvider#setConfigRavenConfig
         *
         * @description
         * Set the raven config options.
         *
         * @param {string[]=} _ravenConfig - an optional array of raven config options
         */
        this.setConfigRavenConfig = function(_ravenConfig) {
            config.ravenConfig = _ravenConfig || config.ravenConfig;
        };
        /**
         * @ngdoc method
         * @name $exceptionHandlerProvider#setConfigCustomDns
         *
         * @description
         * Set the custom dns.
         *
         * @param {string} _customDns - an valid custom DNS
         */
        this.setConfigCustomDns = function(_customDns) {
            if (!_customDns) {
                throw new Error('CustomeDNS must be set!');
            }
            config.customDns = _customDns;
        };

        this.$get = ['Logger', '$window', '$injector', function (Logger, $window, $injector) {
            var logger = Logger.getLogger('$exceptionHandler');
            var browserInfo = {
                navigatorAppName : navigator.appName,
                navigatorUserAgent : navigator.userAgent
            };
            if ($window.Raven) {
                logger.info('Using the RavenJS server-side logging exception handler.');
                logger.info('RavenJS ravenDns {0}', [config.ravenDns]);
                logger.info('RavenJS ravenConfig {0}', [config.ravenConfig]);
                try {
                    // configure Raven
                    Raven.config(config.ravenDns, config.ravenConfig).install();
                } catch (loggingError) {
                    logger.error('Error to configure RavenJS');
                    logger.error(loggingError.toString());
                }
            } else if(config.customDns) {
                logger.info('Using the custom server-side logging exception handler.');
                logger.info('Custom DNS {0}', [config.customDns]);
            }
            return function (exception, cause) {
                var errorData = { exception: exception, cause: cause };
                var message = config.appErrorPrefix ? config.appErrorPrefix + ' - ' + exception.message : exception.message;

                try {
                    if ($window.Raven) {
                        // post error to Sentry
                        Raven.captureException(exception, {extra: {cause: cause, browserInfo: browserInfo}});
                    } else if(config.customDns) {
                        var errorMessage = exception ? exception.toString() : '';
                        var stackTrace = exception ? (exception.stack ? exception.stack.toString() : '') : '';

                        // using the $injector service directly to avoid a circular dependency
                        var $httpBackend = $injector.get('$httpBackend');

                        // bypassing angular's http abstraction to avoid infinite exception loops
                        $httpBackend('POST', config.customDns, angular.toJson({
                            url: $window.location.href,
                            message: errorMessage,
                            stackTrace: stackTrace,
                            cause: ( cause || ''),
                            browserInfo: browserInfo
                        }), angular.noop, { 'content-type': 'application/json' });
                    }
                } catch (loggingError){
                    logger.error('Error server-side logging failed');
                    logger.error(loggingError.toString());
                }
                // log the error to console
                logger.error(message, null, errorData);
            };
        }];
    }

    angular
        .module('mm.exceptionHandler', ['mm.logger'])
        .provider('$exceptionHandler', $exceptionHandlerProvider);
})();


text:
============
logging.conf
============

You can specify a special logging configuration file in the ``keystone.conf``
configuration file. For example, ``/etc/keystone/logging.conf``.

For details, see the `Python logging module documentation
<http://docs.python.org/2/howto/logging.html#configuring-logging>`__.

.. remote-code-block:: ini

   https://git.openstack.org/cgit/openstack/keystone/plain/etc/logging.conf.sample?h=stable/mitaka


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

namespace EagleLoadTest
{
    class Program
    {
        public class Led
        {
            public string Name;
            public double X;
            public double Y;

            public string net1 = "";
            public string net2 = "";

        }

        static void Main(string[] args)
        {

            CultureInfo ci = new CultureInfo("nl-NL");
            Thread.CurrentThread.CurrentCulture = ci;
            Thread.CurrentThread.CurrentUICulture = ci;

            List<Led> Leds = new List<Led>();

            String sch = args[0];
            String brd = args[1];
            EagleLoader EB = new EagleLoader(brd);
            EagleLoader ES = new EagleLoader(sch);
            SchematicLoader ES2 = new SchematicLoader();
            ES2.LoadSchematic(EB, sch);
            foreach (var A in EB.DevicePlacements)
            {
                if (A.desc != "LEDBOARD")
                {
                    Leds.Add(new Led() { net1 = A.desc, X = A.x, Y = A.y });
                    Console.WriteLine("{0},{1}, {2}-{3}-{4}", A.x, A.y, A.desc, A.name, A.value);
                }
            }

            foreach (var b in ES2.Parts)
            {
                Console.WriteLine(b);
            }
            foreach (var b in ES2.PartPlacement)
            {
                Console.WriteLine(b);
            }
            foreach (var a in ES.Nets)
            {

                Console.WriteLine(a);
            }

            Console.ReadKey();

        }
    }
}


text:
class Tableau {
    class AddressageException : public std::exception {
    private:
        int indice;
        const char *diagnostique;

    public:
        AddressageException(const char *diagnostique, int indice) : indice(indice), diagnostique(diagnostique) {
        }

        const char *what() const noexcept override {
            char *what = new char[100];
            strcat(what, diagnostique);
            strcat(what, " \n\tIndice = ");
            strcat(what, std::to_string(indice).c_str());
            return what;
        }
    };

private:
    int nbr_elt;
    int *pelements;

public:
    Tableau(int nb) {
        nbr_elt = nb;
        pelements = new int[nbr_elt];
        for (int i = 0; i < nbr_elt; i++) {
            pelements[i] = 0;
        }
    }

    int valeurA(int indice) {
        if (indice >= nbr_elt) {
            throw AddressageException("Indice hors limite", indice);
        }
        return pelements[indice];
    }

    void rangeDans(int val, int indice);
};

#endif //POO_TABLEAU_H


text:
from __future__ import unicode_literals

from django.db import migrations

class Migration(migrations.Migration):

    dependencies = [
        ('Produkte', '0005_auto_20170212_1443'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='produkt',
            name='preis',
        ),
    ]


text:
import {adopt} from '../../../../src/runtime';
import {createIframePromise} from '../../../../testing/iframe';
import {installImg} from '../../../../builtins/amp-img';
import {viewportFor} from '../../../../src/viewport';
import {toggleExperiment} from '../../../../src/experiments';
import * as sinon from 'sinon';
import '../amp-fx-flying-carpet';

adopt(window);

describe('amp-fx-flying-carpet', () => {
  let iframe;

  let sandbox;

  beforeEach(() => {
    sandbox = sinon.sandbox.create();
  });
  afterEach(() => {
    sandbox.restore();
  });

  function getAmpFlyingCarpet(opt_childrenCallback, opt_top) {
    let viewport;
    const top = opt_top || '200vh';
    let flyingCarpet;
    return createIframePromise().then(i => {
      iframe = i;
      toggleExperiment(iframe.win, 'amp-fx-flying-carpet', true);

      iframe.doc.body.style.height = '400vh';
      iframe.doc.body.style.position = 'relative';
      viewport = viewportFor(iframe.win);
      viewport.resize_();

      const parent = iframe.doc.querySelector('#parent');
      parent.style.position = 'absolute';
      parent.style.top = top;

      flyingCarpet = iframe.doc.createElement('amp-fx-flying-carpet');
      flyingCarpet.setAttribute('height', '10px');
      if (opt_childrenCallback) {
        const children = opt_childrenCallback(iframe);
        children.forEach(child => {
          flyingCarpet.appendChild(child);
        });
      }

      return iframe.addElement(flyingCarpet);
    }).then(flyingCarpet => {
      viewport.setScrollTop(parseInt(top, 10));
      return flyingCarpet;
    }, error => {
      return Promise.reject({error, flyingCarpet});
    });
  }

  it('should move children into wrapping divs', () => {
    let img;
    return getAmpFlyingCarpet(iframe => {
      installImg(iframe.win);
      img = iframe.doc.createElement('amp-img');
      img.setAttribute('src', '/examples/img/sample.jpg');
      img.setAttribute('width', 300);
      img.setAttribute('height', 200);
      return [img];
    }).then(flyingCarpet => {
      const clip = flyingCarpet.firstChild;
      expect(clip.tagName).to.equal('DIV');
      expect(clip).to.have.class('-amp-fx-flying-carpet-clip');

      const container = clip.firstChild;
      expect(container.tagName).to.equal('DIV');
      expect(container).to.have.class('-amp-fx-flying-carpet-container');

      expect(container.firstChild).to.equal(img);
    });
  });

  it('should move text into wrapping divs', () => {
    let text;
    return getAmpFlyingCarpet(iframe => {
      text = iframe.doc.createTextNode('test');
      return [text];
    }).then(flyingCarpet => {
      const clip = flyingCarpet.firstChild;
      expect(clip.tagName).to.equal('DIV');
      expect(clip).to.have.class('-amp-fx-flying-carpet-clip');

      const container = clip.firstChild;
      expect(container.tagName).to.equal('DIV');
      expect(container).to.have.class('-amp-fx-flying-carpet-container');

      expect(container.firstChild).to.equal(text);
    });
  });

  it('should sync width of fixed container', () => {
    return getAmpFlyingCarpet().then(flyingCarpet => {
      const impl = flyingCarpet.implementation_;
      const container = flyingCarpet.firstChild.firstChild;
      let width = 10;

      impl.vsync_.mutate = function(callback) {
        callback();
      };
      impl.getLayoutWidth = () => width;

      impl.onLayoutMeasure();
      expect(container.style.width).to.equal(width + 'px');

      width++;
      impl.onLayoutMeasure();
      expect(container.style.width).to.equal(width + 'px');
    });
  });

  it('should not render in the first viewport', () => {
    return getAmpFlyingCarpet(null, '99vh').then(() => {
      throw new Error('should never reach this');
    }, ref => {
      expect(ref.error.message).to.have.string(
        'elements must be positioned after the first viewport'
      );
      expect(ref.flyingCarpet).to.not.display;
    });
  });

  it('should not render in the last viewport', () => {
    return getAmpFlyingCarpet(null, '301vh').then(() => {
      throw new Error('should never reach this');
    }, ref => {
      expect(ref.error.message).to.have.string(
        'elements must be positioned before the last viewport'
      );
      expect(ref.flyingCarpet).to.not.display;
    });
  });

  it('should attempt to change height to 0 when its children collapse', () => {
    let img;
    return getAmpFlyingCarpet(iframe => {
      installImg(iframe.win);
      // Usually, the children appear on a new line with indentation
      const pretext = iframe.doc.createTextNode('\n  ');
      img = iframe.doc.createElement('amp-img');
      img.setAttribute('src', '/examples/img/sample.jpg');
      img.setAttribute('width', 300);
      img.setAttribute('height', 200);
      // Usually, the closing node appears on a new line
      const posttext = iframe.doc.createTextNode('\n');
      return [pretext, img, posttext];
    }).then(flyingCarpet => {
      const attemptChangeHeight = sandbox.stub(flyingCarpet.implementation_,
          'attemptChangeHeight', height => {
            flyingCarpet.style.height = height;
            return Promise.resolve();
          });
      const collapse = sandbox.spy(flyingCarpet.implementation_, 'collapse');
      expect(flyingCarpet.getBoundingClientRect().height).to.be.gt(0);
      img.collapse();
      expect(attemptChangeHeight).to.have.been.called;
      expect(attemptChangeHeight.firstCall.args[0]).to.equal(0);
      return attemptChangeHeight().then(() => {
        expect(flyingCarpet.getBoundingClientRect().height).to.equal(0);
        expect(collapse).to.have.been.called;
        expect(flyingCarpet.style.display).to.equal('none');
      });
    });
  });
});


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<title>Pushpop SplitView Demo</title>
	<link rel="stylesheet" href="../externals/scrollkit/scrollkit.css">
	<link rel="stylesheet" href="../pushpop.css">
	<link rel="stylesheet" href="../pushpop-table-view/pushpop-table-view.css">
	<link rel="stylesheet" href="pushpop-split-view.css">

          Back

This is some other "Master" view.

          Slide Horizontal
          Slide Vertical
          Flip Horizontal
          Flip Vertical
          Card Swap
          Zoom
          Cross Fade

            <input type="checkbox"/>

ON

OFF

          Back

This is some other "Detail" view.


text:
using TestFramework.Abot.Core;
using TestFramework.Abot.Poco;
using TestFramework.Abot.Util;
using HtmlAgilityPack;
using System;
using System.Xml;

namespace TestFramework.WebChecker
{
    public class ImageSrcChecker : WebChecker
    {
        public ImageSrcChecker()
            : base()
        {
        }

        public ImageSrcChecker(CrawlConfiguration crawlConfiguration)
            : base(crawlConfiguration, null, null, null, null, null, null, null, null)
        {
        }

        public ImageSrcChecker(CrawlConfiguration crawlConfiguration, ICrawlDecisionMaker crawlDecisionMaker, IThreadManager threadManager, IScheduler scheduler, IPageRequester pageRequester, IHyperLinkParser hyperLinkParser, IMemoryManager memoryManager, IDomainRateLimiter domainRateLimiter, IRobotsDotTextFinder robotsDotTextFinder)
            : base(crawlConfiguration, crawlDecisionMaker, threadManager, scheduler, pageRequester, hyperLinkParser, memoryManager, domainRateLimiter, robotsDotTextFinder)
        {
        }

        protected override void CheckThePage(string uri, HtmlDocument htmlDocument, out string errorSource)
        {
            errorSource = string.Empty;
            try
            {
                foreach (var srcNode in htmlDocument.DocumentNode.SelectNodes("//img"))
                {
                    if (srcNode.Attributes["src"] != null)
                    {
                        if (!string.IsNullOrEmpty(srcNode.Attributes["src"].Value))
                        {
                            string imageUrl = srcNode.Attributes["src"].Value;
                            if (imageUrl.StartsWith("/"))
                            {
                                imageUrl = Utility.ConvertRelativeUrl(uri, imageUrl);
                            }

                            if (!Utility.FileExist(imageUrl))
                            {
                                errorSource += srcNode.Attributes["src"].Value + ";";
                            }
                        }
                        else
                        {
                            errorSource += srcNode.XPath + ";";
                        }
                    }
                    else
                    {
                        errorSource += srcNode.XPath + ";";
                    }
                }

                if (errorSource != string.Empty)
                {
                    _logger.InfoFormat("The following resources have image src issue on url {0}\r\n{1}", uri, errorSource.Substring(0, errorSource.Length - 1));
                    errorSource = string.Format("The following resources have image src issue on url {0}\r\n{1}\r\n", uri, errorSource.Substring(0, errorSource.Length - 1));
                }
            }
            catch (Exception e)
            {
                _logger.InfoFormat("Exception is thrown when checking image src issue on url {0} with message {1}", uri, e.Message);
                errorSource = string.Format("Exception is thrown when checking image src issue on url {0} with message {1}\r\n", uri, e.Message);
            }
        }
    }
}


text: SELECT a FROM t1 WHERE r <= 268435455 ORDER BY x


text:
var moment = require('moment');
var momentRu = require('moment/locale/ru');
moment.locale('ru');

var DatePickerMixin = {

};

var DatePicker = React.createClass({
  render: function() {

	var day = this.props.day;
	var label;
	var date = moment().add(this.props.day,"day").format("L");
	switch(day) {
	  case 0:
		label = 'сегодня';
	    break;
	  case 1:
		label = 'завтра';
	    break;
	  case 2:
		label = 'послезавтра';
	    break;
	  default:
	    label = date;
	    break;
	}
	var inputChecked = (this.props.activeDate==date) ? true : false;

    return (
	  {label}
	);
  }
});

module.exports = React.createClass({
  getInitialState: function() {

    var dateStart = this.props.dateStart? this.props.dateStart : moment().format("L");
	//console.log(this.props.oneDay);
    var dateEnd = this.props.dateEnd? this.props.dateEnd : moment().add(1, "day").format("L");
    return {
      //formsCount: 1,
	  dateStart: dateStart,
	  dateEnd: dateEnd,
      oneDay: this.props.oneDay,
    };
  },
  setStartDate: function(date, e) {
    //console.log(date);
	/*var dateEnd = moment(date,"DD.MM.YYYY").add(1,"day").format("L");
    this.setState({dateStart:date,dateEnd:dateEnd},function() {
	  $(this.refs.dateStart.getDOMNode()).change();
	}.bind(this));*/
	var dateStart = moment(date,"DD.MM.YYYY").format("L");
	var dateEnd = moment(date,"DD.MM.YYYY").add(1,"day").format("L");
	var $dateStart = $(this.refs.dateStart.getDOMNode()).val(dateStart);
    var $dateEnd = $(this.refs.dateEnd.getDOMNode()).val(dateEnd);
    this.setState({dateStart:dateStart});
    $(".date-picker.checked").removeClass("checked");
    $(e.target).addClass("checked");
  },
  setOneDay: function(oneDay) {
    //this.props.setOneDay(oneDay);
    this.setState({oneDay:oneDay});
  },
  /* getInitialState: function() {
    return {

	};
  }, */
  componentDidMount: function() {

    var $dateStart = $(this.refs.dateStart.getDOMNode());
    var $dateEnd = $(this.refs.dateEnd.getDOMNode());
	//var checkInput = this.checkInput;
	$dateStart.on("blur change",this.checkInput).mask("99.99.9999",{
	  placeholder:" ",
	  autoclear:false,
	  complete: this.checkInput
	});
	$dateEnd.on("blur change",this.checkInput).mask("99.99.9999",{
	  placeholder:" ",
	  autoclear:false,
	  complete: this.checkInput
	});
    /* if(this.refs.input) {
	 var $input = $(this.refs.dateStart.getDOMNode());

	 $input.mask("99.99.9999");

	} */

  },
 /* componentWillReceiveProps: function(newProps) {
  	console.log(newProps);
  },*/
  checkInput: function(e) {
    //input = (input.nodeName) ? input : input.target;
    var date = moment(e.target.value,"DD.MM.YYYY");
	//console.log(target);
	//if(this.props.validateOn) {
		if(date.isValid()) {
		  $(e.target).removeClass("error");
		} else {
		  $(e.target).addClass("error");
		}
	//}
  },
  render: function() {
    /*var field1 = {
        label: "ФИО",
        name: "name",
        type: "text",
      };*/
	/* var field_date_start = {
		name: "",
		label: "Дата начала",
		className: "form__row_w50 form__row_first",
		rule: "required|date",
		mask: "date",
	}   */

	var countDatePickers = 6,
	  i=0,
	  datePickers = [];
	while(i < countDatePickers) {
      if(i==3) datePickers.push(
);
	  datePickers.push(<DatePicker day={i} setDate={this.setStartDate} activeDate={this.state.dateStart} />);
	  i++;
	}
    return (
      <form className="form js-date-form">
        <input type="hidden" name="oneDay" value={this.state.oneDay} />

          Начало действия
          <input type="text" className="input form__row-input" ref="dateStart" defaultValue={this.state.dateStart} name="date_start" />

          Окончание действия
          <input type="text" disabled={this.state.oneDay==1} ref="dateEnd" defaultValue={this.state.dateEnd} className="input form__row-input" name="date_end" />

		{datePickers.map(function(datePicker, i) {
		  return datePicker;
		})}

один день

несколько дней

      </form>
    );
  }
});


text:
class C_ASW_Marine;

// Optional tracer types
enum ASW_FX_TracerType_t
{
	ASW_FX_TRACER_DUAL_LEFT	= 0x00000001,	// fire from left dual attachment point
	ASW_FX_TRACER_DUAL_RIGHT	= 0x00000002,	// fire from right dual attachment point
};

class CDroneGibManager : public CAutoGameSystem
{
public:
	// Methods of IGameSystem
	virtual void Update( float frametime );
	virtual void LevelInitPreEntity( void );

	void	AddGib( C_BaseEntity *pEntity );
	void	RemoveGib( C_BaseEntity *pEntity );

private:
	typedef CHandle<C_BaseEntity> CGibHandle;
	CUtlLinkedList< CGibHandle > m_LRU;
};

void ASW_FX_BloodBulletImpact( const Vector &origin, const Vector &normal, float scale, unsigned char r, unsigned char g, unsigned char b );
void FX_DroneBleed( const Vector &origin, const Vector &direction, float scale );
void FX_GibMeshEmitter( const char *szModel, const char *szTemplate, const Vector &origin, const Vector &direction, int skinm, float fScale=1.0f, bool bFrozen = false );
void FX_GrubGib( const Vector &origin, const Vector &direction, float scale, bool bOnFire );
void FX_DroneGib( const Vector &origin, const Vector &direction, float scale, int skin, bool bOnFire );
void FX_HarvesterGib( const Vector &origin, const Vector &direction, float scale, int skin, bool bOnFire );
void FX_ParasiteGib( const Vector &origin, const Vector &direction, float scale, int skin, bool bUseGibImpactSounds, bool bOnFire );
void FX_EggGibs( const Vector &origin, int flags, int iEntIndex );
void FX_QueenSpitBurst( const Vector &origin, const Vector &direction, float scale, int skin );

void FX_ProbeStunElectroBeam( CBaseEntity *pEntity, mstudiobbox_t *pHitBox, const matrix3x4_t &hitboxToWorld, bool bRandom, float flYawOffset );
void FX_ElectroStun(C_BaseAnimating *pAnimating);
void FX_ElectroStunSplash( const Vector &pos, const Vector &normal, int nFlags );
void FX_QueenDie(C_BaseAnimating *pAnimating);

void FX_ASW_RGEffect(const Vector &vecStart, const Vector &vecEnd);
void FX_ASWTracer( const Vector& start, const Vector& end, int velocity, bool makeWhiz, bool bRedTracer, int iForceStyle=-1 );
// user message based tracers
void ASWUTracer( C_ASW_Marine *pMarine, const Vector& vecEnd, int iAttributeEffects = 0 );
void ASWUTracerless( C_ASW_Marine *pMarine, const Vector& vecEnd, int iAttributeEffects = 0 );	// just muzzle flash and impact, no tracer line
void ASWUTracerDual( C_ASW_Marine *pMarine, const Vector& vecEnd, int nDualType = (ASW_FX_TRACER_DUAL_LEFT | ASW_FX_TRACER_DUAL_RIGHT), int iAttributeEffects = 0 );
void ASWUTracerUnattached( C_ASW_Marine *pMarine, const Vector &vecStart, const Vector &vecEnd, int iAttributeEffects = 0 );
void ASWUTracerRG( C_ASW_Marine *pMarine, const Vector& vecEnd, int iAttributeEffects = 0 );
void FX_ASW_ShotgunSmoke( const Vector& vecOrigin, const QAngle& angFacing );
void FX_ASW_MuzzleEffectAttached( float scale, ClientEntityHandle_t hEntity, int attachmentIndex, unsigned char *pFlashColor = NULL, bool bOneFrame = false  );
void FX_ASW_RedMuzzleEffectAttached( float scale, ClientEntityHandle_t hEntity, int attachmentIndex, unsigned char *pFlashColor = NULL, bool bOneFrame = false  );
void FX_ASW_ParticleMuzzleFlashAttached( float scale, ClientEntityHandle_t hEntity, int attachmentIndex, bool bIsRed );

void FX_ASW_StunExplosion(const Vector &origin);
void FX_ASW_Potential_Burst_Pipe( const Vector &vecImpactPoint, const Vector &vecReflect, const Vector &vecShotBackward, const Vector &vecNormal );

void ASW_AttachFireToHitboxes(C_BaseAnimating *pAnimating, int iNumFires, float fMaxScale);

void FX_ASWWaterRipple( const Vector &origin, float scale, Vector *pColor, float flLifetime=1.5, float flAlpha=1 );
void FX_ASWSplash( const Vector &origin, const Vector &normal, float scale );

void FX_ASWExplodeMap();

extern CDroneGibManager s_DroneGibManager;

#endif // _INCLUDED_C_ASW_FX_H


text:
from django.shortcuts import render_to_response
from django.template import RequestContext
from tests.forms import TestLoginForm

def index(request):
    extra_context = {}
    if request.method == 'POST':
        form = TestLoginForm(request)
        if form.is_valid():
            extra_context['msg'] = 'Valid!'
    else:
        form = TestLoginForm(request)

    extra_context['form'] = form
    return render_to_response('index.html', extra_context, context_instance=RequestContext(request))


text:
package androidx.benchmark.simpleperf;

import android.system.Os;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 *

 * This class sets record options used by ProfileSession. The options are
 * converted to a string list in toRecordArgs(), which is then passed to
 * `simpleperf record` cmd. Run `simpleperf record -h` or
 * `run_simpleperf_on_device.py record -h` for help messages.
 *

 *
 *

 * Example:
 *   RecordOptions options = new RecordOptions();
 *   options.setDuration(3).recordDwarfCallGraph().setOutputFilename("perf.data");
 *   ProfileSession session = new ProfileSession();
 *   session.startRecording(options);
 *

 *
 * NOTE: copied from
 * https://cs.android.com/android/platform/superproject/+/master:system/extras/simpleperf/app_api/
 *
 * @hide
 */
@SuppressWarnings("StringConcatenationInLoop")
@RequiresApi(28)
@RestrictTo(RestrictTo.Scope.LIBRARY)
public class RecordOptions {

    /**
     * Set output filename. Default is perf-<month>-<day>-<hour>-<minute>-<second>.data.
     * The file will be generated under simpleperf_data/.
     */
    @NonNull
    public RecordOptions setOutputFilename(@NonNull String filename) {
        mOutputFilename = filename;
        return this;
    }

    /**
     * Set event to record. Default is cpu-cycles. See `simpleperf list` for all available events.
     */
    @NonNull
    public RecordOptions setEvent(@NonNull String event) {
        mEvent = event;
        return this;
    }

    /**
     * Set how many samples to generate each second running. Default is 4000.
     */
    @NonNull
    public RecordOptions setSampleFrequency(int freq) {
        mFreq = freq;
        return this;
    }

    /**
     * Set record duration. The record stops after `durationInSecond` seconds. By default,
     * record stops only when stopRecording() is called.
     */
    @NonNull
    public RecordOptions setDuration(double durationInSecond) {
        mDurationInSeconds = durationInSecond;
        return this;
    }

    /**
     * Record some threads in the app process. By default, record all threads in the process.
     */
    @NonNull
    public RecordOptions setSampleThreads(@NonNull List<Integer> threads) {
        mThreads.addAll(threads);
        return this;
    }

    /**
     * Record current thread in the app process. By default, record all threads in the process.
     */
    @NonNull
    public RecordOptions setSampleCurrentThread() {
        return setSampleThreads(Collections.singletonList(Os.gettid()));
    }
    /**
     * Record dwarf based call graph. It is needed to get Java callstacks.
     */
    @NonNull
    public RecordOptions recordDwarfCallGraph() {
        mDwarfCallGraph = true;
        mFpCallGraph = false;
        return this;
    }

    /**
     * Record frame pointer based call graph. It is suitable to get C++ callstacks on 64bit devices.
     */
    @SuppressWarnings("unused")
    @NonNull
    public RecordOptions recordFramePointerCallGraph() {
        mFpCallGraph = true;
        mDwarfCallGraph = false;
        return this;
    }

    /**
     * Trace context switch info to show where threads spend time off cpu.
     */
    @NonNull
    public RecordOptions traceOffCpu() {
        mTraceOffCpu = true;
        return this;
    }

    /**
     * Translate record options into arguments for `simpleperf record` cmd.
     */
    @NonNull
    public List<String> toRecordArgs() {
        ArrayList<String> args = new ArrayList<>();

        String filename = mOutputFilename;
        if (filename == null) {
            filename = getDefaultOutputFilename();
        }
        args.add("-o");
        args.add(filename);
        args.add("-e");
        args.add(mEvent);
        args.add("-f");
        args.add(String.valueOf(mFreq));
        if (mDurationInSeconds != 0.0) {
            args.add("--duration");
            args.add(String.valueOf(mDurationInSeconds));
        }
        if (mThreads.isEmpty()) {
            args.add("-p");
            args.add(String.valueOf(Os.getpid()));
        } else {
            String s = "";
            for (int i = 0; i < mThreads.size(); i++) {
                if (i > 0) {
                    s += ",";
                }
                s += mThreads.get(i).toString();
            }
            args.add("-t");
            args.add(s);
        }
        if (mDwarfCallGraph) {
            args.add("-g");
        } else if (mFpCallGraph) {
            args.add("--call-graph");
            args.add("fp");
        }
        if (mTraceOffCpu) {
            args.add("--trace-offcpu");
        }
        return args;
    }

    private String getDefaultOutputFilename() {
        LocalDateTime time = LocalDateTime.now(ZoneId.systemDefault());
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("'perf'-MM-dd-HH-mm-ss'.data'");
        return time.format(formatter);
    }

    @Nullable
    private String mOutputFilename;

    @NonNull
    private String mEvent = "cpu-cycles";

    private int mFreq = 4000;

    private double mDurationInSeconds = 0.0;

    @NonNull
    private final ArrayList<Integer> mThreads = new ArrayList<>();

    private boolean mDwarfCallGraph = false;

    private boolean mFpCallGraph = false;

    private boolean mTraceOffCpu = false;
}


text:
package ga.pageconnected.pageconnected.profile;

import android.content.Context;
import android.content.Intent;
import android.graphics.Paint;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.content.ContextCompat;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.afollestad.materialdialogs.MaterialDialog;
import com.afollestad.materialdialogs.Theme;
import com.getbase.floatingactionbutton.FloatingActionButton;
import com.wang.avi.AVLoadingIndicatorView;

import java.util.ArrayList;
import java.util.HashMap;

import ga.pageconnected.pageconnected.Information;
import ga.pageconnected.pageconnected.R;
import ga.pageconnected.pageconnected.fragment.BaseFragment;
import ga.pageconnected.pageconnected.util.AdditionalFunc;
import ga.pageconnected.pageconnected.util.ParsePHP;

/**
 * Created by tw on 2017-05-29.
 */
public class InfoFragment extends BaseFragment {

    private MyHandler handler = new MyHandler();
    private final int MSG_MESSAGE_FILL_FORM = 500;

    // BASIC UI
    private View view;
    private Context context;

    private TextView tv_email;
    private AVLoadingIndicatorView loadingEmail;
    private LinearLayout interestField;
    private AVLoadingIndicatorView loadingInterest;
    private TextView tv_intro;
    private AVLoadingIndicatorView loadingIntro;

    private FloatingActionButton fabEdit;

    private String userId;
    private HashMap<String, Object> item;

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        userId = getArguments().getString("id");
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.fragment_info, container, false);
        context = container.getContext();

        initUI();

        getUserInfo();

        return view;

    }

    private void initUI(){

        tv_email = (TextView)view.findViewById(R.id.tv_email);
        loadingEmail = (AVLoadingIndicatorView)view.findViewById(R.id.loading_email);
        interestField = (LinearLayout)view.findViewById(R.id.interest_field);
        loadingInterest = (AVLoadingIndicatorView)view.findViewById(R.id.loading_interest);
        tv_intro = (TextView)view.findViewById(R.id.tv_intro);
        loadingIntro = (AVLoadingIndicatorView)view.findViewById(R.id.loading_intro);

        fabEdit = (FloatingActionButton) view.findViewById(R.id.fab_edit);
        fabEdit.setTitle(getResources().getString(R.string.edit_short));
        fabEdit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(context, WtInfoActivity.class);
                intent.putExtra("edit", true);
                intent.putExtra("id", getUserID(InfoFragment.this));
                startActivityForResult(intent, ProfileActivity.EDIT_PROFILE);
            }
        });
        if (getUserID(InfoFragment.this).equals(userId)) {
            fabEdit.setVisibility(View.VISIBLE);
        } else {
            fabEdit.setVisibility(View.GONE);
        }

    }

    public void updateUI(HashMap<String, Object> map){
        item = map;
        fillForm();
    }

    private void fillForm(){

        tv_email.setText((String)item.get("email"));
        loadingEmail.hide();

        tv_intro.setText((String)item.get("intro"));
        loadingIntro.hide();

        setInterestField();
        setParentActivityUI();

    }

    private void setParentActivityUI(){
        try {
            ((ProfileActivity) getActivity()).setProfile((String) item.get("name"), (String) item.get("img"));
        }catch (Exception e){
            System.out.println(e.getMessage());
        }
    }

    private void setInterestField(){

        try {
            final ArrayList<String> interest = (ArrayList<String>) item.get("interest");
            loadingInterest.hide();

            interestField.removeAllViews();

            DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
            float dpHeight = displayMetrics.heightPixels / displayMetrics.density;
            float dpWidth = displayMetrics.widthPixels / displayMetrics.density;
            dpWidth -= 85;

            final float scale = getResources().getDisplayMetrics().density;
            int width = (int) (dpWidth * scale + 0.5f);
            int dp5 = (int) (5 * scale + 0.5f);
            int dp3 = (int) (3 * scale * 0.5f);

            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
            params.setMargins(dp3, dp3, dp3, dp3);
            int mButtonsSize = 0;
            Rect bounds = new Rect();

            boolean isAdd = false;
            TextView finalText = new TextView(context);
            finalText.setPadding(dp5 * 2, dp5, dp5 * 2, dp5);
            finalText.setBackgroundResource(R.drawable.round_button_blue);
            finalText.setTextColor(ContextCompat.getColor(context, R.color.white));
            finalText.setText("+" + interest.size());
            finalText.setLayoutParams(params);
            finalText.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    new MaterialDialog.Builder(context)
                            .title(R.string.interest_field)
                            .items(AdditionalFunc.arrayListToStringArray(interest))
                            .theme(Theme.LIGHT)
                            .positiveText(R.string.close)
                            .show();
                }
            });

            for (int i = 0; i < interest.size(); i++) {

                int remainCount = interest.size() - i;
                String remainString = "+" + remainCount;
                finalText.setText(remainString);

                String s = interest.get(i);
                TextView mBtn = new TextView(context);
                mBtn.setPadding(dp5 * 2, dp5, dp5 * 2, dp5);
                mBtn.setBackgroundResource(R.drawable.round_button_blue_line);
                mBtn.setTextColor(ContextCompat.getColor(context, R.color.pastel_blue));
                mBtn.setText(s);
                mBtn.setLayoutParams(params);

                Paint textPaint = mBtn.getPaint();
                textPaint.getTextBounds(s, 0, s.length(), bounds);
                int textWidth = bounds.width() + dp5 * 4 + dp3 * 2;

                Rect tempBounds = new Rect();
                textPaint = finalText.getPaint();
                textPaint.getTextBounds(remainString, 0, remainString.length(), tempBounds);
                int remainWidth = tempBounds.width() + dp5 * 4 + dp3 * 2;

                if (mButtonsSize + textWidth + remainWidth < width) {
                    interestField.addView(mBtn);
                    mButtonsSize += textWidth;
                } else {
                    interestField.addView(finalText);
                    isAdd = true;
                    break;
                }

            }

            if (!isAdd) {
                finalText.setText("+0");
                interestField.addView(finalText);
            }
        }catch (Exception e){
            System.out.println(e.getMessage());
        }

    }

    private void getUserInfo(){

        HashMap<String, String> map = new HashMap<>();
        map.put("service", "getUserInfo");
        map.put("id", userId);
        new ParsePHP(Information.MAIN_SERVER_ADDRESS, map){
            @Override
            protected void afterThreadFinish(String data) {
                item = AdditionalFunc.getUserInfo(data);
                handler.sendMessage(handler.obtainMessage(MSG_MESSAGE_FILL_FORM));
            }
        }.start();

    }

    private class MyHandler extends Handler {

        public void handleMessage(Message msg)
        {
            switch (msg.what)
            {
                case MSG_MESSAGE_FILL_FORM:
                    fillForm();
                    break;
                default:
                    break;
            }
        }
    }

}


text:
//go:build !linux
// +build !linux

package volume

import (
	v1 "k8s.io/api/core/v1"
	"k8s.io/kubernetes/pkg/volume/util/types"
)

func SetVolumeOwnership(mounter Mounter, fsGroup *int64, fsGroupChangePolicy *v1.PodFSGroupChangePolicy, completeFunc func(types.CompleteFuncParam)) error {
	return nil
}


text:
/*!
 * A dead-simple config loader for Upshot.
 */
var fs = require('fs')
  , path = require('path')
  , util = require('util')
  , HOME = process.env.HOME || process.env.USERPROFILE
  , CONFIG_PATH = path.resolve(HOME, '.upshotrc')

/**
 * Creates a new instance of Config with an initial state provided as `obj`.
 *
 * @param {Object} obj
 */
function Config(obj) {
  if (!(this instanceof Config)) {
    return new Config(obj)
  }

  this.init = false
  this.root = path.resolve(HOME, '.upshot')
  this.filename = 'upshot.md'

  util._extend(this, obj)

  this._initHelpers()
}
Config.prototype.CONFIG_PATH = CONFIG_PATH

/**
 * Synchronously loads the config, returning the loaded instance.
 */
Config.load = load
function load() {
  var cls = this
    , data

  if (fs.existsSync(CONFIG_PATH)) {
    data = JSON.parse(fs.readFileSync(CONFIG_PATH))
  }

  return cls(data)
}

/**
 * Synchronously saves the config, returning the saved instance.
 */
Config.prototype.save = save
function save() {
  fs.writeFileSync(CONFIG_PATH, JSON.stringify(this, null, 2))

  return this
}

/**
 * Synchronously removes the config file, returning the previous instance.
 */
Config.prototype.clean = clean
function clean() {
  fs.unlinkSync(CONFIG_PATH)

  return this
}

/**
 * @private
 *
 * Defines helper properties, such as editPath.
 */
Config.prototype._initHelpers = _initHelpers
function _initHelpers() {
  var self = this

  Object.defineProperty(this, 'editPath', {
    get: function () {
      return path.join(self.root, self.filename)
    }
  })

  return self
}

/*!
 * Export `Config`.
 */
module.exports = Config.load()