text:
package org.apache.commons.httpclient.cookie;

import junit.framework.TestCase;

import org.apache.commons.httpclient.Cookie;
import org.apache.commons.httpclient.Header;

/**
 * Test cases for Cookie
 *
 * @author Oleg Kalnichevski
 * @version $Revision: 480424 $
 */
public class TestCookieBase extends TestCase {

    // ------------------------------------------------------------ Constructor

    public TestCookieBase(String name) {
        super(name);
    }

    public static Cookie[] cookieParse(
        final CookieSpec parser,
        String host,
        int port,
        String path,
        boolean isSecure,
        Header setHeader)
        throws MalformedCookieException {
        Cookie[] cookies = parser.parse(host, port, path, isSecure, setHeader);
        if (cookies != null) {
            for (int i = 0; i < cookies.length; i++) {
                parser.validate(host, port, path, isSecure, cookies[i]);
            }
        }
        return cookies;
    }
}


text: export const UPDATE_CONNECTIONS = 'UPDATE_CONNECTIONS';

redpajama_set_name: RedPajamaGithub


text:
package com.amazonaws.services.codebuild.model.transform;

import java.util.List;
import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.services.codebuild.model.*;

import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;

/**
 * BuildSummaryMarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class BuildSummaryMarshaller {

    private static final MarshallingInfo<String> ARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("arn").build();
    private static final MarshallingInfo<java.util.Date> REQUESTEDON_BINDING = MarshallingInfo.builder(MarshallingType.DATE)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("requestedOn").timestampFormat("unixTimestamp").build();
    private static final MarshallingInfo<String> BUILDSTATUS_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("buildStatus").build();
    private static final MarshallingInfo<StructuredPojo> PRIMARYARTIFACT_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("primaryArtifact").build();
    private static final MarshallingInfo<List> SECONDARYARTIFACTS_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("secondaryArtifacts").build();

    private static final BuildSummaryMarshaller instance = new BuildSummaryMarshaller();

    public static BuildSummaryMarshaller getInstance() {
        return instance;
    }

    /**
     * Marshall the given parameter object.
     */
    public void marshall(BuildSummary buildSummary, ProtocolMarshaller protocolMarshaller) {

        if (buildSummary == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        try {
            protocolMarshaller.marshall(buildSummary.getArn(), ARN_BINDING);
            protocolMarshaller.marshall(buildSummary.getRequestedOn(), REQUESTEDON_BINDING);
            protocolMarshaller.marshall(buildSummary.getBuildStatus(), BUILDSTATUS_BINDING);
            protocolMarshaller.marshall(buildSummary.getPrimaryArtifact(), PRIMARYARTIFACT_BINDING);
            protocolMarshaller.marshall(buildSummary.getSecondaryArtifacts(), SECONDARYARTIFACTS_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}


text:
#include "abstractidsmodel.h"

AbstractIdsModel::AbstractIdsModel(QObject *parent)
    : AbstractTwitterModel(parent)
    , m_count(0)
    , m_page(0)
    , m_stringify_ids(true)
{
    QHash<int, QByteArray> roles;
    roles[id_str_role] = "id_str";
    setRoleNames(roles);
}

AbstractTwitterModel::AuthorizeBy AbstractIdsModel::authenticationMethod() const
{
    return AuthorizeByUrl;
}

QString AbstractIdsModel::httpMethod() const
{
    return "GET";
}

void AbstractIdsModel::parseDone(const QVariant &result)
{
    if (result.type() == QVariant::List) {
        QVariantList array = result.toList();
        foreach (const QVariant &result, array) {
            if (result.type() == QVariant::Int) {
                QVariantMap map;
                map.insert("id", result.toInt());
                map.insert("id_str", result.toString());
                addData(map);
            } else if (result.type() == QVariant::String) {
                QVariantMap map;
                map.insert("id", result.toInt());
                map.insert("id_str", result.toString());
                addData(map);
            } else {
                DEBUG() << result.type() << result;
            }
        }
    } else {
        DEBUG() << result.type() << result;
    }
}


text:
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using EasyParking.Domain;

namespace EasyParking.Migrations
{
    [DbContext(typeof(ParkingDbContext))]
    partial class ParkingDbContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
            modelBuilder
                .HasAnnotation("ProductVersion", "1.1.1")
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

            modelBuilder.Entity("EasyParking.Domain.Entities.Location", b =>
                {
                    b.Property<string>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Address1");

                    b.Property<string>("Address2");

                    b.Property<string>("Address3");

                    b.Property<string>("CityTown");

                    b.Property<string>("Country");

                    b.Property<string>("CreatedBy");

                    b.Property<DateTime>("CreatedDate");

                    b.Property<string>("ModifiedBy");

                    b.Property<DateTime?>("ModifiedDate");

                    b.Property<string>("Name");

                    b.Property<string>("PostalCode");

                    b.Property<string>("StateProvince");

                    b.Property<byte[]>("Version")
                        .IsConcurrencyToken()
                        .ValueGeneratedOnAddOrUpdate();

                    b.HasKey("Id");

                    b.ToTable("Locations");
                });

            modelBuilder.Entity("EasyParking.Domain.Entities.Owner", b =>
                {
                    b.Property<string>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("CompanyName");

                    b.Property<string>("CreatedBy");

                    b.Property<DateTime>("CreatedDate");

                    b.Property<string>("ModifiedBy");

                    b.Property<DateTime?>("ModifiedDate");

                    b.Property<string>("Name");

                    b.Property<string>("PhoneNumber");

                    b.Property<string>("UserId");

                    b.Property<byte[]>("Version")
                        .IsConcurrencyToken()
                        .ValueGeneratedOnAddOrUpdate();

                    b.Property<string>("WebsiteUrl");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("Owners");
                });

            modelBuilder.Entity("EasyParking.Domain.Entities.ParkingArea", b =>
                {
                    b.Property<string>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("CreatedBy");

                    b.Property<DateTime>("CreatedDate");

                    b.Property<string>("LocationId");

                    b.Property<string>("ModifiedBy");

                    b.Property<DateTime?>("ModifiedDate");

                    b.Property<string>("Moniker");

                    b.Property<string>("Name");

                    b.Property<string>("OwnerId");

                    b.Property<byte[]>("Version")
                        .IsConcurrencyToken()
                        .ValueGeneratedOnAddOrUpdate();

                    b.HasKey("Id");

                    b.HasIndex("LocationId");

                    b.HasIndex("OwnerId");

                    b.ToTable("Parkings");
                });

            modelBuilder.Entity("EasyParking.Domain.Entities.ParkingSession", b =>
                {
                    b.Property<string>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("CreatedBy");

                    b.Property<DateTime>("CreatedDate");

                    b.Property<DateTime>("ExitTime");

                    b.Property<string>("ModifiedBy");

                    b.Property<DateTime?>("ModifiedDate");

                    b.Property<string>("Name");

                    b.Property<string>("ParkingId");

                    b.Property<string>("PlaceId");

                    b.Property<DateTime>("StartTime");

                    b.Property<string>("VehicleId");

                    b.Property<byte[]>("Version")
                        .IsConcurrencyToken()
                        .ValueGeneratedOnAddOrUpdate();

                    b.HasKey("Id");

                    b.HasIndex("ParkingId");

                    b.HasIndex("PlaceId");

                    b.HasIndex("VehicleId");

                    b.ToTable("ParkingSessions");
                });

            modelBuilder.Entity("EasyParking.Domain.Entities.Place", b =>
                {
                    b.Property<string>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<bool>("Booked");

                    b.Property<int>("Column");

                    b.Property<string>("CreatedBy");

                    b.Property<DateTime>("CreatedDate");

                    b.Property<bool>("IsParkingAllowed");

                    b.Property<string>("ModifiedBy");

                    b.Property<DateTime?>("ModifiedDate");

                    b.Property<string>("Name");

                    b.Property<bool>("Occupied");

                    b.Property<string>("ParkingId");

                    b.Property<int>("Row");

                    b.Property<byte[]>("Version")
                        .IsConcurrencyToken()
                        .ValueGeneratedOnAddOrUpdate();

                    b.HasKey("Id");

                    b.HasIndex("ParkingId");

                    b.ToTable("Places");
                });

            modelBuilder.Entity("EasyParking.Domain.Entities.Vehicle", b =>
                {
                    b.Property<string>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("CreatedBy");

                    b.Property<DateTime>("CreatedDate");

                    b.Property<string>("ModifiedBy");

                    b.Property<DateTime?>("ModifiedDate");

                    b.Property<string>("Name");

                    b.Property<string>("Number");

                    b.Property<byte[]>("Version")
                        .IsConcurrencyToken()
                        .ValueGeneratedOnAddOrUpdate();

                    b.HasKey("Id");

                    b.ToTable("Vehicles");
                });

            modelBuilder.Entity("EasyParking.Domain.Identity.AppUser", b =>
                {
                    b.Property<string>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<int>("AccessFailedCount");

                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken();

                    b.Property<string>("CreatedBy");

                    b.Property<DateTime>("CreatedDate");

                    b.Property<string>("Email")
                        .HasMaxLength(256);

                    b.Property<bool>("EmailConfirmed");

                    b.Property<string>("FirstName");

                    b.Property<string>("LastName");

                    b.Property<bool>("LockoutEnabled");

                    b.Property<DateTimeOffset?>("LockoutEnd");

                    b.Property<string>("ModifiedBy");

                    b.Property<DateTime?>("ModifiedDate");

                    b.Property<string>("NormalizedEmail")
                        .HasMaxLength(256);

                    b.Property<string>("NormalizedUserName")
                        .HasMaxLength(256);

                    b.Property<string>("PasswordHash");

                    b.Property<string>("PhoneNumber");

                    b.Property<bool>("PhoneNumberConfirmed");

                    b.Property<string>("SecurityStamp");

                    b.Property<bool>("TwoFactorEnabled");

                    b.Property<string>("UserName")
                        .HasMaxLength(256);

                    b.Property<byte[]>("Version");

                    b.HasKey("Id");

                    b.HasIndex("NormalizedEmail")
                        .HasName("EmailIndex");

                    b.HasIndex("NormalizedUserName")
                        .IsUnique()
                        .HasName("UserNameIndex");

                    b.ToTable("AspNetUsers");
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b =>
                {
                    b.Property<string>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken();

                    b.Property<string>("Name")
                        .HasMaxLength(256);

                    b.Property<string>("NormalizedName")
                        .HasMaxLength(256);

                    b.HasKey("Id");

                    b.HasIndex("NormalizedName")
                        .IsUnique()
                        .HasName("RoleNameIndex");

                    b.ToTable("AspNetRoles");
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim<string>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("ClaimType");

                    b.Property<string>("ClaimValue");

                    b.Property<string>("RoleId")
                        .IsRequired();

                    b.HasKey("Id");

                    b.HasIndex("RoleId");

                    b.ToTable("AspNetRoleClaims");
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim<string>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("ClaimType");

                    b.Property<string>("ClaimValue");

                    b.Property<string>("UserId")
                        .IsRequired();

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("AspNetUserClaims");
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin<string>", b =>
                {
                    b.Property<string>("LoginProvider");

                    b.Property<string>("ProviderKey");

                    b.Property<string>("ProviderDisplayName");

                    b.Property<string>("UserId")
                        .IsRequired();

                    b.HasKey("LoginProvider", "ProviderKey");

                    b.HasIndex("UserId");

                    b.ToTable("AspNetUserLogins");
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole<string>", b =>
                {
                    b.Property<string>("UserId");

                    b.Property<string>("RoleId");

                    b.HasKey("UserId", "RoleId");

                    b.HasIndex("RoleId");

                    b.ToTable("AspNetUserRoles");
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken<string>", b =>
                {
                    b.Property<string>("UserId");

                    b.Property<string>("LoginProvider");

                    b.Property<string>("Name");

                    b.Property<string>("Value");

                    b.HasKey("UserId", "LoginProvider", "Name");

                    b.ToTable("AspNetUserTokens");
                });

            modelBuilder.Entity("EasyParking.Domain.Entities.Owner", b =>
                {
                    b.HasOne("EasyParking.Domain.Identity.AppUser", "User")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("EasyParking.Domain.Entities.ParkingArea", b =>
                {
                    b.HasOne("EasyParking.Domain.Entities.Location", "Location")
                        .WithMany()
                        .HasForeignKey("LocationId");

                    b.HasOne("EasyParking.Domain.Entities.Owner", "Owner")
                        .WithMany("Parkings")
                        .HasForeignKey("OwnerId");
                });

            modelBuilder.Entity("EasyParking.Domain.Entities.ParkingSession", b =>
                {
                    b.HasOne("EasyParking.Domain.Entities.ParkingArea", "Parking")
                        .WithMany()
                        .HasForeignKey("ParkingId");

                    b.HasOne("EasyParking.Domain.Entities.Place", "Place")
                        .WithMany()
                        .HasForeignKey("PlaceId");

                    b.HasOne("EasyParking.Domain.Entities.Vehicle", "Vehicle")
                        .WithMany()
                        .HasForeignKey("VehicleId");
                });

            modelBuilder.Entity("EasyParking.Domain.Entities.Place", b =>
                {
                    b.HasOne("EasyParking.Domain.Entities.ParkingArea", "Parking")
                        .WithMany("Places")
                        .HasForeignKey("ParkingId");
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim<string>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole")
                        .WithMany("Claims")
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim<string>", b =>
                {
                    b.HasOne("EasyParking.Domain.Identity.AppUser")
                        .WithMany("Claims")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin<string>", b =>
                {
                    b.HasOne("EasyParking.Domain.Identity.AppUser")
                        .WithMany("Logins")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });

            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole<string>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole")
                        .WithMany("Users")
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("EasyParking.Domain.Identity.AppUser")
                        .WithMany("Roles")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });
        }
    }
}


text:
#ifndef _FSL_DMAMUX_H_
#define _FSL_DMAMUX_H_

#include "fsl_common.h"

/*!
 * @addtogroup dmamux
 * @{
 */

/*******************************************************************************
 * Definitions
 ******************************************************************************/

/*! @brief DMAMUX driver version */
#define FSL_DMAMUX_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) /*!< Version 2.0.0. */

/*******************************************************************************
 * API
 ******************************************************************************/

#if defined(__cplusplus)
extern "C" {
#endif /* __cplusplus */

/*!
 * @name DMAMUX Initialize and De-initialize
 * @{
 */

/*!
 * @brief Initializes DMAMUX peripheral.
 *
 * This function ungate the DMAMUX clock.
 *
 * @param base DMAMUX peripheral base address.
 *
 */
void DMAMUX_Init(DMAMUX_Type *base);

/*!
 * @brief Deinitializes DMAMUX peripheral.
 *
 * This function gate the DMAMUX clock.
 *
 * @param base DMAMUX peripheral base address.
 */
void DMAMUX_Deinit(DMAMUX_Type *base);

/* @} */
/*!
 * @name DMAMUX Channel Operation
 * @{
 */

/*!
 * @brief Enable DMAMUX channel.
 *
 * This function enable DMAMUX channel to work.
 *
 * @param base DMAMUX peripheral base address.
 * @param channel DMAMUX channel number.
 */
static inline void DMAMUX_EnableChannel(DMAMUX_Type *base, uint32_t channel)
{
    assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);

    base->CHCFG[channel] |= DMAMUX_CHCFG_ENBL_MASK;
}

/*!
 * @brief Disable DMAMUX channel.
 *
 * This function disable DMAMUX channel.
 *
 * @note User must disable DMAMUX channel before configure it.
 * @param base DMAMUX peripheral base address.
 * @param channel DMAMUX channel number.
 */
static inline void DMAMUX_DisableChannel(DMAMUX_Type *base, uint32_t channel)
{
    assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);

    base->CHCFG[channel] &= ~DMAMUX_CHCFG_ENBL_MASK;
}

/*!
 * @brief Configure DMAMUX channel source.
 *
 * @param base DMAMUX peripheral base address.
 * @param channel DMAMUX channel number.
 * @param source Channel source which is used to trigger DMA transfer.
 */
static inline void DMAMUX_SetSource(DMAMUX_Type *base, uint32_t channel, uint8_t source)
{
    assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);

    base->CHCFG[channel] = ((base->CHCFG[channel] & ~DMAMUX_CHCFG_SOURCE_MASK) | DMAMUX_CHCFG_SOURCE(source));
}

#if defined(FSL_FEATURE_DMAMUX_HAS_TRIG) && FSL_FEATURE_DMAMUX_HAS_TRIG > 0U
/*!
 * @brief Enable DMAMUX period trigger.
 *
 * This function enable DMAMUX period trigger feature.
 *
 * @param base DMAMUX peripheral base address.
 * @param channel DMAMUX channel number.
 */
static inline void DMAMUX_EnablePeriodTrigger(DMAMUX_Type *base, uint32_t channel)
{
    assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);

    base->CHCFG[channel] |= DMAMUX_CHCFG_TRIG_MASK;
}

/*!
 * @brief Disable DMAMUX period trigger.
 *
 * This function disable DMAMUX period trigger.
 *
 * @param base DMAMUX peripheral base address.
 * @param channel DMAMUX channel number.
 */
static inline void DMAMUX_DisablePeriodTrigger(DMAMUX_Type *base, uint32_t channel)
{
    assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);

    base->CHCFG[channel] &= ~DMAMUX_CHCFG_TRIG_MASK;
}
#endif /* FSL_FEATURE_DMAMUX_HAS_TRIG */

/* @} */

#if defined(__cplusplus)
}
#endif /* __cplusplus */

/* @} */

#endif /* _FSL_DMAMUX_H_ */


text:
/**
 * tweening support for the "new" animation system
 */
package com.jme3.anim.tween;


text:
module DataClass
  class DataRequest
    include ActiveModel::Validations
    include ActiveModel::Conversion
    extend ActiveModel::Naming
    extend Enumerize

    attr_accessor :name, :email, :group, :group_type, :content, :recaptcha

    # enums
    AVAILABLE_GROUP_TYPES_SYMBOLS = [:general, :academic, :government, :non_profit, :commercial, :personal]
    AVAILABLE_GROUP_TYPES = AVAILABLE_GROUP_TYPES_SYMBOLS.map { |item| item.to_s }

    AVAILABLE_GROUP_TYPES_DISPLAY = [
        {id: :general, name: 'General'},
        {id: :academic, name: 'Academic'},
        {id: :government, name: 'Government'},
        {id: :non_profit, name: 'Not-for-profit'},
        {id: :commercial, name: 'Commercial'},
        {id: :personal, name: 'Personal'},
    ]

    enumerize :group_type, in: AVAILABLE_GROUP_TYPES, predicates: true

    validates_presence_of :email
    validates_format_of :email, with: /\A[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}\z/i, allow_blank: true, allow_nil: true
    validates_presence_of :group
    validates_presence_of :group_type
    validates_presence_of :content
    validates_length_of :content, maximum: 5000

    def initialize(attributes = {})
      attributes.each do |name, value|
        send("#{name}=", value)
      end
    end

    def persisted?
      false
    end
  end
end


text:
'use strict';

var should = require('should');

var AnyFetch = require('../../lib/index.js');
require('../helpers/reset-to-bearer.js');
var configuration = require('../../config/configuration.js');

var clearUsers = require('../../script/clear-users.js');

describe('<Low-level mapping functions>', function() {
  var anyfetch;
  before(function instantiateClient() {
    anyfetch = new AnyFetch(configuration.test.user.email, configuration.test.user.password);
  });

  describe('> user-related functions', function() {
    before(function reset(done) {
      anyfetch.resetToBearer(done);
    });
    before(function clearTheUsers(done) {
      clearUsers(anyfetch, done);
    });

    var userInfos = configuration.test.fakeUser;
    var newName = "My New Name";
    var userId = null;

    it('postUser() should run smoothly', function(done) {
      anyfetch.postUser(userInfos, function(err, res) {
        userId = res.body.id;
        done(err);
      });
    });

    it('patchUserById() should run smoothly', function(done) {
      // This endpoint is only available with Basic auth
      var anyfetchBasic = new AnyFetch(configuration.test.user.email, configuration.test.user.password);
      var changes = {
        name: newName
      };
      anyfetchBasic.patchUserById(userId, changes, done);
    });

    it('patchUserById() should have applied the changes', function(done) {
      anyfetch.getUserById(userId, function(err, res) {
        should(err).not.be.ok;
        should(res).be.ok;
        res.body.should.have.property('name', newName);
        done();
      });
    });

    it('deleteUserById() should run smoothly', function(done) {
      anyfetch.deleteUserById(userId, done);
    });
  });
});


text:
package io.github.jonestimd.swing.component;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.text.ParseException;
import java.util.Date;

import javax.swing.Box;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

public class CalendarButtonTest {
    public static void main(String ... args) throws ParseException {
        try {
            UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        final JFrame frame = new JFrame("Calendar button test");

        addDateField(frame);

        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                frame.pack();
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.setVisible(true);
//                frame.requestFocus();
                frame.toFront();
            }
        });
    }

    private static void addDateField(JFrame frame) throws ParseException {
        frame.setContentPane(new JPanel(new GridBagLayout()));
        Box box = Box.createHorizontalBox();
        DateField field = new DateField("MM/dd/yyyy");
        field.setFont(field.getFont().deriveFont(field.getFont().getSize() * 2f));
        field.setToolTipText("some tooltip");
        field.addPropertyChangeListener("value", new DateChangeListener());
        field.setValue(new Date());
        box.add(field);
        frame.getContentPane().add(box, new GridBagConstraints(0, 0, 1, 1, 1d, 0d, GridBagConstraints.CENTER,
                GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0), 0, 0));
    }

    private static class DateChangeListener implements PropertyChangeListener {
        public void propertyChange(PropertyChangeEvent evt) {
            System.out.println(evt.getOldValue() + " => " + evt.getNewValue());
        }
    }
}


text:
package com.animerom.filemanager.ui.widgets;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ViewFlipper;

import com.animerom.filemanager.R;
import com.animerom.filemanager.listeners.OnHistoryListener;

/**
 * A {@link ViewFlipper} implementation for the navigation custom title.
 */
public class NavigationCustomTitleView extends ViewFlipper {

    private OnHistoryListener mOnHistoryListener;

    /**
     * Constructor of NavigationCustomTitleView.
     *
     * @param context The current context
     */
    public NavigationCustomTitleView(Context context) {
        super(context);
    }

    /**
     * Constructor of NavigationCustomTitleView.
     *
     * @param context The current context
     * @param attrs The attributes of the XML tag that is inflating the view.
     */
    public NavigationCustomTitleView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    /**
     * Method that sets the listener for communicate history changes.
     *
     * @param onHistoryListener The listener for communicate history changes
     */
    public void setOnHistoryListener(OnHistoryListener onHistoryListener) {
        this.mOnHistoryListener = onHistoryListener;
    }

    /**
     * Method that resets the view flipper positioning the current view
     * in the breadcrumb view.
     */
    public void restoreView() {
        if (getCurrentView().getId() != R.id.tb_breadcrumb) {
            hideConfigurationView();
        }
    }

    /**
     * Method that shows the configuration view.
     */
    public void showConfigurationView() {
        //Transition
        setInAnimation(getContext(), R.anim.translate_to_left_in);
        setOutAnimation(getContext(), R.anim.translate_to_left_out);
        showNext();
    }

    /**
     * Method that hides the configuration view.
     */
    public void hideConfigurationView() {
        //Check history
        if (this.mOnHistoryListener != null) {
            this.mOnHistoryListener.onCheckHistory();
        }

        //Transition
        setInAnimation(getContext(), R.anim.translate_to_right_in);
        setOutAnimation(getContext(), R.anim.translate_to_right_out);
        showPrevious();
    }

    /**
     * Method that returns if the breadcrumb view is visible.
     *
     * @return boolean If the breadcrumb view is visible
     */
    public boolean isConfigurationViewShowing() {
        return getCurrentView().getId() != R.id.tb_breadcrumb;
    }

}


text:
package com.nec.harvest.repository;

import com.nec.crud.CrudRepository;
import com.nec.harvest.model.User;

/**
 * User repository that can be used to created, removed, updated or
 * something like that based on User type.
 *
 * @author sondn
 *
 */
public interface UserRepository extends CrudRepository<User, String> {

}


text:
<?php

namespace Omnipay\SagePay;

use Omnipay\Common\AbstractGateway;

/**
 * Sage Pay Direct Gateway
 */
class DirectGateway extends AbstractGateway
{
    // Gateway identification.

    public function getName()
    {
        return 'Sage Pay Direct';
    }

    public function getDefaultParameters()
    {
        return array(
            'vendor' => '',
            'testMode' => false,
            'referrerId' => '',
        );
    }

    // Vendor identification.

    public function getVendor()
    {
        return $this->getParameter('vendor');
    }

    public function setVendor($value)
    {
        return $this->setParameter('vendor', $value);
    }

    // Access to the HTTP client for debugging.
    // NOTE: this is likely to be removed or replaced with something
    // more appropriate.

    public function getHttpClient()
    {
        return $this->httpClient;
    }

    // Available services.
    public function getReferrerId()
    {
        return $this->getParameter('referrerId');
    }

    public function setReferrerId($value)
    {
        return $this->setParameter('referrerId', $value);
    }

    public function authorize(array $parameters = array())
    {
        return $this->createRequest('\Omnipay\SagePay\Message\DirectAuthorizeRequest', $parameters);
    }

    public function completeAuthorize(array $parameters = array())
    {
        return $this->createRequest('\Omnipay\SagePay\Message\DirectCompleteAuthorizeRequest', $parameters);
    }

    public function capture(array $parameters = array())
    {
        return $this->createRequest('\Omnipay\SagePay\Message\CaptureRequest', $parameters);
    }

    public function purchase(array $parameters = array())
    {
        return $this->createRequest('\Omnipay\SagePay\Message\DirectPurchaseRequest', $parameters);
    }

    public function completePurchase(array $parameters = array())
    {
        return $this->completeAuthorize($parameters);
    }

    public function refund(array $parameters = array())
    {
        return $this->createRequest('\Omnipay\SagePay\Message\RefundRequest', $parameters);
    }
}


text:
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}

module Hilt.Postgres
  ( module Hilt.Postgres
  , module Hilt.Handles.Postgres
  ) where

import Text.Show.Pretty (ppShow)
import Hilt.Handles.Postgres
import Control.Monad.Managed (Managed, managed)
import Data.ByteString (ByteString)
import Control.Monad (forever)

{-|

== Usage

Basic RDBMS style querying. Provides a couple of query functions while managing DB pool.

The service looks for a DATABASE_URL ENV var containing a postgresql URL on load, i.e;

"postgres://username:password@127.0.0.1:5432/databasename"

== Quick Example

@
-- TODO
@
-}
import Data.Monoid                         ((<>))
import Data.Maybe                          (fromMaybe)
import Control.Monad.Logger                (runNoLoggingT, runStdoutLoggingT)
import qualified Database.Persist.Sql as P (runSqlPersistMPool, ConnectionPool, insert)
import Database.Persist.Postgresql         (SqlBackend, ConnectionString, createPostgresqlPool)
import Database.Persist                    (Key, PersistEntityBackend, PersistEntity)

import qualified Database.PostgreSQL.Simple     as SQL
import qualified Database.PostgreSQL.Simple.URL as SQLU
import Database.PostgreSQL.Simple.SqlQQ         (sql)
import qualified Database.PostgreSQL.Simple.Notification as SQL

import Network.URI (URIAuth, parseAbsoluteURI, uriScheme, uriAuthority, uriPath, uriRegName, uriPort, uriUserInfo, uriScheme)
import System.Environment (getEnv)

-- For readSqlChar
import Database.PostgreSQL.Simple.FromField  (returnError, ResultError (..), Field, Conversion)
import Text.Read                             (readMaybe)
import Data.ByteString                       (ByteString)
import Data.Text.Encoding                    (encodeUtf8)
import qualified Data.ByteString.Char8 as B
import qualified Data.Text as T
import Data.Text (Text)
import Data.Text.Encoding as TL (decodeUtf8)
import Data.Typeable

import qualified Hilt.Config as Config

load :: Managed Handle
load = managed withHandle

loadRaw :: IO Handle
loadRaw = do

  -- @ISSUE should this be contained in a config service...?
  env       <- Config.lookupEnv "ENV" Config.Development
  pool      <- makePool env
  rawConfig <- makePoolRaw
  conn      <- SQL.connect rawConfig

  -- @TODO how do implementations log? Should they demand a logger?
  -- putStrLn $ "RawConfig:" ++ rawConfig

  pure Handle
    { queryP  = flip P.runSqlPersistMPool pool
    , query_  = SQL.query_ conn
    , query   = SQL.query conn
    , execute = SQL.execute conn
    , listen = listenImpl conn
    , dbInfo  = dbInfoImpl conn
    }

withHandle :: (Handle -> IO a) -> IO a
withHandle f = loadRaw >>= f

-- Utilities

insert :: forall a . (PersistEntityBackend a ~ SqlBackend, PersistEntity a) => Handle -> a -> IO (Key a)
insert handle element = queryP handle $ P.insert element

-- Persistent Pool

makePool :: Config.Environment -> IO P.ConnectionPool
makePool e = do
  connStr <- lookupDatabaseUrl
  case e of
    Config.Test -> runNoLoggingT $ createPostgresqlPool connStr (envPoolSize e)
    _           -> runStdoutLoggingT $ createPostgresqlPool connStr (envPoolSize e)

-- @TODO this should be configurable
envPoolSize :: Config.Environment -> Int
envPoolSize Config.Development = 1
envPoolSize Config.Test        = 1
envPoolSize Config.Staging     = 1
envPoolSize Config.Production  = 8

-- PostgreSQL.Simple Pool

makePoolRaw :: IO SQL.ConnectInfo
makePoolRaw = do
  connStr <- Config.lookupEnvString "DATABASE_URL" ""
  pure $ fromMaybe defaultConnectInfo (SQLU.parseDatabaseUrl connStr)

-- @ISSUE read default from somewhere controllable by user?
defaultConnectInfo :: SQL.ConnectInfo
defaultConnectInfo = SQL.defaultConnectInfo { SQL.connectUser     = "postgres"
                                            , SQL.connectPassword = ""
                                            , SQL.connectDatabase = "hilt_development"
                                            }

listenImpl :: SQL.Connection -> SQL.Query -> (Text -> IO ()) -> IO ()
listenImpl conn query handler = do
  _ <- SQL.execute_ conn query
  forever $ SQL.getNotification conn >>= handler . TL.decodeUtf8 . SQL.notificationData

-- Utilities

readSqlChar :: (Typeable a, Read a) => Field -> Maybe B.ByteString -> Conversion a
readSqlChar f bs = case bs of
  Nothing -> returnError UnexpectedNull f ""
  Just x  -> case readMaybe $ B.unpack x of
    Just a  -> pure a
    Nothing -> returnError ConversionFailed f ""

-- Use pg_typeof(derp) to inspect type of record return

-- @TODO - this would be cool? Just work for anything that can be Read?
--         it does however result in "Overlapping instances for FromField Int"
--         so maybe we need to add a different typeclass to custom fields? i.e
--         instance PgSimpleReadable a => FromField a where
-- {-# LANGUAGE FlexibleInstances #-}
-- {-# LANGUAGE UndecidableInstances #-}
-- instance PgCharReadable a => FromField a where
--   fromField f bs = case bs of
--     Nothing -> returnError UnexpectedNull f ""
--     Just x  -> case (readMaybe $ B.unpack x) of
--       Just a  -> pure a
--       Nothing -> returnError ConversionFailed f ""

-- @TODO add type check for char column?
-- if typeOid f /= $(inlineTypoid TI.char) then returnError Incompatible f ""

dbInfoImpl :: SQL.Connection -> IO DbInfo
dbInfoImpl conn = do
  tables <- singleColumnString conn dbInfoQuery
  mapM (getTableInfo conn) tables

pp :: forall a . Show a => a -> IO ()
pp a = putStrLn $ ppShow a

getTableInfo :: SQL.Connection -> String -> IO TableInfo
getTableInfo conn table = do
  tableInfosRaw :: [(String, String, Bool)] <- SQL.query conn tableInfoQuery [table]

  let fields = fmap (\(fieldName, fieldType, fieldNullable) -> FieldInfo {..}) tableInfosRaw

  pure $ TableInfo table fields

singleColumnString :: SQL.Connection -> SQL.Query -> IO [String]
singleColumnString conn q = do
  column :: [[String]] <- SQL.query_ conn q
  pure $ filter (/="") $ fmap
    ( \c -> case c of
      []    -> ""
      (x:_) -> x
    )
    column

dbInfoQuery :: SQL.Query
dbInfoQuery = [sql|
  SELECT tablename
  FROM pg_tables
  WHERE schemaname = ANY (current_schemas(false))
|]

tableInfoQuery :: SQL.Query
tableInfoQuery = [sql|
  SELECT a.attname, format_type(a.atttypid, a.atttypmod), not a.attnotnull
    FROM pg_attribute a
   WHERE a.attrelid = ?::regclass
     AND a.attnum > 0 AND NOT a.attisdropped
   ORDER BY a.attnum
|]

-- Ports of heroku and heroku-persistent code to make stack based installs easier
-- https://hackage.haskell.org/package/heroku-0.1.2.3/docs/src/Web-Heroku-Internal.html
-- https://hackage.haskell.org/package/heroku-persistent-0.2.0/docs/src/Web-Heroku-Persist-Postgresql.html

-- Fetch postgres formatted DATABASE_URL ENV var (ala Heroku) and return Persistant ConnectionString
lookupDatabaseUrl :: IO ConnectionString
lookupDatabaseUrl = do
  connStr <- formatParams <$> dbConnParams
  pure connStr

formatParams :: [(Text, Text)] -> ByteString
formatParams = encodeUtf8 . T.unwords . map toKeyValue

toKeyValue :: (Text, Text) -> Text
toKeyValue (k, v) = k <> "=" <> v

dbConnParams :: IO [(Text, Text)]
dbConnParams = dbConnParams' "DATABASE_URL" parseDatabaseUrl

parseDatabaseUrl :: String -> [(Text, Text)]
parseDatabaseUrl = parseDatabaseUrl' "postgres:"

-- | read the DATABASE_URL environment variable
-- and return an alist of connection parameters with the following keys:
-- user, password, host, port, dbname
--
-- warning: just calls error if it can't parse correctly
dbConnParams' :: String -> (String -> [(Text, Text)]) -> IO [(Text, Text)]
dbConnParams' envVar parse = fmap parse (getEnv envVar)

parseDatabaseUrl' :: String -> String -> [(Text, Text)]
parseDatabaseUrl' scheme durl =
  let muri         = parseAbsoluteURI durl
      (auth, path) = case muri of
        Nothing  -> error "couldn't parse absolute uri"
        Just uri -> if uriScheme uri /= scheme
          then schemeError uri
          else case uriAuthority uri of
            Nothing -> invalid
            Just a  -> (a, uriPath uri)
      (user, password) = userAndPassword auth
  in  [ ( T.pack "user"
        , user
        )
           -- tail not safe, but should be there on Heroku
      , (T.pack "password", T.tail password)
      , (T.pack "host"    , T.pack $ uriRegName auth)
      , ( T.pack "port"
        , T.pack $ removeColon $ uriPort auth
        )
         -- tail not safe but path should always be there
      , (T.pack "dbname", T.pack $ Prelude.tail path)
      ]
 where
  removeColon (':':port) = port
  removeColon port       = port

  -- init is not safe, but should be there on Heroku
  userAndPassword :: URIAuth -> (Text, Text)
  userAndPassword = T.breakOn (T.pack ":") . T.pack . Prelude.init . uriUserInfo

  schemeError uri = error $ "was expecting a postgres scheme, not: " ++ uriScheme uri ++ "\n" ++ show uri
  -- should be an error
  invalid = error "could not parse heroku DATABASE_URL"


text:
package org.ocpsoft.rewrite.annotation.handler;

import org.ocpsoft.logging.Logger;
import org.ocpsoft.rewrite.annotation.Matches;
import org.ocpsoft.rewrite.annotation.api.FieldContext;
import org.ocpsoft.rewrite.annotation.api.HandlerChain;
import org.ocpsoft.rewrite.annotation.spi.FieldAnnotationHandler;
import org.ocpsoft.rewrite.param.ParameterBuilder;
import org.ocpsoft.rewrite.param.RegexConstraint;

public class MatchesHandler extends FieldAnnotationHandler<Matches>
{
   private final Logger log = Logger.getLogger(MatchesHandler.class);

   @Override
   public Class<Matches> handles()
   {
      return Matches.class;
   }

   @Override
   public int priority()
   {
      return HandlerWeights.WEIGHT_TYPE_ENRICHING;
   }

   @Override
   public void process(FieldContext context, Matches annotation, HandlerChain chain)
   {

      // obtain the parameter for the current field
      ParameterBuilder<?> parameterBuilder =
               (ParameterBuilder<?>) context.get(ParameterBuilder.class);
      if (parameterBuilder == null) {
         throw new IllegalStateException("Cound not find any binding for field: " +
                  context.getJavaField().getName());
      }

      // add a corresponding RegexConstraint
      String expr = annotation.value();
      parameterBuilder.constrainedBy(new RegexConstraint(expr));

      if (log.isTraceEnabled()) {
         log.trace("Parameter [{}] has been constrained by [{}]", parameterBuilder.getName(), expr);
      }

      // proceed with the chain
      chain.proceed();

   }

}


text:
module.exports = {
  command: 'dependencies',
  desc: 'Work with dependencies',
  /**
   * Yargs builder
   * @param {Object} yargs
   * @returns {Object}
   */
  builder(yargs) {
    return yargs
      .demandCommand(1)
      .commandDir('./dependencies');
  }
};


text:
describe EvilEvents::Core::Broadcasting::Dispatcher::Mixin, :stub_event_system do
  it_behaves_like 'event dispatching interface' do
    let(:dispatcher) { Module.new.tap { |mod| mod.extend(described_class) } }
  end
end


text:
<?php

/**
 * MageTest_Core_Model_Admin_Session
 *
 * @category   MageTest
 * @package    Mage-Test_MagentoExtension
 *
 * @author     MageTest team (https://github.com/MageTest/Mage-Test/contributors)
 */
class MageTest_Core_Model_Admin_Session extends Mage_Admin_Model_Session
{
    /**
     * Try to login user in admin
     *
     * @param  string $username
     * @param  string $password
     * @param  Mage_Core_Controller_Request_Http $request
     * @return Mage_Admin_Model_User|null
     */
    public function login($username, $password, $request = null)
    {
        if (empty($username) || empty($password)) {
            return;
        }

        try {
            /* @var $user Mage_Admin_Model_User */
            $user = Mage::getModel('admin/user');
            $user->login($username, $password);
            if ($user->getId()) {
                $this->renewSession();

                if (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
                    Mage::getSingleton('adminhtml/url')->renewSecretUrls();
                }
                $this->setIsFirstPageAfterLogin(true);
                $this->setUser($user);
                $this->setAcl(Mage::getResourceModel('admin/acl')->loadAcl());
                if ($requestUri = $this->_getRequestUri($request)) {
                    Mage::dispatchEvent('admin_session_user_login_success', array('user' => $user));
                    // Patched the redirection to use the Response object
                    $response = Mage::app()->getResponse();
                    $response->setRedirect($requestUri);
                    $response->sendResponse();
                }
            }
            else {
                Mage::throwException(Mage::helper('adminhtml')->__('Invalid Username or Password.'));
            }
        }
        catch (Mage_Core_Exception $e) {
            Mage::dispatchEvent('admin_session_user_login_failed',
                    array('user_name' => $username, 'exception' => $e));
            if ($request && !$request->getParam('messageSent')) {
                Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
                $request->setParam('messageSent', true);
            }
        }

        return $user;
    }
}


text:
package dk.codingpirates.minecraft.mods.block;

import dk.codingpirates.minecraft.mods.CodingPiratesMod;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class Julehjerte extends Block {

	private final String name = "julehjerte";

	public Julehjerte() {
		super(Material.WOOD);
		setUnlocalizedName(CodingPiratesMod.MODID + "_" + name);
		setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
	}

	public String getName() {
		return name;
	}

}


text:
/*
 * conmgr_dbus.h
 */

#ifndef CONMGR_INCLUDE_CONMGR_DBUS_H_
#define CONMGR_INCLUDE_CONMGR_DBUS_H_

#define CONMGR_SERVICE			"net.conmgr"
#define CONMGR_PATH			"/net/conmgr"

#include <dbus/dbus.h>

int conmgr_dbus_init(DBusConnection *conn);
void conmgr_dbus_cleanup(void);

#endif /* CONMGR_INCLUDE_CONMGR_DBUS_H_ */


text:
@interface PodsDummy_Pods_MyLib_Expecta : NSObject
@end
@implementation PodsDummy_Pods_MyLib_Expecta
@end


text:
// Package status implements errors returned by gRPC.  These errors are
// serialized and transmitted on the wire between server and client, and allow
// for additional data to be transmitted via the Details field in the status
// proto.  gRPC service handlers should return an error created by this
// package, and gRPC clients should expect a corresponding error to be
// returned from the RPC call.
//
// This package upholds the invariants that a non-nil error may not
// contain an OK code, and an OK code must result in a nil error.
package status

import (
	"errors"
	"fmt"

	"github.com/golang/protobuf/proto"
	"github.com/golang/protobuf/ptypes"
	spb "google.golang.org/genproto/googleapis/rpc/status"
	"google.golang.org/grpc/codes"
)

// statusError is an alias of a status proto.  It implements error and Status,
// and a nil statusError should never be returned by this package.
type statusError spb.Status

func (se *statusError) Error() string {
	p := (*spb.Status)(se)
	return fmt.Sprintf("rpc error: code = %s desc = %s", codes.Code(p.GetCode()), p.GetMessage())
}

func (se *statusError) status() *Status {
	return &Status{s: (*spb.Status)(se)}
}

// Status represents an RPC status code, message, and details.  It is immutable
// and should be created with New, Newf, or FromProto.
type Status struct {
	s *spb.Status
}

// Code returns the status code contained in s.
func (s *Status) Code() codes.Code {
	if s == nil || s.s == nil {
		return codes.OK
	}
	return codes.Code(s.s.Code)
}

// Message returns the message contained in s.
func (s *Status) Message() string {
	if s == nil || s.s == nil {
		return ""
	}
	return s.s.Message
}

// Proto returns s's status as an spb.Status proto message.
func (s *Status) Proto() *spb.Status {
	if s == nil {
		return nil
	}
	return proto.Clone(s.s).(*spb.Status)
}

// Err returns an immutable error representing s; returns nil if s.Code() is
// OK.
func (s *Status) Err() error {
	if s.Code() == codes.OK {
		return nil
	}
	return (*statusError)(s.s)
}

// New returns a Status representing c and msg.
func New(c codes.Code, msg string) *Status {
	return &Status{s: &spb.Status{Code: int32(c), Message: msg}}
}

// Newf returns New(c, fmt.Sprintf(format, a...)).
func Newf(c codes.Code, format string, a ...interface{}) *Status {
	return New(c, fmt.Sprintf(format, a...))
}

// Error returns an error representing c and msg.  If c is OK, returns nil.
func Error(c codes.Code, msg string) error {
	return New(c, msg).Err()
}

// Errorf returns Error(c, fmt.Sprintf(format, a...)).
func Errorf(c codes.Code, format string, a ...interface{}) error {
	return Error(c, fmt.Sprintf(format, a...))
}

// ErrorProto returns an error representing s.  If s.Code is OK, returns nil.
func ErrorProto(s *spb.Status) error {
	return FromProto(s).Err()
}

// FromProto returns a Status representing s.
func FromProto(s *spb.Status) *Status {
	return &Status{s: proto.Clone(s).(*spb.Status)}
}

// FromError returns a Status representing err if it was produced from this
// package, otherwise it returns nil, false.
func FromError(err error) (s *Status, ok bool) {
	if err == nil {
		return &Status{s: &spb.Status{Code: int32(codes.OK)}}, true
	}
	if se, ok := err.(*statusError); ok {
		return se.status(), true
	}
	return nil, false
}

// WithDetails returns a new status with the provided details messages appended to the status.
// If any errors are encountered, it returns nil and the first error encountered.
func (s *Status) WithDetails(details ...proto.Message) (*Status, error) {
	if s.Code() == codes.OK {
		return nil, errors.New("no error details for status with code OK")
	}
	// s.Code() != OK implies that s.Proto() != nil.
	p := s.Proto()
	for _, detail := range details {
		any, err := ptypes.MarshalAny(detail)
		if err != nil {
			return nil, err
		}
		p.Details = append(p.Details, any)
	}
	return &Status{s: p}, nil
}

// Details returns a slice of details messages attached to the status.
// If a detail cannot be decoded, the error is returned in place of the detail.
func (s *Status) Details() []interface{} {
	if s == nil || s.s == nil {
		return nil
	}
	details := make([]interface{}, 0, len(s.s.Details))
	for _, any := range s.s.Details {
		detail := &ptypes.DynamicAny{}
		if err := ptypes.UnmarshalAny(any, detail); err != nil {
			details = append(details, err)
			continue
		}
		details = append(details, detail.Message)
	}
	return details
}

// Code returns the Code of the error if it is a Status error, codes.OK if err
// is nil, or codes.Unknown otherwise.
func Code(err error) codes.Code {
	// Don't use FromError to avoid allocation of OK status.
	if err == nil {
		return codes.OK
	}
	if se, ok := err.(*statusError); ok {
		return se.status().Code()
	}
	return codes.Unknown
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
  <context-root>/drools</context-root>
  <security-domain>other-drools</security-domain>
</jboss-web>


text:
import {connect} from "react-redux";
import {MessageBox} from "../components/MessageBox";
import {roguelikeState} from "../MapGenerator";

const mapStateToProps = (state: roguelikeState) => {
    return {
        messageList: state.messages.slice(-8)
    };
};

export const MessageBoxContainer = connect(mapStateToProps)(MessageBox as any);


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>Gulp-Webpack</title>
	<meta name="description" content="">
	<meta name="keywords" content="">
	<link href="" rel="stylesheet">

this is just a gulp-webpack test


text:
package org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.distsql.rdl.create;

import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.rdl.ExpectedShardingBindingTableRule;
import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.statement.SQLParserTestCase;

import javax.xml.bind.annotation.XmlElement;
import java.util.LinkedList;
import java.util.List;

/**
 * Create sharding binding table rule statement test case.
 */
@Getter
@Setter
public final class CreateShardingBindingTableRulesStatementTestCase extends SQLParserTestCase {

    @XmlElement(name = "rule")
    private final List<ExpectedShardingBindingTableRule> rules = new LinkedList<>();
}


text:
package com.tle.webtests.pageobject.portal;

import com.tle.webtests.framework.PageContext;
import org.openqa.selenium.By;

public class BrowsePortalSection extends AbstractPortalSection<BrowsePortalSection> {
  public BrowsePortalSection(PageContext context, String title) {
    super(context, title);
  }

  public boolean topicExists(String topic) {
    return isPresent(
        getBoxContent(),
        By.xpath(".//ul[@class='topics']/li/a[starts-with(., " + quoteXPath(topic) + ")]"));
  }
}


text:
"use strict" ;

const Element = require( './Element.js' ) ;
const BaseMenu = require( './BaseMenu.js' ) ;
const Button = require( './Button.js' ) ;
const ToggleButton = require( './ToggleButton.js' ) ;

// Inherit from BaseMenu for common methods

function ColumnMenu( options ) {
	// Clone options if necessary
	options = ! options ? {} : options.internal ? options : Object.create( options ) ;
	options.internal = true ;

	this.onParentResize = this.onParentResize.bind( this ) ;

	// Overwritten by Element() when .autoWidth is set
	if ( ! options.outputWidth && ! options.width ) {
		if ( options.parent ) {
			options.outputWidth = Math.min( options.parent.inputWidth , options.parent.outputWidth ) ;
		}
		else if ( options.inlineTerm ) {
			options.outputWidth = options.inlineTerm.width ;
		}
	}

	this.buttonsMaxWidth = 0 ;
	this.buttonPaddingWidth = 0 ;
	this.buttonSymbolWidth = 0 ;

	this.pageHeight = 0 ;	// current page height, computed
	this.pageItemsDef = null ;
	//this.masterItem = options.masterItem || null ;

	if ( ! options.multiLineItems ) {
		options.height = options.items && options.items.length ;
	}

	BaseMenu.call( this , options ) ;

	this.maxHeight =
		this.autoHeight && this.outputDst ? Math.round( this.outputDst.height * this.autoHeight ) :
		options.maxHeight ? options.maxHeight :
		options.pageMaxHeight ? options.pageMaxHeight :	// for backward compatibility
		this.strictInline ? this.inlineTerm.height :
		Infinity ;

	this.on( 'parentResize' , this.onParentResize ) ;

	this.multiLineItems = !! options.multiLineItems ;

	this.initChildren() ;

	// Only draw if we are not a superclass of the object
	if ( this.elementType === 'ColumnMenu' && ! options.noDraw ) { this.draw() ; }
}

module.exports = ColumnMenu ;
Element.inherit( ColumnMenu , BaseMenu ) ;

ColumnMenu.prototype.inlineNewLine = true ;
ColumnMenu.prototype.ButtonClass = Button ;

ColumnMenu.prototype.defaultOptions = {
	buttonBlurAttr: { bgColor: 'black' , color: 'white' , bold: true } ,
	buttonEvenBlurAttr: null ,
	buttonFocusAttr: { bgColor: 'white' , color: 'black' , bold: true } ,
	buttonDisabledAttr: { bgColor: 'black' , color: 'gray' , bold: true } ,
	buttonSubmittedAttr: { bgColor: 'gray' , color: 'brightWhite' , bold: true } ,
	buttonTurnedOnBlurAttr: { bgColor: 'cyan' } ,
	buttonTurnedOnFocusAttr: { bgColor: 'brightCyan' , color: 'gray' , bold: true } ,
	buttonTurnedOffBlurAttr: { bgColor: 'gray' , dim: true } ,
	buttonTurnedOffFocusAttr: { bgColor: 'white' , color: 'black' , bold: true }
} ;

ColumnMenu.prototype.keyBindings = {
	UP: 'previous' ,
	DOWN: 'next' ,
	PAGE_UP: 'previousPage' ,
	PAGE_DOWN: 'nextPage' ,
	HOME: 'firstPage' ,
	END: 'lastPage' ,
	//	ENTER: 'submit' ,
	//	KP_ENTER: 'submit' ,
	ALT_ENTER: 'submit' ,
	ESCAPE: 'parentMenu' ,
	LEFT: 'parentMenu' ,
	RIGHT: 'submenu'
} ;

ColumnMenu.prototype.buttonKeyBindings = {
	ENTER: 'submit' ,
	KP_ENTER: 'submit'
} ;

ColumnMenu.prototype.toggleButtonKeyBindings = {
	ENTER: 'toggle' ,
	KP_ENTER: 'toggle'
} ;

// Pre-compute page and eventually create Buttons automatically
ColumnMenu.prototype.initChildren = function( noInitPage = false ) {
	// Do not exit now: maybe there are masterDef and separatorDef (SelectList*)
	//if ( ! this.itemsDef.length ) { return ; }

	// Reset things, because .initChildren() can be called multiple times on 'parentResize' events
	this.pageItemsDef = [] ;

	this.buttonPaddingWidth =
		Math.max(
			Element.computeContentWidth( this.blurLeftPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.focusLeftPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.disabledLeftPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.submittedLeftPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.turnedOnFocusLeftPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.turnedOffFocusLeftPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.turnedOnBlurLeftPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.turnedOffBlurLeftPadding , this.paddingHasMarkup )
		) + Math.max(
			Element.computeContentWidth( this.blurRightPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.focusRightPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.disabledRightPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.submittedRightPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.turnedOnFocusRightPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.turnedOffFocusRightPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.turnedOnBlurRightPadding , this.paddingHasMarkup ) ,
			Element.computeContentWidth( this.turnedOffBlurRightPadding , this.paddingHasMarkup )
		) ;

	if ( this.buttonPaddingWidth > this.outputWidth ) {
		// The padding itself is bigger than the width... so what should we do?
		return ;
	}

	var ellipsisWidth = Element.computeContentWidth( this.contentEllipsis , false ) ;

	this.previousPageDef = Object.assign( { content: '▲' , internalRole: 'previousPage' } , this.previousPageDef ) ;
	this.previousPageDef.contentHasMarkup = this.previousPageDef.contentHasMarkup || this.previousPageDef.markup ;
	this.previousPageDef.width = this.buttonPaddingWidth + Element.computeContentWidth( this.previousPageDef.content , this.previousPageDef.contentHasMarkup ) ;
	this.previousPageDef.buttonContent = this.previousPageDef.content ;

	this.nextPageDef = Object.assign( { content: '▼' , internalRole: 'nextPage' } , this.nextPageDef ) ;
	this.nextPageDef.contentHasMarkup = this.nextPageDef.contentHasMarkup || this.nextPageDef.markup ;
	this.nextPageDef.width = this.buttonPaddingWidth + Element.computeContentWidth( this.nextPageDef.content , this.nextPageDef.contentHasMarkup ) ;
	this.nextPageDef.buttonContent = this.nextPageDef.content ;

	if ( this.masterDef ) {
		this.masterDef = Object.assign( { content: 'column-menu' , internalRole: 'master' } , this.masterDef ) ;
		this.masterDef.contentHasMarkup = this.masterDef.contentHasMarkup || this.masterDef.markup ;

		this.masterDef.buttonContent = this.masterDef.content ;

		if ( this.masterDef.symbol ) {
			this.buttonSymbolWidth = 1 + Element.computeContentWidth( this.masterDef.symbol ) ;
			this.masterDef.buttonContent += ' ' + this.masterDef.symbol ;
		}

		this.masterDef.width = this.buttonPaddingWidth + Element.computeContentWidth( this.masterDef.buttonContent , this.masterDef.contentHasMarkup ) ;
	}

	this.buttonsMaxWidth = Math.max( this.buttonsMaxWidth , this.previousPageDef.width , this.nextPageDef.width , this.masterDef ? this.masterDef.width : 0 ) ;

	var page = 0 , pageHeight = 0 ;

	this.itemsDef.forEach( ( def , index ) => {
		def.contentHasMarkup = def.contentHasMarkup || def.markup ;
		def.buttonContent = def.content ;
		def.buttonBlurContent = def.blurContent ;
		def.buttonFocusContent = def.focusContent ;
		def.buttonDisabledContent = def.disabledContent ;
		def.buttonSubmittedContent = def.submittedContent ;
		def.buttonTurnedOnBlurContent = def.turnedOnBlurContent ;
		def.buttonTurnedOffBlurContent = def.turnedOffBlurContent ;
		def.buttonTurnedOnFocusContent = def.turnedOnFocusContent ;
		def.buttonTurnedOffFocusContent = def.turnedOffFocusContent ;

		// Computing all button content variant like suggested by issue #144 is really complicated,
		// All variant should come out with the same width and height.

		var contentWidth = Element.computeContentWidth( def.content , def.contentHasMarkup ) ,
			buttonHeight = 1 ,
			isLastItem = index === this.itemsDef.length - 1 ,
			// height without previous/next buttons:
			pageMaxInnerHeight = Math.max( 1 , ! isLastItem ? this.maxHeight - 1 : this.maxHeight ) ,
			overflow = this.buttonPaddingWidth + contentWidth - this.outputWidth ;

		if ( overflow > 0 ) {
			if ( this.multiLineItems ) {
				def.buttonContent = Element.wordWrapContent( def.content , this.outputWidth - this.buttonPaddingWidth , def.contentHasMarkup ) ;
				contentWidth = this.outputWidth - this.buttonPaddingWidth ;
				buttonHeight = def.buttonContent.length ;
			}
			else {
				def.buttonContent = Element.truncateContent( def.content , contentWidth - overflow - ellipsisWidth , def.contentHasMarkup ) + this.contentEllipsis ;
				contentWidth = Element.computeContentWidth( def.buttonContent , def.contentHasMarkup ) ;
			}
		}

		if ( index && pageHeight + buttonHeight > pageMaxInnerHeight ) {
			// ^--- check if there is content on this page, which is always true except for the very first item of page 0
			page ++ ;
			pageHeight = 1 ;

			// Still too big?
			if ( pageHeight + buttonHeight > pageMaxInnerHeight && buttonHeight > 1 ) {
				buttonHeight = pageMaxInnerHeight - pageHeight ;
				def.buttonContent.length = buttonHeight ;
				def.buttonContent[ buttonHeight - 1 ] =
					Element.truncateContent(
						def.buttonContent[ buttonHeight - 1 ].trimRight() ,
						contentWidth - ellipsisWidth ,
						def.contentHasMarkup
					)
					+ this.contentEllipsis ;
			}
		}

		pageHeight += buttonHeight ;

		def.width = this.buttonPaddingWidth + contentWidth ;
		def.page = page ;

		if ( def.width + this.buttonSymbolWidth > this.buttonsMaxWidth ) {
			this.buttonsMaxWidth = def.width + this.buttonSymbolWidth ;
		}

		if ( ! this.pageItemsDef[ page ] ) { this.pageItemsDef[ page ] = [] ; }
		this.pageItemsDef[ page ].push( def ) ;
	} ) ;

	this.maxPage = page ;

	if ( this.separatorDef ) {
		this.separatorDef = Object.assign( { content: '-' , disabled: true , internalRole: 'separator' } , this.separatorDef ) ;
		this.separatorDef.width = Element.computeContentWidth( this.separatorDef.content , this.separatorDef.contentHasMarkup ) ;

		if ( this.separatorDef.contentRepeat && this.separatorDef.width < this.buttonsMaxWidth - this.buttonPaddingWidth ) {
			this.separatorDef.content = this.separatorDef.content.repeat( Math.floor( ( this.buttonsMaxWidth - this.buttonPaddingWidth ) / this.separatorDef.width ) ) ;
			this.separatorDef.width = Element.computeContentWidth( this.separatorDef.content , this.separatorDef.contentHasMarkup ) ;
		}

		this.separatorDef.width += this.buttonPaddingWidth ;
		this.separatorDef.buttonContent = this.separatorDef.content ;
	}

	if ( this.masterDef && this.masterDef.width < this.buttonsMaxWidth ) {
		this.masterDef.buttonContent = this.masterDef.content + ' ' + ' '.repeat( this.buttonsMaxWidth - this.masterDef.width ) + this.masterDef.symbol ;
		this.masterDef.width = this.buttonsMaxWidth ;
	}

	// Force at least an empty page
	if ( ! this.pageItemsDef.length ) { this.pageItemsDef.push( [] ) ; }

	this.pageItemsDef.forEach( ( pageDef , index ) => {
		if ( index ) { pageDef.unshift( this.previousPageDef ) ; }
		if ( index < this.pageItemsDef.length - 1 ) { pageDef.push( this.nextPageDef ) ; }
		if ( this.separatorDef ) { pageDef.unshift( this.separatorDef ) ; }
		if ( this.masterDef ) { pageDef.unshift( this.masterDef ) ; }
	} ) ;

	// /!\ Adjust the output width? /!\
	if ( this.outputWidth > this.buttonsMaxWidth ) {
		this.outputWidth = this.buttonsMaxWidth ;
	}

	// Only initPage if we are not a superclass of the object
	if ( this.elementType === 'ColumnMenu' && ! noInitPage ) { this.initPage() ; }
} ;

ColumnMenu.prototype.initPage = function( page = this.page ) {
	var buttonOffsetX = 0 , buttonOffsetY = 0 ;

	if ( ! this.pageItemsDef[ page ] ) { return ; }

	this.buttons.forEach( button => button.destroy( false , true ) ) ;
	this.buttons.length = 0 ;

	this.pageItemsDef[ page ].forEach( ( def , index ) => {
		var ButtonConstructor , isToggle , key , value , blurAttr ;

		if ( ! Array.isArray( def.buttonContent ) ) {
			def.buttonContent = [ def.buttonContent + ' '.repeat( this.buttonsMaxWidth - def.width ) ] ;
		}

		ButtonConstructor = def.internalRole ? Button :
			def.type === 'button' ? Button :
			def.type === 'toggle' ? ToggleButton :
			this.ButtonClass ?? Button ;
		isToggle = ButtonConstructor === ToggleButton || ButtonConstructor.prototype instanceof ToggleButton ;

		key = def.key ;		// For ToggleButton
		value = this.childUseParentKeyValue && key && this.value && typeof this.value === 'object' ? this.value[ key ] :
			def.value === undefined && ! isToggle && def.key ? def.key :
			def.value ;

		if ( index % 2 ) {
			// Odd
			blurAttr = def.blurAttr || this.buttonBlurAttr ;
		}
		else {
			// Even
			blurAttr = def.evenBlurAttr || def.blurAttr || this.buttonEvenBlurAttr || this.buttonBlurAttr ;
		}

		this.buttons[ index ] = new ButtonConstructor( {
			internal: true ,
			parent: this ,
			childId: index ,
			internalRole: def.internalRole ,
			contentHasMarkup: def.contentHasMarkup ,
			content: def.buttonContent ,
			blurContent: def.buttonBlurContent ,
			focusContent: def.buttonFocusContent ,
			disabledContent: def.buttonDisabledContent ,
			submittedContent: def.buttonSubmittedContent ,
			turnedOnBlurContent: def.buttonTurnedOnBlurContent ,
			turnedOffBlurContent: def.buttonTurnedOffBlurContent ,
			turnedOnFocusContent: def.buttonTurnedOnFocusContent ,
			turnedOffFocusContent: def.buttonTurnedOffFocusContent ,
			disabled: def.disabled ,
			def ,
			key ,
			value ,
			outputX: this.outputX + buttonOffsetX ,
			outputY: this.outputY + buttonOffsetY ,

			blurAttr ,
			focusAttr: def.focusAttr || this.buttonFocusAttr ,
			disabledAttr: def.disabledAttr || this.buttonDisabledAttr ,
			submittedAttr: def.submittedAttr || this.buttonSubmittedAttr ,
			turnedOnFocusAttr: def.turnedOnFocusAttr || this.buttonTurnedOnFocusAttr ,
			turnedOffFocusAttr: def.turnedOffFocusAttr || this.buttonTurnedOffFocusAttr ,
			turnedOnBlurAttr: def.turnedOnBlurAttr || this.buttonTurnedOnBlurAttr ,
			turnedOffBlurAttr: def.turnedOffBlurAttr || this.buttonTurnedOffBlurAttr ,

			blurLeftPadding: this.blurLeftPadding ,
			blurRightPadding: this.blurRightPadding ,
			focusLeftPadding: this.focusLeftPadding ,
			focusRightPadding: this.focusRightPadding ,
			disabledLeftPadding: this.disabledLeftPadding ,
			disabledRightPadding: this.disabledRightPadding ,
			submittedLeftPadding: this.submittedLeftPadding ,
			submittedRightPadding: this.submittedRightPadding ,

			turnedOnFocusLeftPadding: this.turnedOnFocusLeftPadding ,
			turnedOnFocusRightPadding: this.turnedOnFocusRightPadding ,
			turnedOffFocusLeftPadding: this.turnedOffFocusLeftPadding ,
			turnedOffFocusRightPadding: this.turnedOffFocusRightPadding ,
			turnedOnBlurLeftPadding: this.turnedOnBlurLeftPadding ,
			turnedOnBlurRightPadding: this.turnedOnBlurRightPadding ,
			turnedOffBlurLeftPadding: this.turnedOffBlurLeftPadding ,
			turnedOffBlurRightPadding: this.turnedOffBlurRightPadding ,

			paddingHasMarkup: this.paddingHasMarkup ,

			keyBindings: isToggle ? this.toggleButtonKeyBindings : this.buttonKeyBindings ,
			actionKeyBindings: isToggle ? this.toggleButtonActionKeyBindings : this.buttonActionKeyBindings ,
			shortcuts: def.shortcuts ,

			noDraw: true
		} ) ;

		this.buttons[ index ].on( 'submit' , this.onButtonSubmit ) ;
		this.buttons[ index ].on( 'blinked' , this.onButtonBlinked ) ;
		this.buttons[ index ].on( 'focus' , this.onButtonFocus ) ;

		if ( isToggle ) {
			this.buttons[ index ].on( 'toggle' , this.onButtonToggle ) ;
		}

		buttonOffsetY += this.buttons[ index ].outputHeight ;
	} ) ;

	// Set outputHeight to the correct value
	if ( buttonOffsetY < this.outputHeight ) { this.needOuterDraw = true ; }
	this.pageHeight = this.outputHeight = buttonOffsetY ;
} ;

ColumnMenu.prototype.onParentResize = function() {
	if ( ! this.autoWidth && ! this.autoHeight ) { return ; }

	if ( this.autoWidth ) {
		this.outputWidth = Math.round( this.outputDst.width * this.autoWidth ) ;
	}

	if ( this.autoHeight ) {
		this.maxHeight = Math.round( this.outputDst.height * this.autoHeight ) ;
	}

	this.initChildren( true ) ;
	this.page = 0 ;
	this.initPage() ;
	this.draw() ;
} ;


text:
/*
 * Programacao de Computadores e ALgoritmos
 * Trabalho 2
 * q4.11.b.c
 *
 * Equipe:
 *
 *          Delrick Oliveira
 *          Manoel Florencio
 *          Evandro Fernandes
 *          Davi Tavares
 *
 *
 */

#include<stdio.h>
#include<stdlib.h>
#include"f4.11.b.h"

int main(int argc, const char argv[])
{
    int **a, linha, coluna=3,i;
    printf ( "digite o numero de datas a inserir:\n" );//inserindo o numero de datas
    scanf ( "%d", &linha ); // fazendo a leitura do total de datas

    a = (int**)(malloc(linha*sizeof(int*))); // fazendo a alocação no algoritmo principal
    for(i=0;i<linha;i++)
    {
        a[i] =(int*)(malloc(coluna*sizeof(int)));
    }

    read_matrix(a,linha,coluna); // lendo os valores da matriz
    printf ( "imprimindo datas antes da ordenação\n" );
    print_matrix(linha, coluna, a);// imprimindo antes da modificação
    printf ( "ordenando a coluna....\n" );
    ord_date(a,linha,coluna); // ordenando as datas
    printf("matrix apos ordenação\n" );
    print_matrix(linha,coluna,a);// imprimindo o restultado na tela

	return 0;
}


text:
package org.pentaho.amazon.hive.ui;

import java.util.Enumeration;
import java.util.ResourceBundle;

import org.dom4j.DocumentException;
import org.eclipse.swt.widgets.Shell;
import org.pentaho.amazon.hive.job.AmazonHiveJobExecutor;
import org.pentaho.di.i18n.BaseMessages;
import org.pentaho.di.job.JobMeta;
import org.pentaho.di.job.entry.JobEntryDialogInterface;
import org.pentaho.di.job.entry.JobEntryInterface;
import org.pentaho.di.repository.Repository;
import org.pentaho.di.ui.core.database.dialog.tags.ExtTextbox;
import org.pentaho.di.ui.job.entry.JobEntryDialog;
import org.pentaho.ui.xul.XulDomContainer;
import org.pentaho.ui.xul.XulException;
import org.pentaho.ui.xul.XulRunner;
import org.pentaho.ui.xul.binding.Binding.Type;
import org.pentaho.ui.xul.binding.BindingFactory;
import org.pentaho.ui.xul.binding.DefaultBindingFactory;
import org.pentaho.ui.xul.components.XulMenuList;
import org.pentaho.ui.xul.components.XulTextbox;
import org.pentaho.ui.xul.containers.XulDialog;
import org.pentaho.ui.xul.swt.SwtXulLoader;
import org.pentaho.ui.xul.swt.SwtXulRunner;

public class AmazonHiveJobExecutorDialog extends JobEntryDialog implements JobEntryDialogInterface {
  private static final Class<?> CLZ = AmazonHiveJobExecutor.class;

  private AmazonHiveJobExecutor jobEntry;

  private AmazonHiveJobExecutorController controller = new AmazonHiveJobExecutorController();

  private XulDomContainer container;

  private BindingFactory bf;

  private ResourceBundle bundle = new ResourceBundle() {
    @Override
    public Enumeration<String> getKeys() {
      return null;
    }

    @Override
    protected Object handleGetObject( String key ) {
      return BaseMessages.getString( CLZ, key );
    }
  };

  public AmazonHiveJobExecutorDialog( Shell parent, JobEntryInterface jobEntry, Repository rep, JobMeta jobMeta )
    throws XulException, DocumentException {
    super( parent, jobEntry, rep, jobMeta );

    this.jobEntry = (AmazonHiveJobExecutor) jobEntry;

    SwtXulLoader swtXulLoader = new SwtXulLoader();
    swtXulLoader.registerClassLoader( getClass().getClassLoader() );
    swtXulLoader.register( "VARIABLETEXTBOX", "org.pentaho.di.ui.core.database.dialog.tags.ExtTextbox" ); //$NON-NLS-1$ //$NON-NLS-1$
    swtXulLoader.setOuterContext( shell );

    container = swtXulLoader.loadXul( "org/pentaho/amazon/hive/ui/AmazonHiveJobExecutorDialog.xul", bundle ); //$NON-NLS-1$

    final XulRunner runner = new SwtXulRunner();
    runner.addContainer( container );

    container.addEventHandler( controller );

    bf = new DefaultBindingFactory();
    bf.setDocument( container.getDocumentRoot() );
    bf.setBindingType( Type.BI_DIRECTIONAL );

    bf.createBinding( "jobentry-name", "value", controller, AmazonHiveJobExecutorController.JOB_ENTRY_NAME ); //$NON-NLS-1$ //$NON-NLS-2$
    bf.createBinding( "jobentry-hadoopjob-name", "value", controller, AmazonHiveJobExecutorController.HADOOP_JOB_NAME ); //$NON-NLS-1$ //$NON-NLS-2$
    bf.createBinding(
        "jobentry-hadoopjob-flow-id", "value", controller, AmazonHiveJobExecutorController.HADOOP_JOB_FLOW_ID ); //$NON-NLS-1$ //$NON-NLS-3$
    bf.createBinding( "q-url", "value", controller, AmazonHiveJobExecutorController.Q_URL ); //$NON-NLS-1$ //$NON-NLS-2$
    bf.createBinding( "access-key", "value", controller, AmazonHiveJobExecutorController.ACCESS_KEY ); //$NON-NLS-2$ //$NON-NLS-3$
    bf.createBinding( "secret-key", "value", controller, AmazonHiveJobExecutorController.SECRET_KEY ); //$NON-NLS-1$ //$NON-NLS-2$
    bf.createBinding( "bootstrap-actions", "value", controller, AmazonHiveJobExecutorController.BOOTSTRAP_ACTIONS ); //$NON-NLS-1$ //$NON-NLS-2$
    bf.createBinding( "s3-staging-directory", "value", controller, AmazonHiveJobExecutorController.STAGING_DIR ); //$NON-NLS-1$ //$NON-NLS-2$
    bf.createBinding( "command-line-arguments", "value", controller, AmazonHiveJobExecutorController.CMD_LINE_ARGS ); //$NON-NLS-1$ //$NON-NLS-2$
    bf.createBinding( "num-instances", "value", controller, AmazonHiveJobExecutorController.NUM_INSTANCES ); //$NON-NLS-1$ //$NON-NLS-2$
    bf.createBinding(
        "master-instance-type", "selectedItem", controller, AmazonHiveJobExecutorController.MASTER_INSTANCE_TYPE ); //$NON-NLS-1$ //$NON-NLS-2$
    bf.createBinding(
        "slave-instance-type", "selectedItem", controller, AmazonHiveJobExecutorController.SLAVE_INSTANCE_TYPE ); //$NON-NLS-1$ //$NON-NLS-2$

    XulTextbox numInstances = (XulTextbox) container.getDocumentRoot().getElementById( "num-instances" ); //$NON-NLS-1$
    numInstances.setValue( "" + controller.getNumInstances() );

    @SuppressWarnings( "unchecked" )//$NON-NLS-1$
    XulMenuList<String> masterInstanceType =
        (XulMenuList<String>) container.getDocumentRoot().getElementById( "master-instance-type" ); //$NON-NLS-1$
    masterInstanceType.setSelectedItem( "" + controller.getMasterInstanceType() );

    @SuppressWarnings( "unchecked" )//$NON-NLS-1$
    XulMenuList<String> slaveInstanceType =
        (XulMenuList<String>) container.getDocumentRoot().getElementById( "slave-instance-type" ); //$NON-NLS-1$
    slaveInstanceType.setSelectedItem( "" + controller.getSlaveInstanceType() );

    bf.createBinding( "alive", "selected", controller, AmazonHiveJobExecutorController.ALIVE ); //$NON-NLS-1$ //$NON-NLS-2$
    bf.createBinding( "blocking", "selected", controller, AmazonHiveJobExecutorController.BLOCKING ); //$NON-NLS-1$ //$NON-NLS-2$
    bf.createBinding( "logging-interval", "value", controller, AmazonHiveJobExecutorController.LOGGING_INTERVAL ); //$NON-NLS-1$ //$NON-NLS-2$

    XulTextbox loggingInterval = (XulTextbox) container.getDocumentRoot().getElementById( "logging-interval" ); //$NON-NLS-1$
    loggingInterval.setValue( "" + controller.getLoggingInterval() );

    ExtTextbox tempBox = (ExtTextbox) container.getDocumentRoot().getElementById( "access-key" ); //$NON-NLS-1$
    tempBox.setVariableSpace( controller.getVariableSpace() );
    tempBox = (ExtTextbox) container.getDocumentRoot().getElementById( "secret-key" ); //$NON-NLS-1$
    tempBox.setVariableSpace( controller.getVariableSpace() );
    tempBox = (ExtTextbox) container.getDocumentRoot().getElementById( "jobentry-hadoopjob-name" ); //$NON-NLS-1$
    tempBox.setVariableSpace( controller.getVariableSpace() );
    tempBox = (ExtTextbox) container.getDocumentRoot().getElementById( "jobentry-hadoopjob-flow-id" ); //$NON-NLS-1$
    tempBox.setVariableSpace( controller.getVariableSpace() );
    tempBox = (ExtTextbox) container.getDocumentRoot().getElementById( "bootstrap-actions" ); //$NON-NLS-1$
    tempBox.setVariableSpace( controller.getVariableSpace() );
    tempBox = (ExtTextbox) container.getDocumentRoot().getElementById( "s3-staging-directory" ); //$NON-NLS-1$
    tempBox.setVariableSpace( controller.getVariableSpace() );
    tempBox = (ExtTextbox) container.getDocumentRoot().getElementById( "q-url" ); //$NON-NLS-1$
    tempBox.setVariableSpace( controller.getVariableSpace() );
    tempBox = (ExtTextbox) container.getDocumentRoot().getElementById( "command-line-arguments" ); //$NON-NLS-1$
    tempBox.setVariableSpace( controller.getVariableSpace() );
    tempBox = (ExtTextbox) container.getDocumentRoot().getElementById( "num-instances" ); //$NON-NLS-1$
    tempBox.setVariableSpace( controller.getVariableSpace() );
    tempBox = (ExtTextbox) container.getDocumentRoot().getElementById( "logging-interval" ); //$NON-NLS-1$
    tempBox.setVariableSpace( controller.getVariableSpace() );

    bf.setBindingType( Type.BI_DIRECTIONAL );

    controller.setJobEntry( (AmazonHiveJobExecutor) jobEntry );
    controller.init();
  }

  public JobEntryInterface open() {
    XulDialog dialog = (XulDialog) container.getDocumentRoot().getElementById( "amazon-emr-job-entry-dialog" ); //$NON-NLS-1$
    dialog.show();
    return jobEntry;
  }

}


text:
typedef unsigned char ST;

namespace Manta
{

    class IsosurfaceGridVolume : public PrimitiveCommon
    {
    public:
        struct VMCell
        {
          ST max;
          ST min;
        };

        BBox bounds;
        Vector datadiag;
        Vector hierdiag;
        Vector ihierdiag;
        Vector sdiag;
        int nx,ny,nz;

#ifdef TEST_OCTDATA
        OctreeVolume octdata;
#endif

        BrickArray3<ST> blockdata;
        ST datamin, datamax;
        int mc_depth;
        int* xsize;
        int* ysize;
        int* zsize;
        double* ixsize;
        double* iysize;
        double* izsize;
        ST isoval;

        BrickArray3<VMCell>* macrocells;
        char* filebase;

        IsosurfaceGridVolume(char* filebase, int _mc_depth, double isovalue, Material* _matl);
        ~IsosurfaceGridVolume();

        void preprocess( PreprocessContext const &context );
        void computeBounds( PreprocessContext const &context, BBox &box ) const;
        void intersect( RenderContext const &context, RayPacket &rays ) const;
        void computeNormal(const RenderContext& context, RayPacket& rays) const;

        BBox getBounds() const;

        inline double get_isovalue() const
        {
            return (double)isoval;
        }

        inline void set_isovalue(double val)
        {
            isoval = (ST)val;
        }

        inline void increase_isovalue()
        {
            if (isoval < std::numeric_limits<ST>::max())
                isoval++;
        }

        inline void decrease_isovalue()
        {
            if (isoval > std::numeric_limits<ST>::min())
                isoval--;
        }

    private:

        inline void single_intersect(RayPacket& rays, int which_one) const;

        void isect(RayPacket& rays, int which_one,
               const Vector& orig, const Vector& dir, const Vector& inv_dir,
               int depth, float t,
               float dtdx, float dtdy, float dtdz,
               float next_x, float next_y, float next_z,
               int ix, int iy, int iz,
               int dix_dx, int diy_dy, int diz_dz,
               int startx, int starty, int startz,
               const Vector& cellcorner, const Vector& celldir) const;

        void calc_mcell(int depth, int startx, int starty, int startz, VMCell& mcell);
    };

};

#endif


text:
#include "ecclesia/lib/redfish/topology_v2.h"

#include <memory>
#include <string>
#include <vector>

#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "ecclesia/lib/redfish/node_topology.h"
#include "ecclesia/lib/redfish/test_mockup.h"
#include "ecclesia/lib/redfish/testing/fake_redfish_server.h"
#include "ecclesia/lib/redfish/testing/node_topology_testing.h"
#include "ecclesia/lib/redfish/types.h"

namespace ecclesia {
namespace {

using ::testing::Contains;
using ::testing::Not;
using ::testing::Pointwise;

void CheckAgainstTestingMockupFullDevpaths(const NodeTopology &topology) {
  const std::vector<Node> expected_nodes = {
      Node{"root", "/phys", NodeType::kBoard},
      Node{"child1", "/phys/C1", NodeType::kBoard},
      Node{"child2", "/phys/C2", NodeType::kBoard},
      Node{"ssd", "/phys/SSD", NodeType::kBoard},
      Node{"cpu", "/phys/CPU", NodeType::kBoard},
      Node{"memory", "/phys/C1/DIMM", NodeType::kBoard},
      Node{"dangling_cable", "/phys/C1/QSFP", NodeType::kCable},
      Node{"expansion_cable", "/phys/C2/HDMI", NodeType::kCable},
      Node{"controller", "/phys/SSD:device:controller", NodeType::kDevice},
      Node{"drive", "/phys/SSD:device:drive", NodeType::kDevice},
      Node{"expansion_tray", "/phys/C2/HDMI/DOWNLINK", NodeType::kBoard},
      Node{"expansion_child", "/phys/C2/HDMI/DOWNLINK/E1", NodeType::kBoard}};

  std::vector<Node> actual_nodes;
  actual_nodes.reserve(topology.nodes.size());
  for (const auto &node : topology.nodes) {
    actual_nodes.push_back(*node);
  }

  EXPECT_THAT(actual_nodes, Pointwise(RedfishNodeEqId(), expected_nodes));
}

TEST(RawInterfaceTestWithMockup, TestingMockupNodesArePopulated) {
  TestingMockupServer mockup("topology_v2_testing/mockup.shar");
  auto raw_intf = mockup.RedfishClientInterface();
  CheckAgainstTestingMockupFullDevpaths(
      CreateTopologyFromRedfishV2(raw_intf.get()));
}

TEST(RawInterfaceTestWithPatchedMockup, TestingMockupFindingRootChassis) {
  ecclesia::FakeRedfishServer mockup("topology_v2_testing/mockup.shar");
  auto raw_intf = mockup.RedfishClientInterface();

  {
    // Reorder chassis so that root chassis has to be found via Link traversal
    mockup.AddHttpGetHandlerWithData("/redfish/v1/Chassis", R"json(
      {
        "@odata.id": "/redfish/v1/Chassis",
        "@odata.type": "#ChassisCollection.ChassisCollection",
        "Members": [
          {
            "@odata.id": "/redfish/v1/Chassis/child2"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/root"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/child1"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/expansion_tray"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/expansion_child"
          }
        ],
        "Members@odata.count": 5,
        "Name": "Chassis Collection"
      }
    )json");

    CheckAgainstTestingMockupFullDevpaths(
        CreateTopologyFromRedfishV2(raw_intf.get()));

    mockup.ClearHandlers();
  }
  {
    // Reorder chassis so that root chassis has to be found via Link traversal
    // and via existing Cabling
    mockup.AddHttpGetHandlerWithData("/redfish/v1/Chassis", R"json(
      {
        "@odata.id": "/redfish/v1/Chassis",
        "@odata.type": "#ChassisCollection.ChassisCollection",
        "Members": [
          {
            "@odata.id": "/redfish/v1/Chassis/expansion_tray"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/child2"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/root"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/child1"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/expansion_child"
          }
        ],
        "Members@odata.count": 5,
        "Name": "Chassis Collection"
      }
    )json");

    CheckAgainstTestingMockupFullDevpaths(
        CreateTopologyFromRedfishV2(raw_intf.get()));

    mockup.ClearHandlers();
  }
  {
    // Reorder chassis so that root chassis has to be found via Link traversal
    // and via existing Cabling (multi-level)
    mockup.AddHttpGetHandlerWithData("/redfish/v1/Chassis", R"json(
      {
        "@odata.id": "/redfish/v1/Chassis",
        "@odata.type": "#ChassisCollection.ChassisCollection",
        "Members": [
          {
            "@odata.id": "/redfish/v1/Chassis/expansion_child"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/child2"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/root"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/child1"
          },
          {
            "@odata.id": "/redfish/v1/Chassis/expansion_tray"
          }
        ],
        "Members@odata.count": 5,
        "Name": "Chassis Collection"
      }
    )json");

    CheckAgainstTestingMockupFullDevpaths(
        CreateTopologyFromRedfishV2(raw_intf.get()));

    mockup.ClearHandlers();
  }
  {
    // No Chassis to find a root from
    mockup.AddHttpGetHandlerWithData("/redfish/v1/Chassis", R"json(
      {
        "@odata.id": "/redfish/v1/Chassis",
        "@odata.type": "#ChassisCollection.ChassisCollection",
        "Members": [],
        "Members@odata.count": 0,
        "Name": "Chassis Collection"
      }
    )json");

    auto topology = CreateTopologyFromRedfishV2(raw_intf.get());
    EXPECT_TRUE(topology.nodes.empty());

    mockup.ClearHandlers();
  }
}

TEST(RawInterfaceTestWithPatchedMockup, TestingMockupBrokenOrCircularLink) {
  ecclesia::FakeRedfishServer mockup("topology_v2_testing/mockup.shar");
  auto raw_intf = mockup.RedfishClientInterface();

  {
    // Add broken/non-existent link to Drive
    mockup.AddHttpGetHandlerWithData("/redfish/v1/Chassis/child2", R"json(
      {
        "@odata.id": "/redfish/v1/Chassis/child2",
        "@odata.type": "#Chassis.v1_14_0.Chassis",
        "ChassisType": "RackMount",
        "Id": "child2",
        "Links": {
          "ContainedBy": {
            "@odata.id": "/redfish/v1/Chassis/root"
          },
          "Drives": [{
            "@odata.id": "/redfish/v1/link/does/not/exist"
          }]
        },
        "Location": {
          "PartLocation": {
            "LocationType": "Slot",
            "ServiceLabel": "C2"
          }
        },
        "Name": "child2"
      }
    )json");

    CheckAgainstTestingMockupFullDevpaths(
        CreateTopologyFromRedfishV2(raw_intf.get()));

    mockup.ClearHandlers();
  }
  {
    // Add extraneous link to Storage that's already assigned a devpath
    mockup.AddHttpGetHandlerWithData("/redfish/v1/Chassis/child2", R"json(
      {
        "@odata.id": "/redfish/v1/Chassis/child2",
        "@odata.type": "#Chassis.v1_14_0.Chassis",
        "ChassisType": "RackMount",
        "Id": "child2",
        "Links": {
          "ContainedBy": {
            "@odata.id": "/redfish/v1/Chassis/root"
          },
          "Storage": [{
            "@odata.id": "/redfish/v1/Systems/system/Storage/1"
          }]
        },
        "Location": {
          "PartLocation": {
            "LocationType": "Slot",
            "ServiceLabel": "C2"
          }
        },
        "Name": "child2"
      }
    )json");

    CheckAgainstTestingMockupFullDevpaths(
        CreateTopologyFromRedfishV2(raw_intf.get()));

    mockup.ClearHandlers();
  }
}

// This test makes sure the node names from the created topology match
// expectations.
TEST(RawInterfaceTestWithMockup, TestingNodeName) {
  ecclesia::FakeRedfishServer mockup("topology_v2_testing/mockup.shar");
  auto raw_intf = mockup.RedfishClientInterface();

  const NodeTopology constructed_topology =
      CreateTopologyFromRedfishV2(raw_intf.get());

  std::vector<std::string> node_names;
  node_names.reserve(constructed_topology.nodes.size());
  for (const auto &node : constructed_topology.nodes) {
    node_names.push_back(node->name);
  }

  EXPECT_THAT(node_names, Contains("expansion_tray"));
  EXPECT_THAT(node_names, Contains("expansion_child"));
  EXPECT_THAT(node_names, Not(Contains("Expansion Tray ")));
  EXPECT_THAT(node_names, Not(Contains(" Expansion Child ")));
}

TEST(RawInterfaceTestWithMockup, TestingLocationTypes) {
  ecclesia::FakeRedfishServer mockup("topology_v2_testing/mockup.shar");
  auto raw_intf = mockup.RedfishClientInterface();

  // Change the LocationType to make sure the topology can be correctly
  // constructed as well.
  mockup.AddHttpGetHandlerWithData("/redfish/v1/Chassis/child1", R"json(
      {
        "@odata.id": "/redfish/v1/Chassis/child1",
        "@odata.type": "#Chassis.v1_14_0.Chassis",
        "ChassisType": "RackMount",
        "Id": "child1",
        "Links": {
          "ContainedBy": {
            "@odata.id": "/redfish/v1/Chassis/root"
          }
        },
        "Location": {
          "PartLocation": {
            "LocationType": "Bay",
            "ServiceLabel": "C1"
          }
        },
        "Name": "child1",
        "Memory": {
          "@odata.id": "/redfish/v1/Systems/system/Memory"
        }
      }
    )json");

  CheckAgainstTestingMockupFullDevpaths(
      CreateTopologyFromRedfishV2(raw_intf.get()));

  mockup.ClearHandlers();
}

TEST(RawInterfaceTestWithMockup, GoogleRootCoexistsWithRedfishRoot) {
  ecclesia::FakeRedfishServer mockup(
      "features/component_integrity/mockup.shar");
  auto raw_intf = mockup.RedfishClientInterface();
  NodeTopology topology = CreateTopologyFromRedfishV2(raw_intf.get());

  const std::vector<Node> expected_nodes = {
      Node{"root", "/phys", NodeType::kBoard},
      Node{"erot-gpu1", "/phys:device:erot-gpu1", NodeType::kDevice},
      Node{"erot-gpu2", "/phys:device:erot-gpu2", NodeType::kDevice},
      Node{"hoth", "/phys:device:hoth", NodeType::kDevice},
  };

  std::vector<Node> actual_nodes;
  actual_nodes.reserve(topology.nodes.size());
  for (const auto &node : topology.nodes) {
    actual_nodes.push_back(*node);
  }

  EXPECT_THAT(actual_nodes, Pointwise(RedfishNodeEqId(), expected_nodes));
}

}  // namespace
}  // namespace ecclesia


text:
package simple

//import unfiltered.request._
//import unfiltered.response._
//import unfiltered.request.{Path => UFPath}
//import com.google.appengine.api.datastore.{Key, KeyFactory}

//class EchoFilter extends unfiltered.filter.Planify ({

//  case GET(UFPath(Seg(what :: Nil)) & Params(params0)) =>
//    val key = KeyFactory.createKey(classOf[Counter].getSimpleName, what)
//    val counter = CounterAdapter.get(key) getOrElse new Counter(key, 0)
//    val inc = new Counter(key, counter.count + 1)
//    CounterAdapter.save(inc)
//    ResponseString(what + inc.count.toString + "!")

//})

import java.io.IOException
import javax.servlet.http._

class EchoFilter extends HttpServlet {
  override def doGet(req: HttpServletRequest, resp: HttpServletResponse) = {
    req.
    //resp.setContentType("text/plain");
    resp.getWriter().println("Hola - * *saas");
  }
}


text:
<?php
namespace Neos\Flow\Mvc;

use Neos\Flow\Annotations as Flow;
use Neos\Flow\Http\Component\ComponentContext;
use Neos\Flow\Http\Component\ComponentInterface;
use Neos\Flow\Mvc\Routing\RoutingComponent;
use Neos\Flow\Security\Context;

/**
 *
 */
class PrepareMvcRequestComponent implements ComponentInterface
{
    /**
     * @Flow\Inject(lazy=false)
     * @var Context
     */
    protected $securityContext;

    /**
     * @Flow\Inject
     * @var ActionRequestFactory
     */
    protected $actionRequestFactory;

    /**
     * @inheritDoc
     */
    public function handle(ComponentContext $componentContext)
    {
        $httpRequest = $componentContext->getHttpRequest();

        $routingMatchResults = $componentContext->getParameter(RoutingComponent::class, 'matchResults');
        $actionRequest = $this->actionRequestFactory->createActionRequest($httpRequest, $routingMatchResults ?? []);
        $this->securityContext->setRequest($actionRequest);
        $componentContext->setParameter(DispatchComponent::class, 'actionRequest', $actionRequest);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
    <Resource name="jdbc/web"
              auth="Container"
              type="javax.sql.DataSource"
              factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
              testWhileIdle="true"
              testOnBorrow="true"
              testOnReturn="false"
              validationQuery="SELECT 1"
              timeBetweenEvictionRunsMillis="30000"
              maxActive="15"
              maxIdle="10"
              minIdle="5"
              removeAbandonedTimeout="60"
              removeAbandoned="false"
              logAbandoned="true"
              minEvictableIdleTimeMillis="30000"
              jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
              username="anand"
              password="anand"
              driverClassName="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost:3306/aslcommerce?useUnicode=true&characterEncoding=utf8"/>

    <Resource name="jdbc/storage"
              auth="Container"
              type="javax.sql.DataSource"
              factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
              testWhileIdle="true"
              testOnBorrow="true"
              testOnReturn="false"
              validationQuery="SELECT 1"
              timeBetweenEvictionRunsMillis="30000"
              maxActive="15"
              maxIdle="10"
              minIdle="5"
              removeAbandonedTimeout="60"
              removeAbandoned="false"
              logAbandoned="true"
              minEvictableIdleTimeMillis="30000"
              jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
              username="anand"
              password="anand"
              driverClassName="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost:3306/aslcommerce?useUnicode=true&characterEncoding=utf8"/>

    <Resource name="jdbc/secure"
              auth="Container"
              type="javax.sql.DataSource"
              factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
              testWhileIdle="true"
              testOnBorrow="true"
              testOnReturn="false"
              validationQuery="SELECT 1"
              timeBetweenEvictionRunsMillis="30000"
              maxActive="15"
              maxIdle="10"
              minIdle="5"
              removeAbandonedTimeout="60"
              removeAbandoned="false"
              logAbandoned="true"
              minEvictableIdleTimeMillis="30000"
              jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
              username="anand"
              password="anand"
              driverClassName="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost:3306/aslcommerce?useUnicode=true&characterEncoding=utf8"/>
</Context>