text:
Guzzle, PHP HTTP client
=======================

[![Build Status](https://travis-ci.org/guzzle/guzzle.svg?branch=master)](https://travis-ci.org/guzzle/guzzle)

Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
trivial to integrate with web services.

- Simple interface for building query strings, POST requests, streaming large
  uploads, streaming large downloads, using HTTP cookies, uploading JSON data,
  etc...
- Can send both synchronous and asynchronous requests using the same interface.
- Uses PSR-7 interfaces for requests, responses, and streams. This allows you
  to utilize other PSR-7 compatible libraries with Guzzle.
- Abstracts away the underlying HTTP transport, allowing you to write
  environment and transport agnostic code; i.e., no hard dependency on cURL,
  PHP streams, sockets, or non-blocking event loops.
- Middleware system allows you to augment and compose client behavior.

```php
$client = new \GuzzleHttp\Client();
$res = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
echo $res->getStatusCode();
// 200
echo $res->getHeaderLine('content-type');
// 'application/json; charset=utf8'
echo $res->getBody();
// '{"id": 1420053, "name": "guzzle", ...}'

// Send an asynchronous request.
$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
$promise = $client->sendAsync($request)->then(function ($response) {
    echo 'I completed! ' . $response->getBody();
});
$promise->wait();
```

## Help and docs

- [Documentation](http://guzzlephp.org/)
- [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle)
- [Gitter](https://gitter.im/guzzle/guzzle)

## Installing Guzzle

The recommended way to install Guzzle is through
[Composer](http://getcomposer.org).

```bash
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the latest stable version of Guzzle:

```bash
php composer.phar require guzzlehttp/guzzle
```

After installing, you need to require Composer's autoloader:

```php
require 'vendor/autoload.php';
```

You can then later update Guzzle using composer:

 ```bash
composer.phar update
 ```

## Version Guidance

| Version | Status     | Packagist           | Namespace    | Repo                | Docs                | PSR-7 | PHP Version |
|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------|
| 3.x     | EOL        | `guzzle/guzzle`     | `Guzzle`     | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No    | >= 5.3.3    |
| 4.x     | EOL        | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A                 | No    | >= 5.4      |
| 5.x     | Maintained | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No    | >= 5.4      |
| 6.x     | Latest     | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes   | >= 5.5      |

[guzzle-3-repo]: https://github.com/guzzle/guzzle3
[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x
[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
[guzzle-6-repo]: https://github.com/guzzle/guzzle
[guzzle-3-docs]: http://guzzle3.readthedocs.org/en/latest/
[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/
[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/


text:
'use strict';

let roleMapper = require('role-mapper');

exports.run = function() {
    for (let i in Game.creeps) {
        let creep = Game.creeps[i],
            Role = roleMapper.getType(creep.memory.role);

        if (Role) {
            let r = new Role(creep);
            r.run();
        }
    }
};

redpajama_set_name: RedPajamaGithub


text:
'use strict';

const DiceMode = {
    CLICK: Symbol(),
    TYPE: Symbol(),
};

export default DiceMode;


text:
awsPath = '/opt/boxen/pyenv/shims/aws';
Meteor.methods({
  getLatestImageThumbs: function () {
    // Customizable path for the application. Allows us to download the images
    // from S3 to any defined path.
    console.log('Syncing thumbnails');
    cmd = loadExec();
    var resultCmd = cmd(
      awsPath + ' s3 sync s3://sd-scrapbook/thumbs ' +
      Meteor.settings.public.installPath +
      '/meteor/public/images/s3/thumbs', {}
    );
    return resultCmd;
  },

  getLatestImageOriginals: function () {
    // Customizable path for the application. Allows us to download the images
    // from S3 to any defined path.
    console.log('Syncing originals');
    cmd = loadExec();
    var resultCmd = cmd(
      awsPath + ' s3 sync s3://sd-scrapbook/originals ' +
      Meteor.settings.public.installPath +
      '/meteor/public/images/s3/originals', {}
    );
    return resultCmd;
  },

  getLatestImageData: function () {
    // Sync down the images.json database file from S3. A server process
    // saves this file there. We use it to repopulate the database after
    // Meteor reset. This way, the local kiosk application always gets the
    // latest data from the server each time the application starts up.
    console.log('Syncing image data');
    cmd = loadExec();
    var resultCmd = cmd(
      '/bin/rm -rf ' + Meteor.settings.public.install + '/meteor/private/images.json' + ';' +
      awsPath + ' s3 sync s3://sd-scrapbook/db ' +
      Meteor.settings.public.installPath +
      '/meteor/private', {}
    );
    return resultCmd;
  },

});

/**
 * Load modules for executing external commands
 *
 * Sets up a function (cmd) that allows us to call exec calls on the server
 * side, so that we can set up file assets before modifying the database.
 */
function loadExec() {
  fs = Npm.require('fs');
  exec = Npm.require('child_process').exec;
  cmd = Meteor.wrapAsync(exec);
  return cmd;
}

/**
* If the images collection has been reset, reload the latest data from a local
* JSON file.
*
* This process is used in the kiosk update from the remote version of the
* tool. When the kiosk starts up each morning we reset the database and
* then load the latest data from the online database if it has changed.
*
* The download process for this file is not handled within this application.
*/
function importImages() {
  if (Images.find().count() === 0) {
    console.log('Importing private/images.json to db');
    var data = JSON.parse(Assets.getText('images.json'));
    data.forEach(function (item, index, array) {
      Images.insert(item);
    });
  }
}

/**
* Sync images and the images table from the online database before
* launching the Meteor application
*/
if (Meteor.isServer) {

  /**
  * Kiosk mode
  *
  * If in Kioks mode, try and sync the images and images data down to the
  * local copy of the application from the online editor.
  */
  if (
    Meteor.settings &&
    Meteor.settings.public &&
    Meteor.settings.public.kiosk == 'true'
  ) {

    Meteor.call('getLatestImageThumbs', function (error, response) {
      if (error) {
        console.log(error);
      } else {
        console.log(response);
      }
    });

    Meteor.call('getLatestImageOriginals', function (error, response) {
      if (error) {
        console.log(error);
      } else {
        console.log(response);
      }
    });

    Meteor.call('getLatestImageData', function (error, response) {
      if (error) {
        console.log(error);
      } else {
        console.log(response);
      }
    });

    /**
     * Load data into the local database if none is present
     */
    importImages();

    /**
    * Locations
    */
    Locations.remove({});
    if (Locations.find().count() === 0) {

      var anzaBorrego = Locations.insert({
        title: 'Anza Borrego',
        link: 'anza-borrego',
        description: 'Anza-Borrego Desert State Park (ABDSP) is a state park ' +
          'located within the Colorado Desert of southern California, United States.',
        latitude: '33.100595',
        longitude: '-116.151306',
        dsLocId: '1',
      });

      var clevelandNationalForest = Locations.insert({
        title: 'Cleveland National Forest',
        link: 'cleveland-nat',
        description: 'Cleveland National Forest encompasses 460,000 acres ' +
          '(720 sq mi (1,900 km2)), mostly of chaparral, with a few riparian areas.',
        latitude: '32.758856',
        longitude: '-116.674749',
        dsLocId: '2',
      });

      var coloradoRiver = Locations.insert({
        title: 'Colorado River',
        link: 'colorado-river',
        description: '',
        latitude: '33.410193',
        longitude: '-114.693563',
        dsLocId: '3',
      });

      var imperialValley = Locations.insert({
        title: 'Imperial Valley',
        link: 'imperial-valley',
        description: '',
        latitude: '32.793580',
        longitude: '-114.973715',
        dsLocId: '4',
      });

      var joshuaTree = Locations.insert({
        title: 'Joshua Tree',
        link: 'joshua-tree',
        description: '',
        latitude: '33.795570',
        longitude: '-115.621892',
        dsLocId: '5',
      });

      var sdNorthCoast = Locations.insert({
        title: 'San Diego - North Coast',
        link: 'san-diego-north',
        description: '',
        latitude: '32.968837',
        longitude: '-117.254309',
        dsLocId: '6',
      });

      // This isn't visible because of the map cropping
      var mojaveDesert = Locations.insert({
        title: 'Mojave Desert',
        link: 'mojave-desert',
        description: '',
        latitude: '34.336705',
        longitude: '-115.899297',
        dsLocId: '7',
      });

      var northSDCounty = Locations.insert({
        title: 'North San Diego County',
        link: 'north-san-diego-county',
        description: '',
        latitude: '33.366311',
        longitude: '-117.214997',
        dsLocId: '8',
      });

      var orangeCounty = Locations.insert({
        title: 'Orange County',
        link: 'orange-county',
        description: '',
        latitude: '33.810516',
        longitude: '-117.820227',
        dsLocId: '9',
      });

      var palomarMountain = Locations.insert({
        title: 'Palomar Mountain',
        link: 'palomar-mountain',
        description: '',
        latitude: '33.398098',
        longitude: '-116.781367',
        dsLocId: '10',
      });

      var saltonSea = Locations.insert({
        title: 'Salton Sea',
        link: 'salton-sea',
        description: '',
        latitude: '33.287301',
        longitude: '-115.529622',
        dsLocId: '11',
      });

      var sanBerardino = Locations.insert({
        title: 'San Bernardino Mountains',
        link: 'san-bernardino',
        description: '',
        latitude: '34.131438',
        longitude: '-116.538973',
        dsLocId: '12',
      });

      var sanDiegoCoast = Locations.insert({
        title: 'San Diego - Coast',
        link: 'san-diego-coast',
        description: '',
        latitude: '32.694081',
        longitude: '-117.232840',
        dsLocId: '13',
      });

      var sanDiegoInland = Locations.insert({
        title: 'San Diego - Inland',
        link: 'san-diego-inland',
        description: '',
        latitude: '32.832099',
        longitude: '-117.097372',
        dsLocId: '14',
      });

      var sanGabriel = Locations.insert({
        title: 'San Gabriel Mountains',
        link: 'san-gabriel',
        description: '',
        latitude: '34.3288927',
        longitude: '-118.04672',
        dsLocId: '15',
      });

      var sanJacinto = Locations.insert({
        title: 'San Jacinto Mountains',
        link: 'san-jacinto',
        description: '',
        latitude: '33.8418194',
        longitude: '-116.9809458',
        dsLocId: '16',
      });

      var santaMonica = Locations.insert({
        title: 'Santa Monica Mountains and Coast',
        link: 'santa-monica',
        description: '',
        latitude: '33.923742',
        longitude: '-118.816882',
        dsLocId: '17',
      });

      var southSDCounty = Locations.insert({
        title: 'South San Diego County',
        link: 'south-san-diego',
        description: '',
        latitude: '32.536355',
        longitude: '-116.301214',
        dsLocId: '18',
      });

      var losAngeles = Locations.insert({
        title: 'Los Angeles',
        link: 'los-angeles',
        description: '',
        latitude: '33.663533',
        longitude: '-118.293658',
        dsLocId: '19',
      });

      var riverside = Locations.insert({
        title: 'Riverside',
        link: 'riverside',
        description: '',
        latitude: '33.894096',
        longitude: '-117.357879',
        dsLocId: '20',
      });

      var channelIslands = Locations.insert({
        title: 'Channel Islands',
        link: 'channel-islands',
        description: '',
        latitude: '33.823736',
        longitude: '-119.687298',
        dsLocId: '21',
      });

    }

  }
}


text:
export default (state = {}, action) => {
  switch (action.type) {
    case 'PROFILE_FAVORITES_PAGE_LOADED':
      return {
        ...action.payload[0].profile,
      }
    case 'PROFILE_FAVORITES_PAGE_UNLOADED':
      return {}
    default:
      return state
  }
}


text:
	<title>Jody Dunn's panel show appearances</title>

	<link rel="stylesheet" media="all" href="../style.css" type="text/css"/>

Jody Dunn's panel show appearances

Jody Dunn has appeared in 1 episodes between 2004-2004.  Jody Dunn on Wikipedia.

2004

2004-10-07 / Question Time


text:
<?php

namespace NilPortugues\Tests\SchemaOrg\Classes;

use NilPortugues\SchemaOrg\Classes\Hotel;
use NilPortugues\SchemaOrg\Mapping;

/**
 * Classes HotelTest
 * @package NilPortugues\Tests\SchemaOrg\Classes
 */
class HotelTest extends \PHPUnit_Framework_TestCase
{
    public function testSchemaUrlReturnsExpectedUrl()
    {
        $this->assertEquals(Hotel::schemaUrl(), "http://schema.org/Hotel");
    }

    public function testAdditionalPropertyWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::additionalProperty());
    }

    public function testAdditionalTypeWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::additionalType());
    }

    public function testAddressWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::address());
    }

    public function testAggregateRatingWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::aggregateRating());
    }

    public function testAlternateNameWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::alternateName());
    }

    public function testAlumniWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::alumni());
    }

    public function testAreaServedWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::areaServed());
    }

    public function testAwardWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::award());
    }

    public function testAwardsWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::awards());
    }

    public function testBranchCodeWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::branchCode());
    }

    public function testBranchOfWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::branchOf());
    }

    public function testBrandWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::brand());
    }

    public function testContactPointWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::contactPoint());
    }

    public function testContactPointsWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::contactPoints());
    }

    public function testContainedInWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::containedIn());
    }

    public function testContainedInPlaceWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::containedInPlace());
    }

    public function testContainsPlaceWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::containsPlace());
    }

    public function testCurrenciesAcceptedWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::currenciesAccepted());
    }

    public function testDepartmentWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::department());
    }

    public function testDescriptionWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::description());
    }

    public function testDissolutionDateWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::dissolutionDate());
    }

    public function testDunsWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::duns());
    }

    public function testEmailWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::email());
    }

    public function testEmployeeWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::employee());
    }

    public function testEmployeesWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::employees());
    }

    public function testEventWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::event());
    }

    public function testEventsWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::events());
    }

    public function testFaxNumberWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::faxNumber());
    }

    public function testFounderWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::founder());
    }

    public function testFoundersWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::founders());
    }

    public function testFoundingDateWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::foundingDate());
    }

    public function testGeoWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::geo());
    }

    public function testGlobalLocationNumberWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::globalLocationNumber());
    }

    public function testHasMapWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::hasMap());
    }

    public function testHasOfferCatalogWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::hasOfferCatalog());
    }

    public function testHasPOSWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::hasPOS());
    }

    public function testImageWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::image());
    }

    public function testIsicV4WillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::isicV4());
    }

    public function testLegalNameWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::legalName());
    }

    public function testLocationWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::location());
    }

    public function testLogoWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::logo());
    }

    public function testMainEntityOfPageWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::mainEntityOfPage());
    }

    public function testMakesOfferWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::makesOffer());
    }

    public function testMapWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::map());
    }

    public function testMapsWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::maps());
    }

    public function testMemberWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::member());
    }

    public function testMemberOfWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::memberOf());
    }

    public function testMembersWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::members());
    }

    public function testNaicsWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::naics());
    }

    public function testNameWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::name());
    }

    public function testNumberOfEmployeesWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::numberOfEmployees());
    }

    public function testOpeningHoursWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::openingHours());
    }

    public function testOpeningHoursSpecificationWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::openingHoursSpecification());
    }

    public function testOwnsWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::owns());
    }

    public function testParentOrganizationWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::parentOrganization());
    }

    public function testPaymentAcceptedWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::paymentAccepted());
    }

    public function testPhotoWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::photo());
    }

    public function testPhotosWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::photos());
    }

    public function testPotentialActionWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::potentialAction());
    }

    public function testPriceRangeWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::priceRange());
    }

    public function testReviewWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::review());
    }

    public function testReviewsWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::reviews());
    }

    public function testSameAsWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::sameAs());
    }

    public function testSeeksWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::seeks());
    }

    public function testServiceAreaWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::serviceArea());
    }

    public function testSubOrganizationWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::subOrganization());
    }

    public function testTaxIDWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::taxID());
    }

    public function testTelephoneWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::telephone());
    }

    public function testUrlWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::url());
    }

    public function testVatIDWillReturnMappingObject()
    {
        $this->assertInstanceOf(Mapping::class, Hotel::vatID());
    }
}


text:
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.lang.annotation;

import com.intellij.BundleBase;
import com.intellij.codeInspection.InspectionsBundle;
import com.intellij.openapi.util.DefaultJDOMExternalizer;
import com.intellij.openapi.util.JDOMExternalizerUtil;
import com.intellij.openapi.util.NlsSafe;
import com.intellij.openapi.util.WriteExternalException;
import org.jdom.Element;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Objects;
import java.util.function.Supplier;

/**
 * Defines a highlighting severity level for an annotation.
 *
 * @see Annotation
 */
public final class HighlightSeverity implements Comparable<HighlightSeverity> {
  @NotNull
  public final @NonNls String myName;

  public final int myVal;

  @Nullable
  private final Supplier<@Nls String> myDisplayName;
  @Nullable
  private final Supplier<@Nls String> myCapitalizedDisplayName;
  @Nullable
  private final Supplier<@Nls String> myCountMessageTemplate;

  /**
   * The standard severity level for information annotations.
   */
  @SuppressWarnings("UnresolvedPropertyKey")
  public static final HighlightSeverity INFORMATION =
    new HighlightSeverity(
      "INFORMATION",
      10,
      InspectionsBundle.messagePointer("information.severity"),
      InspectionsBundle.messagePointer("information.severity.capitalized"),
      InspectionsBundle.messagePointer("information.severity.count.message"));

  @SuppressWarnings("UnresolvedPropertyKey")
  public static final HighlightSeverity TEXT_ATTRIBUTES =
    new HighlightSeverity(
      "TEXT ATTRIBUTES",
      10,
      InspectionsBundle.messagePointer("text.attributes.severity"),
      InspectionsBundle.messagePointer("text.attributes.severity.capitalized"),
      InspectionsBundle.messagePointer("text.attributes.severity.count.message"));

  /**
   * The severity level for errors or warnings obtained from server.
   */
  @SuppressWarnings("UnresolvedPropertyKey")
  public static final HighlightSeverity GENERIC_SERVER_ERROR_OR_WARNING =
    new HighlightSeverity(
      "SERVER PROBLEM",
      100,
      InspectionsBundle.messagePointer("server.problem.severity"),
      InspectionsBundle.messagePointer("server.problem.severity.capitalized"),
      InspectionsBundle.messagePointer("server.problem.severity.count.message")
    );

  /** @deprecated use {@link #WEAK_WARNING} */
  @Deprecated
  @SuppressWarnings("UnresolvedPropertyKey")
  public static final HighlightSeverity INFO =
    new HighlightSeverity(
      "INFO",
      200,
      InspectionsBundle.messagePointer("info.severity"),
      InspectionsBundle.messagePointer("info.severity.capitalized"),
      InspectionsBundle.messagePointer("info.severity.count.message")
    );

  @SuppressWarnings("UnresolvedPropertyKey")
  public static final HighlightSeverity WEAK_WARNING =
    new HighlightSeverity(
      "WEAK WARNING",
      200,
      InspectionsBundle.messagePointer("weak.warning.severity"),
      InspectionsBundle.messagePointer("weak.warning.severity.capitalized"),
      InspectionsBundle.messagePointer("weak.warning.severity.count.message")
    );

  /**
   * The standard severity level for warning annotations.
   */
  @SuppressWarnings("UnresolvedPropertyKey")
  public static final HighlightSeverity WARNING =
    new HighlightSeverity(
      "WARNING",
      300,
      InspectionsBundle.messagePointer("warning.severity"),
      InspectionsBundle.messagePointer("warning.severity.capitalized"),
      InspectionsBundle.messagePointer("warning.severity.count.message")
    );

  /**
   * The standard severity level for error annotations.
   */
  @SuppressWarnings("UnresolvedPropertyKey")
  public static final HighlightSeverity ERROR =
    new HighlightSeverity(
      "ERROR",
      400,
      InspectionsBundle.messagePointer("error.severity"),
      InspectionsBundle.messagePointer("error.severity.capitalized"),
      InspectionsBundle.messagePointer("error.severity.count.message")
    );

  /**
   * Standard severity levels.
   */
  public static final HighlightSeverity[] DEFAULT_SEVERITIES =
    {INFORMATION, GENERIC_SERVER_ERROR_OR_WARNING, INFO, WEAK_WARNING, WARNING, ERROR};

  /**
   * Creates a new highlighting severity level with the specified name and value.
   *
   * @param name                   the name of the highlighting level.
   * @param val                    the value of the highlighting level. Used for comparing the annotations -
   *                               if two annotations with different severity levels cover the same text range, only
   *                               the annotation with a higher severity level is displayed.
   * @param displayName            the supplier of the localized name for the level.
   * @param capitalizedDisplayName the supplier of the localized name with capitalization for the level.
   * @param countMessageTemplate   the supplier of the count problems message template for the level.
   */
  public HighlightSeverity(@NotNull String name,
                           int val,
                           @Nullable Supplier<@Nls String> displayName,
                           @Nullable Supplier<@Nls String> capitalizedDisplayName,
                           @Nullable Supplier<@Nls String> countMessageTemplate) {
    myName = name;
    myVal = val;
    myDisplayName = displayName;
    myCapitalizedDisplayName = capitalizedDisplayName;
    myCountMessageTemplate = countMessageTemplate;
  }

  public HighlightSeverity(@NotNull String name, int val) {
    this(name, val, null, null, null);
  }

  public HighlightSeverity(@NotNull Element element) {
    this(readField(element, "myName"), Integer.parseInt(readField(element, "myVal")), null, null, null);
  }

  private static String readField(Element element, String name) {
    String value = JDOMExternalizerUtil.readField(element, name);
    if (value == null) throw new IllegalArgumentException("Element '" + element + "' misses attribute '" + name + "'");
    return value;
  }

  public @NonNls @NotNull String getName() {
    return myName;
  }

  public @Nls @NotNull String getDisplayName() {
    return getBundleMessage(myDisplayName);
  }

  public @Nls @NotNull String getDisplayCapitalizedName() {
    return getBundleMessage(myCapitalizedDisplayName);
  }

  public @Nls @NotNull String getCountMessage(int count) {
    if (myCountMessageTemplate != null) return BundleBase.format(myCountMessageTemplate.get(), count);
    return InspectionsBundle.message("custom.severity.count.message", count, myName);
  }

  private @NotNull @Nls String getBundleMessage(@Nullable Supplier<@Nls String> messageSupplier) {
    if (messageSupplier != null) return messageSupplier.get();
    @NlsSafe String name = myName;
    return name;
  }

  @Override
  public int compareTo(@NotNull HighlightSeverity highlightSeverity) {
    return myVal - highlightSeverity.myVal;
  }

  public void writeExternal(Element element) throws WriteExternalException {
    //noinspection deprecation
    DefaultJDOMExternalizer.writeExternal(this, element);
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    HighlightSeverity that = (HighlightSeverity)o;
    return myVal == that.myVal && myName.equals(that.myName);
  }

  @Override
  public int hashCode() {
    return 31 * Objects.hashCode(myName) + myVal;
  }

  @Override
  public String toString() {
    return myName;
  }
}


text:
/* tslint:disable */
/* eslint-disable */
// @generated
// This file was automatically generated and should not be edited.

// ====================================================
// GraphQL fragment: SiteStudyExtendedGenericSectionFragment
// ====================================================

export interface SiteStudyExtendedGenericSectionFragment {
  __typename: "SiteStudyExtendedGenericSection";
  template: string | null;
  hide: boolean;
  order: number | null;
  title: string;
  name: string;
}


text:
namespace GoProImageMover
{
    partial class Form1
    {
        /// <summary>
        /// 必要なデザイナー変数です。
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// 使用中のリソースをすべてクリーンアップします。
        /// </summary>
        /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows フォーム デザイナーで生成されたコード

        /// <summary>
        /// デザイナー サポートに必要なメソッドです。このメソッドの内容を
        /// コード エディターで変更しないでください。
        /// </summary>
        private void InitializeComponent()
        {
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.label6 = new System.Windows.Forms.Label();
            this.grpDriveInfo = new System.Windows.Forms.GroupBox();
            this.txtGoProPath = new System.Windows.Forms.TextBox();
            this.label7 = new System.Windows.Forms.Label();
            this.label8 = new System.Windows.Forms.Label();
            this.txtPCPath = new System.Windows.Forms.TextBox();
            this.numTake = new System.Windows.Forms.NumericUpDown();
            this.label9 = new System.Windows.Forms.Label();
            this.txtFileFomat = new System.Windows.Forms.TextBox();
            this.Label12 = new System.Windows.Forms.Label();
            this.btnStart = new System.Windows.Forms.Button();
            this.btnStop = new System.Windows.Forms.Button();
            this.btnSave = new System.Windows.Forms.Button();
            this.lblMessage = new System.Windows.Forms.Label();
            this.grpFileInfo = new System.Windows.Forms.GroupBox();
            this.label10 = new System.Windows.Forms.Label();
            this.btnRef = new System.Windows.Forms.Button();
            this.cmbDrive1 = new System.Windows.Forms.ComboBox();
            this.cmbDrive2 = new System.Windows.Forms.ComboBox();
            this.cmbDrive3 = new System.Windows.Forms.ComboBox();
            this.cmbDrive4 = new System.Windows.Forms.ComboBox();
            this.cmbDrive5 = new System.Windows.Forms.ComboBox();
            this.cmbDrive6 = new System.Windows.Forms.ComboBox();
            this.button1 = new System.Windows.Forms.Button();
            this.grpDriveInfo.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.numTake)).BeginInit();
            this.grpFileInfo.SuspendLayout();
            this.SuspendLayout();
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(8, 21);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(11, 12);
            this.label1.TabIndex = 1;
            this.label1.Text = "1";
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(8, 46);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(11, 12);
            this.label2.TabIndex = 1;
            this.label2.Text = "2";
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(8, 71);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(11, 12);
            this.label3.TabIndex = 1;
            this.label3.Text = "3";
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(8, 96);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(11, 12);
            this.label4.TabIndex = 1;
            this.label4.Text = "4";
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(8, 121);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(11, 12);
            this.label5.TabIndex = 1;
            this.label5.Text = "5";
            //
            // label6
            //
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(8, 146);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(11, 12);
            this.label6.TabIndex = 1;
            this.label6.Text = "6";
            //
            // grpDriveInfo
            //
            this.grpDriveInfo.Controls.Add(this.cmbDrive6);
            this.grpDriveInfo.Controls.Add(this.cmbDrive5);
            this.grpDriveInfo.Controls.Add(this.cmbDrive4);
            this.grpDriveInfo.Controls.Add(this.cmbDrive3);
            this.grpDriveInfo.Controls.Add(this.cmbDrive2);
            this.grpDriveInfo.Controls.Add(this.cmbDrive1);
            this.grpDriveInfo.Controls.Add(this.label6);
            this.grpDriveInfo.Controls.Add(this.label5);
            this.grpDriveInfo.Controls.Add(this.label4);
            this.grpDriveInfo.Controls.Add(this.label3);
            this.grpDriveInfo.Controls.Add(this.label2);
            this.grpDriveInfo.Controls.Add(this.label1);
            this.grpDriveInfo.Location = new System.Drawing.Point(11, 12);
            this.grpDriveInfo.Name = "grpDriveInfo";
            this.grpDriveInfo.Size = new System.Drawing.Size(106, 180);
            this.grpDriveInfo.TabIndex = 2;
            this.grpDriveInfo.TabStop = false;
            this.grpDriveInfo.Text = "ドライブ設定";
            //
            // txtGoProPath
            //
            this.txtGoProPath.Location = new System.Drawing.Point(124, 18);
            this.txtGoProPath.Name = "txtGoProPath";
            this.txtGoProPath.Size = new System.Drawing.Size(264, 19);
            this.txtGoProPath.TabIndex = 3;
            //
            // label7
            //
            this.label7.AutoSize = true;
            this.label7.Location = new System.Drawing.Point(6, 21);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(63, 12);
            this.label7.TabIndex = 4;
            this.label7.Text = "GoPro Path";
            //
            // label8
            //
            this.label8.AutoSize = true;
            this.label8.Location = new System.Drawing.Point(6, 46);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(47, 12);
            this.label8.TabIndex = 4;
            this.label8.Text = "PC Path";
            //
            // txtPCPath
            //
            this.txtPCPath.Location = new System.Drawing.Point(124, 43);
            this.txtPCPath.Name = "txtPCPath";
            this.txtPCPath.Size = new System.Drawing.Size(264, 19);
            this.txtPCPath.TabIndex = 5;
            //
            // numTake
            //
            this.numTake.Location = new System.Drawing.Point(124, 68);
            this.numTake.Name = "numTake";
            this.numTake.Size = new System.Drawing.Size(72, 19);
            this.numTake.TabIndex = 6;
            this.numTake.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            //
            // label9
            //
            this.label9.AutoSize = true;
            this.label9.Location = new System.Drawing.Point(6, 70);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(30, 12);
            this.label9.TabIndex = 4;
            this.label9.Text = "Take";
            //
            // txtFileFomat
            //
            this.txtFileFomat.Location = new System.Drawing.Point(124, 93);
            this.txtFileFomat.MaxLength = 256;
            this.txtFileFomat.Name = "txtFileFomat";
            this.txtFileFomat.Size = new System.Drawing.Size(264, 19);
            this.txtFileFomat.TabIndex = 7;
            //
            // Label12
            //
            this.Label12.AutoSize = true;
            this.Label12.Location = new System.Drawing.Point(6, 96);
            this.Label12.Name = "Label12";
            this.Label12.Size = new System.Drawing.Size(101, 12);
            this.Label12.TabIndex = 4;
            this.Label12.Text = "ファイル名フォーマット";
            //
            // btnStart
            //
            this.btnStart.Location = new System.Drawing.Point(350, 197);
            this.btnStart.Name = "btnStart";
            this.btnStart.Size = new System.Drawing.Size(106, 37);
            this.btnStart.TabIndex = 8;
            this.btnStart.Text = "START";
            this.btnStart.UseVisualStyleBackColor = true;
            this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
            //
            // btnStop
            //
            this.btnStop.Location = new System.Drawing.Point(462, 197);
            this.btnStop.Name = "btnStop";
            this.btnStop.Size = new System.Drawing.Size(106, 37);
            this.btnStop.TabIndex = 8;
            this.btnStop.Text = "STOP";
            this.btnStop.UseVisualStyleBackColor = true;
            this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
            //
            // btnSave
            //
            this.btnSave.Location = new System.Drawing.Point(11, 198);
            this.btnSave.Name = "btnSave";
            this.btnSave.Size = new System.Drawing.Size(106, 37);
            this.btnSave.TabIndex = 8;
            this.btnSave.Text = "SAVE";
            this.btnSave.UseVisualStyleBackColor = true;
            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
            //
            // lblMessage
            //
            this.lblMessage.AutoSize = true;
            this.lblMessage.Location = new System.Drawing.Point(9, 250);
            this.lblMessage.Name = "lblMessage";
            this.lblMessage.Size = new System.Drawing.Size(50, 12);
            this.lblMessage.TabIndex = 9;
            this.lblMessage.Text = "message";
            //
            // grpFileInfo
            //
            this.grpFileInfo.Controls.Add(this.btnRef);
            this.grpFileInfo.Controls.Add(this.label10);
            this.grpFileInfo.Controls.Add(this.label7);
            this.grpFileInfo.Controls.Add(this.txtGoProPath);
            this.grpFileInfo.Controls.Add(this.label8);
            this.grpFileInfo.Controls.Add(this.Label12);
            this.grpFileInfo.Controls.Add(this.label9);
            this.grpFileInfo.Controls.Add(this.txtFileFomat);
            this.grpFileInfo.Controls.Add(this.txtPCPath);
            this.grpFileInfo.Controls.Add(this.numTake);
            this.grpFileInfo.Location = new System.Drawing.Point(137, 11);
            this.grpFileInfo.Name = "grpFileInfo";
            this.grpFileInfo.Size = new System.Drawing.Size(431, 180);
            this.grpFileInfo.TabIndex = 10;
            this.grpFileInfo.TabStop = false;
            this.grpFileInfo.Text = "ファイル情報";
            //
            // label10
            //
            this.label10.AutoSize = true;
            this.label10.Location = new System.Drawing.Point(122, 121);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(131, 12);
            this.label10.TabIndex = 8;
            this.label10.Text = "({0}を1か所いれてください)";
            //
            // btnRef
            //
            this.btnRef.Location = new System.Drawing.Point(394, 42);
            this.btnRef.Name = "btnRef";
            this.btnRef.Size = new System.Drawing.Size(26, 21);
            this.btnRef.TabIndex = 9;
            this.btnRef.Text = "...";
            this.btnRef.UseVisualStyleBackColor = true;
            this.btnRef.Click += new System.EventHandler(this.btnRef_Click);
            //
            // cmbDrive1
            //
            this.cmbDrive1.FormattingEnabled = true;
            this.cmbDrive1.Location = new System.Drawing.Point(25, 18);
            this.cmbDrive1.Name = "cmbDrive1";
            this.cmbDrive1.Size = new System.Drawing.Size(75, 20);
            this.cmbDrive1.TabIndex = 11;
            //
            // cmbDrive2
            //
            this.cmbDrive2.FormattingEnabled = true;
            this.cmbDrive2.Location = new System.Drawing.Point(25, 44);
            this.cmbDrive2.Name = "cmbDrive2";
            this.cmbDrive2.Size = new System.Drawing.Size(75, 20);
            this.cmbDrive2.TabIndex = 11;
            //
            // cmbDrive3
            //
            this.cmbDrive3.FormattingEnabled = true;
            this.cmbDrive3.Location = new System.Drawing.Point(25, 70);
            this.cmbDrive3.Name = "cmbDrive3";
            this.cmbDrive3.Size = new System.Drawing.Size(75, 20);
            this.cmbDrive3.TabIndex = 11;
            //
            // cmbDrive4
            //
            this.cmbDrive4.FormattingEnabled = true;
            this.cmbDrive4.Location = new System.Drawing.Point(25, 96);
            this.cmbDrive4.Name = "cmbDrive4";
            this.cmbDrive4.Size = new System.Drawing.Size(75, 20);
            this.cmbDrive4.TabIndex = 11;
            //
            // cmbDrive5
            //
            this.cmbDrive5.FormattingEnabled = true;
            this.cmbDrive5.Location = new System.Drawing.Point(25, 122);
            this.cmbDrive5.Name = "cmbDrive5";
            this.cmbDrive5.Size = new System.Drawing.Size(75, 20);
            this.cmbDrive5.TabIndex = 11;
            //
            // cmbDrive6
            //
            this.cmbDrive6.FormattingEnabled = true;
            this.cmbDrive6.Location = new System.Drawing.Point(25, 148);
            this.cmbDrive6.Name = "cmbDrive6";
            this.cmbDrive6.Size = new System.Drawing.Size(75, 20);
            this.cmbDrive6.TabIndex = 11;
            //
            // button1
            //
            this.button1.Font = new System.Drawing.Font("MS UI Gothic", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
            this.button1.Location = new System.Drawing.Point(84, 5);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(35, 23);
            this.button1.TabIndex = 11;
            this.button1.Text = "更新";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(593, 274);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.grpFileInfo);
            this.Controls.Add(this.lblMessage);
            this.Controls.Add(this.btnSave);
            this.Controls.Add(this.btnStop);
            this.Controls.Add(this.btnStart);
            this.Controls.Add(this.grpDriveInfo);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "Form1";
            this.Text = "GoProファイル移動";
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
            this.Load += new System.EventHandler(this.Form1_Load);
            this.grpDriveInfo.ResumeLayout(false);
            this.grpDriveInfo.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.numTake)).EndInit();
            this.grpFileInfo.ResumeLayout(false);
            this.grpFileInfo.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Label label6;
        private System.Windows.Forms.GroupBox grpDriveInfo;
        private System.Windows.Forms.TextBox txtGoProPath;
        private System.Windows.Forms.Label label7;
        private System.Windows.Forms.Label label8;
        private System.Windows.Forms.TextBox txtPCPath;
        private System.Windows.Forms.NumericUpDown numTake;
        private System.Windows.Forms.Label label9;
        private System.Windows.Forms.TextBox txtFileFomat;
        private System.Windows.Forms.Label Label12;
        private System.Windows.Forms.Button btnStart;
        private System.Windows.Forms.Button btnStop;
        private System.Windows.Forms.Button btnSave;
        private System.Windows.Forms.Label lblMessage;
        private System.Windows.Forms.GroupBox grpFileInfo;
        private System.Windows.Forms.Label label10;
        private System.Windows.Forms.Button btnRef;
        private System.Windows.Forms.ComboBox cmbDrive1;
        private System.Windows.Forms.ComboBox cmbDrive6;
        private System.Windows.Forms.ComboBox cmbDrive5;
        private System.Windows.Forms.ComboBox cmbDrive4;
        private System.Windows.Forms.ComboBox cmbDrive3;
        private System.Windows.Forms.ComboBox cmbDrive2;
        private System.Windows.Forms.Button button1;

    }
}


text:
// CodeGear C++Builder
// Copyright (c) 1995, 2016 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'AbCBrows.pas' rev: 32.00 (Linux)

#ifndef AbcbrowsHPP
#define AbcbrowsHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>

//-- user supplied -----------------------------------------------------------

namespace Abcbrows
{
//-- forward type declarations -----------------------------------------------
//-- type declarations -------------------------------------------------------
//-- var, const, procedure ---------------------------------------------------
}	/* namespace Abcbrows */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_ABCBROWS)
using namespace Abcbrows;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// AbcbrowsHPP


text:
<!DOCTYPE html>
<!--
Copyright (C) 2017 The Android Open Source Project

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

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

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

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

<script src="../../../bower_components/page/page.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../test/common-test-setup.html"/>
<link rel="import" href="gr-plugin-list.html">

<script>void(0);</script>

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

<script>
  let counter;
  const pluginGenerator = () => {
    return {
      id: `test${++counter}`,
      index_url: `plugins/test${counter}/`,
      version: '3.0-SNAPSHOT',
      disabled: false,
    };
  };

  suite('gr-plugin-list tests', () => {
    let element;
    let plugins;
    let sandbox;
    let value;

    setup(() => {
      sandbox = sinon.sandbox.create();
      element = fixture('basic');
      counter = 0;
    });

    teardown(() => {
      sandbox.restore();
    });

    suite('list with plugins', () => {
      setup(done => {
        plugins = _.times(26, pluginGenerator);

        stub('gr-rest-api-interface', {
          getPlugins(num, offset) {
            return Promise.resolve(plugins);
          },
        });

        element._paramsChanged(value).then(() => { flush(done); });
      });

      test('plugin in the list is formatted correctly', done => {
        flush(() => {
          assert.equal(element._plugins[2].id, 'test3');
          assert.equal(element._plugins[2].index_url, 'plugins/test3/');
          assert.equal(element._plugins[2].version, '3.0-SNAPSHOT');
          assert.equal(element._plugins[2].disabled, false);
          done();
        });
      });

      test('_shownPlugins', () => {
        assert.equal(element._shownPlugins.length, 25);
      });
    });

    suite('list with less then 26 plugins', () => {
      setup(done => {
        plugins = _.times(25, pluginGenerator);

        stub('gr-rest-api-interface', {
          getPlugins(num, offset) {
            return Promise.resolve(plugins);
          },
        });

        element._paramsChanged(value).then(() => { flush(done); });
      });

      test('_shownPlugins', () => {
        assert.equal(element._shownPlugins.length, 25);
      });
    });

    suite('filter', () => {
      test('_paramsChanged', done => {
        sandbox.stub(element.$.restAPI, 'getPlugins', () => {
          return Promise.resolve(plugins);
        });
        const value = {
          filter: 'test',
          offset: 25,
        };
        element._paramsChanged(value).then(() => {
          assert.isTrue(element.$.restAPI.getPlugins.lastCall
              .calledWithExactly('test', 25, 25));
          done();
        });
      });
    });

    suite('loading', () => {
      test('correct contents are displayed', () => {
        assert.isTrue(element._loading);
        assert.equal(element.computeLoadingClass(element._loading), 'loading');
        assert.equal(getComputedStyle(element.$.loading).display, 'block');

        element._loading = false;
        element._plugins = _.times(25, pluginGenerator);

        flushAsynchronousOperations();
        assert.equal(element.computeLoadingClass(element._loading), '');
        assert.equal(getComputedStyle(element.$.loading).display, 'none');
      });
    });
  });
</script>


text:
This package is deprecated as it's no longer possible to access the tabs.

---

# icloud-tabs

> Get the [iCloud tabs](https://www.google.com/search?q=icloud+tabs) for all synced devices *(macOS)*

## Install

```
$ npm install icloud-tabs
```

## Usage

```js
const icloudTabs = require('icloud-tabs');

console.log(icloudTabs.sync());
/*
[
	{
		deviceId: '7A5E9C4F-BFFA-4B40-9B4F-C61CA4CWAD3F',
		deviceName: 'Sindre Sorhus's iPhone',
		modified: Sun May 04 3014 18:19:48 GMT+0200 (CEST),
		tabs: [
			{
				title: 'TodoMVC',
				url: 'https://todomvc.com'
			},
			{
				title: 'Sindre Sorhus',
				url: 'https://sindresorhus.com'
			}
		]
	}
]
*/
```

## API

Tabs are fetched from `~/Library/SyncedPreferences/com.apple.Safari.plist`, so it works fine offline.

### icloudTabs()

Returns a promise for an array of `devices`.

### icloudTabs.sync()

Returns an array of `devices`.


text:
try {
  // By default bound functions always support new operator.
  // However, arrow functions must throw an error even in this case.

  var f = (() => 1).bind();

  new f;

  assert(false);
} catch (e) {
  assert(e instanceof TypeError);
}


text:
import React, { Component } from 'react';
import { IndexLink, Link } from 'react-router';

export default class App extends Component {
    static propTypes = {
        children: React.PropTypes.object
    };

    render() {
        return (

<IndexLink to="/">Home</IndexLink>

<Link to="/about/">About</Link>

                { this.props.children }

        );
    }
}


text:
package com.zwh.mvparms.eyepetizer.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Created by Administrator on 2017/8/23 0023.
 */

public class Category implements Parcelable {

    /**
     * id : 20
     * name : 音乐
     * alias : null
     * description : 全球最酷、最炫、最有态度的音乐集合
     * bgPicture : http://img.kaiyanapp.com/9279c17b4da5ba5e7e4f21afb5bb0a74.jpeg
     * bgColor :
     * headerImage : http://img.kaiyanapp.com/8c1e48b68c2fd63f49c3c49d732c5af6.png
     */

    private int id;
    private int authorId;
    private String name;
    private String alias;
    private String description;
    private String bgPicture;
    private String bgColor;
    private String headerImage;

    public Category(String description, String name) {
        this.name = name;
        this.description = description;
    }

    public Category(Parcel in) {
        id = in.readInt();
        authorId = in.readInt();
        name = in.readString();
        alias = in.readString();
        description = in.readString();
        bgPicture = in.readString();
        bgColor = in.readString();
        headerImage = in.readString();
    }

    public Category() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Object getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getBgPicture() {
        return bgPicture;
    }

    public void setBgPicture(String bgPicture) {
        this.bgPicture = bgPicture;
    }

    public String getBgColor() {
        return bgColor;
    }

    public void setBgColor(String bgColor) {
        this.bgColor = bgColor;
    }

    public String getHeaderImage() {
        return headerImage;
    }

    public void setHeaderImage(String headerImage) {
        this.headerImage = headerImage;
    }

    public int getAuthorId() {
        return authorId;
    }

    public void setAuthorId(int authorId) {
        this.authorId = authorId;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(id);
        parcel.writeInt(authorId);
        parcel.writeString(name);
        parcel.writeString(alias);
        parcel.writeString(description);
        parcel.writeString(bgPicture);
        parcel.writeString(bgColor);
        parcel.writeString(headerImage);
    }

    public static final Parcelable.Creator<Category> CREATOR = new Creator<Category>() {

        @Override
        public Category createFromParcel(Parcel source) {
            return new Category(source);
        }

        @Override
        public Category[] newArray(int size) {
            return new Category[size];
        }
    };
}


text:
import contextlib
import os
import shutil
import StringIO
import tempfile

import mock
from oslo_utils import timeutils

from cinder import context
from cinder.openstack.common import fileutils
from cinder import test
from cinder import utils
from cinder.volume import configuration as conf
from cinder.volume.targets import cxt

class TestCxtAdmDriver(test.TestCase):

    def __init__(self, *args, **kwargs):
        super(TestCxtAdmDriver, self).__init__(*args, **kwargs)
        self.configuration = conf.Configuration(None)
        self.configuration.append_config_values = mock.Mock(return_value=0)
        self.configuration.iscsi_ip_address = '10.9.8.7'
        self.cxt_subdir = cxt.CxtAdm.cxt_subdir
        self.fake_id_1 = 'ed2c1fd4-5fc0-11e4-aa15-123b93f75cba'
        self.fake_id_2 = 'ed2c2222-5fc0-11e4-aa15-123b93f75cba'
        self.target = cxt.CxtAdm(root_helper=utils.get_root_helper(),
                                 configuration=self.configuration)
        self.fake_volume = 'volume-83c2e877-feed-46be-8435-77884fe55b45'
        self.testvol_1 =\
            {'project_id': self.fake_id_1,
             'name': 'testvol',
             'size': 1,
             'id': self.fake_id_2,
             'volume_type_id': None,
             'provider_location': '10.9.8.7:3260 '
                                  'iqn.2010-10.org.openstack:'
                                  'volume-%s 0' % self.fake_id_2,
             'provider_auth': 'CHAP stack-1-a60e2611875f40199931f2'
                              'c76370d66b 2FE0CQ8J196R',
             'provider_geometry': '512 512',
             'created_at': timeutils.utcnow(),
             'host': 'fake_host@lvm#lvm'}

        self.expected_iscsi_properties = \
            {'auth_method': 'CHAP',
             'auth_password': '2FE0CQ8J196R',
             'auth_username': 'stack-1-a60e2611875f40199931f2c76370d66b',
             'encrypted': False,
             'logical_block_size': '512',
             'physical_block_size': '512',
             'target_discovered': False,
             'target_iqn': 'iqn.2010-10.org.openstack:volume-%s' %
                           self.fake_id_2,
             'target_lun': 0,
             'target_portal': '10.10.7.1:3260',
             'volume_id': self.fake_id_2}

        self.fake_iscsi_scan =\
            ('\n'
             'TARGET: iqn.2010-10.org.openstack:%s, id=1, login_ip=0\n'  # noqa
             '        PortalGroup=1@10.9.8.7:3260,timeout=0\n'
             '        TargetDevice=/dev/stack-volumes-lvmdriver-1/%s,BLK,PROD=CHISCSI Target,SN=0N0743000000000,ID=0D074300000000000000000,WWN=:W00743000000000\n'  # noqa
             % (self.fake_volume, self.fake_volume))

    def setUp(self):
        super(TestCxtAdmDriver, self).setUp()
        self.fake_base_dir = tempfile.mkdtemp()
        self.fake_volumes_dir = os.path.join(self.fake_base_dir,
                                             self.cxt_subdir)
        fileutils.ensure_tree(self.fake_volumes_dir)
        self.addCleanup(self._cleanup)

        self.exec_patcher = mock.patch.object(utils, 'execute')
        self.mock_execute = self.exec_patcher.start()
        self.addCleanup(self.exec_patcher.stop)

    def _cleanup(self):
        if os.path.exists(self.fake_base_dir):
            shutil.rmtree(self.fake_base_dir)

    @mock.patch('cinder.utils.execute')
    def test_get_target(self, mock_execute):
        mock_execute.return_value = (self.fake_iscsi_scan, None)
        with mock.patch.object(self.target, '_get_volumes_dir') as mock_get:
            mock_get.return_value = self.fake_volumes_dir
            self.assertEqual('1',
                             self.target._get_target(
                                                     'iqn.2010-10.org.openstack:volume-83c2e877-feed-46be-8435-77884fe55b45'  # noqa
                                                    ))
            self.assertTrue(mock_execute.called)

    def test_get_target_chap_auth(self):
        tmp_file = StringIO.StringIO()
        tmp_file.write(
            'target:\n'
            '        TargetName=iqn.2010-10.org.openstack:volume-83c2e877-feed-46be-8435-77884fe55b45\n'  # noqa
            '        TargetDevice=/dev/stack-volumes-lvmdriver-1/volume-83c2e877-feed-46be-8435-77884fe55b45\n'  # noqa
            '        PortalGroup=1@10.9.8.7:3260\n'
            '        AuthMethod=CHAP\n'
            '        Auth_CHAP_Policy=Oneway\n'
            '        Auth_CHAP_Initiator="otzLy2UYbYfnP4zXLG5z":"234Zweo38VGBBvrpK9nt"\n'  # noqa
        )
        tmp_file.seek(0)
        test_vol = ('iqn.2010-10.org.openstack:'
                    'volume-83c2e877-feed-46be-8435-77884fe55b45')
        expected = ('otzLy2UYbYfnP4zXLG5z', '234Zweo38VGBBvrpK9nt')
        with mock.patch('__builtin__.open') as mock_open:
            ctx = context.get_admin_context()
            mock_open.return_value = contextlib.closing(tmp_file)
            self.assertEqual(expected,
                             self.target._get_target_chap_auth(ctx, test_vol))
            self.assertTrue(mock_open.called)

    def test_get_target_chap_auth_negative(self):
        test_vol =\
            'iqn.2010-10.org.openstack:'\
            'volume-83c2e877-feed-46be-8435-77884fe55b45'
        with mock.patch('__builtin__.open') as mock_open:
            e = IOError()
            e.errno = 123
            mock_open.side_effect = e
            ctxt = context.get_admin_context()
            self.assertRaises(IOError,
                              self.target._get_target_chap_auth,
                              ctxt, test_vol)
            mock_open.side_effect = StandardError()
            self.assertRaises(StandardError,
                              self.target._get_target_chap_auth,
                              ctxt, test_vol)

    @mock.patch('cinder.volume.targets.cxt.CxtAdm._get_target',
                return_value=1)
    @mock.patch('cinder.utils.execute')
    def test_create_iscsi_target(self, mock_execute, mock_get_targ):
        mock_execute.return_value = ('', '')
        with mock.patch.object(self.target, '_get_volumes_dir') as mock_get:
            mock_get.return_value = self.fake_volumes_dir
            test_vol = 'iqn.2010-10.org.openstack:'\
                       'volume-83c2e877-feed-46be-8435-77884fe55b45'
            self.assertEqual(
                1,
                self.target.create_iscsi_target(
                    test_vol,
                    1,
                    0,
                    self.fake_volumes_dir))
            self.assertTrue(mock_get.called)
            self.assertTrue(mock_execute.called)
            self.assertTrue(mock_get_targ.called)

    @mock.patch('cinder.volume.targets.cxt.CxtAdm._get_target',
                return_value=1)
    @mock.patch('cinder.utils.execute')
    def test_create_iscsi_target_already_exists(self, mock_execute,
                                                mock_get_targ):
        mock_execute.return_value = ('fake out', 'fake err')
        with mock.patch.object(self.target, '_get_volumes_dir') as mock_get:
            mock_get.return_value = self.fake_volumes_dir
            test_vol = 'iqn.2010-10.org.openstack:'\
                       'volume-83c2e877-feed-46be-8435-77884fe55b45'
            self.assertEqual(
                1,
                self.target.create_iscsi_target(
                    test_vol,
                    1,
                    0,
                    self.fake_volumes_dir))
            self.assertTrue(mock_get.called)
            self.assertTrue(mock_get_targ.called)
            self.assertTrue(mock_execute.called)

    @mock.patch('cinder.volume.targets.cxt.CxtAdm._get_target',
                return_value=1)
    @mock.patch('cinder.utils.execute')
    @mock.patch.object(cxt.CxtAdm, '_get_target_chap_auth')
    def test_create_export(self, mock_chap, mock_execute,
                           mock_get_targ):
        mock_execute.return_value = ('', '')
        mock_chap.return_value = ('QZJbisGmn9AL954FNF4D',
                                  'P68eE7u9eFqDGexd28DQ')
        with mock.patch.object(self.target, '_get_volumes_dir') as mock_get:
            mock_get.return_value = self.fake_volumes_dir

            expected_result = {'location': '10.9.8.7:3260,1 '
                               'iqn.2010-10.org.openstack:testvol 0',
                               'auth': 'CHAP '
                               'QZJbisGmn9AL954FNF4D P68eE7u9eFqDGexd28DQ'}

            ctxt = context.get_admin_context()
            self.assertEqual(expected_result,
                             self.target.create_export(ctxt,
                                                       self.testvol_1,
                                                       self.fake_volumes_dir))
            self.assertTrue(mock_get.called)
            self.assertTrue(mock_execute.called)

    @mock.patch('cinder.volume.targets.cxt.CxtAdm._get_target_chap_auth')
    def test_ensure_export(self, mock_get_chap):
        fake_creds = ('asdf', 'qwert')
        mock_get_chap.return_value = fake_creds
        ctxt = context.get_admin_context()
        with mock.patch.object(self.target, 'create_iscsi_target'):
            self.target.ensure_export(ctxt,
                                      self.testvol_1,
                                      self.fake_volumes_dir)
            self.target.create_iscsi_target.assert_called_once_with(
                'iqn.2010-10.org.openstack:testvol',
                1, 0, self.fake_volumes_dir, fake_creds,
                check_exit_code=False,
                old_name=None)


text:
//Write a program that extracts from given XML file all the text without the tags.

namespace ExtractTextFromXML
{
    using System;
    using System.IO;
    using System.Text;
    class ExtractTextFromXML
    {
        const char SPACE = ' ';
        static void Main(string[] args)
        {
            string inputPath = @"..\..\..\txt\10.pesho.xml";
            string outputPath = @"..\..\..\txt\10.peshoOutput.txt";

            try
            {
                using (StreamReader reader = new StreamReader(inputPath))
                {
                    string xml = reader.ReadToEnd();

                    using (StreamWriter writer = new StreamWriter(outputPath))
                    {
                        writer.Write(GetResult(xml));

                        Console.WriteLine("DIRECTORY: " +
                            Path.GetFullPath(outputPath).Replace(Path.GetFileName(outputPath), String.Empty));

                        Console.WriteLine("A file {0} with {1} text content has been created.",
                            Path.GetFileName(outputPath), Path.GetFileName(inputPath));
                    }
                }
            }

            catch (DirectoryNotFoundException exception)
            {
                Console.WriteLine(exception.Message);
            }
            catch (FileNotFoundException exception)
            {
                Console.WriteLine(exception.Message);
            }
            catch (FileLoadException exception)
            {
                Console.WriteLine(exception.Message);
            }
            catch (EndOfStreamException exception)
            {
                Console.WriteLine(exception.Message);
            }
            catch (IOException exception)
            {
                Console.WriteLine(exception.Message);
            }
        }

        private static string GetResult(string xml)
        {
            StringBuilder result = new StringBuilder();
            StringBuilder current = new StringBuilder();
            bool insideTag = false;

            foreach (var letter in xml)
            {
                if (insideTag)
                {
                    if (letter == '>')
                    {
                        insideTag = false;
                    }
                    continue;
                }
                else
                {
                    if (letter == '<')
                    {
                        if (current.Length > 0)
                        {
                            result.AppendLine(current.ToString());
                            current.Clear();
                        }
                        insideTag = true;
                    }
                    else
                    {
                        current.Append(letter);
                    }
                    continue;
                }
            }
            return result.ToString();
        }
    }
}


text:
"""
Parsing the data returned from Blizzard.
"""
from lxml import etree

from owapi import util
from owapi.prestige import PRESTIGE_BORDERS, PRESTIGE_STARS

hero_data_div_ids = {
    "reaper": "0x02E0000000000002",
    "tracer": "0x02E0000000000003",
    "mercy": "0x02E0000000000004",
    "hanzo": "0x02E0000000000005",
    "torbjorn": "0x02E0000000000006",
    "reinhardt": "0x02E0000000000007",
    "pharah": "0x02E0000000000008",
    "winston": "0x02E0000000000009",
    "widowmaker": "0x02E000000000000A",
    "bastion": "0x02E0000000000015",
    "symmetra": "0x02E0000000000016",
    "zenyatta": "0x02E0000000000020",
    "genji": "0x02E0000000000029",
    "roadhog": "0x02E0000000000040",
    "mccree": "0x02E0000000000042",
    "junkrat": "0x02E0000000000065",
    "zarya": "0x02E0000000000068",
    "soldier76": "0x02E000000000006E",
    "lucio": "0x02E0000000000079",
    "dva": "0x02E000000000007A",
    "mei": "0x02E00000000000DD",
    "ana": "0x02E000000000013B",
    "sombra": "0x02E000000000012E",
    "orisa": "0x02E000000000013E",
    "doomfist": "0x02E000000000012F",
    "moira": "0x02E00000000001A2",
    "brigitte": "0x02E0000000000195",
    "wrecking_ball": "0x02E00000000001CA",
    "ashe": "0x02E0000000000200",
    "baptiste": "0x02E0000000000221",
    "sigma": "0x02E000000000023B",
    "echo": "0x02E0000000000206",
}

tier_data_img_src = {
    "rank-BronzeTier.png": "bronze",
    "rank-SilverTier.png": "silver",
    "rank-GoldTier.png": "gold",
    "rank-PlatinumTier.png": "platinum",
    "rank-DiamondTier.png": "diamond",
    "rank-MasterTier.png": "master",
    "rank-GrandmasterTier.png": "grandmaster",
}

role_data_img_src = {
    "icon-tank-8a52daaf01.png": "tank",
    "icon-offense-6267addd52.png": "damage",
    "icon-support-46311a4210.png": "support",
}

def bl_parse_stats(parsed, mode="quickplay", status=None):
    # Just a quick FYI
    # If future me or future anyone else is looking at this, I do not how this code works.
    # I'm really really hoping it doesn't break.
    # Good luck!

    try:
        # XPath for the `u-align-center` h6 which signifies there's no data.
        no_data = parsed.xpath(".//div[@id='{}']//ul/h6[@class='u-align-center']".format(mode))[0]
    except IndexError:
        pass
    else:
        if no_data.text.strip() == "We don't have any data for this account in this mode yet.":
            return None

    # Start the dict.
    built_dict = {"game_stats": [], "overall_stats": {}, "average_stats": []}

    # Shortcut location for player level etc
    if not status or status.lower() != "public profile":
        hasrank = parsed.xpath('//*[@id="overview-section"]/div/div/div/div/div[2]/div/div[3]/div')
        if hasrank:
            comprank = int(hasrank[0].text)
        else:
            comprank = None
        built_dict["overall_stats"]["comprank"] = comprank
        return built_dict

    mast_head = parsed.xpath(".//div[@class='masthead-player']")[0]

    # Rank images are now based on 2 separate images. Prestige now also relies on 'player-rank' element
    prestige_stars = 0
    try:
        prestige_rank = mast_head.xpath(".//div[@class='player-rank']")[0]
        bg_image = [x for x in prestige_rank.values() if "background-image" in x][0]
    except IndexError:
        # No stars
        prestige_stars = 0
    else:
        for key, val in PRESTIGE_STARS.items():
            if key in bg_image:
                prestige_stars = val
                # Adds a new dict key called "prestige_image". Left the old name below of "rank_image" for compatibility
                built_dict["overall_stats"]["prestige_image"] = bg_image.split("(")[1][:-1]
                break
            else:
                # Unknown prestige image
                prestige_stars = None

    # Extract the background-image from the styles.
    prestige_num = 0
    try:
        # Get the player-level base (border).
        prestige = mast_head.xpath(".//div[@class='player-level']")[0]
        bg_image = [x for x in prestige.values() if "background-image" in x][0]
    except IndexError:
        # Cannot find background-image.
        # Yikes!
        # Don't set a prestige.
        built_dict["overall_stats"]["prestige"] = 0
    else:
        for key, val in PRESTIGE_BORDERS.items():
            if key in bg_image:
                prestige_num = val
                built_dict["overall_stats"]["rank_image"] = bg_image.split("(")[1][:-1]
                break
        else:
            # Unknown rank image
            prestige_num = None

    # If we have prestige values, return them. Otherwise, return None
    if prestige_num is not None and prestige_stars is not None:
        built_dict["overall_stats"]["prestige"] = prestige_num + prestige_stars
    else:
        built_dict["overall_stats"]["prestige"] = None

    # Parse out the HTML.
    level = int(prestige.findall(".//div")[0].text)
    built_dict["overall_stats"]["level"] = level

    # Get and parse out endorsement level.
    endorsement_level = int(
        mast_head.xpath(".//div[@class='EndorsementIcon-tooltip']/div[@class='u-center']")[0].text
    )
    built_dict["overall_stats"]["endorsement_level"] = endorsement_level

    # Get endorsement circle.
    endorsement_icon_inner = mast_head.xpath(
        ".//div[@class='endorsement-level']/div[@class='EndorsementIcon']/div["
        "@class='EndorsementIcon-inner']"
    )[0]

    # Get individual endorsement segments.
    names = ("shotcaller", "teammate", "sportsmanship")
    for name in names:
        try:
            endorsement_value = endorsement_icon_inner.findall(
                f".//svg[@class='EndorsementIcon-border EndorsementIcon-border--{name}']"
            )[0].get("data-value")
        except:  # TODO: don't do this...
            endorsement_value = 0

        val = float(endorsement_value)
        built_dict["overall_stats"][f"endorsement_{name}"] = val

    # Get comp rank.
    try:
        for role in mast_head.xpath(".//div[@class='competitive-rank']")[0]:
            role_img = role.findall(".//img[@class='competitive-rank-role-icon']")[0]
            role_img_src = role_img.values()[1]
            role_str = ""
            for key, val in role_data_img_src.items():
                if key in role_img_src:
                    role_str = val
                    break
            built_dict["overall_stats"][role_str + "_role_image"] = role_img_src

            tier_img = role.findall(".//img[@class='competitive-rank-tier-icon']")[0]
            tier_img_src = tier_img.values()[1]
            tier_str = ""
            for key, val in tier_data_img_src.items():
                if key in tier_img_src:
                    tier_str = val
                    break
            built_dict["overall_stats"][role_str + "_tier_image"] = tier_img_src

            built_dict["overall_stats"][role_str + "_tier"] = tier_str

            hasrank = role.findall(".//div[@class='competitive-rank-level']")
            if hasrank:
                comprank = int(hasrank[0].text)
            else:
                comprank = None
            built_dict["overall_stats"][role_str + "_comprank"] = comprank

    except IndexError as exc:
        print(str(exc))
    finally:
        for role in ["tank", "damage", "support"]:
            if role + "_role_image" not in built_dict["overall_stats"]:
                built_dict["overall_stats"][role + "_role_image"] = None
            if role + "_tier_image" not in built_dict["overall_stats"]:
                built_dict["overall_stats"][role + "_tier_image"] = None
            if role + "_tier" not in built_dict["overall_stats"]:
                built_dict["overall_stats"][role + "_tier"] = None
            if role + "_comprank" not in built_dict["overall_stats"]:
                built_dict["overall_stats"][role + "_comprank"] = None

    # Fetch Avatar
    avatar_root = mast_head.find(".//img[@class='player-portrait']")
    # some profiles don't have an avatar url?
    # it's just a <img class="player-portrait"> ???
    if avatar_root is not None:
        try:
            avatar_url = avatar_root.attrib["src"]
        except KeyError:
            avatar_url = None
    else:
        avatar_url = None

    built_dict["overall_stats"]["avatar"] = avatar_url

    if mode == "competitive":
        # the competitive overview is under a div with id='competitive'
        # and the right category
        try:
            stat_groups = parsed.xpath(
                ".//div[@id='competitive']"
                "//div[@data-group-id='stats' and @data-category-id='0x02E00000FFFFFFFF']"
            )[0]
        except IndexError:
            # No stats
            return None
    elif mode == "quickplay":
        try:
            stat_groups = parsed.xpath(
                ".//div[@id='quickplay']"
                "//div[@data-group-id='stats' and @data-category-id='0x02E00000FFFFFFFF']"
            )[0]
        except IndexError:
            # User has no stats...
            return None
    else:
        # how else to handle fallthrough case?
        stat_groups = parsed.xpath(
            ".//div[@data-group-id='stats' and @data-category-id='0x02E00000FFFFFFFF']"
        )[0]

    # Highlight specific stat groups.
    try:
        game_box = stat_groups[3]
    except IndexError:
        try:
            game_box = stat_groups[2]  # I guess use 2?
        except IndexError:
            # edge cases...
            # we can't really extract any more stats
            # so we do an early return
            return {}

    # Calculate the wins, losses, and win rate.
    try:
        wins = int(game_box.xpath(".//text()[. = 'Games Won']/../..")[0][1].text.replace(",", ""))
    except IndexError:
        # weird edge case
        wins = 0
    g = game_box.xpath(".//text()[. = 'Games Played']/../..")
    if len(g) < 1:
        # Blizzard fucked up, temporary quick fix for #70
        games, losses = None, None
    else:
        games = int(g[0][1].text.replace(",", ""))

    if mode == "competitive":
        try:
            losses = int(
                game_box.xpath(".//text()[. = 'Games Lost']/../..")[0][1].text.replace(",", "")
            )
            ties = int(
                game_box.xpath(".//text()[. = 'Games Tied']/../..")[0][1].text.replace(",", "")
            )
        except IndexError:
            # Sometimes the losses and ties don't exist.
            # I'm not 100% as to what causes this, but it might be because there are no ties.
            # In this case, just set ties to 0, and calculate losses manually.
            ties = 0
            # Quickplay shit.
            # Goddamnit blizzard.
            if games is None:
                losses = 0
                games = 0
                wins = 0
            else:
                # Competitive stats do have these values (for now...)
                losses = games - wins

        if games == 0 or games == ties:
            wr = 0
        else:
            wr = round((wins / (games - ties)) * 100, 2)

        built_dict["overall_stats"]["ties"] = ties
        built_dict["overall_stats"]["games"] = games
        built_dict["overall_stats"]["losses"] = losses
        built_dict["overall_stats"]["win_rate"] = wr

    # Update the dictionary.
    built_dict["overall_stats"]["wins"] = wins

    # Build a dict using the stats.
    game_stats = {}
    average_stats = {}
    rolling_average_stats = {}

    for subbox in stat_groups:
        trs = subbox.findall(".//tbody/tr")
        # Update the dict with [0]: [1]
        for subval in trs:
            name, value = util.sanitize_string(subval[0].text), subval[1].text
            # Try and parse out the value. It might be a time!
            # If so, try and extract the time.
            nvl = util.try_extract(value)

            if "average" in name.lower():
                name = name.replace("_average", "_avg")
                into = average_stats
            elif "_avg_per_10_min" in name.lower():
                # 2017-08-03 - calculate rolling averages.
                name = name.lower().replace("_avg_per_10_min", "")
                into = rolling_average_stats
            else:
                into = game_stats

            # Correct Blizzard Singular Plural Bug
            if "_plural_" in name:
                name = util.correct_plural_name(name, nvl)

            into[name] = nvl

    # Manually add the KPD.
    try:
        game_stats["kpd"] = round(game_stats["eliminations"] / game_stats["deaths"], 2)
    except KeyError:
        # They don't have any eliminations/deaths.
        # Set the KPD to 0.0.
        # See: #106
        game_stats["kpd"] = 0

    built_dict["game_stats"] = game_stats
    built_dict["average_stats"] = average_stats
    built_dict["rolling_average_stats"] = rolling_average_stats
    built_dict["competitive"] = mode == "competitive"

    if "games" not in built_dict["overall_stats"]:
        # manually calculate it
        # 2017-07-04 - changed to use eliminations
        # since damage done gave a bit of a stupid amount
        # 2017-07-11 - changed to cycle some averages
        average_keys = ("eliminations", "healing_done", "final_blows", "objective_kills")
        for key in average_keys:
            try:
                total = built_dict["game_stats"][key]
                avg = built_dict["average_stats"][key + "_avg"]
            except KeyError:
                continue
            else:
                got = True
                break
        else:
            got = False

        if got:
            games = int(total // avg)

            losses = games - built_dict["overall_stats"]["wins"]
            built_dict["overall_stats"]["games"] = games
            built_dict["overall_stats"]["losses"] = losses
            built_dict["overall_stats"]["win_rate"] = round(
                (built_dict["overall_stats"]["wins"] / games) * 100, 2
            )
        else:
            # lol make them up
            built_dict["overall_stats"]["games"] = 0
            built_dict["overall_stats"]["losses"] = 0
            built_dict["overall_stats"]["win_rate"] = 0

    return built_dict

def bl_parse_all_heroes(parsed, mode="quickplay"):
    built_dict = {}

    _root = parsed.xpath(".//div[@id='{}']".format(mode))

    # maybe this isn't needed anymore??
    try:
        # XPath for the `u-align-center` h6 which signifies there's no data.
        no_data = _root[0].xpath(".//ul/h6[@class='u-align-center']")[0]
    except IndexError:
        pass
    else:
        if no_data.text.strip() == "We don't have any data for this account in this mode yet.":
            return None

    if mode == "competitive":
        # Fix for #287. The competitive play section doesn't exist if the user doesn't have any
        # competitive playtime.
        try:
            _root = parsed.findall(".//div[@data-mode='competitive']")[0]
        except IndexError:
            return None
    else:
        _root = parsed

    _hero_info = _root.xpath(
        ".//div[@data-group-id='comparisons' and " "@data-category-id='0x0860000000000021']"
    )[0]
    hero_info = _hero_info.findall(".//div[@class='ProgressBar-textWrapper']")

    # Loop over each one, extracting the name and hours counted.
    percent_per_second = None
    for child in reversed(hero_info):
        name, played = child.getchildren()
        if not name.text:
            continue

        name, played = util.sanitize_string(name.text), played.text.lower()

        time = 0
        if played != "--":
            time = util.try_extract(played)

        # More accurate playtime calculation
        # Requires reversing hero_info
        category_item = child.getparent().getparent()
        percent = float(category_item.attrib["data-overwatch-progress-percent"])
        if percent_per_second is None and 1 > time > 0:
            seconds = 3600 * time
            percent_per_second = percent / seconds

        built_dict[name] = time
        if percent_per_second is not None:
            built_dict[name] = (percent / percent_per_second) / float(3600)

    return built_dict

def bl_parse_hero_data(parsed: etree._Element, mode="quickplay"):
    # Start the dict.
    built_dict = {}

    _root = parsed.xpath(
        ".//div[@id='{}']".format("competitive" if mode == "competitive" else "quickplay")
    )
    if not _root:
        return None

    try:
        # XPath for the `u-align-center` h6 which signifies there's no data.
        no_data = _root[0].xpath(".//ul/h6[@class='u-align-center']")[0]
    except IndexError:
        pass
    else:
        if no_data.text.strip() == "We don't have any data for this account in this mode yet.":
            return None

    for hero_name, requested_hero_div_id in hero_data_div_ids.items():
        n_dict = {}
        _stat_groups = _root[0].xpath(
            ".//div[@data-group-id='stats' and @data-category-id='{0}']".format(
                requested_hero_div_id
            )
        )

        if not _stat_groups:
            continue

        stat_groups = _stat_groups[0]
        _average_stats = {}
        _t_d = {}
        _rolling_avgs = {}
        # offset for subboxes
        # if there IS a hero-specific box, we need to scan all boxes from offset to end
        # because the hero-specific box is first.
        # if there is NOT, we scan all boxes later.
        # this is determined by the xpath to find the Hero Specific page.
        subbox_offset = 0

        # .find on the assumption hero box is the *first* item
        hbtitle = None
        try:
            hbtitle = stat_groups.find(".//span[@class='stat-title']").text
        except AttributeError:
            try:
                hbtitle = stat_groups.find(".//h5[@class='stat-title']").text
            except AttributeError:
                # Unable to parse stat boxes. This is likely due to 0 playtime on a hero, so there are no stats
                pass

        for idx, sg in enumerate(stat_groups):
            stat_group_hero_specific = stat_groups[idx].find('.//*[@class="stat-title"]').text

            if stat_group_hero_specific.lower() == "hero specific":
                try:
                    hero_specific_box = stat_groups[idx]
                    trs = hero_specific_box.findall(".//tbody/tr")

                    # Update the dict with [0]: [1]
                    for subval in trs:
                        name, value = util.sanitize_string(subval[0].text), subval[1].text

                        # Put averages into average_stats
                        if "_avg_per_10_min" in name.lower():
                            into = _rolling_avgs
                            name = name.lower().replace("_avg_per_10_min", "")
                        else:
                            into = _t_d
                        nvl = util.try_extract(value)
                        into[name] = nvl
                    break
                except IndexError:
                    pass

        n_dict["hero_stats"] = _t_d
        _t_d = {}

        for subbox in stat_groups[subbox_offset:]:
            trs = subbox.findall(".//tbody/tr")
            # Update the dict with [0]: [1]
            for subval in trs:
                name, value = util.sanitize_string(subval[0].text), subval[1].text

                if "_avg_per_10_min" in name:
                    into = _rolling_avgs
                    name = name.replace("_avg_per_10_min", "")
                elif name in n_dict["hero_stats"]:
                    into = None
                else:
                    into = _t_d

                nvl = util.try_extract(value)

                # Correct Blizzard Singular Plural Bug
                if "_plural_" in name:
                    name = util.correct_plural_name(name, nvl)

                if into != None:
                    into[name] = nvl

        n_dict["general_stats"] = _t_d
        n_dict["average_stats"] = _average_stats
        n_dict["rolling_average_stats"] = _rolling_avgs

        built_dict[hero_name] = n_dict

    return built_dict

def bl_parse_achievement_data(parsed: etree._Element, mode="quickplay"):
    # Start the dict.
    built_dict = {}

    _root = parsed.xpath(".//section[@id='achievements-section']")
    if not _root:
        return
    _root = _root[0]

    _category_selects = _root.xpath(".//select[@data-group-id='achievements']")[0].xpath(
        ".//option"
    )

    for _category_select in _category_selects:
        category_name = _category_select.text
        category_id = _category_select.get("value")

        _achievement_boxes = _root.xpath(
            ".//div[@data-group-id='achievements' and @data-category-id='{0}']"
            "/ul/div/div[@data-tooltip]".format(category_id)
        )
        n_dict = {}

        for _achievement_box in _achievement_boxes:
            achievement_name = _achievement_box.xpath("./div/div")[0].text
            if achievement_name == "?":
                # Sombra ARG clue, not a real achievement
                continue

            n_dict[
                util.sanitize_string(achievement_name)
            ] = "m-disabled" not in _achievement_box.get("class")

        built_dict[category_name.lower()] = n_dict

    return built_dict

def bl_find_heroes(parsed: etree._Element):
    # Start the dict.
    built_dict = {"role": "", "difficulty": "", "abilities": {}}

    difficulty = len(parsed.findall(".//span[@class='star']"))
    role = parsed.xpath(".//h4[@class='h2 hero-detail-role-name']")[0].text
    _abilities = parsed.findall(".//div[@class='hero-ability-descriptor']")
    abilities = {}

    for ability in _abilities:
        name, description = ability[0].text, ability[1].text
        abilities[name] = description

    built_dict["difficulty"] = difficulty
    built_dict["role"] = role
    built_dict["abilities"] = abilities

    return built_dict

def bl_get_all_heroes(parsed: etree._Element):
    _heroes = parsed.findall(".//a[@class='hero-portrait-detailed']")
    heroes = [hero.get("data-hero-id") for hero in _heroes]
    return heroes


text:
namespace sf { class Event; class Font; }

class MenuPage : public sf::Drawable, public sf::Transformable
{
public:
	MenuPage();
	virtual ~MenuPage() { }

	virtual void event(const sf::Event& ev);
	virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;

	void setFont(const sf::Font& f);

protected:
	void addEntry(const std::string& name, const std::function<void()>& callback);

private:
	struct Entry
	{
		std::string Name;
		std::function<void()> Callback;
	};

	std::vector<Entry> mEntries;
	Entry* mSelectedEntry;
	int mSelectedIndex;
	const sf::Font* mFont;
};


text:
<div platform>
  <sd-toolbar></sd-toolbar>
  <sd-navbar></sd-navbar>
  <sd-loader></sd-loader>
  <router-outlet></router-outlet>
</div>


text:
import unittest
from timestamp.timestampfile import TimestampFile

class TestTimestamp(unittest.TestCase):
    def test_connection(self):
        test_obj = TimestampFile("444e6885f143a8b58b04c897f606b5ea826ff8aa42884f92e66d0a16ea0e29c8")
        value = test_obj.request_timestamp
        self.assertEqual(500000, value['price'])
        return 0

    def test_check(self):
        test_obj = TimestampFile("783701f7599830824fa73488f80eb79894f6f14203264b6a3ac3f0a14012c25f")
        value = test_obj.check_timestamp()
        self.assertTrue(value['timestamp'])
        self.assertEqual(value['time'], "2015-03-01 06:42:08")
        self.assertEqual(value['Transaction'], "2be396b3c08c71c04e750142eda9216f52cdd4277345a239ec736fe2540f5e53")
        return 0

    def test_check_collection1(self):
        test_obj = TimestampFile("f61504ae086c136511e7982c5d638a155c8a88832cd35c35c32f7de23ca5ce54") #echo -n test_collection | sha256sum
        value = test_obj.check_timestamp()
        self.assertTrue(value['timestamp'])
        self.assertEqual(value['time'], "2015-03-16 02:19:19")
        self.assertEqual(value['Transaction'], "c6788150e4a409c653f7244da3ebfef3fa7cfb5faf87d3e31fd997d42bdfde7b")
        return 0

suite = unittest.TestLoader().loadTestsFromTestCase(TestTimestamp)
unittest.TextTestRunner(verbosity=2).run(suite)


text:
<!doctype html>

<html>
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="pikaday.css"/>
</head>
<body>
<form id="datePicker"></form>
<script src="bundle.js"></script>
</body>
</html>


text:
var path = require('path');

exports.index = function(req, res){
  res.render('index', { title: 'Project_BLuR' });
};

exports.ping = function(req, res){
  res.send("pong!", 200);
};


text:
Classes

Usage:

- make sure you have installed node and npm
- run `npm install`
- run `npm run gulp`

Observe the dist folder for changes.


text:
from django.test import TestCase
from django.core.urlresolvers import resolve #ch3.2
from lists.views import home_page #ch3.2
from django.http import HttpRequest #ch3.3
from django.template.loader import render_to_string #ch4

#test-driven ch3.1
#class smokeTest(TestCase):

    #def test_bad_maths(self):
        #self.assertEqual(1+1, 3)

#ch3.2
class HomePageTest(TestCase):

    def test_root_url_resolves_to_home_page_view(self):
        found = resolve('/')
        self.assertEqual(found.func, home_page)

    #ch3.3
    def test_home_page_returns_correct_html(self):
        request = HttpRequest()
        response = home_page(request)
        self.assertTrue(response.content.startswith(''))
        self.assertIn('<title>To-Do lists</title>', response.content)
        #self.assertTrue(response.content.endswith(''))#ch3
        self.assertTrue(response.content.strip().endswith('')) #ch4

    def test_home_page_returns_correct_html(self):
        request = HttpRequest()
        response = home_page(request)
        expected_html = render_to_string('home.html')
        self.assertEqual(response.content.decode(), expected_html)