text:
<?xml version="1.0" encoding="utf-8"?>
<!--Created:cbbc9d22-5cf7-4e4c-8ee9-42a772aae58a-->
<OfficeApp
  xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
  xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides"
  xsi:type="MailApp">
  <Id>62916641-fc48-44ae-a2a3-163811f1c945</Id>
  <Version>4.0</Version>
  <ProviderName>Stephen Griffin</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Message Header Analyzer" />
  <Description DefaultValue="Microsoft Message Header Analyzer" />
  <IconUrl DefaultValue="https://mha.azurewebsites.net/Resources/mhaLogo64.jpg" />
  <HighResolutionIconUrl DefaultValue="https://mha.azurewebsites.net/Resources/mhaLogo128.jpg" />
  <SupportUrl DefaultValue="https://github.com/stephenegriffin/MHA/issues" />
  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
  <Requirements>
    <Sets DefaultMinVersion="1.1">
      <Set Name="Mailbox" />
    </Sets>
  </Requirements>

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://mha.azurewebsites.net/Pages/Default.html" />
        <RequestedHeight>450</RequestedHeight>
      </DesktopSettings>

      <TabletSettings>
        <SourceLocation DefaultValue="https://mha.azurewebsites.net/Pages/DefaultTablet.html" />
        <RequestedHeight>350</RequestedHeight>
      </TabletSettings>

      <PhoneSettings>
        <SourceLocation DefaultValue="https://mha.azurewebsites.net/Pages/DefaultPhone.html" />
      </PhoneSettings>
    </Form>
  </FormSettings>

  <!-- TODO: Dial this down to ReadItem when the token bug is fixed -->
  <Permissions>ReadWriteMailbox</Permissions>

  <Rule xsi:type="RuleCollection" Mode="And">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
  </Rule>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.3">
        <bt:Set Name="Mailbox" />
      </bt:Sets>
    </Requirements>

    <Hosts>
      <Host xsi:type="MailHost">

        <DesktopFormFactor>
          <FunctionFile resid="functionFile" />

          <!-- Message read form -->
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="mhaCmdGroup">
                <Label resid="groupLabel" />
                <!-- Task pane button -->
                <Control xsi:type="Button" id="mhaOpenPaneButton">
                  <Label resid="mhaOpenPaneBtnLabel" />
                  <Supertip>
                    <Title resid="mhaOpenPaneBtnTipTitle" />
                    <Description resid="mhaOpenPaneBtnTipDescription" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="mha-icon-16" />
                    <bt:Image size="32" resid="mha-icon-32" />
                    <bt:Image size="80" resid="mha-icon-80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="mhaTaskPaneUrl" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <!-- MHA icon -->
        <bt:Image id="mha-icon-16" DefaultValue="https://mha.azurewebsites.net/Resources/mhaLogo.jpg"/>
        <bt:Image id="mha-icon-32" DefaultValue="https://mha.azurewebsites.net/Resources/mhaLogo.jpg"/>
        <bt:Image id="mha-icon-80" DefaultValue="https://mha.azurewebsites.net/Resources/mhaLogo.jpg"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="functionFile" DefaultValue="https://mha.azurewebsites.net/Pages/Functions.html"/>
        <bt:Url id="mhaTaskPaneUrl" DefaultValue="https://mha.azurewebsites.net/Pages/Default.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue=" "/>
        <bt:String id="mhaOpenPaneBtnLabel" DefaultValue="View Headers"/>
        <bt:String id="mhaOpenPaneBtnTipTitle" DefaultValue="Open a pane to view the available headers on the current message"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="mhaOpenPaneBtnTipDescription" DefaultValue="Retrieves the transport message headers of the current message and displays them in an easy-to-read format." />
      </bt:LongStrings>
    </Resources>

    <!-- VersionOverrides v1.1 -->
    <!-- Use this to enable taskpane pinning -->
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Requirements>
        <bt:Sets DefaultMinVersion="1.3">
          <bt:Set Name="Mailbox" />
        </bt:Sets>
      </Requirements>

      <Hosts>
        <Host xsi:type="MailHost">

          <DesktopFormFactor>
            <FunctionFile resid="functionFile" />

            <!-- Message read form -->
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="mhaCmdGroup">
                  <Label resid="groupLabel" />
                  <!-- Task pane button -->
                  <Control xsi:type="Button" id="mhaOpenPaneButton">
                    <Label resid="mhaOpenPaneBtnLabel" />
                    <Supertip>
                      <Title resid="mhaOpenPaneBtnTipTitle" />
                      <Description resid="mhaOpenPaneBtnTipDescription" />
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="mha-icon-16" />
                      <bt:Image size="32" resid="mha-icon-32" />
                      <bt:Image size="80" resid="mha-icon-80" />
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="mhaDesktopPaneUrl" />
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>

          <MobileFormFactor>
            <FunctionFile resid="functionFile" />

            <ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
              <Group id="mobileMsgRead">
                <Label resid="groupLabel" />
                <Control xsi:type="MobileButton" id="mblOpenPaneButton">
                  <Label resid="mhaOpenPaneBtnLabel" />
                  <Icon xsi:type="bt:MobileIconList">
                    <bt:Image size="25" scale="1" resid="mha-icon-32" />
                    <bt:Image size="25" scale="2" resid="mha-icon-32" />
                    <bt:Image size="25" scale="3" resid="mha-icon-32" />

                    <bt:Image size="32" scale="1" resid="mha-icon-32" />
                    <bt:Image size="32" scale="2" resid="mha-icon-32" />
                    <bt:Image size="32" scale="3" resid="mha-icon-32" />

                    <bt:Image size="48" scale="1" resid="mha-icon-32" />
                    <bt:Image size="48" scale="2" resid="mha-icon-32" />
                    <bt:Image size="48" scale="3" resid="mha-icon-32" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="mhaMobilePaneUrl" />
                  </Action>
                </Control>
              </Group>
            </ExtensionPoint>
          </MobileFormFactor>
        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <!-- MHA icon -->
          <bt:Image id="mha-icon-16" DefaultValue="https://mha.azurewebsites.net/Resources/mhaLogo.jpg"/>
          <bt:Image id="mha-icon-32" DefaultValue="https://mha.azurewebsites.net/Resources/mhaLogo.jpg"/>
          <bt:Image id="mha-icon-80" DefaultValue="https://mha.azurewebsites.net/Resources/mhaLogo.jpg"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="functionFile" DefaultValue="https://mha.azurewebsites.net/Pages/Functions.html"/>
          <bt:Url id="mhaDesktopPaneUrl" DefaultValue="https://mha.azurewebsites.net/Pages/DesktopPane.html"/>
          <bt:Url id="mhaMobilePaneUrl" DefaultValue="https://mha.azurewebsites.net/Pages/MobilePane.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="groupLabel" DefaultValue=" "/>
          <bt:String id="mhaOpenPaneBtnLabel" DefaultValue="View Headers"/>
          <bt:String id="mhaOpenPaneBtnTipTitle" DefaultValue="Open a pane to view the available headers on the current message"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="mhaOpenPaneBtnTipDescription" DefaultValue="Retrieves the transport message headers of the current message and displays them in an easy-to-read format." />
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>


text:
static void enable_bsd_fragmentation(int fd)
{
#ifdef IP_DONTFRAG
  const int x = 0;
  setsockopt(fd,SOL_IP,IP_DONTFRAG,&x,sizeof x);
#endif
}

static void enable_linux_fragmentation(int fd)
{
#ifdef IP_MTU_DISCOVER
#ifdef IP_PMTUDISC_DONT
  const int x = IP_PMTUDISC_DONT;
  setsockopt(fd,SOL_IP,IP_MTU_DISCOVER,&x,sizeof x);
#endif
#endif
}

int socket_udp(void)
{
  int fd = socket(PF_INET,SOCK_DGRAM,0);
  if (fd == -1) return -1;
  fcntl(fd,F_SETFD,1);
  blocking_disable(fd);
  enable_bsd_fragmentation(fd);
  enable_linux_fragmentation(fd);
  return fd;
}

redpajama_set_name: RedPajamaGithub


text:
(function( factory ) {
	if ( typeof define === "function" && define.amd ) {
		define( ["jquery", "../jquery.validate"], factory );
	} else if (typeof module === "object" && module.exports) {
		module.exports = factory( require( "jquery" ) );
	} else {
		factory( jQuery );
	}
}(function( $ ) {

/*
 * Translated default messages for the jQuery validation plugin.
 * Locale: HU (Hungarian; Magyar)
 */
$.extend( $.validator.messages, {
	required: "Kötelező megadni.",
	maxlength: $.validator.format( "Legfeljebb {0} karakter hosszú legyen." ),
	minlength: $.validator.format( "Legalább {0} karakter hosszú legyen." ),
	rangelength: $.validator.format( "Legalább {0} és legfeljebb {1} karakter hosszú legyen." ),
	email: "Érvényes e-mail címnek kell lennie.",
	url: "Érvényes URL-nek kell lennie.",
	date: "Dátumnak kell lennie.",
	number: "Számnak kell lennie.",
	digits: "Csak számjegyek lehetnek.",
	equalTo: "Meg kell egyeznie a két értéknek.",
	range: $.validator.format( "{0} és {1} közé kell esnie." ),
	max: $.validator.format( "Nem lehet nagyobb, mint {0}." ),
	min: $.validator.format( "Nem lehet kisebb, mint {0}." ),
	creditcard: "Érvényes hitelkártyaszámnak kell lennie.",
	remote: "Kérem javítsa ki ezt a mezőt.",
	dateISO: "Kérem írjon be egy érvényes dátumot (ISO)."
} );
return $;
}));


text:
import StringInspector from './StringInspector';

const props = Object.freeze({
  original: Symbol('property:original'),
  isValid: Symbol('property:isValid'),
  error: Symbol('property:error'),
  keep: Symbol('property:keep'),
  drop: Symbol('property:drop'),
  highestRolls: Symbol('property:highestRolls'),
  lowestRolls: Symbol('property:lowestRolls'),
  explodingRolls: Symbol('property:explodingRolls'),
  reroll: Symbol('property:reroll')
});

// the characters that denote the start of a roll option
const commandCharacters = '!kdr';
// the regex that can parse a keep or drop command argument
const keepDropArguments = /^([hl]?)([0-9]+)/i;
// the regex that can parse a reroll argument
const rerollArguments = /^([<>]?=?)(\d+)/;

const isCommandChar = c => c && commandCharacters.indexOf(c) >= 0;

const simpleReroll = match => {
  return num => num === match;
};

const comparisonReroll = (match, operator, orEquals) => {
  if(operator === '>'){
    if(orEquals){
      return num => num >= match;
    } else {
      return num => num > match;
    }
  } else if(operator === '<'){
    if(orEquals){
      return num => num <= match;
    } else {
      return num => num < match;
    }
  } else {
    return () => false;
  }
};

/**
 * Parse the options for the roll options object
 * @param {RollOptions} ro
 * @param {StringInspector} options
 * @private
 */
const parseOptions = (ro, options) => {
  while(ro[props.isValid] && options.hasNext){
    const discard = options.nextUntil(isCommandChar);
    if(discard.trim()){
      throw new Error('Discarded information found in RollOptions: ' + discard);
    }
    const cmd = options.next();
    if(cmd !== false){
      switch(cmd){
        case '!':
          ro[props.explodingRolls] = true;
          break;
        case 'k':
          const keepArgs = options.nextWith(keepDropArguments);
          if(keepArgs){
            if(ro[props.drop]){
              ro[props.isValid] = false;
              ro[props.error] = 'Cannot enable both "keep" and "drop" options simultaneously.';
            } else {
              if(keepArgs[1] === 'l' || keepArgs[1] === 'L'){
                ro[props.lowestRolls] = true;
                ro[props.highestRolls] = false;
              } else {
                ro[props.highestRolls] = true;
                ro[props.lowestRolls] = false;
              }
              ro[props.keep] = parseInt(keepArgs[2], 10);
            }
          } else {
            ro[props.isValid] = false;
            ro[props.error] = 'You must specify valid options for the (k)eep modifier, e.g. k3, kl2, kh2';
          }
          break;
        case 'd':
          const dropArgs = options.nextWith(keepDropArguments);
          if(dropArgs){
            if(ro[props.keep]){
              ro[props.isValid] = false;
              ro[props.error] = 'Cannot enable both "keep" and "drop" options simultaneously.';
            } else {
              if(dropArgs[1] === 'h' || dropArgs[1] === 'H'){
                ro[props.highestRolls] = true;
                ro[props.lowestRolls] = false;
              } else {
                ro[props.lowestRolls] = true;
                ro[props.highestRolls] = false;
              }
              ro[props.drop] = parseInt(dropArgs[2], 10);
            }
          } else {
            ro[props.isValid] = false;
            ro[props.error] = 'You must specify valid options for the (d)rop modifier, e.g. d3, dl2, dh3';
          }
          break;
        case 'r':
          const rerollArgs = options.nextWith(rerollArguments);
          if(rerollArgs){
            const target = parseInt(rerollArgs[2], 10);
            if(isNaN(target)){
              ro[props.isValid] = false;
              ro[props.error] = 'You must supply a number for reroll options';
            } else {
              if(rerollArgs[1].length){
                const operator = rerollArgs[1][0];
                const orEquals = rerollArgs[1].length > 1;
                ro.reroll.push(comparisonReroll(target, operator, orEquals));
              } else {
                //simple match reroll
                ro.reroll.push(simpleReroll(target));
              }
            }
          } else {
            ro[props.isValid] = false;
            ro[props.error] = 'You must specify valid options for the (r)eroll modifier, e.g. r1, r<5, r>=10';
          }
          break;
      }
    }
  }
};

export default class RollOptions {
  /**
   * Create a new set of roll options
   * @param {string} options
   * @constructs RollOptions
   */
  constructor(options){
    this[props.original] = options;
    this[props.isValid] = true;
    this[props.error] = '';
    this[props.keep] = false;
    this[props.drop] = false;
    this[props.highestRolls] = false;
    this[props.lowestRolls] = false;
    this[props.explodingRolls] = false;
    this[props.reroll] = []

    parseOptions(this, new StringInspector(options));
  }
  /**
   * @member {boolean} isValid - if true, the roll options are valid
   * @memberof RollOptions
   * @instance
   * @readonly
   */
  get isValid() { return this[props.isValid]; }
  /**
   * @member {string} error - if truthy, the error that was encountered while parsing the options
   * @memberof RollOptions
   * @instance
   * @readonly
   */
  get error() { return this[props.error]; }
  /**
   * @member {(number|boolean)} keep - if true-ish, keep only that number of dice rolls from the roll set
   * @memberof RollOptions
   * @instance
   * @readonly
   */
  get keep() { return this[props.keep]; }
  /**
   * @member {(number|boolean)} drop - if true-ish, drop that number of dice rolls from the roll set
   * @memberof RollOptions
   * @instance
   * @readonly
   */
  get drop() { return this[props.drop]; }
  /**
   * @member {boolean} highestRolls - if true, keep/drop applies to the highest rolls
   * @memberof RollOptions
   * @instance
   * @readonly
   */
  get highestRolls() { return this[props.highestRolls]; }
  /**
   * @member {boolean} lowestRolls - if true, keep/drop applies to the lowest rolls
   * @memberof RollOptions
   * @instance
   * @readonly
   */
  get lowestRolls() { return this[props.lowestRolls]; }
  /**
   * @member {boolean} explodingRolls - if true, max value rolls should be rolled an additional time
   * @memberof RollOptions
   * @instance
   * @readonly
   */
  get explodingRolls() { return this[props.explodingRolls]; }
  /**
   * @member {Array} reroll - the collection of reroll callbacks
   * @memberof RollOptions
   * @instance
   * @readonly
   */
  get reroll() { return this[props.reroll]; }

  /**
   * Check a roll to see if it needs to be rerolled
   * @param {number} num - the roll value to check for needs to reroll
   * @memberof RollOptions
   * @instance
   */
  needReroll(num){
    for(const rule of this.reroll){
      if(rule(num)){
        return true;
      }
    }
    return false;
  }

  /**
   * Get the RollOptions original string
   * @memberof RollOptions
   * @instance
   */
  toString(){
    return this[props.original];
  }

  /**
   * Try to get all possible options from a string inspector
   * @param {StringInspector} parser
   * @returns {string} the resulting options string
   * @memberof RollOptions
   */
  static findOptions(parser) {
    const options = [];
    while(isCommandChar(parser.peek())){
      const letter = parser.next();
      options.push(letter);
      switch(letter){
        case 'k':
        case 'd':
          const kdArgs = parser.nextWith(keepDropArguments);
          if(kdArgs){
            options.push(kdArgs[0]);
          }
          break;
        case 'r':
          const rArgs = parser.nextWith(rerollArguments);
          if(rArgs){
            options.push(rArgs[0]);
          }
          break;
      }
    }
    return options.join('');
  }
}


text:
import NavigatorIOS from "app/utils/__legacy_do_not_use__navigator-ios-shim"
import { BackHandler, ImageRequireSource, NativeEventSubscription, View } from "react-native"
import { createFragmentContainer, graphql } from "react-relay"

import { dismissModal, navigate } from "app/navigation/navigate"

import { Button, Theme } from "palette"
import React from "react"
import { Icon20 } from "../Components/Icon"
import { Flex } from "../Elements/Flex"

import { Markdown } from "../../Markdown"
import { Container } from "../Components/Containers"
import { Timer } from "../Components/Timer"
import { Title } from "../Components/Title"

import { BidResult_sale_artwork$data } from "__generated__/BidResult_sale_artwork.graphql"
import { FancyModalHeader } from "app/Components/FancyModal/FancyModalHeader"
import { unsafe__getEnvironment } from "app/store/GlobalStore"
import { BidderPositionResult } from "../types"

const SHOW_TIMER_STATUSES = ["WINNING", "OUTBID", "RESERVE_NOT_MET"]

interface BidResultProps {
  sale_artwork: BidResult_sale_artwork$data
  bidderPositionResult: BidderPositionResult
  navigator: NavigatorIOS
  refreshBidderInfo?: () => void
  refreshSaleArtwork?: () => void
  biddingEndAt?: string
}

const messageForPollingTimeout = {
  title: "Bid processing",
  description:
    "We're receiving a high volume of traffic\n" +
    "and your bid is still processing.\n\n" +
    "If you don't receive an update soon,\n" +
    "please contact [support@artsy.net](mailto:support@artsy.net).",
}

const Icons: Record<string, ImageRequireSource> = {
  WINNING: require("images/circle-check-green.webp"),
  PENDING: require("images/circle-exclamation.webp"),
}

export class BidResult extends React.Component<BidResultProps> {
  backButtonListener?: NativeEventSubscription = undefined

  componentDidMount = () => {
    this.backButtonListener = BackHandler.addEventListener(
      "hardwareBackPress",
      this.handleBackButton
    )
  }

  componentWillUnmount = () => {
    this.backButtonListener?.remove()
  }

  onPressBidAgain = () => {
    // refetch bidder information so your registration status is up to date
    if (this.props.refreshBidderInfo) {
      this.props.refreshBidderInfo()
    }

    // fetch the latest increments for the select max bid screen
    if (this.props.refreshSaleArtwork) {
      this.props.refreshSaleArtwork()
    }

    // pushing to MaxBidScreen creates a circular relay reference but this works
    // TODO: correct the screen transition animation
    this.props.navigator.popToTop()
  }

  exitBidFlow = async () => {
    if (this.props.bidderPositionResult.status === "LIVE_BIDDING_STARTED") {
      const saleSlug = this.props.sale_artwork.sale?.slug
      const url = `${unsafe__getEnvironment().predictionURL}/${saleSlug}`
      navigate(url, { modal: true })
    } else {
      dismissModal()
    }
  }

  handleBackButton = () => {
    if (this.canBidAgain(this.props.bidderPositionResult.status)) {
      return false
    } else {
      dismissModal()
      return true
    }
  }

  render() {
    const { sale_artwork, bidderPositionResult } = this.props
    const { status, message_header, message_description_md } = bidderPositionResult

    return (
      <View style={{ flex: 1 }}>
        <Theme>
          <FancyModalHeader useXButton onLeftButtonPress={dismissModal} />
        </Theme>
        <Container mt={6}>
          <View>
            <Flex alignItems="center">
              <Icon20 source={Icons[status] || require("images/circle-x-red.webp")} />
              <Title mt={2} mb={5}>
                {status === "PENDING"
                  ? messageForPollingTimeout.title
                  : message_header || "You're the highest bidder"}
              </Title>
              {status !== "WINNING" && (
                <Markdown mb={5}>
                  {status === "PENDING"
                    ? messageForPollingTimeout.description
                    : message_description_md}
                </Markdown>
              )}
              {!!this.shouldDisplayTimer(status) && (
                <Timer
                  liveStartsAt={sale_artwork.sale?.liveStartAt ?? undefined}
                  lotEndAt={sale_artwork.endAt}
                  biddingEndAt={this.props.biddingEndAt}
                />
              )}
            </Flex>
          </View>
          {this.canBidAgain(status) ? (
            <Button block width={100} onPress={() => this.onPressBidAgain()}>
              Bid again
            </Button>
          ) : (
            <Button variant="outline" block width={100} onPress={this.exitBidFlow}>
              Continue
            </Button>
          )}
        </Container>
      </View>
    )
  }

  private shouldDisplayTimer(status: string) {
    return SHOW_TIMER_STATUSES.indexOf(status) > -1
  }

  private canBidAgain(status: string) {
    return status === "OUTBID" || status === "RESERVE_NOT_MET"
  }
}

export const BidResultScreen = createFragmentContainer(BidResult, {
  sale_artwork: graphql`
    fragment BidResult_sale_artwork on SaleArtwork {
      endAt
      extendedBiddingEndAt
      sale {
        liveStartAt
        endAt
        slug
        cascadingEndTimeIntervalMinutes
      }
    }
  `,
})


text:
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
define(["require", "exports", "./Event"], function (require, exports, Event_1) {
    "use strict";
    var TimeEvent = (function (_super) {
        __extends(TimeEvent, _super);
        function TimeEvent(type, delta, paused, time, runtime, bubbles, cancelable) {
            if (bubbles === void 0) { bubbles = null; }
            if (cancelable === void 0) { cancelable = null; }
            _super.call(this, type, bubbles, cancelable);
            this.delta = delta;
            this.paused = paused;
            this.time = time;
            this.runTime = runtime;
        }
        return TimeEvent;
    }(Event_1.default));
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.default = TimeEvent;
});


text:
"""
'console.py' is a script for starting an ipython session within the
buzzbot application's environment.

You must install ipython first. E.g.,:

  # Using Debian or Ubuntu's package manager
  sudo apt-get install ipython

  # Using easy_install
  easy_install -Z ipython
"""

if __name__ == "__main__":
    import buzzbot
    from buzzbot import *
    from buzzbot.model import *

    buzzbot.commands.boot()
    from IPython.Shell import IPShellEmbed
    ipshell = IPShellEmbed()
    print "* CONSOLE: Press CTRL-D or enter '%quit' to exit."
    ipshell()


text:
<?php
class ControllerPaymentSkrill extends Controller {
	public function index() {
		$this->load->model('checkout/order');

		$this->load->language('payment/skrill');

		$data['button_confirm'] = $this->language->get('button_confirm');

		$data['action'] = 'https://www.moneybookers.com/app/payment.pl?p=OpenCart';

		$data['pay_to_email'] = $this->config->get('skrill_email');
		$data['platform'] = '31974336';
		$data['description'] = $this->config->get('config_name');
		$data['transaction_id'] = $this->session->data['order_id'];
		$data['return_url'] = $this->url->link('checkout/success');
		$data['cancel_url'] = $this->url->link('checkout/checkout', '', 'SSL');
		$data['status_url'] = $this->url->link('payment/skrill/callback');
		$data['language'] = $this->session->data['language'];
		$data['logo'] = $this->config->get('config_url') . 'image/' . $this->config->get('config_logo');

		$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);

		$data['pay_from_email'] = $order_info['email'];
		$data['firstname'] = $order_info['payment_firstname'];
		$data['lastname'] = $order_info['payment_lastname'];
		$data['address'] = $order_info['payment_address_1'];
		$data['address2'] = $order_info['payment_address_2'];
		$data['phone_number'] = $order_info['telephone'];
		$data['postal_code'] = $order_info['payment_postcode'];
		$data['city'] = $order_info['payment_city'];
		$data['state'] = $order_info['payment_zone'];
		$data['country'] = $order_info['payment_iso_code_3'];
		$data['amount'] = $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false);
		$data['currency'] = $order_info['currency_code'];

		$products = '';

		foreach ($this->cart->getProducts() as $product) {
			$products .= $product['quantity'] . ' x ' . $product['name'] . ', ';
		}

		$data['detail1_text'] = $products;

		$data['order_id'] = $this->session->data['order_id'];

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/skrill.tpl')) {
			return $this->load->view($this->config->get('config_template') . '/template/payment/skrill.tpl', $data);
		} else {
			return $this->load->view('default/template/payment/skrill.tpl', $data);
		}
	}

	public function callback() {
		if (isset($this->request->post['order_id'])) {
			$order_id = $this->request->post['order_id'];
		} else {
			$order_id = 0;
		}

		$this->load->model('checkout/order');

		$order_info = $this->model_checkout_order->getOrder($order_id);

		if ($order_info) {
			$this->model_checkout_order->addOrderHistory($order_id, $this->config->get('config_order_status_id'));

			$verified = true;

			// md5sig validation
			if ($this->config->get('skrill_secret')) {
				$hash  = $this->request->post['merchant_id'];
				$hash .= $this->request->post['transaction_id'];
				$hash .= strtoupper(md5($this->config->get('skrill_secret')));
				$hash .= $this->request->post['mb_amount'];
				$hash .= $this->request->post['mb_currency'];
				$hash .= $this->request->post['status'];

				$md5hash = strtoupper(md5($hash));
				$md5sig = $this->request->post['md5sig'];

				if ($md5hash != $md5sig) {
					$verified = false;
				}
			}

			if ($verified) {
				switch($this->request->post['status']) {
					case '2':
						$this->model_checkout_order->addOrderHistory($order_id, $this->config->get('skrill_order_status_id'), '', true);
						break;
					case '0':
						$this->model_checkout_order->addOrderHistory($order_id, $this->config->get('skrill_pending_status_id'), '', true);
						break;
					case '-1':
						$this->model_checkout_order->addOrderHistory($order_id, $this->config->get('skrill_canceled_status_id'), '', true);
						break;
					case '-2':
						$this->model_checkout_order->addOrderHistory($order_id, $this->config->get('skrill_failed_status_id'), '', true);
						break;
					case '-3':
						$this->model_checkout_order->addOrderHistory($order_id, $this->config->get('skrill_chargeback_status_id'), '', true);
						break;
				}
			} else {
				$this->log->write('md5sig returned (' + $md5sig + ') does not match generated (' + $md5hash + '). Verify Manually. Current order state: ' . $this->config->get('config_order_status_id'));
			}
		}
	}
}


text:
using System;
using MbUnit.Framework;
using Gallio.NAntTasks;

namespace Gallio.NAntTasks.Tests
{
    [TestFixture]
    [Author("Julian Hidalgo")]
    [TestsOn(typeof(TaskLogger))]
    public class TaskLoggerTest
    {
        [Test]
        [ExpectedException(typeof(ArgumentNullException))]
        public void InstantiateLoggerWithNullArgument()
        {
            new TaskLogger(null);
        }

        [Test]
        public void InstantiateLogger()
        {
            GallioTask task = new GallioTask();
            new TaskLogger(task);
        }
    }
}


text:
#ifndef MCP_CST_H
#define MCP_CST_H
/*!\file MCP_cst.h
  \brief Constants to define the list of available MCP solvers. See the solver list \ref mcpSolversList
*/
/**\enum MCP_SOLVER
   Each SICONOS_MCP_XXX refers to number of the solver XXX for MCP. See the solver list \ref mcpSolversList
 */
enum MCP_SOLVER
{
  SICONOS_MCP_FB = 700,
  SICONOS_MCP_NEWTON_FBLSA = 701,
  SICONOS_MCP_NEWTON_MINFBLSA = 702
};

extern char *SICONOS_MCP_FB_STR;
extern char *SICONOS_MCP_NEWTON_FBLSA_STR;
extern char *SICONOS_MCP_NEWTON_MINFBLSA_STR;

#endif


text:
Extra tasks to use in conjunction with smild.

## Contribute

I am using [Git Flow](https://github.com/nvie/gitflow).


text:
package org.apache.flink.graph.utils.proxy;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.flink.api.java.DataSet;
import org.apache.flink.api.java.operators.NoOpOperator;
import org.apache.flink.graph.Graph;
import org.apache.flink.graph.GraphAlgorithm;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * A {@link GraphAlgorithm} transforms an input {@link Graph} into an output of
 * type {@code T}. A {@code GraphAlgorithmWrappingDataSet} wraps the resultant
 * {@link DataSet} with a {@code NoOpOperator}. The input to the wrapped
 * operator can be replaced when the same algorithm is run on the same input
 * with a mergeable configuration. This allows algorithms to be composed of
 * implicitly reusable algorithms without publicly sharing intermediate
 * {@link DataSet}s.
 *
 * @param <K> ID type
 * @param <VV> vertex value type
 * @param <EV> edge value type
 * @param <T> output type
 */
public abstract class GraphAlgorithmWrappingDataSet<K, VV, EV, T>
implements GraphAlgorithm<K, VV, EV, DataSet<T>> {

	// each algorithm and input pair may map to multiple configurations
	private static Map<GraphAlgorithmWrappingDataSet, List<GraphAlgorithmWrappingDataSet>> cache =
		Collections.synchronizedMap(new HashMap<GraphAlgorithmWrappingDataSet, List<GraphAlgorithmWrappingDataSet>>());

	private Graph<K, VV, EV> input;

	private NoOpOperator<T> wrappingOperator;

	/**
	 * Algorithms are identified by name rather than by class to allow subclassing.
	 *
	 * @return name of the algorithm, which may be shared by multiple classes
	 *		 implementing the same algorithm and generating the same output
	 */
	protected abstract String getAlgorithmName();

	/**
	 * An algorithm must first test whether the configurations can be merged
	 * before merging individual fields.
	 *
	 * @param other the algorithm with which to compare and merge
	 * @return true if and only if configuration has been merged and the
	 *          algorithm's output can be reused
	 */
	protected abstract boolean mergeConfiguration(GraphAlgorithmWrappingDataSet other);

	/**
	 * The implementation of the algorithm, renamed from {@link GraphAlgorithm#run(Graph)}.
	 *
	 * @param input the input graph
	 * @return the algorithm's output
	 * @throws Exception
	 */
	protected abstract DataSet<T> runInternal(Graph<K, VV, EV> input) throws Exception;

	@Override
	public final int hashCode() {
		return new HashCodeBuilder(17, 37)
			.append(input)
			.append(getAlgorithmName())
			.toHashCode();
	}

	@Override
	public final boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		if (obj == this) {
			return true;
		}

		if (! GraphAlgorithmWrappingDataSet.class.isAssignableFrom(obj.getClass())) {
			return false;
		}

		GraphAlgorithmWrappingDataSet rhs = (GraphAlgorithmWrappingDataSet) obj;

		return new EqualsBuilder()
			.append(input, rhs.input)
			.append(getAlgorithmName(), rhs.getAlgorithmName())
			.isEquals();
	}

	@Override
	@SuppressWarnings("unchecked")
	public final DataSet<T> run(Graph<K, VV, EV> input)
			throws Exception {
		this.input = input;

		if (cache.containsKey(this)) {
			for (GraphAlgorithmWrappingDataSet<K, VV, EV, T> other : cache.get(this)) {
				if (mergeConfiguration(other)) {
					// configuration has been merged so generate new output
					DataSet<T> output = runInternal(input);

					other.wrappingOperator.setInput(output);
					wrappingOperator = other.wrappingOperator;

					return wrappingOperator;
				}
			}
		}

		// no mergeable configuration found so generate new output
		DataSet<T> output = runInternal(input);

		// create a new operator to wrap the algorithm output
		wrappingOperator = new NoOpOperator<>(output, output.getType());

		// cache this result
		if (cache.containsKey(this)) {
			cache.get(this).add(this);
		} else {
			cache.put(this, new ArrayList(Collections.singletonList(this)));
		}

		return wrappingOperator;
	}
}


text:
@interface NSDictionary (XBExtension)

+ (NSMutableDictionary *)dictionaryWithContentsOfPlist:(NSString *)plistname;
+ (NSMutableDictionary *)dictionaryWithContentsOfPlist:(NSString *)plistname bundleName:(NSString *)name;

@end


text:
package es.tid.cosmos.servicemanager.clusters.sql

import scala.concurrent.Future

import org.scalatest.{BeforeAndAfterAll, FlatSpec}
import org.scalatest.matchers.MustMatchers

import es.tid.cosmos.servicemanager.ClusterName
import es.tid.cosmos.servicemanager.clusters.ClusterId
import es.tid.cosmos.servicemanager.services.{Hdfs, InfinityServer, MapReduce2, Service}

class SqlClusterDaoTest extends FlatSpec with MustMatchers with BeforeAndAfterAll {

  val db = new H2InMemoryDatabase

  override protected def beforeAll(): Unit = {
    db.newSession.bindToCurrentThread
    ClusterSchema.create
  }

  "SqlClusterDao" must "allow update the cluster services list" in {
    val dao = new SqlClusterDao(db)
    val clusterId = ClusterId.random()
    val originalServices: Set[Service] = Set(Hdfs, MapReduce2)
    val newServices = (originalServices + InfinityServer).map{_.name}

    dao.registerCluster(clusterId, ClusterName("myCluster"), 1, originalServices)

    val cluster = dao.getDescription(clusterId).get
    cluster.withFailsafe {
      val diffServs =  newServices diff cluster.services
      cluster.services = cluster.services ++ diffServs
      Future.successful(())
    }

    dao.getDescription(clusterId).get.services must be (newServices)
  }

}


text:
Simple bitwise toggler with enum options packed as AngularJS service and filter.
This module provide convenient way to manage array of boolean flags, while using enum to turn on/off the options or get the state.

## Getting Started
### Install
_NPM and YARN are coming soon_

1. Include the js files (in this order)
    1. bitwiseEnum.module.js
    2. bitwiseEnum.service.js
    3. bitwiseEnum.filter.js
2. Require module ```'ng-bitwise-enum'``` in your angular app
3. inject ```'BitwiseEnum'``` service into your angular component/ctrl
3. Init the bitwise-enum with desired options

### Service Example
```javascript
var options = [
    'EDIT_MODE',
    'VALID',
    'OTHER_OPTION'
  ];

// Init the state
var state = new BitwiseEnum(options);

// Set option on
state.setOn(state.options.EDIT_MODE); // set EDIT_MODE to true
state.is(state.options.EDIT_MODE); // return true
state.is(state.options.VALID); // return false as we didn't enable this flag yet

// Set option off
state.setOff(state.options.EDIT_MODE); // set EDIT_MODE to false
state.is(state.options.EDIT_MODE); // return false

// Toggle option on/off
state.toggle(state.options.VALID); // set VALID from false to true
state.is(state.options.EDIT_MODE); // return true
state.toggle(state.options.VALID); // set VALID from true to false
state.is(state.options.EDIT_MODE); // return false

// Get raw bitwise integer
state.setOn(state.options.VALID);
state.setOn(state.options.OTHER_OPTION);
state.getRaw(); // return 110 as
```

### Filter Example
```html
<div ng-if="vm.state | is : vm.state.options.EDIT_MODE"></div>
```


text:
layout: post
title:  "Mensageiro Animal"
date:   2018-01-01
source: Módulo Básico 183, Módulo Básico Edição Revisada 193.
tags: [nenhum, bardo]
---

**divina 2 (encantamento)**

**Alcance**: 9m

**Teste de Resistência**: nenhum.

**Duração**: 1 semana

**Alvo**: 1 animal Diminuto ou menor

**Tempo de Execução**: ação padrão

Você obriga um animal Diminuto ou menor a ir até um local designado — o uso mais comum desta magia é fazer com que o animal leve um item para um aliado.
Quando o animal chega ao local escolhido, fica ali esperando até o fim da magia, permitindo que qualquer um se aproxime e pegue o que ele estiver carregando.


text:
#include "tensorflow/cc/ops/standard_ops.h"
#include "tensorflow/core/kernels/fuzzing/fuzz_session.h"

namespace tensorflow {
namespace fuzzing {

class FuzzStringSplitV2 : public FuzzSession {
  void BuildGraph(const Scope& scope) override {
    auto input =
        tensorflow::ops::Placeholder(scope.WithOpName("input"), DT_STRING);
    auto separator =
        tensorflow::ops::Placeholder(scope.WithOpName("separator"), DT_STRING);
    (void)tensorflow::ops::StringSplitV2(scope.WithOpName("output"),
                                               input, separator);
  }

  void FuzzImpl(const uint8_t* data, size_t size) final {
    Tensor input_tensor(tensorflow::DT_STRING, TensorShape({}));
    Tensor separator_tensor(tensorflow::DT_STRING, TensorShape({}));

    if (size > 0) {
      // The spec for split is that the separator should be 0 or 1 characters.
      // Naturally, fuzz it with something that might be larger. But don't split
      // on a separator that is too large. Let's say we're picking a separator
      // of size 0, 1, 2 up to MaxSepSize (a static limit that has been picked
      // arbitrarily).
      size_t sep_len = static_cast<size_t>(data[0]) % kMaxSepSize;

      // We still have to handle the case when fuzzing input is shorter than the
      // minimum length required to get the separator
      if (sep_len > size) {
        sep_len = size - 1;
      }
      separator_tensor.scalar<string>()() =
          string(reinterpret_cast<const char*>(data), sep_len);
      input_tensor.scalar<string>()() = string(
          reinterpret_cast<const char*>(data + sep_len), size - sep_len);
    }

    RunInputs({{"input", input_tensor}, {"separator", separator_tensor}});
  }

 private:
  static const size_t kMaxSepSize = 4;
};

STANDARD_TF_FUZZ_FUNCTION(FuzzStringSplitV2);

}  // end namespace fuzzing
}  // end namespace tensorflow


text:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Post = (function () {
    function Post() {
    }
    return Post;
}());
exports.Post = Post;


text:
.class Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;
.super Ljava/lang/Object;
.source "FragmentManager.java"

# interfaces
.implements Landroid/view/animation/Animation$AnimationListener;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/support/v4/app/FragmentManagerImpl;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "AnimateOnHWLayerIfNeededListener"
.end annotation

# instance fields
.field private mOriginalListener:Landroid/view/animation/Animation$AnimationListener;

.field private mShouldRunOnHWLayer:Z

.field mView:Landroid/view/View;

# direct methods
.method public constructor <init>(Landroid/view/View;Landroid/view/animation/Animation;)V
    .locals 0
    .param p1, "v"    # Landroid/view/View;
    .param p2, "anim"    # Landroid/view/animation/Animation;

    .prologue
    .line 602
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 603
    if-eqz p1, :cond_0

    if-nez p2, :cond_1

    .line 607
    :cond_0
    :goto_0
    return-void

    .line 606
    :cond_1
    iput-object p1, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mView:Landroid/view/View;

    goto :goto_0
.end method

.method public constructor <init>(Landroid/view/View;Landroid/view/animation/Animation;Landroid/view/animation/Animation$AnimationListener;)V
    .locals 1
    .param p1, "v"    # Landroid/view/View;
    .param p2, "anim"    # Landroid/view/animation/Animation;
    .param p3, "listener"    # Landroid/view/animation/Animation$AnimationListener;

    .prologue
    .line 610
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 611
    if-eqz p1, :cond_0

    if-nez p2, :cond_1

    .line 617
    :cond_0
    :goto_0
    return-void

    .line 614
    :cond_1
    iput-object p3, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mOriginalListener:Landroid/view/animation/Animation$AnimationListener;

    .line 615
    iput-object p1, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mView:Landroid/view/View;

    .line 616
    const/4 v0, 0x1

    iput-boolean v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mShouldRunOnHWLayer:Z

    goto :goto_0
.end method

# virtual methods
.method public onAnimationEnd(Landroid/view/animation/Animation;)V
    .locals 3
    .param p1, "animation"    # Landroid/view/animation/Animation;
    .annotation build Landroid/support/annotation/CallSuper;
    .end annotation

    .prologue
    .line 630
    iget-object v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mView:Landroid/view/View;

    if-eqz v0, :cond_1

    iget-boolean v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mShouldRunOnHWLayer:Z

    if-eqz v0, :cond_1

    .line 641
    iget-object v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mView:Landroid/view/View;

    invoke-static {v0}, Landroid/support/v4/view/ViewCompat;->isAttachedToWindow(Landroid/view/View;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-static {}, Landroid/support/v4/os/BuildCompat;->isAtLeastN()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 642
    :cond_0
    iget-object v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mView:Landroid/view/View;

    new-instance v1, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener$1;

    invoke-direct {v1, p0}, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener$1;-><init>(Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->post(Ljava/lang/Runnable;)Z

    .line 652
    :cond_1
    :goto_0
    iget-object v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mOriginalListener:Landroid/view/animation/Animation$AnimationListener;

    if-eqz v0, :cond_2

    .line 653
    iget-object v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mOriginalListener:Landroid/view/animation/Animation$AnimationListener;

    invoke-interface {v0, p1}, Landroid/view/animation/Animation$AnimationListener;->onAnimationEnd(Landroid/view/animation/Animation;)V

    .line 655
    :cond_2
    return-void

    .line 649
    :cond_3
    iget-object v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mView:Landroid/view/View;

    const/4 v1, 0x0

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/support/v4/view/ViewCompat;->setLayerType(Landroid/view/View;ILandroid/graphics/Paint;)V

    goto :goto_0
.end method

.method public onAnimationRepeat(Landroid/view/animation/Animation;)V
    .locals 1
    .param p1, "animation"    # Landroid/view/animation/Animation;

    .prologue
    .line 659
    iget-object v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mOriginalListener:Landroid/view/animation/Animation$AnimationListener;

    if-eqz v0, :cond_0

    .line 660
    iget-object v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mOriginalListener:Landroid/view/animation/Animation$AnimationListener;

    invoke-interface {v0, p1}, Landroid/view/animation/Animation$AnimationListener;->onAnimationRepeat(Landroid/view/animation/Animation;)V

    .line 662
    :cond_0
    return-void
.end method

.method public onAnimationStart(Landroid/view/animation/Animation;)V
    .locals 1
    .param p1, "animation"    # Landroid/view/animation/Animation;
    .annotation build Landroid/support/annotation/CallSuper;
    .end annotation

    .prologue
    .line 622
    iget-object v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mOriginalListener:Landroid/view/animation/Animation$AnimationListener;

    if-eqz v0, :cond_0

    .line 623
    iget-object v0, p0, Landroid/support/v4/app/FragmentManagerImpl$AnimateOnHWLayerIfNeededListener;->mOriginalListener:Landroid/view/animation/Animation$AnimationListener;

    invoke-interface {v0, p1}, Landroid/view/animation/Animation$AnimationListener;->onAnimationStart(Landroid/view/animation/Animation;)V

    .line 625
    :cond_0
    return-void
.end method


text:
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
using System.Runtime.Serialization;
namespace XBMCRPC.Media
{
   public class Artwork
   {
       public string banner { get; set; }
       public string fanart { get; set; }
       public string poster { get; set; }
       public string thumb { get; set; }
   public class Set
   {
       public object banner { get; set; }
       public object fanart { get; set; }
       public object poster { get; set; }
       public object thumb { get; set; }
    }
    }
}


text:
package er.extensions.jpa.converter;

import javax.persistence.AttributeConverter;
import javax.persistence.Converter;

import com.webobjects.foundation.NSData;

@Converter
public class NSDataConverter implements AttributeConverter<NSData, byte[]> {

	@Override
	public NSData convertToEntityAttribute(byte[] b) {
		if (b == null) {
			return null;
		}
		return new NSData(b);
	}

	@Override
	public byte[] convertToDatabaseColumn(NSData d) {
		if (d == null) {
			return null;
		}
		return d.bytes();
	}

}


text:
body {
  padding-top: 60px;
}

.reset-search.icon-remove-circle {
  margin-right: 5px;
  opacity: 0.8;
  -moz-opacity: 0.8;
  filter:alpha(opacity=8);
}

.reset-search.icon-remove-circle.hover {
  opacity: 1.0;
  -moz-opacity: 1.0;
  filter:alpha(opacity=10);
}

.search {
  float: right;
}

.search input {
  margin-top: 3px;
}

.well {
  min-height: 26px;
  padding: 10px 26px;
}

.header {
  min-height: 50px;
}

.header span.star {
  float: left;
  margin: 10px 10px 0 0;
}

.header .star a {
  font-size: 1.6em;
  color: rgb(214, 214, 214);
}

.header .star a:hover {
  text-decoration: none;
}

.header .star a:hover:before, .star a.active:before {
  position: absolute;
  content: "\2605";
  color: rgb(255, 184, 0);
}

.header .star a.active:hover:before {
  content: "\2606";
  color: rgb(214, 214, 214);
}

.header h1 {
  float: left;
}

h1.fullscreen {
  float: right;
  margin: -45px 0 20px 0;
  opacity: 0.5;
}

.header span.info {
  float: right;
  margin-top: 22px;
  padding-right: 5px;
  color: #999;
}

.header span.owner {
  color: #5ea9cc;
}

.import.btn, .details.btn {
  margin-right: 16px;
}

.interval.btn-group {
  float: right;
  margin-right: 20px;
}

.interval.btn-group ul {
  margin-left: 0;
}

.interval.btn-group button.dropdown-toggle span.current_value {
  margin-right: 5px;
}

.sort.btn-group {
  float: right;
  margin-right: 20px;
}

.sort.btn-group ul {
  margin-left: 0;
}

.sort.btn-group button.dropdown-toggle span.current_value {
  margin-right: 5px;
}

.columns.btn-group {
  float: right;
  margin-right: 20px;
}

.sort.btn-group {
  float: right;
  margin-right: 20px;
}

.tools.btn-group {
  float: right;
}

.accordion-group {
  margin: 15px 0;
  border: 0;
}

#destroy_form ul, #import_form ul, #dashboard_form ul, #metrics_graph_form ul {
  list-style: none;
}

fieldset.collapse.in {
  padding-top: 12px;
  border: 1px solid #e5e5e5;
  background-color: whiteSmoke;
}

fieldset.collapse.in#destroy_form #destroy_warning ul {
  margin: 13px 25px 25px 25px;
  padding: 25px;
  background-color: rgba(255, 165, 0, 0.53);
  color: #fff;
  text-shadow: 2px 2px rgba(182, 182, 182, 0.66);
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  border-radius: 10px;
}

fieldset.collapse.in#destroy_form #destroy_warning ul li span {
  font-weight: bold;
  font-size: 1.8em;
  line-height: 1.3em;
}

fieldset.collapse.in#destroy_form button.destroy_submit {
  margin-top: 32px;
  float: right;
}

fieldset.collapse.in#destroy_form #destroy_warning .destroy_all {
  display: inline-block;
  height: 20px;
  width: 150px;
  margin: 12px 0 0 25px;
}

fieldset.collapse.in#destroy_form #destroy_warning .destroy_all input {
  margin: -2px 10px 0 0;
}

fieldset.collapse.in#import_form {
  min-height: 190px;
}

fieldset.collapse.in#dashboard_form {
  min-height: 90px;
  padding-top: 21px;
}

fieldset.collapse.in#details {
  min-height: 202px;
}

fieldset.collapse.in#metrics_graph_form {
  min-height: 236px;
}

.collapse.in form {
  margin: 0;
}

.collapse.in#import_form select {
  min-height: 150px;
  min-width: 400px;
  margin-bottom: 20px;
  float: left;
}

.collapse.in input {
  float: left;
  height: 22px;
  padding-left: 8px;
}

.collapse.in form#graph_select button.import_submit {
  float: left;
  margin-left: 20px;
}

.collapse.in form#graph_url ul li *, .collapse.in form#dashboard_new ul li * {
  position: relative;
  float: right;
  margin-right: 25px;
}

.collapse.in #dashboard_select ul li button.dashboard_submit {
  margin-left: 20px;
}

.collapse.in #dashboard_select *, .collapse.in #dashboard_new * {
  float: left;
}

.collapse.in #dashboard_new {
  position: relative;
  float: right;
}

div.graphs {
  margin-bottom: 50px;
}

.graphs div.row, .dashboards div.row {
  margin-bottom: 20px;
}

span.graph, .preview {
  position: relative;
  min-height: 168px;
  background-image: url('/img/spin.gif');
  background-repeat: no-repeat;
  background-position: 50% 50%;
}

.preview {
  min-height: 300px;
}

span.graph label {
  font-weight: bold;
  color: #888;
}

span.graph img:hover {
  -moz-box-shadow: 2px 2px 10px 1px rgba(134, 134, 134, 0.25);
  -webkit-box-shadow: 2px 2px 10px 1px rgba(134, 134, 134, 0.25);
  box-shadow: 2px 2px 10px 1px rgba(134, 134, 134, 0.25);
}

span.graph img.destroy {
  -moz-filter: grayscale(1) invert(1);
  -webkit-filter: grayscale(1) invert(1);
  filter: grayscale(1) invert(1);
}

div.dashboards {
  margin-top: 40px;
}

span.dashboard {
  position: relative;
  overflow: hidden;
  min-height: 200px;
  margin-bottom: 12px;
  border-radius: 15px;
  background-color: #333;
  color: #fff;
  background-size: cover;
}

span.dashboard:hover {
  background-color: #FFD045;
  color: #FF4D00;
}

span.dashboard span.name {
  display: block;
  margin: 16px 28px 0 28px;
  font-size: 1.9em;
  line-height: 1.2em;
}

span.dashboard span.count {
  position: absolute;
  bottom: 0;
  right: 0;
  margin: 0 28px 60px 0;
  font-size: 7.0em;
}

span.dashboard span.star {
  visibility: hidden;
  position: absolute;
  bottom: 0;
  margin: 0 0 13px 15px;
  font-size: 8.0em;
  color: #FFD045;
}

span.dashboard:hover span.star {
  color: #FF4D00;
}

span.dashboard.favorite span.star {
  visibility: visible;
}

span.dashboard img.close, span.graph img.close, span.graph img.view {
  position: absolute;
  top: 0;
  right: 0;
  margin: -15px -15px 0 0;
  z-index: 150;
  opacity: 1.0;
  -moz-opacity: 1.0;
  filter:alpha(opacity=10);
}

span.graph img.close {
  margin: 0;
}

span.graph img.view {
  margin: 0 37px 0 0;
}

.info-and-description-wrapper {
  float: left;
  width: 400px;
}

.info-wrapper, .description-wrapper {
  margin: 12px 0 22px 30px;
}

.tags-wrapper, .settings-wrapper {
  float: left;
  margin: 12px 0 22px 30px;
}

.info-wrapper label {
  display: inline;
  padding-right: 10px;
}

.info-wrapper label, .description-wrapper label, .tags-wrapper label, .settings-wrapper label, #composer_modal label {
  font-size: 0.9em;
  font-weight: bold;
}

.info-wrapper span {
  color: rgba(51, 51, 51, 0.55);
}

.description-wrapper span#description span#changeme, .tags-wrapper .tags span#changeme {
  font-family: "HelveticaNeue-UltraLight";
  font-size: 1.3em;
  font-style: italic;
  font-weight: 100;
  color: #999;
}

.description-wrapper span#description {
  display: block;
}

.description-wrapper a {
  margin-bottom: 8px;
}

.description-wrapper a.description_submit {
  margin-left: 15px;
}

.tags-wrapper {
  margin-left: 45px;
  min-width: 200px;
}

.tags-wrapper .tags ul {
  list-style: none;
  margin-left: 0;
}

.tags-wrapper .tags ul li a {
  opacity: 0.5;
  -moz-opacity: 0.5;
  filter:alpha(opacity=5);
}

.tags-wrapper .tags ul li a:hover {
  opacity: 1.0;
  -moz-opacity: 1.0;
  filter:alpha(opacity=10);
}

.tags-wrapper .tags ul li a.tag_add {
  float: left;
}

.tags-wrapper .tags ul li i.open {
  margin-top: 12px;
}

.tags-wrapper .tags ul li input[name="new_tag"], .tags-wrapper .tags ul li span {
  margin: 5px 0 0 5px;
}

.settings {
  border-left: 1px solid #bbb;
}

.settings .btn-group {
  position: absolute;
  top: 0;
  right: 0;
  margin-right: 30px;
}

.settings .line_mode.btn-group { margin-top: 26px; }
.settings .area_mode.btn-group { margin-top: 71px; }
.settings .log_mode.btn-group { margin-top: 116px; }
.settings .null_mode.btn-group { margin-top: 161px; }

.settings .line_mode.btn-group button.line_mode.btn.disabled { width: 100px; }
.settings .area_mode.btn-group button.area_mode.btn.disabled { width: 128px; }
.settings .log_mode.btn-group button.log_mode.btn.disabled { width: 182px; }
.settings .null_mode.btn-group button.null_mode.btn.disabled { width: 238px; }

.modal.large {
  width: 800px;
  margin-left: -400px;
}

#composer_modal .modal-body { max-height: 450px; }

#composer_modal img { margin: 20px 0; }
#composer_modal textarea { height: 150px; }

div.metrics-cache-status {
  float: left;
}

.metrics-cache-status input {
  width: 300px;
  padding-left: 10px;
}

#metrics_graph_select {
  float: left;
  margin-top: 12px;
}

#metrics_graph_select * {
  margin: 0;
}

#metrics_graph_select ul {
  margin-left: 25px;
}

#metrics_graph_select ul li {
  display: inline-block;
  vertical-align: top;
}

#metrics_graph_select ul li button.metrics_graph_submit {
  margin: 2px 0 0 15px;
}

#metrics_graph_select ul.search-ahead {
  position: absolute;
  overflow: auto;
  float: left;
  bottom: 25px;
}

span#metrics_graph_preview {
  display: inline-block;
  float: right;
  background-image: none;
  height: 200px;
  min-height: 0;
  margin: 12px 26px 0 0;
  background-color: #ddd;
}

span#metrics_graph_preview span#empty {
  display: inline-block;
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 200px;
}

div.metrics {
  margin: 30px 0;
}

.metrics .rickshaw_graph {
  border: 1px solid rgba(68, 68, 68, 0.25);
  border-radius: 7px;
  margin-bottom: 7px;
  padding: 5px 8px;
  color: #858585;
}

.metrics .rickshaw_graph:hover {
  border: 1px solid rgba(68, 68, 68, 0.55);
  cursor: pointer;
}

.metrics .rickshaw_graph.selected {
  border: 1px solid rgb(70, 223, 70);
  background-color: rgba(70, 223, 70, 0.15);
}

.metrics .rickshaw_graph svg {
  margin: 0 20px;
}

.metrics .rickshaw_graph svg path {
  fill: rgba(102, 153, 204, 0.75);
}

.metrics .rickshaw_graph * {
  vertical-align: middle;
}

.metrics .rickshaw_graph span.target {
  display: inline-block;
  width: 600px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-left: 20px;
}

.metrics .rickshaw_graph .options {
  float: right;
  visibility: hidden;
  line-height: 24px;
  margin-right: 20px;
}

.metrics .rickshaw_graph.selected .options {
  visibility: visible;
}

.metrics .rickshaw_graph .options a.axis {
  border: 1px solid #ddd;
  background-color: #fff;
  padding: 4px 6px;
  color: #929292;
}

.metrics .rickshaw_graph .options a.axis.left {
  margin-right: 5px;
}

.metrics .rickshaw_graph .options a.axis.selected {
  border: 1px solid #2EAD2E;
  color: rgb(0, 216, 0);
}

div.loading {
  display: block;
  min-height: 100px;
  margin-bottom: 100px;
  background-image: url('/img/spin.gif');
  background-repeat: no-repeat;
  background-position: 50% 50%;
  text-align: center;
}

div.loading.hidden {
  display: none;
}


text:
namespace base {
class CommandLine;
}

namespace sandbox {
class BrokerServices;
class TargetPolicy;
class TargetServices;
}

namespace content {

// Wrapper around sandbox::TargetPolicy::SetJobLevel that checks if the sandbox
// should be let to run without a job object assigned.
void SetJobLevel(const base::CommandLine& cmd_line,
                 sandbox::JobLevel job_level,
                 uint32 ui_exceptions,
                 sandbox::TargetPolicy* policy);

// Closes handles that are opened at process creation and initialization.
void AddBaseHandleClosePolicy(sandbox::TargetPolicy* policy);

bool InitBrokerServices(sandbox::BrokerServices* broker_services);

bool InitTargetServices(sandbox::TargetServices* target_services);

}  // namespace content

#endif  // CONTENT_COMMON_SANDBOX_WIN_H_


text:
package com.github.kubatatami.richedittext.styles.binary;

import android.annotation.SuppressLint;
import android.text.style.StrikethroughSpan;

import com.github.kubatatami.richedittext.styles.base.BinaryFontSpanController;
import com.github.kubatatami.richedittext.styles.base.RichSpan;

import org.xml.sax.Attributes;

import java.util.Map;

public class StrikeThroughSpanController extends BinaryFontSpanController<StrikeThroughSpanController.RichStrikethroughSpan> {

    public StrikeThroughSpanController() {
        super(RichStrikethroughSpan.class, "strike");
    }

    @Override
    public RichStrikethroughSpan createSpanFromTag(String tag, Map<String, String> styleMap, Attributes attributes) {
        if (tag.equals("strike") || (tag.equals("span") && containsStrikeTroughStyle(styleMap))) {
            return new RichStrikethroughSpan();
        }
        return null;
    }

    private boolean containsStrikeTroughStyle(Map<String, String> styleMap) {
        return containsStyle(styleMap, "text-decoration", "line-through");
    }

    @Override
    public Class<?> spanFromEndTag(String tag) {
        if (tag.equals("strike") || tag.equals("span")) {
            return clazz;
        }
        return null;
    }

    @SuppressLint("ParcelCreator")
    public static class RichStrikethroughSpan extends StrikethroughSpan implements RichSpan {

    }
}


text:
// Copyright 2016 Google Inc. All rights reserved.
//
// 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.

using GVR.Entity;
using UnityEngine;
using UnityEngine.Events;

namespace GVR.Samples.NinjaTraining {
  //Simple class for holding difficulty settings for the Bamboo Hopper in the Ninja Training prototype.
  [System.Serializable]
  public class HopperSetting {
    public string Label = "New Difficulty Setting";
    public int MinScoreRequired = 0;
    public int SequenceLength = 5;
    public float PauseBetweenSequences = 3f;
    public float PauseBetweenBamboo = 1f;
    public float CleanupLifetime = 5f;
    public float CleanupDeadtime = 3f;
    public float BambooSpeed = 4f;
    public UnityEvent OnDifficultyEnter;
  }

  /// <summary>
  /// Simple Event-based State Manager for the Ninja Training demo. Based off of a List of Hopper
  /// Settings that are iterated through as a minimum score requirement is met. The Difficulty
  /// Ramper looks at the next Difficulty setting in sequence and waits for the score in that
  /// sequence to be met before pushing those values to the bamboo Hopper.
  /// </summary>
  public class HopperDifficultyRamper : MonoBehaviour {
    public HopperSetting[] HopperSettings;
    public BambooHopper Hopper;
    public Counter ScoreCounter;

    int currentDifficulty = 0;

    void Start() {
      PushDifficultySettings();
    }

    public void ResetDifficulty() {
      currentDifficulty = 0;
      PushDifficultySettings();
    }

    public void UpdateHopperSettings() {
      Debug.Log("Attempting to Update Difficulty.");
      int currentScore = ScoreCounter.GetCurrentCount();

      Debug.Log("Checking to See if Current Difficulty(" + currentDifficulty +
                ") plus one, is less than " + HopperSettings.Length);
      if (currentDifficulty + 1 < HopperSettings.Length) {
        Debug.Log("Checking to see if the Required Score of the NEXT difficulty in Sequence (" +
                  HopperSettings[currentDifficulty + 1].MinScoreRequired +
                  ") is less than or equal to the Current Score (" + currentScore + ")");
        if (HopperSettings[currentDifficulty + 1].MinScoreRequired <= currentScore) {
          Debug.Log("Checks Passed. Pushing new settings and Iterating on Difficulty.");
          currentDifficulty++;
          PushDifficultySettings();
        }
      }
    }

    public void PushDifficultySettings() {
      Hopper.SequenceLength = HopperSettings[currentDifficulty].SequenceLength;
      Hopper.PauseBetweenSequences = HopperSettings[currentDifficulty].PauseBetweenSequences;
      Hopper.PauseBetweenBamboo = HopperSettings[currentDifficulty].PauseBetweenBamboo;
      Hopper.CleanupLifetime = HopperSettings[currentDifficulty].CleanupLifetime;
      Hopper.CleanupDeadtime = HopperSettings[currentDifficulty].CleanupDeadtime;

      Hopper.SetBambooSpeed(HopperSettings[currentDifficulty].BambooSpeed);

      Debug.Log("Invoking On Difficulty Entered Events.");
      HopperSettings[currentDifficulty].OnDifficultyEnter.Invoke();
    }
  }
}


text:
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<html>
<head>
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
  <title>event-list</title>

  <script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
  <script src="../bower_components/web-component-tester/browser.js"></script>

  <!-- Step 1: import the element to test -->
  <link rel="import" href="../elements/event-list/event-list.html">

</head>
<body>

<test-fixture id="basic">
  <template>
    <event-list></event-list>
  </template>
</test-fixture>

<script>
  describe('event-list tests', function() {
    var element;

    before(function() {
      element = fixture('basic');
    });

    it('', function() {

    });

  });
</script>

</body>
</html>


text:
'use strict';

/* Filters */

angular.module('qcmffvl.filters', [])
.filter('interpolate', ['version', function(version) {
    return function(text) {
      return String(text).replace(/\%VERSION\%/mg, version);
    };
  }])

.filter('formatQCMID', function() {
    return function(input) {
        if (input) {
            var ret = input.replace(/[^0-9]/g, '');
            return ret.replace(/(\d)(?=(\d{3})+$)/g, '$1 ');
        } else {
            return "";
        }
    }
})
.filter('removeSpaces', function() {
    return function(input) {
        if (input)
            return input.replace(/ /g, '');
    }
})
.filter('categoryFilter', function() {
    return function(qcm, category) {
        if (category) {
            var categoryList = [];
            if (category == "Matériel") {
                categoryList = ["L","N","R"]
            } else if (category == "Mécavol") {
                categoryList = ["E", "G", "H"]
            } else if (category == "Pilotage") {
                categoryList = ["U", "W", "X"]
            } else if (category == "Réglementation") {
                categoryList = ["S"]
            } else if (category == "Météo") {
                categoryList = ["A"]
            } else if (category.indexOf("Toutes") != -1) {
                return qcm;
            }
            var out = [];
            angular.forEach(qcm, function(question) {
                var code = question.code[0];
                if (categoryList.indexOf(code) != -1) {
                    out.push(question);
                }
            })
            return out;
        } else {
            return qcm;
        }
    }
})
.filter('formatQCMTitle', function() {
    return function(input) {
        if (input) {
            var out = input.replace(/Brevet de Pilote Confirmé/, 'BPC');
            out = out.replace(/Brevet de Pilote/, 'BP');
            // out = out.replace(/Brevet Initial/, 'BI');
            return out;
        }
    }
});


text:
using NDiagnostics.Metering.Samples;

namespace NDiagnostics.Metering
{
    public interface ISamplePercentage : IMeter<SamplePercentageSample>
    {
        void SampleA();

        void SampleB();
    }
}


text:
CoinStore is a lightweight eCommerce platform with cryptocurrency support. It allows you to deploy online store accepting bitcoin and altcoins in a minutes, free of charge.

**Table of Contents**
- [Running locally](#running-locally)
    - [Install Meteor and Meteorite](#install-meteor-and-meteorite)
    - [Install ImageMagick](#install-imagemagick)
    - [Clone project repository](#clone-project-repository)
    - [Edit website settings](#edit-website-settings)
    - [Launch website locally](#launch-website-locally)
- [Deploying to server](#deploying-to-server)
    - [Server requirements](#server-requirements)
    - [Preparing server for deployment](#preparing-server-for-deployment)
    - [Preparing website for deployment](#preparing-website-for-deployment)
    - [Deployment](#deployment)
    - [Grant privileges for writing](#grant-privileges-for-writing)
    - [Further deployments](#further-deployments)
- [Website configuration](#website-configuration)
- [Payment gateway configuration](#payment-gateway-configuration)
    - [C-CEX](#c-cex)
- [Donations](#donations)

## Running locally
This guide will allow you to run and test web store locally. Currently, following platforms are supported:
* Mac: OS X 10.6 and above
* Linux: x86 and x86_64 systems

If you have Windows operating system, consider installing Linux either on virtual machine or side by side with Windows. If you don't have experience in Linux distributions, I strongly recommend [Ubuntu](http://www.ubuntu.com/download/desktop) for easier installation.

### Install Meteor and Meteorite

``` sh
curl https://install.meteor.com | /bin/sh
npm install -g meteorite
```
###Install ImageMagick
Linux:
``` sh
apt-get install imagemagick
```

Mac OS X:
``` sh
brew install imagemagick
```

###Clone project repository
``` sh
git clone https://github.com/danii1/coinstore
```
_Git is required for this step, refer to http://git-scm.com/book/en/Getting-Started-Installing-Git if it's not installed on your system_

###Edit website settings
Copy settings example into the new file and change what you need, refer to website configuration section
``` sh
cd coinstore
cp settings-example.json settings.json
```
###Launch website locally
Now launch meteor with your settings, website should become available on http://localhost:3000
``` sh
meteor --settings settings.json
```

## Deploying to server
This guide focuses on minimal single server setup which is appropriate for small scale webstore, it's short, and takes about 10-15 minutes to deploy website. Scalability, replication, backups, load balancing are out of the scope of this article. Guide should work for any Debian/Ubuntu 12.04 or higher distributions.

### Server requirements
You will need at least 512MB RAM on server, other characteristics is less important, but having faster CPU will help if you planning to host large site, large disk space come in handy if you are selling digital items such as music, ebooks, games and hosting them on the same server. If you need recommendation on chosing VPS providers, I had good experience with [Linode](https://www.linode.com/?r=cb553d9cb7d8dd8f836c748b9f5c690c3f549bbe) and [Digital Ocean](https://www.digitalocean.com/?refcode=7679e1b32f02), both are great and have competitive pricing.

### Preparing server for deployment
Login to server and execute following commands:
``` sh
# install mongodb from 2.6.x branch, as 2.4.x contains bug that affects CoinStore
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list
apt-get update -y
apt-get install mongodb-org

# install ImageMagick
apt-get install imagemagick
```

### Preparing website for deployment
Do the folowing on you local machine
####Clone project repository
``` sh
git clone https://github.com/danii1/coinstore
```
#### Intall Meteor Up
``` sh
npm install -g mup
```
#### Create deployment project
``` sh
mkdir ~/coinstore-deployment
cd ~/coinstore-deployment
mup init
```
This commands create directory and generate 2 files: settings.json - settings of your website(it's empty, you should copy contents of settings-example.json to this file, refer to website configuration section for details); mup.json - deployment parameters(you should set server, username, password or ssh key and some other params). Ensure that param setupMongo set to false(we installed newer mongo version previously and should skip this step in deployment script):
``` json
"setupMongo": false
```
### Deployment
Being in deployment project directory, run
``` sh
# this will prepare server for deployment
mup setup

# actually deploy website
mup deploy
```
If you get any errors during deployment, you can check logs by running _mup logs_. Refer to [Meteor Up readme](https://github.com/arunoda/meteor-up) for full info.

### Grant privileges for writing
There few last steps need to be done on server: grant writing privileges for _meteoruser_, so you can upload images and other files to server.
``` sh
# your website will be located in /opt/appName(you set appName in mup.json)
cd /opt/coinstore
mkdir cfs
chown meteoruser:meteoruser cfs

# change owner for uploads folder(use your storageDir from settings.json)
chown -R meteoruser:meteoruser /opt/coinstore_uploads
```
That's all, after this you should be able to open your website and test it. In case of problems check `/var/log/upstart/appName.log` for errors.

### Further deployments
All further deployments(if you updating to the latest version, or customizing your website ) should require only running
`mup deploy` without any additional steps.

## Website configuration
There are few settings that allows you to change website appearance and some important options such as your merchant id or where files will be stored. Template for settings is located in `settings-example.json`, contents of this file should be copied to `settings.json` and edited there. Currently following params are avaiable, most of them are self explanatory:

- `storeName` - name of your store, this name will be displayed on the top and few other places
- `itemsInRow` - number of items in a row displayed on the frontpage, valid values are 2, 3, 4, 6. Optimal numbers are probably 3 and 4. You can set 2 if you have a few items to sell.
- `storageDir` - files uploaded from admin interface will be stored in this directory, user used to launch website should have write and read access to this directory
- `ga.id` - Google Analytics Track Id, leave blank if you don't use it
- `adminUser` - administrator email and password, this credentials will be used to create admin user for new installations. You should change this to your email and set a strong password, password can be changed later through interface.
- `merchantId` - set this param to your merchant id obtained from [C-CEX](https://c-cex.com/?rf=278C17E805357FAD).

## Payment gateway configuration
Currenly only one gateway for accepting cryptocurrencies is supported.
### C-CEX
You should be registered on [C-CEX](https://c-cex.com/?rf=278C17E805357FAD). Login to your profile and switch to MERCHANT API tab, you'll need to set 2 urls:
- Return url: `http://yourAddress/purchase`
- Secret url: `http://yourAddress/purchaseComplete`

where `yourAddress` is your website address. First url will be used to redirect user after purchase, second to transfer data about purchase.

## Donations

If you find the product useful, please consider making a donation

Bitcoin: [12XdXRLEMWHRfX76YnRTXwXVZmNA7qU5en](bitcoin:12XdXRLEMWHRfX76YnRTXwXVZmNA7qU5en)


text:
import { Component, EventEmitter, Input, Output, ViewChild, forwardRef } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { DatePickerInnerComponent } from './datepicker-inner.component';
import { DatepickerConfig } from './datepicker.config';

export const DATEPICKER_CONTROL_VALUE_ACCESSOR: any = {
  provide: NG_VALUE_ACCESSOR,
  useExisting: forwardRef(() => DatePickerComponent),
  multi: true
};

/* tslint:disable:component-selector-name component-selector-type */
@Component({
  selector: 'datepicker',
  template: `
    <datepicker-inner [activeDate]="activeDate"
                      (update)="onUpdate($event)"
                      [datepickerMode]="datepickerMode"
                      [initDate]="initDate"
                      [minDate]="minDate"
                      [maxDate]="maxDate"
                      [minMode]="minMode"
                      [maxMode]="maxMode"
                      [showWeeks]="showWeeks"
                      [formatDay]="formatDay"
                      [formatMonth]="formatMonth"
                      [formatYear]="formatYear"
                      [formatDayHeader]="formatDayHeader"
                      [formatDayTitle]="formatDayTitle"
                      [formatMonthTitle]="formatMonthTitle"
                      [startingDay]="startingDay"
                      [yearRange]="yearRange"
                      [customClass]="customClass"
                      [dateDisabled]="dateDisabled"
                      [onlyCurrentMonth]="onlyCurrentMonth"
                      [shortcutPropagation]="shortcutPropagation"
                      [monthColLimit]="monthColLimit"
                      [yearColLimit]="yearColLimit"
                      (selectionDone)="onSelectionDone($event)">
      <daypicker tabindex="0"></daypicker>
      <monthpicker tabindex="0"></monthpicker>
      <yearpicker tabindex="0"></yearpicker>
    </datepicker-inner>
    `,
  providers: [DATEPICKER_CONTROL_VALUE_ACCESSOR]
})
/* tslint:enable:component-selector-name component-selector-type */
export class DatePickerComponent implements ControlValueAccessor {
  /** sets datepicker mode, supports: `day`, `month`, `year` */
  @Input() public datepickerMode: string = 'day';
  /** default date to show if `ng-model` value is not specified */
  @Input() public initDate: Date;
  /**  oldest selectable date */
  @Input() public minDate: Date;
  /** latest selectable date */
  @Input() public maxDate: Date;
  /** set lower datepicker mode, supports: `day`, `month`, `year` */
  @Input() public minMode: string;
  /** sets upper datepicker mode, supports: `day`, `month`, `year` */
  @Input() public maxMode: string;
  /** if false week numbers will be hidden */
  @Input() public showWeeks: boolean = true;
  /** format of day in month */
  @Input() public formatDay: string;
  /** format of month in year */
  @Input() public formatMonth: string;
  /** format of year in year range */
  @Input() public formatYear: string;
  /** format of day in week header */
  @Input() public formatDayHeader: string;
  /** format of title when selecting day */
  @Input() public formatDayTitle: string;
  /** format of title when selecting month */
  @Input() public formatMonthTitle: string;
  /** starting day of the week from 0-6 (0=Sunday, ..., 6=Saturday) */
  @Input() public startingDay: number;
  /** number of years displayed in year selection */
  @Input() public yearRange: number;
  /** if true only dates from the currently displayed month will be shown */
  @Input() public onlyCurrentMonth: boolean;
  /** if true shortcut`s event propagation will be disabled */
  @Input() public shortcutPropagation: boolean;
  /** number of months displayed in a single row of month picker */
  @Input() public monthColLimit: number;
  /** number of years displayed in a single row of year picker */
  @Input() public yearColLimit: number;
  /** array of custom css classes to be applied to targeted dates */
  @Input() public customClass: {date: Date, mode: string, clazz: string}[];
  /** array of disabled dates */
  @Input() public dateDisabled: {date: Date, mode: string}[];

  /** currently active date */
  @Input()
  public get activeDate(): Date {
    return this._activeDate || this._now;
  }

  public set activeDate(value: Date) {
    this._activeDate = value;
  }

  @Output() public selectionDone: EventEmitter<Date> = new EventEmitter<Date>(undefined);

  @ViewChild(DatePickerInnerComponent) public _datePicker: DatePickerInnerComponent;

  public onChange: any = Function.prototype;
  public onTouched: any = Function.prototype;

  protected _now: Date = new Date();
  protected _activeDate: Date;
  protected config: DatepickerConfig;

  public constructor(config: DatepickerConfig) {
    this.config = config;
    this.configureOptions();
  }

  public configureOptions(): void {
    Object.assign(this, this.config);
  }

  public onUpdate(event: any): void {
    this.onChange(event);
  }

  public onSelectionDone(event: Date): void {
    this.selectionDone.emit(event);
  }

  // todo: support null value
  public writeValue(value: any): void {
    if (this._datePicker.compare(value, this._activeDate) === 0) {
      return;
    }
    if (value && value instanceof Date) {
      this.activeDate = value;
      this._datePicker.select(value, false);
      return;
    }

    this.activeDate = value ? new Date(value) : void 0;
  }

  public registerOnChange(fn: (_: any) => {}): void {
    this.onChange = fn;
  }

  public registerOnTouched(fn: () => {}): void {
    this.onTouched = fn;
  }
}


text:
{% extends 'partiesv2/_base.html' %}
{% block title %}Sigma Pi Secure - {{ party.name }}{% endblock %}
{% load sass_tags %}
{% load static %}
{% block module_includes %}
    <link rel="stylesheet"
          type="text/css"
          href="https://cdn.jsdelivr.net/npm/pretty-checkbox@3.0/dist/pretty-checkbox.min.css"/>
    <link rel="stylesheet"
          type="text/css"
          href="{% static 'css/lib/line-scale-pulse-out.min.css' %}"/>
    {#  #}

    <link rel='stylesheet'
          type='text/css'
          href='{% sass_src "css/secure/party-guests_v2.scss" %}?v=2.05'/>
{% endblock %}
{% block body_class %}party-guests{% endblock %}
{% block content %}
    <audio id="beep-boop"
           src="{% static 'audio/beep_boop.mp3' %}"
           preload="auto"
           style="display: none"></audio>

{{ party.name }} - {{ party.date }} Guest List

                        Export List

                        Party Stats

        <party-stats v-if="statsActive" :guests="guests" :party="party" :count-history="party.countHistory"></party-stats>

        <party-searchbox :applied-filter="guestFilter" @apply-filter="applyFilter" @clear-filter="clearFilter"></party-searchbox>

                <party-column
                :guests="maleGuests" :party="party" title="Male" name="male" code="M"></party-column>
                <party-column
                :guests="femaleGuests" :party="party" title="Female" name="female" code="F"></party-column>
                <party-column
                :guests="nonBinaryGuests" :party="party" title="Non-Binary" name="non-binary" code="NB"></party-column>

                <party-counter v-if="party.listClosed===true" :male-count="party.guyCount" :female-count="party.girlCount" :non-binary-count="party.nonBinaryCount" :show-colors="true">
                In the Party
                </party-counter>
                <party-counter v-if="party.listClosed===true" :male-count="party.guysEverSignedIn" :female-count="party.girlsEverSignedIn" :non-binary-count="party.nonBinaryEverSignedIn">
                Ever Checked In
                </party-counter>
                <party-counter :male-count="maleGuests.length" :female-count="femaleGuests.length" :non-binary-count="nonBinaryGuests.length">
                On the List
                </party-counter>
                <party-counter :class="{'clickable': true, 'show-mobile': true, 'active': guestFilter === userFullName}" v-if="party.listClosed===false" :male-count="myMaleGuests.length"
                :female-count="myFemaleGuests.length" :non-binary-count="myNonBinaryGuests.length" @click="toggleMyFilter()">
                My Guests
                </party-counter>

                    <button @click="modListCount('M', -1)"
                            class="btn btn-default btn-sm btn-male"
                            id="decrement-m">

                    </button>
                    <button @click="modListCount('M', 1)"
                            class="btn btn-default btn-sm btn-male"
                            id="increment-m">

                    </button>

                    <button @click="modListCount('F', -1)"
                            class="btn btn-default btn-sm btn-female"
                            id="decrement-f">

                    </button>
                    <button @click="modListCount('F', 1)"
                            class="btn btn-default btn-sm btn-female"
                            id="increment-f">

                    </button>

                    <button @click="modListCount('NB', -1)"
                            class="btn btn-default btn-sm btn-non-binary"
                            id="decrement-m">

                    </button>
                    <button @click="modListCount('NB', 1)"
                            class="btn btn-default btn-sm btn-non-binary"
                            id="increment-m">

                    </button>

        <party-modal v-if="modal" :data="modal" @primary-click="modal.primaryAction && modal.primaryAction(); modal = null;"
        @secondary-click="modal.secondaryAction && modal.secondaryAction(); modal = null;"
        />

{% endblock %}


text:
namespace EyeInTheSky.Web.Services
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using EyeInTheSky.Services.Interfaces;
    using EyeInTheSky.Web.Misc;
    using Nancy;
    using Nancy.Authentication.Forms;
    using Nancy.Security;

    public class NancyUserMapper : IUserMapper
    {
        private readonly IBotUserConfiguration botUserConfiguration;

        public NancyUserMapper(IBotUserConfiguration botUserConfiguration)
        {
            this.botUserConfiguration = botUserConfiguration;
        }

        public IUserIdentity GetUserFromIdentifier(Guid identifier, NancyContext context)
        {
            var user = this.botUserConfiguration.Items.FirstOrDefault(x => x.WebGuid == identifier);
            if (user == null)
            {
                return null;
            }

            var identity = new UserIdentity(user);

            if (!string.IsNullOrWhiteSpace(user.GlobalFlags))
            {
                ((List<string>) identity.Claims).AddRange(user.GlobalFlags.ToCharArray().Select(x => x.ToString()));
            }

            return identity;

        }

    }
}


text:
<?php

use Flarum\Core;
use Flarum\Forum\Middleware\HandleErrors;
use Franzl\Middleware\Whoops\Middleware as WhoopsMiddleware;
use Zend\Diactoros\Server;
use Zend\Stratigility\MiddlewarePipe;

$app = require __DIR__.'/flarum/bootstrap.php';

$app->register('Flarum\Admin\AdminServiceProvider');

$admin = new MiddlewarePipe();
$admin->pipe($app->make('Flarum\Api\Middleware\ReadJsonParameters'));
$admin->pipe($app->make('Flarum\Admin\Middleware\LoginWithCookieAndCheckAdmin'));

$adminPath = parse_url(Core::url('admin'), PHP_URL_PATH);
$router = $app->make('Flarum\Http\RouterMiddleware', ['routes' => $app->make('flarum.admin.routes')]);

$admin->pipe($adminPath, $router);

if (Core::inDebugMode()) {
    $admin->pipe(new WhoopsMiddleware());
} else {
    $admin->pipe(new HandleErrors(base_path('error')));
}

$server = Server::createServer(
    $admin,
    $_SERVER,
    $_GET,
    $_POST,
    $_COOKIE,
    $_FILES
);

$server->listen();


text:
#ifndef __OCU_EQUATION_PASSIVE_ADVECTION_3D_DEV_H__
#define __OCU_EQUATION_PASSIVE_ADVECTION_3D_DEV_H__

#include "ocuutil/interpolation.h"
#include "ocuequation/solver.h"
#include "ocustorage/grid3d.h"
#include "ocuutil/boundary_condition.h"

namespace ocu {

//! \class PassiveAdvection3DDevice
//! \brief Calculates passive advection of a scalar value by a staggered incompressible vector field.
//! For now, it will use first-order upwinding and I'll experiment with different gpu implementations.
template<typename T>
class Sol_PassiveAdvection3DDevice : public Solver
{

  //**** MEMBER VARIABLES ****
  int _nx, _ny, _nz;
  double _hx, _hy, _hz;

public:

  //**** MANAGERS ****
  Sol_PassiveAdvection3DDevice();

  //**** PUBLIC STATE ****
  Grid3DDevice<T> *u, *v, *w;
  Grid3DDevice<T> *phi;
  Grid3DDevice<T> *deriv_phidt;
  InterpolationType interp_type;

  //**** PUBLIC INTERFACE ****
  bool solve();

  bool initialize_storage(int nx, int ny, int nz, double hx, double hy, double hz, Grid3DDevice<T> *u_val, Grid3DDevice<T> *v_val, Grid3DDevice<T> *w_val,
    Grid3DDevice<T> *phi_val, Grid3DDevice<T> *deriv_phidt_val);

  int    nx() const { return _nx; }
  int    ny() const { return _ny; }
  int    nz() const { return _nz; }
  double hx() const { return _hx; }
  double hy() const { return _hy; }
  double hz() const { return _hz; }
};

} // end namespace

#endif


text:
var files_list =
    [
        '../../app/collections/QuestionsCollection.js',
        '../../app/fixtures/quiz.js',
        '../../app/fixtures/score.js',
        '../../app/i18nBundles/nls/fr-fr/helpPage_module.js',
        '../../app/i18nBundles/nls/fr-fr/homePage_module.js',
        '../../app/i18nBundles/nls/fr-fr/questionsView_module.js',
        '../../app/i18nBundles/nls/fr-fr/scoreView_module.js',
        '../../app/i18nBundles/nls/helpPage_module.js',
        '../../app/i18nBundles/nls/homePage_module.js',
        '../../app/i18nBundles/nls/questionsView_module.js',
        '../../app/i18nBundles/nls/scoreView_module.js',
        '../../app/main.js',
        '../../app/models/LanguageModel.js',
        '../../app/models/QuestionModel.js',
        '../../app/models/QuizModel.js',
        '../../app/models/ScoreModel.js',
        '../../app/requirejs-config.js',
        '../../app/routers/Router.js',
        '../../app/views/HelpView.js',
        '../../app/views/HomeView.js',
        '../../app/views/QuestionsView.js',
        '../../app/views/QuestionView.js',
        '../../app/views/QuizView.js',
        '../../app/views/ScoreView.js',
        '../../test/collections/QuestionsCollection.spec.js',
        '../../test/main.js',
        '../../test/Main.spec.js',
        '../../test/models/LanguageModel.spec.js',
        '../../test/models/QuestionModel.spec.js',
        '../../test/models/QuizModel.spec.js',
        '../../test/models/ScoreModel.spec.js',
        '../../test/views/HelpView.spec.js',
        '../../test/views/HomeView.spec.js',
        '../../test/views/QuestionsView.spec.js',
        '../../test/views/QuestionView.spec.js',
        '../../test/views/QuizView.spec.js',
        '../../test/views/ScoreView.spec.js'
    ];


text:
package com.intellij.usageView;

import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;

public interface UsageViewDescriptor {
  /**
   * @return an array of elements whose usages were searched or {@link com.intellij.psi.PsiElement#EMPTY_ARRAY} if not available
   */
  @NotNull
  PsiElement[] getElements();

  String getProcessedElementsHeader();

  String getCodeReferencesText(int usagesCount, int filesCount);

  String getCommentReferencesText(int usagesCount, int filesCount);
}


text:
using System;

namespace Jojatekok.MoneroAPI
{
    public class ProcessExitedEventArgs : EventArgs
    {
        public int ExitCode { get; private set; }

        internal ProcessExitedEventArgs(int exitCode)
        {
            ExitCode = exitCode;
        }
    }
}


text:
module Flat
  module Free
    module Rails
      VERSION = "0.1.0"
    end
  end
end


text:
@class MetagameManager;

extern MetagameManager* GetMetagameManager();

@interface MetagameManager : NSObject {

    int totalBats;

    int totalGoldMedalsCollected;
    int totalSilverMedalsCollected;
    int totalBronzeMedalsCollected;

    // leaderboards
    int totalPinatasDestroyed;
    int totalCandyCollected;
    int totalSugarHighs;

    int totalNormalPinatasDestroyed;
    int totalCannibalPinatasDestroyed;
    int totalTickPinatasDestroyed;
    int totalTicksFreed;
    int totalHerosFreed;
    int totalUFOsDestroyed;
    int totalFairiesDestroyed;
    int totalChameleonsDestroyed;
    int totalTreasuresDestroyed;
    int totalGoodGremlinsDestroyed;

    int totalVegetablesCollected;
    int totalBombsDestroyed;
    int money;

    Boolean giftMoneyAwarded;

    float totalTimePlayed;

    NSMutableArray* achievements;

    NSMutableArray* toolsOwned;

    Boolean justEarnedNewAchievement;
}

@property (nonatomic) int totalBats;
@property (nonatomic) int totalPinatasDestroyed;
@property (nonatomic) int totalCandyCollected;
@property (nonatomic) int totalSugarHighs;

@property (nonatomic) int totalVegetablesCollected;
@property (nonatomic) int totalBombsDestroyed;
@property (nonatomic) int totalGoldMedalsCollected;
@property (nonatomic) int totalSilverMedalsCollected;
@property (nonatomic) int totalBronzeMedalsCollected;
@property (nonatomic) int totalNormalPinatasDestroyed;
@property (nonatomic) int totalCannibalPinatasDestroyed;
@property (nonatomic) int totalTickPinatasDestroyed;
@property (nonatomic) int totalTicksFreed;
@property (nonatomic) int totalHerosFreed;
@property (nonatomic) int totalUFOsDestroyed;
@property (nonatomic) int totalFairiesDestroyed;
@property (nonatomic) int totalChameleonsDestroyed;
@property (nonatomic) int totalTreasuresDestroyed;
@property (nonatomic) int totalGoodGremlinsDestroyed;
@property (nonatomic) float totalTimePlayed;
@property (nonatomic) int money;
@property (nonatomic) Boolean giftMoneyAwarded;
@property (nonatomic, assign) NSMutableArray* achievements;
@property (nonatomic) Boolean justEarnedNewAchievement;
@property (nonatomic, assign) NSMutableArray* toolsOwned;

-(id)init;
-(void)dealloc;
-(void)awardMedal:(eAchievement)achievement previousAchievement:(eAchievement)previousAchievement;
-(void)addMoney:(int)amount;
-(void)spendMoney:(int)amount;
-(void)tick:(float)timeElapsed;
-(NSMutableArray*)getNewAchievements;
-(void)unlockTool:(eTool)tool;
-(Boolean)isToolLocked:(eTool)tool;
-(void)updateCrystalLeaderboards;
-(Boolean)wasItemGifted:(long)giftID;
-(void)awardMoneyGift;

@end


text:
void LogInit();
void LogWrite(char *);
void LogGetLastError();

// Emit log messages via OutputDebugString
#define LOG_USE_OUTPUTDEBUGSTRING 0
// Emit log messages to a console window
#define LOG_USE_STDERR 1
// Emit log messages to a log file
#define LOG_USE_FILE 0
#define LOG_FILE_NAME "dynity_log.txt"

#define LOG_USE_ANY (LOG_USE_OUTPUTDEBUGSTRING || LOG_USE_STDERR || LOG_USE_FILE)

#if LOG_USE_ANY
#define LOG__DEBUG_BUF_SIZE 2048

extern char gDebugBuf[LOG__DEBUG_BUF_SIZE];

#define LogPrint(x) LogWrite(x)

#define LogPrintln(x) LogWrite(x "\n")

#define LogPrintf(x, ...)                                                                                \
	{                                                                                \
		sprintf_s(gDebugBuf, LOG__DEBUG_BUF_SIZE, x, __VA_ARGS__);                                                     \
		LogWrite(gDebugBuf);                                                                                \
	}
#else
#define LogPrint(x) (void)0
#define LogPrintln(x) (void)0
#define LogPrintf(x, ...) (void)0
#endif