text:
import React from "react";

// Import Spectacle Core tags
import {
  Appear,
  BlockQuote,
  Cite,
  Deck,
  Fill,
  Heading,
  Image,
  Layout,
  ListItem,
  List,
  Quote,
  Slide,
  Text
} from "spectacle";

// Import image preloader util
import preloader from "spectacle/lib/utils/preloader";

// Import theme
import createTheme from "spectacle/lib/themes/default";

// Require CSS
require("normalize.css");
require("spectacle/lib/themes/default/index.css");

const images = {
  serverlessLogo: require("../assets/serverlessLogo.png"),
  twitterLogo: require("../assets/twitter-logo-black.png"),
  sshHell: require("../assets/sshhell.jpg"),
  sadParrot: require("../assets/sadparrot.gif"),
  lair: require("../assets/lair.jpg"),
  groupInitial: require("../assets/group-initial.jpg"),
  groupEmoji: require("../assets/group-emoji.jpg"),
  xkcd: require("../assets/xkcd.png"),
  emojiArchitecture: require("../assets/emoji-architecture.jpg"),
  sparrow: require("../assets/House_sparrow04.jpg"),
  hypeCurve: require("../assets/hype-curve.png"),
  clientServer: require("../assets/clientserver.svg"),
  clientServerLess: require("../assets/clientbaas.svg"),
  paas: require("../assets/paas.png"),
  redBadger: require("../assets/red-badger.png"),
  hype: require("../assets/hype.gif"),
  johnmckim: require("../assets/johnmckim.jpg")
};

preloader(images);

const theme = createTheme({
  primary: "#191919",
  secondary: "white",
  tertiary: "#FFD426",
  quartenary: "#CECECE"
}, {
  primary: "Montserrat",
  secondary: "Helvetica"
});

export default class Presentation extends React.Component {
  render() {
    return (
      <Deck transition={["zoom", "slide"]} transitionDuration={500} theme={theme}>
        <Slide transition={["slide"]} bgColor="primary">
          <Image src={images.serverlessLogo} />
          <Heading size={1} fit caps textColor="seconday" margin="40px 0">
              Hype or substance?
          </Heading>
          <Layout>
            <Fill>
              <Heading size={6} caps textColor="primary" bgColor="tertiary" margin={10} padding={"5px 0"}>
                Marcel Cutts
              </Heading>
            </Fill>
            <Fill>
              <Heading size={6} caps textColor="black" bgColor="tertiary" margin={10} padding={"5px 0"}>
                @marcelcutts <Image src={images.twitterLogo} height="30px" margin="3px 0 0 0"/>
              </Heading>
            </Fill>
          </Layout>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Image src={images.hypeCurve} width="100%"/>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary"
          notes="Serverless the architecture vs serverless the framework"
        >
          <Image src={images.serverlessLogo} />
          <Heading size={3} caps textColor="secondary" margin="40px 0">
               or
          </Heading>
          <Heading size={2} caps textColor="secondary" margin="40px 0">
              Serverless?
          </Heading>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={1} fit caps textColor="secondary" margin="40px 0">
               A bit of history.... 📜
          </Heading>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary" notes={`
          Very stressful. Lot of SSH. Keep machines up to date
          Oh no, is Database running out of memory? Did we keep
          all the same settings from the test box with one of everyone?
          Do we have a script to provision a new server?`}
        >
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            History of Devops
          </Heading>
          <Heading size={1} fit caps textColor="secondary" margin="40px 0">
            Physical Machines
          </Heading>
          <List>
            <ListItem>Under Desk or in ☁</ListItem>
            <ListItem>Slow iteration</ListItem>
            <ListItem>Slow deployment</ListItem>
            <ListItem>Stress generators</ListItem>
          </List>
        </Slide>

        <Slide transition={["fade"]} bgImage={images.sshHell} />

        <Slide transition={["fade"]} bgImage={images.sshHell} bgDarken={0.5}>
          <Image src={images.sadParrot} height="400px"/>
        </Slide>

        <Slide transition={["fade"]} bgImage={images.lair} />

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            History of Devops
          </Heading>
          <Heading size={1} fit caps textColor="secondary" margin="40px 0">
            Virtual Machines
          </Heading>
          <List>
            <ListItem>Probably in ☁</ListItem>
            <ListItem>Consistent Deploys!</ListItem>
            <ListItem>Multiple tenant one 1 physical machine!</ListItem>
            <ListItem>Faster iterations / deploys!</ListItem>
          </List>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            History of Devops
          </Heading>
          <Heading size={1} fit caps textColor="secondary" margin="40px 0">
            Containers
          </Heading>
          <List>
            <ListItem>Probably in ☁</ListItem>
            <ListItem>Shareable images!</ListItem>
            <ListItem>Quick deploys!</ListItem>
            <ListItem>Test and Production Stages easy!</ListItem>
            <ListItem>Easy to have many services in a swarm!</ListItem>
          </List>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            History of Devops
          </Heading>
          <Heading size={1} fit caps textColor="secondary" margin="40px 0">
            Serverless
          </Heading>
          <List>
            <ListItem>Almost certainly in ☁</ListItem>
            <ListItem>Runs only when needed!</ListItem>
            <ListItem>Infinitely Scalable!</ListItem>
            <ListItem>Trivial deploys/updates!</ListItem>
            <ListItem>Cheap!</ListItem>
          </List>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={1} fit caps textColor="tertiary" margin="40px 0">
            OK how does that work?
          </Heading>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            "Traditional" Architecture
          </Heading>
          <Image src={images.clientServer} width="100%" />
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            Serverless Architecture
          </Heading>
          <Image src={images.clientServerLess} width="100%" />
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            Serverless Architecture
          </Heading>
          <List>
            <ListItem>Faster time to market</ListItem>
            <ListItem>No scaling concerns</ListItem>
            <ListItem>Reduced operational costs</ListItem>
            <ListItem>No maintenance</ListItem>
            <ListItem>Insane hipster cred!</ListItem>
          </List>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            Wait, isn't this just PAAS?
          </Heading>
          <List>
            <ListItem>Still needs scaling (how many Dynos)</ListItem>
            <ListItem>Monolithic unit of deployment</ListItem>
            <ListItem>Steers technical decisions</ListItem>
            <ListItem>Always running</ListItem>
            <ListItem>No hipster cred</ListItem>
          </List>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            Wait, isn't this just PAAS?
          </Heading>
          <Image src={images.paas} width="100%" />
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            Great! But what about...
          </Heading>
          <List>
            <ListItem>Application Bundling</ListItem>
            <ListItem>Configuration</ListItem>
            <ListItem>Monitoring</ListItem>
            <ListItem>Logging</ListItem>
            <ListItem>Debugging</ListItem>
            <ListItem>Testing</ListItem>
          </List>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Image src={images.serverlessLogo} />
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            Demo #1
          </Heading>
          <Heading size={1} fit caps textColor="secondary" margin="40px 0">
            Serverless create!
          </Heading>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            Demo #2 - Emoji Faceswap
          </Heading>
          <Heading size={1} caps textColor="secondary" margin="40px 0">
            😊☹😢😒
          </Heading>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            Demo #2 - Emoji Faceswap
          </Heading>
          <Image src={images.groupEmoji} width="100%" />
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            Demo #2 - Emoji Faceswap
          </Heading>
          <Image src={images.groupInitial} width="100%"/>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            Demo #2 - Emoji Faceswap
          </Heading>
          <Image src={images.emojiArchitecture} width="100%"/>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Image src={images.xkcd} height="600px"/>
        </Slide>

        <Slide transition={["fade"]} bgImage={images.sparrow} />

        <Slide transition={["fade"]} bgImage={images.sparrow} bgDarken={0.5}>
          <Appear>
            <Heading size={3} fit caps textColor="secondary" margin="20px 0">
              Bird: 97% Confidence
            </Heading>
          </Appear>
          <Appear>
            <Heading size={3} fit caps textColor="secondary" margin="20px 0">
              Sparrow: 97% Confidence
            </Heading>
          </Appear>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Image src={images.johnmckim} />
          <Heading fit caps margin="40px 0" >
            John Mckim
          </Heading>
          <Heading size={4} textColor="secondary">
            @johncmckim
          </Heading>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Image src={images.serverlessLogo} />
          <Heading fit caps margin="40px 0" >
            Is it for me?
          </Heading>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={4} caps textColor="tertiary" margin="40px 0">
            Drawbacks
          </Heading>
          <List>
            <ListItem>Vendor lock in</ListItem>
            <ListItem>Not feasible for long running tasks</ListItem>
            <ListItem>Overhead increase due to no "local calls"</ListItem>
            <ListItem><s>Cold start time</s></ListItem>
          </List>
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Image src={images.redBadger} width="70%" />
        </Slide>

        <Slide transition={["slide"]} bgColor="primary">
          <Image src={images.serverlessLogo} />
          <Heading fit caps margin="40px 0" >
            Serverless Hype Train Checklist
          </Heading>
          <List>
            <ListItem>Event driven application ✅ </ListItem>
            <ListItem>Short running tasks ✅</ListItem>
            <ListItem>Man bun / Fixie bike ✅</ListItem>
          </List>
        </Slide>

        <Slide transition={["slide"]} bgImage={images.hype} />

        <Slide transition={["slide"]} bgColor="primary">
          <Heading size={1} fit caps textColor="seconday" margin="40px 0">
              Thanks!
          </Heading>
          <Layout>
            <Fill>
              <Heading size={6} caps textColor="primary" bgColor="tertiary" margin={10} padding={"5px 0"}>
                Marcel Cutts
              </Heading>
            </Fill>
            <Fill>
              <Heading size={6} caps textColor="black" bgColor="tertiary" margin={10} padding={"5px 0"}>
                @marcelcutts <Image src={images.twitterLogo} height="30px" margin="3px 0 0 0"/>
              </Heading>
            </Fill>
          </Layout>
        </Slide>

      </Deck>
    );
  }
}


text:
<?php

return [
    'invalid'           => 'Invalid JSON',
    'invalid_message'   => 'Seems like you introduced some invalid JSON.',
    'valid'             => 'Valid JSON',
    'validation_errors' => 'Validation errors',
];

redpajama_set_name: RedPajamaGithub


text:
package com.iorga.ivif.ja;

import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonValue;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import java.util.HashMap;
import java.util.Map;

@XmlEnum
public enum SortingType {
    @XmlEnumValue("asc")
    ASCENDING,
    @XmlEnumValue("desc")
    DESCENDING;

    private static Map<String, SortingType> sortingTypeByValue = new HashMap<>();
    private static Map<SortingType, String> valueBySortingType = new HashMap<>();
    static {
        SortingType[] enumConstants = SortingType.class.getEnumConstants();
        for (SortingType sortingType : enumConstants) {
            try {
                String value = SortingType.class.getField(sortingType.name()).getAnnotation(XmlEnumValue.class).value();
                sortingTypeByValue.put(value, sortingType);
                valueBySortingType.put(sortingType, value);
            } catch (NoSuchFieldException e) {
                throw new IllegalStateException(e);
            }
        }
    }

    @JsonCreator
    public static SortingType fromString(String value) {
        return sortingTypeByValue.get(value);
    }

    @JsonValue
    public String getValue() {
        return valueBySortingType.get(this);
    }
}


text:
"use strict";

var bitmap = require("../utils/bitmap");

var tileCycles = initTileCycles();

function Sprites( ppu ) {
	this.ppu = ppu;
	this.memory = ppu.memory;

	this.enabled = true;
	this.enabledLeft = true;
	this.pixelOffset = 0;

	// OAM
	this.oamAddress = 0;
	this.oam = new Uint8Array( 0x100 );
	this.oam2 = new Uint8Array( 0x21 );
	this.oam2reset = new Uint8Array( this.oam2.length );
	for ( var i = 0; i < this.oam2reset.length; i++ ) {
		this.oam2reset[ i ] = 0xff;
	}

	this.spriteProgress = 0;
	this.currentSprite = 0;

	this.spriteSize = 8;
	this.baseTable = 0;

	this.sprite0Next = false;
	this.sprite0InRange = false;
	this.spriteOverflow = false;
	this.scanlineOverflow = false;
	this.spriteCount = 0;
	this.nextSpriteCount = 0;

	this.yCounters = new Uint8Array( 0x40 );
	this.yCountersReset = new Uint8Array( this.yCounters.length );

	this.nextScanlineSprite0 = new Uint8Array( 0x100 );
	this.nextScanlinePriority = new Uint8Array( 0x100 );
	this.nextScanlineColors = new Uint8Array( 0x100 );

	this.scanlineSprite0 = new Uint8Array( 0x100 );
	this.scanlinePriority = new Uint8Array( 0x100 );
	this.scanlineColors = new Uint8Array( 0x100 );

	this.scanlineReset = new Uint8Array( this.scanlineColors.length );

	Object.preventExtensions( this );
}

Sprites.prototype = {
	toggle: function( flag ) {
		this.enabled = !!flag;
	},

	toggleLeft: function( flag ) {
		this.enabledLeft = !!flag;
	},

	evaluate: function() {
		if ( tileCycles[ this.ppu.lineCycle ] ) {
			this.fetchTile();
		}
	},

	initScanline: function() {
		this.currentSprite = 0;
		this.sprite0InRange = this.sprite0Next;
		this.sprite0Next = false;
		this.scanlineOverflow = false;

		this.oamAddress = 0;

		this.clearSecondaryOAM();

		this.scanlineSprite0.set( this.nextScanlineSprite0 );
		this.scanlinePriority.set( this.nextScanlinePriority );
		this.scanlineColors.set( this.nextScanlineColors );

		if ( this.nextSpriteCount ) {
			this.nextScanlineSprite0.set( this.scanlineReset );
			this.nextScanlinePriority.set( this.scanlineReset );
			this.nextScanlineColors.set( this.scanlineReset );
		}

		this.spriteCount = this.nextSpriteCount;
		this.nextSpriteCount = 0;
	},

	endScanline: function() {
		this.initSecondaryOAM();
	},

	readOAM: function() {
		if ( this.ppu.vBlank ) { // TODO
			return this.oam[ this.oamAddress ];

			// TODO increment?
		}

		return 0;
	},

	writeOAM: function( value ) {
		if ( this.ppu.vBlank ) {
			this.oam[ this.oamAddress ] = value;
			this.oamAddress = ( this.oamAddress + 1 ) & 0xff;
		}
	},

	/**
	 * Clear secondary OAM.
	 */
	clearSecondaryOAM: function() {
		this.oam2.set( this.oam2reset );

		if ( this.ppu.scanline === -1 ) {
			this.yCounters.set( this.yCountersReset );
		}
	},

	/**
	 * Initialize secondary OAM ('sprite evaluation').
	 */
	initSecondaryOAM: function() {
		var ppu = this.ppu;

		if ( !ppu.enabled  ) {
			return;
		}

		var value,
			oam2Index = 0,
			index = this.oamAddress;

		for ( var n = 0; n < 64; n++ ) {
			value = this.oam[ index ];

			this.oam2[ oam2Index ] = value;

			if ( ppu.scanline === value ) {
				this.yCounters[ n ] = this.spriteSize;
			}

			if ( this.yCounters[ n ] ) {
				// sprite is in range

				if ( !this.scanlineOverflow ) {
					// there's still space left in secondary OAM
					this.oam2.set( this.oam.subarray(index, index + 4), oam2Index );

					if ( n === 0 ) {
						this.sprite0Next = true;
					}

					this.nextSpriteCount++;
					oam2Index += 4;

					if ( oam2Index === 32 ) {
						this.scanlineOverflow = true;
					}
				} else {
					// secondary OAM is full but sprite is in range. Trigger sprite overflow
					this.spriteOverflow = true;

					// TODO buggy 'm' overflow behavior
				}

				this.yCounters[ n ]--;
			}

			index += 4;
		}

		this.oamAddress = index;
		this.oam2[ oam2Index ] = 0;
	},

	/**
	 * Fetch sprite data and feed appropriate shifters, counters and latches.
	 */
	fetchTile: function() {
		var spriteIndex = this.currentSprite << 2,
			y = this.oam2[ spriteIndex ],
			tileIndex = this.oam2[ spriteIndex + 1 ],
			attributes = this.oam2[ spriteIndex + 2 ],
			x = this.oam2[ spriteIndex + 3 ],
			baseTable = this.baseTable,
			tile = 0,
			flipX = attributes & 0x40,
			flipY = 0,
			fineY = 0;

		flipY = attributes & 0x80;
		fineY = ( this.ppu.scanline - y ) & ( this.spriteSize - 1 );
		// (the '& spriteSize' is needed because fineY can overflow due
		// to uninitialized tiles in secondary OAM)

		if ( this.spriteSize === 16 ) {
			// big sprite, select proper nametable and handle flipping
			baseTable = ( tileIndex & 1 ) ? 0x1000 : 0;
			tileIndex = tileIndex & ~1;

			if ( fineY > 7 ) {
				fineY -= 8;
				if ( !flipY ) {
					tileIndex++;
				}
			} else if ( flipY ) {
				tileIndex++;
			}
		}

		if ( flipY ) {
			fineY = 8 - fineY - 1;
		}

		tile = this.memory.cartridge.readTile( baseTable, tileIndex, fineY );

		if ( flipX ) {
			tile = bitmap.reverseTile( tile );
		}

		if ( this.currentSprite < this.nextSpriteCount ) {
			this.renderTile( x, tile, attributes );
		}

		this.currentSprite += 1;
	},

	renderTile: function( x, tile, attributes ) {
		var colors = bitmap.getColors( tile ),
			palette = 0x10 | ( (attributes & 3) << 2 ),
			priority = attributes & 0x20,
			sprite0 = ( this.currentSprite === 0 ) && this.sprite0Next,

			color = 0,
			i = 8;

		for ( ; i >= 0 && x >= this.pixelOffset && x < 0x100; i-- ) {
			if ( !this.nextScanlineColors[ x ] ) {
				color = colors[ i ];

				if ( color ) {
					this.nextScanlineColors[ x ] = this.ppu.memory.palette[ palette | color ];
					this.nextScanlinePriority[ x ] = priority;
					this.nextScanlineSprite0[ x ] = sprite0;
				}
			}

			x++;
		}
	}
};

function initTileCycles() {
	var i,
	    result = new Uint8Array( 0x200 );

	for ( i = 264; i <= 320; i += 8 ) {
		result[ i ] = 1;
	}

	return result;
}

module.exports = Sprites;


text:
<?php

namespace Robin\Ntlm\Crypt\Hasher;

/**
 * A cryptographic hasher that uses a cryptographic secret key as part of its
 * digest calculation to create an HMAC (hash-based message authentication code)
 * and implemented using PHP's built-in hashing mechanisms as part of the "hash"
 * extension (`ext-hash`).
 *
 * @link https://en.wikipedia.org/wiki/Hash-based_message_authentication_code
 * @link http://php.net/manual/en/ref.hash.php
 */
class HmacHasher extends AbstractTypedHasher
{

    /**
     * Constructor
     *
     * @param string $algorithm The {@link HasherAlgorithm} to use.
     * @param string $key The cryptographic key used in the hasher's digest
     *   calculation algorithm.
     */
    public function __construct($algorithm, $key)
    {
        $context = hash_init($algorithm, HASH_HMAC, $key);

        parent::__construct($context, $algorithm);
    }
}


text:
package o;

import android.app.Activity;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.quizup.core.activities.HomeActivity;
import com.quizup.core.activities.HomeActivity.8;
import com.quizup.core.widgets.topicButton.IconAndTextButton;

public final class 氵 extends 丨
{
  private final HomeActivity.8 ˎ;
  private int ˏ = 0;

  public 氵(HomeActivity paramHomeActivity, HomeActivity.8 param8)
  {
    super(paramHomeActivity, null, 2131493273);
    ((TextView)this.ͺ.findViewById(2131296633)).setVisibility(8);
    ((TextView)this.ͺ.findViewById(2131296634)).setText(2131165845);
    this.ˊ.ˊ(paramHomeActivity.getString(2131165847), 2130838078);
    this.ˋ.ˊ(paramHomeActivity.getString(2131165846), 2130838045);
    this.ˎ = param8;
    HomeActivity.8 local8 = this.ˎ;
    if (local8 != null)
    {
      氵.1 local1 = new 氵.1(this, local8);
      this.ˊ.setOnClickListener(local1);
      this.ˋ.setOnClickListener(local1);
    }
  }
}

/* Location:           /Users/vikas/Documents/Mhacks_Real_app/classes-dex2jar.jar
 * Qualified Name:     o.氵
 * JD-Core Version:    0.6.2
 */


text:
importAutomationScript('/pointerevents/pointerevent_common_input.js');

function inject_input() {
  return mouseClickInTarget('#btnCapture').then(function() {
    // To Handle delayed capturing.
    mouseMoveIntoTarget('#btnCapture');
  });
}


text:
define(
     ({
        "widgets": {
            "TemplateBuilder": {
                "enterBuilderButtonText": "Accedi al generatore",
                "exitBuilderButtonText": "Chiudi generatore",
                "enterBuilderModeHelpText": "Passa alla modalità generatore per configurare l\'applicazione",
                "builderModeHelpText": "Modalità generatore modelli",
                "webmapCaption": "Mappa",
                "selectMapMessage": "${displaying} di ${webmapTitle} in corso
Fare clic su Seleziona mappa per scegliere una mappa Web diversa",
                "loadMapMessage": "È attualmente selezionata la mappa ${webmapTitle}
Fare clic su Salva per utilizzarla",
                "changeWebmap": "Seleziona mappa",
                "saveButtonText": "Salva",
                "webmapNextButtonText": "Avanti ->",
                "previousButtonText":"Indietro",
                "layerLabelText": "Layer",
                "noLayerFoundText": "Layer non trovato",
                "selectLayer": "Seleziona layer",
                "applicationSettingText": "Impostazioni applicazione",
                "summaryAttrAscendingOrderTooltip": "Crescente",
                "onStartLabel": "All\'avvio",
                "selectVariableText": "Seleziona una variabile",
                "selectVariableDropdown": "Seleziona una variabile",
                "label":"Etichetta",
                "sourceLinkText":"Collegamento origine",
                "selectSubVariableText":"Seleziona variabili secondarie",
                "subVariablePanelButtonText":"FINE",
                "onButtonLabel":"Attivo",
                "offButtonLabel":"Disattivo",
                "appSettingsSaveCloseButtonText": "SALVA E CHIUDI",
                "appSettingsTitleText":"Titolo applicazione",
                "appSettingsDescriptionText": "Descrizione applicazione",
                "appSetingsRendererAreaText":"Area di rendering",
                "shareText":"Condividi",
                "basemapText":"Mappa di base",
                "basemapSelectionText":"Selezione mappa di base",
                "secondaryBasemapText":"Mappa di base secondaria",
                "defaultBasemapText": "Mappa di base predefinita",
                "entireAreaButton": "Intera area",
                "entireAreaOnStartButton": "Intera area all\'avvio",
                "aboutPanel": "Pannello informazioni",
                "legendPanel": "Pannello legenda",
                "layersPanel": "Pannello layer",
                "dataConfigurationButtonText": "Configurazione dati",
                "savingChangesMessage": "Salvataggio modifiche in corso...",
                "nextButtonText": "Avanti",
                "prevButtonText": "Indietro",
                "enterLabelText": "Immetti etichetta",
                "SelectedFeatureText": "Feature selezionata",
                "layerHelpTextMessage": "Per l\'applicazione è richiesto un layer con campi numerici",
                "alertMessage": {
                    "resetVariableMessage": "Reimpostare la variabile?",
                    "emptyAppTitleMessage": "Il campo del titolo dell\'applicazione non può essere vuoto",
                    "emptyDescriptionMessage": "Il campo della descrizione non può essere vuoto",
                    "maxVariableSelection": "Impossibile selezionare più di 25 variabili secondarie",
                    "signInFail" : "Accesso non riuscito",
                    "itemUpdateMessage": "Elemento aggiornato",
                    "unsavedChangesMessage": "Modifiche non salvate",
                    "failMessage": "Impossibile aggiornare l\'elemento",
                    "saveChangesAlert": "Salvare le modifiche?",
                    "variableLabelValidation": "L\'etichetta della variabile non può essere VUOTA",
                    "subVariableLabelValidation": "L\'etichetta della variabile secondaria non può essere VUOTA"
                    }
            }
        }
    })

);


text:
using System;

class StringPlusNumbers
{
    static void Main()
    {
        string name = Console.ReadLine();
        string lastName = Console.ReadLine();
        int age = int.Parse(Console.ReadLine());
        string city = Console.ReadLine();

        Console.WriteLine("You are {0} {1}, a {2}-years old person from {3}. ", name, lastName, age, city);

    }
}


text:
namespace ui {
class AXSystemCaretWin;
}

namespace views {

class DesktopWindowTreeHostWin;
class HWNDMessageHandler;

namespace test {

// A wrapper of DesktopWindowTreeHostWin to access private members for testing.
class DesktopWindowTreeHostWinTestApi {
 public:
  explicit DesktopWindowTreeHostWinTestApi(DesktopWindowTreeHostWin* host);

  void EnsureAXSystemCaretCreated();
  ui::AXSystemCaretWin* GetAXSystemCaret();
  gfx::NativeViewAccessible GetNativeViewAccessible();

  HWNDMessageHandler* GetHwndMessageHandler();

  void SetMockCursorPositionForTesting(const gfx::Point& position);

 private:
  DesktopWindowTreeHostWin* host_;

  DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostWinTestApi);
};

}  // namespace test
}  // namespace views

#endif  // UI_VIEWS_TEST_DESKTOP_WINDOW_TREE_HOST_WIN_TEST_API_H_


text:
__author__ = 'mworden'

import os

from mi.logging import config
from mi.core.log import get_logger
from mi.dataset.dataset_parser import DataSetDriverConfigKeys
from mi.dataset.dataset_driver import DataSetDriver
from mi.dataset.parser.nutnr_b import NutnrBParser
from mi.core.versioning import version

@version("15.7.0")
def parse(basePythonCodePath, sourceFilePath, particleDataHdlrObj):

    config.add_configuration(os.path.join(basePythonCodePath, 'res', 'config', 'mi-logging.yml'))

    log = get_logger()

    parser_config = {
        DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.nutnr_b_particles',
        DataSetDriverConfigKeys.PARTICLE_CLASS: [
            'NutnrBMetadataRecoveredDataParticle',
            'NutnrBInstrumentRecoveredDataParticle'
        ]
    }

    def exception_callback(exception):
        log.debug("ERROR: %r", exception)
        particleDataHdlrObj.setParticleDataCaptureFailure()

    with open(sourceFilePath, 'r') as stream_handle:
        parser = NutnrBParser(parser_config,
                              stream_handle,
                              exception_callback)

        driver = DataSetDriver(parser, particleDataHdlrObj)
        driver.processFileStream()

    return particleDataHdlrObj


text:
module EmployerEvents
  class CarrierFile
    attr_reader :carrier
    attr_reader :buffer
    attr_reader :begin_timestamp
    attr_reader :end_timestamp

    def initialize(carrier)
      @carrier = carrier
      @empty = true
      @buffer = StringIO.new
      @begin_timestamp = nil
      @end_timestamp = nil
    end

    def empty?
      @empty
    end

    def file_name
      return nil if @begin_timestamp.blank?
      return nil if @end_timestamp.blank?
      start_timestamp_string = @begin_timestamp.strftime("%Y%m%d%H%M%S")
      end_timestamp_string = @end_timestamp.strftime("%Y%m%d%H%M%S")
      carrier.abbrev.upcase + "_" + start_timestamp_string + "_" + end_timestamp_string + ".xml"
    end

    def render_event_using(renderer)
      if renderer.render_for(carrier, @buffer)
        @empty = false
        update_timestamps(renderer.timestamp)
      end
    end

    def update_timestamps(timestamp)
      @begin_timestamp = [@begin_timestamp, timestamp].compact.min
      @end_timestamp = [@end_timestamp, timestamp].compact.max
    end

    def result
      return nil if @empty
      carrier_abbrev = carrier.abbrev.upcase
      header = <<-XMLHEADER
<?xml version='1.0' encoding='UTF-8'?>
<employer_digest_event
        xmlns="http://openhbx.org/api/terms/1.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://openhbx.org/api/terms/1.0 organization.xsd http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <event_name>urn:openhbx:events:v1:employer#digest_period_ended</event_name>
        <resource_instance_uri>
                <id>urn:openhbx:resources:v1:carrier:abbreviation##{carrier_abbrev}</id>
        </resource_instance_uri>
        <body>
                <employer_events>
                        <coverage_period>
                                <begin_datetime>#{@begin_timestamp.iso8601}</begin_datetime>
                                <end_datetime>#{@end_timestamp.iso8601}</end_datetime>
                        </coverage_period>
      XMLHEADER
      trailer = <<-XMLTRAILER
                </employer_events>
        </body>
</employer_digest_event>
      XMLTRAILER
      @buffer << trailer
      header << @buffer.string
      [file_name, header]
    end

    def write_to_zip(zip)
      return if @empty
      f_name, data = result
      zip.get_output_stream(f_name) do |os|
        os.write(data)
      end
    end
  end
end


text:
package org.apache.carbondata.core.dictionary.client;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;

import org.apache.carbondata.common.logging.LogService;
import org.apache.carbondata.common.logging.LogServiceFactory;
import org.apache.carbondata.core.dictionary.generator.key.DictionaryMessage;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

/**
 * Client handler to get data.
 */
public class DictionaryClientHandler extends ChannelInboundHandlerAdapter {

  private static final LogService LOGGER =
          LogServiceFactory.getLogService(DictionaryClientHandler.class.getName());

  private final BlockingQueue<DictionaryMessage> responseMsgQueue = new LinkedBlockingQueue<>();

  private ChannelHandlerContext ctx;

  private DictionaryChannelFutureListener channelFutureListener;

  @Override
  public void channelActive(ChannelHandlerContext ctx) throws Exception {
    this.ctx = ctx;
    channelFutureListener = new DictionaryChannelFutureListener(ctx);
    LOGGER.audit("Connected client " + ctx);
    super.channelActive(ctx);
  }

  @Override
  public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
    try {
      ByteBuf data = (ByteBuf) msg;
      DictionaryMessage key = new DictionaryMessage();
      key.readData(data);
      data.release();
      responseMsgQueue.offer(key);
    } catch (Exception e) {
      LOGGER.error(e);
      throw e;
    }
  }

  @Override
  public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
    LOGGER.error(cause, "exceptionCaught");
    ctx.close();
  }

  /**
   * client send request to server
   *
   * @param key DictionaryMessage
   * @return DictionaryMessage
   */
  public DictionaryMessage getDictionary(DictionaryMessage key) {
    DictionaryMessage dictionaryMessage;
    try {
      ByteBuf buffer = ctx.alloc().buffer();
      key.writeData(buffer);
      ctx.writeAndFlush(buffer).addListener(channelFutureListener);
    } catch (Exception e) {
      LOGGER.error(e, "Error while send request to server ");
      ctx.close();
    }
    try {
      dictionaryMessage = responseMsgQueue.poll(100, TimeUnit.SECONDS);
      if (dictionaryMessage == null) {
        throw new RuntimeException("Request timed out for key : " + key);
      }
      return dictionaryMessage;
    } catch (Exception e) {
      LOGGER.error(e);
      throw new RuntimeException(e);
    }
  }

  private static class DictionaryChannelFutureListener implements ChannelFutureListener {

    private ChannelHandlerContext ctx;

    DictionaryChannelFutureListener(ChannelHandlerContext ctx) {
      this.ctx = ctx;
    }

    @Override
    public void operationComplete(ChannelFuture future) throws Exception {
      if (!future.isSuccess()) {
        LOGGER.error(future.cause(), "Error while sending request to Dictionary Server");
        ctx.close();
      }
    }
  }
}


text:
import React, {Component, PropTypes} from 'react';

export class Arc extends Component {
  render () {
    const {
      children,
      degrees,
      degreesStart,
      fill,
      percent,
      stroke,
      strokeLinecap,
      strokeWidth,
      width
    } = this.props;
    const center = width / 2;
    const radius = (width - strokeWidth) / 2;
    const strokeDasharray = 2 * Math.PI * radius;

    let {decimal} = this.props;
    if (degrees > 0) { decimal = degrees / 360; }
    if (percent > 0) { decimal = percent / 100; }
    if (decimal > 1) { decimal = 1; }

    const strokeDashoffset = strokeDasharray - strokeDasharray * decimal;
    const styles = {
      children: {
        alignItems: 'center',
        bottom: 0,
        display: 'flex',
        justifyContent: 'center',
        left: 0,
        position: 'absolute',
        right: 0,
        top: 0
      },
      graphic: {fill, stroke, strokeLinecap, strokeWidth, width},
      parent: {height: width, position: 'relative', width}
    };

    return (

        <svg style={styles.graphic} viewBox={`0 0 ${width} ${width}`}>
          <circle
            cx={center}
            cy={center}
            is // Disable JSX magic attributes to support stroke-dashoffset.
            r={radius}
            stroke-dasharray={strokeDasharray}
            stroke-dashoffset={strokeDashoffset}
            stroke-width={strokeWidth}
            transform={`rotate(${degreesStart} ${center} ${center})`}/>
        </svg>

{children}

    );
  }
}

Arc.defaultProps = {
  decimal: 0,
  degreesStart: -90,
  fill: 'none',
  stroke: 'black',
  strokeLinecap: 'butt',
  strokeWidth: 4,
  width: 64
};

Arc.propTypes = {
  children: PropTypes.node,
  decimal: PropTypes.number,
  degrees: PropTypes.number,
  degreesStart: PropTypes.number,
  fill: PropTypes.string,
  onClick: PropTypes.func,
  percent: PropTypes.number,
  stroke: PropTypes.string,
  strokeLinecap: PropTypes.string,
  strokeWidth: PropTypes.number,
  style: PropTypes.object,
  width: PropTypes.number
};


text:
{% extends "base.html" %}

{% set controller = 'EditorCtrl' %}

{% block scripts %}
  <script src="/static/js/app/controllers/editor.ctrl.js"></script>
{% endblock %}

{% block content %}
{% raw %}
  <div pg-component-container class="app-editor-box" get-component="getComponent" pg-component-scope="export">
    <p data-ng-show="isEmpty()" class="empty">
      Arraste um componente de layout aqui para iniciar!
    </p>
  </div>
{% endraw %}
{% endblock %}


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

namespace SandboxDatabaseManager.Database
{
    public class ValidateRestoreOperationResult
    {
        public bool? @CanOverwrite { get; set; }
        public string CustomErrorMessage { get; set; }
    }
}


text:
using Newtonsoft.Json;
using SimpleSlack.WebAPI.Core.Converters;
using SimpleSlack.WebAPI.Models;
using SimpleSlack.WebAPI.Responses.Groups.Interfaces;

namespace SimpleSlack.WebAPI.Responses.Groups
{
    internal class GroupsHistoryResponse : BaseResponse, IGroupsHistoryResponse
    {
        [JsonConverter(typeof(AccurateDateTimeConverter))]
        [JsonProperty("latest")]
        public AccurateDateTime Latest { get; internal set; }

        [JsonProperty("messages")]
        public Message[] Messages { get; internal set; }

        [JsonProperty("has_more")]
        public bool HasMore { get; internal set; }

        [JsonProperty("is_limited")]
        public bool IsLimited { get; internal set; }
    }
}


text:
<?php

declare(strict_types=1);

namespace Reinfi\DependencyInjection\Service\Extractor;

use Reinfi\DependencyInjection\Injection\InjectionInterface;

/**
 * Interface ExtractorInterface
 *
 * @package Reinfi\DependencyInjection\Service\Extractor
 */
interface ExtractorInterface
{
    /**
     * @param class-string $className
     *
     * @return InjectionInterface[]
     */
    public function getPropertiesInjections(string $className): array;

    /**
     * @param class-string $className
     *
     * @return array
     */
    public function getConstructorInjections(string $className): array;
}


text:
/* ** GENEREATED FILE - DO NOT MODIFY ** */
package com.wilutions.mslib.uccollaborationlib;
import com.wilutions.com.*;

/**
 * _IModalityCallback.
 * _IModalityCallback Interface
 */
@CoInterface(guid="{3F60CFF7-BE3F-4404-8395-C02D0CDD318E}")
public interface _IModalityCallback extends IDispatch {
  static boolean __typelib__loaded = __TypeLib.load();
  @DeclDISPID(1230)  public void OnConnect(final IModality _source, final IAsynchronousOperation _asyncOperation) throws ComException;
  @DeclDISPID(1231)  public void OnDisconnect(final IModality _source, final IAsynchronousOperation _asyncOperation) throws ComException;
  @DeclDISPID(1232)  public void OnHold(final IModality _source, final IAsynchronousOperation _asyncOperation) throws ComException;
  @DeclDISPID(1233)  public void OnRetrieve(final IModality _source, final IAsynchronousOperation _asyncOperation) throws ComException;
  @DeclDISPID(1234)  public void OnForward(final IModality _source, final IAsynchronousOperation _asyncOperation) throws ComException;
  @DeclDISPID(1235)  public void OnSetComposing(final IModality _source, final IAsynchronousOperation _asyncOperation) throws ComException;
  @DeclDISPID(1236)  public void OnTransfer(final IModality _source, final ModalityState _targetState, final String[] contextProperties, final IAsynchronousOperation _asyncOperation) throws ComException;
  @DeclDISPID(1237)  public void OnConsultativeTransfer(final IModality _source, final ModalityState _targetState, final String[] _contextProperties, final IAsynchronousOperation _asyncOperation) throws ComException;
  @DeclDISPID(1238)  public void OnSetProperty(final IModality _source, final ModalityProperty _propertyType, final IAsynchronousOperation _asyncOperation) throws ComException;
  @DeclDISPID(1239)  public void OnSendMessage(final IModality _source, final String _message, final INamedPropertyList _formats, final IParticipantCollection _participants, final IAsynchronousOperation _asyncOperation) throws ComException;
}


text:
""" Cisco_IOS_XR_ipv6_nd_cfg

This module contains a collection of YANG definitions
for Cisco IOS\-XR ipv6\-nd package configuration.

This module contains definitions
for the following management objects\:
  ipv6\-neighbor\: IPv6 neighbor or neighbor discovery
    configuration

This YANG module augments the
  Cisco\-IOS\-XR\-ifmgr\-cfg
module with configuration data.

Copyright (c) 2013\-2016 by Cisco Systems, Inc.
All rights reserved.

"""

import re
import collections

from enum import Enum

from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict

from ydk.errors import YPYError, YPYModelError

class Ipv6NdMonthEnum(Enum):
    """
    Ipv6NdMonthEnum

    Ipv6nd month

    .. data:: january = 0

    	January

    .. data:: february = 1

    	February

    .. data:: march = 2

    	March

    .. data:: april = 3

    	April

    .. data:: may = 4

    	May

    .. data:: june = 5

    	June

    .. data:: july = 6

    	July

    .. data:: august = 7

    	August

    .. data:: september = 8

    	September

    .. data:: october = 9

    	October

    .. data:: november = 10

    	November

    .. data:: december = 11

    	December

    """

    january = 0

    february = 1

    march = 2

    april = 3

    may = 4

    june = 5

    july = 6

    august = 7

    september = 8

    october = 9

    november = 10

    december = 11

    @staticmethod
    def _meta_info():
        from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_ipv6_nd_cfg as meta
        return meta._meta_table['Ipv6NdMonthEnum']

class Ipv6NdRouterPrefEnum(Enum):
    """
    Ipv6NdRouterPrefEnum

    Ipv6 nd router pref

    .. data:: high = 1

    	High preference

    .. data:: medium = 2

    	Medium preference

    .. data:: low = 3

    	Low preference

    """

    high = 1

    medium = 2

    low = 3

    @staticmethod
    def _meta_info():
        from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_ipv6_nd_cfg as meta
        return meta._meta_table['Ipv6NdRouterPrefEnum']

class Ipv6SrpEncapsulationEnum(Enum):
    """
    Ipv6SrpEncapsulationEnum

    Ipv6srp encapsulation

    .. data:: srpa = 5

    	Encapsulation type SRP, prefer side A

    .. data:: srpb = 6

    	Encapsulation type SRP, prefer side B

    """

    srpa = 5

    srpb = 6

    @staticmethod
    def _meta_info():
        from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_ipv6_nd_cfg as meta
        return meta._meta_table['Ipv6SrpEncapsulationEnum']

class Ipv6Neighbor(object):
    """
    IPv6 neighbor or neighbor discovery configuration

    .. attribute:: neighbors

    	IPv6 neighbors
    	**type**\:   :py:class:`Neighbors <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_nd_cfg.Ipv6Neighbor.Neighbors>`

    .. attribute:: scavenge_timeout

    	Set lifetime for stale neighbor
    	**type**\:  int

    	**range:** 1..43200

    	**units**\: second

    """

    _prefix = 'ipv6-nd-cfg'
    _revision = '2015-11-09'

    def __init__(self):
        self.neighbors = Ipv6Neighbor.Neighbors()
        self.neighbors.parent = self
        self.scavenge_timeout = None

    class Neighbors(object):
        """
        IPv6 neighbors

        .. attribute:: neighbor

        	IPv6 neighbor configuration
        	**type**\: list of    :py:class:`Neighbor <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_nd_cfg.Ipv6Neighbor.Neighbors.Neighbor>`

        """

        _prefix = 'ipv6-nd-cfg'
        _revision = '2015-11-09'

        def __init__(self):
            self.parent = None
            self.neighbor = YList()
            self.neighbor.parent = self
            self.neighbor.name = 'neighbor'

        class Neighbor(object):
            """
            IPv6 neighbor configuration

            .. attribute:: neighbor_address  <key>

            	IPv6 address
            	**type**\:  str

            	**pattern:** ((\:\|[0\-9a\-fA\-F]{0,4})\:)([0\-9a\-fA\-F]{0,4}\:){0,5}((([0\-9a\-fA\-F]{0,4}\:)?(\:\|[0\-9a\-fA\-F]{0,4}))\|(((25[0\-5]\|2[0\-4][0\-9]\|[01]?[0\-9]?[0\-9])\\.){3}(25[0\-5]\|2[0\-4][0\-9]\|[01]?[0\-9]?[0\-9])))(%[\\p{N}\\p{L}]+)?

            .. attribute:: interface_name  <key>

            	Interface name
            	**type**\:  str

            	**pattern:** (([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){3,4}\\d+\\.\\d+)\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]\*\\d+))\|(([a\-zA\-Z0\-9\_]\*\\d+/){2}([a\-zA\-Z0\-9\_]+))\|([a\-zA\-Z0\-9\_\-]\*\\d+)\|([a\-zA\-Z0\-9\_\-]\*\\d+\\.\\d+)\|(mpls)\|(dwdm)

            .. attribute:: encapsulation

            	Encapsulation type only if interface type is SRP
            	**type**\:   :py:class:`Ipv6SrpEncapsulationEnum <ydk.models.cisco_ios_xr.Cisco_IOS_XR_ipv6_nd_cfg.Ipv6SrpEncapsulationEnum>`

            .. attribute:: mac_address

            	48\-bit hardware address H.H.H
            	**type**\:  str

            	**pattern:** [0\-9a\-fA\-F]{2}(\:[0\-9a\-fA\-F]{2}){5}

            	**mandatory**\: True

            .. attribute:: zone

            	IPv6 address zone
            	**type**\:  str

            	**default value**\: 0

            """

            _prefix = 'ipv6-nd-cfg'
            _revision = '2015-11-09'

            def __init__(self):
                self.parent = None
                self.neighbor_address = None
                self.interface_name = None
                self.encapsulation = None
                self.mac_address = None
                self.zone = None

            @property
            def _common_path(self):
                if self.neighbor_address is None:
                    raise YPYModelError('Key property neighbor_address is None')
                if self.interface_name is None:
                    raise YPYModelError('Key property interface_name is None')

                return '/Cisco-IOS-XR-ipv6-nd-cfg:ipv6-neighbor/Cisco-IOS-XR-ipv6-nd-cfg:neighbors/Cisco-IOS-XR-ipv6-nd-cfg:neighbor[Cisco-IOS-XR-ipv6-nd-cfg:neighbor-address = ' + str(self.neighbor_address) + '][Cisco-IOS-XR-ipv6-nd-cfg:interface-name = ' + str(self.interface_name) + ']'

            def is_config(self):
                ''' Returns True if this instance represents config data else returns False '''
                return True

            def _has_data(self):
                if self.neighbor_address is not None:
                    return True

                if self.interface_name is not None:
                    return True

                if self.encapsulation is not None:
                    return True

                if self.mac_address is not None:
                    return True

                if self.zone is not None:
                    return True

                return False

            @staticmethod
            def _meta_info():
                from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_ipv6_nd_cfg as meta
                return meta._meta_table['Ipv6Neighbor.Neighbors.Neighbor']['meta_info']

        @property
        def _common_path(self):

            return '/Cisco-IOS-XR-ipv6-nd-cfg:ipv6-neighbor/Cisco-IOS-XR-ipv6-nd-cfg:neighbors'

        def is_config(self):
            ''' Returns True if this instance represents config data else returns False '''
            return True

        def _has_data(self):
            if self.neighbor is not None:
                for child_ref in self.neighbor:
                    if child_ref._has_data():
                        return True

            return False

        @staticmethod
        def _meta_info():
            from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_ipv6_nd_cfg as meta
            return meta._meta_table['Ipv6Neighbor.Neighbors']['meta_info']

    @property
    def _common_path(self):

        return '/Cisco-IOS-XR-ipv6-nd-cfg:ipv6-neighbor'

    def is_config(self):
        ''' Returns True if this instance represents config data else returns False '''
        return True

    def _has_data(self):
        if self.neighbors is not None and self.neighbors._has_data():
            return True

        if self.scavenge_timeout is not None:
            return True

        return False

    @staticmethod
    def _meta_info():
        from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_ipv6_nd_cfg as meta
        return meta._meta_table['Ipv6Neighbor']['meta_info']


text:
<?xml version="1.0" encoding="UTF-8"?>
<req:KnownTrackingRequest xmlns:req="http://www.dhl.com"
						xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
						xsi:schemaLocation="http://www.dhl.com
						TrackingRequestKnown.xsd">
	<Request>
		<ServiceHeader>
			<MessageTime>2002-06-25T11:28:56-08:00</MessageTime>
			<MessageReference>1234567890123456789012345678</MessageReference>
			<SiteID>SiteIDPwd</SiteID>
			<Password>SiteIDPwd</Password>
		</ServiceHeader>
	</Request>
	<LanguageCode>en</LanguageCode>
	<AWBNumber>9422367220</AWBNumber>
	<LevelOfDetails>ALL_CHECK_POINTS</LevelOfDetails>
</req:KnownTrackingRequest>


text:
mod foo {
    mod baz {
        struct Test;
        impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope
        impl Clone for Test {} //~ ERROR cannot find trait `Clone` in this scope
        impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope
        impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope
        impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope

        fn foo() {
            drop(2) //~ ERROR cannot find function `drop` in this scope
        }
    }

    struct Test;
    impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope
    impl Clone for Test {} //~ ERROR cannot find trait `Clone` in this scope
    impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope
    impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope
    impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope

    fn foo() {
        drop(2) //~ ERROR cannot find function `drop` in this scope
    }
}

fn qux() {
    #[no_implicit_prelude]
    mod qux_inner {
        struct Test;
        impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope
        impl Clone for Test {} //~ ERROR cannot find trait `Clone` in this scope
        impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope
        impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope
        impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope

        fn foo() {
            drop(2) //~ ERROR cannot find function `drop` in this scope
        }
    }
}

fn main() {
    // these should work fine
    drop(2)
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;

namespace AsyncGenerator.Internal
{
	internal class IgnoreReason
	{
		public static IgnoreReason Cascade = new IgnoreReason("Cascade ignored", DiagnosticSeverity.Hidden);
		public static IgnoreReason PartialContainingType = new IgnoreReason("The containing type is partial", DiagnosticSeverity.Hidden);
		public static IgnoreReason AlreadyAsync = new IgnoreReason("Already async", DiagnosticSeverity.Hidden);
		public static IgnoreReason AllRelatedMethodsIgnored = new IgnoreReason("All abstract/virtual related methods are ignored", DiagnosticSeverity.Hidden);
		public static IgnoreReason NeverUsedAndNoAsyncInvocations = new IgnoreReason("Never used and has no async invocations", DiagnosticSeverity.Hidden);
		public static IgnoreReason NoAsyncInvocations = new IgnoreReason("Has no async invocations", DiagnosticSeverity.Hidden);
		public static IgnoreReason NeverUsed = new IgnoreReason("Never used", DiagnosticSeverity.Hidden);
		public static IgnoreReason NeverUsedAsAsync = new IgnoreReason("Never used as async", DiagnosticSeverity.Hidden);
		public static IgnoreReason NoAsyncMembers = new IgnoreReason("No async members", DiagnosticSeverity.Hidden);
		public static IgnoreReason AsyncCounterpartExists = new IgnoreReason("An async counterpart already exists", DiagnosticSeverity.Hidden);
		public static IgnoreReason CallObsoleteMethod = new IgnoreReason("Calling an obsolete method", DiagnosticSeverity.Hidden);

		public static IgnoreReason InvokedMethodNoAsyncCounterpart = new IgnoreReason("The invoked method does not have an async counterpart", DiagnosticSeverity.Hidden);
		public static IgnoreReason NoAsyncCounterparts = new IgnoreReason("No async counterparts", DiagnosticSeverity.Hidden);
		public static IgnoreReason MethodIsCopied = new IgnoreReason("Method is copied", DiagnosticSeverity.Hidden);
		public static IgnoreReason OutParameters = new IgnoreReason("Has out parameters", DiagnosticSeverity.Hidden);

		// By option
		public static IgnoreReason TypeConversion = new IgnoreReason("Ignored by TypeConversion option", DiagnosticSeverity.Hidden);
		public static IgnoreReason PropertyConversion = new IgnoreReason("Ignored by PropertyConversion option", DiagnosticSeverity.Hidden);
		public static IgnoreReason MethodConversion = new IgnoreReason("Ignored by MethodConversion option", DiagnosticSeverity.Hidden);

		public static IgnoreReason OverridesExternalMethodWithoutAsync(IMethodSymbol method) => new IgnoreReason($"Overrides an external method {method} that has not an async counterpart", DiagnosticSeverity.Hidden);
		public static IgnoreReason ExplicitImplementsExternalMethodWithoutAsync(IMethodSymbol method) => new IgnoreReason($"Explicity implements an external interface {method} that has not an async counterpart", DiagnosticSeverity.Hidden);
		public static IgnoreReason ImplementsExternalMethodWithoutAsync(IMethodSymbol method) => new IgnoreReason($"Implements an external interface {method} that has not an async counterpart", DiagnosticSeverity.Hidden);

		// Not supported
		public static IgnoreReason NotSupported(string reason) => new IgnoreReason(reason, DiagnosticSeverity.Hidden);

		/// <summary>
		/// Should be used only for very specific reasons
		/// </summary>
		public static IgnoreReason Custom(string reason, DiagnosticSeverity diagnosticSeverity) => new IgnoreReason(reason, DiagnosticSeverity.Hidden);

		private IgnoreReason(string reason, DiagnosticSeverity diagnosticSeverity)
		{
			Reason = reason;
			DiagnosticSeverity = diagnosticSeverity;
		}

		public string Reason { get; }

		public DiagnosticSeverity DiagnosticSeverity { get; }

		public IgnoreReason WithSeverity(DiagnosticSeverity diagnosticSeverity)
		{
			return new IgnoreReason(Reason, diagnosticSeverity);
		}
	}
}


text:
package esl

import (
	"bytes"
	"fmt"
)

type Command struct {
	Sync bool
	UId  string
	App  string
	Args string
}

// Serialize formats (serializes) the command as expected by freeswitch.
func (cmd *Command) Serialize() []byte {
	var buf bytes.Buffer
	buf.WriteString(fmt.Sprintf("sendmsg %s\ncall-command: execute\n", cmd.UId))
	buf.WriteString(fmt.Sprintf("execute-app-name: %s\nexecute-app-arg: %s\n", cmd.App, cmd.Args))
	if cmd.Sync {
		buf.WriteString("event-lock: true\n")
	} else {
		buf.WriteString("event-lock: false\n")
	}
	buf.WriteString("\n\n")
	return buf.Bytes()
}

// Execute sends Command cmd over Connection and waits for reply.
// Returns the command reply event pointer or an error if any.
func (cmd Command) Execute(con *Connection) (*Event, error) {
	_, err := con.Write(cmd.Serialize())
	if err != nil {
		return nil, fmt.Errorf("execute command: con write: %v", err)
	}
	ev := <-con.cmdReply
	return ev, nil
}


text:
require 'spec_helper'

RSpec.describe Counter::Cache::Counters::BufferCounter::Saver do
  class Boo
  end

  let(:relation_object) { double(boo_count: 2, boo_updated_at: DateTime.now) }
  let(:options) { double(relation_class_name: "Boo", relation_id: 1, column: "boo_count", method: nil, source_object_class_name: Boo) }
  let(:saver) { Counter::Cache::Counters::BufferCounter::Saver.new(options) }

  describe '#save!' do
    let(:counting_store) { double(get: nil) }

    before do
      allow(Boo).to receive(:find_by_id).and_return(relation_object)
      allow(Counter::Cache.configuration).to receive(:counting_data_store).and_return(counting_store)
    end

    describe "yielding" do
      let(:counting_store) { double(get: 2) }

      before do
        allow(options).to receive(:cached?).and_return(true)
        allow(options).to receive(:touch_column).and_return(nil)
        expect(relation_object).to receive(:boo_count=).with(4)
        expect(relation_object).to receive(:save!)
        expect(counting_store).to receive(:del)
      end

      describe "with block" do
        it "yields" do
          expect { |b| saver.save!(&b) }.to yield_with_args(2, 4, relation_object, "boo_count")
        end
      end
    end

    describe 'when cached? is true' do
      let(:counting_store) { double(get: 2) }

      before do
        allow(options).to receive(:cached?).and_return(true)
        expect(counting_store).to receive(:del)
      end

      context "with touch column" do
        it 'saves the value' do
          allow(options).to receive(:touch_column).and_return(:boo_updated_at)
          expect(relation_object).to receive(:boo_count=).with(4)
          expect(relation_object).to receive(:boo_updated_at=).with(DateTime.now)
          expect(relation_object).to receive(:save!)
          saver.save!
        end
      end

      context "without touch column" do
        it 'saves the value' do
          allow(options).to receive(:touch_column).and_return(nil)
          expect(relation_object).to receive(:boo_count=).with(4)
          expect(relation_object).to receive(:save!)
          saver.save!
        end
      end
    end

    describe 'when cached? is false' do
      before do
        allow(options).to receive(:touch_column).and_return(nil)
        allow(options).to receive(:cached?).and_return(false)
      end

      describe 'when method is passed' do
        before do
          allow(options).to receive(:method).and_return("call_this_thing")
          allow(relation_object).to receive(:call_this_thing).and_return(4)
        end

        it 'saves the value' do
          expect(relation_object).to receive(:boo_count=).with(4)
          expect(relation_object).to receive(:save!)
          saver.save!
        end
      end

      describe 'when method is not passed' do

        before do
          allow(Boo).to receive(:table_name).and_return("boos")
          allow(relation_object).to receive(:boos).and_return(double(count: 4))
        end

        it 'saves the value' do
          expect(relation_object).to receive(:boo_count=).with(4)
          expect(relation_object).to receive(:save!)
          saver.save!
        end
      end
    end
  end
end


text:
require 'test_helper'
require File.expand_path("../../../app/validators/date_format_validator",  __FILE__)

class TestModel
  include ActiveModel::Validations
  attr_accessor :date

  validates :date, date_format: true
end

class DateFormatValidatorTest < ActiveSupport::TestCase
  def assert_valid_date(date)
    t = TestModel.new
    t.date = date
    assert t.valid?, "Date `#{date}` should be valid"
  end

  def assert_invalid_date(date)
    t = TestModel.new
    t.date = date
    refute t.valid?, "Date `#{date}` should be invalid"
  end

  test "invalid date" do
    assert_invalid_date "a"
    assert_invalid_date "today"
    assert_invalid_date "2013-12-32"
    assert_invalid_date "2013-02-29"
  end

  test "valid date" do
    assert_valid_date ""
    assert_valid_date "2013-01-01"
    assert_valid_date "2012-02-29"
    assert_valid_date "2013-12-31"
    assert_valid_date "Jan 1, 2013"
    assert_valid_date "December 31st, 2013"
  end
end


text:
package main

import (
	"flag"
	"fmt"
	"os"
	"strings"
	"text/tabwriter"

	"github.com/dylanmei/windurs/windurs"
	"github.com/mitchellh/cli"
)

type lsCommand struct {
	shutdown <-chan struct{}
	ui       cli.Ui
}

func (c *lsCommand) Help() string {
	text := `
Usage: windurs ls [options] directory

  List files of a remote directory.

Options:

  -addr=localhost:5985    Host and port of the remote machine
  -user                   Name of the user to authenticate as
  -pass                   Password to authenticate with
`
	return strings.TrimSpace(text)
}

func (c *lsCommand) Synopsis() string {
	return "List files of a remote directory"
}

func (c *lsCommand) Run(args []string) int {
	var user string
	var pass string
	var addr string

	flags := flag.NewFlagSet("ls", flag.ContinueOnError)
	flags.Usage = func() { c.ui.Output(c.Help()) }
	flags.StringVar(&user, "user", "", "auth name")
	flags.StringVar(&pass, "pass", "", "auth password")
	flags.StringVar(&addr, "addr", "localhost:5985", "remote addr")

	if err := flags.Parse(args); err != nil {
		return 1
	}

	args = flags.Args()
	if len(args) < 1 {
		c.ui.Error("A directory is required.\n")
		c.ui.Error(c.Help())
		return 1
	}
	if len(args) > 1 {
		c.ui.Error("Too many arguments. Only a directory is required.\n")
		c.ui.Error(c.Help())
		return 1
	}

	dir := args[0]

	w, err := windurs.New(addr, user, pass)
	if err != nil {
		c.ui.Error(err.Error())
		return 1
	}

	list, err := w.List(dir)
	if err != nil {
		c.ui.Error(err.Error())
		return 1
	}

	tw := new(tabwriter.Writer)
	tw.Init(os.Stdout, 0, 8, 0, '\t', 0)
	fmt.Fprintf(tw, "\tName\tLastWriteTime\tLength\n")
	fmt.Fprintf(tw, "\t----\t-------------\t------\n")
	for _, fi := range list {
		fmt.Fprintf(tw, "%s\t%s\t%s\t%d\n", fi.Mode, fi.Name, fi.LastWriteTime, fi.Length)
	}
	tw.Flush()

	return 0
}


text:
title: "Points of View: Mapping Quantitative Data to Color"

members:
  - nils-gehlenborg
type: other
year: 2012
publisher: "http://www.nature.com/nmeth/journal/v9/n8/full/nmeth.2134.html"
cite:
  authors: "N Gehlenborg and B Wong"
  published: "*Nature Methods* **9**(8):769"
---


text:
import { LinkedList } from '../mol-data/generic';

export { LRUCache };

interface LRUCache<T> {
    entries: LinkedList<LRUCache.Entry<T>>,
    capacity: number
}

namespace LRUCache {
    export interface Entry<T> {
        key: string,
        data: T
    }

    function entry<T>(key: string, data: T): Entry<T> {
        return { key, data };
    }

    export function create<T>(capacity: number): LRUCache<T> {
        return {
            entries: LinkedList<Entry<T>>(),
            capacity: Math.max(1, capacity)
        };
    }

    export function get<T>(cache: LRUCache<T>, key: string) {
        for (let e = cache.entries.first; e; e = e.next) {
            if (e.value.key === key) {
                cache.entries.remove(e);
                cache.entries.addLast(e.value);
                return e.value.data;
            }
        }
        return void 0;
    }

    export function set<T>(cache: LRUCache<T>, key: string, data: T): T | undefined {
        let removed: T | undefined = undefined;
        if (cache.entries.count >= cache.capacity) {
            const first = cache.entries.first!;
            removed = first.value.data;
            cache.entries.remove(first);
        }
        cache.entries.addLast(entry(key, data));
        return removed;
    }
}


text:
require 'rails_helper'

# Normally, we'd do this as a feature spec, but there's
# currently no easy way to get capybara to play along nicely
# with mocks for external redirects (the capybara-mechanize driver
# comes closest, but not quite)
RSpec.describe 'Signing out' do
  let(:auth_sign_out_url) do
    "#{ENV['G5_AUTH_ENDPOINT']}/users/sign_out" \
      '?redirect_url=http%3A%2F%2Fwww.example.com%2F'
  end

  describe 'GET /g5_auth/users/sign_out' do
    subject(:sign_out) { safe_get '/g5_auth/users/sign_out' }

    context 'when user is logged in', :auth_request do
      it 'should redirect to the auth server' do
        expect(sign_out).to redirect_to(auth_sign_out_url)
      end

      it 'should not allow the user to access protected pages' do
        sign_out
        expect(safe_get('/protected_page'))
          .to redirect_to('/g5_auth/users/sign_in')
      end
    end

    context 'when user is not logged in' do
      it 'should redirect to the auth server' do
        expect(sign_out).to redirect_to(auth_sign_out_url)
      end
    end
  end

  describe 'DELETE /g5_auth/users/sign_out', :auth_request do
    subject(:sign_out) { safe_delete '/g5_auth/users/sign_out' }

    it 'should redirect to GET' do
      expect(sign_out).to redirect_to('/g5_auth/users/sign_out')
    end
  end
end


text:
#ifndef _CCB_CCNODELOADERLIBRARY_H_
#define _CCB_CCNODELOADERLIBRARY_H_

#include "CCBReader.h"

namespace cocosbuilder {

class NodeLoader;

typedef std::map<std::string, NodeLoader *> NodeLoaderMap;
typedef std::pair<std::string, NodeLoader *> NodeLoaderMapEntry;

class NodeLoaderLibrary : public cocos2d::Object
{
public:
    /**
     * @js NA
     * @lua NA
     */
    CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(NodeLoaderLibrary, library);
    /**
     * @js NA
     * @lua NA
     */
    NodeLoaderLibrary();
    /**
     * @js NA
     * @lua NA
     */
    virtual ~NodeLoaderLibrary();
    /**
     * @js NA
     * @lua NA
     */
    void registerDefaultNodeLoaders();
    /**
     * @js NA
     * @lua NA
     */
    void registerNodeLoader(const char * pClassName, NodeLoader * pNodeLoader);
    //void registerNodeLoader(String * pClassName, NodeLoader * pNodeLoader);
    /**
     * @js NA
     * @lua NA
     */
    void unregisterNodeLoader(const char * pClassName);
    //void unregisterNodeLoader(String * pClassName);
    /**
     * @js NA
     * @lua NA
     */
    NodeLoader * getNodeLoader(const char * pClassName);
    //CCNodeLoader * getNodeLoader(String * pClassName);
    /**
     * @js NA
     * @lua NA
     */
    void purge(bool pDelete);
    /**
     * @js NA
     * @lua NA
     */
    CC_DEPRECATED_ATTRIBUTE void registerDefaultCCNodeLoaders() { registerDefaultNodeLoaders(); }
    /**
     * @js NA
     * @lua NA
     */
    CC_DEPRECATED_ATTRIBUTE void registerCCNodeLoader(const char * pClassName, NodeLoader * pNodeLoader) { registerNodeLoader(pClassName, pNodeLoader); };
    /**
     * @js NA
     * @lua NA
     */
    CC_DEPRECATED_ATTRIBUTE void unregisterCCNodeLoader(const char * pClassName) { unregisterNodeLoader(pClassName); };
    /**
     * @js NA
     * @lua NA
     */
    CC_DEPRECATED_ATTRIBUTE NodeLoader * getCCNodeLoader(const char * pClassName) { return getNodeLoader(pClassName); };

public:
    /**
     * @js NA
     * @lua NA
     */
    static NodeLoaderLibrary * getInstance();
    /**
     * @js NA
     * @lua NA
     */
    static void destroyInstance();
    /**
     * @js NA
     * @lua NA
     */
    static NodeLoaderLibrary * newDefaultNodeLoaderLibrary();
    /**
     * @js NA
     * @lua NA
     */
    CC_DEPRECATED_ATTRIBUTE static NodeLoaderLibrary * sharedNodeLoaderLibrary() { return NodeLoaderLibrary::getInstance(); };
    /**
     * @js NA
     * @lua NA
     */
    CC_DEPRECATED_ATTRIBUTE static void purgeSharedNodeLoaderLibrary() { NodeLoaderLibrary::destroyInstance(); };
    /**
     * @js NA
     * @lua NA
     */
    CC_DEPRECATED_ATTRIBUTE static NodeLoaderLibrary * newDefaultCCNodeLoaderLibrary() { return NodeLoaderLibrary::newDefaultNodeLoaderLibrary(); };

private:
    NodeLoaderMap _nodeLoaders;
};

}

#endif


text:
package com.badlogic.gdx.automation.recorder;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;

import com.badlogic.gdx.Application.ApplicationType;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.automation.recorder.InputProperty.SyncProperty;
import com.badlogic.gdx.automation.recorder.InputProperty.SyncProperty.Accelerometer;
import com.badlogic.gdx.automation.recorder.InputProperty.SyncProperty.Button;
import com.badlogic.gdx.automation.recorder.InputProperty.SyncProperty.KeyEvent;
import com.badlogic.gdx.automation.recorder.InputProperty.SyncProperty.KeyPressed;
import com.badlogic.gdx.automation.recorder.InputProperty.SyncProperty.Orientation;
import com.badlogic.gdx.automation.recorder.InputProperty.SyncProperty.Pointer;
import com.badlogic.gdx.automation.recorder.InputProperty.SyncProperty.PointerEvent;
import com.badlogic.gdx.automation.recorder.InputProperty.SyncProperty.Type;
import com.badlogic.gdx.automation.recorder.InputProperty.SyncPropertyVisitor;
import com.badlogic.gdx.utils.TimeUtils;

/**
 * A snapshot of all real-time values to be read from an input at a certain
 * time. Especially the {@link #set(InputState, int)} method is useful to take a
 * snapshot of a configurable set of properties from a given {@link Input}
 *
 * @author Lukas Böhm
 */
public class InputState {

	private int MAX_POINTERS;

	private final SyncValueApplier applier;

	public float accelerometerX;
	public float accelerometerY;
	public float accelerometerZ;

	public int[] x;
	public int[] y;
	public int[] deltaX;
	public int[] deltaY;
	public boolean[] touched;

	public boolean justTouched;

	public boolean button0;
	public boolean button1;
	public boolean button2;

	public final SparseArray<Boolean> pressedKeys;

	public final ArrayList<EventBufferAccessHelper.KeyEvent> keyEvents;
	public final ArrayList<EventBufferAccessHelper.PointerEvent> pointerEvents;

	public float pitch;
	public float roll;
	public float azimuth;

	public final float[] rotationMatrix = new float[16];

	public int orientation;

	public long timeStamp = TimeUtils.millis();

	public InputState() {
		applier = new SyncValueApplier();
		pressedKeys = new SparseArray<Boolean>();
		keyEvents = new ArrayList<EventBufferAccessHelper.KeyEvent>();
		pointerEvents = new ArrayList<EventBufferAccessHelper.PointerEvent>();
	}

	public InputState(int maxPointers) {
		this();
		if (maxPointers > 20) {
			Gdx.app.log(
					InputRecorder.LOG_TAG,
					"Warning: Most of the libGDX backends only use 20 pointers internally. Trying to use "
							+ maxPointers);
		}
		this.MAX_POINTERS = maxPointers;
		x = new int[MAX_POINTERS];
		y = new int[MAX_POINTERS];
		deltaX = new int[MAX_POINTERS];
		deltaY = new int[MAX_POINTERS];
		touched = new boolean[MAX_POINTERS];
	}

	public void initialize(int maxPointers) {
		pressedKeys.clear();
		keyEvents.clear();
		pointerEvents.clear();
		if (maxPointers != MAX_POINTERS) {
			if (maxPointers > MAX_POINTERS) {
				if (maxPointers > 20) {
					Gdx.app.log(
							InputRecorder.LOG_TAG,
							"Warning: Most of the libGDX backends only use 20 pointers internally. Trying to use "
									+ maxPointers);
				}
				x = new int[maxPointers];
				y = new int[maxPointers];
				deltaX = new int[maxPointers];
				deltaY = new int[maxPointers];
				touched = new boolean[maxPointers];
			} else {
				Arrays.fill(x, 0);
				Arrays.fill(y, 0);
				Arrays.fill(deltaX, 0);
				Arrays.fill(deltaY, 0);
				Arrays.fill(touched, false);
			}
			MAX_POINTERS = maxPointers;
		}
	}

	public void set(InputState state, int copyFlags) {
		if ((copyFlags & Type.BUTTONS.key) != 0) {
			button0 = state.button0;
			button1 = state.button1;
			button2 = state.button2;
		}
		if ((copyFlags & Type.KEY_EVENTS.key) != 0) {
			keyEvents.clear();
			keyEvents.addAll(state.keyEvents);
		}
		if ((copyFlags & Type.KEYS_PRESSED.key) != 0) {
			setPressedKeys(state.pressedKeys);
		}
		if ((copyFlags & Type.ORIENTATION.key) != 0) {
			accelerometerX = state.accelerometerX;
			accelerometerY = state.accelerometerY;
			accelerometerZ = state.accelerometerZ;
			pitch = state.pitch;
			roll = state.roll;
			azimuth = state.azimuth;
			orientation = state.orientation;
			System.arraycopy(state.rotationMatrix, 0, rotationMatrix, 0, 16);
		}
		if ((copyFlags & Type.POINTERS.key) != 0) {
			System.arraycopy(state.x, 0, x, 0, MAX_POINTERS);
			System.arraycopy(state.y, 0, y, 0, MAX_POINTERS);
			System.arraycopy(state.deltaX, 0, deltaX, 0, MAX_POINTERS);
			System.arraycopy(state.deltaY, 0, deltaY, 0, MAX_POINTERS);
			System.arraycopy(state.touched, 0, touched, 0, MAX_POINTERS);
			justTouched = state.justTouched;
		}
		if ((copyFlags & Type.POINTER_EVENTS.key) != 0) {
			pointerEvents.clear();
			pointerEvents.addAll(state.pointerEvents);
		}
	}

	public void setPressedKeys(SparseArray<Boolean> pressed) {
		for (Map.Entry<Integer, Boolean> entry : pressedKeys.entrySet()) {
			entry.setValue(false);
		}
		for (Map.Entry<Integer, Boolean> entry : pressed.entrySet()) {
			pressedKeys.put(entry.getKey(), Boolean.TRUE);
		}
	}

	/**
	 * Simple forward for {@link #set(Input, int, boolean)} using ~0 as the
	 * second argument to indicate that all values are to be read from the given
	 * input.
	 *
	 * @param input
	 * @param updateEvents
	 */
	public void setAll(Input input, boolean updateEvents) {
		set(input, ~0, updateEvents);
	}

	/**
	 * Use OR'ed {@link InputProperty.Type#key}s to define properties
	 *
	 * @param input
	 * @param properties
	 * @param updateEvents
	 *            whether to force-pull events from their backend-specific
	 *            sources before copying them into this InputState.
	 */
	public void set(Input input, int properties, boolean updateEvents) {
		timeStamp = TimeUtils.millis(); // input in milliseconds should be
										// sufficient
		if ((InputProperty.SyncProperty.Type.POINTERS.key & properties) != 0) {
			setX(input);
			setY(input);
			setDeltaX(input);
			setDeltaY(input);
			setTouched(input);
		}
		if ((InputProperty.SyncProperty.Type.BUTTONS.key & properties) != 0) {
			setButtons(input);
		}
		if ((InputProperty.SyncProperty.Type.KEYS_PRESSED.key & properties) != 0) {
			setPressedKeys(input);
		}
		if ((InputProperty.SyncProperty.Type.KEY_EVENTS.key & properties) != 0) {
			setKeyEvents(input, updateEvents);
		}
		if ((InputProperty.SyncProperty.Type.POINTER_EVENTS.key & properties) != 0) {
			setPointerEvents(input, updateEvents);
		}
		if ((InputProperty.SyncProperty.Type.ORIENTATION.key & properties) != 0) {
			setOrientation(input);
		}
	}

	private void setX(Input input) {
		for (int i = 0; i < MAX_POINTERS; i++) {
			x[i] = input.getX(i);
		}
	}

	private void setY(Input input) {
		for (int i = 0; i < MAX_POINTERS; i++) {
			y[i] = input.getY(i);
		}
	}

	private void setDeltaX(Input input) {
		for (int i = 0; i < MAX_POINTERS; i++) {
			deltaX[i] = input.getDeltaX(i);
		}
	}

	private void setDeltaY(Input input) {
		for (int i = 0; i < MAX_POINTERS; i++) {
			deltaY[i] = input.getDeltaY(i);
		}
	}

	private void setTouched(Input input) {
		for (int i = 0; i < MAX_POINTERS; i++) {
			touched[i] = input.isTouched(i);
		}
		justTouched = input.justTouched();
	}

	private void setButtons(Input input) {
		button0 = input.isButtonPressed(0);
		button1 = input.isButtonPressed(1);
		button2 = input.isButtonPressed(2);
	}

	private void setPressedKeys(Input input) {
		EventBufferAccessHelper.copyPressedKeys(input, pressedKeys);
	}

	private void setKeyEvents(Input input, boolean update) {
		EventBufferAccessHelper.copyKeyEvents(input, keyEvents, update);
	}

	private void setPointerEvents(Input input, boolean update) {
		EventBufferAccessHelper.copyPointerEvents(input, pointerEvents, update);
	}

	private void setOrientation(Input input) {
		if (Gdx.app.getType() == ApplicationType.Android) {
			while (input instanceof InputProxy) {
				input = ((InputProxy) input).getProxiedInput();
			}
			try {
				Class<?> inputClass = input.getClass();
				if (Class.forName(
						"com.badlogic.gdx.backends.android.AndroidInput")
						.isAssignableFrom(inputClass)) {
					Method updateOrientation = inputClass.getDeclaredMethod(
							"updateOrientation", new Class<?>[0]);
					updateOrientation.setAccessible(true);
					updateOrientation.invoke(input, new Object[0]);
				}
			} catch (ClassNotFoundException e) {
				throw new IllegalStateException(
						"Android application without AndroidInput?");
			} catch (NoSuchMethodException e) {
				throw new IllegalStateException("No updateOrientation?");
			} catch (SecurityException e) {
				throw e;
			} catch (IllegalAccessException e) {
				throw new IllegalStateException(
						"Running in a too restrictive environment...");
			} catch (IllegalArgumentException e) {
				throw e;
			} catch (InvocationTargetException e) {
				throw new IllegalStateException("updateOrientation:"
						+ e.getLocalizedMessage());
			}
		}

		accelerometerX = input.getAccelerometerX();
		accelerometerY = input.getAccelerometerY();
		accelerometerZ = input.getAccelerometerZ();

		pitch = input.getPitch();
		roll = input.getRoll();
		azimuth = input.getAzimuth();
		input.getRotationMatrix(rotationMatrix);
	}

	/*
	 * Getter methods "inherited" from Input interface
	 */

	private void verifyPointer(int pointer) {
		if (pointer < 0) {
			throw new IllegalArgumentException(
					"Did not expect negative pointer indices");
		}
		if (pointer >= MAX_POINTERS) {
			throw new IllegalArgumentException("Did not expect more than "
					+ MAX_POINTERS + " pointers");
		}
	}

	public long getTimeStamp() {
		return timeStamp;
	}

	public float getAccelerometerX() {
		return accelerometerX;
	}

	public float getAccelerometerY() {
		return accelerometerY;
	}

	public float getAccelerometerZ() {
		return accelerometerZ;
	}

	public int getX() {
		return x[0];
	}

	public int getX(int pointer) {
		verifyPointer(pointer);
		return x[pointer];
	}

	public int getDeltaX() {
		return deltaX[0];
	}

	public int getDeltaX(int pointer) {
		verifyPointer(pointer);
		return deltaX[pointer];
	}

	public int getY() {
		return y[0];
	}

	public int getY(int pointer) {
		verifyPointer(pointer);
		return y[pointer];
	}

	public int getDeltaY() {
		return deltaY[0];
	}

	public int getDeltaY(int pointer) {
		verifyPointer(pointer);
		return deltaY[pointer];
	}

	public boolean justTouched() {
		return justTouched;
	}

	public boolean isTouched() {
		return touched[0];
	}

	public boolean isTouched(int pointer) {
		verifyPointer(pointer);
		return touched[pointer];
	}

	public boolean isButtonPressed(int button) {
		switch (button) {
		case 0:
			return button0;
		case 1:
			return button1;
		case 2:
			return button2;
		default:
			return false;
		}
	}

	public boolean isKeyPressed(int key) {
		if (key == Input.Keys.ANY_KEY) {
			return pressedKeys.size() > 0;
		} else {
			return pressedKeys.containsKey(key) && pressedKeys.get(key) != null
					&& pressedKeys.get(key);
		}
	}

	public float getAzimuth() {
		return azimuth;
	}

	public float getPitch() {
		return pitch;
	}

	public float getRoll() {
		return roll;
	}

	public void getRotationMatrix(float[] matrix) {
		if (matrix.length < 16 && matrix.length >= 9) {
			matrix[0] = rotationMatrix[0];
			matrix[1] = rotationMatrix[1];
			matrix[2] = rotationMatrix[2];

			matrix[3] = rotationMatrix[4];
			matrix[4] = rotationMatrix[5];
			matrix[5] = rotationMatrix[6];

			matrix[6] = rotationMatrix[8];
			matrix[7] = rotationMatrix[9];
			matrix[8] = rotationMatrix[10];
		} else if (matrix.length >= 16) {
			System.arraycopy(rotationMatrix, 0, matrix, 0, 16);
		}
	}

	public int getRotation() {
		return orientation;
	}

	/**
	 * Returns the maximum number of pointers that were tracked by this
	 * {@link InputState}. This should correspond to
	 * {@link InputRecorderConfiguration#recordedPointerCount}
	 *
	 * @return the maximum number of pointers stored
	 */
	public int getPointerCount() {
		return MAX_POINTERS;
	}

	public void apply(SyncProperty syncValue) {
		syncValue.accept(applier);
	}

	private class SyncValueApplier implements SyncPropertyVisitor {
		@Override
		public void visitAccelerometer(Accelerometer accelerometer) {
			accelerometerX = accelerometer.accelerometerX;
			accelerometerY = accelerometer.accelerometerY;
			accelerometerZ = accelerometer.accelerometerZ;
		}

		@Override
		public void visitKeyPressed(KeyPressed keyPressed) {
			pressedKeys.put(keyPressed.keyCode, Boolean.TRUE);
			// TODO where are the keys cleared?
		}

		@Override
		public void visitPointerEvent(PointerEvent pointerEvent) {
			EventBufferAccessHelper.PointerEvent addedEvent = new EventBufferAccessHelper.PointerEvent(
					pointerEvent);
			addedEvent.timeStamp = timeStamp;
			pointerEvents.add(addedEvent);
		}

		@Override
		public void visitKeyEvent(KeyEvent keyEvent) {
			EventBufferAccessHelper.KeyEvent addedEvent = new EventBufferAccessHelper.KeyEvent(
					keyEvent);
			addedEvent.timeStamp = timeStamp;
			keyEvents.add(addedEvent);
		}

		@Override
		public void visitOrientation(Orientation orientation) {
			InputState.this.orientation = orientation.orientation;
			roll = orientation.roll;
			pitch = orientation.pitch;
			azimuth = orientation.azimuth;
			System.arraycopy(orientation.rotationMatrix, 0,
					InputState.this.rotationMatrix, 0, 16);
		}

		@Override
		public void visitPointer(Pointer pointer) {
			x[pointer.pointer] = (int) pointer.x;
			y[pointer.pointer] = (int) pointer.y;
			deltaX[pointer.pointer] = (int) pointer.deltaX;
			deltaY[pointer.pointer] = (int) pointer.deltaY;
		}

		@Override
		public void visitButton(Button button) {
			button0 = button.button0;
			button1 = button.button1;
			button2 = button.button2;
		}

	}
}


text:
// Copyright (c) 2017-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <random.h>

#include <test/test_bitcoin.h>

#include <boost/test/unit_test.hpp>

#include <random>
#include <algorithm>

BOOST_FIXTURE_TEST_SUITE(random_tests, BasicTestingSetup)

BOOST_AUTO_TEST_CASE(osrandom_tests)
{
    BOOST_CHECK(Random_SanityCheck());
}

BOOST_AUTO_TEST_CASE(fastrandom_tests)
{
    // Check that deterministic FastRandomContexts are deterministic
    FastRandomContext ctx1(true);
    FastRandomContext ctx2(true);

    BOOST_CHECK_EQUAL(ctx1.rand32(), ctx2.rand32());
    BOOST_CHECK_EQUAL(ctx1.rand32(), ctx2.rand32());
    BOOST_CHECK_EQUAL(ctx1.rand64(), ctx2.rand64());
    BOOST_CHECK_EQUAL(ctx1.randbits(3), ctx2.randbits(3));
    BOOST_CHECK(ctx1.randbytes(17) == ctx2.randbytes(17));
    BOOST_CHECK(ctx1.rand256() == ctx2.rand256());
    BOOST_CHECK_EQUAL(ctx1.randbits(7), ctx2.randbits(7));
    BOOST_CHECK(ctx1.randbytes(128) == ctx2.randbytes(128));
    BOOST_CHECK_EQUAL(ctx1.rand32(), ctx2.rand32());
    BOOST_CHECK_EQUAL(ctx1.randbits(3), ctx2.randbits(3));
    BOOST_CHECK(ctx1.rand256() == ctx2.rand256());
    BOOST_CHECK(ctx1.randbytes(50) == ctx2.randbytes(50));

    // Check that a nondeterministic ones are not
    FastRandomContext ctx3;
    FastRandomContext ctx4;
    BOOST_CHECK(ctx3.rand64() != ctx4.rand64()); // extremely unlikely to be equal
    BOOST_CHECK(ctx3.rand256() != ctx4.rand256());
    BOOST_CHECK(ctx3.randbytes(7) != ctx4.randbytes(7));
}

BOOST_AUTO_TEST_CASE(fastrandom_randbits)
{
    FastRandomContext ctx1;
    FastRandomContext ctx2;
    for (int bits = 0; bits < 63; ++bits) {
        for (int j = 0; j < 1000; ++j) {
            uint64_t rangebits = ctx1.randbits(bits);
            BOOST_CHECK_EQUAL(rangebits >> bits, 0U);
            uint64_t range = ((uint64_t)1) << bits | rangebits;
            uint64_t rand = ctx2.randrange(range);
            BOOST_CHECK(rand < range);
        }
    }
}

/** Does-it-compile test for compatibility with standard C++11 RNG interface. */
BOOST_AUTO_TEST_CASE(stdrandom_test)
{
    FastRandomContext ctx;
    std::uniform_int_distribution<int> distribution(3, 9);
    for (int i = 0; i < 100; ++i) {
        int x = distribution(ctx);
        BOOST_CHECK(x >= 3);
        BOOST_CHECK(x <= 9);

        std::vector<int> test{1,2,3,4,5,6,7,8,9,10};
        std::shuffle(test.begin(), test.end(), ctx);
        for (int j = 1; j <= 10; ++j) {
            BOOST_CHECK(std::find(test.begin(), test.end(), j) != test.end());
        }
    }

}

BOOST_AUTO_TEST_SUITE_END()


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.systemui.tests">

    <uses-permission android:name="android.permission.INJECT_EVENTS" />

    <application>
        <uses-library android:name="android.test.runner" />
        <activity android:name="com.android.systemui.screenshot.ScreenshotStubActivity" />
    </application>

    <instrumentation android:name="android.test.InstrumentationTestRunner"
        android:targetPackage="com.android.systemui.tests"
        android:label="Tests for SystemUI">
    </instrumentation>
</manifest>


text:
package iris2

import "fmt"

type registerFile struct {
	// internal registers that should be easy to find
	instructionPointer Word
	stackPointer       Word
	callPointer        Word
	predicate          Word
	gpr                [RegisterCount - UserRegisterBegin]Word

	err   chan error
	out   chan Word
	index chan byte
	value chan interface{}

	Error     <-chan error
	Control   <-chan Word
	Index     chan<- byte
	Value     chan<- interface{}
	Result    <-chan Word
	Operation <-chan byte

	running bool
	temp    Word // temporary storage for internal swap operations
}

const (
	// reserved registers
	FalseRegister = iota
	TrueRegister
	InstructionPointer
	StackPointer
	PredicateRegister
	CallPointer
	UserRegisterBegin
)
const (
	registerFileGet = iota
	registerFileSet
	registerFileSwap
	registerFileMove
	registerFileOpCount
)

func newRegisterFile(control <-chan Word, op <-chan byte) *registerFile {
	var this registerFile
	this.err = make(chan error)
	this.out = make(chan Word)
	this.index = make(chan byte)
	this.value = make(chan interface{})

	this.Error = this.err
	this.Control = control
	this.Operation = op
	this.Result = this.out
	this.Index = this.index
	this.Value = this.value

	return &this
}
func (this *registerFile) setRegister(index byte, value Word) error {
	switch index {
	case FalseRegister:
		return fmt.Errorf("Can't write to the zero/false register!")
	case TrueRegister:
		return fmt.Errorf("Can't write to the one/true register!")
	case InstructionPointer:
		this.instructionPointer = value
	case StackPointer:
		this.stackPointer = value
	case PredicateRegister:
		this.predicate = value
	case CallPointer:
		this.callPointer = value
	default:
		this.gpr[index-UserRegisterBegin] = value
	}
	return nil
}
func (this *registerFile) getRegister(index byte) Word {
	switch index {
	case FalseRegister:
		return 0
	case TrueRegister:
		return 1
	case InstructionPointer:
		return this.instructionPointer
	case StackPointer:
		return this.stackPointer
	case PredicateRegister:
		return this.predicate
	case CallPointer:
		return this.callPointer
	default:
		// do the offset calculation
		return this.gpr[index-UserRegisterBegin]
	}
}

func (this *registerFile) swapRegisters(a, b byte) error {
	if a != b {
		this.temp = this.getRegister(a)
		if err := this.setRegister(a, this.getRegister(b)); err != nil {
			return err
		} else if err := this.setRegister(b, this.temp); err != nil {
			return err
		} else {
			return nil
		}
	} else {
		return nil
	}
}
func (this *registerFile) moveRegister(a, b byte) error {
	if a != b {
		return this.setRegister(a, this.getRegister(b))
	} else {
		return nil
	}
}
func (this *registerFile) Startup() error {
	if this.running {
		return fmt.Errorf("This register file is already running!")
	} else {
		this.running = true
		go this.body()
		go this.controlQuery()
		return nil
	}
}
func (this *registerFile) body() {
	for this.running {
		select {
		case op := <-this.Operation:
			if op >= registerFileOpCount {
			} else {
				arg0 := <-this.index
				arg1 := <-this.value
				switch op {
				case registerFileGet:
					this.out <- this.getRegister(arg0)
				case registerFileSet:
					switch arg1.(type) {
					case Word:
						if err := this.setRegister(arg1.(Word)); err != nil {
							this.err <- err
						}
					default:
						this.err <- fmt.Errorf("Only words are allowed in a register file set operation!")
					}
				case registerFileSwap:
					switch arg1.(type) {
					case byte:
						if err := this.swapRegisters(arg0, arg1.(byte)); err != nil {
							this.err <- err
						}
					default:
						this.err <- fmt.Errorf("Only bytes are allowed in a register file swap operation!")
					}
				case registerFileMove:
					switch arg1.(type) {
					case byte:
						if err := this.moveRegister(arg0, arg1.(byte)); err != nil {
							this.err <- err
						}
					default:
						this.err <- fmt.Errorf("Only bytes are allowed in a register file move operation!")
					}
				default:
					this.err <- fmt.Errorf("Illegal register file operation %d", op)
				}
			}
		}
	}
}

func (this *registerFile) controlQuery() {
	<-this.Control
	if err := this.shutdown(); err != nil {
		this.err <- err
	}
}

func (this *registerFile) shutdown() error {
	if !this.running {
		return fmt.Errorf("Can't shutdown a register file that isn't running!")
	} else {
		this.running = false
		return nil
	}
}


text:
Sheet Control

    Show

Music

Imagine Dragons

Radioactive

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.

The Hurry and the Harm

Hurt

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.

David Cook

Permanent

Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni.

Kiss

This Kiss

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum.

Willy Moon

Yeah Yeah

Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae.