text:
<?xml version="1.0" ?><!DOCTYPE TS><TS language="bg" version="2.1">
<context>
    <name/>
    <message id="components-la-tap-to-cancel">
        <location filename="../qml/NotificationPopup.qml" line="161"/>
        <source>Tap to cancel</source>
        <translation>Натисни за отказ</translation>
    </message>
    <message id="lists-edit-accept">
        <location filename="../qml/AddAndEditListPage.qml" line="21"/>
        <source>Edit List</source>
        <translation>Редактирай списък</translation>
    </message>
    <message id="lists-create-accept">
        <location filename="../qml/AddAndEditListPage.qml" line="23"/>
        <source>Create List</source>
        <translation>Създай списък</translation>
    </message>
    <message id="lists-create-name">
        <location filename="../qml/AddAndEditListPage.qml" line="30"/>
        <source>List name</source>
        <oldsource>List Name</oldsource>
        <translation>Име на списъка</translation>
    </message>
    <message id="lists-create-description">
        <location filename="../qml/AddAndEditListPage.qml" line="37"/>
        <source>List description</source>
        <translation>Описание на списъка</translation>
    </message>
    <message id="venue-add-accept">
        <location filename="../qml/AddVenuePage.qml" line="64"/>
        <source>Create</source>
        <translation>Създай</translation>
    </message>
    <message id="venue-add-name">
        <location filename="../qml/AddVenuePage.qml" line="73"/>
        <source>Name</source>
        <translation>Име на мястото</translation>
    </message>
    <message id="venue-add-choose-category">
        <location filename="../qml/AddVenuePage.qml" line="96"/>
        <source>Choose category</source>
        <translation>Избери категория</translation>
    </message>
    <message id="venue-add-address">
        <location filename="../qml/AddVenuePage.qml" line="111"/>
        <source>Address</source>
        <translation>Адрес</translation>
    </message>
    <message id="venue-add-cross-street">
        <location filename="../qml/AddVenuePage.qml" line="118"/>
        <source>Cross street</source>
        <translation>Кръстовище</translation>
    </message>
    <message id="venue-add-city">
        <location filename="../qml/AddVenuePage.qml" line="126"/>
        <source>City</source>
        <translation>Град</translation>
    </message>
    <message id="venue-add-state">
        <location filename="../qml/AddVenuePage.qml" line="133"/>
        <source>State</source>
        <translation>Държава</translation>
    </message>
    <message id="venue-add-zip">
        <location filename="../qml/AddVenuePage.qml" line="140"/>
        <source>ZIP</source>
        <translation>Пощенски код</translation>
    </message>
    <message id="venue-add-phone">
        <location filename="../qml/AddVenuePage.qml" line="148"/>
        <source>Phone</source>
        <translation>Телефон</translation>
    </message>
    <message id="venue-add-twitter">
        <location filename="../qml/AddVenuePage.qml" line="155"/>
        <source>Twitter</source>
        <translation>Twitter</translation>
    </message>
    <message id="venue-add-description">
        <location filename="../qml/AddVenuePage.qml" line="162"/>
        <source>Description</source>
        <translation>Описание</translation>
    </message>
    <message id="venue-add-set-position">
        <location filename="../qml/AddVenuePage.qml" line="176"/>
        <source>Set position</source>
        <translation>Задай позиция</translation>
    </message>
    <message id="badges-title">
        <location filename="../qml/BadgesPage.qml" line="34"/>
        <source>Badges</source>
        <translation>Значки</translation>
    </message>
    <message id="badges-empty">
        <location filename="../qml/BadgesPage.qml" line="40"/>
        <source>List of badges is empty</source>
        <translation>Списъкът със значки е празен</translation>
    </message>
    <message id="categories-title">
        <location filename="../qml/CategoriesPage.qml" line="31"/>
        <source>Categories</source>
        <translation>Категории</translation>
    </message>
    <message id="checkin-photos-menu">
        <location filename="../qml/CheckinDetailPage.qml" line="46"/>
        <source>Photos</source>
        <translation>Снимки</translation>
    </message>
    <message id="checkin-tips-menu">
        <location filename="../qml/CheckinDetailPage.qml" line="51"/>
        <source>Tips</source>
        <translation>Препоръки</translation>
    </message>
    <message id="checkin-listed-menu">
        <location filename="../qml/CheckinDetailPage.qml" line="56"/>
        <source>Listed</source>
        <translation>В списъци</translation>
    </message>
    <message id="checkin-specials">
        <location filename="../qml/CheckinDetailPage.qml" line="62"/>
        <source>Specials</source>
        <translation>Специални предложения</translation>
    </message>
    <message id="checkin-dislike-venue-menu">
        <location filename="../qml/CheckinDetailPage.qml" line="71"/>
        <source>Dislike</source>
        <translation>Не харесвам</translation>
    </message>
    <message id="checkin-like-venue-menu">
        <location filename="../qml/CheckinDetailPage.qml" line="73"/>
        <source>Like</source>
        <translation>Харесай</translation>
    </message>
    <message id="venue-checkin-accept">
        <location filename="../qml/CheckinDetailPage.qml" line="88"/>
        <source>Checkin</source>
        <translation>Регистрирай се</translation>
    </message>
    <message id="venue-checkin-comment">
        <location filename="../qml/CheckinDetailPage.qml" line="136"/>
        <source>Write your comment here.</source>
        <oldsource>Comment</oldsource>
        <translation>Напиши своя коментар тук</translation>
    </message>
    <message id="venue-checkin-share-to-facebook-button">
        <location filename="../qml/CheckinDetailPage.qml" line="142"/>
        <source>Share to Facebook</source>
        <oldsource>Share to facebook</oldsource>
        <translation>Сподели във Facebook</translation>
    </message>
    <message id="venue-checkin-share-to-twitter-button">
        <location filename="../qml/CheckinDetailPage.qml" line="148"/>
        <source>Share to Twitter</source>
        <oldsource>Share to twitter</oldsource>
        <translation>Сподели в Twitter</translation>
    </message>
    <message id="venue-checkin-show-on-map-button">
        <location filename="../qml/CheckinDetailPage.qml" line="153"/>
        <source>Show on Map</source>
        <translation>Покажи на картата</translation>
    </message>
    <message id="cover-loading">
        <location filename="../qml/CoverPage.qml" line="69"/>
        <source>Loading ...</source>
        <translation>Зареждане...</translation>
    </message>
    <message id="cover-no-checkins">
        <location filename="../qml/CoverPage.qml" line="80"/>
        <source>Nobody of your friends checked in yet</source>
        <oldsource>FIXME</oldsource>
        <translation>Никой от твоите приятели не е бил тук</translation>
    </message>
    <message id="n-notifications" numerus="yes">
        <location filename="../qml/Data.qml" line="503"/>
        <source>%n Notifications</source>
        <oldsource>%n Notification(s)</oldsource>
        <translation><numerusform>%n Известия</numerusform><numerusform>%n Известия</numerusform></translation>
    </message>
    <message id="error-not-authorized">
        <location filename="../qml/Data.qml" line="966"/>
        <source>Unauthorized</source>
        <oldsource>Not authorized</oldsource>
        <translation>Неоторизиран</translation>
    </message>
    <message id="error-connection-problem">
        <location filename="../qml/Data.qml" line="970"/>
        <source>Connection problem</source>
        <translation>Проблем с връзката</translation>
    </message>
    <message id="friends-title">
        <location filename="../qml/FriendsPage.qml" line="30"/>
        <source>Friends</source>
        <translation>Приятели</translation>
    </message>
    <message id="friends-empty">
        <location filename="../qml/FriendsPage.qml" line="36"/>
        <source>List of friends is empty</source>
        <translation>Списъкът с приятели е празен</translation>
    </message>
    <message id="friends-removing">
        <location filename="../qml/FriendsPage.qml" line="93"/>
        <source>Removing friend</source>
        <translation>Премахни приятел</translation>
    </message>
    <message id="friends-remove">
        <location filename="../qml/FriendsPage.qml" line="124"/>
        <source>Remove</source>
        <translation>Премахни</translation>
    </message>
    <message id="friends-add">
        <location filename="../qml/FriendsPage.qml" line="130"/>
        <source>Add</source>
        <translation>Добавяне</translation>
    </message>
    <message id="leaderboard-title">
        <location filename="../qml/LeaderboardPage.qml" line="25"/>
        <source>Leaderboard</source>
        <translation>Класиране</translation>
    </message>
    <message id="leaderboard-empty">
        <location filename="../qml/LeaderboardPage.qml" line="31"/>
        <source>Leaderboard is empty</source>
        <translation>Класирането е празно</translation>
    </message>
    <message id="leaderboard-n-checkins" numerus="yes">
        <location filename="../qml/CheckinResultPage.qml" line="240"/>
        <location filename="../qml/LeaderboardPage.qml" line="81"/>
        <source>%n checkins</source>
        <oldsource>%n checkin(s)</oldsource>
        <translation><numerusform>%n регистрации</numerusform><numerusform>%n регистрации</numerusform></translation>
    </message>
    <message id="list-detail-empty">
        <location filename="../qml/ListDetailPage.qml" line="32"/>
        <source>List contains no venues</source>
        <translation>Списъкът няма локации</translation>
    </message>
    <message id="lists-title">
        <location filename="../qml/ListsPage.qml" line="29"/>
        <source>Lists</source>
        <translation>Списъци</translation>
    </message>
    <message id="lists-empty">
        <location filename="../qml/ListsPage.qml" line="35"/>
        <source>No lists are available</source>
        <translation>Няма налични списъци</translation>
    </message>
    <message id="lists-new">
        <location filename="../qml/ListsPage.qml" line="44"/>
        <source>New</source>
        <translation>Нов</translation>
    </message>
    <message id="lists-edit">
        <location filename="../qml/ListsPage.qml" line="139"/>
        <source>Edit</source>
        <translation>Редактирай</translation>
    </message>
    <message id="lists-follow">
        <location filename="../qml/ListsPage.qml" line="145"/>
        <source>Follow</source>
        <translation>Следвай</translation>
    </message>
    <message id="lists-unfollow">
        <location filename="../qml/ListsPage.qml" line="152"/>
        <source>Unfollow</source>
        <translation>Не следвай</translation>
    </message>
    <message id="map-title">
        <location filename="../qml/MapPage.qml" line="20"/>
        <source>Map</source>
        <translation>Карта</translation>
    </message>
    <message id="mayorships-title">
        <location filename="../qml/MayorshipsPage.qml" line="27"/>
        <source>Mayorships</source>
        <translation>Кметсво</translation>
    </message>
    <message id="mayorships-empty">
        <location filename="../qml/MayorshipsPage.qml" line="33"/>
        <source>User hasn't got any mayorships yet</source>
        <oldsource>User hasn't got any mayorships yet!</oldsource>
        <translation>Нямате кметства все още</translation>
    </message>
    <message id="nearby-venues-title">
        <location filename="../qml/NearbyVenuesPage.qml" line="36"/>
        <source>Nearby Venues</source>
        <translation>Близки места</translation>
    </message>
    <message id="search-results-title">
        <location filename="../qml/NearbyVenuesPage.qml" line="38"/>
        <source>Search results</source>
        <translation>Резултати от търсенето</translation>
    </message>
    <message id="nearby-venues-my-profile-menu">
        <location filename="../qml/NearbyVenuesPage.qml" line="44"/>
        <source>My Profile</source>
        <translation>Моят профил</translation>
    </message>
    <message id="nearby-venues-recent-checkins-menu">
        <location filename="../qml/NearbyVenuesPage.qml" line="49"/>
        <source>Recent Checkins</source>
        <translation>Скорошни регистрации</translation>
    </message>
    <message id="nearby-venues-refresh-menu">
        <location filename="../qml/NearbyVenuesPage.qml" line="55"/>
        <source>Refresh</source>
        <translation>Опресни</translation>
    </message>
    <message id="nearby-venues-nearby-venues-menu">
        <location filename="../qml/NearbyVenuesPage.qml" line="57"/>
        <source>Nearby Venues</source>
        <translation>Места наблизо</translation>
    </message>
    <message id="nearby-venues-search-menu">
        <location filename="../qml/NearbyVenuesPage.qml" line="65"/>
        <source>Search</source>
        <translation>Търсене</translation>
    </message>
    <message id="nearby-venues-add">
        <location filename="../qml/NearbyVenuesPage.qml" line="70"/>
        <source>Add</source>
        <translation>Добаявне</translation>
    </message>
    <message id="nearby-venues-empty">
        <location filename="../qml/NearbyVenuesPage.qml" line="78"/>
        <source>There is no venue in nearby</source>
        <translation>Няма места наблизо</translation>
    </message>
    <message id="notifications-title">
        <location filename="../qml/NotificationsPage.qml" line="31"/>
        <source>Notifications</source>
        <translation>Известия</translation>
    </message>
    <message id="notifications-empty">
        <location filename="../qml/NotificationsPage.qml" line="38"/>
        <source>You have no notifications</source>
        <translation>Нямате известия</translation>
    </message>
    <message id="photos-title">
        <location filename="../qml/PhotosPage.qml" line="34"/>
        <source>Photos</source>
        <translation>Снимки</translation>
    </message>
    <message id="photos-empty">
        <location filename="../qml/PhotosPage.qml" line="41"/>
        <source>List of photos is empty</source>
        <translation>Няма снимки все още</translation>
    </message>
    <message id="image-status-ready">
        <location filename="../qml/PinchMap.qml" line="298"/>
        <source>Ready</source>
        <translation>Готово</translation>
    </message>
    <message id="image-status-not-set">
        <location filename="../qml/PinchMap.qml" line="300"/>
        <source>Not Set</source>
        <translation>Не е настроено</translation>
    </message>
    <message id="image-status-error">
        <location filename="../qml/PinchMap.qml" line="302"/>
        <source>Error</source>
        <translation>Грешка</translation>
    </message>
    <message id="image-status-loading">
        <location filename="../qml/PinchMap.qml" line="304"/>
        <source>Loading ...</source>
        <translation>Зареждане...</translation>
    </message>
    <message id="image-status-unknown">
        <location filename="../qml/PinchMap.qml" line="306"/>
        <source>Unknown</source>
        <translation>Неизвестна грешка</translation>
    </message>
    <message id="profile-my-profile-menu">
        <location filename="../qml/ProfilePage.qml" line="73"/>
        <source>My Profile</source>
        <translation>Моят профил</translation>
    </message>
    <message id="profile-recent-checkins-menu">
        <location filename="../qml/ProfilePage.qml" line="80"/>
        <source>Recent Checkins</source>
        <translation>Скорошни регистрации</translation>
    </message>
    <message id="profile-nearby-venues-menu">
        <location filename="../qml/ProfilePage.qml" line="86"/>
        <source>Nearby Venues</source>
        <translation>Места наблизо</translation>
    </message>
    <message id="profile-checkins">
        <location filename="../qml/ProfilePage.qml" line="185"/>
        <source>Checkins</source>
        <translation>Регистрации</translation>
    </message>
    <message id="profile-notifications">
        <location filename="../qml/ProfilePage.qml" line="212"/>
        <source>Notifications</source>
        <translation>Известия</translation>
    </message>
    <message id="profile-badges">
        <location filename="../qml/ProfilePage.qml" line="236"/>
        <source>Badges</source>
        <translation>Значки</translation>
    </message>
    <message id="profile-mayorships">
        <location filename="../qml/ProfilePage.qml" line="260"/>
        <source>Mayorships</source>
        <translation>Кметства</translation>
    </message>
    <message id="profile-tips">
        <location filename="../qml/ProfilePage.qml" line="283"/>
        <source>Tips</source>
        <translation>Препоръки</translation>
    </message>
    <message id="profile-friends">
        <location filename="../qml/ProfilePage.qml" line="306"/>
        <source>Friends</source>
        <translation>Приятели</translation>
    </message>
    <message id="profile-lists">
        <location filename="../qml/ProfilePage.qml" line="328"/>
        <source>Lists</source>
        <translation>Списъци</translation>
    </message>
    <message id="profile-photos">
        <location filename="../qml/ProfilePage.qml" line="351"/>
        <source>Photos</source>
        <translation>Снимки</translation>
    </message>
    <message id="tap-to-show">
        <location filename="../qml/harbour-foursail.qml" line="14"/>
        <source>Tap to show</source>
        <translation>Натисни за показване</translation>
    </message>
    <message id="recent-checkins-title">
        <location filename="../qml/RecentCheckinsPage.qml" line="31"/>
        <source>Recent Checkins</source>
        <translation>Скорошни регистрации</translation>
    </message>
    <message id="recent-checkins-empty">
        <location filename="../qml/RecentCheckinsPage.qml" line="37"/>
        <source>None of your friends checked in yet</source>
        <translation>Никой от приятелите ти не се е регистрирал</translation>
    </message>
    <message id="recent-checkins-my-profile-menu">
        <location filename="../qml/RecentCheckinsPage.qml" line="43"/>
        <source>My Profile</source>
        <translation>Моят профил</translation>
    </message>
    <message id="recent-checkins-nearby-venues-menu">
        <location filename="../qml/RecentCheckinsPage.qml" line="48"/>
        <source>Nearby Venues</source>
        <translation>Места наблизо</translation>
    </message>
    <message id="recent-checkins-refresh-menu">
        <location filename="../qml/RecentCheckinsPage.qml" line="53"/>
        <source>Refresh</source>
        <translation>Опресни</translation>
    </message>
    <message id="recent-checkins-like">
        <location filename="../qml/RecentCheckinsPage.qml" line="181"/>
        <source>Like checkin</source>
        <oldsource>Like</oldsource>
        <translation>Харесай</translation>
    </message>
    <message id="recent-checkins-friend-profile">
        <location filename="../qml/RecentCheckinsPage.qml" line="197"/>
        <source>Profile</source>
        <translation>Профил</translation>
    </message>
    <message id="recent-checkins-venue-detail">
        <location filename="../qml/RecentCheckinsPage.qml" line="206"/>
        <source>Venue</source>
        <oldsource>Venue detail</oldsource>
        <translation>Място</translation>
    </message>
    <message id="recent-checkins-dislike">
        <location filename="../qml/RecentCheckinsPage.qml" line="179"/>
        <source>Dislike checkin</source>
        <oldsource>Dislike</oldsource>
        <translation>Не харесвам</translation>
    </message>
    <message id="search-title">
        <location filename="../qml/SearchVenueDialog.qml" line="32"/>
        <source>Search</source>
        <translation>Търсене</translation>
    </message>
    <message id="search-venue-name">
        <location filename="../qml/SearchVenueDialog.qml" line="39"/>
        <source>Venue name</source>
        <translation>Име на мястото</translation>
    </message>
    <message id="history-title">
        <location filename="../qml/SelfCheckinsPage.qml" line="26"/>
        <source>History</source>
        <translation>История</translation>
    </message>
    <message id="history-empty">
        <location filename="../qml/SelfCheckinsPage.qml" line="33"/>
        <source>User didn't make check in yet</source>
        <translation>Нямате регистрации все още</translation>
    </message>
    <message id="tips-title">
        <location filename="../qml/TipsPage.qml" line="28"/>
        <source>Tips</source>
        <translation>Препоръки</translation>
    </message>
    <message id="tips-empty">
        <location filename="../qml/TipsPage.qml" line="35"/>
        <source>List of tips is empty</source>
        <translation>Списъкът с препоръки е празен</translation>
    </message>
    <message id="tips-dislike">
        <location filename="../qml/TipsPage.qml" line="144"/>
        <source>Dislike tip</source>
        <translation>Не харесвам</translation>
    </message>
    <message id="tips-like">
        <location filename="../qml/TipsPage.qml" line="146"/>
        <source>Like tip</source>
        <translation>Харесай</translation>
    </message>
    <message id="checkin-result-title">
        <location filename="../qml/CheckinResultPage.qml" line="46"/>
        <source>Checkin</source>
        <translation>Регистрирай се</translation>
    </message>
    <message id="checkin-result-section-header-specials">
        <location filename="../qml/CheckinResultPage.qml" line="60"/>
        <source>Specials</source>
        <translation>Специални предложения</translation>
    </message>
    <message id="checkin-result-section-header-badges">
        <location filename="../qml/CheckinResultPage.qml" line="78"/>
        <source>Badges</source>
        <translation>Значки</translation>
    </message>
    <message id="checkin-result-section-header-score">
        <location filename="../qml/CheckinResultPage.qml" line="134"/>
        <source>Score</source>
        <translation>Резултат</translation>
    </message>
    <message id="checkin-result-section-header-leaderboard">
        <location filename="../qml/CheckinResultPage.qml" line="188"/>
        <source>Leaderboard</source>
        <translation>Класиране</translation>
    </message>
</context>
</TS>


text:
@interface PodsDummy_Pods_WebSocketDemo : NSObject
@end
@implementation PodsDummy_Pods_WebSocketDemo
@end

redpajama_set_name: RedPajamaGithub


text:
#pragma once
#include <aws/elasticbeanstalk/ElasticBeanstalk_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Xml
{
  class XmlNode;
} // namespace Xml
} // namespace Utils
namespace ElasticBeanstalk
{
namespace Model
{

  /**
   *
A specification identifying an individual configuration option.

See
   * Also:
   AWS
   * API Reference

   */
  class AWS_ELASTICBEANSTALK_API OptionSpecification
  {
  public:
    OptionSpecification();
    OptionSpecification(const Aws::Utils::Xml::XmlNode& xmlNode);
    OptionSpecification& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

    void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
    void OutputToStream(Aws::OStream& oStream, const char* location) const;

    /**
     *
A unique resource name for a time-based scaling configuration option.

     */
    inline const Aws::String& GetResourceName() const{ return m_resourceName; }

    /**
     *
A unique resource name for a time-based scaling configuration option.

     */
    inline bool ResourceNameHasBeenSet() const { return m_resourceNameHasBeenSet; }

    /**
     *
A unique resource name for a time-based scaling configuration option.

     */
    inline void SetResourceName(const Aws::String& value) { m_resourceNameHasBeenSet = true; m_resourceName = value; }

    /**
     *
A unique resource name for a time-based scaling configuration option.

     */
    inline void SetResourceName(Aws::String&& value) { m_resourceNameHasBeenSet = true; m_resourceName = std::move(value); }

    /**
     *
A unique resource name for a time-based scaling configuration option.

     */
    inline void SetResourceName(const char* value) { m_resourceNameHasBeenSet = true; m_resourceName.assign(value); }

    /**
     *
A unique resource name for a time-based scaling configuration option.

     */
    inline OptionSpecification& WithResourceName(const Aws::String& value) { SetResourceName(value); return *this;}

    /**
     *
A unique resource name for a time-based scaling configuration option.

     */
    inline OptionSpecification& WithResourceName(Aws::String&& value) { SetResourceName(std::move(value)); return *this;}

    /**
     *
A unique resource name for a time-based scaling configuration option.

     */
    inline OptionSpecification& WithResourceName(const char* value) { SetResourceName(value); return *this;}

    /**
     *
A unique namespace identifying the option's associated AWS resource.

     */
    inline const Aws::String& GetNamespace() const{ return m_namespace; }

    /**
     *
A unique namespace identifying the option's associated AWS resource.

     */
    inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }

    /**
     *
A unique namespace identifying the option's associated AWS resource.

     */
    inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; }

    /**
     *
A unique namespace identifying the option's associated AWS resource.

     */
    inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); }

    /**
     *
A unique namespace identifying the option's associated AWS resource.

     */
    inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); }

    /**
     *
A unique namespace identifying the option's associated AWS resource.

     */
    inline OptionSpecification& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;}

    /**
     *
A unique namespace identifying the option's associated AWS resource.

     */
    inline OptionSpecification& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;}

    /**
     *
A unique namespace identifying the option's associated AWS resource.

     */
    inline OptionSpecification& WithNamespace(const char* value) { SetNamespace(value); return *this;}

    /**
     *
The name of the configuration option.

     */
    inline const Aws::String& GetOptionName() const{ return m_optionName; }

    /**
     *
The name of the configuration option.

     */
    inline bool OptionNameHasBeenSet() const { return m_optionNameHasBeenSet; }

    /**
     *
The name of the configuration option.

     */
    inline void SetOptionName(const Aws::String& value) { m_optionNameHasBeenSet = true; m_optionName = value; }

    /**
     *
The name of the configuration option.

     */
    inline void SetOptionName(Aws::String&& value) { m_optionNameHasBeenSet = true; m_optionName = std::move(value); }

    /**
     *
The name of the configuration option.

     */
    inline void SetOptionName(const char* value) { m_optionNameHasBeenSet = true; m_optionName.assign(value); }

    /**
     *
The name of the configuration option.

     */
    inline OptionSpecification& WithOptionName(const Aws::String& value) { SetOptionName(value); return *this;}

    /**
     *
The name of the configuration option.

     */
    inline OptionSpecification& WithOptionName(Aws::String&& value) { SetOptionName(std::move(value)); return *this;}

    /**
     *
The name of the configuration option.

     */
    inline OptionSpecification& WithOptionName(const char* value) { SetOptionName(value); return *this;}

  private:

    Aws::String m_resourceName;
    bool m_resourceNameHasBeenSet = false;

    Aws::String m_namespace;
    bool m_namespaceHasBeenSet = false;

    Aws::String m_optionName;
    bool m_optionNameHasBeenSet = false;
  };

} // namespace Model
} // namespace ElasticBeanstalk
} // namespace Aws


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

import java.io.ByteArrayInputStream;
import java.util.Collections;
import java.util.Map;
import java.util.List;
import java.util.regex.Pattern;

import com.amazonaws.AmazonClientException;
import com.amazonaws.Request;
import com.amazonaws.DefaultRequest;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.opsworks.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.BinaryUtils;
import com.amazonaws.util.StringUtils;
import com.amazonaws.util.IdempotentUtils;
import com.amazonaws.util.StringInputStream;
import com.amazonaws.protocol.json.*;

/**
 * CreateStackRequest Marshaller
 */
public class CreateStackRequestMarshaller implements
        Marshaller<Request<CreateStackRequest>, CreateStackRequest> {

    private final SdkJsonProtocolFactory protocolFactory;

    public CreateStackRequestMarshaller(SdkJsonProtocolFactory protocolFactory) {
        this.protocolFactory = protocolFactory;
    }

    public Request<CreateStackRequest> marshall(
            CreateStackRequest createStackRequest) {

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

        Request<CreateStackRequest> request = new DefaultRequest<CreateStackRequest>(
                createStackRequest, "AWSOpsWorks");
        request.addHeader("X-Amz-Target", "OpsWorks_20130218.CreateStack");

        request.setHttpMethod(HttpMethodName.POST);

        request.setResourcePath("");

        try {
            final StructuredJsonGenerator jsonGenerator = protocolFactory
                    .createGenerator();

            jsonGenerator.writeStartObject();

            if (createStackRequest.getName() != null) {
                jsonGenerator.writeFieldName("Name").writeValue(
                        createStackRequest.getName());
            }
            if (createStackRequest.getRegion() != null) {
                jsonGenerator.writeFieldName("Region").writeValue(
                        createStackRequest.getRegion());
            }
            if (createStackRequest.getVpcId() != null) {
                jsonGenerator.writeFieldName("VpcId").writeValue(
                        createStackRequest.getVpcId());
            }

            com.amazonaws.internal.SdkInternalMap<String, String> attributesMap = (com.amazonaws.internal.SdkInternalMap<String, String>) createStackRequest
                    .getAttributes();
            if (!attributesMap.isEmpty() || !attributesMap.isAutoConstruct()) {
                jsonGenerator.writeFieldName("Attributes");
                jsonGenerator.writeStartObject();

                for (Map.Entry<String, String> attributesMapValue : attributesMap
                        .entrySet()) {
                    if (attributesMapValue.getValue() != null) {
                        jsonGenerator.writeFieldName(attributesMapValue
                                .getKey());

                        jsonGenerator.writeValue(attributesMapValue.getValue());
                    }
                }
                jsonGenerator.writeEndObject();
            }
            if (createStackRequest.getServiceRoleArn() != null) {
                jsonGenerator.writeFieldName("ServiceRoleArn").writeValue(
                        createStackRequest.getServiceRoleArn());
            }
            if (createStackRequest.getDefaultInstanceProfileArn() != null) {
                jsonGenerator.writeFieldName("DefaultInstanceProfileArn")
                        .writeValue(
                                createStackRequest
                                        .getDefaultInstanceProfileArn());
            }
            if (createStackRequest.getDefaultOs() != null) {
                jsonGenerator.writeFieldName("DefaultOs").writeValue(
                        createStackRequest.getDefaultOs());
            }
            if (createStackRequest.getHostnameTheme() != null) {
                jsonGenerator.writeFieldName("HostnameTheme").writeValue(
                        createStackRequest.getHostnameTheme());
            }
            if (createStackRequest.getDefaultAvailabilityZone() != null) {
                jsonGenerator
                        .writeFieldName("DefaultAvailabilityZone")
                        .writeValue(
                                createStackRequest.getDefaultAvailabilityZone());
            }
            if (createStackRequest.getDefaultSubnetId() != null) {
                jsonGenerator.writeFieldName("DefaultSubnetId").writeValue(
                        createStackRequest.getDefaultSubnetId());
            }
            if (createStackRequest.getCustomJson() != null) {
                jsonGenerator.writeFieldName("CustomJson").writeValue(
                        createStackRequest.getCustomJson());
            }
            if (createStackRequest.getConfigurationManager() != null) {
                jsonGenerator.writeFieldName("ConfigurationManager");
                StackConfigurationManagerJsonMarshaller.getInstance().marshall(
                        createStackRequest.getConfigurationManager(),
                        jsonGenerator);
            }
            if (createStackRequest.getChefConfiguration() != null) {
                jsonGenerator.writeFieldName("ChefConfiguration");
                ChefConfigurationJsonMarshaller.getInstance().marshall(
                        createStackRequest.getChefConfiguration(),
                        jsonGenerator);
            }
            if (createStackRequest.getUseCustomCookbooks() != null) {
                jsonGenerator.writeFieldName("UseCustomCookbooks").writeValue(
                        createStackRequest.getUseCustomCookbooks());
            }
            if (createStackRequest.getUseOpsworksSecurityGroups() != null) {
                jsonGenerator.writeFieldName("UseOpsworksSecurityGroups")
                        .writeValue(
                                createStackRequest
                                        .getUseOpsworksSecurityGroups());
            }
            if (createStackRequest.getCustomCookbooksSource() != null) {
                jsonGenerator.writeFieldName("CustomCookbooksSource");
                SourceJsonMarshaller.getInstance().marshall(
                        createStackRequest.getCustomCookbooksSource(),
                        jsonGenerator);
            }
            if (createStackRequest.getDefaultSshKeyName() != null) {
                jsonGenerator.writeFieldName("DefaultSshKeyName").writeValue(
                        createStackRequest.getDefaultSshKeyName());
            }
            if (createStackRequest.getDefaultRootDeviceType() != null) {
                jsonGenerator.writeFieldName("DefaultRootDeviceType")
                        .writeValue(
                                createStackRequest.getDefaultRootDeviceType());
            }
            if (createStackRequest.getAgentVersion() != null) {
                jsonGenerator.writeFieldName("AgentVersion").writeValue(
                        createStackRequest.getAgentVersion());
            }

            jsonGenerator.writeEndObject();

            byte[] content = jsonGenerator.getBytes();
            request.setContent(new ByteArrayInputStream(content));
            request.addHeader("Content-Length",
                    Integer.toString(content.length));
            request.addHeader("Content-Type", jsonGenerator.getContentType());
        } catch (Throwable t) {
            throw new AmazonClientException(
                    "Unable to marshall request to JSON: " + t.getMessage(), t);
        }

        return request;
    }

}


text:
/**************************************************************/
/*                                                            */
/*      Copyright Mentor Graphics Corporation 2006 - 2015     */
/*                  All Rights Reserved                       */
/*                                                            */
/*       THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY      */
/*         INFORMATION WHICH IS THE PROPERTY OF MENTOR        */
/*         GRAPHICS CORPORATION OR ITS LICENSORS AND IS       */
/*                 SUBJECT TO LICENSE TERMS.                  */
/*                                                            */
/**************************************************************/

#pragma once

#include "eth_model.h"

class eth_t: public eth_t_base {

public:
  eth_t(sc_core::sc_module_name module_name, long simulation,
                  esl::sc_sim::user_model::Arbiter* arbiter = 0)
    : eth_t_base(module_name, simulation, arbiter) {

  }

      /* policies callbacks */

  // The following callback is called for a target port. Note that the wait_states, power and
  // influence_time are already computed using a learned policy (if any) or your defined
  // delay and/or power policy.
  // If under certain conditions you want to overwrite the above values, you have to overload
  // this callback in your derived class.

  virtual void evaluate_delay_policy(mb::mb_delay_request& request) {}
protected:

  // The following callback is called for an initiator port. Note that the latency, power and
  // influence_time are already computed using a learned policy (if any) or your defined
  // split and/or power policy.
  // If under certain conditions you want to overwrite the above values, you have to overload
  // this callback in your derived class.

  virtual void evaluate_split_policy(mb::mb_split_request& request) {}

  /* called when "params.m_phase" is sent through the "port_index" port */
  virtual void sent_phase_cb(unsigned port_index,
                             esl::sc_sim::mb_cb_params& params) {}

  /* called when "params.m_phase" is received by the "port_index" port */
  virtual void received_phase_cb(unsigned port_index,
                                 esl::sc_sim::mb_cb_params& params) {}

  /* called when "params.m_phase" is sent through the "master_port_index".
     "params.m_t" is the time (in ps) between the current time
     and the time "params.m_phase" was received by the "slave_port_index */
  virtual void forward_arbitration_cb(unsigned master_port_index,
                                        unsigned slave_port_index,
                                      esl::sc_sim::mb_cb_params& params) {}
  /* called when "params.m_phase" is sent through the "slave_port_index".
     "params.m_t" is the time (in ps) between the current time
     and the time "params.m_phase" was received by the "master_port_index */
  virtual void backward_arbitration_cb(unsigned slave_port_index,
                                       unsigned master_port_index,
                                       esl::sc_sim::mb_cb_params& params) {}

  // The following function is called whenever a pipeline policy is detected on
  // the current initiator port transaction. If you want to overwrite the latency parameter, you
  // have to overload these functions in your derived class
  virtual void evaluate_pipeline_policy(mb::mb_request& cause_request, mb::mb_effect_request& effect_request) {}

  // The following callbacks are called whenever there is a transaction start or end in the port

  virtual void accept_generic_READ
    (long port_index,
     sc_dt::int64 time,
     long& burst_size,
     sc_dt::uint64 ADDR,
     sc_dt::uint64 rDATA,
     sc_dt::uint64& PRIORITY,
     sc_dt::uint64& BURST,
     sc_dt::uint64 SIZE,
     sc_dt::uint64& STATUS) {}
  virtual void end_generic_READ
    (long port_index,
     sc_dt::uint64 time,
     long& burst_size,
     sc_dt::uint64 ADDR,
     sc_dt::uint64 rDATA,
     sc_dt::uint64& PRIORITY,
     sc_dt::uint64& BURST,
     sc_dt::uint64 SIZE,
     sc_dt::uint64& STATUS) {}

  virtual void accept_generic_WRITE
    (long port_index,
     sc_dt::int64 time,
     long& burst_size,
     sc_dt::uint64 ADDR,
     sc_dt::uint64 wDATA,
     sc_dt::uint64& PRIORITY,
     sc_dt::uint64& BURST,
     sc_dt::uint64 SIZE,
     sc_dt::uint64& STATUS) {}
  virtual void end_generic_WRITE
    (long port_index,
     sc_dt::uint64 time,
     long& burst_size,
     sc_dt::uint64 ADDR,
     sc_dt::uint64 wDATA,
     sc_dt::uint64& PRIORITY,
     sc_dt::uint64& BURST,
     sc_dt::uint64 SIZE,
     sc_dt::uint64& STATUS) {}

};


text:
package de.halfreal.spezi.gdx.framework;

import com.badlogic.gdx.graphics.Color;

/**
 * naming convention: No color name, only functional names
 *
 * @author Simon Joecks halfreal.de (c)
 *
 */
public class ColorHelper {

	public static final Color BACKGROUND_PREFIGHT = new Color(45 / 255f,
			127 / 255f, 255 / 255f, 1);
	public static final Color DIV_LINE_ELEMNTS = new Color(50f / 255f,
			255f / 255f, 164f / 255f, 1);
	public static final Color ENEMY = new Color(255 / 255f, 50 / 255f,
			226 / 255f, 1);
	public static final Color GAME_IDLE = new Color(0.5f, 0.5f, 0.5f, 0.5f);
	public static final Color MAP_DESCRIPTION = new Color(56 / 255f,
			160 / 255f, 37 / 255f, 1);
	public static final Color ME = new Color(50 / 255f, 255 / 255f, 165 / 255f,
			1);
	public static final Color TRANSLUCENT_BACKGROUND = new Color(1, 1, 1, 0.5f);
	public static final Color TRANSPARENT = new Color(0, 0, 0, 0);
}


text:
package checker_test

import (
	"context"
	"io"
	"io/ioutil"
	"math/rand"
	"os"
	"path/filepath"
	"sort"
	"strconv"
	"sync"
	"testing"
	"time"

	"github.com/restic/restic/internal/archiver"
	"github.com/restic/restic/internal/checker"
	"github.com/restic/restic/internal/errors"
	"github.com/restic/restic/internal/hashing"
	"github.com/restic/restic/internal/repository"
	"github.com/restic/restic/internal/restic"
	"github.com/restic/restic/internal/test"
	"golang.org/x/sync/errgroup"
)

var checkerTestData = filepath.Join("testdata", "checker-test-repo.tar.gz")

func collectErrors(ctx context.Context, f func(context.Context, chan<- error)) (errs []error) {
	ctx, cancel := context.WithCancel(ctx)
	defer cancel()

	errChan := make(chan error)

	go f(ctx, errChan)

	for err := range errChan {
		errs = append(errs, err)
	}

	return errs
}

func checkPacks(chkr *checker.Checker) []error {
	return collectErrors(context.TODO(), chkr.Packs)
}

func checkStruct(chkr *checker.Checker) []error {
	err := chkr.LoadSnapshots(context.TODO())
	if err != nil {
		return []error{err}
	}
	return collectErrors(context.TODO(), func(ctx context.Context, errChan chan<- error) {
		chkr.Structure(ctx, nil, errChan)
	})
}

func checkData(chkr *checker.Checker) []error {
	return collectErrors(
		context.TODO(),
		func(ctx context.Context, errCh chan<- error) {
			chkr.ReadData(ctx, errCh)
		},
	)
}

func assertOnlyMixedPackHints(t *testing.T, hints []error) {
	for _, err := range hints {
		if _, ok := err.(*checker.ErrMixedPack); !ok {
			t.Fatalf("expected mixed pack hint, got %v", err)
		}
	}
}

func TestCheckRepo(t *testing.T) {
	repodir, cleanup := test.Env(t, checkerTestData)
	defer cleanup()

	repo := repository.TestOpenLocal(t, repodir)

	chkr := checker.New(repo, false)
	hints, errs := chkr.LoadIndex(context.TODO())
	if len(errs) > 0 {
		t.Fatalf("expected no errors, got %v: %v", len(errs), errs)
	}
	assertOnlyMixedPackHints(t, hints)
	if len(hints) == 0 {
		t.Fatal("expected mixed pack warnings, got none")
	}

	test.OKs(t, checkPacks(chkr))
	test.OKs(t, checkStruct(chkr))
}

func TestMissingPack(t *testing.T) {
	repodir, cleanup := test.Env(t, checkerTestData)
	defer cleanup()

	repo := repository.TestOpenLocal(t, repodir)

	packHandle := restic.Handle{
		Type: restic.PackFile,
		Name: "657f7fb64f6a854fff6fe9279998ee09034901eded4e6db9bcee0e59745bbce6",
	}
	test.OK(t, repo.Backend().Remove(context.TODO(), packHandle))

	chkr := checker.New(repo, false)
	hints, errs := chkr.LoadIndex(context.TODO())
	if len(errs) > 0 {
		t.Fatalf("expected no errors, got %v: %v", len(errs), errs)
	}
	assertOnlyMixedPackHints(t, hints)

	errs = checkPacks(chkr)

	test.Assert(t, len(errs) == 1,
		"expected exactly one error, got %v", len(errs))

	if err, ok := errs[0].(*checker.PackError); ok {
		test.Equals(t, packHandle.Name, err.ID.String())
	} else {
		t.Errorf("expected error returned by checker.Packs() to be PackError, got %v", err)
	}
}

func TestUnreferencedPack(t *testing.T) {
	repodir, cleanup := test.Env(t, checkerTestData)
	defer cleanup()

	repo := repository.TestOpenLocal(t, repodir)

	// index 3f1a only references pack 60e0
	packID := "60e0438dcb978ec6860cc1f8c43da648170ee9129af8f650f876bad19f8f788e"
	indexHandle := restic.Handle{
		Type: restic.IndexFile,
		Name: "3f1abfcb79c6f7d0a3be517d2c83c8562fba64ef2c8e9a3544b4edaf8b5e3b44",
	}
	test.OK(t, repo.Backend().Remove(context.TODO(), indexHandle))

	chkr := checker.New(repo, false)
	hints, errs := chkr.LoadIndex(context.TODO())
	if len(errs) > 0 {
		t.Fatalf("expected no errors, got %v: %v", len(errs), errs)
	}
	assertOnlyMixedPackHints(t, hints)

	errs = checkPacks(chkr)

	test.Assert(t, len(errs) == 1,
		"expected exactly one error, got %v", len(errs))

	if err, ok := errs[0].(*checker.PackError); ok {
		test.Equals(t, packID, err.ID.String())
	} else {
		t.Errorf("expected error returned by checker.Packs() to be PackError, got %v", err)
	}
}

func TestUnreferencedBlobs(t *testing.T) {
	repodir, cleanup := test.Env(t, checkerTestData)
	defer cleanup()

	repo := repository.TestOpenLocal(t, repodir)

	snapshotHandle := restic.Handle{
		Type: restic.SnapshotFile,
		Name: "51d249d28815200d59e4be7b3f21a157b864dc343353df9d8e498220c2499b02",
	}
	test.OK(t, repo.Backend().Remove(context.TODO(), snapshotHandle))

	unusedBlobsBySnapshot := restic.BlobHandles{
		restic.TestParseHandle("58c748bbe2929fdf30c73262bd8313fe828f8925b05d1d4a87fe109082acb849", restic.DataBlob),
		restic.TestParseHandle("988a272ab9768182abfd1fe7d7a7b68967825f0b861d3b36156795832c772235", restic.DataBlob),
		restic.TestParseHandle("c01952de4d91da1b1b80bc6e06eaa4ec21523f4853b69dc8231708b9b7ec62d8", restic.TreeBlob),
		restic.TestParseHandle("bec3a53d7dc737f9a9bee68b107ec9e8ad722019f649b34d474b9982c3a3fec7", restic.TreeBlob),
		restic.TestParseHandle("2a6f01e5e92d8343c4c6b78b51c5a4dc9c39d42c04e26088c7614b13d8d0559d", restic.TreeBlob),
		restic.TestParseHandle("18b51b327df9391732ba7aaf841a4885f350d8a557b2da8352c9acf8898e3f10", restic.DataBlob),
	}

	sort.Sort(unusedBlobsBySnapshot)

	chkr := checker.New(repo, true)
	hints, errs := chkr.LoadIndex(context.TODO())
	if len(errs) > 0 {
		t.Fatalf("expected no errors, got %v: %v", len(errs), errs)
	}
	assertOnlyMixedPackHints(t, hints)

	test.OKs(t, checkPacks(chkr))
	test.OKs(t, checkStruct(chkr))

	blobs := chkr.UnusedBlobs(context.TODO())
	sort.Sort(blobs)

	test.Equals(t, unusedBlobsBySnapshot, blobs)
}

func TestModifiedIndex(t *testing.T) {
	repodir, cleanup := test.Env(t, checkerTestData)
	defer cleanup()

	repo := repository.TestOpenLocal(t, repodir)

	done := make(chan struct{})
	defer close(done)

	h := restic.Handle{
		Type: restic.IndexFile,
		Name: "90f838b4ac28735fda8644fe6a08dbc742e57aaf81b30977b4fefa357010eafd",
	}

	tmpfile, err := ioutil.TempFile("", "restic-test-mod-index-")
	if err != nil {
		t.Fatal(err)
	}
	defer func() {
		err := tmpfile.Close()
		if err != nil {
			t.Fatal(err)
		}

		err = os.Remove(tmpfile.Name())
		if err != nil {
			t.Fatal(err)
		}
	}()
	wr := io.Writer(tmpfile)
	var hw *hashing.Writer
	if repo.Backend().Hasher() != nil {
		hw = hashing.NewWriter(wr, repo.Backend().Hasher())
		wr = hw
	}

	// read the file from the backend
	err = repo.Backend().Load(context.TODO(), h, 0, 0, func(rd io.Reader) error {
		_, err := io.Copy(wr, rd)
		return err
	})
	test.OK(t, err)

	// save the index again with a modified name so that the hash doesn't match
	// the content any more
	h2 := restic.Handle{
		Type: restic.IndexFile,
		Name: "80f838b4ac28735fda8644fe6a08dbc742e57aaf81b30977b4fefa357010eafd",
	}

	var hash []byte
	if hw != nil {
		hash = hw.Sum(nil)
	}
	rd, err := restic.NewFileReader(tmpfile, hash)
	if err != nil {
		t.Fatal(err)
	}

	err = repo.Backend().Save(context.TODO(), h2, rd)
	if err != nil {
		t.Fatal(err)
	}

	chkr := checker.New(repo, false)
	hints, errs := chkr.LoadIndex(context.TODO())
	if len(errs) == 0 {
		t.Fatalf("expected errors not found")
	}

	for _, err := range errs {
		t.Logf("found expected error %v", err)
	}

	assertOnlyMixedPackHints(t, hints)
}

var checkerDuplicateIndexTestData = filepath.Join("testdata", "duplicate-packs-in-index-test-repo.tar.gz")

func TestDuplicatePacksInIndex(t *testing.T) {
	repodir, cleanup := test.Env(t, checkerDuplicateIndexTestData)
	defer cleanup()

	repo := repository.TestOpenLocal(t, repodir)

	chkr := checker.New(repo, false)
	hints, errs := chkr.LoadIndex(context.TODO())
	if len(hints) == 0 {
		t.Fatalf("did not get expected checker hints for duplicate packs in indexes")
	}

	found := false
	for _, hint := range hints {
		if _, ok := hint.(*checker.ErrDuplicatePacks); ok {
			found = true
		} else {
			t.Errorf("got unexpected hint: %v", hint)
		}
	}

	if !found {
		t.Fatalf("did not find hint ErrDuplicatePacks")
	}

	if len(errs) > 0 {
		t.Errorf("expected no errors, got %v: %v", len(errs), errs)
	}
}

// errorBackend randomly modifies data after reading.
type errorBackend struct {
	restic.Backend
	ProduceErrors bool
}

func (b errorBackend) Load(ctx context.Context, h restic.Handle, length int, offset int64, consumer func(rd io.Reader) error) error {
	return b.Backend.Load(ctx, h, length, offset, func(rd io.Reader) error {
		if b.ProduceErrors {
			return consumer(errorReadCloser{rd})
		}
		return consumer(rd)
	})
}

type errorReadCloser struct {
	io.Reader
}

func (erd errorReadCloser) Read(p []byte) (int, error) {
	n, err := erd.Reader.Read(p)
	if n > 0 {
		induceError(p[:n])
	}
	return n, err
}

// induceError flips a bit in the slice.
func induceError(data []byte) {
	if rand.Float32() < 0.2 {
		return
	}

	pos := rand.Intn(len(data))
	data[pos] ^= 1
}

func TestCheckerModifiedData(t *testing.T) {
	repo, cleanup := repository.TestRepository(t)
	defer cleanup()

	sn := archiver.TestSnapshot(t, repo, ".", nil)
	t.Logf("archived as %v", sn.ID().Str())

	beError := &errorBackend{Backend: repo.Backend()}
	checkRepo, err := repository.New(beError, repository.Options{})
	test.OK(t, err)
	test.OK(t, checkRepo.SearchKey(context.TODO(), test.TestPassword, 5, ""))

	chkr := checker.New(checkRepo, false)

	hints, errs := chkr.LoadIndex(context.TODO())
	if len(errs) > 0 {
		t.Fatalf("expected no errors, got %v: %v", len(errs), errs)
	}

	if len(hints) > 0 {
		t.Errorf("expected no hints, got %v: %v", len(hints), hints)
	}

	beError.ProduceErrors = true
	errFound := false
	for _, err := range checkPacks(chkr) {
		t.Logf("pack error: %v", err)
	}

	for _, err := range checkStruct(chkr) {
		t.Logf("struct error: %v", err)
	}

	for _, err := range checkData(chkr) {
		t.Logf("data error: %v", err)
		errFound = true
	}

	if !errFound {
		t.Fatal("no error found, checker is broken")
	}
}

// loadTreesOnceRepository allows each tree to be loaded only once
type loadTreesOnceRepository struct {
	restic.Repository
	loadedTrees   restic.IDSet
	mutex         sync.Mutex
	DuplicateTree bool
}

func (r *loadTreesOnceRepository) LoadTree(ctx context.Context, id restic.ID) (*restic.Tree, error) {
	r.mutex.Lock()
	defer r.mutex.Unlock()

	if r.loadedTrees.Has(id) {
		// additionally store error to ensure that it cannot be swallowed
		r.DuplicateTree = true
		return nil, errors.Errorf("trying to load tree with id %v twice", id)
	}
	r.loadedTrees.Insert(id)
	return restic.LoadTree(ctx, r.Repository, id)
}

func TestCheckerNoDuplicateTreeDecodes(t *testing.T) {
	repodir, cleanup := test.Env(t, checkerTestData)
	defer cleanup()

	repo := repository.TestOpenLocal(t, repodir)
	checkRepo := &loadTreesOnceRepository{
		Repository:  repo,
		loadedTrees: restic.NewIDSet(),
	}

	chkr := checker.New(checkRepo, false)
	hints, errs := chkr.LoadIndex(context.TODO())
	if len(errs) > 0 {
		t.Fatalf("expected no errors, got %v: %v", len(errs), errs)
	}
	assertOnlyMixedPackHints(t, hints)

	test.OKs(t, checkPacks(chkr))
	test.OKs(t, checkStruct(chkr))
	test.Assert(t, !checkRepo.DuplicateTree, "detected duplicate tree loading")
}

// delayRepository delays read of a specific handle.
type delayRepository struct {
	restic.Repository
	DelayTree      restic.ID
	UnblockChannel chan struct{}
	Unblocker      sync.Once
}

func (r *delayRepository) LoadTree(ctx context.Context, id restic.ID) (*restic.Tree, error) {
	if id == r.DelayTree {
		<-r.UnblockChannel
	}
	return restic.LoadTree(ctx, r.Repository, id)
}

func (r *delayRepository) LookupBlobSize(id restic.ID, t restic.BlobType) (uint, bool) {
	if id == r.DelayTree && t == restic.DataBlob {
		r.Unblock()
	}
	return r.Repository.LookupBlobSize(id, t)
}

func (r *delayRepository) Unblock() {
	r.Unblocker.Do(func() {
		close(r.UnblockChannel)
	})
}

func TestCheckerBlobTypeConfusion(t *testing.T) {
	ctx, cancel := context.WithTimeout(context.Background(), time.Second)
	defer cancel()

	repo, cleanup := repository.TestRepository(t)
	defer cleanup()

	damagedNode := &restic.Node{
		Name:    "damaged",
		Type:    "file",
		Mode:    0644,
		Size:    42,
		Content: restic.IDs{restic.TestParseID("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef")},
	}
	damagedTree := &restic.Tree{
		Nodes: []*restic.Node{damagedNode},
	}

	wg, wgCtx := errgroup.WithContext(ctx)
	repo.StartPackUploader(wgCtx, wg)
	id, err := restic.SaveTree(ctx, repo, damagedTree)
	test.OK(t, repo.Flush(ctx))
	test.OK(t, err)

	buf, err := repo.LoadBlob(ctx, restic.TreeBlob, id, nil)
	test.OK(t, err)

	wg, wgCtx = errgroup.WithContext(ctx)
	repo.StartPackUploader(wgCtx, wg)
	_, _, _, err = repo.SaveBlob(ctx, restic.DataBlob, buf, id, false)
	test.OK(t, err)

	malNode := &restic.Node{
		Name:    "aaaaa",
		Type:    "file",
		Mode:    0644,
		Size:    uint64(len(buf)),
		Content: restic.IDs{id},
	}
	dirNode := &restic.Node{
		Name:    "bbbbb",
		Type:    "dir",
		Mode:    0755,
		Subtree: &id,
	}

	rootTree := &restic.Tree{
		Nodes: []*restic.Node{malNode, dirNode},
	}

	rootID, err := restic.SaveTree(ctx, repo, rootTree)
	test.OK(t, err)

	test.OK(t, repo.Flush(ctx))

	snapshot, err := restic.NewSnapshot([]string{"/damaged"}, []string{"test"}, "foo", time.Now())
	test.OK(t, err)

	snapshot.Tree = &rootID

	snapID, err := restic.SaveSnapshot(ctx, repo, snapshot)
	test.OK(t, err)

	t.Logf("saved snapshot %v", snapID.Str())

	delayRepo := &delayRepository{
		Repository:     repo,
		DelayTree:      id,
		UnblockChannel: make(chan struct{}),
	}

	chkr := checker.New(delayRepo, false)

	go func() {
		<-ctx.Done()
		delayRepo.Unblock()
	}()

	hints, errs := chkr.LoadIndex(ctx)
	if len(errs) > 0 {
		t.Fatalf("expected no errors, got %v: %v", len(errs), errs)
	}

	if len(hints) > 0 {
		t.Errorf("expected no hints, got %v: %v", len(hints), hints)
	}

	errFound := false

	for _, err := range checkStruct(chkr) {
		t.Logf("struct error: %v", err)
		errFound = true
	}

	test.OK(t, ctx.Err())

	if !errFound {
		t.Fatal("no error found, checker is broken")
	}
}

func loadBenchRepository(t *testing.B) (*checker.Checker, restic.Repository, func()) {
	repodir, cleanup := test.Env(t, checkerTestData)

	repo := repository.TestOpenLocal(t, repodir)

	chkr := checker.New(repo, false)
	hints, errs := chkr.LoadIndex(context.TODO())
	if len(errs) > 0 {
		defer cleanup()
		t.Fatalf("expected no errors, got %v: %v", len(errs), errs)
	}

	for _, err := range hints {
		if _, ok := err.(*checker.ErrMixedPack); !ok {
			t.Fatalf("expected mixed pack hint, got %v", err)
		}
	}
	return chkr, repo, cleanup
}

func BenchmarkChecker(t *testing.B) {
	chkr, _, cleanup := loadBenchRepository(t)
	defer cleanup()

	t.ResetTimer()

	for i := 0; i < t.N; i++ {
		test.OKs(t, checkPacks(chkr))
		test.OKs(t, checkStruct(chkr))
		test.OKs(t, checkData(chkr))
	}
}

func benchmarkSnapshotScaling(t *testing.B, newSnapshots int) {
	chkr, repo, cleanup := loadBenchRepository(t)
	defer cleanup()

	snID := restic.TestParseID("51d249d28815200d59e4be7b3f21a157b864dc343353df9d8e498220c2499b02")
	sn2, err := restic.LoadSnapshot(context.TODO(), repo, snID)
	if err != nil {
		t.Fatal(err)
	}

	treeID := sn2.Tree

	for i := 0; i < newSnapshots; i++ {
		sn, err := restic.NewSnapshot([]string{"test" + strconv.Itoa(i)}, nil, "", time.Now())
		if err != nil {
			t.Fatal(err)
		}
		sn.Tree = treeID

		_, err = restic.SaveSnapshot(context.TODO(), repo, sn)
		if err != nil {
			t.Fatal(err)
		}
	}

	t.ResetTimer()

	for i := 0; i < t.N; i++ {
		test.OKs(t, checkPacks(chkr))
		test.OKs(t, checkStruct(chkr))
		test.OKs(t, checkData(chkr))
	}
}

func BenchmarkCheckerSnapshotScaling(b *testing.B) {
	counts := []int{50, 100, 200}
	for _, count := range counts {
		count := count
		b.Run(strconv.Itoa(count), func(b *testing.B) {
			benchmarkSnapshotScaling(b, count)
		})
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2013 Red Hat, Inc. and/or its affiliates.
  ~
  ~ 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.
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.kie.workbench.screens</groupId>
    <artifactId>kie-wb-common-java-editor</artifactId>
    <version>6.5.0.csc-SNAPSHOT</version>
  </parent>

  <artifactId>kie-wb-common-java-editor-client</artifactId>

  <name>Kie Workbench - Common - Java Editor Client</name>
  <description>Kie Workbench - Common - Java Editor Client</description>

  <dependencies>

    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-widgets-commons</artifactId>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-backend-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-client-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-workbench-client</artifactId>
    </dependency>

    <dependency>
      <groupId>org.kie.workbench.screens</groupId>
      <artifactId>kie-wb-common-java-editor-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-commons-editor-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-commons-editor-client</artifactId>
    </dependency>

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-workbench-processors</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- GWT and GWT Extensions -->
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.kie.workbench.widgets</groupId>
      <artifactId>kie-wb-common-ui</artifactId>
    </dependency>

    <dependency>
      <groupId>org.kie.workbench.widgets</groupId>
      <artifactId>kie-wb-config-resource-widget</artifactId>
    </dependency>

    <dependency>
      <groupId>org.kie.workbench.widgets</groupId>
      <artifactId>kie-wb-metadata-widget</artifactId>
    </dependency>

  </dependencies>

</project>


text:
<?php
/**
 * AnswerForm форма для ответа на сообщение из панели управления
 *
 * @category YupeController
 * @package  yupe.modules.feedback.models
 * @author   YupeTeam <team@yupe.ru>
 * @license  BSD http://ru.wikipedia.org/wiki/%D0%9B%D0%B8%D1%86%D0%B5%D0%BD%D0%B7%D0%B8%D1%8F_BSD
 * @link     http://yupe.ru
 *
 **/
class AnswerForm extends CFormModel
{
    public $answer;
    public $is_faq;
    public $email;

    public function rules()
    {
        return array(
            array('answer', 'required'),
            array('is_faq', 'in', 'range' => array(0, 1)),
        );
    }

    public function attributeLabels()
    {
        return array(
            'answer' => Yii::t('FeedbackModule.feedback', 'Reply'),
            'is_faq' => Yii::t('FeedbackModule.feedback', 'In FAQ'),
        );
    }
}


text:
package net.oschina.app.ui;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Display;
import android.view.Gravity;
import android.view.View;
import android.view.WindowManager;

import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.bean.ShareType;
import com.umeng.socialize.controller.UMServiceFactory;
import com.umeng.socialize.controller.UMSocialService;
import com.umeng.socialize.controller.listener.SocializeListeners;
import com.umeng.socialize.exception.SocializeException;
import com.umeng.socialize.media.UMImage;
import com.umeng.socialize.sso.SinaSsoHandler;
import com.umeng.socialize.sso.UMQQSsoHandler;
import com.umeng.socialize.utils.OauthHelper;
import com.umeng.socialize.weixin.controller.UMWXHandler;
import com.umeng.socialize.weixin.media.CircleShareContent;
import com.umeng.socialize.weixin.media.WeiXinShareContent;

import net.oschina.app.AppContext;
import net.oschina.app.R;
import net.oschina.app.bean.Constants;
import net.oschina.app.ui.dialog.CommonDialog;
import net.oschina.app.util.TDevice;

/**
 * 分享界面dialog
 *
 * @author kymjs
 */
public class ShareDialog extends CommonDialog implements
        android.view.View.OnClickListener {

    private Context context;
    private String title;
    private String content;
    private String link;

    final UMSocialService mController = UMServiceFactory
            .getUMSocialService("com.umeng.share");

    private ShareDialog(Context context, boolean flag, OnCancelListener listener) {
        super(context, flag, listener);
        this.context = context;
    }

    @SuppressLint("InflateParams")
    private ShareDialog(Context context, int defStyle) {
        super(context, defStyle);
        this.context = context;
        View shareView = getLayoutInflater().inflate(
                R.layout.dialog_cotent_share, null);
        shareView.findViewById(R.id.ly_share_qq).setOnClickListener(this);
        shareView.findViewById(R.id.ly_share_copy_link)
                .setOnClickListener(this);
        shareView.findViewById(R.id.ly_share_more_option).setOnClickListener(
                this);
        shareView.findViewById(R.id.ly_share_sina_weibo).setOnClickListener(
                this);
        shareView.findViewById(R.id.ly_share_weichat).setOnClickListener(this);
        shareView.findViewById(R.id.ly_share_weichat_circle)
                .setOnClickListener(this);
        setContent(shareView, 0);
    }

    public ShareDialog(Context context) {
        this(context, R.style.dialog_bottom);
    }

    @SuppressWarnings("deprecation")
    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        getWindow().setGravity(Gravity.BOTTOM);

        WindowManager m = getWindow().getWindowManager();
        Display d = m.getDefaultDisplay();
        WindowManager.LayoutParams p = getWindow().getAttributes();
        p.width = d.getWidth();
        getWindow().setAttributes(p);
    }

    // 设置需要分享的内容
    public void setShareInfo(String title, String content, String link) {
        this.title = title;
        this.content = content;
        this.link = link;
    }

    @Override
    public void onClick(View v) {
        if (!checkCanShare()) {
            AppContext.showToast("内容加载中,请稍候...");
            return;
        }
        switch (v.getId()) {
            case R.id.ly_share_weichat_circle:
                shareToWeiChatCircle();
                break;
            case R.id.ly_share_weichat:
                shareToWeiChat();
                break;
            case R.id.ly_share_sina_weibo:
                shareToSinaWeibo();
                break;
            case R.id.ly_share_qq:
                shareToQQ();
                break;
            case R.id.ly_share_copy_link:
                TDevice.copyTextToBoard(this.link);
                break;
            case R.id.ly_share_more_option:
                TDevice.showSystemShareOption((Activity) this.context,
                        this.content, this.title);
                break;
            default:
                break;
        }
        this.dismiss();
    }

    @SuppressWarnings("deprecation")
    private void shareToWeiChatCircle() {
        // 支持微信朋友圈
        UMWXHandler wxCircleHandler = new UMWXHandler(this.context,
                Constants.WEICHAT_APPID);
        wxCircleHandler.setToCircle(true);
        wxCircleHandler.addToSocialSDK();
        // 设置微信朋友圈分享内容
        CircleShareContent circleMedia = new CircleShareContent();
        circleMedia.setShareContent(this.content);
        // 设置朋友圈title
        circleMedia.setTitle(this.title);
        circleMedia.setShareImage(getShareImg());
        circleMedia.setTargetUrl(this.link);
        mController.setShareMedia(circleMedia);
        mController.postShare(this.context, SHARE_MEDIA.WEIXIN_CIRCLE, null);
    }

    @SuppressWarnings("deprecation")
    private void shareToWeiChat() {
        // 添加微信平台
        UMWXHandler wxHandler = new UMWXHandler(this.context,
                Constants.WEICHAT_APPID);
        wxHandler.addToSocialSDK();
        // 设置微信好友分享内容
        WeiXinShareContent weixinContent = new WeiXinShareContent();
        // 设置分享文字
        weixinContent.setShareContent(this.content);
        // 设置title
        weixinContent.setTitle(this.title);
        // 设置分享内容跳转URL
        weixinContent.setTargetUrl(this.link);
        // 设置分享图片
        weixinContent.setShareImage(getShareImg());
        mController.setShareMedia(weixinContent);
        mController.postShare(this.context, SHARE_MEDIA.WEIXIN, null);
    }

    private void shareToSinaWeibo() {
        // 设置新浪微博SSO handler
        SinaSsoHandler sinaSsoHandler = new SinaSsoHandler();
        sinaSsoHandler.setTargetUrl(this.link);
        mController.setShareType(ShareType.SHAKE);
        mController.setShareContent(this.content + " " + this.link);
        mController.setShareImage(getShareImg());
        mController.getConfig().setSsoHandler(sinaSsoHandler);

        if (OauthHelper.isAuthenticated(this.context, SHARE_MEDIA.SINA)) {
            mController.directShare(this.context, SHARE_MEDIA.SINA, null);
        } else {
            mController.doOauthVerify(this.context, SHARE_MEDIA.SINA,
                    new SocializeListeners.UMAuthListener() {

                        @Override
                        public void onStart(SHARE_MEDIA arg0) {
                        }

                        @Override
                        public void onError(SocializeException arg0,
                                            SHARE_MEDIA arg1) {
                        }

                        @Override
                        public void onComplete(Bundle arg0, SHARE_MEDIA arg1) {
                            mController.directShare(ShareDialog.this.context, SHARE_MEDIA.SINA,
                                    null);
                        }

                        @Override
                        public void onCancel(SHARE_MEDIA arg0) {
                        }
                    });
        }
    }

    private void shareToQQ() {
        UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler((Activity) this.context,
                Constants.QQ_APPID, Constants.QQ_APPKEY);
        qqSsoHandler.setTargetUrl(this.link);
        qqSsoHandler.setTitle(this.title);
        qqSsoHandler.addToSocialSDK();
        mController.setShareContent(this.content);
        mController.setShareImage(getShareImg());
        mController.postShare(this.context, SHARE_MEDIA.QQ, null);
    }

    private UMImage getShareImg() {
        return new UMImage(this.context, R.mipmap.ic_share);
    }

    private boolean checkCanShare() {
        boolean canShare = true;
        if (TextUtils.isEmpty(title) || TextUtils.isEmpty(content) || TextUtils.isEmpty(link)) {
            canShare = false;
        }
        return canShare;
    }

    public UMSocialService getController() {
        return mController;
    }
}


text:
package com.lantopia.libjava.patterns;

import javax.inject.Provider;

/**
 * @author Mark McKenna %lt;mark.denis.mckenna@gmail.com>
 * @version 0.1
 * @since 14/02/14
 * <p/>
 * Represents a Provider instance that lazily creates the type that it provides.
 */
@SuppressWarnings("UnusedDeclaration")
public interface Lazy<T> extends Provider<T> {
}


text:
package org.projectfloodlight.openflow.protocol.ver12;

import org.projectfloodlight.openflow.protocol.*;
import org.projectfloodlight.openflow.protocol.action.*;
import org.projectfloodlight.openflow.protocol.actionid.*;
import org.projectfloodlight.openflow.protocol.bsntlv.*;
import org.projectfloodlight.openflow.protocol.errormsg.*;
import org.projectfloodlight.openflow.protocol.meterband.*;
import org.projectfloodlight.openflow.protocol.instruction.*;
import org.projectfloodlight.openflow.protocol.instructionid.*;
import org.projectfloodlight.openflow.protocol.match.*;
import org.projectfloodlight.openflow.protocol.oxm.*;
import org.projectfloodlight.openflow.protocol.queueprop.*;
import org.projectfloodlight.openflow.types.*;
import org.projectfloodlight.openflow.util.*;
import org.projectfloodlight.openflow.exceptions.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Set;
import org.jboss.netty.buffer.ChannelBuffer;
import com.google.common.hash.PrimitiveSink;
import com.google.common.hash.Funnel;

class OFInstructionGotoTableVer12 implements OFInstructionGotoTable {
    private static final Logger logger = LoggerFactory.getLogger(OFInstructionGotoTableVer12.class);
    // version: 1.2
    final static byte WIRE_VERSION = 3;
    final static int LENGTH = 8;

        private final static TableId DEFAULT_TABLE_ID = TableId.ALL;

    // OF message fields
    private final TableId tableId;
//
    // Immutable default instance
    final static OFInstructionGotoTableVer12 DEFAULT = new OFInstructionGotoTableVer12(
        DEFAULT_TABLE_ID
    );

    // package private constructor - used by readers, builders, and factory
    OFInstructionGotoTableVer12(TableId tableId) {
        if(tableId == null) {
            throw new NullPointerException("OFInstructionGotoTableVer12: property tableId cannot be null");
        }
        this.tableId = tableId;
    }

    // Accessors for OF message fields
    @Override
    public OFInstructionType getType() {
        return OFInstructionType.GOTO_TABLE;
    }

    @Override
    public TableId getTableId() {
        return tableId;
    }

    @Override
    public OFVersion getVersion() {
        return OFVersion.OF_12;
    }

    public OFInstructionGotoTable.Builder createBuilder() {
        return new BuilderWithParent(this);
    }

    static class BuilderWithParent implements OFInstructionGotoTable.Builder {
        final OFInstructionGotoTableVer12 parentMessage;

        // OF message fields
        private boolean tableIdSet;
        private TableId tableId;

        BuilderWithParent(OFInstructionGotoTableVer12 parentMessage) {
            this.parentMessage = parentMessage;
        }

    @Override
    public OFInstructionType getType() {
        return OFInstructionType.GOTO_TABLE;
    }

    @Override
    public TableId getTableId() {
        return tableId;
    }

    @Override
    public OFInstructionGotoTable.Builder setTableId(TableId tableId) {
        this.tableId = tableId;
        this.tableIdSet = true;
        return this;
    }
    @Override
    public OFVersion getVersion() {
        return OFVersion.OF_12;
    }

        @Override
        public OFInstructionGotoTable build() {
                TableId tableId = this.tableIdSet ? this.tableId : parentMessage.tableId;
                if(tableId == null)
                    throw new NullPointerException("Property tableId must not be null");

                //
                return new OFInstructionGotoTableVer12(
                    tableId
                );
        }

    }

    static class Builder implements OFInstructionGotoTable.Builder {
        // OF message fields
        private boolean tableIdSet;
        private TableId tableId;

    @Override
    public OFInstructionType getType() {
        return OFInstructionType.GOTO_TABLE;
    }

    @Override
    public TableId getTableId() {
        return tableId;
    }

    @Override
    public OFInstructionGotoTable.Builder setTableId(TableId tableId) {
        this.tableId = tableId;
        this.tableIdSet = true;
        return this;
    }
    @Override
    public OFVersion getVersion() {
        return OFVersion.OF_12;
    }

//
        @Override
        public OFInstructionGotoTable build() {
            TableId tableId = this.tableIdSet ? this.tableId : DEFAULT_TABLE_ID;
            if(tableId == null)
                throw new NullPointerException("Property tableId must not be null");

            return new OFInstructionGotoTableVer12(
                    tableId
                );
        }

    }

    final static Reader READER = new Reader();
    static class Reader implements OFMessageReader<OFInstructionGotoTable> {
        @Override
        public OFInstructionGotoTable readFrom(ChannelBuffer bb) throws OFParseError {
            int start = bb.readerIndex();
            // fixed value property type == 1
            short type = bb.readShort();
            if(type != (short) 0x1)
                throw new OFParseError("Wrong type: Expected=OFInstructionType.GOTO_TABLE(1), got="+type);
            int length = U16.f(bb.readShort());
            if(length != 8)
                throw new OFParseError("Wrong length: Expected=8(8), got="+length);
            if(bb.readableBytes() + (bb.readerIndex() - start) < length) {
                // Buffer does not have all data yet
                bb.readerIndex(start);
                return null;
            }
            if(logger.isTraceEnabled())
                logger.trace("readFrom - length={}", length);
            TableId tableId = TableId.readByte(bb);
            // pad: 3 bytes
            bb.skipBytes(3);

            OFInstructionGotoTableVer12 instructionGotoTableVer12 = new OFInstructionGotoTableVer12(
                    tableId
                    );
            if(logger.isTraceEnabled())
                logger.trace("readFrom - read={}", instructionGotoTableVer12);
            return instructionGotoTableVer12;
        }
    }

    public void putTo(PrimitiveSink sink) {
        FUNNEL.funnel(this, sink);
    }

    final static OFInstructionGotoTableVer12Funnel FUNNEL = new OFInstructionGotoTableVer12Funnel();
    static class OFInstructionGotoTableVer12Funnel implements Funnel<OFInstructionGotoTableVer12> {
        private static final long serialVersionUID = 1L;
        @Override
        public void funnel(OFInstructionGotoTableVer12 message, PrimitiveSink sink) {
            // fixed value property type = 1
            sink.putShort((short) 0x1);
            // fixed value property length = 8
            sink.putShort((short) 0x8);
            message.tableId.putTo(sink);
            // skip pad (3 bytes)
        }
    }

    public void writeTo(ChannelBuffer bb) {
        WRITER.write(bb, this);
    }

    final static Writer WRITER = new Writer();
    static class Writer implements OFMessageWriter<OFInstructionGotoTableVer12> {
        @Override
        public void write(ChannelBuffer bb, OFInstructionGotoTableVer12 message) {
            // fixed value property type = 1
            bb.writeShort((short) 0x1);
            // fixed value property length = 8
            bb.writeShort((short) 0x8);
            message.tableId.writeByte(bb);
            // pad: 3 bytes
            bb.writeZero(3);

        }
    }

    @Override
    public String toString() {
        StringBuilder b = new StringBuilder("OFInstructionGotoTableVer12(");
        b.append("tableId=").append(tableId);
        b.append(")");
        return b.toString();
    }

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

        if (tableId == null) {
            if (other.tableId != null)
                return false;
        } else if (!tableId.equals(other.tableId))
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;

        result = prime * result + ((tableId == null) ? 0 : tableId.hashCode());
        return result;
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:title="@string/app_name" />

    </android.support.design.widget.AppBarLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="52dp"
            android:layout_marginEnd="16dp"
            android:layout_marginStart="16dp"
            android:layout_alignParentBottom="true"
            android:background="@drawable/top_border"
            android:gravity="center"
            android:text="@string/please_sign_above"
            android:textStyle="bold"/>

        <com.simplify.ink.InkView
            android:id="@+id/ink"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:inkFlags="interpolation|responsiveWeight" />

    </RelativeLayout>

</LinearLayout>


text:
<span class="example-pizza-party">
  Pizza party!!! 🍕
</span>


text:
@interface UIDynamicItemBehavior (TFEasyCoder)

-(UIDynamicItemBehavior  *(^)(double  elasticity))set_elasticity;
-(UIDynamicItemBehavior  *(^)(double  friction))set_friction;
-(UIDynamicItemBehavior  *(^)(double  density))set_density;
-(UIDynamicItemBehavior  *(^)(double  resistance))set_resistance;
-(UIDynamicItemBehavior  *(^)(double  charge))set_charge;
-(UIDynamicItemBehavior  *(^)(BOOL  anchored))set_anchored;

//superclass pros UIDynamicBehavior
//superclass pros NSObject
-(UIDynamicItemBehavior  *(^)(NSArray *  accessibilityElements))set_accessibilityElements;
-(UIDynamicItemBehavior  *(^)(NSArray *  accessibilityCustomActions))set_accessibilityCustomActions;
-(UIDynamicItemBehavior  *(^)(BOOL  isAccessibilityElement))set_isAccessibilityElement;
-(UIDynamicItemBehavior  *(^)(NSString *  accessibilityLabel))set_accessibilityLabel;
-(UIDynamicItemBehavior  *(^)(NSString *  accessibilityHint))set_accessibilityHint;
-(UIDynamicItemBehavior  *(^)(NSString *  accessibilityValue))set_accessibilityValue;
-(UIDynamicItemBehavior  *(^)(unsigned long long  accessibilityTraits))set_accessibilityTraits;
-(UIDynamicItemBehavior  *(^)(UIBezierPath *  accessibilityPath))set_accessibilityPath;
-(UIDynamicItemBehavior  *(^)(CGPoint  accessibilityActivationPoint))set_accessibilityActivationPoint;
-(UIDynamicItemBehavior  *(^)(NSString *  accessibilityLanguage))set_accessibilityLanguage;
-(UIDynamicItemBehavior  *(^)(BOOL  accessibilityElementsHidden))set_accessibilityElementsHidden;
-(UIDynamicItemBehavior  *(^)(BOOL  accessibilityViewIsModal))set_accessibilityViewIsModal;
-(UIDynamicItemBehavior  *(^)(BOOL  shouldGroupAccessibilityChildren))set_shouldGroupAccessibilityChildren;
-(UIDynamicItemBehavior  *(^)(long long  accessibilityNavigationStyle))set_accessibilityNavigationStyle;

@end


text:
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script src="1.CreateRandomDivs.js"></script>
</body>
</html>


text:
//     Cursor.cs
//     (c) 2013 Brett Ernst, Jameson Ernst, Robert Marsters, Gabriel Isenberg https://github.com/gisenberg/tabletop.io.gui
//     Licensed under the terms of the MIT license.

using UnityEngine;

namespace Tabletop.io.Gui {
    public class Cursor {
        public string Sprite { get; private set; }
        public Vector2 Offset { get; private set; }

        public Cursor (string sprite, Vector2 offset) {
            this.Sprite = sprite;
            this.Offset = offset;
        }
    }

    public enum CursorPriority {
        Override = 0,
        Context = 1,
        Default = 2
    }
}


text:
<productname>{PRODUCT}</productname>
<productnumber>{PRODUCT_VERSION}</productnumber>
<subtitle>
</subtitle>
<abstract>
	<para>This document describes how to deploy a {PRODUCT} {PRODUCT_VERSION} managed server environment on {OPENSHIFT}.</para>
</abstract>
<xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />


text:
package com.tkmtwo.sarapi.convert;

import com.bmc.arsys.api.DataType;
import com.bmc.arsys.api.Timestamp;
import com.bmc.arsys.api.Value;
import com.tkmtwo.sarapi.InvalidValueAccessException;
import org.joda.time.DateTime;
import org.springframework.core.convert.converter.Converter;

/**
 *
 */
public final class ValueToDateTimeConverter
  implements Converter<Value, DateTime> {

  @Override
  public DateTime convert(Value v) {
    if (v == null || v.getValue() == null || v.getDataType() == DataType.NULL) {
      return null;
    }

    if (!v.getDataType().equals(DataType.TIME)) {
      throw new InvalidValueAccessException("Value is not a DataType.TIME");
    }

    Object o = v.getValue();
    if (o instanceof Timestamp == false) {
      throw new InvalidValueAccessException("Value is not a Timestamp");
    }

    Timestamp t = (Timestamp) o;
    return new DateTime(t.getValue() * 1000L);
  }

}


text:
package servicekey

import (
	"github.com/cloudfoundry/cli/cf/api"
	"github.com/cloudfoundry/cli/cf/command_metadata"
	"github.com/cloudfoundry/cli/cf/configuration/core_config"
	"github.com/cloudfoundry/cli/cf/errors"
	"github.com/cloudfoundry/cli/cf/requirements"
	"github.com/cloudfoundry/cli/cf/terminal"
	"github.com/codegangsta/cli"

	. "github.com/cloudfoundry/cli/cf/i18n"
)

type CreateServiceKey struct {
	ui             terminal.UI
	config         core_config.Reader
	serviceRepo    api.ServiceRepository
	serviceKeyRepo api.ServiceKeyRepository
}

func NewCreateServiceKey(ui terminal.UI, config core_config.Reader, serviceRepo api.ServiceRepository, serviceKeyRepo api.ServiceKeyRepository) (cmd CreateServiceKey) {
	return CreateServiceKey{
		ui:             ui,
		config:         config,
		serviceRepo:    serviceRepo,
		serviceKeyRepo: serviceKeyRepo,
	}
}

func (cmd CreateServiceKey) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-service-key",
		ShortName:   "csk",
		Description: T("Create key for a service instance"),
		Usage: T(`CF_NAME create-service-key SERVICE_INSTANCE SERVICE_KEY

EXAMPLE:
   CF_NAME create-service-key mydb mykey`),
	}
}

func (cmd CreateServiceKey) GetRequirements(requirementsFactory requirements.Factory, c *cli.Context) (reqs []requirements.Requirement, err error) {
	if len(c.Args()) != 2 {
		cmd.ui.FailWithUsage(c)
	}

	loginRequirement := requirementsFactory.NewLoginRequirement()
	serviceInstanceRequirement := requirementsFactory.NewServiceInstanceRequirement(c.Args()[0])
	targetSpaceRequirement := requirementsFactory.NewTargetedSpaceRequirement()

	reqs = []requirements.Requirement{loginRequirement, serviceInstanceRequirement, targetSpaceRequirement}

	return reqs, nil
}

func (cmd CreateServiceKey) Run(c *cli.Context) {
	serviceInstanceName := c.Args()[0]
	serviceKeyName := c.Args()[1]

	cmd.ui.Say(T("Creating service key {{.ServiceKeyName}} for service instance {{.ServiceInstanceName}} as {{.CurrentUser}}...",
		map[string]interface{}{
			"ServiceInstanceName": terminal.EntityNameColor(serviceInstanceName),
			"ServiceKeyName":      terminal.EntityNameColor(serviceKeyName),
			"CurrentUser":         terminal.EntityNameColor(cmd.config.Username()),
		}))

	serviceInstance, err := cmd.serviceRepo.FindInstanceByName(serviceInstanceName)
	if err != nil {
		cmd.ui.Failed(err.Error())
		return
	}

	err = cmd.serviceKeyRepo.CreateServiceKey(serviceInstance.Guid, serviceKeyName)
	switch err.(type) {
	case nil:
		cmd.ui.Ok()
	case *errors.ModelAlreadyExistsError:
		cmd.ui.Ok()
		cmd.ui.Warn(err.Error())
	default:
		cmd.ui.Failed(err.Error())
	}
}


text:
package vg.civcraft.mc.civmodcore.util;

import com.destroystokyo.paper.profile.PlayerProfile;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;

import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Supplier;
import java.util.logging.Level;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitTask;

/**
 * @author caucow ( https://github.com/caucow )
 */
// Maybe some day this class can be made more generic and accept an ExecutorService in a constructor or something.
// For now it works. Ree.
public class SkinCache {

	private final Plugin plugin;
	// TODO: If an easier way to limit the number of threads spawned by Bukkit's scheduler exists, use it.
	// This is dirty. It feels bad.
	private final ExecutorService executor;
	private final BukkitTask watchdog;
	private Thread watchdogThread;
	/**
	 * Caching of PlayerProfiles, should only be accessed directly through
	 * getIfPresent or other non-blocking means. Use futureCache to trigger
	 * loads.
	 */
	private LoadingCache<UUID, SkinData> skinCache;
	/**
	 * Implementation for "notifying" code waiting on a skin to be loaded.
	 * Futures returned are processed on this HeadCache's ExecutorService (for
	 * now unless a better way to limit Bukkit scheduler thread spawning arises)
	 */
	private LoadingCache<UUID, CompletableFuture<SkinData>> futureCache;

	/**
	 * Creates a new SkinCache and initializes its ExecutorService and watchdog bukkit task.
	 *
	 * Always call {@link #shutdown()} before discarding this object (ex if replacing a SkinCache or disabling a plugin)
	 * @param plugin Plugin owning the cache, used to schedule Bukkit sync tasks.
	 * @param downloadThreads Number of threads to use to handle async loading.
	 */
	public SkinCache(Plugin plugin, int downloadThreads) {
		this.plugin = plugin;

		this.skinCache = CacheBuilder.newBuilder()
				.expireAfterWrite(6, TimeUnit.HOURS)
				.build(new CacheLoader<UUID, SkinData>() {
					@Override
					public SkinData load(UUID uuid) throws Exception {
						PlayerProfile profile = Bukkit.createProfile(uuid);
						profile.complete(true);
						if (profile.hasTextures()) {
							return new SkinData(profile);
						}
						throw new SkinLoadException("Could not complete() PlayerProfile for " + uuid + " (rate limited or profile doesn't exist)");
					}
				});
		this.futureCache = CacheBuilder.newBuilder()
				.expireAfterWrite(5, TimeUnit.MINUTES)
				.build(new CacheLoader<UUID, CompletableFuture<SkinData>>() {
					@Override
					public CompletableFuture<SkinData> load(UUID uuid) throws Exception {
						return CompletableFuture.supplyAsync(() -> {
							try {
								return skinCache.get(uuid);
							} catch (Exception ex) {
								// This was causing "issues" with nms querying
								// the skin server. Just going to log the
								// exception now I guess
								// return new SkinData(Bukkit.createProfile(uuid));
								if (ex instanceof SkinLoadException) {
									plugin.getLogger().log(Level.WARNING, "Exception loading skin: " + ex.getMessage());
								} else {
									plugin.getLogger().log(Level.WARNING, "Exception loading skin", ex);
								}
								// also complete exceptionally to cancel later
								// CompletionStages
								if (ex instanceof RuntimeException) {
									throw (RuntimeException) ex;
								} else {
									throw new RuntimeException("Skin could not be loaded", ex);
								}
							}
						}, executor);
					}
				});

		this.executor = Executors.newFixedThreadPool(downloadThreads);
		// because I don't trust plugins to clean up on disable so might as well
		// have something screeching in the logs. not that many plugins try to
		// be reloadable
		this.watchdog = Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
			watchdogThread = Thread.currentThread();
			do {
				try {
					SkinCache.this.executor.awaitTermination(60, TimeUnit.SECONDS);
				} catch (InterruptedException ie) {
					Thread.currentThread().interrupt();
					shutdown();
					return;
				}
				if (!plugin.isEnabled()) {
					break;
				}
			} while (!SkinCache.this.executor.isShutdown());
			if (SkinCache.this.executor.isShutdown()) {
				return;
			}
			try {
				SkinCache.this.executor.awaitTermination(60, TimeUnit.SECONDS);
				if (!SkinCache.this.executor.isShutdown()) {
					plugin.getLogger().log(Level.WARNING, "Plugin did not shutdown() HeadCache while disabling!");
				}
			} catch (InterruptedException ie) {
				Thread.currentThread().interrupt();
			}
			shutdown();
		});
	}

	/**
	 * Shut down the ExecutorService and watchdog task, and cancel any remaining async loads.
	 */
	public void shutdown() {
		watchdog.cancel();
		executor.shutdownNow();
		if (watchdogThread != null) {
			watchdogThread.interrupt();
		}
	}

	/**
	 * @param playerId UUID of player to get head for
	 * @param placeholderSupplier If there is not already a skin available for the given player, use this supplier to
	 *                            generate a placeholder item while the skin for the skull item is loaded.
	 * @param notifyAvailable If a skin must be downloaded or retrieved from the server's usercache, this will be used
	 *                        as a callback when the skin has been loaded and a skull item created.
	 * @return A bare player skull item, or a placeholder if the skin for the provided player ID is not loaded yet.
	 */
	public ItemStack getHeadItem(final UUID playerId, Supplier<ItemStack> placeholderSupplier, final Consumer<ItemStack> notifyAvailable) {
		SkinData skin = skinCache.getIfPresent(playerId);
		if (skin != null) {
			return createHeadItem(skin);
		}
		CompletableFuture<SkinData> metaFuture = futureCache.getUnchecked(playerId);
		metaFuture.thenAccept((asyncMeta) -> {
			if (plugin.isEnabled()) {
				ItemStack headItem = createHeadItem(asyncMeta);
				Bukkit.getScheduler().runTask(plugin, () -> notifyAvailable.accept(headItem));
			}
		});
		return placeholderSupplier.get();
	}

	private ItemStack createHeadItem(SkinData skin) {
		ItemStack item = new ItemStack(Material.PLAYER_HEAD);
		item.setItemMeta(skin.headMeta.clone());
		return item;
	}

	private static class SkinData {

		public final PlayerProfile profile;
		public final SkullMeta headMeta;

		public SkinData(PlayerProfile profile) {
			this.profile = profile;
			this.headMeta = (SkullMeta) Bukkit.getItemFactory().getItemMeta(Material.PLAYER_HEAD);
			headMeta.setPlayerProfile(profile);
		}

	}

	public static class SkinLoadException extends RuntimeException {
		public SkinLoadException(String message) {
			super(message);
		}
	}
}