text:
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
    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.4.xsd">

    <property name="now" value="now()" dbms="mysql,h2"/>
    <property name="now" value="current_timestamp" dbms="postgresql"/>
    <property name="now" value="sysdate" dbms="oracle"/>

    <property name="autoIncrement" value="true" dbms="mysql,h2,postgresql,oracle"/>

    <property name="floatType" value="float4" dbms="postgresql, h2"/>
    <property name="floatType" value="float" dbms="mysql, oracle"/>

    <!--
        Added the entity ProjectCountry.
    -->
    <changeSet id="00000000000014" author="jhipster">
        <createTable tableName="project_country">
            <column name="id" type="bigint" autoIncrement="${autoIncrement}">
                <constraints primaryKey="true" nullable="false"/>
            </column>
            <column name="project_region_id" type="bigint"/>
            <column name="country_id" type="bigint">
                <constraints unique="true"/>
            </column>
            <column name="status_id" type="bigint">
                <constraints unique="true"/>
            </column>
        </createTable>

        <addForeignKeyConstraint baseColumnNames="project_region_id"
                                 baseTableName="project_country"
                                 constraintName="fk_projectcountry_projectregion_id"
                                 referencedColumnNames="id"
                                 referencedTableName="project_region"/>

        <addForeignKeyConstraint baseColumnNames="country_id"
                                 baseTableName="project_country"
                                 constraintName="fk_projectcountry_country_id"
                                 referencedColumnNames="id"
                                 referencedTableName="country"/>

        <addForeignKeyConstraint baseColumnNames="status_id"
                                 baseTableName="project_country"
                                 constraintName="fk_projectcountry_status_id"
                                 referencedColumnNames="id"
                                 referencedTableName="status"/>

    </changeSet>
</databaseChangeLog>


text:
using System;
using System.Web;
using System.Web.UI;

using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Security;
using DotNetNuke.Services.FileSystem;

#endregion

// ReSharper disable CheckNamespace
namespace DotNetNuke.Services.Exceptions
// ReSharper restore CheckNamespace
{
    /// -----------------------------------------------------------------------------
    /// Project	 : DotNetNuke
    /// Class	 : ErrorPage
    ///
    /// -----------------------------------------------------------------------------
    /// <summary>
    /// Trapped errors are redirected to this universal error page, resulting in a
    /// graceful display.
    /// </summary>
    /// <remarks>
    /// 'get the last server error
    /// 'process this error using the Exception Management Application Block
    /// 'add to a placeholder and place on page
    /// 'catch direct access - No exception was found...you shouldn't end up here unless you go to this aspx page URL directly
    /// </remarks>
    /// -----------------------------------------------------------------------------
    public partial class ErrorPage : Page
    {
        private void ManageError(string status)
        {
            string errorMode = Config.GetCustomErrorMode();

            string errorMessage = HttpUtility.HtmlEncode(Request.QueryString["error"]);
            string errorMessage2 = HttpUtility.HtmlEncode(Request.QueryString["error2"]);
            string localizedMessage = Localization.Localization.GetString(status + ".Error", Localization.Localization.GlobalResourceFile);
            if (localizedMessage != null)
            {
                localizedMessage = localizedMessage.Replace("src=\"images/403-3.gif\"", "src=\"" + ResolveUrl("~/images/403-3.gif") + "\"");

                if (!string.IsNullOrEmpty(errorMessage2) && ( (errorMode=="Off") || ( (errorMode=="RemoteOnly") && (Request.IsLocal) ) ))
                {
                    ErrorPlaceHolder.Controls.Add(new LiteralControl(string.Format(localizedMessage, errorMessage2)));
                }
                else
                {
                    ErrorPlaceHolder.Controls.Add(new LiteralControl(string.Format(localizedMessage, errorMessage)));
                }
            }

            int statusCode;
            Int32.TryParse(status, out statusCode);

            if (statusCode > -1)
            {
                Response.StatusCode = statusCode;
            }
        }

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            DefaultStylesheet.Attributes["href"] = ResolveUrl("~/Portals/_default/default.css");
            InstallStylesheet.Attributes["href"] = ResolveUrl("~/Install/install.css");
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            var portalSettings = PortalController.Instance.GetCurrentPortalSettings();
            if (portalSettings != null && !String.IsNullOrEmpty(portalSettings.LogoFile))
            {
                IFileInfo fileInfo = FileManager.Instance.GetFile(portalSettings.PortalId, portalSettings.LogoFile);
                if (fileInfo != null)
                {
                    headerImage.ImageUrl = FileManager.Instance.GetUrl(fileInfo);
                }
            }
            headerImage.Visible = !string.IsNullOrEmpty(headerImage.ImageUrl);

            string localizedMessage;
            var security = PortalSecurity.Instance;
            var status = security.InputFilter(Request.QueryString["status"],
                                                    PortalSecurity.FilterFlag.NoScripting |
                                                    PortalSecurity.FilterFlag.NoMarkup);
            if (!string.IsNullOrEmpty(status))
            {
                ManageError(status);
            }
            else
            {
                //get the last server error
                var exc = Server.GetLastError();
                try
                {
                    if (Request.Url.LocalPath.ToLowerInvariant().EndsWith("installwizard.aspx"))
                    {
                        ErrorPlaceHolder.Controls.Add(new LiteralControl(HttpUtility.HtmlEncode(exc.ToString())));
                    }
                    else
                    {
                        var lex = new PageLoadException(exc.Message, exc);
                        Exceptions.LogException(lex);
                        localizedMessage = Localization.Localization.GetString("Error.Text", Localization.Localization.GlobalResourceFile);
                        ErrorPlaceHolder.Controls.Add(new ErrorContainer(portalSettings, localizedMessage, lex).Container);
                    }
                }
                catch
                {
                    //No exception was found...you shouldn't end up here
                    //unless you go to this aspx page URL directly
                    localizedMessage = Localization.Localization.GetString("UnhandledError.Text", Localization.Localization.GlobalResourceFile);
                    ErrorPlaceHolder.Controls.Add(new LiteralControl(localizedMessage));
                }

                Response.StatusCode = 500;
            }
            localizedMessage = Localization.Localization.GetString("Return.Text", Localization.Localization.GlobalResourceFile);

            hypReturn.Text = localizedMessage;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.gradle.internal.operations.logging;

import org.apache.commons.io.IOUtils;
import org.gradle.api.logging.LogLevel;
import org.gradle.api.logging.Logger;
import org.gradle.internal.UncheckedException;
import org.gradle.internal.logging.ConsoleRenderer;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

class DefaultBuildOperationLogger implements BuildOperationLogger {
    private final BuildOperationLogInfo configuration;
    private final Logger logger;
    private final File outputFile;
    private PrintWriter logWriter;

    private boolean started;
    private int numberOfFailedOperationsSeen;

    DefaultBuildOperationLogger(BuildOperationLogInfo configuration, Logger logger, File outputFile) {
        this.configuration = configuration;
        this.logger = logger;
        this.outputFile = outputFile;

        this.numberOfFailedOperationsSeen = 0;
        this.started = false;
    }

    @Override
    public void start() {
        assert !started;
        logWriter = createWriter(outputFile);
        logInBoth(LogLevel.INFO, String.format("See %s for all output for %s.", getLogLocation(), configuration.getTaskName()));
        started = true;
    }

    protected PrintWriter createWriter(File outputFile) {
        PrintWriter logWriter = null;
        try {
            logWriter = new PrintWriter(new FileWriter(outputFile), true);
        } catch (IOException e) {
            UncheckedException.throwAsUncheckedException(e);
        }
        return logWriter;
    }

    @Override
    public synchronized void operationSuccess(String description, String output) {
        assert started;
        logInBoth(LogLevel.DEBUG, description.concat(" successful."));
        maybeShowSuccess(output);
    }

    @Override
    public synchronized void operationFailed(String description, String output) {
        assert started;
        logInBoth(LogLevel.DEBUG, description.concat(" failed."));
        maybeShowFailure(output);
    }

    @Override
    public void done() {
        assert started;
        try {
            int suppressedCount = numberOfFailedOperationsSeen - configuration.getMaximumFailedOperationsShown();
            if (suppressedCount > 0) {
                logger.log(LogLevel.ERROR, String.format("...output for %d more failed operation(s) continued in %s.", suppressedCount, getLogLocation()));
            }
            logInBoth(LogLevel.INFO, String.format("Finished %s, see full log %s.", configuration.getTaskName(), getLogLocation()));
        } finally {
            IOUtils.closeQuietly(logWriter);
            started = false;
        }
    }

    private void maybeShowSuccess(String output) {
        logger.log(LogLevel.INFO, output);
        logWriter.println(output);
    }

    private void maybeShowFailure(String output) {
        if (numberOfFailedOperationsSeen < configuration.getMaximumFailedOperationsShown()) {
            logger.log(LogLevel.ERROR, output);
        }
        logWriter.println(output);
        numberOfFailedOperationsSeen++;
    }

    private void logInBoth(LogLevel logLevel, String message) {
        logger.log(logLevel, message);
        logWriter.println(message);
    }

    public String getLogLocation() {
        return new ConsoleRenderer().asClickableFileUrl(configuration.getOutputFile());
    }
}


text:
<?php

namespace League\Uri\Interfaces;

/**
 * Value object representing a URI Path component.
 *
 * Instances of this interface are considered immutable; all methods that
 * might change state MUST be implemented such that they retain the internal
 * state of the current instance and return an instance that contains the
 * changed state.
 *
 * @package League.uri
 * @author  Ignace Nyamagana Butera <nyamsprod@gmail.com>
 * @since   4.0.0
 * @see     https://tools.ietf.org/html/rfc3986#section-3.3
 */
interface DataPath extends Path
{
    /**
     * Retrieves the data string.
     *
     * Retrieves the data part of the path. If no data part is provided return
     * a empty string
     *
     * @return string
     */
    public function getData();

    /**
     * Retrieve the mediatype associated with the URI.
     *
     * If no mediatype is present, this method MUST return the default parameter 'text/plain;charset=US-ASCII'.
     *
     * @see http://tools.ietf.org/html/rfc2397#section-3
     *
     * @return string The URI scheme.
     */
    public function getMediaType();

    /**
     * Retrieve the data mime type associated to the URI.
     *
     * If no mimetype is present, this method MUST return the default mimetype 'text/plain'.
     *
     * @see http://tools.ietf.org/html/rfc2397#section-2
     *
     * @return string The URI scheme.
     */
    public function getMimeType();

    /**
     * Retrieve the parameters associated with the Mime Type of the URI.
     *
     * If no parameters is present, this method MUST return the default parameter 'charset=US-ASCII'.
     *
     * @see http://tools.ietf.org/html/rfc2397#section-2
     *
     * @return string The URI scheme.
     */
    public function getParameters();

    /**
     * Tells whether the data is binary safe encoded
     *
     * @return bool
     */
    public function isBinaryData();

    /**
     * Returns an instance where the data part is base64 encoded
     *
     * This method MUST retain the state of the current instance, and return
     * an instance where the data part is base64 encoded
     *
     * @return static
     */
    public function toBinary();

    /**
     * Returns an instance where the data part is url encoded following RFC3986 rules
     *
     * This method MUST retain the state of the current instance, and return
     * an instance where the data part is url encoded
     *
     * @return static
     */
    public function toAscii();

    /**
     * Return an instance with the specified mediatype parameters.
     *
     * This method MUST retain the state of the current instance, and return
     * an instance that contains the specified mediatype parameters.
     *
     * Users must provide encoded characters.
     *
     * An empty parameters value is equivalent to removing the parameter.
     *
     * @param string $parameters The mediatype parameters to use with the new instance.
     *
     * @throws \InvalidArgumentException for invalid query strings.
     *
     * @return static A new instance with the specified mediatype parameters.
     */
    public function withParameters($parameters);

    /**
     * Save the data to a specific file
     *
     * @param string $path The path to the file where to save the data
     * @param string $mode The mode parameter specifies the type of access you require to the stream.
     *
     * @throws \RuntimeException if the path is not reachable
     *
     * @return \SplFileObject
     */
    public function save($path, $mode = 'w');
}


text:
var ordinalspeller = require('../../spellers/ordinal-speller');

describe('ordinal-speller', function () {

    'use strict';

    it('should handle 1, neuter', function () {

        expect(ordinalspeller.spell(1, ordinalspeller.gender.neuter)).toEqual(['primer']);
    });

    it('should handle 1, masculine', function () {

        expect(ordinalspeller.spell(1, ordinalspeller.gender.masculine)).toEqual(['primero']);
    });

    it('should handle 1, feminine', function () {

        expect(ordinalspeller.spell(1, ordinalspeller.gender.feminine)).toEqual(['primera']);
    });

    it('should handle 2, masculine', function () {

        expect(ordinalspeller.spell(2, ordinalspeller.gender.masculine)).toEqual(['segundo']);
    });

    it('should handle 2, feminine', function () {

        expect(ordinalspeller.spell(2, ordinalspeller.gender.feminine)).toEqual(['segunda']);
    });

    it('should handle 3, neuter', function () {

        expect(ordinalspeller.spell(3, ordinalspeller.gender.neuter)).toEqual(['tercer']);
    });

    it('should handle 3, masculine', function () {

        expect(ordinalspeller.spell(3, ordinalspeller.gender.masculine)).toEqual(['tercero']);
    });

    it('should handle 3, feminine', function () {

        expect(ordinalspeller.spell(3, ordinalspeller.gender.feminine)).toEqual(['tercera']);
    });

    it('should handle 5, masculine', function () {

        expect(ordinalspeller.spell(5, ordinalspeller.gender.masculine)).toEqual(['quinto']);
    });

    it('should handle 5, feminine', function () {

        expect(ordinalspeller.spell(5, ordinalspeller.gender.feminine)).toEqual(['quinta']);
    });

    it('should handle 9, masculine', function () {

        expect(ordinalspeller.spell(9, ordinalspeller.gender.masculine)).toEqual(['noveno']);
    });

    it('should handle 9, feminine', function () {

        expect(ordinalspeller.spell(9, ordinalspeller.gender.feminine)).toEqual(['novena']);
    });

    it('should handle 11, masculine', function () {

        expect(ordinalspeller.spell(11, ordinalspeller.gender.masculine)).toEqual(['undécimo', 'onceno', 'decimoprimero']);
    });

    it('should handle 11, feminine', function () {

        expect(ordinalspeller.spell(11, ordinalspeller.gender.feminine)).toEqual(['undécima', 'oncena', 'decimoprimera']);
    });

    it('should handle 17, masculine', function () {

        expect(ordinalspeller.spell(17, ordinalspeller.gender.masculine)).toEqual(['décimo séptimo', 'decimoséptimo']);
    });

    it('should handle 17, feminine', function () {

        expect(ordinalspeller.spell(17, ordinalspeller.gender.feminine)).toEqual(['décima séptima', 'decimoséptima']);
    });

    it('should handle 20, masculine', function () {

        expect(ordinalspeller.spell(20, ordinalspeller.gender.masculine)).toEqual(['vigésimo', 'veinteno']);
    });

    it('should handle 20, feminine', function () {

        expect(ordinalspeller.spell(20, ordinalspeller.gender.feminine)).toEqual(['vigésima', 'veintena']);
    });

    it('should handle 24, masculine', function () {

        expect(ordinalspeller.spell(24, ordinalspeller.gender.masculine)).toEqual(['vigésimo cuarto', 'vigesimocuarto']);
    });

    it('should handle 24, feminine', function () {

        expect(ordinalspeller.spell(24, ordinalspeller.gender.feminine)).toEqual(['vigésima cuarta', 'vigesimocuarta']);
    });

    it('should handle 26, masculine', function () {

        expect(ordinalspeller.spell(26, ordinalspeller.gender.masculine)).toEqual(['vigésimo sexto', 'vigesimosexto']);
    });

    it('should handle 26, feminine', function () {

        expect(ordinalspeller.spell(26, ordinalspeller.gender.feminine)).toEqual(['vigésima sexta', 'vigesimosexta']);
    });

    it('should handle 30, masculine', function () {

        expect(ordinalspeller.spell(30, ordinalspeller.gender.masculine)).toEqual(['trigésimo']);
    });

    it('should handle 30, feminine', function () {

        expect(ordinalspeller.spell(30, ordinalspeller.gender.feminine)).toEqual(['trigésima']);
    });

    it('should handle 31, masculine', function () {

        expect(ordinalspeller.spell(31, ordinalspeller.gender.masculine)).toEqual(['trigésimo primero']);
    });

    it('should handle 31, feminine', function () {

        expect(ordinalspeller.spell(31, ordinalspeller.gender.feminine)).toEqual(['trigésima primera']);
    });

    it('should handle 39, masculine', function () {

        expect(ordinalspeller.spell(39, ordinalspeller.gender.masculine)).toEqual(['trigésimo noveno']);
    });

    it('should handle 39, feminine', function () {

        expect(ordinalspeller.spell(39, ordinalspeller.gender.feminine)).toEqual(['trigésima novena']);
    });

    it('should handle 46, masculine', function () {

        expect(ordinalspeller.spell(46, ordinalspeller.gender.masculine)).toEqual(['cuadragésimo sexto']);
    });

    it('should handle 46, feminine', function () {

        expect(ordinalspeller.spell(46, ordinalspeller.gender.feminine)).toEqual(['cuadragésima sexta']);
    });

    it('should handle 55, masculine', function () {

        expect(ordinalspeller.spell(55, ordinalspeller.gender.masculine)).toEqual(['quincuagésimo quinto']);
    });

    it('should handle 55, feminine', function () {

        expect(ordinalspeller.spell(55, ordinalspeller.gender.feminine)).toEqual(['quincuagésima quinta']);
    });

    it('should handle 99, masculine', function () {

        expect(ordinalspeller.spell(99, ordinalspeller.gender.masculine)).toEqual(['nonagésimo noveno']);
    });

    it('should handle 99, feminine', function () {

        expect(ordinalspeller.spell(99, ordinalspeller.gender.feminine)).toEqual(['nonagésima novena']);
    });

    it('should handle 100, masculine', function () {

        expect(ordinalspeller.spell(100, ordinalspeller.gender.masculine)).toEqual(['centésimo']);
    });

    it('should handle 100, feminine', function () {

        expect(ordinalspeller.spell(100, ordinalspeller.gender.feminine)).toEqual(['centésima']);
    });

    it('should handle 101, masculine', function () {

        expect(ordinalspeller.spell(101, ordinalspeller.gender.masculine)).toEqual(['centésimo primero']);
    });

    it('should handle 101, feminine', function () {

        expect(ordinalspeller.spell(101, ordinalspeller.gender.feminine)).toEqual(['centésima primera']);
    });

    it('should handle 111, masculine', function () {

        expect(ordinalspeller.spell(111, ordinalspeller.gender.masculine)).toEqual(['centésimo undécimo', 'centésimo onceno', 'centésimo decimoprimero']);
    });

    it('should handle 114, masculine', function () {

        expect(ordinalspeller.spell(114, ordinalspeller.gender.masculine)).toEqual(['centésimo décimo cuarto', 'centésimo decimocuarto']);
    });

    it('should handle 114, feminine', function () {

        expect(ordinalspeller.spell(114, ordinalspeller.gender.feminine)).toEqual(['centésima décima cuarta', 'centésima decimocuarta']);
    });

    it('should handle 200, masculine', function () {

        expect(ordinalspeller.spell(200, ordinalspeller.gender.masculine)).toEqual(['ducentésimo']);
    });

    it('should handle 200, feminine', function () {

        expect(ordinalspeller.spell(200, ordinalspeller.gender.feminine)).toEqual(['ducentésima']);
    });

    it('should handle 999, masculine', function () {

        expect(ordinalspeller.spell(999, ordinalspeller.gender.masculine)).toEqual(['noningentésimo nonagésimo noveno']);
    });

    it('should handle 999, feminine', function () {

        expect(ordinalspeller.spell(999, ordinalspeller.gender.feminine)).toEqual(['noningentésima nonagésima novena']);
    });

    it('should handle 1000, masculine', function () {

        expect(ordinalspeller.spell(1000, ordinalspeller.gender.masculine)).toEqual(['milésimo']);
    });

    it('should handle 1000, feminine', function () {

        expect(ordinalspeller.spell(1000, ordinalspeller.gender.feminine)).toEqual(['milésima']);
    });

    it('should handle 1111, masculine', function () {

        expect(ordinalspeller.spell(1111, ordinalspeller.gender.masculine)).toEqual(['milésimo centésimo undécimo', 'milésimo centésimo onceno', 'milésimo centésimo decimoprimero']);
    });

    it('should handle 1114, masculine', function () {

        expect(ordinalspeller.spell(1114, ordinalspeller.gender.masculine)).toEqual(['milésimo centésimo décimo cuarto', 'milésimo centésimo decimocuarto']);
    });

    it('should handle 1114, feminine', function () {

        expect(ordinalspeller.spell(1114, ordinalspeller.gender.feminine)).toEqual(['milésima centésima décima cuarta', 'milésima centésima decimocuarta']);
    });

    it('should handle 2000, masculine', function () {

        expect(ordinalspeller.spell(2000, ordinalspeller.gender.masculine)).toEqual(['dosmilésimo']);
    });

    it('should handle 2000, feminine', function () {

        expect(ordinalspeller.spell(2000, ordinalspeller.gender.feminine)).toEqual(['dosmilésima']);
    });

    it('should handle 3512, masculine', function () {

        expect(ordinalspeller.spell(3512, ordinalspeller.gender.masculine)).toEqual(['tresmilésimo quingentésimo duodécimo', 'tresmilésimo quingentésimo doceno', 'tresmilésimo quingentésimo decimosegundo']);
    });

    it('should handle 3512, feminine', function () {

        expect(ordinalspeller.spell(3512, ordinalspeller.gender.feminine)).toEqual(['tresmilésima quingentésima duodécima', 'tresmilésima quingentésima docena', 'tresmilésima quingentésima decimosegunda']);
    });

    it('should handle 9999, masculine', function () {

        expect(ordinalspeller.spell(9999, ordinalspeller.gender.masculine)).toEqual(['nuevemilésimo noningentésimo nonagésimo noveno']);
    });

    it('should handle 9999, feminine', function () {

        expect(ordinalspeller.spell(9999, ordinalspeller.gender.feminine)).toEqual(['nuevemilésima noningentésima nonagésima novena']);
    });

    it('should handle 10000, masculine', function () {

        expect(ordinalspeller.spell(10000, ordinalspeller.gender.masculine)).toEqual(['diezmilésimo']);
    });

    it('should handle 10000, feminine', function () {

        expect(ordinalspeller.spell(10000, ordinalspeller.gender.feminine)).toEqual(['diezmilésima']);

        //expect(ordinalspeller.spell(33333, ordinalspeller.gender.masculine)).toEqual(['treinta y tresmilésimo tricentésimo trigésimo tercero']);
    });
});


text:
#roksearch_search_str {background: #EFF8FA url(search-icon.png) 98% 50% no-repeat;border: 1px solid #b7d9e9;color: #336D83;}
#roksearch_search_str.loading {background-color:#EFF8FA;border: 1px solid #b7d9e9;}
#roksearch_results {background: #EFF8FA;border: 1px solid #b7d9e9;}
#roksearch_results a#roksearch_link {background: url(close.png) 0 0 no-repeat;}
#roksearch_results h3 {color: #444;}
#roksearch_results span {color: #888;}
#roksearch_results .roksearch_header, #roksearch_results .roksearch_row_btm {background: #fff;border-bottom: 1px solid #b7d9e9;color: #666;}
#roksearch_results .roksearch_row_btm span {color: #999;}
#roksearch_results span.small {color: #666;}
#roksearch_results span.highlight {background: #999;color: #fff;}
#roksearch_results a:hover {color: #0B3768;}
#roksearch_results .roksearch_odd {background: #EFF8FA;border-bottom: 1px solid #b7d9e9;}
#roksearch_results .roksearch_even {background: #e9f0f2;border-bottom: 1px solid #b7d9e9;}
#roksearch_results .roksearch_odd-hover, #roksearch_results .roksearch_even-hover {background-color: #fff;}
#roksearch_results .roksearch_odd-hover h3, #roksearch_results .roksearch_even-hover h3 {background: url(right-arrow.png) 0 4px no-repeat;}
.results ol.list li p {color: #666;}
#roksearch_results .arrow-left {background: #e9e9e9 url(left-arrow.png) 50% 50% no-repeat;;border: 1px solid #d9d9d9;}
#roksearch_results .arrow-left-disabled {background: #fefefe;border: 1px solid #e9e9e9;}
#roksearch_results .arrow-right {background: #e9e9e9 url(right-arrow.png) 50% 50% no-repeat;border: 1px solid #d9d9d9;}
#roksearch_results .arrow-right-disabled {background: #fefefe;border: 1px solid #e9e9e9;}
form.search_result .inputbox {border: 1px solid #b7d9e9;}
fieldset.phrase, fieldset.word, fieldset.only {border-bottom: 1px solid #b7d9e9;}
#roksearch_results .rokajaxsearch-overlay {background-color: #EFF8FA;}


text:
/* global MOBTOWN_GMAPS_API_KEY */
module.exports = {
  gmapsAPIKey: MOBTOWN_GMAPS_API_KEY
}


text:
<?php

namespace Jordo\ProjectBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class ProjectType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('title')
            ->add('budget')
            /*
            ->add('state', 'choice', array(
                'choices' => array(
                    'devis' => 'Devis / projet',
                    'wait' => 'En attente',
                    'current' => 'En cours',
                    'close' => 'Terminé',
                    'cancel' => 'Annulé',
                )
            ))
            */
            ->add('contact', null, array('empty_value' => '', 'attr' => array('data-autocomplete' => true)))
            ->add('description')
            ->add('contexte')
            ->add('demande')
            ->add('dateStart', 'date')
            ->add('gantt', null, array(
                'required'  => false,
            ))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Jordo\ProjectBundle\Entity\Project'
        ));
    }

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


text:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;

[RequireComponent (typeof(LevelObjectPool))]
public class GameController : MonoBehaviour {

	[SerializeField] bool randomize = true;
	[SerializeField] CameraHandler cameraHandler;
	[SerializeField] GameObject playerCharacter;
	[SerializeField] Text[] distanceText;
	[SerializeField] GameObject retryButton;

	LevelObjectPool lvlPool; //Getting a reference to the level pool attached to this gameobject.
	GameObject activeLevelsRoot; //A gameobject to hold all levels that are currently ACTIVE.
	List<LevelPackage> activeLevels = new List<LevelPackage>();

	Vector3 levelSpawnOffset; //Where levels will spawn by default.
	bool levelSpawnAllowed = false; //If there is room for the level to spawn, try spawning it (among other conditions).
	int levelHeightVariance = 2;
	float idealXPositionOffset = -4;

	Vector3 playerSpawnOffset = new Vector3(-23, 0, 0);
	Vector3 defaultStartingCameraPosition = new Vector3(0, 0, -25);

	bool gameRunning = false;

	void Awake()
	{
		GlobalReferences.gameController = this;

		lvlPool = GetComponent<LevelObjectPool>();
		lvlPool.PrepareNewLevels (1); //Adds levels of the specified difficulty to the level pool.
		activeLevelsRoot = new GameObject ("Active Levels");

		levelSpawnOffset = GetComponent<BoxCollider> ().center;

		StartGame (); //MOVE THIS TO A BUTTON
	}

	void Update()
	{
		if (gameRunning)
		{
			foreach (Text uiText in distanceText)
			{
				uiText.text = Mathf.RoundToInt (transform.position.x).ToString ();
			}
		}
	}

	void FixedUpdate()
	{
		GlobalReferences.distanceRun = Mathf.RoundToInt(transform.position.x);
		GlobalReferences.idealXPosition = transform.position.x + idealXPositionOffset;

		////SPAWN LEVEL CODE
		if (levelSpawnAllowed)
		{
			//Levels are spawned if they aren't going to overlap another level,
			//at a position relative to the camera, with some variation in height.
			Vector3 levelSpawnPosition = transform.position + levelSpawnOffset + (Vector3.up * Random.Range(-levelHeightVariance, levelHeightVariance));

			if (randomize)
			{
				LevelPackage newActiveLevel = lvlPool.PopOffPoolRand ();
				activeLevels.Add (newActiveLevel);

				newActiveLevel.level.transform.SetParent (activeLevelsRoot.transform);
				newActiveLevel.level.transform.position = levelSpawnPosition;
			}
			else
			{
				LevelPackage newActiveLevel = lvlPool.PopOffPool ();
				activeLevels.Add (newActiveLevel);

				newActiveLevel.level.transform.SetParent (activeLevelsRoot.transform);
				newActiveLevel.level.transform.position = levelSpawnPosition;
			}
		}
	}

	void OnTriggerEnter(Collider otherColl)
	{
		levelSpawnAllowed = false;
	}

	void OnTriggerExit(Collider otherColl)
	{
		levelSpawnAllowed = true;
	}

	//Despawn level removes the oldest level to have been created.
	//Since we're constantly moving to the right, this will always be the oldest level, the value at 0.
	public void DespawnLevel()
	{
		if (activeLevels.Count > 0)
		{
			lvlPool.AddToPool (activeLevels [0]);
			activeLevels.RemoveAt (0);
		}
		else
		{
			Debug.Log ("A script tried to despawn a level that didn't exist. - GameController");
		}
	}

	public void StartGame()
	{
		gameRunning = true;

		//Despawn all levels (manually) that are currently active.
		for (int i = 0; i < activeLevels.Count; i++)
		{
			lvlPool.AddToPool (activeLevels[0]);
			activeLevels.RemoveAt (0);
		}

		if (activeLevels.Count > 0)
		{
			for (int i = 0; i < activeLevels.Count; i++)
			{
				lvlPool.AddToPool (activeLevels [0]);
				activeLevels.RemoveAt (0);
			}
		}
		//Return to the original camera position.
		cameraHandler.transform.position = defaultStartingCameraPosition;

		//Respawn the player character.
		playerCharacter.transform.position = playerSpawnOffset;
		playerCharacter.SetActive (true);

		cameraHandler.SetMovementMode(CameraMode.running);

		retryButton.SetActive (false);
	}

	//Player ded.
	public void GameOver()
	{
		gameRunning = false;
		cameraHandler.SetMovementMode(CameraMode.slowStop);

		retryButton.SetActive (true);
	}
}


text:
package org.apache.geode.cache.wan.internal.cli.commands;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import org.apache.geode.test.junit.categories.GfshTest;
import org.apache.geode.test.junit.rules.GfshParserRule;
import org.apache.geode.test.junit.rules.GfshParserRule.CommandCandidate;

@Category(GfshTest.class)
public class WanCommandAutoCompletionIntegrationTest {

  @Rule
  public GfshParserRule gfshParserRule = new GfshParserRule();

  @Test
  public void testCompletionOffersMandatoryOptionsInAlphabeticalOrderForWanCopyRegionWithSpace() {
    String buffer = "wan-copy region ";
    CommandCandidate candidate = gfshParserRule.complete(buffer);
    assertThat(candidate.getCandidates()).hasSize(2);
    assertThat(candidate.getFirstCandidate()).isEqualTo(buffer + "--region");
    assertThat(candidate.getCandidate(1)).isEqualTo(buffer + "--sender-id");
  }

  @Test
  public void testCompletionOffersTheFirstMandatoryOptionInAlphabeticalOrderForWanCopyRegionWithDash() {
    String buffer = "wan-copy region --";
    CommandCandidate candidate = gfshParserRule.complete(buffer);
    assertThat(candidate.getCandidates()).hasSize(1);
    assertThat(candidate.getFirstCandidate()).isEqualTo(buffer + "region");
  }

}


text:
package com.google.code.regexp;

import java.io.Serializable;

/**
 * Contains the position and group index of capture groups
 * from a named pattern
 */
public class GroupInfo implements Serializable {

    /**
     * Determines if a de-serialized file is compatible with this class.
     *
     * Maintainers must change this value if and only if the new version
     * of this class is not compatible with old versions. See Sun docs
     * for <a href=http://java.sun.com/products/jdk/1.1/docs/guide
     * /serialization/spec/version.doc.html> details. </a>
     *
     * Not necessary to include in first version of the class, but
     * included here as a reminder of its importance.
     */
    private static final long serialVersionUID = 1L;

    private int pos;
    private int groupIndex;

    /**
     * Constructs a {@code GroupInfo} with a group index and string
     * position
     *
     * @param groupIndex the group index
     * @param pos the position
     */
    public GroupInfo(int groupIndex, int pos) {
        this.groupIndex = groupIndex;
        this.pos = pos;
    }

    /**
     * Gets the string position of the group within a named pattern
     *
     * @return the position
     */
    public int pos() {
        return pos;
    }

    /**
     * Gets the group index of the named capture group
     *
     * @return the group index
     */
    public int groupIndex() {
        return groupIndex;
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof GroupInfo)) {
            return false;
        }
        GroupInfo other = (GroupInfo)obj;
        return (pos == other.pos) && (groupIndex == other.groupIndex);
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
        return pos ^ groupIndex;
    }
}


text:
package monifu.reactive.internals.collection

import java.util.ConcurrentModificationException
import minitest.SimpleTestSuite
import monifu.reactive.internals.collection.DropAllOnOverflowQueueSuite._

object DropHeadOnOverflowQueueSuite extends SimpleTestSuite {
  test("should not accept null values") {
    val q = DropAllOnOverflowQueue[String](100)
    intercept[NullPointerException] {
      q.offer(null)
    }
  }

  test("capacity must be computed as a power of 2") {
    val q1 = DropHeadOnOverflowQueue[Int](1000)
    assertEquals(q1.capacity, 1023)

    val q2 = DropHeadOnOverflowQueue[Int](600)
    assertEquals(q2.capacity, 1023)

    val q3 = DropHeadOnOverflowQueue[Int](1024)
    assertEquals(q3.capacity, 2047)

    val q4 = DropHeadOnOverflowQueue[Int](1025)
    assertEquals(q4.capacity, 2047)

    intercept[IllegalArgumentException] {
      DropHeadOnOverflowQueue[Int](0)
    }

    intercept[IllegalArgumentException] {
      DropHeadOnOverflowQueue[Int](1)
    }

    intercept[IllegalArgumentException] {
      DropHeadOnOverflowQueue[Int](-100)
    }
  }

  test("offer and poll, happy path") {
    val array = new Array[Int](7)
    val q = DropHeadOnOverflowQueue[Int](7)

    assertEquals(q.capacity, 7)
    assert(q.poll().asInstanceOf[AnyRef] == null)

    assertEquals(q.offer(10), 0)
    assertEquals(q.offer(20), 0)
    assertEquals(q.offer(30), 0)

    assertEquals(q.poll(), 10)
    assertEquals(q.poll(), 20)
    assertEquals(q.poll(), 30)
    assert(q.poll().asInstanceOf[AnyRef] == null)

    assertEquals(q.offerMany(40, 50, 60, 70, 80, 90, 100), 0)

    assertEquals(q.pollMany(array), 7)
    assertEquals(array.toList, List(40, 50, 60, 70, 80, 90, 100))
  }

  test("offer and poll, overflow") {
    val array = new Array[Int](7)
    val q = DropHeadOnOverflowQueue[Int](7)

    assertEquals(q.capacity, 7)
    assert(q.poll().asInstanceOf[AnyRef] == null)

    assertEquals(q.offer(0), 0)
    assertEquals(q.poll(), 0)

    assertEquals(q.offerMany(1 to 7: _*), 0)

    assertEquals(q.offer(8), 1)
    assertEquals(q.offer(9), 1)
    assertEquals(q.offer(10), 1)
    assertEquals(q.offer(11), 1)
    assertEquals(q.offer(12), 1)
    assertEquals(q.offer(13), 1)
    assertEquals(q.offer(14), 1)

    assertEquals(q.pollMany(array), 7)
    assertEquals(array.toList, List(8, 9, 10, 11, 12, 13, 14))

    assertEquals(q.offerMany(15 until 29: _*), 7)
    assertEquals(q.pollMany(array), 7)
    assertEquals(array.toList, (22 until 29).toList)

    assert(q.poll().asInstanceOf[AnyRef] == null)
  }

  test("size should be correct on happy path") {
    val q = DropHeadOnOverflowQueue[Int](7)
    assertEquals(q.size, 0)

    for (i <- 1 to 7) {
      assertEquals(q.offer(i), 0)
      assertEquals(q.size, i)
    }

    assert(q.isAtCapacity)
    for (i <- 1 to 5) {
      assertEquals(q.poll(), i)
      assertEquals(q.size, 7 - i)
      assert(!q.isAtCapacity)
    }

    assertEquals(q.offer(1), 0)
    assertEquals(q.size, 3)
    assertEquals(q.offer(2), 0)
    assertEquals(q.size, 4)
    assertEquals(q.offer(3), 0)
    assertEquals(q.size, 5)
    assertEquals(q.offer(4), 0)
    assertEquals(q.size, 6)
    assertEquals(q.offer(7), 0)
    assertEquals(q.size, 7)
    assert(q.isAtCapacity)

    for (i <- 8 until 100) {
      assertEquals(q.offer(i), 1)
      assertEquals(q.size, 7)
      assert(q.isAtCapacity)
    }
  }

  test("throw ConcurrentModificationException after poll") {
    val q = DropHeadOnOverflowQueue[Int](7)
    q.offerMany(1,2,3,4)
    val iterator = q.iterator

    q.poll()
    intercept[ConcurrentModificationException] {
      iterator.hasNext
    }
  }

  test("throw ConcurrentModificationException after offer") {
    val q = DropHeadOnOverflowQueue[Int](7)
    q.offerMany(1,2,3,4)
    val iterator = q.iterator

    q.offer(1)
    intercept[ConcurrentModificationException] {
      iterator.hasNext
    }
  }
}


text:
<?php

namespace Symfony\Component\Intl\ResourceBundle\Reader;

use Symfony\Component\Intl\Exception\MissingResourceException;

/**
 * Reads individual entries of a resource file.
 *
 * @author Bernhard Schussek <bschussek@gmail.com>
 *
 * @internal
 */
interface StructuredBundleReaderInterface extends BundleReaderInterface
{
    /**
     * Reads an entry from a resource bundle.
     *
     * An entry can be selected from the resource bundle by passing the path
     * to that entry in the bundle. For example, if the bundle is structured
     * like this:
     *
     *     TopLevel
     *         NestedLevel
     *             Entry: Value
     *
     * Then the value can be read by calling:
     *
     *     $reader->readEntry('...', 'en', array('TopLevel', 'NestedLevel', 'Entry'));
     *
     * @param string   $path     The path to the resource bundle.
     * @param string   $locale   The locale to read.
     * @param string[] $indices  The indices to read from the bundle.
     * @param bool     $fallback Whether to merge the value with the value from
     *                           the fallback locale (e.g. "en" for "en_GB").
     *                           Only applicable if the result is multivalued
     *                           (i.e. array or \ArrayAccess) or cannot be found
     *                           in the requested locale.
     *
     * @return mixed Returns an array or {@link \ArrayAccess} instance for
     *               complex data and a scalar value for simple data.
     *
     * @throws MissingResourceException If the indices cannot be accessed
     */
    public function readEntry($path, $locale, array $indices, $fallback = true);
}


text:
LOG -- Logs a message.

LOG logs a message with a timestamp, the current process ID and a file
position.

## Usage
```sh
void LOG(string log_level, string message...)
```


text:
% Copyright (c) 2015-present, Facebook, Inc.
% All rights reserved.
%
% This source code is licensed under the BSD-style license found in the
% LICENSE file in the root directory of this source tree. An additional grant
% of patent rights can be found in the PATENTS file in the same directory.

batch_size = 32;
nhops = 3;
nepochs = 60;
lrate_decay_step = 15;

rp = randperm(size(questions,2));
train_range = rp(1:floor(0.9 * size(questions,2)));
val_range = rp((floor(0.9 * size(questions,2))+1):size(questions,2));
enable_time = true;
use_bow = false;
share_type = 1;
randomize_time = 0.1;
add_proj = false;
add_nonlin = false;

config = {};
config.init_lrate = 0.01;
config.max_grad_norm = 40;
config.input_dim = 50;
config.out_dim = 50;

linear_start = true;
if linear_start
    ls_nepochs = 30;
    ls_lrate_decay_step = 31;
    ls_init_lrate = 0.01/2;
    config.init_lrate = 0.01/2;
end

config.sz = min(50, size(story,2));
config.voc_sz = length(dict);
config.bsz = batch_size;
config.max_words = size(story,1);
if enable_time
   config.voc_sz = config.voc_sz + config.sz;
   config.max_words = config.max_words + 1; % +1 for time words
end


text:
import {Component, Input, OnInit} from '@angular/core';
import {GameReference} from "../../../../../models/dto/game-reference";
import {TranslatorService} from "../../../../../services/translator.service";
import {GameRecordPersonalised} from "../../../../../models/game-record-personalised";
import {GameApiService} from "../../../../../services/game-api.service";
import {Summoner} from "../../../../../models/dto/summoner";
import {Subscription} from "rxjs/Subscription";
import {ResType} from "../../../../../enums/api-response-type";
import {GameRecord} from "../../../../../models/dto/game-record";
import {ChampionsContainer} from "../../../../../models/dto/containers/champions-container";
import {ItemsContainer} from "../../../../../models/dto/containers/items-container";
import {RatelimitedRequestsService} from "../../../../../services/ratelimited-requests.service";
import {SummonerspellsContainer} from "../../../../../models/dto/containers/summonerspells-container";

@Component({
  selector: 'player-game-preview',
  templateUrl: './player-game-preview.component.html',
  styleUrls: ['./player-game-preview.component.scss']
})
export class PlayerGamePreviewComponent implements OnInit {

  @Input() auto_start_loading_details = false;
  @Input() game_preview: GameReference;
  @Input() summoner: Summoner;
  @Input() champions: ChampionsContainer;
  @Input() items: ItemsContainer;
  @Input() summonerspells: SummonerspellsContainer;
  private details_toggled = false;
  private ongoing_request: Subscription = null;
  private load_error = "";
  private gettext: Function;

  constructor(private translator: TranslatorService,
              private game_api: GameApiService,
              private ratelimitedRequests: RatelimitedRequestsService) {
    this.gettext = this.translator.getTranslation;
  }

  private onClickToggleDetails() {
    this.details_toggled = !this.details_toggled;
  }

  private onClickLoadDetails() {
    if (this.ongoing_request) {
      return;
    }
    this.load_error = "";
    let region = this.summoner.region;
    let game_id = this.game_preview.game_id;
    this.ongoing_request = this.ratelimitedRequests.buffer(() => {return this.game_api.getHistoricalGame(region, game_id)})
      .subscribe(api_res => {
        switch (api_res.type) {
          case ResType.SUCCESS:
            this.game_preview.game_details = new GameRecordPersonalised(
              (<GameRecord> api_res.data).raw_origin,
              this.summoner,
              this.champions,
              this.items,
              this.summonerspells
            );
            break;

          default:
            this.load_error = api_res.error;
            this.ongoing_request = null;
            break;
        }
      });
  }

  private getTimeAgoAsString(date: Date) {
    let time_difference_ms = new Date().getTime() - date.getTime(); // now - then
    let local_yesterday_begin = ((new Date()).getHours() + 24) * 1000 * 60 * 60; // (Hours today + 24 hours) earlier

    if (time_difference_ms < 1000*60*60*24) {
      // Less-than-day ago
      let full_hours_ago = Math.floor(time_difference_ms / (1000*60*60));
      if (full_hours_ago == 0) {
        // Count minutes instead
        let full_minutes_ago = Math.floor(time_difference_ms / (1000*60));
        if (full_minutes_ago == 0) {
          return `${this.gettext("just_now")}`;
        }
        if (full_minutes_ago == 1) {
          return `1 ${this.gettext("minute_ago")}`;
        }
        // Else
        return `${full_minutes_ago} ${this.gettext("n_minutes_ago")}`;
      }
      if (full_hours_ago == 1) {
        return `1  ${this.gettext("hour_ago")}`;
      }
      // Else
      return `${full_hours_ago} ${this.gettext("n_hours_ago")}`;

    } else if (time_difference_ms < local_yesterday_begin) {
      // Since (local-/browsertime) "yesterday" began
      return this.gettext("yesterday");

    } else {
      // DD. MM. YYYY
      return ("0"+date.getDate()).slice(-2) + '.' + ("0"+(date.getMonth()+1)).slice(-2) + '.' + date.getFullYear();
    }
  }

  ngOnInit() {
    if (this.auto_start_loading_details) {
      let region = this.summoner.region;
      let game_id = this.game_preview.game_id;
      this.ongoing_request = this.ratelimitedRequests.buffer(() => {return this.game_api.getHistoricalGame(region, game_id)})
        .subscribe(api_res => {
          switch (api_res.type) {
            case ResType.SUCCESS:
              this.game_preview.game_details = new GameRecordPersonalised(
                (<GameRecord> api_res.data).raw_origin,
                this.summoner,
                this.champions,
                this.items,
                this.summonerspells
              );
              break;

            case ResType.TRY_LATER:
              this.load_error = "Try again in " + api_res.wait + " seconds.";
              this.ongoing_request = null;
              break;

            default:
              this.load_error = api_res.error;
              this.ongoing_request = null;
              break;
          }
        });
    }
  }

}


text:
#include "third_party/android_prediction/suggest/core/dictionary/digraph_utils.h"

#include <cstdlib>

#include "third_party/android_prediction/defines.h"
#include "third_party/android_prediction/suggest/core/policy/dictionary_header_structure_policy.h"
#include "third_party/android_prediction/utils/char_utils.h"

namespace latinime {

const DigraphUtils::digraph_t DigraphUtils::GERMAN_UMLAUT_DIGRAPHS[] =
        { { 'a', 'e', 0x00E4 }, // U+00E4 : LATIN SMALL LETTER A WITH DIAERESIS
        { 'o', 'e', 0x00F6 },   // U+00F6 : LATIN SMALL LETTER O WITH DIAERESIS
        { 'u', 'e', 0x00FC } }; // U+00FC : LATIN SMALL LETTER U WITH DIAERESIS
const DigraphUtils::DigraphType DigraphUtils::USED_DIGRAPH_TYPES[] =
        { DIGRAPH_TYPE_GERMAN_UMLAUT };

/* static */ bool DigraphUtils::hasDigraphForCodePoint(
        const DictionaryHeaderStructurePolicy *const headerPolicy,
        const int compositeGlyphCodePoint) {
    const DigraphUtils::DigraphType digraphType = getDigraphTypeForDictionary(headerPolicy);
    if (DigraphUtils::getDigraphForDigraphTypeAndCodePoint(digraphType, compositeGlyphCodePoint)) {
        return true;
    }
    return false;
}

// Returns the digraph type associated with the given dictionary.
/* static */ DigraphUtils::DigraphType DigraphUtils::getDigraphTypeForDictionary(
        const DictionaryHeaderStructurePolicy *const headerPolicy) {
    if (headerPolicy->requiresGermanUmlautProcessing()) {
        return DIGRAPH_TYPE_GERMAN_UMLAUT;
    }
    return DIGRAPH_TYPE_NONE;
}

// Returns the digraph codepoint for the given composite glyph codepoint and digraph codepoint index
// (which specifies the first or second codepoint in the digraph).
/* static */ int DigraphUtils::getDigraphCodePointForIndex(const int compositeGlyphCodePoint,
        const DigraphCodePointIndex digraphCodePointIndex) {
    if (digraphCodePointIndex == NOT_A_DIGRAPH_INDEX) {
        return NOT_A_CODE_POINT;
    }
    const DigraphUtils::digraph_t *const digraph =
            DigraphUtils::getDigraphForCodePoint(compositeGlyphCodePoint);
    if (!digraph) {
        return NOT_A_CODE_POINT;
    }
    if (digraphCodePointIndex == FIRST_DIGRAPH_CODEPOINT) {
        return digraph->first;
    } else if (digraphCodePointIndex == SECOND_DIGRAPH_CODEPOINT) {
        return digraph->second;
    }
    ASSERT(false);
    return NOT_A_CODE_POINT;
}

// Retrieves the set of all digraphs associated with the given digraph type.
// Returns the size of the digraph array, or 0 if none exist.
/* static */ int DigraphUtils::getAllDigraphsForDigraphTypeAndReturnSize(
        const DigraphUtils::DigraphType digraphType,
        const DigraphUtils::digraph_t **const digraphs) {
    if (digraphType == DigraphUtils::DIGRAPH_TYPE_GERMAN_UMLAUT) {
        *digraphs = GERMAN_UMLAUT_DIGRAPHS;
        return NELEMS(GERMAN_UMLAUT_DIGRAPHS);
    }
    return 0;
}

/**
 * Returns the digraph for the input composite glyph codepoint, or nullptr if none exists.
 * compositeGlyphCodePoint: the method returns the digraph corresponding to this codepoint.
 */
/* static */ const DigraphUtils::digraph_t *DigraphUtils::getDigraphForCodePoint(
        const int compositeGlyphCodePoint) {
    for (size_t i = 0; i < NELEMS(USED_DIGRAPH_TYPES); i++) {
        const DigraphUtils::digraph_t *const digraph = getDigraphForDigraphTypeAndCodePoint(
                USED_DIGRAPH_TYPES[i], compositeGlyphCodePoint);
        if (digraph) {
            return digraph;
        }
    }
    return nullptr;
}

/**
 * Returns the digraph for the input composite glyph codepoint, or nullptr if none exists.
 * digraphType: the type of digraphs supported.
 * compositeGlyphCodePoint: the method returns the digraph corresponding to this codepoint.
 */
/* static */ const DigraphUtils::digraph_t *DigraphUtils::getDigraphForDigraphTypeAndCodePoint(
        const DigraphUtils::DigraphType digraphType, const int compositeGlyphCodePoint) {
    const DigraphUtils::digraph_t *digraphs = nullptr;
    const int compositeGlyphLowerCodePoint = CharUtils::toLowerCase(compositeGlyphCodePoint);
    const int digraphsSize =
            DigraphUtils::getAllDigraphsForDigraphTypeAndReturnSize(digraphType, &digraphs);
    for (int i = 0; i < digraphsSize; i++) {
        if (digraphs[i].compositeGlyph == compositeGlyphLowerCodePoint) {
            return &digraphs[i];
        }
    }
    return nullptr;
}

} // namespace latinime


text:
Holds a counted reference to a [`Napi::Value`](value.md) object; initially a weak reference unless otherwise specified, may be changed to/from a strong reference by adjusting the refcount.

The referenced `Napi::Value` is not immediately destroyed when the reference count is zero; it is merely then eligible for garbage-collection if there are no other references to the `Napi::Value`.

`Napi::Reference` objects allocated in static space, such as a global static instance, must call the `SuppressDestruct` method to prevent its destructor, running at program shutdown time, from attempting to reset the reference when the environment is no longer valid.

The following classes inherit, either directly or indirectly, from `Napi::Reference`:

* [`Napi::ObjectWrap`](object_wrap.md)
* [`Napi::ObjectReference`](object_reference.md)
* [`Napi::FunctionReference`](function_reference.md)

## Methods

### Factory Method

```cpp
static Napi::Reference<T> Napi::Reference::New(const T& value, uint32_t initialRefcount = 0);
```

* `[in] value`: The value which is to be referenced.

* `[in] initialRefcount`: The initial reference count.

### Empty Constructor

```cpp
Napi::Reference::Reference();
```

Creates a new _empty_ `Napi::Reference` instance.

### Constructor

```cpp
Napi::Reference::Reference(napi_env env, napi_value value);
```

* `[in] env`: The `napi_env` environment in which to construct the `Napi::Reference` object.

* `[in] value`: The N-API primitive value to be held by the `Napi::Reference`.

### Env

```cpp
Napi::Env Napi::Reference::Env() const;
```

Returns the `Napi::Env` value in which the `Napi::Reference` was instantiated.

### IsEmpty

```cpp
bool Napi::Reference::IsEmpty() const;
```

Determines whether the value held by the `Napi::Reference` is empty.

### Value

```cpp
T Napi::Reference::Value() const;
```

Returns the value held by the `Napi::Reference`.

### Ref

```cpp
uint32_t Napi::Reference::Ref();
```

Increments the reference count for the `Napi::Reference` and returns the resulting reference count. Throws an error if the increment fails.

### Unref

```cpp
uint32_t Napi::Reference::Unref();
```

Decrements the reference count for the `Napi::Reference` and returns the resulting reference count. Throws an error if the decrement fails.

### Reset (Empty)

```cpp
void Napi::Reference::Reset();
```

Sets the value held by the `Napi::Reference` to be empty.

### Reset

```cpp
void Napi::Reference::Reset(const T& value, uint32_t refcount = 0);
```

* `[in] value`: The value which is to be referenced.

* `[in] initialRefcount`: The initial reference count.

Sets the value held by the `Napi::Reference`.

### SuppressDestruct

```cpp
void Napi::Reference::SuppressDestruct();
```

Call this method on a `Napi::Reference` that is declared as static data to prevent its destructor, running at program shutdown time, from attempting to reset the reference when the environment is no longer valid.


text:
"""StatsOptions to configure stats aggregation options for `tf.data` pipelines.

"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from tensorflow.python.data.experimental.ops import stats_aggregator
from tensorflow.python.data.util import options
from tensorflow.python.util.tf_export import tf_export

@tf_export("data.experimental.StatsOptions")
class StatsOptions(options.OptionsBase):
  """Represents options for collecting dataset stats using `StatsAggregator`.

  To apply `StatsOptions` with a `tf.data.Dataset` object, use the following
  pattern:

  ```python
  aggretator = tf.data.experimental.StatsAggregator()

  options = dataset_ops.Options()
  options.experimental_stats = tf.data.experimental.StatsOptions()
  options.experimental_stats.aggregator = aggregator
  dataset = dataset.with_options(options)

  iterator = dataset.make_one_shot_iterator()
  ```

  Note: a `StatsAggregator` object can be attached either duing construction or
  can be provided later like in above example.

  ```python
  aggretator = tf.data.experimental.StatsAggregator()
  # attach aggregator during construction
  options.experimental_stats = tf.data.experimental.StatsOptions(aggregator)
  .....
  ```
  """

  aggregator = options.create_option(
      name="aggregator",
      ty=stats_aggregator.StatsAggregator,
      docstring=
      "Associates the given statistics aggregator with the dataset pipeline.")

  prefix = options.create_option(
      name="prefix",
      ty=str,
      docstring=
      "Prefix to prepend all statistics recorded for the input `dataset` with.",
      default="")

  counter_prefix = options.create_option(
      name="counter_prefix",
      ty=str,
      docstring=
      "Prefix for the statistics recorded as counter.",
      default="")

  latency_all_edges = options.create_option(
      name="latency_all_edges",
      ty=bool,
      docstring=
      "Whether to add latency measurements on all edges.",
      default=True)


text:
require 'active_support/all'
require "httparty"

@website    = "https://<YOUR_SITE>.upguard.org"
@api_key    = <YOUR_API_KEY>
@secret_key = <YOUR_SECRET_KEY>
@headers    = { "Authorization" => "Token token=\"#{@api_key}#{@secret_key}\"" }

def get_operating_system_ids
  osfs = HTTParty.get("#{@website}/api/v2/operating_system_families.json", :headers => @headers)
  oss  = HTTParty.get("#{@website}/api/v2/operating_systems.json",         :headers => @headers)

  osfs.each do |osf|
    # Get OS for family
    oss.select { |os| os["operating_system_family_id"] == osf["id"] }.each do |os|
      puts "OSF ID: #{osf["id"]}, OS ID: #{os["id"]} - #{os["description"]}"
    end
    puts ""
  end
end

get_operating_system_ids


text:
require_relative "./doc_store/version"
require 'redis'

module DocStore
  class StoreError < StandardError
  end

  class RecordNotFound < StandardError
  end

  class File
    attr_accessor :id, :email, :filename, :format, :service_id

    def initialize(hsh = {})
      @id = hsh[:id] || hsh['id']
      @email = hsh[:email] || hsh['email']
      @service_id = hsh[:service_id] || hsh['service_id']
      @format = hsh[:format] || hsh['format']
      @filename = hsh[:filename] || hsh['filename']
    end

    def to_h
      {id: id, email: email, filename: filename, format: format,
        service_id: service_id}
    end

    def destroy
      store.destroy(id)
      store.destroy(id + "_data")
    end

    def expire(delay = 1)
      store.expire(id, delay)
      store.expire(id + "_data", delay)
    end

    def save
      store.set(id, self.to_h.to_json)
    end

    def save_file(data)
      store.set(id + "_data", data.read)
    end

    def file
      store.get(id + "_data")
    end

    def self.load(l_id)
      string = DocStore::Store.new.get(l_id)
      if string.nil?
        raise DocStore::RecordNotFound, "#{l_id} file was not found"
      else
        DocStore::File.new(JSON.parse(string))
      end
    end

    private
    def store
      @store ||= DocStore::Store.new
    end
  end

  class Store
    attr_reader :store

    def initialize
      @store = Redis.new host: redis_host,
                         port: redis_port
      @store = Redis.new url: ENV['DOCSTORE_REDIS_URL'] if ENV['DOCSTORE_REDIS_URL']
    end

    def set(id, data)
      store.set(id, data) == "OK" ? true : false
    end

    def get(id)
      if store.exists(id)
        store.get(id)
      else
        nil
      end
    end

    def destroy(id)
      return true if store.del(id) == 1
      return false
    end

    def expire(id, delay = 1)
      store.expire(id, delay)
    end

    private

    def redis_host
      ENV['REDIS_HOST'] || 'localhost'
    end

    def redis_port
      ENV['REDIS_PORT'] || 6379
    end
  end
end


text:
package org.rabix.common.helper;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang3.ClassUtils;
import org.apache.commons.lang3.StringUtils;

import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.BigIntegerNode;
import com.fasterxml.jackson.databind.node.BinaryNode;
import com.fasterxml.jackson.databind.node.BooleanNode;
import com.fasterxml.jackson.databind.node.DecimalNode;
import com.fasterxml.jackson.databind.node.DoubleNode;
import com.fasterxml.jackson.databind.node.IntNode;
import com.fasterxml.jackson.databind.node.LongNode;
import com.fasterxml.jackson.databind.node.MissingNode;
import com.fasterxml.jackson.databind.node.NullNode;
import com.fasterxml.jackson.databind.node.NumericNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.fasterxml.jackson.databind.node.POJONode;
import com.fasterxml.jackson.databind.node.TextNode;
import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;

public class JSONHelper {

  public static final ObjectMapper mapperYaml = new YAMLMapper();
  public static final ObjectMapper mapper = new ObjectMapper();
  public static final ObjectMapper mapperWithoutNulls = new ObjectMapper();
  public static final ObjectMapper mapperWithoutIdentation = new ObjectMapper();

  static {
    mapper.enable(SerializationFeature.INDENT_OUTPUT);
    mapper.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);
    mapperWithoutNulls.enable(SerializationFeature.INDENT_OUTPUT);
    mapperWithoutNulls.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false).setSerializationInclusion(Include.NON_NULL).configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);
    mapperWithoutIdentation.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);
  }

  @SuppressWarnings("unchecked")
  public static Map<String, Object> readMap(String json) {
    return readObject(json, (Class<Map<String, Object>>) (Class<?>) Map.class);
  }

  @SuppressWarnings("unchecked")
  public static Map<String, Object> readMap(JsonNode node) {
    return readObject(node, (Class<Map<String, Object>>) (Class<?>) Map.class);
  }

  @SuppressWarnings("unchecked")
  public static <T> Map<String, T> readMap(String json, Class<T> valueClass) {
    Map<String, Object> untypedMap = readMap(json);
    if (String.class.equals(valueClass) || List.class.equals(valueClass) || valueClass.isPrimitive() || ClassUtils.wrapperToPrimitive(valueClass) != null) {
      return (Map<String, T>) untypedMap;
    }
    Map<String, Map<String, Object>> mapOfMaps = (Map<String, Map<String, Object>>) (Map<?, ?>) untypedMap;
    Map<String, T> typedMap = new HashMap<String, T>();
    for (Map.Entry<String, Map<String, Object>> entry : mapOfMaps.entrySet()) {
      T converted = null;
      if (entry.getValue() != null) {
        if (valueClass.isInstance(entry.getValue())) {
          converted = (T) entry.getValue();
        } else {
          converted = JSONHelper.convertToObject(entry.getValue(), valueClass);
        }
      }
      typedMap.put(entry.getKey(), converted);
    }
    return typedMap;
  }

  public static <T> Map<String, T> readMap(JsonNode node, Class<T> valueClass) {
    return readMap(writeObject(node), valueClass);
  }

  public static <T> T readObject(String json, Class<T> clazz) {
    if (json == null) {
      return null;
    }
    JsonNode node = readJsonNode(json);
    return readObject(node, clazz);
  }

  public static <T> T readObject(String json, TypeReference<T> valueTypeRef) {
    try {
      return mapper.readValue(json, valueTypeRef);
    } catch (IOException e) {
      throw new IllegalStateException(e);
    }
  }

  @SuppressWarnings({ "unchecked", "rawtypes" })
  public static <T> T readObject(String json, Class<T> clazz, String... path) {
    Map<String, Object> map = JSONHelper.readMap(json);
    Object ret = map;
    for (int i = 0; i < path.length; i++) {
      ret = ((Map) ret).get(path[i]);
      if (ret == null) {
        break;
      }
    }
    return (T) ret;
  }

  public static <T> T readObject(JsonNode node, Class<T> clazz) {
    try {
      return mapper.treeToValue(node, clazz);
    } catch (IOException e) {
      throw new IllegalStateException(e);
    }
  }

  public static String writeObject(Object value) {
    try {
      return mapper.writeValueAsString(value);
    } catch (IOException e) {
      throw new IllegalStateException(e);
    }
  }

  public static JsonNode readJsonNode(String data) {
    try {
      return mapper.readTree(data);
    } catch (Exception e) {
      try {
        return mapperYaml.readTree(data);
      } catch(Exception e2) {
        Exception rootException = isJson(data)? e : e2;
        throw new IllegalStateException("Can't parse input as either JSON or as YAML. " + getDetailedMessage(rootException), rootException);
      }
    }
  }

  private static boolean isJson(String data) {
    return StringUtils.trim(data).startsWith("{");
  }

  private static String getDetailedMessage(Exception e) {
    String message = e.getMessage();
    if (e instanceof JsonProcessingException) {
      JsonProcessingException jpe = (JsonProcessingException) e;
      message = jpe.getOriginalMessage() + ". Line: " + jpe.getLocation().getLineNr() + ", column: " + jpe.getLocation().getColumnNr();
    }
    return message;
  }

  public static JsonNode convertToJsonNode(Object value) {
    if (value == null) {
      return null;
    }
    return mapper.valueToTree(value);
  }

  public static <T> T convertToObject(Map<String, ?> jsonObject, Class<T> clazz) {
    if (jsonObject == null) {
      return null;
    }
    JsonNode node = JSONHelper.convertToJsonNode(jsonObject);
    return JSONHelper.readObject(node, clazz);
  }

  @SuppressWarnings("unchecked")
  public static <T> Map<String, T> convertToMap(Object value) {
    if (value == null) {
      return null;
    }
    JsonNode node = JSONHelper.convertToJsonNode(value);
    return readObject(node, Map.class);
  }

  @SuppressWarnings("unchecked")
  public static <T> List<T> convertToList(Object value) {
    if (value == null) {
      return null;
    }
    JsonNode node = JSONHelper.convertToJsonNode(value);
    return readObject(node, List.class);
  }

  public static String writeSortedWithoutIdentation(final JsonNode node) {
    try {
      final Object obj = mapperWithoutIdentation.treeToValue(node, Object.class);
      return mapperWithoutIdentation.writeValueAsString(obj);
    } catch (IOException e) {
      throw new IllegalStateException(e);
    }
  }

  /**
   * Use Jackson for transformation
   */
  public static Object transform(JsonNode node, boolean skipNull) {
    if (node instanceof NullNode) {
      return null;
    }
    if (node instanceof MissingNode) {
      return null;
    }
    if (node instanceof IntNode) {
      return ((IntNode) node).intValue();
    }
    if (node instanceof BigIntegerNode) {
      return ((BigIntegerNode) node).bigIntegerValue();
    }
    if (node instanceof BinaryNode) {
      return ((BinaryNode) node).binaryValue();
    }
    if (node instanceof BooleanNode) {
      return ((BooleanNode) node).booleanValue();
    }
    if (node instanceof DecimalNode) {
      return ((DecimalNode) node).decimalValue();
    }
    if (node instanceof DoubleNode) {
      return ((DoubleNode) node).doubleValue();
    }
    if (node instanceof LongNode) {
      return ((LongNode) node).longValue();
    }
    if (node instanceof NumericNode) {
      return ((NumericNode) node).numberValue();
    }
    if (node instanceof POJONode) {
      return ((POJONode) node).getPojo();
    }
    if (node instanceof TextNode) {
      return ((TextNode) node).textValue();
    }
    if (node instanceof ArrayNode) {
      List<Object> resultList = new ArrayList<>();
      for (JsonNode subnode : node) {
        Object result = transform(subnode, skipNull);
        if (!skipNull || result != null) {
          resultList.add(result);
        }
      }
      return resultList;
    }
    if (node instanceof ObjectNode) {
      Map<String, Object> resultMap = new HashMap<String, Object>();
      Iterator<Map.Entry<String, JsonNode>> iterator = node.fields();

      while (iterator.hasNext()) {
        Map.Entry<String, JsonNode> subnodeEntry = iterator.next();
        Object result = transform(subnodeEntry.getValue(), skipNull);
        if (!skipNull || result != null) {
          resultMap.put(subnodeEntry.getKey(), result);
        }
      }
      return resultMap;
    }
    return null;
  }

}


text:
TableViewCell classes for adding inline UIDatePicker and UIPickerView elements into a UITableView.

 * Inline Entry for Dates and Pickers
 * Handles expand and contract
 * Simple API
 * Customisable

## Attribution

This is a C# port based on the original Objective-C project created by [Danis Ziganshin](https://github.com/zigdanis/PickerCells)


text:
@class MMImageViewer;

@interface MMDeviceTableViewCell : MMTableViewCell

@property (nonatomic, strong) IBOutlet UILabel *nameLabel;
@property (nonatomic, strong) IBOutlet UILabel *statusLabel;
@property (strong, nonatomic) IBOutlet MMImageViewer *play_statusView;

@property (strong, nonatomic) IBOutlet MMImageViewer *snapImageView;

//@property (nonatomic,strong) NSString *uid;
//@property (atomic,strong) ubiaDevice *device;
//@property (nonatomic, assign) int deviceStatus;

@end


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Bot. Ztg. 20: 305 (1862)

#### Original name
Calyptromyces racemosus P. Karst.

### Remarks
null


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

namespace CASCExplorer
{
    [Flags]
    public enum LocaleFlags : uint
    {
        All = 0xFFFFFFFF,
        None = 0,
        //Unk_1 = 0x1,
        enUS = 0x2,
        koKR = 0x4,
        //Unk_8 = 0x8,
        frFR = 0x10,
        deDE = 0x20,
        zhCN = 0x40,
        esES = 0x80,
        zhTW = 0x100,
        enGB = 0x200,
        enCN = 0x400,
        enTW = 0x800,
        esMX = 0x1000,
        ruRU = 0x2000,
        ptBR = 0x4000,
        itIT = 0x8000,
        ptPT = 0x10000,
        enSG = 0x20000000, // custom
        plPL = 0x40000000, // custom
        All_WoW = enUS | koKR | frFR | deDE | zhCN | esES | zhTW | enGB | esMX | ruRU | ptBR | itIT | ptPT
    }

    [Flags]
    public enum ContentFlags : uint
    {
        None = 0,
        F00000001 = 0x1,
        F00000002 = 0x2,
        F00000004 = 0x4,
        LowViolence = 0x80, // many models have this flag
        F10000000 = 0x10000000,
        F20000000 = 0x20000000, // added in 21737
        Bundle = 0x40000000,
        NoCompression = 0x80000000 // sounds have this flag
    }

    public unsafe struct MD5Hash
    {
        public fixed byte Value[16];
    }

    public struct RootEntry
    {
        public MD5Hash MD5;
        public ContentFlags ContentFlags;
        public LocaleFlags LocaleFlags;
    }

    public class WowRootHandler : RootHandlerBase
    {
        private MultiDictionary<ulong, RootEntry> RootData = new MultiDictionary<ulong, RootEntry>();
        private Dictionary<int, ulong> FileDataStore = new Dictionary<int, ulong>();
        private Dictionary<ulong, int> FileDataStoreReverse = new Dictionary<ulong, int>();

        public override int Count => RootData.Count;
        public override int CountTotal => RootData.Sum(re => re.Value.Count);

        public WowRootHandler(BinaryReader stream, BackgroundWorkerEx worker)
        {
            worker?.ReportProgress(0, "Loading \"root\"...");

            while (stream.BaseStream.Position < stream.BaseStream.Length)
            {
                int count = stream.ReadInt32();

                ContentFlags contentFlags = (ContentFlags)stream.ReadUInt32();
                LocaleFlags localeFlags = (LocaleFlags)stream.ReadUInt32();

                if (localeFlags == LocaleFlags.None)
                    throw new Exception("block.LocaleFlags == LocaleFlags.None");

                if (contentFlags != ContentFlags.None && (contentFlags & (ContentFlags.LowViolence | ContentFlags.NoCompression | ContentFlags.F20000000)) == 0)
                    throw new Exception("block.ContentFlags != ContentFlags.None");

                RootEntry[] entries = new RootEntry[count];
                int[] filedataIds = new int[count];

                int fileDataIndex = 0;

                for (var i = 0; i < count; ++i)
                {
                    entries[i].LocaleFlags = localeFlags;
                    entries[i].ContentFlags = contentFlags;

                    filedataIds[i] = fileDataIndex + stream.ReadInt32();
                    fileDataIndex = filedataIds[i] + 1;
                }

                //Console.WriteLine("Block: {0} {1} (size {2})", block.ContentFlags, block.LocaleFlags, count);

                for (var i = 0; i < count; ++i)
                {
                    entries[i].MD5 = stream.Read<MD5Hash>();

                    ulong hash = stream.ReadUInt64();

                    RootData.Add(hash, entries[i]);

                    //Console.WriteLine("File: {0:X8} {1:X16} {2}", entries[i].FileDataId, hash, entries[i].MD5.ToHexString());

                    ulong hash2;

                    int fileDataId = filedataIds[i];

                    if (FileDataStore.TryGetValue(fileDataId, out hash2))
                    {
                        if (hash2 == hash)
                        {
                            // duplicate, skipping
                            continue;
                        }
                        else
                        {
                            Logger.WriteLine("ERROR: got miltiple hashes for filedataid {0}", fileDataId);
                            continue;
                        }
                    }

                    FileDataStore.Add(fileDataId, hash);
                    FileDataStoreReverse.Add(hash, fileDataId);
                }

                worker?.ReportProgress((int)(stream.BaseStream.Position / (float)stream.BaseStream.Length * 100));
            }
        }

        public IEnumerable<RootEntry> GetAllEntriesByFileDataId(int fileDataId) => GetAllEntries(GetHashByFileDataId(fileDataId));

        public override IEnumerable<KeyValuePair<ulong, RootEntry>> GetAllEntries()
        {
            foreach (var set in RootData)
                foreach (var entry in set.Value)
                    yield return new KeyValuePair<ulong, RootEntry>(set.Key, entry);
        }

        public override IEnumerable<RootEntry> GetAllEntries(ulong hash)
        {
            List<RootEntry> result;
            RootData.TryGetValue(hash, out result);

            if (result == null)
                yield break;

            foreach (var entry in result)
                yield return entry;
        }

        public IEnumerable<RootEntry> GetEntriesByFileDataId(int fileDataId) => GetEntries(GetHashByFileDataId(fileDataId));

        // Returns only entries that match current locale and content flags
        public override IEnumerable<RootEntry> GetEntries(ulong hash)
        {
            var rootInfos = GetAllEntries(hash);

            if (!rootInfos.Any())
                yield break;

            var rootInfosLocale = rootInfos.Where(re => (re.LocaleFlags & Locale) != 0);

            if (rootInfosLocale.Count() > 1)
            {
                var rootInfosLocaleAndContent = rootInfosLocale.Where(re => (re.ContentFlags == Content));

                if (rootInfosLocaleAndContent.Any())
                    rootInfosLocale = rootInfosLocaleAndContent;
            }

            foreach (var entry in rootInfosLocale)
                yield return entry;
        }

        public ulong GetHashByFileDataId(int fileDataId)
        {
            ulong hash;
            FileDataStore.TryGetValue(fileDataId, out hash);
            return hash;
        }

        public int GetFileDataIdByHash(ulong hash)
        {
            int fid;
            FileDataStoreReverse.TryGetValue(hash, out fid);
            return fid;
        }

        public int GetFileDataIdByName(string name) => GetFileDataIdByHash(Hasher.ComputeHash(name));

        private bool LoadPreHashedListFile(string pathbin, string pathtext, BackgroundWorkerEx worker = null)
        {
            using (var _ = new PerfCounter("WowRootHandler::LoadPreHashedListFile()"))
            {
                worker?.ReportProgress(0, "Loading \"listfile\"...");

                if (!File.Exists(pathbin))
                    return false;

                var timebin = File.GetLastWriteTime(pathbin);
                var timetext = File.GetLastWriteTime(pathtext);

                if (timebin != timetext) // text has been modified, recreate crehashed file
                    return false;

                Logger.WriteLine("WowRootHandler: loading file names...");

                using (var fs = new FileStream(pathbin, FileMode.Open))
                using (var br = new BinaryReader(fs))
                {
                    int numFolders = br.ReadInt32();

                    for (int i = 0; i < numFolders; i++)
                    {
                        string dirName = br.ReadString();

                        //Logger.WriteLine(dirName);

                        int numFiles = br.ReadInt32();

                        for (int j = 0; j < numFiles; j++)
                        {
                            ulong fileHash = br.ReadUInt64();
                            string fileName = br.ReadString();

                            string fileNameFull = dirName != String.Empty ? dirName + "\\" + fileName : fileName;

                            // skip invalid names
                            if (!RootData.ContainsKey(fileHash))
                            {
                                Logger.WriteLine("Invalid file name: {0}", fileNameFull);
                                continue;
                            }

                            CASCFile.FileNames[fileHash] = fileNameFull;
                        }

                        worker?.ReportProgress((int)(fs.Position / (float)fs.Length * 100));
                    }

                    Logger.WriteLine("WowRootHandler: loaded {0} valid file names", CASCFile.FileNames.Count);
                }
            }

            return true;
        }

        public void LoadFileDataComplete(CASCHandler casc)
        {
            if (!casc.FileExists("DBFilesClient\\FileDataComplete.db2"))
                return;

            Logger.WriteLine("WowRootHandler: loading file names from FileDataComplete.db2...");

            using (var s = casc.OpenFile("DBFilesClient\\FileDataComplete.db2"))
            {
                DB3Reader fd = new DB3Reader(s);

                foreach (var row in fd)
                {
                    string path = row.Value.GetField<string>(4);
                    string name = row.Value.GetField<string>(8);

                    string fullname = path + name;

                    ulong fileHash = Hasher.ComputeHash(fullname);

                    // skip invalid names
                    if (!RootData.ContainsKey(fileHash))
                    {
                        //Logger.WriteLine("Invalid file name: {0}", fullname);
                        continue;
                    }

                    CASCFile.FileNames[fileHash] = fullname;
                }
            }
        }

        public override void LoadListFile(string path, BackgroundWorkerEx worker = null)
        {
            if (LoadPreHashedListFile("listfile.bin", path, worker))
                return;

            using (var _ = new PerfCounter("WowRootHandler::LoadListFile()"))
            {
                worker?.ReportProgress(0, "Loading \"listfile\"...");

                if (!File.Exists(path))
                {
                    Logger.WriteLine("WowRootHandler: list file missing!");
                    return;
                }

                Logger.WriteLine("WowRootHandler: loading file names...");

                Dictionary<string, Dictionary<ulong, string>> dirData = new Dictionary<string, Dictionary<ulong, string>>(StringComparer.OrdinalIgnoreCase);
                dirData[""] = new Dictionary<ulong, string>();

                using (var fs = new FileStream("listfile.bin", FileMode.Create))
                using (var bw = new BinaryWriter(fs))
                using (var sr = new StreamReader(path))
                {
                    string file;

                    while ((file = sr.ReadLine()) != null)
                    {
                        ulong fileHash = Hasher.ComputeHash(file);

                        // skip invalid names
                        if (!RootData.ContainsKey(fileHash))
                        {
                            Logger.WriteLine("Invalid file name: {0}", file);
                            continue;
                        }

                        CASCFile.FileNames[fileHash] = file;

                        int dirSepIndex = file.LastIndexOf('\\');

                        if (dirSepIndex >= 0)
                        {
                            string key = file.Substring(0, dirSepIndex);

                            if (!dirData.ContainsKey(key))
                            {
                                dirData[key] = new Dictionary<ulong, string>();
                            }

                            dirData[key][fileHash] = file.Substring(dirSepIndex + 1);
                        }
                        else
                            dirData[""][fileHash] = file;

                        worker?.ReportProgress((int)(sr.BaseStream.Position / (float)sr.BaseStream.Length * 100));
                    }

                    bw.Write(dirData.Count); // count of dirs

                    foreach (var dir in dirData)
                    {
                        bw.Write(dir.Key); // dir name

                        //Logger.WriteLine(dir.Key);

                        bw.Write(dirData[dir.Key].Count); // count of files in dir

                        foreach (var fh in dirData[dir.Key])
                        {
                            bw.Write(fh.Key); // file name hash
                            bw.Write(fh.Value); // file name (without dir name)
                        }
                    }

                    Logger.WriteLine("WowRootHandler: loaded {0} valid file names", CASCFile.FileNames.Count);
                }

                File.SetLastWriteTime("listfile.bin", File.GetLastWriteTime(path));
            }
        }

        protected override CASCFolder CreateStorageTree()
        {
            var root = new CASCFolder("root");

            // Reset counts
            CountSelect = 0;
            CountUnknown = 0;

            // Create new tree based on specified locale
            foreach (var rootEntry in RootData)
            {
                var rootInfosLocale = rootEntry.Value.Where(re => (re.LocaleFlags & Locale) != 0);

                if (rootInfosLocale.Count() > 1)
                {
                    var rootInfosLocaleAndContent = rootInfosLocale.Where(re => (re.ContentFlags == Content));

                    if (rootInfosLocaleAndContent.Any())
                        rootInfosLocale = rootInfosLocaleAndContent;
                }

                if (!rootInfosLocale.Any())
                    continue;

                string file;

                if (!CASCFile.FileNames.TryGetValue(rootEntry.Key, out file))
                {
                    file = "unknown\\" + rootEntry.Key.ToString("X16") + "_" + GetFileDataIdByHash(rootEntry.Key);

                    CountUnknown++;
                }

                CreateSubTree(root, rootEntry.Key, file);
                CountSelect++;
            }

            Logger.WriteLine("WowRootHandler: {0} file names missing for locale {1}", CountUnknown, Locale);

            return root;
        }

        public bool IsUnknownFile(ulong hash) => !CASCFile.FileNames.ContainsKey(hash);

        public override void Clear()
        {
            RootData.Clear();
            RootData = null;
            FileDataStore.Clear();
            FileDataStore = null;
            FileDataStoreReverse.Clear();
            FileDataStoreReverse = null;
            Root?.Entries.Clear();
            Root = null;
            CASCFile.FileNames.Clear();
        }

        public override void Dump()
        {
            foreach (var fd in RootData.OrderBy(r => GetFileDataIdByHash(r.Key)))
            {
                string name;

                if (!CASCFile.FileNames.TryGetValue(fd.Key, out name))
                    name = fd.Key.ToString("X16");

                Logger.WriteLine("{0:D7} {1:X16} {2} {3}", GetFileDataIdByHash(fd.Key), fd.Key, fd.Value.Aggregate(LocaleFlags.None, (a, b) => a | b.LocaleFlags), name);

                foreach (var entry in fd.Value)
                {
                    Logger.WriteLine("\t{0} - {1} - {2}", entry.MD5.ToHexString(), entry.LocaleFlags, entry.ContentFlags);
                }
            }
        }
    }
}


text:
package frequentflyer.com.entities;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * Created by sasaradovanovic on 10/24/17.
 */
@Entity
@Data
public class Airline {

    @Id
    @GeneratedValue
    @Column(name="AIRLINE_ID")
    private Long id;

    @Column
    private String airlineName;

    @Column(length = 2)
    private String iataCode;

    @Column(length = 3)
    private String icaoCode;

    private String country;

    private String uniqueId;

}


text:
(function() {
    define(function() {
        /**
         * @file implements Screen
         * @author CORSAIR <vladimir.corsair@gmail.com>
         * @version 2.1.4
         */

        /**
         * Initialize screen
         * @param {Object} canvas the html element canvas
         * @returns {Screen}
         */
        var Screen = function(canvas) {
            this.canvas = canvas;
            this.context = this.canvas.getContext('2d');

            //prevent browser context menu
            this.canvas.oncontextmenu = function() {
                return false;
            };

            this.canvas.addEventListener('resize', this.resize.bind(this));
            this.resize();
            this.setCanvasSize(1024, 768);
            return this;
        };

        /**
         * Translate x, y to the canvas coordinates
         * @param {Object} obj holds x and y mouse position
         * @returns {Screen.prototype.translate.obj}
         */
        Screen.prototype.translate = function(obj) {
            obj.x = (obj.x - this.borderLeft - this.boundingRect.left) * this.scaleX;
            obj.y = (obj.y - this.borderTop - this.boundingRect.top) * this.scaleY;
            return obj;
        };

        /**
         * Resize borders and scales on window resize
         * @returns {undefined}
         */
        Screen.prototype.resize = function() {
            this.boundingRect = this.canvas.getBoundingClientRect();
            this.borderLeft = (this.canvas.offsetWidth - this.canvas.clientWidth) >> 1;
            this.borderTop = (this.canvas.offsetHeight - this.canvas.clientHeight) >> 1;
            this.scaleX = this.canvas.width / (this.canvas.offsetWidth - (this.borderLeft << 1));
            this.scaleY = this.canvas.height / (this.canvas.offsetHeight - (this.borderTop << 1));
        };

        /**
         * Check if coordinates xy are in the rectangle
         * @param {type} x mouse x
         * @param {type} y mouse y
         * @returns {Boolean}
         */
        Screen.prototype.innerPoint = function(x, y) {
            if (x >= 0 && y >= 0 && x < this.canvas.offsetWidth - (this.borderLeft << 1) &&
                    y < this.canvas.offsetHeight - (this.borderTop << 1)) {
                return true;
            }
        };

        Screen.prototype.setCanvasSize = function(width, height, aspectRatio) {
            if (aspectRatio === undefined)
                aspectRatio =
                        this.canvas.offsetWidth / this.canvas.offsetHeight;
            if (width === undefined)
                width = aspectRatio * height;
            if (height === undefined)
                height = width / aspectRatio;
            this.canvas.width = width;
            this.canvas.height = height;
            this.scaleX = this.canvas.width / (this.canvas.offsetWidth - (this.borderLeft << 1));
            this.scaleY = this.canvas.height / (this.canvas.offsetHeight - (this.borderTop << 1));
        };

        return Screen;
    });
})();


text:
package expvar

import (
	"bytes"
	"encoding/json"
	"fmt"
	"log"
	"net/http"
	"os"
	"runtime"
	"strconv"
	"sync"
)

// Var is an abstract type for all exported variables.
type Var interface {
	String() string
}

// Int is a 64-bit integer variable that satisfies the Var interface.
type Int struct {
	i  int64
	mu sync.RWMutex
}

func (v *Int) String() string {
	v.mu.RLock()
	defer v.mu.RUnlock()
	return strconv.FormatInt(v.i, 10)
}

func (v *Int) Add(delta int64) {
	v.mu.Lock()
	defer v.mu.Unlock()
	v.i += delta
}

func (v *Int) Set(value int64) {
	v.mu.Lock()
	defer v.mu.Unlock()
	v.i = value
}

// Float is a 64-bit float variable that satisfies the Var interface.
type Float struct {
	f  float64
	mu sync.RWMutex
}

func (v *Float) String() string {
	v.mu.RLock()
	defer v.mu.RUnlock()
	return strconv.FormatFloat(v.f, 'g', -1, 64)
}

// Add adds delta to v.
func (v *Float) Add(delta float64) {
	v.mu.Lock()
	defer v.mu.Unlock()
	v.f += delta
}

// Set sets v to value.
func (v *Float) Set(value float64) {
	v.mu.Lock()
	defer v.mu.Unlock()
	v.f = value
}

// Map is a string-to-Var map variable that satisfies the Var interface.
type Map struct {
	m  map[string]Var
	mu sync.RWMutex
}

// KeyValue represents a single entry in a Map.
type KeyValue struct {
	Key   string
	Value Var
}

func (v *Map) String() string {
	v.mu.RLock()
	defer v.mu.RUnlock()
	var b bytes.Buffer
	fmt.Fprintf(&b, "{")
	first := true
	for key, val := range v.m {
		if !first {
			fmt.Fprintf(&b, ", ")
		}
		fmt.Fprintf(&b, "\"%s\": %v", key, val)
		first = false
	}
	fmt.Fprintf(&b, "}")
	return b.String()
}

func (v *Map) Init() *Map {
	v.m = make(map[string]Var)
	return v
}

func (v *Map) Get(key string) Var {
	v.mu.RLock()
	defer v.mu.RUnlock()
	return v.m[key]
}

func (v *Map) Set(key string, av Var) {
	v.mu.Lock()
	defer v.mu.Unlock()
	v.m[key] = av
}

func (v *Map) Add(key string, delta int64) {
	v.mu.RLock()
	av, ok := v.m[key]
	v.mu.RUnlock()
	if !ok {
		// check again under the write lock
		v.mu.Lock()
		if _, ok = v.m[key]; !ok {
			av = new(Int)
			v.m[key] = av
		}
		v.mu.Unlock()
	}

	// Add to Int; ignore otherwise.
	if iv, ok := av.(*Int); ok {
		iv.Add(delta)
	}
}

// AddFloat adds delta to the *Float value stored under the given map key.
func (v *Map) AddFloat(key string, delta float64) {
	v.mu.RLock()
	av, ok := v.m[key]
	v.mu.RUnlock()
	if !ok {
		// check again under the write lock
		v.mu.Lock()
		if _, ok = v.m[key]; !ok {
			av = new(Float)
			v.m[key] = av
		}
		v.mu.Unlock()
	}

	// Add to Float; ignore otherwise.
	if iv, ok := av.(*Float); ok {
		iv.Add(delta)
	}
}

// Do calls f for each entry in the map.
// The map is locked during the iteration,
// but existing entries may be concurrently updated.
func (v *Map) Do(f func(KeyValue)) {
	v.mu.RLock()
	defer v.mu.RUnlock()
	for k, v := range v.m {
		f(KeyValue{k, v})
	}
}

// String is a string variable, and satisfies the Var interface.
type String struct {
	s  string
	mu sync.RWMutex
}

func (v *String) String() string {
	v.mu.RLock()
	defer v.mu.RUnlock()
	return strconv.Quote(v.s)
}

func (v *String) Set(value string) {
	v.mu.Lock()
	defer v.mu.Unlock()
	v.s = value
}

// Func implements Var by calling the function
// and formatting the returned value using JSON.
type Func func() interface{}

func (f Func) String() string {
	v, _ := json.Marshal(f())
	return string(v)
}

// All published variables.
var (
	mutex sync.RWMutex
	vars  map[string]Var = make(map[string]Var)
)

// Publish declares a named exported variable. This should be called from a
// package's init function when it creates its Vars. If the name is already
// registered then this will log.Panic.
func Publish(name string, v Var) {
	mutex.Lock()
	defer mutex.Unlock()
	if _, existing := vars[name]; existing {
		log.Panicln("Reuse of exported var name:", name)
	}
	vars[name] = v
}

// Get retrieves a named exported variable.
func Get(name string) Var {
	mutex.RLock()
	defer mutex.RUnlock()
	return vars[name]
}

// Convenience functions for creating new exported variables.

func NewInt(name string) *Int {
	v := new(Int)
	Publish(name, v)
	return v
}

func NewFloat(name string) *Float {
	v := new(Float)
	Publish(name, v)
	return v
}

func NewMap(name string) *Map {
	v := new(Map).Init()
	Publish(name, v)
	return v
}

func NewString(name string) *String {
	v := new(String)
	Publish(name, v)
	return v
}

// Do calls f for each exported variable.
// The global variable map is locked during the iteration,
// but existing entries may be concurrently updated.
func Do(f func(KeyValue)) {
	mutex.RLock()
	defer mutex.RUnlock()
	for k, v := range vars {
		f(KeyValue{k, v})
	}
}

func expvarHandler(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("Content-Type", "application/json; charset=utf-8")
	fmt.Fprintf(w, "{\n")
	first := true
	Do(func(kv KeyValue) {
		if !first {
			fmt.Fprintf(w, ",\n")
		}
		first = false
		fmt.Fprintf(w, "%q: %s", kv.Key, kv.Value)
	})
	fmt.Fprintf(w, "\n}\n")
}

func cmdline() interface{} {
	return os.Args
}

func memstats() interface{} {
	stats := new(runtime.MemStats)
	runtime.ReadMemStats(stats)
	return *stats
}

func init() {
	http.HandleFunc("/debug/vars", expvarHandler)
	Publish("cmdline", Func(cmdline))
	Publish("memstats", Func(memstats))
}


text:
namespace GoogleApi.Entities.Search.Video.Videos.Request.Enums;

/// <summary>
/// Video Duration Type.
/// </summary>
public enum VideoDurationType
{
    /// <summary>
    /// Any.
    /// Do not filter video search results based on their duration.
    /// This is the default value.
    /// </summary>
    Any,

    /// <summary>
    /// Short.
    /// Only include videos that are less than four minutes long.
    /// </summary>
    Short,

    /// <summary>
    /// Medium.
    /// Only include videos that are between four and 20 minutes long (inclusive).
    /// </summary>
    Medium,

    /// <summary>
    /// Long.
    /// Only include videos longer than 20 minutes.
    /// </summary>
    Long
}


text:
const cwd = process.cwd();
const fs = require("fs");
const MemoryFileSystem = require("memory-fs");
const tools = require(__dirname+"/../index");
var data = {};

function addFile(pth) {
    return fs.readFileSync(pth).toString("ascii");
}

function addDir(wdo,pth) {
    wdo[""] = true;
    var res = fs.readdirSync(pth);
    for(var n of res) {
        var np = pth.split("/");
        np.push(n);
        np = np.join("/");
        var stat = fs.statSync(np);
        wdo[n] = {};
        if(stat.isFile()) wdo[n] = addFile(np);
        else if(stat.isDirectory()) wdo[n] = addDir(wdo[n],np);
    }
    return wdo;
}

data = addDir(data,cwd);
var opts = {};
opts.auth = 0;
opts.fs = new MemoryFileSystem(data);
var telnetfs = new tools.fs.TelnetFS.Server(opts);