text:
import React from 'react';

import { PlayerLeaderboardEntry } from '../../../types/leaderboard';
import { getTimeDisplayValue } from '../../../utils/ui-helper';
import { LeaderboardValueProps } from '../components/AbstractLeaderboardEntry';
import PlayerLeaderboardRow from './PlayerLeaderboardRow';

class TimeLeaderboardRow extends PlayerLeaderboardRow<PlayerLeaderboardEntry> {

    protected ValueCell = (props: LeaderboardValueProps<PlayerLeaderboardEntry>) => (
        <span>{getTimeDisplayValue(props.entry.value)}</span>
    )

}

export default TimeLeaderboardRow;


text:
package org.locationtech.geomesa.index.index.attribute.legacy

import org.locationtech.geomesa.index.api.ShardStrategy.NoShardStrategy
import org.locationtech.geomesa.index.geotools.GeoMesaDataStore
import org.locationtech.geomesa.index.index.attribute.AttributeIndexKeySpace
import org.locationtech.geomesa.index.index.attribute.legacy.AttributeIndexV7.AttributeIndexKeySpaceV7
import org.locationtech.geomesa.utils.geotools.RichSimpleFeatureType.RichSimpleFeatureType
import org.locationtech.geomesa.utils.index.IndexMode.IndexMode
import org.opengis.feature.simple.SimpleFeatureType

// no shards
class AttributeIndexV4 protected (ds: GeoMesaDataStore[_],
                                  sft: SimpleFeatureType,
                                  version: Int,
                                  attribute: String,
                                  secondaries: Seq[String],
                                  mode: IndexMode)
    extends AttributeIndexV5(ds, sft, version, attribute, secondaries, mode) {

  def this(ds: GeoMesaDataStore[_], sft: SimpleFeatureType, attribute: String, secondaries: Seq[String], mode: IndexMode) =
    this(ds, sft, 4, attribute, secondaries, mode)

  override val keySpace: AttributeIndexKeySpace =
    new AttributeIndexKeySpaceV7(sft, sft.getTableSharingBytes, NoShardStrategy, attribute)
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using BenchmarkDotNet.Configs;

namespace BenchmarkDotNet.Diagnostics.Windows.Configs
{
    [AttributeUsage(AttributeTargets.Class)]
    public class InliningDiagnoserAttribute : Attribute, IConfigSource
    {
        /// <param name="logFailuresOnly">only the methods that failed to get inlined. True by default.</param>
        /// <param name="filterByNamespace">only the methods from declaring type's namespace. Set to false if you want to see all Jit inlining events. True by default.</param>
        public InliningDiagnoserAttribute(bool logFailuresOnly = true, bool filterByNamespace = true)
        {
            Config = ManualConfig.CreateEmpty().AddDiagnoser(new InliningDiagnoser(logFailuresOnly, filterByNamespace));
        }

        public InliningDiagnoserAttribute(bool logFailuresOnly = true, string[] allowedNamespaces = null)
        {
            Config = ManualConfig.CreateEmpty().AddDiagnoser(new InliningDiagnoser(logFailuresOnly, allowedNamespaces));
        }

        public IConfig Config { get; }
    }
}


text:
package com.example.httplib;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

/**
 * Created by HP on 2017/3/9.
 */

public abstract class JsonCallback<T> extends AbstractCallback<T> {

    @Override
    protected T bindData(String result) throws AppException {
        try {
            JSONObject json = new JSONObject(result);
            JSONObject data = json.optJSONObject("data");
            Gson gson = new Gson();
            Type type = ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
            return gson.fromJson(data.toString(), type);
        } catch (JSONException e) {
            throw new AppException(AppException.ErrorType.JSON, e.getMessage());
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<billStatus>
  <bill>
    <billType>HR</billType>
    <subjects>
      <billSubjects>
        <policyArea>
          <name>Taxation</name>
        </policyArea>
        <legislativeSubjects />
      </billSubjects>
    </subjects>
    <recordedVotes />
    <policyArea>
      <name>Taxation</name>
    </policyArea>
    <constitutionalAuthorityStatementText><![CDATA[
From the Congressional Record Online through the Government Publishing Office [www.gpo.gov]By Mr. LAWSON of Florida:H.R. 3345.Congress has the power to enact this legislation pursuantto the following:Article 1, Section 8: To make all Laws which shall benecessary and proper for carrying into Execution theforegoing Powers, and all other Powers vested by thisConstitution in the Government of the United States, or inany Department or Officer thereof.[Page H6146]
]]></constitutionalAuthorityStatementText>
    <sponsors>
      <item>
        <party>D</party>
        <fullName>Rep. Lawson, Al, Jr. [D-FL-5]</fullName>
        <lastName>Lawson</lastName>
        <identifiers>
          <gpoId />
          <bioguideId>L000586</bioguideId>
          <lisID>2317</lisID>
        </identifiers>
        <middleName />
        <firstName>Al</firstName>
        <bioguideId>L000586</bioguideId>
        <state>FL</state>
        <district>5</district>
        <byRequestType />
      </item>
    </sponsors>
    <actions>
      <actionByCounts>
        <houseOfRepresentatives>3</houseOfRepresentatives>
      </actionByCounts>
      <actionTypeCounts>
        <billReferrals>1</billReferrals>
        <introducedInHouse>1</introducedInHouse>
        <introducedInTheHouse>1</introducedInTheHouse>
      </actionTypeCounts>
      <item>
        <links />
        <type>IntroReferral</type>
        <actionCode>H11100</actionCode>
        <sourceSystem>
          2
          <name>House floor actions</name>
        </sourceSystem>
        <committee>
          <name>Ways and Means Committee</name>
          <systemCode>hswm00</systemCode>
        </committee>
        <text>Referred to the House Committee on Ways and Means.</text>
        <actionDate>2017-07-20</actionDate>
      </item>
      <item>
        <links />
        <type>IntroReferral</type>
        <actionCode>Intro-H</actionCode>
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <committee />
        <text>Introduced in House</text>
        <actionDate>2017-07-20</actionDate>
      </item>
      <item>
        <links />
        <type>IntroReferral</type>
        <actionCode>1000</actionCode>
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <committee />
        <text>Introduced in House</text>
        <actionDate>2017-07-20</actionDate>
      </item>
    </actions>
    <summaries>
      <billSummaries />
    </summaries>
    <introducedDate>2017-07-20</introducedDate>
    <committees>
      <billCommittees>
        <item>
          <subcommittees />
          <type>Standing</type>
          <systemCode>hswm00</systemCode>
          <chamber>House</chamber>
          <activities>
            <item>
              <name>Referred to</name>
              <date>2017-07-20T13:04:30Z</date>
            </item>
          </activities>
          <name>Ways and Means Committee</name>
        </item>
      </billCommittees>
    </committees>
    <title>Veterans Jobs Opportunity Act</title>
    <congress>115</congress>
    <calendarNumbers />
    <relatedBills />
    <latestAction>
      <actionDate>2017-07-20</actionDate>
      <text>Referred to the House Committee on Ways and Means.</text>
      <links />
    </latestAction>
    <createDate>2017-07-21T03:11:38Z</createDate>
    <updateDate>2017-10-05T07:16:38Z</updateDate>
    <cboCostEstimates />
    <laws />
    <billNumber>3345</billNumber>
    <version>1.0.0</version>
    <titles>
      <item>
        <parentTitleType />
        <chamberCode />
        <titleType>Short Titles as Introduced</titleType>
        <title>Veterans Jobs Opportunity Act</title>
        <chamberName />
      </item>
      <item>
        <parentTitleType />
        <chamberCode />
        <titleType>Official Title as Introduced</titleType>
        <title>To amend the Internal Revenue Code of 1986 to establish a small business start-up tax credit for veterans creating businesses in underserved communities.</title>
        <chamberName />
      </item>
      <item>
        <parentTitleType />
        <chamberCode />
        <titleType>Display Title</titleType>
        <title>Veterans Jobs Opportunity Act</title>
        <chamberName />
      </item>
      <item>
        <parentTitleType />
        <chamberCode />
        <titleType>(Extracted from GPO) Short Titles as Introduced</titleType>
        <title>Veterans Jobs Opportunity Act</title>
        <chamberName />
      </item>
    </titles>
    <cosponsors>
      <item>
        <identifiers>
          <bioguideId>V000081</bioguideId>
          <lisID>1184</lisID>
          <gpoId>8073</gpoId>
        </identifiers>
        <middleName>M.</middleName>
        <fullName>Rep. Velazquez, Nydia M. [D-NY-7]</fullName>
        <firstName>NYDIA</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>V000081</bioguideId>
        <state>NY</state>
        <lastName>VELAZQUEZ</lastName>
        <district>7</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>H000324</bioguideId>
          <gpoId>7895</gpoId>
          <lisID>511</lisID>
        </identifiers>
        <middleName>L.</middleName>
        <fullName>Rep. Hastings, Alcee L. [D-FL-20]</fullName>
        <firstName>ALCEE</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>H000324</bioguideId>
        <state>FL</state>
        <lastName>HASTINGS</lastName>
        <district>20</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>G000581</bioguideId>
          <gpoId />
          <lisID>2349</lisID>
        </identifiers>
        <middleName />
        <fullName>Rep. Gonzalez, Vicente [D-TX-15]</fullName>
        <firstName>Vicente</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>G000581</bioguideId>
        <state>TX</state>
        <lastName>Gonzalez</lastName>
        <district>15</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <lisID>2298</lisID>
          <bioguideId>E000296</bioguideId>
          <gpoId />
        </identifiers>
        <middleName />
        <fullName>Rep. Evans, Dwight [D-PA-2]</fullName>
        <firstName>Dwight</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>E000296</bioguideId>
        <state>PA</state>
        <lastName>Evans</lastName>
        <district>2</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <lisID>2097</lisID>
          <gpoId>8373</gpoId>
          <bioguideId>P000604</bioguideId>
        </identifiers>
        <middleName>M.</middleName>
        <fullName>Rep. Payne, Donald M., Jr. [D-NJ-10]</fullName>
        <firstName>Donald</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>P000604</bioguideId>
        <state>NJ</state>
        <lastName>Payne</lastName>
        <district>10</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>B001251</bioguideId>
          <lisID>1761</lisID>
          <gpoId>8024</gpoId>
        </identifiers>
        <middleName />
        <fullName>Rep. Butterfield, G. K. [D-NC-1]</fullName>
        <firstName>G. K.</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>B001251</bioguideId>
        <state>NC</state>
        <lastName>Butterfield</lastName>
        <district>1</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>B001300</bioguideId>
          <lisID>2311</lisID>
          <gpoId />
        </identifiers>
        <middleName>Diaz</middleName>
        <fullName>Rep. Barragan, Nanette Diaz [D-CA-44]</fullName>
        <firstName>Nanette</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>B001300</bioguideId>
        <state>CA</state>
        <lastName>Barragan</lastName>
        <district>44</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>W000822</bioguideId>
          <lisID>2259</lisID>
          <gpoId />
        </identifiers>
        <middleName />
        <fullName>Rep. Watson Coleman, Bonnie [D-NJ-12]</fullName>
        <firstName>Bonnie</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>W000822</bioguideId>
        <state>NJ</state>
        <lastName>Watson Coleman</lastName>
        <district>12</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>B000490</bioguideId>
          <lisID>91</lisID>
          <gpoId>7899</gpoId>
        </identifiers>
        <middleName>D.</middleName>
        <fullName>Rep. Bishop, Sanford D., Jr. [D-GA-2]</fullName>
        <firstName>SANFORD</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>B000490</bioguideId>
        <state>GA</state>
        <lastName>BISHOP</lastName>
        <district>2</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>B001285</bioguideId>
          <lisID>2106</lisID>
          <gpoId />
        </identifiers>
        <middleName />
        <fullName>Rep. Brownley, Julia [D-CA-26]</fullName>
        <firstName>Julia</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>B001285</bioguideId>
        <state>CA</state>
        <lastName>Brownley</lastName>
        <district>26</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <gpoId>7528</gpoId>
          <bioguideId>S001170</bioguideId>
          <lisID>1861</lisID>
        </identifiers>
        <middleName />
        <fullName>Rep. Shea-Porter, Carol [D-NH-1]</fullName>
        <firstName>Carol</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>S001170</bioguideId>
        <state>NH</state>
        <lastName>Shea-Porter</lastName>
        <district>1</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <lisID>2010</lisID>
          <bioguideId>H001050</bioguideId>
          <gpoId>7912</gpoId>
        </identifiers>
        <middleName />
        <fullName>Rep. Hanabusa, Colleen [D-HI-1]</fullName>
        <firstName>Colleen</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>H001050</bioguideId>
        <state>HI</state>
        <lastName>Hanabusa</lastName>
        <district>1</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>E000297</bioguideId>
          <lisID>2342</lisID>
          <gpoId />
        </identifiers>
        <middleName />
        <fullName>Rep. Espaillat, Adriano [D-NY-13]</fullName>
        <firstName>Adriano</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>E000297</bioguideId>
        <state>NY</state>
        <lastName>Espaillat</lastName>
        <district>13</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <lisID>2153</lisID>
          <gpoId />
          <bioguideId>B001281</bioguideId>
        </identifiers>
        <middleName />
        <fullName>Rep. Beatty, Joyce [D-OH-3]</fullName>
        <firstName>Joyce</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>B001281</bioguideId>
        <state>OH</state>
        <lastName>Beatty</lastName>
        <district>3</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <gpoId />
          <bioguideId>A000370</bioguideId>
          <lisID>2201</lisID>
        </identifiers>
        <middleName>S.</middleName>
        <fullName>Rep. Adams, Alma S. [D-NC-12]</fullName>
        <firstName>Alma</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>A000370</bioguideId>
        <state>NC</state>
        <lastName>Adams</lastName>
        <district>12</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <lisID>1501</lisID>
          <gpoId>7814</gpoId>
          <bioguideId>L000551</bioguideId>
        </identifiers>
        <middleName />
        <fullName>Rep. Lee, Barbara [D-CA-13]</fullName>
        <firstName>BARBARA</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>L000551</bioguideId>
        <state>CA</state>
        <lastName>LEE</lastName>
        <district>13</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>G000571</bioguideId>
          <gpoId />
          <lisID>2122</lisID>
        </identifiers>
        <middleName />
        <fullName>Rep. Gabbard, Tulsi [D-HI-2]</fullName>
        <firstName>Tulsi</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>G000571</bioguideId>
        <state>HI</state>
        <lastName>Gabbard</lastName>
        <district>2</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <gpoId>8048</gpoId>
          <lisID>887</lisID>
          <bioguideId>P000034</bioguideId>
        </identifiers>
        <middleName />
        <fullName>Rep. Pallone, Frank, Jr. [D-NJ-6]</fullName>
        <firstName>FRANK</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>P000034</bioguideId>
        <state>NJ</state>
        <lastName>PALLONE</lastName>
        <district>6</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>C001067</bioguideId>
          <lisID>1864</lisID>
          <gpoId>8072</gpoId>
        </identifiers>
        <middleName>D.</middleName>
        <fullName>Rep. Clarke, Yvette D. [D-NY-9]</fullName>
        <firstName>Yvette</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>C001067</bioguideId>
        <state>NY</state>
        <lastName>Clarke</lastName>
        <district>9</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>C001110</bioguideId>
          <lisID>2312</lisID>
          <gpoId />
        </identifiers>
        <middleName>Luis</middleName>
        <fullName>Rep. Correa, J. Luis [D-CA-46]</fullName>
        <firstName>J.</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>C001110</bioguideId>
        <state>CA</state>
        <lastName>Correa</lastName>
        <district>46</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <gpoId>7806</gpoId>
          <lisID>1593</lisID>
          <bioguideId>T000460</bioguideId>
        </identifiers>
        <middleName />
        <fullName>Rep. Thompson, Mike [D-CA-5]</fullName>
        <firstName>MIKE</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>T000460</bioguideId>
        <state>CA</state>
        <lastName>THOMPSON</lastName>
        <district>5</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>S001200</bioguideId>
          <lisID>2319</lisID>
          <gpoId />
        </identifiers>
        <middleName />
        <fullName>Rep. Soto, Darren [D-FL-9]</fullName>
        <firstName>Darren</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>S001200</bioguideId>
        <state>FL</state>
        <lastName>Soto</lastName>
        <district>9</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <lisID>2166</lisID>
          <bioguideId>V000131</bioguideId>
          <gpoId />
        </identifiers>
        <middleName>A.</middleName>
        <fullName>Rep. Veasey, Marc A. [D-TX-33]</fullName>
        <firstName>Marc</firstName>
        <sponsorshipDate>2017-07-20</sponsorshipDate>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>V000131</bioguideId>
        <state>TX</state>
        <lastName>Veasey</lastName>
        <district>33</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <lisID>462</lisID>
          <bioguideId>G000410</bioguideId>
          <gpoId>8185</gpoId>
        </identifiers>
        <middleName />
        <fullName>Rep. Green, Gene [D-TX-29]</fullName>
        <firstName>GENE</firstName>
        <sponsorshipDate>2017-07-24</sponsorshipDate>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <bioguideId>G000410</bioguideId>
        <state>TX</state>
        <lastName>GREEN</lastName>
        <district>29</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <lisID>1774</lisID>
          <gpoId>7825</gpoId>
          <bioguideId>C001059</bioguideId>
        </identifiers>
        <middleName />
        <fullName>Rep. Costa, Jim [D-CA-16]</fullName>
        <firstName>Jim</firstName>
        <sponsorshipDate>2017-07-28</sponsorshipDate>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <bioguideId>C001059</bioguideId>
        <state>CA</state>
        <lastName>Costa</lastName>
        <district>16</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>T000472</bioguideId>
          <lisID>2110</lisID>
          <gpoId />
        </identifiers>
        <middleName />
        <fullName>Rep. Takano, Mark [D-CA-41]</fullName>
        <firstName>Mark</firstName>
        <sponsorshipDate>2017-07-28</sponsorshipDate>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <bioguideId>T000472</bioguideId>
        <state>CA</state>
        <lastName>Takano</lastName>
        <district>41</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>B001304</bioguideId>
          <lisID>2331</lisID>
          <gpoId />
        </identifiers>
        <middleName>G.</middleName>
        <fullName>Rep. Brown, Anthony G. [D-MD-4]</fullName>
        <firstName>Anthony</firstName>
        <sponsorshipDate>2017-07-28</sponsorshipDate>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <bioguideId>B001304</bioguideId>
        <state>MD</state>
        <lastName>Brown</lastName>
        <district>4</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>W000808</bioguideId>
          <lisID>2004</lisID>
          <gpoId>7889</gpoId>
        </identifiers>
        <middleName>S.</middleName>
        <fullName>Rep. Wilson, Frederica S. [D-FL-24]</fullName>
        <firstName>Frederica</firstName>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <bioguideId>W000808</bioguideId>
        <state>FL</state>
        <lastName>Wilson</lastName>
        <district>24</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <lisID>1504</lisID>
          <bioguideId>M000312</bioguideId>
          <gpoId>7968</gpoId>
        </identifiers>
        <middleName>P.</middleName>
        <fullName>Rep. McGovern, James P. [D-MA-2]</fullName>
        <firstName>JAMES</firstName>
        <sponsorshipDate>2017-09-26</sponsorshipDate>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <bioguideId>M000312</bioguideId>
        <state>MA</state>
        <lastName>MCGOVERN</lastName>
        <district>2</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <bioguideId>D000627</bioguideId>
          <lisID>2320</lisID>
          <gpoId />
        </identifiers>
        <middleName>Butler</middleName>
        <fullName>Rep. Demings, Val Butler [D-FL-10]</fullName>
        <firstName>Val</firstName>
        <sponsorshipDate>2017-10-04</sponsorshipDate>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <bioguideId>D000627</bioguideId>
        <state>FL</state>
        <lastName>Demings</lastName>
        <district>10</district>
        <party>D</party>
        <sponsorshipWithdrawnDate />
      </item>
    </cosponsors>
    <notes />
    <amendments />
    <committeeReports />
    <originChamber>House</originChamber>
  </bill>
  <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:format>text/xml</dc:format>
    <dc:language>EN</dc:language>
    <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights>
    <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor>
    <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description>
  </dublinCore>
</billStatus>


text:
using System;
using System.Collections.Generic;
using Microsoft.Extensions.Logging;
using Orleans.Runtime;
using Orleans.Streams;

namespace Orleans.Providers.Streams.Common
{
    /// <summary>
    /// Cursor into a simple queue cache
    /// </summary>
    public class SimpleQueueCacheCursor : IQueueCacheCursor
    {
        private readonly IStreamIdentity streamIdentity;
        private readonly SimpleQueueCache cache;
        private readonly ILogger logger;
        private IBatchContainer current; // this is a pointer to the current element in the cache. It is what will be returned by GetCurrent().

        // This is a pointer to the NEXT element in the cache.
        // After the cursor is first created it should be called MoveNext before the call to GetCurrent().
        // After MoveNext returns, the current points to the current element that will be returned by GetCurrent()
        // and Element will point to the next element (since MoveNext actualy advanced it to the next).
        internal LinkedListNode<SimpleQueueCacheItem> Element { get; private set; }
        internal StreamSequenceToken SequenceToken { get; private set; }

        internal bool IsSet => Element != null;

        internal void Set(LinkedListNode<SimpleQueueCacheItem> item)
        {
            if (item == null) throw new NullReferenceException(nameof(item));
            Element = item;
            SequenceToken = item.Value.SequenceToken;
        }

        internal void UnSet(StreamSequenceToken token)
        {
            Element = null;
            SequenceToken = token;
        }

        /// <summary>
        /// Cursor into a simple queue cache
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="streamIdentity"></param>
        /// <param name="logger"></param>
        public SimpleQueueCacheCursor(SimpleQueueCache cache, IStreamIdentity streamIdentity, ILogger logger)
        {
            if (cache == null)
            {
                throw new ArgumentNullException(nameof(cache));
            }
            this.cache = cache;
            this.streamIdentity = streamIdentity;
            this.logger = logger;
            current = null;
            SimpleQueueCache.Log(logger, "SimpleQueueCacheCursor New Cursor for {0}, {1}", streamIdentity.Guid, streamIdentity.Namespace);
        }

        /// <summary>
        /// Get the current value.
        /// </summary>
        /// <param name="exception"></param>
        /// <returns>
        /// Returns the current batch container.
        /// If null then the stream has completed or there was a stream error.
        /// If there was a stream error, an error exception will be provided in the output.
        /// </returns>
        public virtual IBatchContainer GetCurrent(out Exception exception)
        {
            SimpleQueueCache.Log(logger, "SimpleQueueCacheCursor.GetCurrent: {0}", current);

            exception = null;
            return current;
        }

        /// <summary>
        /// Move to next message in the stream.
        /// If it returns false, there are no more messages.  The enumerator is still
        ///  valid howerver and can be called again when more data has come in on this
        ///  stream.
        /// </summary>
        /// <returns></returns>
        public virtual bool MoveNext()
        {
            IBatchContainer next;
            while (cache.TryGetNextMessage(this, out next))
            {
                if(IsInStream(next))
                    break;
            }
            if (!IsInStream(next))
                return false;

            current = next;
            return true;
        }

        /// <summary>
        /// Refresh that cache cursor. Called when new data is added into a cache.
        /// </summary>
        /// <returns></returns>
        public virtual void Refresh(StreamSequenceToken sequenceToken)
        {
            if (!IsSet)
            {
                cache.RefreshCursor(this, sequenceToken);
            }
        }

        /// <summary>
        /// Record that delivery of the current event has failed
        /// </summary>
        public void RecordDeliveryFailure()
        {
            if (IsSet && current != null)
            {
                Element.Value.DeliveryFailure = true;
            }
        }

        private bool IsInStream(IBatchContainer batchContainer)
        {
            return batchContainer != null &&
                    batchContainer.StreamGuid.Equals(streamIdentity.Guid) &&
                    string.Equals(batchContainer.StreamNamespace, streamIdentity.Namespace);
        }

        #region IDisposable Members

        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public void Dispose()
        {
            Dispose(true);
        }

        /// <summary>
        /// Clean up cache data when done
        /// </summary>
        /// <param name="disposing"></param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                cache.UnsetCursor(this, null);
            }
        }

        #endregion

        /// <summary>
        /// Convert object to string
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return $"<SimpleQueueCacheCursor: Element={Element?.Value.Batch.ToString() ?? "null"}, SequenceToken={SequenceToken?.ToString() ?? "null"}>";
        }
    }
}


text:
layout: base
title: Overview
---

KAAZING WebSocket Intercloud Connect

On-demand, Secure Hybrid Cloud Connectivity

On-demand, Secure Hybrid Cloud Connectivity

      KAAZING WebSocket Intercloud Connect (KWIC) offers on-demand, secure hybrid cloud connectivity. It allows companies to safely extend the reach of their enterprise services to their partners and customers without the complexity or expense of additional networking
      products or technologies.

 KWIC is based on the KAAZING Gateway, an industry-standard foundation that powers other KAAZING offerings. This Gateway leverages modern web standards such as WebSocket, HTTP and TLS (SSL) encryption. It allows customers to connect
      enterprise services natively, securely and on-demand. KWIC extends infrastructure-to-infrastructure connectivity further by providing additional enterprise features, such as secure end-to-end connections, authentication interfaces
      and DMZ-friendly installation. In addition, customers can also close 100% of all incoming ports to deter hacker attacks and still have native (full-duplex) connectivity.

 KWIC was created to help customers reduce the friction or drag on connectivity when there is a need to broaden the reach of their services beyond the corporate firewall to the extended enterprise. It uses the standard web model of on-demand,
      secure connections, so it is very cloud and data-center friendly.

 KWIC contains no business logic, so it can easily be installed in the DMZ layer, or even daisy-chained across multiple DMZ layers. Configuration is very straightforward using a simple file-based tool.

 KWIC allows SaaS providers to securely access services from the cloud to their customers' computing environment without additional hardware or hard-to-manage software. This feature dramatically shortens any on-boarding process for SaaS providers
      and enhances the time-to-revenue for the SaaS provider. And since KWIC constrains the connection to a specific service and also can shut down all incoming ports, the level of security is significantly higher than legacy cross-firewall networking
      tools.

 KWIC is an effective hybrid cloud tool that offers real-time agility to both service providers and their customers by leveraging the standards and flexibility of the web.


text:
FROM cyphermaster/jenkins-slave:latest
MAINTAINER Bernard Brandl <github@nanard.org>
# install latest CFEngine, passive node only
RUN wget "http://s3.amazonaws.com/cfengine.package-repos/community_binaries/cfengine-community_3.6.4-1_amd64.deb" -O/tmp/cf.deb
RUN /usr/bin/dpkg -i /tmp/cf.deb
RUN /var/cfengine/bin/cf-key
# don't bother cfengine with network stuff.
RUN echo 'eth.*' > /var/cfengine/inputs/ignore_interfaces.rx
#ADD run.sh /root/

# boostrap on docker bridge, ignore if server isn't present
#RUN /var/cfengine/bin/cf-agent -B 172.17.42.1 ; exit 0
#ENTRYPOINT ["/var/cfengine/bin/cf-execd","-F"]
RUN echo "root:toor" | chpasswd

# Test Managed by jenkins for now
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]


text:
package reborncore.common.util;

import net.minecraft.util.DefaultedList;

import java.util.Collections;
import java.util.EnumSet;
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.BinaryOperator;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collector;

//Taken from https://github.com/The-Acronym-Coders/BASE/blob/develop/1.12.0/src/main/java/com/teamacronymcoders/base/util/collections/NonnullListCollector.java, thanks for this ;)
public class DefaultedListCollector<T> implements Collector<T, DefaultedList<T>, DefaultedList<T>> {

	private final Set<Characteristics> CH_ID = Collections.unmodifiableSet(EnumSet.of(Characteristics.IDENTITY_FINISH));

	public static <T> DefaultedListCollector<T> toList() {
		return new DefaultedListCollector<>();
	}

	@Override
	public Supplier<DefaultedList<T>> supplier() {
		return DefaultedList::of;
	}

	@Override
	public BiConsumer<DefaultedList<T>, T> accumulator() {
		return DefaultedList::add;
	}

	@Override
	public BinaryOperator<DefaultedList<T>> combiner() {
		return (left, right) -> {
			left.addAll(right);
			return left;
		};
	}

	@Override
	public Function<DefaultedList<T>, DefaultedList<T>> finisher() {
		return i -> (DefaultedList<T>) i;
	}

	@Override
	public Set<Characteristics> characteristics() {
		return CH_ID;
	}
}


text:
using System;
using System.Windows;
using System.Windows.Data;

namespace Toxy.Converters
{
    public class BoolToVisibilityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            bool selected = (bool)value;
            return selected ? Visibility.Visible : Visibility.Collapsed;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return null;
        }
    }
}


text:
/**
 * Контроллер кнопки poem.
 *
 * @author dew1983@mail.ru <Suvorov Andrey M.>
 */

Ext.define(
	'FBEditor.view.panel.main.editor.button.poem.PoemController',
	{
		extend: 'FBEditor.view.panel.main.editor.button.UnboundedButtonController',
		alias: 'controller.main.editor.button.poem'
	}
);


text:
using NUnit.Framework;
using GearboxComputer;
using Moq;
using GearboxContracts;

namespace Code.Tests.ValidatorTests
{
    [TestFixture]
    public class IsGearboxValidMethod
    {
        [Test]
        [TestCase(0)]
        [TestCase(-6)]

        public void ShouldReturnFalse_IfGearboxCountValueIsLessThanOrEqualToZero(int valueOfGearsCount)
        {
            // Arrange
            var gearbox = new Mock<IGearBox>();
            gearbox.Setup(m => m.GearsCount).Returns(valueOfGearsCount);

            // Act
            var isGearboxValid = Validator.IsGearboxValid(gearbox.Object);

            // Assert
            Assert.IsFalse(isGearboxValid);
        }

        [Test]
        public void ShouldReturnTrue_IfGearboxCountValueIsCorrect()
        {
            // Arrange
            var gearbox = new Mock<IGearBox>();
            gearbox.Setup(m => m.GearsCount).Returns(4);

            // Act
            var isGearboxValid = Validator.IsGearboxValid(gearbox.Object);

            // Assert
            Assert.IsTrue(isGearboxValid);
        }
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ArgPosition (Core API 1.1.1 API)</title>
<meta name="date" content="2018-01-24">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Cyc Core API

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.cyc.kb

Interface ArgPosition

public interface ArgPosition

Method Summary

All Methods Instance Methods Abstract Methods

Modifier and Type
Method and Description

ArgPosition
deepCopy()

int
depth()

Get the nesting depth of this arg position.

ArgPosition
extend(ArgPosition otherArgPos)

Destructively extend this arg position by another arg position.

ArgPosition
extend(Integer argnum)

Destructively extend this arg position by one argnum.

Integer
first()

Get the first element in this arg position's path.

List<Integer>
getPath()

Get the list of argnums for this arg position, from top level to deepest level.

boolean
isPrefixOf(ArgPosition otherArgPositionI)

Check if this arg position is for an ancestor of another arg position.

Integer
last()

Get the argnum of the designated argument in its immediate context.

boolean
matchingArgPosition(ArgPosition candidate,
                   boolean matchEmpty)

Does this arg position match candidate?

String
stringApiValue()

ArgPosition
toParent()

Destructively modify this ArgPosition to be its parent arg position.

Method Detail

deepCopy

ArgPosition deepCopy()

depth

int depth()

Get the nesting depth of this arg position. Top-level argument positions have depth 1.

Returns:

the nesting depth of this arg position

extend

ArgPosition extend(ArgPosition otherArgPos)

Destructively extend this arg position by another arg position.

Returns:

this ArgPosition.

extend

ArgPosition extend(Integer argnum)

Destructively extend this arg position by one argnum.

Returns:

this ArgPosition.

first

Integer first()

Get the first element in this arg position's path. This is the argument number of the argument
 of the top-level formula that contains this position.

Returns:

the argument number.

getPath

List<Integer> getPath()

Get the list of argnums for this arg position, from top level to deepest level.

Returns:

the list of argnums for this arg position,

isPrefixOf

boolean isPrefixOf(ArgPosition otherArgPositionI)

Check if this arg position is for an ancestor of another arg position.

Returns:

true iff his arg position is for an ancestor of otherArgPosition

last

Integer last()

Get the argnum of the designated argument in its immediate context.

Returns:

the argnum of the designated argument

matchingArgPosition

boolean matchingArgPosition(ArgPosition candidate,
                            boolean matchEmpty)

Does this arg position match candidate?

Parameters:

matchEmpty - Should we match the null arg position?

Returns:

true iff this arg position matches candidate

toParent

ArgPosition toParent()

Destructively modify this ArgPosition to be its parent arg position.

Returns:

this ArgPosition.

stringApiValue

String stringApiValue()

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Cyc Core API

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2015–2018 Cycorp, Inc. All rights reserved.


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>Slothful Designs Admin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" >
<meta name="theme-color" content="#121212" />
<link rel='stylesheet' href='css/style.css' type='text/css'/>
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,700" rel="stylesheet">


text:
package main

import (
	"fmt"
)

func main() {
	ad := admin{user{"小张", "xiaozhang@gmail.com"}, "管理员"}
	fmt.Println("可以直接调用,名字为:", ad.name)
	fmt.Println("可以直接调用,邮箱为:", ad.email)
	fmt.Println("也可以通过内部类型调用,名字为:", ad.user.name)
	fmt.Println("也可以通过内部类型调用,邮箱为:", ad.user.email)
	fmt.Println("但是新增加的属性只能直接调用,级别为:", ad.level)

	ad.user.sayHello()
	ad.sayHello()

	// 如果内部类型实现了某个接口,那么外部类型也被认为实现了这个接口。
	sayHello(ad.user)
	sayHello(ad)
}

type user struct {
	name  string
	email string
}

type admin struct {
	user
	level string
}

// Hello hello interface
type Hello interface {
	hello()
}

func sayHello(h Hello) {
	h.hello()
}

func (u user) hello() {
	fmt.Println("Hello, i am a user")
}

func (a admin) hello() {
	fmt.Println("Hello, i am a admin")
}

func (u user) sayHello() {
	fmt.Println("Hello, i am a user")
}

func (a admin) sayHello() {
	fmt.Println("Hello, i am a admin")
}

// 以下是 io 标准包的定义。

// Reader reader
type Reader interface {
	Read(p []byte) (n int, err error)
}

// Writer writer
type Writer interface {
	Write(p []byte) (n int, err error)
}

// Closer closer
type Closer interface {
	Close() error
}

// ReadWriter readwriter
type ReadWriter interface {
	Reader
	Writer
}

// ReadCloser readcloser
type ReadCloser interface {
	Reader
	Closer
}

// WriteCloser writecloser
type WriteCloser interface {
	Writer
	Closer
}


text:
<assembly name="System.Runtime.InteropServices">
  <member name="T:System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute">
    <attribute ctor="M:JetBrains.Annotations.MeansImplicitUseAttribute.#ctor" />
  </member>
</assembly>


text:
package net.dempsy.lifecycle.annotations;

import java.util.List;

import net.dempsy.lifecycle.annotation.Activation;
import net.dempsy.lifecycle.annotation.BulkMessageHandler;
import net.dempsy.lifecycle.annotation.Evictable;
import net.dempsy.lifecycle.annotation.MessageHandler;
import net.dempsy.lifecycle.annotation.MessageKey;
import net.dempsy.lifecycle.annotation.MessageType;
import net.dempsy.lifecycle.annotation.Mp;
import net.dempsy.lifecycle.annotation.Passivation;

public class TestMps {
    @Mp
    public static class TestMp implements Cloneable {
        public boolean activated = false;
        public boolean passivateCalled = false;

        @MessageHandler
        public void handleMsg(final Message val) {}

        @Activation
        public void activate(final String key, final byte[] data) {
            this.activated = true;
        }

        @Passivation
        public byte[] passivate() {
            passivateCalled = true;
            return "passivate".getBytes();
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpActivateWithMessage implements Cloneable {
        public boolean activated = false;
        public boolean passivateCalled = false;
        public Message message = null;

        @MessageHandler
        public void handleMsg(final Message val) {}

        @Activation
        public void activate(final String key, final byte[] data, final Object message) {
            this.activated = true;
            this.message = (Message)message;
        }

        @Passivation
        public byte[] passivate() {
            passivateCalled = true;
            return "passivate".getBytes();
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpActivateWithMessageOnly implements Cloneable {
        public boolean activated = false;
        public boolean passivateCalled = false;
        public Message message = null;

        @MessageHandler
        public void handleMsg(final Message val) {}

        @Activation
        public void activate(final Object message) {
            this.activated = true;
            this.message = (Message)message;
        }

        @Passivation
        public byte[] passivate() {
            passivateCalled = true;
            return "passivate".getBytes();
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpEmptyActivate implements Cloneable {
        public boolean activated = false;
        public boolean passivateCalled = false;

        @MessageHandler
        public void handleMsg(final Message val) {}

        @Activation
        public void activate() {
            this.activated = true;
        }

        @Passivation
        public void passivate() {
            passivateCalled = true;
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpOnlyKey implements Cloneable {
        public boolean activated = false;
        public boolean passivateCalled = false;

        @MessageHandler
        public void handleMsg(final Message val) {}

        @Activation
        public void activate(final String key) {
            this.activated = true;
        }

        @Passivation
        public byte[] passivate() {
            passivateCalled = true;
            return "passivate".getBytes();
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpExtraParameters implements Cloneable {
        public boolean activated = false;
        public boolean passivateCalled = false;

        @MessageHandler
        public void handleMsg(final Message val) {}

        @Activation
        public void activate(final String key, final byte[] data, final String arg1, final String arg2) {
            this.activated = true;
        }

        @Passivation
        public byte[] passivate(final String key, final byte[] data, final String arg1, final String arg2) {
            passivateCalled = true;
            return "passivate".getBytes();
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpChangedOrder implements Cloneable {
        public boolean activated = false;
        public boolean passivateCalled = false;

        @MessageHandler
        public void handleMsg(final Message val) {}

        @Activation
        public void activate(final byte[] data, final String key) {
            this.activated = true;
        }

        @Passivation
        public void passivate() {
            passivateCalled = true;
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpNoActivation implements Cloneable {
        public final boolean activated = false;
        public final boolean passivateCalled = false;

        @MessageHandler
        public void handleMsg(final Message val) {}

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @MessageType
    public static class Message {
        private final String key;

        public Message(final String key) {
            this.key = key;
        }

        @MessageKey
        public String getKey() {
            return this.key;
        }

    }

    public static class MessageNoTypeInfo {
        private final String key;

        public MessageNoTypeInfo(final String key) {
            this.key = key;
        }

        @MessageKey
        public String getKey() {
            return this.key;
        }

    }

    @MessageType
    public static class InheritMethodTypeAnnotation {}

    @MessageType
    public static class MessgeNoKey extends InheritMethodTypeAnnotation {
        private final String key;

        public MessgeNoKey(final String key) {
            this.key = key;
        }

        public String getKey() {
            return this.key;
        }
    }

    @Mp
    public static class TestMpNoKey implements Cloneable {
        public final boolean activated = false;
        public final boolean passivateCalled = false;

        @MessageHandler
        public void handleMsg(final MessgeNoKey val) {}

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @MessageType("Message")
    @Mp
    public static class TestMpMessageTypeClass implements Cloneable {
        @MessageHandler
        public void handleMsg(final MessageNoTypeInfo val) {}

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpWithReturn implements Cloneable {

        @MessageHandler
        public Message handleMsg(final Message val) {
            return new Message("Yo");
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpWithOnlyBulk implements Cloneable {

        @BulkMessageHandler
        public void handleMsgs(final List<Message> val) {

        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpEvictionNative implements Cloneable {

        @MessageHandler
        public void handleMsg(final Message val) {}

        @Evictable
        public boolean evict() {
            return true;
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpEvictionObj implements Cloneable {

        @MessageHandler
        public void handleMsg(final Message val) {}

        @Evictable
        public Boolean evict() {
            return true;
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

    @Mp
    public static class TestMpEvictionNoReturn implements Cloneable {

        @MessageHandler
        public void handleMsg(final Message val) {}

        @Evictable
        public void evict() {}

        @Override
        public Object clone() throws CloneNotSupportedException {
            return super.clone();
        }
    }

}


text:
using namespace mage;

//---------------------------------------
HashBufferJob::HashBufferJob( const char* buffer,
	const std::string& onCompletedEvenName,
	Job::JobPriority priority )
	: Job( priority, Job::JOB_GENERIC )
	, mBuffer( buffer )
	, mEventName( onCompletedEvenName )
	, mHash( 0 )
{}
//---------------------------------------
HashBufferJob::~HashBufferJob()
{}
//---------------------------------------
void HashBufferJob::OnExecute()
{
	//mHash = GenerateHash( mBuffer );
}
//---------------------------------------
void HashBufferJob::OnCompletetion()
{
	Dictionary params;

	params.Set( "Buffer", mBuffer );
	params.Set( "Hash", mHash );

	EventManager::FireEvent( mEventName, params );
}
//---------------------------------------


text:
/* global exports, require */

const roomRegistry = require('./../mdb/roomRegistry');
const serviceRegistry = require('./../mdb/serviceRegistry');

const logger = require('./../logger').logger;

// Logger
const log = logger.getLogger('RoomsResource');

/*
 * Post Room. Creates a new room for a determined service.
 */
exports.createRoom = (req, res) => {
  let room;

  const currentService = req.service;

  if (currentService === undefined) {
    res.status(404).send('Service not found');
    return;
  }
  if (req.body.name === undefined) {
    log.info('message: createRoom - invalid room name');
    res.status(400).send('Invalid room');
    return;
  }

  req.body.options = req.body.options || {};

  if (req.body.options.test) {
    if (currentService.testRoom !== undefined) {
      log.info(`message: testRoom already exists, serviceId: ${currentService.name}`);
      res.send(currentService.testRoom);
    } else {
      room = { name: 'testRoom' };
      roomRegistry.addRoom(room, (result) => {
        currentService.testRoom = result;
        currentService.rooms.push(result);
        serviceRegistry.addRoomToService(currentService, result);
        log.info(`message: testRoom created, serviceId: ${currentService.name}`);
        res.send(result);
      });
    }
  } else {
    room = { name: req.body.name };

    if (req.body.options.p2p) {
      room.p2p = true;
    }
    if (req.body.options.data) {
      room.data = req.body.options.data;
    }
    if (typeof req.body.options.mediaConfiguration === 'string') {
      room.mediaConfiguration = req.body.options.mediaConfiguration;
    }
    roomRegistry.addRoom(room, (result) => {
      currentService.rooms.push(result);
      serviceRegistry.addRoomToService(currentService, result);
      log.info(`message: createRoom success, roomName:${req.body.name}, ` +
        `serviceId: ${currentService.name}, p2p: ${room.p2p}`);
      res.send(result);
    });
  }
};

/*
 * Get Rooms. Represent a list of rooms for a determined service.
 */
exports.represent = (req, res) => {
  const currentService = req.service;
  if (currentService === undefined) {
    res.status(404).send('Service not found');
    return;
  }
  log.info(`message: representRooms, serviceId: ${currentService._id}`);

  res.send(currentService.rooms);
};


text:
     NAME
	  gluPickMatrix	- define a picking region

     C SPECIFICATION
	  void gluPickMatrix( GLdouble x,
			      GLdouble y,
			      GLdouble delX,
			      GLdouble delY,
			      GLint *viewport )

     PARAMETERS
	  x, y Specify the center of a picking region in window
	       coordinates.

	  delX,	delY
	       Specify the width and height, respectively, of the
	       picking region in window	coordinates.

	  viewport
	       Specifies the current viewport (as from a glGetIntegerv
	       call).

     DESCRIPTION
	  gluPickMatrix	creates	a projection matrix that can be	used
	  to restrict drawing to a small region	of the viewport.  This
	  is typically useful to determine what	objects	are being
	  drawn	near the cursor.  Use gluPickMatrix to restrict
	  drawing to a small region around the cursor.	Then, enter
	  selection mode (with glRenderMode) and rerender the scene.
	  All primitives that would have been drawn near the cursor
	  are identified and stored in the selection buffer.

	  The matrix created by	gluPickMatrix is multiplied by the
	  current matrix just as if glMultMatrix is called with	the
	  generated matrix.  To	effectively use	the generated pick
	  matrix for picking, first call glLoadIdentity	to load	an
	  identity matrix onto the perspective matrix stack.  Then
	  call gluPickMatrix, and finally, call	a command (such	as
	  gluPerspective) to multiply the perspective matrix by	the
	  pick matrix.

	  When using gluPickMatrix to pick NURBS, be careful to	turn
	  off the NURBS	property GLU_AUTO_LOAD_MATRIX.	If
	  GLU_AUTO_LOAD_MATRIX is not turned off, then any NURBS
	  surface rendered is subdivided differently with the pick
	  matrix than the way it was subdivided	without	the pick
	  matrix.

     EXAMPLE
	  When rendering a scene as follows:
	  glMatrixMode(GL_PROJECTION); glLoadIdentity();
	  gluPerspective(...); glMatrixMode(GL_MODELVIEW); /* Draw the
	  scene	*/

	  a portion of the viewport can	be selected as a pick region
	  like this:

	  glMatrixMode(GL_PROJECTION); glLoadIdentity();
	  gluPickMatrix(x, y, width, height, viewport);
	  gluPerspective(...); glMatrixMode(GL_MODELVIEW); /* Draw the
	  scene	*/

     SEE ALSO
	  glGet, glLoadIndentity, glMultMatrix,	glRenderMode,
	  gluPerspective


text:
(function( factory ) {
	"use strict";
	var interValId;
	var intervalIndex = 0;
	var run = function() {
		if ( window.picturefill ) {
			factory( window.picturefill );
		}
		if (window.picturefill || intervalIndex > 9999) {
			clearInterval(interValId);
		}
		intervalIndex++;
	};
	interValId = setInterval(run, 8);

	run();

}( function( picturefill, undefined ) {
	"use strict";

	var document = window.document;
	var pf = picturefill._;
	var knownWidths = {};
	var cfg = pf.cfg;
	var curSrcProp = "currentSrc";
	var setSize = function(width, img, data) {
		var curCandidate = data.curCan;

		if ( width ) {
			img.setAttribute( "width", parseInt(width / curCandidate.res, 10) );
		}
	};
	var loadBg = function(url, img, data) {
		var bgImg, curCandidate, clear;

		if (url in knownWidths) {
			setSize(knownWidths[url], img, data);
		} else {
			clear = function() {
				data.pendingURLSize = null;
				bgImg.onload = null;
				bgImg.onerror = null;
				img = null;
				bgImg = null;
			};

			data.pendingURLSize = url;
			curCandidate = data.curCan;

			if (curCandidate.w) {
				setSize(curCandidate.w, img, data);
			}

			bgImg = document.createElement("img");

			bgImg.onload = function() {
				knownWidths[url] = bgImg.naturalWidth || bgImg.width;
				if (!knownWidths[url]) {
					try {
						document.body.appendChild(bgImg);
						knownWidths[url] = bgImg.offsetWidth || bgImg.naturalWidth || bgImg.width;
						document.body.removeChild(bgImg);
					} catch (e) {}
				}
				if (url === img[curSrcProp]) {
					setSize(knownWidths[url], img, data);
				}
				clear();
			};
			bgImg.onerror = clear;

			bgImg.src = url;

			if (bgImg && bgImg.complete) {
				bgImg.onload();
			}
		}

	};
	var reeval = (function() {
		var running, timer;

		var run = function() {
			var i, len, imgData;
			var imgs = document.getElementsByTagName("img");
			var options = { elements: [] };

			pf.setupRun(options);

			running = false;
			clearTimeout(timer);

			for (i = 0, len = imgs.length; i < len; i++) {
				imgData = imgs[i][pf.ns];

				if (imgData && imgData.curCan) {
					pf.setRes.res(imgData.curCan, imgData.curCan.set.sizes);
					pf.setSize(imgs[i]);
				}
			}

			pf.teardownRun( options );
		};

		return function() {
			if (!running && cfg.addSize) {
				running = true;
				clearTimeout(timer);
				timer = setTimeout(run);
			}
		};

	})();

	if ( !(curSrcProp in document.createElement("img")) ) {
		curSrcProp = "src";
	}

	pf.setSize = function( img ) {
		var url;
		var data = img[ pf.ns ];
		var curCandidate = data.curCan;

		if ( data.dims === undefined ) {
			data.dims = img.getAttribute( "height" ) && img.getAttribute( "width" );
		}

		if ( !cfg.addSize || !curCandidate || data.dims ) {return;}
		url = pf.makeUrl(curCandidate.url);

		if (url === img[curSrcProp] && url !== data.pendingURLSize) {
			loadBg(url, img, data);
		}
	};

	if (window.addEventListener && !pf.supPicture) {
		addEventListener("resize", reeval, false);
	}

	if (!("addSize" in cfg)) {
		cfg.addSize = true;
	} else {
		cfg.addSize = !!cfg.addSize;
	}

	reeval();
}));


text:
package defaults

import (
	"reflect"
	"testing"

	"k8s.io/apimachinery/pkg/api/resource"
	kapi "k8s.io/kubernetes/pkg/api"

	buildadmission "github.com/openshift/origin/pkg/build/admission"
	defaultsapi "github.com/openshift/origin/pkg/build/admission/defaults/api"
	u "github.com/openshift/origin/pkg/build/admission/testutil"
	buildapi "github.com/openshift/origin/pkg/build/api"

	_ "github.com/openshift/origin/pkg/api/install"
)

func TestProxyDefaults(t *testing.T) {
	defaultsConfig := &defaultsapi.BuildDefaultsConfig{
		GitHTTPProxy:  "http",
		GitHTTPSProxy: "https",
		GitNoProxy:    "no",
	}

	admitter := BuildDefaults{defaultsConfig}
	pod := u.Pod().WithBuild(t, u.Build().WithDockerStrategy().AsBuild(), "v1")
	err := admitter.ApplyDefaults((*kapi.Pod)(pod))
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}
	build, _, err := buildadmission.GetBuildFromPod((*kapi.Pod)(pod))
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}

	if build.Spec.Source.Git.HTTPProxy == nil || len(*build.Spec.Source.Git.HTTPProxy) == 0 || *build.Spec.Source.Git.HTTPProxy != "http" {
		t.Errorf("failed to find http proxy in git source")
	}
	if build.Spec.Source.Git.HTTPSProxy == nil || len(*build.Spec.Source.Git.HTTPSProxy) == 0 || *build.Spec.Source.Git.HTTPSProxy != "https" {
		t.Errorf("failed to find http proxy in git source")
	}
	if build.Spec.Source.Git.NoProxy == nil || len(*build.Spec.Source.Git.NoProxy) == 0 || *build.Spec.Source.Git.NoProxy != "no" {
		t.Errorf("failed to find no proxy setting in git source")
	}
}

func TestEnvDefaults(t *testing.T) {
	defaultsConfig := &defaultsapi.BuildDefaultsConfig{
		Env: []kapi.EnvVar{
			{
				Name:  "VAR1",
				Value: "VALUE1",
			},
			{
				Name:  "VAR2",
				Value: "VALUE2",
			},
			{
				Name:  "GIT_SSL_NO_VERIFY",
				Value: "true",
			},
		},
	}

	admitter := BuildDefaults{defaultsConfig}
	pod := u.Pod().WithBuild(t, u.Build().WithSourceStrategy().AsBuild(), "v1")
	err := admitter.ApplyDefaults((*kapi.Pod)(pod))
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}
	build, _, err := buildadmission.GetBuildFromPod((*kapi.Pod)(pod))
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}

	env := getBuildEnv(build)
	var1found, var2found := false, false
	for _, ev := range *env {
		if ev.Name == "VAR1" {
			if ev.Value != "VALUE1" {
				t.Errorf("unexpected value %s", ev.Value)
			}
			var1found = true
		}
		if ev.Name == "VAR2" {
			if ev.Value != "VALUE2" {
				t.Errorf("unexpected value %s", ev.Value)
			}
			var2found = true
		}
	}
	if !var1found {
		t.Errorf("VAR1 not found")
	}
	if !var2found {
		t.Errorf("VAR2 not found")
	}

	gitSSL := false
	for _, ev := range pod.Spec.Containers[0].Env {
		if ev.Name == "VAR1" || ev.Name == "VAR2" {
			t.Errorf("non whitelisted key %v found", ev.Name)
		}
		if ev.Name == "GIT_SSL_NO_VERIFY" {
			gitSSL = true
		}
	}
	if !gitSSL {
		t.Errorf("GIT_SSL_NO_VERIFY key not found")
	}

}

func TestIncrementalDefaults(t *testing.T) {
	bool_t := true
	defaultsConfig := &defaultsapi.BuildDefaultsConfig{
		SourceStrategyDefaults: &defaultsapi.SourceStrategyDefaultsConfig{
			Incremental: &bool_t,
		},
	}

	admitter := BuildDefaults{defaultsConfig}

	pod := u.Pod().WithBuild(t, u.Build().WithSourceStrategy().AsBuild(), "v1")
	err := admitter.ApplyDefaults((*kapi.Pod)(pod))
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}
	build, _, err := buildadmission.GetBuildFromPod((*kapi.Pod)(pod))
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}
	if !*build.Spec.Strategy.SourceStrategy.Incremental {
		t.Errorf("failed to default incremental to true")
	}

	build = u.Build().WithSourceStrategy().AsBuild()
	bool_f := false
	build.Spec.Strategy.SourceStrategy.Incremental = &bool_f
	pod = u.Pod().WithBuild(t, build, "v1")
	err = admitter.ApplyDefaults((*kapi.Pod)(pod))
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}
	build, _, err = buildadmission.GetBuildFromPod((*kapi.Pod)(pod))
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}
	if *build.Spec.Strategy.SourceStrategy.Incremental {
		t.Errorf("should not have overridden incremental to true")
	}

}

func TestLabelDefaults(t *testing.T) {
	tests := []struct {
		buildLabels   []buildapi.ImageLabel
		defaultLabels []buildapi.ImageLabel
		expected      []buildapi.ImageLabel
	}{
		{
			buildLabels:   nil,
			defaultLabels: nil,
			expected:      nil,
		},
		{
			buildLabels: nil,
			defaultLabels: []buildapi.ImageLabel{
				{
					Name:  "distribution-scope",
					Value: "private",
				},
				{
					Name:  "changelog-url",
					Value: "file:///dev/null",
				},
			},
			expected: []buildapi.ImageLabel{
				{
					Name:  "distribution-scope",
					Value: "private",
				},
				{
					Name:  "changelog-url",
					Value: "file:///dev/null",
				},
			},
		},
		{
			buildLabels: []buildapi.ImageLabel{
				{
					Name:  "distribution-scope",
					Value: "private",
				},
				{
					Name:  "changelog-url",
					Value: "file:///dev/null",
				},
			},
			defaultLabels: nil,
			expected: []buildapi.ImageLabel{
				{
					Name:  "distribution-scope",
					Value: "private",
				},
				{
					Name:  "changelog-url",
					Value: "file:///dev/null",
				},
			},
		},
		{
			buildLabels: []buildapi.ImageLabel{
				{
					Name:  "distribution-scope",
					Value: "private",
				},
			},
			defaultLabels: []buildapi.ImageLabel{
				{
					Name:  "distribution-scope",
					Value: "public",
				},
				{
					Name:  "changelog-url",
					Value: "file:///dev/null",
				},
			},
			expected: []buildapi.ImageLabel{
				{
					Name:  "distribution-scope",
					Value: "private",
				},
				{
					Name:  "changelog-url",
					Value: "file:///dev/null",
				},
			},
		},
		{
			buildLabels: []buildapi.ImageLabel{
				{
					Name:  "distribution-scope",
					Value: "private",
				},
			},
			defaultLabels: []buildapi.ImageLabel{
				{
					Name:  "changelog-url",
					Value: "file:///dev/null",
				},
			},
			expected: []buildapi.ImageLabel{
				{
					Name:  "distribution-scope",
					Value: "private",
				},
				{
					Name:  "changelog-url",
					Value: "file:///dev/null",
				},
			},
		},
	}

	for i, test := range tests {
		defaultsConfig := &defaultsapi.BuildDefaultsConfig{
			ImageLabels: test.defaultLabels,
		}

		admitter := BuildDefaults{defaultsConfig}
		pod := u.Pod().WithBuild(t, u.Build().WithImageLabels(test.buildLabels).AsBuild(), "v1")
		err := admitter.ApplyDefaults((*kapi.Pod)(pod))
		if err != nil {
			t.Fatalf("unexpected error: %v", err)
		}
		build := pod.GetBuild(t)
		if err != nil {
			t.Fatalf("unexpected error: %v", err)
		}

		result := build.Spec.Output.ImageLabels
		if !reflect.DeepEqual(result, test.expected) {
			t.Errorf("expected[%d]: %v, got: %v", i, test.expected, result)
		}
	}
}

func TestBuildDefaultsNodeSelector(t *testing.T) {
	tests := []struct {
		name     string
		build    *buildapi.Build
		defaults map[string]string
		expected map[string]string
	}{
		{
			name:     "build - full add",
			build:    u.Build().AsBuild(),
			defaults: map[string]string{"key1": "default1", "key2": "default2"},
			expected: map[string]string{"key1": "default1", "key2": "default2"},
		},
		{
			name:     "build - ignored",
			build:    u.Build().WithNodeSelector(map[string]string{"key1": "value1"}).AsBuild(),
			defaults: map[string]string{"key1": "default1", "key2": "default2"},
			expected: map[string]string{"key1": "value1"},
		},
		{
			name:     "build - empty(non-nil) nodeselector",
			build:    u.Build().WithNodeSelector(map[string]string{}).AsBuild(),
			defaults: map[string]string{"key1": "default1"},
			expected: map[string]string{},
		},
	}

	for _, test := range tests {
		defaults := BuildDefaults{config: &defaultsapi.BuildDefaultsConfig{NodeSelector: test.defaults}}
		pod := u.Pod().WithBuild(t, test.build, "v1")
		// normally the pod will have the nodeselectors from the build, due to the pod creation logic
		// in the build controller flow. fake it out here.
		pod.Spec.NodeSelector = test.build.Spec.NodeSelector
		err := defaults.ApplyDefaults((*kapi.Pod)(pod))
		if err != nil {
			t.Errorf("%s: unexpected error: %v", test.name, err)
		}
		if len(pod.Spec.NodeSelector) != len(test.expected) {
			t.Errorf("%s: incorrect number of selectors, expected %v, got %v", test.name, test.expected, pod.Spec.NodeSelector)
		}
		for k, v := range pod.Spec.NodeSelector {
			if ev, ok := test.expected[k]; !ok || ev != v {
				t.Errorf("%s: incorrect selector value for key %s, expected %s, got %s", test.name, k, ev, v)
			}
		}
	}
}

func TestBuildDefaultsAnnotations(t *testing.T) {
	tests := []struct {
		name        string
		build       *buildapi.Build
		annotations map[string]string
		defaults    map[string]string
		expected    map[string]string
	}{
		{
			name:        "build - nil annotations",
			build:       u.Build().AsBuild(),
			annotations: nil,
			defaults:    map[string]string{"key1": "default1", "key2": "default2"},
			expected:    map[string]string{"key1": "default1", "key2": "default2"},
		},
		{
			name:        "build - full add",
			build:       u.Build().AsBuild(),
			annotations: map[string]string{"key3": "value3"},
			defaults:    map[string]string{"key1": "default1", "key2": "default2"},
			expected:    map[string]string{"key1": "default1", "key2": "default2", "key3": "value3"},
		},
		{
			name:        "build - partial add",
			build:       u.Build().AsBuild(),
			annotations: map[string]string{"key1": "value1"},
			defaults:    map[string]string{"key1": "default1", "key2": "default2"},
			expected:    map[string]string{"key1": "value1", "key2": "default2"},
		},
	}

	for _, test := range tests {
		defaults := BuildDefaults{config: &defaultsapi.BuildDefaultsConfig{Annotations: test.defaults}}
		pod := u.Pod().WithBuild(t, test.build, "v1")
		pod.Annotations = test.annotations
		err := defaults.ApplyDefaults((*kapi.Pod)(pod))
		if err != nil {
			t.Errorf("%s: unexpected error: %v", test.name, err)
		}
		if len(pod.Annotations) != len(test.expected) {
			t.Errorf("%s: incorrect number of annotations, expected %v, got %v", test.name, test.expected, pod.Annotations)
		}
		for k, v := range pod.Annotations {
			if ev, ok := test.expected[k]; !ok || ev != v {
				t.Errorf("%s: incorrect annotation value for key %s, expected %s, got %s", test.name, k, ev, v)
			}
		}
	}
}
func TestResourceDefaults(t *testing.T) {
	tests := map[string]struct {
		DefaultResource  kapi.ResourceRequirements
		BuildResource    kapi.ResourceRequirements
		ExpectedResource kapi.ResourceRequirements
	}{
		"BuildDefaults plugin and Build object both defined resource limits and requests": {
			DefaultResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("10"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("1G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("20"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("2G"),
				},
			},
			BuildResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("30"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("3G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("40"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("4G"),
				},
			},
			ExpectedResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("30"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("3G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("40"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("4G"),
				},
			},
		},
		"BuildDefaults plugin defined limits and requests, Build object defined resource requests": {
			DefaultResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("10"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("1G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("20"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("2G"),
				},
			},
			BuildResource: kapi.ResourceRequirements{
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("30"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("3G"),
				},
			},
			ExpectedResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("10"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("1G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("30"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("3G"),
				},
			},
		},
		"BuildDefaults plugin defined limits and requests, Build object defined resource limits": {
			DefaultResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("10"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("1G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("20"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("2G"),
				},
			},
			BuildResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("30"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("3G"),
				},
			},
			ExpectedResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("30"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("3G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("2G"),
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("20"),
				},
			},
		},
		"BuildDefaults plugin defined nothing, Build object defined resource limits": {
			DefaultResource: kapi.ResourceRequirements{},
			BuildResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("10"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("1G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("20"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("2G"),
				},
			},
			ExpectedResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("10"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("1G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("20"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("2G"),
				},
			},
		},
		"BuildDefaults plugin and Build object defined nothing": {
			DefaultResource:  kapi.ResourceRequirements{},
			BuildResource:    kapi.ResourceRequirements{},
			ExpectedResource: kapi.ResourceRequirements{},
		},
		"BuildDefaults plugin defined limits and requests, Build object defined nothing": {
			DefaultResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("10"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("1G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("20"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("2G"),
				},
			},
			BuildResource: kapi.ResourceRequirements{},
			ExpectedResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("10"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("1G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("20"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("2G"),
				},
			},
		},
		"BuildDefaults plugin defined part of limits and requests, Build object defined part of limits and  requests": {
			DefaultResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU): resource.MustParse("10"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("2G"),
				},
			},
			BuildResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("1G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU): resource.MustParse("30"),
				},
			},
			ExpectedResource: kapi.ResourceRequirements{
				Limits: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("10"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("1G"),
				},
				Requests: kapi.ResourceList{
					kapi.ResourceName(kapi.ResourceCPU):    resource.MustParse("30"),
					kapi.ResourceName(kapi.ResourceMemory): resource.MustParse("2G"),
				},
			},
		},
	}

	for name, test := range tests {
		defaults := BuildDefaults{config: &defaultsapi.BuildDefaultsConfig{Resources: test.DefaultResource}}

		build := u.Build().WithSourceStrategy().AsBuild()
		build.Spec.Resources = test.BuildResource
		pod := u.Pod().WithBuild(t, build, "v1")

		// normally the buildconfig resources would be applied to the pod
		// when it was created, but this pod didn't get created by the normal
		// pod creation flow, so fake this out.
		for i := range pod.Spec.Containers {
			pod.Spec.Containers[i].Resources = test.BuildResource
		}
		err := defaults.ApplyDefaults((*kapi.Pod)(pod))
		if err != nil {
			t.Fatalf("%v :unexpected error: %v", name, err)
		}
		build, _, err = buildadmission.GetBuildFromPod((*kapi.Pod)(pod))
		if err != nil {
			t.Fatalf("%v :unexpected error: %v", name, err)
		}
		if !kapi.Semantic.DeepEqual(test.ExpectedResource, build.Spec.Resources) {
			t.Fatalf("%v:Build resource expected expected=actual, %#v != %#v", name, test.ExpectedResource, build.Spec.Resources)
		}
		for i := range pod.Spec.Containers {
			if !kapi.Semantic.DeepEqual(test.ExpectedResource, pod.Spec.Containers[i].Resources) {
				t.Fatalf("%v:Pod container %d resource expected expected=actual, got expected:\n%#v\nactual:\n%#v", name, i, test.ExpectedResource, pod.Spec.Containers[i].Resources)
			}
		}
	}
}


text:
package uk.co.jameseuesden.eightpuzzle;

import java.util.Scanner;

/**
 *
Link between the Main method and the rest of the application,
 * in particular the class to open the Files for getting the start
 * and goal states of the 8 puzzle.
 *

 * @author James Euesden - jee22
 *
 */
public class Driver {
    private FileHandler fH;
    private String startGrid;
    private String goalGrid;
    private Solver solver;
    private Scanner scan;

    /**
     *
New Driver loads in the files and solves the
     * puzzle
     *

     * @param start The users requested start state file
     * @param goal The users requested goal state file
     * @param mode The users requested mode
     */
    public Driver(String start, String goal, String mode){
        fH = new FileHandler();
        loadPuzzle(start, goal);
        // Assuming the files are not null
        if(startGrid != null && goalGrid != null && mode != null){
            solvePuzzle(mode);
            startGrid = null;
            goalGrid = null;
        }
    }

    /**
     *
Loads the puzzle files into the class.
     *

     * @param start
     * @param goal
     */
    private void loadPuzzle(String start, String goal){
     // Open the files requested
        startGrid = fH.readFile(fH.transmogrify(start));
        goalGrid = fH.readFile(fH.transmogrify(goal));
    }

    /**
     *
Uses the data from the files and given mode to
     * solve the puzzle in Solver class. Also keeps track
     * of the run time of the solve.
     *

     * @param mode
     */
    private void solvePuzzle(String mode){
        // Start timer
        long startTime = System.currentTimeMillis();
        // Make a new solver based on the input.
        solver = new Solver(startGrid, goalGrid, mode);
        solver.begin();
        // Stop the timer after the solver and inform user.
        long endTime   = System.currentTimeMillis();
        long totalTime = endTime - startTime;
        System.out.println("Runtime: " + totalTime + "ms");
        // Ask the user if they want to solve another puzzle.
        solveAgain();
    }

    /**
     *
Gets input from the user if they want to solve the
     * puzzle again using another method, or new files.
     *

     */
    private void solveAgain(){
        System.out.println("Run puzzle again? (y/n)");
        scan = new Scanner(System.in);
        if(scan.next().equals("y")){
            System.out.println("Start file?");
            String start = scan.next();
            System.out.println("Goal file?");
            String goal = scan.next();
            System.out.println("Mode? (bfs/dfs/astar1/astar2)");
            String mode = scan.next();
            loadPuzzle(start,goal);
            solvePuzzle(mode);
        }
        else {
            System.exit(0);
        }
    }
}


text:
package org.web3j.protocol.ipc;

/**
 * Windows named pipe implementation of our services API.
 *
 * <p>This implementation is experimental.
 */
public class WindowsIpcService extends IpcService {

    public WindowsIpcService(String ipcSocketPath) {
        super(new WindowsNamedPipe(ipcSocketPath));
    }

    public WindowsIpcService(String ipcSocketPath, boolean includeRawResponse) {
        super(new WindowsNamedPipe(ipcSocketPath), includeRawResponse);
    }
}


text:
package org.apache.flink.table.planner.plan.batch.sql

import org.apache.flink.table.api.config.TableConfigOptions
import org.apache.flink.table.planner.plan.optimize.RelNodeBlockPlanBuilder
import org.apache.flink.table.planner.utils._

import org.junit.{Before, Test}

class TableSourceTest extends TableTestBase {

  private val util = batchTestUtil()

  @Before
  def setup(): Unit = {
    val ddl =
      s"""
         |CREATE TABLE ProjectableTable (
         |  a int,
         |  b bigint,
         |  c varchar(32)
         |) WITH (
         |  'connector' = 'values',
         |  'nested-projection-supported' = 'true',
         |  'bounded' = 'true'
         |)
       """.stripMargin
    util.tableEnv.executeSql(ddl)
    val ddl2 =
      """
        |CREATE TABLE NestedTable (
        |  id int,
        |  deepNested row<nested1 row<name string, `value` int>, nested2 row<num int, flag
        |  boolean>>,
        |  nested row<name string, `value` int>,
        |  name string
        |) WITH (
        | 'connector' = 'values',
        | 'nested-projection-supported' = 'true',
        | 'bounded' = 'true'
        |)
        |""".stripMargin
    util.tableEnv.executeSql(ddl2)
    val ddl3 =
      s"""
         |CREATE TABLE T (
         |  id int,
         |  deepNested row<nested1 row<name string, `value` int>,
         |    nested2 row<num int, flag boolean>>,
         |  metadata_1 int metadata,
         |  metadata_2 string metadata
         |) WITH (
         |  'connector' = 'values',
         |  'nested-projection-supported' = 'true',
         |  'bounded' = 'true',
         |  'readable-metadata' =
         |    'metadata_1:INT, metadata_2:STRING, metadata_3:BIGINT'
         |)
         |""".stripMargin
    util.tableEnv.executeSql(ddl3)
    val ddl4 =
      s"""
         |CREATE TABLE NestedItemTable (
         |  `id` INT,
         |  `name` STRING,
         |  `result` ROW<
         |     `data_arr` ROW<`value` BIGINT> ARRAY,
         |     `data_map` MAP<STRING, ROW<`value` BIGINT>>>,
         |  `extra` STRING
         |  ) WITH (
         |    'connector' = 'values',
         |    'nested-projection-supported' = 'true',
         |    'bounded' = 'true'
         |)
         |""".stripMargin
    util.tableEnv.executeSql(ddl4)
    util.tableEnv.executeSql(
      s"""
         |CREATE TABLE MyTable (
         |  `a` INT,
         |  `b` BIGINT,
         |  `c` STRING
         |) WITH (
         |  'connector' = 'values',
         |  'bounded' = 'true'
         |)
         |""".stripMargin)
  }

  @Test
  def testSimpleProject(): Unit = {
    util.verifyExecPlan("SELECT a, c FROM ProjectableTable")
  }

  @Test
  def testSimpleProjectWithProctime(): Unit = {
    util.verifyExecPlan("SELECT a, c, PROCTIME() FROM ProjectableTable")
  }

  @Test
  def testProjectWithoutInputRef(): Unit = {
    util.verifyExecPlan("SELECT COUNT(1) FROM ProjectableTable")
  }

  @Test
  def testNestedProject(): Unit = {
    val sqlQuery =
      """
        |SELECT id,
        |    deepNested.nested1.name AS nestedName,
        |    nested.`value` AS nestedValue,
        |    deepNested.nested2.flag AS nestedFlag,
        |    deepNested.nested2.num AS nestedNum
        |FROM NestedTable
      """.stripMargin
    util.verifyExecPlan(sqlQuery)
  }

  @Test
  def testNestProjectWithMetadata(): Unit = {
    val sqlQuery =
      """
        |SELECT id,
        |       deepNested.nested1 AS nested1,
        |       deepNested.nested1.`value` + deepNested.nested2.num + metadata_1 as results
        |FROM T
        |""".stripMargin
    util.verifyExecPlan(sqlQuery)
  }

  @Test
  def testNestedProjectFieldWithITEM(): Unit = {
    //TODO: always push projection into table source in FLINK-22118
    util.verifyExecPlan(
      s"""
         |SELECT
         |  `result`.`data_arr`[`id`].`value`,
         |  `result`.`data_map`['item'].`value`
         |FROM NestedItemTable
         |""".stripMargin
    )
  }

  @Test
  def testTableHintWithDifferentOptions(): Unit = {
    util.tableEnv.getConfig.getConfiguration.setBoolean(
      TableConfigOptions.TABLE_DYNAMIC_TABLE_OPTIONS_ENABLED, true)
    util.tableEnv.executeSql(
      s"""
         |CREATE TABLE MySink (
         |  `a` INT,
         |  `b` BIGINT,
         |  `c` STRING
         |) WITH (
         |  'connector' = 'filesystem',
         |  'format' = 'testcsv',
         |  'path' = '/tmp/test'
         |)
       """.stripMargin)

    val stmtSet = util.tableEnv.createStatementSet()
    stmtSet.addInsertSql(
      """
        |insert into MySink select a,b,c from MyTable
        |  /*+ OPTIONS('source.num-element-to-skip'='1') */
        |""".stripMargin)
    stmtSet.addInsertSql(
      """
        |insert into MySink select a,b,c from MyTable
        |  /*+ OPTIONS('source.num-element-to-skip'='2') */
        |""".stripMargin)

    util.verifyExecPlan(stmtSet)
  }

  @Test
  def testTableHintWithSameOptions(): Unit = {
    util.tableEnv.getConfig.getConfiguration.setBoolean(
      TableConfigOptions.TABLE_DYNAMIC_TABLE_OPTIONS_ENABLED, true)
    util.tableEnv.executeSql(
      s"""
         |CREATE TABLE MySink (
         |  `a` INT,
         |  `b` BIGINT,
         |  `c` STRING
         |) WITH (
         |  'connector' = 'filesystem',
         |  'format' = 'testcsv',
         |  'path' = '/tmp/test'
         |)
       """.stripMargin)

    val stmtSet = util.tableEnv.createStatementSet()
    stmtSet.addInsertSql(
      """
        |insert into MySink select a,b,c from MyTable
        |  /*+ OPTIONS('source.num-element-to-skip'='1') */
        |""".stripMargin)
    stmtSet.addInsertSql(
      """
        |insert into MySink select a,b,c from MyTable
        |  /*+ OPTIONS('source.num-element-to-skip'='1') */
        |""".stripMargin)

    util.verifyExecPlan(stmtSet)
  }

  @Test
  def testTableHintWithDigestReuseForLogicalTableScan(): Unit = {
    util.tableEnv.getConfig.getConfiguration.setBoolean(
      TableConfigOptions.TABLE_DYNAMIC_TABLE_OPTIONS_ENABLED, true)
    util.tableEnv.getConfig.getConfiguration.setBoolean(
      RelNodeBlockPlanBuilder.TABLE_OPTIMIZER_REUSE_OPTIMIZE_BLOCK_WITH_DIGEST_ENABLED, true)
    util.tableEnv.executeSql(
      s"""
         |CREATE TABLE MySink (
         |  `a` INT,
         |  `b` BIGINT,
         |  `c` STRING
         |) WITH (
         |  'connector' = 'filesystem',
         |  'format' = 'testcsv',
         |  'path' = '/tmp/test'
         |)
       """.stripMargin)

    val stmtSet = util.tableEnv.createStatementSet()
    stmtSet.addInsertSql(
      """
        |insert into MySink
        |select a,b,c from MyTable /*+ OPTIONS('source.num-element-to-skip'='0') */
        |union all
        |select a,b,c from MyTable /*+ OPTIONS('source.num-element-to-skip'='1') */
        |""".stripMargin)
    stmtSet.addInsertSql(
      """
        |insert into MySink select a,b,c from MyTable
        |  /*+ OPTIONS('source.num-element-to-skip'='2') */
        |""".stripMargin)

    util.verifyExecPlan(stmtSet)
  }
}