text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView android:id="@+id/cardview"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"
    card_view:cardCornerRadius="8dp"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    xmlns:mstb="http://schemas.android.com/tools">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:background="#F1F1F1">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:orientation="horizontal"
            android:background="#FFFFFF">

            <pabix.chickens.una.Widget.NotoBoldTextView
                android:layout_width="wrap_content"
                android:layout_marginStart="20dp"
                android:layout_height="wrap_content"
                android:text="공지"
                android:textColor="#FFFFFF"
                android:background="@drawable/textviews"
                android:layout_gravity="center_vertical"
                android:paddingTop="5dp"
                android:paddingBottom="5dp"
                android:id="@+id/announce"/>

            <pabix.chickens.una.Widget.NotoBoldTextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="공지사항(필독)"
                android:textSize="16sp"
                android:letterSpacing="-0.05"
                android:textColor="#000000"
                android:layout_gravity="center_vertical"
                android:layout_marginStart="15dp"/>

            <pabix.chickens.una.Widget.NotoBoldTextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:gravity="right"
                android:textColor="@color/maincolor"
                android:layout_marginEnd="30dp"
                android:text="2016-12-14"/>

        </LinearLayout>

        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:mstb="http://schemas.android.com/apk/res-auto"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:layout_marginTop="3dp"
            android:background="#FFFFFF">

            <org.honorato.multistatetogglebutton.MultiStateToggleButton
            android:id="@+id/mstb_multi_id"
                android:textAlignment="center"
            android:layout_marginTop="5dip"
                android:background="@drawable/outline"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="5dip"

            mstb:values="@array/planets_array"
            mstb:mstbPrimaryColor="@color/maincolor"
            mstb:mstbSecondaryColor="@color/white"

                android:paddingBottom="5dp"
                android:layout_width="350dp"
                android:layout_height="37dp" />
        </LinearLayout>

    </LinearLayout>

</android.support.v7.widget.CardView>

redpajama_set_name: RedPajamaGithub


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v11/errors/user_list_error.proto

namespace Google\Ads\GoogleAds\V11\Errors;

if (false) {
    /**
     * This class is deprecated. Use Google\Ads\GoogleAds\V11\Errors\UserListErrorEnum\UserListError instead.
     * @deprecated
     */
    class UserListErrorEnum_UserListError {}
}
class_exists(UserListErrorEnum\UserListError::class);
@trigger_error('Google\Ads\GoogleAds\V11\Errors\UserListErrorEnum_UserListError is deprecated and will be removed in the next major release. Use Google\Ads\GoogleAds\V11\Errors\UserListErrorEnum\UserListError instead', E_USER_DEPRECATED);


text:
using namespace swift;

static bool EnableOverride;
static bool Ran;

namespace {
template <typename T>
T getEmptyValue() {
  return T();
}
template <>
ExecutorRef getEmptyValue() {
  return ExecutorRef::generic();
}
} // namespace

#define OVERRIDE(name, ret, attrs, ccAttrs, namespace, typedArgs, namedArgs)   \
  static ccAttrs ret name##Override(COMPATIBILITY_UNPAREN_WITH_COMMA(          \
      typedArgs) Original_##name originalImpl) {                               \
    if (!EnableOverride)                                                       \
      return originalImpl COMPATIBILITY_PAREN(namedArgs);                      \
    Ran = true;                                                                \
    return getEmptyValue<ret>();                                               \
  }
#include "../../stdlib/public/CompatibilityOverride/CompatibilityOverrideConcurrency.def"

struct OverrideSection {
  uintptr_t version;

#define OVERRIDE(name, ret, attrs, ccAttrs, namespace, typedArgs, namedArgs)   \
  Override_##name name;
#include "../../stdlib/public/CompatibilityOverride/CompatibilityOverrideConcurrency.def"
};

OverrideSection ConcurrencyOverrides
    __attribute__((section("__DATA,__s_async_hook"))) = {
        0,
#define OVERRIDE(name, ret, attrs, ccAttrs, namespace, typedArgs, namedArgs)   \
  name##Override,
#include "../../stdlib/public/CompatibilityOverride/CompatibilityOverrideConcurrency.def"
};

SWIFT_CC(swift)
static void
swift_task_enqueueGlobal_override(Job *job,
                                  swift_task_enqueueGlobal_original original) {
  Ran = true;
}

SWIFT_CC(swift)
static void swift_task_enqueueGlobalWithDelay_override(
    unsigned long long delay, Job *job,
    swift_task_enqueueGlobalWithDelay_original original) {
  Ran = true;
}

SWIFT_CC(swift)
static void swift_task_enqueueMainExecutor_override(
    Job *job, swift_task_enqueueMainExecutor_original original) {
  Ran = true;
}

class CompatibilityOverrideConcurrencyTest : public ::testing::Test {
protected:
  virtual void SetUp() {
    // This check is a bit pointless, as long as you trust the section
    // attribute to work correctly, but it ensures that the override
    // section actually gets linked into the test executable. If it's not
    // used then it disappears and the real tests begin to fail.
    ASSERT_EQ(ConcurrencyOverrides.version, static_cast<uintptr_t>(0));

    EnableOverride = true;
    Ran = false;

    // Executor hooks need to be set manually.
    swift_task_enqueueGlobal_hook = swift_task_enqueueGlobal_override;
    swift_task_enqueueGlobalWithDelay_hook =
        swift_task_enqueueGlobalWithDelay_override;
    swift_task_enqueueMainExecutor_hook =
        swift_task_enqueueMainExecutor_override;
  }

  virtual void TearDown() {
    EnableOverride = false;
    ASSERT_TRUE(Ran);
  }
};

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_enqueue) {
  swift_task_enqueue(nullptr, ExecutorRef::generic());
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_job_run) {
  swift_job_run(nullptr, ExecutorRef::generic());
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_getCurrentExecutor) {
  swift_task_getCurrentExecutor();
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_switch) {
  swift_task_switch(nullptr, nullptr, ExecutorRef::generic());
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_enqueueGlobal) {
  swift_task_enqueueGlobal(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest,
       test_swift_task_enqueueGlobalWithDelay) {
  swift_task_enqueueGlobalWithDelay(0, nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest,
       test_swift_task_enqueueMainExecutor) {
  swift_task_enqueueMainExecutor(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_create_common) {
  swift_task_create_common(0, nullptr, nullptr, nullptr, nullptr, 0);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_future_wait) {
  swift_task_future_wait(nullptr, nullptr, nullptr, nullptr, nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest,
       test_swift_task_future_wait_throwing) {
  swift_task_future_wait_throwing(nullptr, nullptr, nullptr, nullptr, nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_continuation_resume) {
  swift_continuation_resume(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest,
       test_swift_continuation_throwingResume) {
  swift_continuation_throwingResume(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest,
       test_swift_continuation_throwingResumeWithError) {
  swift_continuation_throwingResumeWithError(nullptr, nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_asyncLet_wait) {
  swift_asyncLet_wait(nullptr, nullptr, nullptr, nullptr, nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_asyncLet_wait_throwing) {
  swift_asyncLet_wait(nullptr, nullptr, nullptr, nullptr, nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_asyncLet_end) {
  swift_asyncLet_end(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_taskGroup_initialize) {
  swift_taskGroup_initialize(nullptr, nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_taskGroup_attachChild) {
  swift_taskGroup_attachChild(nullptr, nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_taskGroup_destroy) {
  swift_taskGroup_destroy(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest,
       test_swift_taskGroup_wait_next_throwing) {
  swift_taskGroup_wait_next_throwing(nullptr, nullptr, nullptr, nullptr,
                                     nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_taskGroup_isEmpty) {
  swift_taskGroup_isEmpty(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_taskGroup_isCancelled) {
  swift_taskGroup_isCancelled(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_taskGroup_cancelAll) {
  swift_taskGroup_cancelAll(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_taskGroup_addPending) {
  swift_taskGroup_addPending(nullptr, true);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_localValuePush) {
  swift_task_localValuePush(nullptr, nullptr, nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_localValueGet) {
  swift_task_localValueGet(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_localValuePop) {
  swift_task_localValuePop();
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_localsCopyTo) {
  swift_task_localsCopyTo(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_addStatusRecord) {
  swift_task_addStatusRecord(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_tryAddStatusRecord) {
  swift_task_tryAddStatusRecord(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_removeStatusRecord) {
  swift_task_removeStatusRecord(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, task_hasTaskGroupStatusRecord) {
  swift_task_hasTaskGroupStatusRecord();
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_attachChild) {
  swift_task_attachChild(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_detachChild) {
  swift_task_detachChild(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_cancel) {
  swift_task_cancel(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_cancel_group_child_tasks) {
  swift_task_cancel_group_child_tasks(nullptr);
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_escalate) {
  swift_task_escalate(nullptr, {});
}

TEST_F(CompatibilityOverrideConcurrencyTest, test_swift_task_getNearestDeadline) {
  swift_task_getNearestDeadline(nullptr);
}

#endif


text:
var cheerio = require('cheerio');
var request = require('request');
var fs = require('fs');

var resultsUrl = "http://www.bbc.com/sport/football/premier-league/scores-fixtures/2017-08";

request(resultsUrl, function (error, response, html) {
    if (error) {
        console.log(`Failed to access ${resultsUrl}`);
    }

    console.log(`Successfully accessed ${resultsUrl}`);

    var text = "";
    var urls = [];
    var $ = cheerio.load(html);

    $('a.sp-c-fixture__block-link').each(function () {
        var url = $(this).attr('href');
        urls.push(`http://www.bbc.com${url}`);
    });

    console.log(`Urls found: ${urls.length}`);
    var re = /(.*)(\.\.[\.]*)(.*)/g;
    var re2 = /\.([A-Za-z]+)/g;

    urls.forEach(function (url) {
        console.log(url);
        request(url, function (error, response, html) {
            var $ = cheerio.load(html);
            $('.lx-stream-post-body p').each(function () {
                var sentence = $(this).text();
                if (sentence.indexOf('Video Review') === -1) {
                    if (sentence.length > 1) {
                        text += sentence + "\n";
                    }
                }
            });
            save();
        });
    });

    var count = 0;

    function save() {
        ++count;
        if (count === urls.length) {
            fs.writeFile("./content/tr-football-bbcpl1718", text, {flag: 'w'}, function (err) {
                if (err) {
                    return console.log(err);
                }
                console.log("The file was saved!");
            });
        }
    }
});


text:
using System;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Reflection.Emit;

namespace ProGaudi.MsgPack.Light.Converters.Generation
{
    internal class EnumConverterGenerator
    {
        private readonly ModuleBuilder _moduleBuilder;
        private readonly string _namespaceToPlace;

        public EnumConverterGenerator(ModuleBuilder moduleBuilder, string namespaceToPlace)
        {
            _moduleBuilder = moduleBuilder;
            _namespaceToPlace = namespaceToPlace;
        }

        public Type Generate(Type typeToWrap)
        {
            var interfaceToImplement = typeof(IMsgPackConverter<>).MakeGenericType(typeToWrap);

            var typeBuilder = _moduleBuilder.DefineType(
                $"{_namespaceToPlace}.{typeToWrap.GetNormalizedName()}_EnumConverter",
                TypeAttributes.Public,
                typeof(object),
                new[] { interfaceToImplement });

            var underlyingType = Enum.GetUnderlyingType(typeToWrap);

            var underlyingTypeConverter = typeBuilder.DefineField(
                $"_{underlyingType.Name}_Converter",
                typeof(Lazy<>).MakeGenericType(typeof(IMsgPackConverter<>).MakeGenericType(underlyingType)),
                FieldAttributes.Private);

            EmitInitializeMethod(typeBuilder, underlyingType, underlyingTypeConverter);
            EmitWriteMethod(typeBuilder, typeToWrap, underlyingType, underlyingTypeConverter);
            EmitReadMethod(typeBuilder, typeToWrap, underlyingTypeConverter);

            return typeBuilder.ToType();
        }

        private static void EmitReadMethod(
            TypeBuilder typeBuilder,
            Type typeToWrap,
            FieldBuilder underlyingTypeConverter)
        {
            var mb = typeBuilder.DefineMethod(
                $"{nameof(IMsgPackConverter<object>.Read)}",
                MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.HideBySig,
                CallingConventions.HasThis);
            mb.SetReturnType(typeToWrap);
            mb.SetParameters(typeof(IMsgPackReader));

            var generator = mb.GetILGenerator();
            generator.DeclareLocal(typeToWrap);
            generator.Emit(OpCodes.Ldarg_0);
            generator.Emit(OpCodes.Ldfld, underlyingTypeConverter);
            generator.Emit(OpCodes.Callvirt, underlyingTypeConverter.FieldType.GetTypeInfo().GetProperty(nameof(Lazy<object>.Value)).GetMethod);
            generator.Emit(OpCodes.Ldarg_1);
            generator.Emit(
                OpCodes.Callvirt,
                underlyingTypeConverter.FieldType.GenericTypeArguments[0].GetTypeInfo().GetMethod(nameof(IMsgPackConverter<object>.Read), new[] { typeof(IMsgPackReader) }));

            generator.Emit(OpCodes.Stloc_0);
            generator.Emit(OpCodes.Ldloc_0);

            generator.Emit(OpCodes.Ret);
        }

        private static void EmitWriteMethod(
            TypeBuilder typeBuilder,
            Type type,
            Type underlyingType,
            FieldBuilder underlyingTypeConverter)
        {
            var mb = typeBuilder.DefineMethod(
                $"{nameof(IMsgPackConverter<object>.Write)}",
                MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.HideBySig,
                CallingConventions.HasThis);
            mb.SetReturnType(typeof(void));
            mb.SetParameters(type, typeof(IMsgPackWriter));

            var generator = mb.GetILGenerator();

            generator.Emit(OpCodes.Ldarg_0);
            generator.Emit(OpCodes.Ldfld, underlyingTypeConverter);
            generator.Emit(OpCodes.Callvirt, underlyingTypeConverter.FieldType.GetTypeInfo().GetProperty(nameof(Lazy<object>.Value)).GetMethod);
            generator.Emit(OpCodes.Ldarg_1);
            generator.Emit(OpCodes.Ldarg_2);
            generator.Emit(
                OpCodes.Callvirt,
                underlyingTypeConverter.FieldType.GenericTypeArguments[0].GetTypeInfo().GetMethod(nameof(IMsgPackConverter<object>.Write), new[] { underlyingType, typeof(IMsgPackWriter) }));

            generator.Emit(OpCodes.Ret);
        }

        [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")]
        private static void EmitInitializeMethod(
            TypeBuilder typeBuilder,
            Type underlyingType,
            FieldBuilder underlyingTypeConverter)
        {
            var mb = typeBuilder.DefineMethod(
                nameof(IMsgPackConverter.Initialize),
                MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.HideBySig,
                CallingConventions.HasThis);
            mb.SetReturnType(typeof(void));
            mb.SetParameters(typeof(MsgPackContext));

            var generator = mb.GetILGenerator();

            generator.Emit(OpCodes.Ldarg_0);
            generator.Emit(OpCodes.Ldarg_1);
            generator.Emit(
                OpCodes.Ldftn,
                typeof(MsgPackContext).GetTypeInfo().GetMethod(nameof(MsgPackContext.GetConverter))
                    .MakeGenericMethod(underlyingType));

            var converterType = underlyingTypeConverter.FieldType.GenericTypeArguments[0];
            generator.Emit(
                OpCodes.Newobj,
                typeof(Func<>)
                    .MakeGenericType(converterType)
                    .GetTypeInfo()
                    .GetConstructor(new[] { typeof(object), typeof(IntPtr) }));
            generator.Emit(
                OpCodes.Newobj,
                typeof(Lazy<>)
                    .MakeGenericType(converterType)
                    .GetTypeInfo()
                    .GetConstructor(
                        new[]
                        {
                                typeof(Func<>).MakeGenericType(converterType)
                        }));
            generator.Emit(OpCodes.Stfld, underlyingTypeConverter);

            generator.Emit(OpCodes.Ret);
        }
    }
}


text:
import os
import time
from datetime import datetime, timedelta
from flask import Flask, request, abort, jsonify

def temp_token():
    import binascii
    temp_token = binascii.hexlify(os.urandom(24))
    return temp_token.decode('utf-8')

WEBHOOK_VERIFY_TOKEN = os.getenv('WEBHOOK_VERIFY_TOKEN')
CLIENT_AUTH_TIMEOUT = 24 # in Hours

app = Flask(__name__)

authorized_clients = {}
check_auth = False
delay_seconds = 0.020

@app.route('/webhook', methods=['GET', 'POST'])
def webhook():
    time.sleep(delay_seconds)
    if request.method == 'GET':
        verify_token = request.headers.get('token', None)
        if verify_token == WEBHOOK_VERIFY_TOKEN:
            authorized_clients[request.remote_addr] = datetime.now()
            return jsonify({'status':'success'}), 200
        else:
            return jsonify({'status':'bad token'}), 401

    elif request.method == 'POST':
        client = request.remote_addr
        print('authentication:')
        print(request.headers.get('Basic',None))
        if not check_auth or client in authorized_clients:
            if check_auth and datetime.now() - authorized_clients.get(client) > timedelta(hours=CLIENT_AUTH_TIMEOUT):
                authorized_clients.pop(client)
                return jsonify({'status':'authorisation timeout'}), 401
            else:
                print(request.data)
                return jsonify({'status':'success' \
                                   , 'received_data: ' : request.data.decode('utf-8')
                                }), 200
        else:
            return jsonify({'status':'not authorised'}), 401

    else:
        abort(400)

if __name__ == '__main__':
    if WEBHOOK_VERIFY_TOKEN is None:
        print('WEBHOOK_VERIFY_TOKEN has not been set in the environment.\nGenerating random token...')
        token = temp_token()
        print('Token: %s' % token)
        WEBHOOK_VERIFY_TOKEN = token
    app.run(port=5001)


text:
package mblog.core.persist.dao;

import mtons.modules.persist.BaseRepository;
import mtons.modules.pojos.Paging;

import java.util.Collection;
import java.util.List;
import java.util.Set;

import mblog.core.persist.entity.CommentPO;

/**
 * @author cdq
 *
 */
public interface CommentDao extends BaseRepository<CommentPO> {
	List<CommentPO> paging(Paging paging, String key);
	List<CommentPO> paging(Paging paging, long toId, long authorId, boolean desc);
	List<CommentPO> findByIds(Set<Long> ids);

	int deleteByIds(Collection<Long> ids);
}


text:
namespace web_app {

TestWebAppUrlLoader::TestWebAppUrlLoader() = default;

TestWebAppUrlLoader::~TestWebAppUrlLoader() = default;

void TestWebAppUrlLoader::SaveLoadUrlRequests() {
  should_save_requests_ = true;
}

void TestWebAppUrlLoader::ProcessLoadUrlRequests() {
  while (!pending_requests_.empty()) {
    auto [url, callback] = std::move(pending_requests_.front());
    pending_requests_.pop();

    DCHECK(base::Contains(next_result_map_, url));

    const UrlResponses& url_responses = next_result_map_[url];
    DCHECK_EQ(1u, url_responses.results.size());

    Result result = url_responses.results.front();
    next_result_map_.erase(url);

    std::move(callback).Run(result);
  }
}

void TestWebAppUrlLoader::SetNextLoadUrlResult(const GURL& url, Result result) {
  AddNextLoadUrlResults(url, {result});
}

void TestWebAppUrlLoader::AddNextLoadUrlResults(
    const GURL& url,
    const std::vector<Result>& results) {
  DCHECK(!base::Contains(next_result_map_, url)) << url;
  UrlResponses& responses = next_result_map_[url];

  for (Result result : results)
    responses.results.push(result);
}

void TestWebAppUrlLoader::LoadUrl(const GURL& url,
                                  content::WebContents* web_contents,
                                  UrlComparison url_comparison,
                                  ResultCallback callback) {
  load_url_tracker_.Run(url, web_contents, url_comparison);

  if (should_save_requests_) {
    pending_requests_.emplace(url, std::move(callback));
    return;
  }

  DCHECK(base::Contains(next_result_map_, url)) << url;
  UrlResponses& responses = next_result_map_[url];
  DCHECK(!responses.results.empty());

  Result result = responses.results.front();
  responses.results.pop();

  if (responses.results.empty())
    next_result_map_.erase(url);

  base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
      FROM_HERE, base::BindOnce(std::move(callback), result));
}

void TestWebAppUrlLoader::SetPrepareForLoadResultLoaded() {
  AddPrepareForLoadResults({WebAppUrlLoader::Result::kUrlLoaded});
}

void TestWebAppUrlLoader::AddPrepareForLoadResults(
    const std::vector<Result>& results) {
  AddNextLoadUrlResults(GURL(url::kAboutBlankURL), results);
}

TestWebAppUrlLoader::UrlResponses::UrlResponses() = default;

TestWebAppUrlLoader::UrlResponses::~UrlResponses() = default;

}  // namespace web_app


text:
The default theme for [Ghost](http://github.com/tryghost/ghost/). This is the latest development version of Casper! If you're just looking to download the latest release, head over to the [releases](https://github.com/TryGhost/Casper/releases) page.

![screenshot-desktop](https://user-images.githubusercontent.com/353959/66987533-40eae100-f0c1-11e9-822e-cbaf38fb8e3f.png)

# First time using a Ghost theme?

Ghost uses a simple templating language called [Handlebars](http://handlebarsjs.com/) for its themes.

This theme has lots of code comments to help explain what's going on just by reading the code. Once you feel comfortable with how everything works, we also have full [theme API documentation](https://ghost.org/docs/api/handlebars-themes/) which explains every possible Handlebars helper and template.

**The main files are:**

- `default.hbs` - The parent template file, which includes your global header/footer
- `index.hbs` - The main template to generate a list of posts, usually the home page
- `post.hbs` - The template used to render individual posts
- `page.hbs` - Used for individual pages
- `tag.hbs` - Used for tag archives, eg. "all posts tagged with `news`"
- `author.hbs` - Used for author archives, eg. "all posts written by Jamie"

One neat trick is that you can also create custom one-off templates by adding the slug of a page to a template file. For example:

- `page-about.hbs` - Custom template for an `/about/` page
- `tag-news.hbs` - Custom template for `/tag/news/` archive
- `author-ali.hbs` - Custom template for `/author/ali/` archive

# Development

Casper styles are compiled using Gulp/PostCSS to polyfill future CSS spec. You'll need [Node](https://nodejs.org/), [Yarn](https://yarnpkg.com/) and [Gulp](https://gulpjs.com) installed globally. After that, from the theme's root directory:

```bash
# install dependencies
yarn install

# run development server
yarn dev
```

Now you can edit `/assets/css/` files, which will be compiled to `/assets/built/` automatically.

The `zip` Gulp task packages the theme files into `dist/<theme-name>.zip`, which you can then upload to your site.

```bash
# create .zip file
yarn zip
```

# PostCSS Features Used

- Autoprefixer - Don't worry about writing browser prefixes of any kind, it's all done automatically with support for the latest 2 major versions of every browser.
- [Color Mod](https://github.com/jonathantneal/postcss-color-mod-function)

# SVG Icons

Casper uses inline SVG icons, included via Handlebars partials. You can find all icons inside `/partials/icons`. To use an icon just include the name of the relevant file, eg. To include the SVG icon in `/partials/icons/rss.hbs` - use `{{> "icons/rss"}}`.

You can add your own SVG icons in the same manner.

# Copyright & License

Copyright (c) 2013-2020 Ghost Foundation - Released under the [MIT license](LICENSE).


text:
CKEDITOR.plugins.setLang( 'scayt', 'et', {
	about: 'SCAYT-ist lähemalt',
	aboutTab: 'Lähemalt',
	addWord: 'Lisa sõna',
	allCaps: 'Läbivate suurtähtedega sõnade eiramine',
	dic_create: 'Loo',
	dic_delete: 'Kustuta',
	dic_field_name: 'Sõnaraamatu nimi',
	dic_info: 'Alguses säilitatakse kasutaja sõnaraamatut küpsises. Küpsise suurus on piiratud. Pärast sõnaraamatu kasvamist nii suureks, et see küpsisesse ei mahu, võib sõnaraamatut hoida meie serveris. Oma isikliku sõnaraamatu hoidmiseks meie serveris pead andma sellele nime. Kui sa juba oled sõnaraamatu salvestanud, sisesta selle nimi ja klõpsa taastamise nupule.',
	dic_rename: 'Nimeta ümber',
	dic_restore: 'Taasta',
	dictionariesTab: 'Sõnaraamatud',
	disable: 'SCAYT keelatud',
	emptyDic: 'Sõnaraamatu nimi ei tohi olla tühi.',
	enable: 'SCAYT lubatud',
	ignore: 'Eira',
	ignoreAll: 'Eira kõiki',
	ignoreDomainNames: 'Domeeninimede eiramine',
	langs: 'Keeled',
	languagesTab: 'Keeled',
	mixedCase: 'Tavapäratu tõstuga sõnade eiramine',
	mixedWithDigits: 'Numbreid sisaldavate sõnade eiramine',
	moreSuggestions: 'Veel soovitusi',
	opera_title: 'Operas pole toetatud',
	options: 'Valikud',
	optionsTab: 'Valikud',
	title: 'Õigekirjakontroll kirjutamise ajal',
	toggle: 'SCAYT sisse/välja lülitamine',
	noSuggestions: 'No suggestion'
});


text:
/*
 * Author: Zoltán Lajos Kis <zoltan.lajos.kis@ericsson.com>
 */

"use strict";

(function() {

var util = require('util');
var ofp = require('../ofp.js');

var offsets = ofp.offsets.ofp_instruction_goto_table;

module.exports = {
            "unpack" : function(buffer, offset) {
                    var instruction = {
                            "header" : {"type" : 'OFPIT_GOTO_TABLE'},
                            "body" : {}
                        };

                    var len = buffer.readUInt16BE(offset + offsets.len, true);

                    if (len != ofp.sizes.ofp_instruction_goto_table) {
                        return {
                            "error" : {
                                "desc" : util.format('%s instruction at offset %d has invalid length (%d).', instruction.header.type, offset, len),
                                "type" : 'OFPET_BAD_INSTRUCTION', "code" : 'OFPBIC_UNKNOWN_INST'
                            }
                        }
                    }

                    instruction.body.table_id = buffer.readUInt8(offset + offsets.table_id, true);
                    if (instruction.body.table_id > ofp.ofp_table.OFPTT_MAX) {
                        return {
                            "instruction" : instruction,
                            "warnings" : [{
                                "desc" : util.format('%s instruction at offset %d has invalid table_id (%d).', instruction.header.type, offset, instruction.body.table_id),
                                "type" : 'OFPET_BAD_INSTRUCTION', "code" : 'OFPBIC_BAD_TABLE_ID'
                            }],
                            "offset" : offset + len
                        }
                    }

                    return {
                        "instruction" : instruction,
                        "offset" : offset + len
                    }
            },

            "pack" : function(instruction, buffer, offset) {
                    if (buffer.length < offset + ofp.sizes.ofp_instruction_goto_table) {
                        return {
                            error : { desc : util.format('%s instruction at offset %d does not fit the buffer.', instruction.header.type, offset)}
                        }
                    }
                    buffer.writeUInt16BE(ofp.ofp_instruction_type.OFPIT_GOTO_TABLE, offset + offsets.type, true);
                    buffer.writeUInt16BE(ofp.sizes.ofp_instruction_goto_table, offset + offsets.len, true);
                    buffer.writeUInt8(instruction.body.table_id, offset + offsets.table_id, true);
                    buffer.fill(0, offset + offsets.pad, offset + offsets.pad + 3);

                    if (instruction.body.table_id > ofp.ofp_table.OFPTT_MAX) {
                        return {
                            warnings: [{
                                desc: util.format('%s instruction at offset %d has invalid table_id (%d).', instruction.header.type, offset, instruction.body.table_id)
                            }],
                            offset : offset + ofp.sizes.ofp_instruction_goto_table
                        }
                    }

                    return {
                        offset : offset + ofp.sizes.ofp_instruction_goto_table
                    }
            }

}

})();


text:
/*
 * @test
 * @bug 4486049
 * @summary min and max methods fail if size changes in between a call to size
 *           and an attempt to iterate.
 * @author Josh Bloch
 */

import java.util.*;

public class MinMax {
    public static void main(String[] args) {
        Set s = new LyingSet();
        s.add("x");
        if (!Collections.min(s).equals("x"))
            throw new RuntimeException("1: " + Collections.min(s));
        if (!Collections.max(s).equals("x"))
            throw new RuntimeException("2: " + Collections.max(s));

        s.add("y");
        if (!Collections.min(s).equals("x"))
            throw new RuntimeException("3: " + Collections.min(s));
        if (!Collections.max(s).equals("y"))
            throw new RuntimeException("4: " + Collections.max(s));

        s.add("w");
        if (!Collections.min(s).equals("w"))
            throw new RuntimeException("5: " + Collections.min(s));
        if (!Collections.max(s).equals("y"))
            throw new RuntimeException("6: " + Collections.max(s));

        s.clear();
        s.add("x");
        if (!Collections.min(s, Collections.reverseOrder()).equals("x"))
            throw new RuntimeException("1a: " + Collections.min(s));
        if (!Collections.max(s, Collections.reverseOrder()).equals("x"))
            throw new RuntimeException("2a: " + Collections.max(s));

        s.add("y");
        if (!Collections.min(s, Collections.reverseOrder()).equals("y"))
            throw new RuntimeException("3a: " + Collections.min(s));
        if (!Collections.max(s, Collections.reverseOrder()).equals("x"))
            throw new RuntimeException("4a: " + Collections.max(s));

        s.add("w");
        if (!Collections.min(s, Collections.reverseOrder()).equals("y"))
            throw new RuntimeException("5a: " + Collections.min(s));
        if (!Collections.max(s, Collections.reverseOrder()).equals("w"))
            throw new RuntimeException("6a: " + Collections.max(s));
    }
}

class LyingSet extends LinkedHashSet {
    public int size() {
        return super.size() + 1; // Lies, lies, all lies!
    }
}


text:
/*!
 * \file
 * \brief Test KHR_partial_update
 *//*--------------------------------------------------------------------*/

#include "teglPartialUpdateTests.hpp"

#include "tcuImageCompare.hpp"
#include "tcuTestLog.hpp"
#include "tcuSurface.hpp"
#include "tcuTextureUtil.hpp"

#include "egluNativeWindow.hpp"
#include "egluUtil.hpp"
#include "egluConfigFilter.hpp"

#include "eglwLibrary.hpp"
#include "eglwEnums.hpp"

#include "gluDefs.hpp"
#include "gluRenderContext.hpp"
#include "gluShaderProgram.hpp"

#include "glwDefs.hpp"
#include "glwEnums.hpp"
#include "glwFunctions.hpp"

#include "deRandom.hpp"
#include "deString.h"

#include <string>
#include <vector>
#include <sstream>

using std::string;
using std::vector;
using glw::GLubyte;
using tcu::IVec2;

using namespace eglw;

namespace deqp
{
namespace egl
{
namespace
{

typedef	tcu::Vector<GLubyte, 3> Color;

class GLES2Renderer;

class ReferenceRenderer;

class PartialUpdateTest : public TestCase
{
public:
	enum DrawType
	{
		DRAWTYPE_GLES2_CLEAR,
		DRAWTYPE_GLES2_RENDER
	};

								PartialUpdateTest		(EglTestContext& eglTestCtx,
														 const vector<DrawType>& oddFrameDrawType,
														 const vector<DrawType>& evenFrameDrawType,
														 const char* name,
														 const char* description);
								~PartialUpdateTest		(void);

	void						init					(void);
	void						deinit					(void);
	IterateResult				iterate					(void);

private:
	eglu::NativeWindow*			m_window;
	EGLConfig					m_eglConfig;
	EGLContext					m_eglContext;

protected:
	void						initEGLSurface			(EGLConfig config);
	void						initEGLContext			(EGLConfig config);

	const int					m_seed;
	const vector<DrawType>	    m_oddFrameDrawType;
	const vector<DrawType>		m_evenFrameDrawType;

	bool						m_supportBufferAge;
	EGLDisplay					m_eglDisplay;
	EGLSurface					m_eglSurface;
	glw::Functions				m_gl;

	GLES2Renderer*				m_gles2Renderer;
	ReferenceRenderer*			m_refRenderer;
};

struct ColoredRect
{
public:
								ColoredRect (const IVec2& bottomLeft_, const IVec2& topRight_, const Color& color_);
	IVec2						bottomLeft;
	IVec2						topRight;
	Color						color;
};

ColoredRect::ColoredRect (const IVec2& bottomLeft_, const IVec2& topRight_, const Color& color_)
	: bottomLeft (bottomLeft_)
	, topRight	 (topRight_)
	, color		 (color_)
{
}

struct DrawCommand
{
								DrawCommand (const PartialUpdateTest::DrawType drawType_, const ColoredRect& rect_);
	PartialUpdateTest::DrawType	drawType;
	ColoredRect					rect;
};

DrawCommand::DrawCommand (const PartialUpdateTest::DrawType drawType_, const ColoredRect& rect_)
	: drawType	(drawType_)
	, rect		(rect_)
{
}

struct Frame
{
								Frame (int width_, int height_);
	int							width;
	int							height;
	vector<DrawCommand>			draws;
};

Frame::Frame (int width_, int height_)
	: width (width_)
	, height(height_)
{
}

// (x1,y1) lie in the lower-left quadrant while (x2,y2) lie in the upper-right.
// the coords are multiplied by 4 to amplify the minimial difference between coords to 4 (if not zero)
// to avoid the situation where two edges are too close to each other which makes the rounding error
// intoleratable by compareToReference()
void generateRandomFrame (Frame& dst, const vector<PartialUpdateTest::DrawType>& drawTypes, de::Random& rnd)
{
	for (size_t ndx = 0; ndx < drawTypes.size(); ndx++)
	{
		const int			x1			= rnd.getInt(0, (dst.width-1)/8) * 4;
		const int			y1			= rnd.getInt(0, (dst.height-1)/8) * 4;
		const int			x2			= rnd.getInt((dst.width-1)/8, (dst.width-1)/4) * 4;
		const int			y2			= rnd.getInt((dst.height-1)/8, (dst.height-1)/4) * 4;
		const GLubyte		r			= rnd.getUint8();
		const GLubyte		g			= rnd.getUint8();
		const GLubyte		b			= rnd.getUint8();
		const ColoredRect	coloredRect	(IVec2(x1, y1), IVec2(x2, y2), Color(r, g, b));
		const DrawCommand	drawCommand	(drawTypes[ndx], coloredRect);

		dst.draws.push_back(drawCommand);
	}
}

typedef vector<Frame> FrameSequence;

//helper function declaration
EGLConfig		getEGLConfig					(const Library& egl, EGLDisplay eglDisplay);
void			clearColorScreen				(const glw::Functions& gl, const tcu::Vec4& clearColor);
void			clearColorReference				(tcu::Surface* ref, const tcu::Vec4& clearColor);
void			readPixels						(const glw::Functions& gl, tcu::Surface* screen);
float			windowToDeviceCoordinates		(int x, int length);
bool			compareToReference				(tcu::TestLog& log, const tcu::Surface& reference, const tcu::Surface& buffer, int frameNdx, int bufferNum);
vector<int>		getFramesOnBuffer				(const vector<int>& bufferAges, int frameNdx);

class GLES2Renderer
{
public:
							GLES2Renderer		(const glw::Functions& gl);
							~GLES2Renderer		(void);
	void					render				(int width, int height, const Frame& frame) const;

private:
							GLES2Renderer		(const GLES2Renderer&);
	GLES2Renderer&			operator=			(const GLES2Renderer&);

	const glw::Functions&	m_gl;
	glu::ShaderProgram		m_glProgram;
	glw::GLuint				m_coordLoc;
	glw::GLuint				m_colorLoc;
};

// generate sources for vertex and fragment buffer
glu::ProgramSources getSources (void)
{
	const char* const vertexShaderSource =
		"attribute mediump vec2 a_pos;\n"
		"attribute mediump vec4 a_color;\n"
		"varying mediump vec4 v_color;\n"
		"void main(void)\n"
		"{\n"
		"\tv_color = a_color;\n"
		"\tgl_Position = vec4(a_pos, 0.0, 1.0);\n"
		"}";

	const char* const fragmentShaderSource =
		"varying mediump vec4 v_color;\n"
		"void main(void)\n"
		"{\n"
		"\tgl_FragColor = v_color;\n"
		"}";

	return glu::makeVtxFragSources(vertexShaderSource, fragmentShaderSource);
}

GLES2Renderer::GLES2Renderer (const glw::Functions& gl)
	: m_gl				(gl)
	, m_glProgram		(gl, getSources())
	, m_coordLoc		((glw::GLuint)-1)
	, m_colorLoc		((glw::GLuint)-1)
{
	m_colorLoc = m_gl.getAttribLocation(m_glProgram.getProgram(), "a_color");
	m_coordLoc = m_gl.getAttribLocation(m_glProgram.getProgram(), "a_pos");
	GLU_EXPECT_NO_ERROR(m_gl.getError(), "Failed to get attribute locations");
}

GLES2Renderer::~GLES2Renderer (void)
{
}

void GLES2Renderer::render (int width, int height, const Frame& frame) const
{
	for (size_t drawNdx = 0; drawNdx < frame.draws.size(); drawNdx++)
	{
		const ColoredRect& coloredRect = frame.draws[drawNdx].rect;

		if (frame.draws[drawNdx].drawType == PartialUpdateTest::DRAWTYPE_GLES2_RENDER)
		{
			const float x1 = windowToDeviceCoordinates(coloredRect.bottomLeft.x(), width);
			const float y1 = windowToDeviceCoordinates(coloredRect.bottomLeft.y(), height);
			const float x2 = windowToDeviceCoordinates(coloredRect.topRight.x(), width);
			const float y2 = windowToDeviceCoordinates(coloredRect.topRight.y(), height);

			const glw::GLfloat coords[] =
			{
				x1, y1,
				x1, y2,
				x2, y2,

				x2, y2,
				x2, y1,
				x1, y1,
			};

			const glw::GLubyte colors[] =
			{
				coloredRect.color.x(), coloredRect.color.y(), coloredRect.color.z(), 255,
				coloredRect.color.x(), coloredRect.color.y(), coloredRect.color.z(), 255,
				coloredRect.color.x(), coloredRect.color.y(), coloredRect.color.z(), 255,

				coloredRect.color.x(), coloredRect.color.y(), coloredRect.color.z(), 255,
				coloredRect.color.x(), coloredRect.color.y(), coloredRect.color.z(), 255,
				coloredRect.color.x(), coloredRect.color.y(), coloredRect.color.z(), 255,
			};

			m_gl.useProgram(m_glProgram.getProgram());
			GLU_EXPECT_NO_ERROR(m_gl.getError(), "glUseProgram() failed");

			m_gl.enableVertexAttribArray(m_coordLoc);
			m_gl.enableVertexAttribArray(m_colorLoc);
			GLU_EXPECT_NO_ERROR(m_gl.getError(), "Failed to enable attributes");

			m_gl.vertexAttribPointer(m_coordLoc, 2, GL_FLOAT, GL_FALSE, 0, coords);
			m_gl.vertexAttribPointer(m_colorLoc, 4, GL_UNSIGNED_BYTE, GL_TRUE, 0, colors);
			GLU_EXPECT_NO_ERROR(m_gl.getError(), "Failed to set attribute pointers");

			m_gl.drawArrays(GL_TRIANGLES, 0, DE_LENGTH_OF_ARRAY(coords)/2);
			GLU_EXPECT_NO_ERROR(m_gl.getError(), "glDrawArrays(), failed");

			m_gl.disableVertexAttribArray(m_coordLoc);
			m_gl.disableVertexAttribArray(m_colorLoc);
			GLU_EXPECT_NO_ERROR(m_gl.getError(), "Failed to disable attributes");

			m_gl.useProgram(0);
			GLU_EXPECT_NO_ERROR(m_gl.getError(), "glUseProgram() failed");
		}
		else if (frame.draws[drawNdx].drawType == PartialUpdateTest::DRAWTYPE_GLES2_CLEAR)
		{
			m_gl.enable(GL_SCISSOR_TEST);
			m_gl.scissor(coloredRect.bottomLeft.x(), coloredRect.bottomLeft.y(),
						 coloredRect.topRight.x()-coloredRect.bottomLeft.x(), coloredRect.topRight.y()-coloredRect.bottomLeft.y());
			m_gl.clearColor(coloredRect.color.x()/255.0f, coloredRect.color.y()/255.0f, coloredRect.color.z()/255.0f, 1.0f);
			m_gl.clear(GL_COLOR_BUFFER_BIT);
			m_gl.disable(GL_SCISSOR_TEST);
		}
		else
			DE_FATAL("Invalid drawtype");
	}
}

class ReferenceRenderer
{
public:
						ReferenceRenderer		(void);
	void				render					(tcu::Surface* target, const Frame& frame) const;
private:
						ReferenceRenderer		(const ReferenceRenderer&);
	ReferenceRenderer&	operator=				(const ReferenceRenderer&);
};

ReferenceRenderer::ReferenceRenderer(void)
{
}

void ReferenceRenderer::render (tcu::Surface* target, const Frame& frame) const
{
	for (size_t drawNdx = 0; drawNdx < frame.draws.size(); drawNdx++)
	{
		const ColoredRect& coloredRect = frame.draws[drawNdx].rect;
		if (frame.draws[drawNdx].drawType == PartialUpdateTest::DRAWTYPE_GLES2_RENDER || frame.draws[drawNdx].drawType == PartialUpdateTest::DRAWTYPE_GLES2_CLEAR)
		{
			const tcu::UVec4 color(coloredRect.color.x(), coloredRect.color.y(), coloredRect.color.z(), 255);
			tcu::clear(tcu::getSubregion(target->getAccess(), coloredRect.bottomLeft.x(), coloredRect.bottomLeft.y(),
										 coloredRect.topRight.x()-coloredRect.bottomLeft.x(), coloredRect.topRight.y()-coloredRect.bottomLeft.y()), color);
		}
		else
			DE_FATAL("Invalid drawtype");
	}
}

PartialUpdateTest::PartialUpdateTest (EglTestContext& eglTestCtx,
									  const vector<DrawType>& oddFrameDrawType,
									  const vector<DrawType>& evenFrameDrawType,
									  const char* name, const char* description)
	: TestCase				(eglTestCtx, name, description)
	, m_window				(DE_NULL)
	, m_eglContext			(EGL_NO_CONTEXT)
	, m_seed				(deStringHash(name))
	, m_oddFrameDrawType	(oddFrameDrawType)
	, m_evenFrameDrawType	(evenFrameDrawType)
	, m_supportBufferAge	(false)
	, m_eglDisplay			(EGL_NO_DISPLAY)
	, m_eglSurface			(EGL_NO_SURFACE)
	, m_gles2Renderer		(DE_NULL)
	, m_refRenderer			(DE_NULL)
{
}

PartialUpdateTest::~PartialUpdateTest (void)
{
	deinit();
}

void PartialUpdateTest::init (void)
{
	const Library&	egl	= m_eglTestCtx.getLibrary();

	m_eglDisplay		= eglu::getAndInitDisplay(m_eglTestCtx.getNativeDisplay());
	m_eglConfig			= getEGLConfig(m_eglTestCtx.getLibrary(), m_eglDisplay);

	//create surface and context and make them current
	initEGLSurface(m_eglConfig);
	initEGLContext(m_eglConfig);

	m_eglTestCtx.initGLFunctions(&m_gl, glu::ApiType::es(2,0));

	m_supportBufferAge = eglu::hasExtension(egl, m_eglDisplay, "EGL_EXT_buffer_age");

	if (!eglu::hasExtension(egl, m_eglDisplay, "EGL_KHR_partial_update"))
		TCU_THROW(NotSupportedError, "EGL_KHR_partial_update is not supported");

	m_gles2Renderer = new GLES2Renderer(m_gl);
	m_refRenderer   = new ReferenceRenderer();
}

void PartialUpdateTest::deinit (void)
{
	const Library& egl = m_eglTestCtx.getLibrary();

	delete m_refRenderer;
	m_refRenderer = DE_NULL;

	delete m_gles2Renderer;
	m_gles2Renderer = DE_NULL;

	if (m_eglContext != EGL_NO_CONTEXT)
	{
		egl.makeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
		egl.destroyContext(m_eglDisplay, m_eglContext);
		m_eglContext = EGL_NO_CONTEXT;
	}

	if (m_eglSurface != EGL_NO_SURFACE)
	{
		egl.destroySurface(m_eglDisplay, m_eglSurface);
		m_eglSurface = EGL_NO_SURFACE;
	}

	if (m_eglDisplay != EGL_NO_DISPLAY)
	{
		egl.terminate(m_eglDisplay);
		m_eglDisplay = EGL_NO_DISPLAY;
	}

	delete m_window;
	m_window = DE_NULL;
}

void PartialUpdateTest::initEGLSurface (EGLConfig config)
{
	const eglu::NativeWindowFactory& factory = eglu::selectNativeWindowFactory(m_eglTestCtx.getNativeDisplayFactory(), m_testCtx.getCommandLine());
	m_window = factory.createWindow(&m_eglTestCtx.getNativeDisplay(), m_eglDisplay, config, DE_NULL,
									eglu::WindowParams(480, 480, eglu::parseWindowVisibility(m_testCtx.getCommandLine())));
	m_eglSurface = eglu::createWindowSurface(m_eglTestCtx.getNativeDisplay(), *m_window, m_eglDisplay, config, DE_NULL);
}

void PartialUpdateTest::initEGLContext (EGLConfig config)
{
	const Library&	egl			 = m_eglTestCtx.getLibrary();
	const EGLint	attribList[] =
	{
		EGL_CONTEXT_CLIENT_VERSION, 2,
		EGL_NONE
	};

	egl.bindAPI(EGL_OPENGL_ES_API);
	m_eglContext = egl.createContext(m_eglDisplay, config, EGL_NO_CONTEXT, attribList);
	EGLU_CHECK_MSG(egl, "eglCreateContext");
	TCU_CHECK(m_eglSurface != EGL_NO_SURFACE);
	egl.makeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext);
	EGLU_CHECK_MSG(egl, "eglMakeCurrent");
}

// return indices of frames that have been written to the given buffer
vector<int> getFramesOnBuffer (const vector<int>& bufferAges, int frameNdx)
{
	DE_ASSERT(frameNdx < (int)bufferAges.size());
	vector<int> frameOnBuffer;
	int			age = bufferAges[frameNdx];
	while (age != 0)
	{
		frameNdx = frameNdx - age;
		DE_ASSERT(frameNdx >= 0);
		frameOnBuffer.push_back(frameNdx);
		age = bufferAges[frameNdx];
	}

	reverse(frameOnBuffer.begin(), frameOnBuffer.end());
	return frameOnBuffer;
}

vector<EGLint> getDamageRegion (const Frame& frame, int marginLeft, int marginBottom, int marginRight, int marginTop)
{
	vector<EGLint> damageRegion;
	for (size_t drawNdx = 0; drawNdx < frame.draws.size(); drawNdx++)
	{
		const ColoredRect& rect = frame.draws[drawNdx].rect;
		damageRegion.push_back(rect.bottomLeft.x() - marginLeft);
		damageRegion.push_back(rect.bottomLeft.y() - marginBottom);
		damageRegion.push_back(rect.topRight.x() - rect.bottomLeft.x() + marginLeft + marginRight);
		damageRegion.push_back(rect.topRight.y() - rect.bottomLeft.y() + marginBottom + marginTop);
	}

	DE_ASSERT(damageRegion.size() % 4 == 0);
	return damageRegion;
}

TestCase::IterateResult PartialUpdateTest::iterate (void)
{
	de::Random		rnd				(m_seed);
	const Library&	egl				= m_eglTestCtx.getLibrary();
	tcu::TestLog&	log				= m_testCtx.getLog();
	const int		width			= eglu::querySurfaceInt(egl, m_eglDisplay, m_eglSurface, EGL_WIDTH);
	const int		height			= eglu::querySurfaceInt(egl, m_eglDisplay, m_eglSurface, EGL_HEIGHT);
	const float		clearRed		= rnd.getFloat();
	const float		clearGreen		= rnd.getFloat();
	const float		clearBlue		= rnd.getFloat();
	const tcu::Vec4	clearColor		(clearRed, clearGreen, clearBlue, 1.0f);
	const int		numFrames		= 20;
	FrameSequence	frameSequence;
	vector<int>		bufferAges;
	bool			hasPositiveAge  = false;

	EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED));

	for (int frameNdx = 0; frameNdx < numFrames; frameNdx++)
	{
		tcu::Surface	currentBuffer	 (width, height);
		tcu::Surface	refBuffer		 (width, height);
		Frame			newFrame		 (width, height);
		EGLint			currentBufferAge = -1;

		if (frameNdx % 2 == 0)
			generateRandomFrame(newFrame, m_evenFrameDrawType, rnd);
		else
			generateRandomFrame(newFrame, m_oddFrameDrawType, rnd);

		frameSequence.push_back(newFrame);

		EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_BUFFER_AGE_KHR, &currentBufferAge));

		if (currentBufferAge > frameNdx || currentBufferAge < 0) // invalid buffer age
		{
			std::ostringstream stream;
			stream << "Fail, the age is invalid. Age: " << currentBufferAge << ", frameNdx: " << frameNdx;
			m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, stream.str().c_str());
			return STOP;
		}

		bufferAges.push_back(currentBufferAge);
		DE_ASSERT((int)bufferAges.size() == frameNdx+1);

		if (currentBufferAge > 0)
		{
			vector<EGLint>	damageRegion;

			hasPositiveAge = true;

			if (m_supportBufferAge)
			{
				damageRegion = getDamageRegion(newFrame, 10, 10, 10, 10);
			}
			else
			{
				damageRegion = getDamageRegion(newFrame, 0, 0, 0, 0);
				// Set empty damage region to avoid invalidating the framebuffer. The damage area is invalidated
				// if the buffer age extension is not supported.
				if (damageRegion.size() == 0)
					damageRegion = vector<EGLint>(4, 0);
			}

			EGLU_CHECK_CALL(egl, setDamageRegionKHR(m_eglDisplay, m_eglSurface, &damageRegion[0], (EGLint)damageRegion.size()/4));
		}
		else
		{
			EGLU_CHECK_CALL(egl, setDamageRegionKHR(m_eglDisplay, m_eglSurface, NULL, 0));
			clearColorScreen(m_gl, clearColor);
		}

		// during first half, just keep rendering without reading pixel back to mimic ordinary use case
		if (frameNdx < numFrames/2)
			m_gles2Renderer->render(width, height, newFrame);
		else // do verification in the second half
		{
			const vector<int> framesOnBuffer = getFramesOnBuffer(bufferAges, frameNdx);

			clearColorReference(&refBuffer, clearColor);

			for (vector<int>::const_iterator it = framesOnBuffer.begin(); it != framesOnBuffer.end(); it++)
				m_refRenderer->render(&refBuffer, frameSequence[*it]);

			m_gles2Renderer->render(width, height, newFrame);
			m_refRenderer->render(&refBuffer, newFrame);

			readPixels(m_gl, &currentBuffer);

			if (!compareToReference(log, refBuffer, currentBuffer, frameNdx, frameNdx))
			{
				string errorMessage("Fail, render result is wrong. Buffer age is ");
				errorMessage += (m_supportBufferAge ? "supported" : "not supported");
				m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, errorMessage.c_str());
				return STOP;
			}
		}
		EGLU_CHECK_CALL(egl, swapBuffers(m_eglDisplay, m_eglSurface));
	}

	if (!hasPositiveAge) // fraud behavior, pretend to support partial_update
	{
		m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail, claim to support partial_update but buffer age is always 0");
		return STOP;
	}

	m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
	return STOP;
}

string generateDrawTypeName (const vector<PartialUpdateTest::DrawType>& drawTypes)
{
	std::ostringstream stream;
	if (drawTypes.size() == 0)
		return string("_none");

	for (size_t ndx = 0; ndx < drawTypes.size(); ndx++)
	{
		if (drawTypes[ndx] == PartialUpdateTest::DRAWTYPE_GLES2_RENDER)
			stream << "_render";
		else if (drawTypes[ndx] == PartialUpdateTest::DRAWTYPE_GLES2_CLEAR)
			stream << "_clear";
		else
			DE_ASSERT(false);
	}
	return stream.str();
}

string generateTestName (const vector<PartialUpdateTest::DrawType>& oddFrameDrawType, const vector<PartialUpdateTest::DrawType>& evenFrameDrawType)
{
	return "odd" + generateDrawTypeName(oddFrameDrawType) + "_even" + generateDrawTypeName(evenFrameDrawType);
}

bool isWindow (const eglu::CandidateConfig& c)
{
	return (c.surfaceType() & EGL_WINDOW_BIT) == EGL_WINDOW_BIT;
}

bool isES2Renderable (const eglu::CandidateConfig& c)
{
	return (c.get(EGL_RENDERABLE_TYPE) & EGL_OPENGL_ES2_BIT) == EGL_OPENGL_ES2_BIT;
}

EGLConfig getEGLConfig (const Library& egl, EGLDisplay eglDisplay)
{
	eglu::FilterList filters;
	filters << isWindow << isES2Renderable;
	return eglu::chooseSingleConfig(egl, eglDisplay, filters);
}

void clearColorScreen (const glw::Functions& gl, const tcu::Vec4& clearColor)
{
	gl.clearColor(clearColor.x(), clearColor.y(), clearColor.z(), clearColor.w());
	gl.clear(GL_COLOR_BUFFER_BIT);
}

void clearColorReference (tcu::Surface* ref, const tcu::Vec4& clearColor)
{
	tcu::clear(ref->getAccess(), clearColor);
}

void readPixels (const glw::Functions& gl, tcu::Surface* screen)
{
	gl.readPixels(0, 0, screen->getWidth(), screen->getHeight(),  GL_RGBA, GL_UNSIGNED_BYTE, screen->getAccess().getDataPtr());
}

float windowToDeviceCoordinates (int x, int length)
{
	return (2.0f * float(x) / float(length)) - 1.0f;
}

bool compareToReference (tcu::TestLog& log,	 const tcu::Surface& reference, const tcu::Surface& buffer, int frameNdx, int bufferNum)
{
	std::ostringstream stream;
	stream << "FrameNdx = " << frameNdx << ", compare current buffer (numbered: " << bufferNum << ") to reference";
	return tcu::intThresholdPositionDeviationCompare(log, "partial update test", stream.str().c_str(), reference.getAccess(), buffer.getAccess(),
													 tcu::UVec4(8, 8, 8, 0), tcu::IVec3(2,2,0), true, tcu::COMPARE_LOG_RESULT);
}

class RenderOutsideDamageRegion : public PartialUpdateTest
{
public:
								RenderOutsideDamageRegion		(EglTestContext& eglTestCtx);
	TestCase::IterateResult		iterate							(void);
};

RenderOutsideDamageRegion::RenderOutsideDamageRegion (EglTestContext& eglTestCtx)
	: PartialUpdateTest (eglTestCtx, vector<DrawType>(1, DRAWTYPE_GLES2_RENDER), vector<DrawType>(1, DRAWTYPE_GLES2_RENDER), "render_outside_damage_region", "")
{
}

TestCase::IterateResult RenderOutsideDamageRegion::iterate (void)
{
	de::Random			rnd				(m_seed);
	const Library&		egl				= m_eglTestCtx.getLibrary();
	tcu::TestLog&		log				= m_testCtx.getLog();
	const int			width			= eglu::querySurfaceInt(egl, m_eglDisplay, m_eglSurface, EGL_WIDTH);
	const int			height			= eglu::querySurfaceInt(egl, m_eglDisplay, m_eglSurface, EGL_HEIGHT);
	const float			clearRed		= rnd.getFloat();
	const float			clearGreen		= rnd.getFloat();
	const float			clearBlue		= rnd.getFloat();
	const tcu::Vec4		clearColor		(clearRed, clearGreen, clearBlue, 1.0f);
	tcu::Surface		currentBuffer	(width, height);
	tcu::Surface		refBuffer		(width, height);
	Frame				frame			(width, height);

	EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED));

	generateRandomFrame(frame, m_evenFrameDrawType, rnd);

	{
		// render outside the region
		EGLint		   bufferAge	= -1;
		vector<EGLint> damageRegion = getDamageRegion(frame, 0, 0, 0, 0);

		EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_BUFFER_AGE_KHR, &bufferAge));
		EGLU_CHECK_CALL(egl, setDamageRegionKHR(m_eglDisplay, m_eglSurface, &damageRegion[0], (EGLint)damageRegion.size()/4));
		clearColorScreen(m_gl, clearColor);
		m_gles2Renderer->render(width, height, frame);

		// next line will make the bug on Nexus 6 disappear
		// readPixels(m_gl, &currentBuffer);
	}

	EGLU_CHECK_CALL(egl, swapBuffers(m_eglDisplay, m_eglSurface));

	// render a new frame
	clearColorScreen(m_gl, clearColor);
	m_gles2Renderer->render(width, height, frame);
	clearColorReference(&refBuffer, clearColor);
	m_refRenderer->render(&refBuffer, frame);
	readPixels(m_gl, &currentBuffer);

	if (!compareToReference(log, refBuffer, currentBuffer, 0, 0))
		m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail, fail to recover after rendering outside damageRegion");
	else
		m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");

	return STOP;
}

class RenderBeforeSetDamageRegion : public PartialUpdateTest
{
public:
								RenderBeforeSetDamageRegion		(EglTestContext& eglTestCtx);
	TestCase::IterateResult		iterate							(void);
};

RenderBeforeSetDamageRegion::RenderBeforeSetDamageRegion (EglTestContext& eglTestCtx)
	: PartialUpdateTest (eglTestCtx, vector<DrawType>(1, DRAWTYPE_GLES2_RENDER), vector<DrawType>(1, DRAWTYPE_GLES2_RENDER), "render_before_set_damage_region", "")
{
}

TestCase::IterateResult RenderBeforeSetDamageRegion::iterate (void)
{
	de::Random			rnd				(m_seed);
	const Library&		egl				= m_eglTestCtx.getLibrary();
	tcu::TestLog&		log				= m_testCtx.getLog();
	const int			width			= eglu::querySurfaceInt(egl, m_eglDisplay, m_eglSurface, EGL_WIDTH);
	const int			height			= eglu::querySurfaceInt(egl, m_eglDisplay, m_eglSurface, EGL_HEIGHT);
	const float			clearRed		= rnd.getFloat();
	const float			clearGreen		= rnd.getFloat();
	const float			clearBlue		= rnd.getFloat();
	const tcu::Vec4		clearColor		(clearRed, clearGreen, clearBlue, 1.0f);
	tcu::Surface		currentBuffer	(width, height);
	tcu::Surface		refBuffer		(width, height);
	Frame				frame			(width, height);

	EGLU_CHECK_CALL(egl, surfaceAttrib(m_eglDisplay, m_eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED));

	generateRandomFrame(frame, m_evenFrameDrawType, rnd);

	{
		// render before setDamageRegion
		EGLint		   bufferAge	= -1;
		vector<EGLint> damageRegion = getDamageRegion(frame, 0, 0, 0, 0);

		m_gles2Renderer->render(width, height, frame);
		EGLU_CHECK_CALL(egl, querySurface(m_eglDisplay, m_eglSurface, EGL_BUFFER_AGE_KHR, &bufferAge));
		EGLU_CHECK_CALL(egl, setDamageRegionKHR(m_eglDisplay, m_eglSurface, &damageRegion[0], (EGLint)damageRegion.size()/4));

		// next line will make the bug on Nexus 6 disappear
		// readPixels(m_gl, &currentBuffer);
	}

	EGLU_CHECK_CALL(egl, swapBuffers(m_eglDisplay, m_eglSurface));

	// render a new frame
	clearColorScreen(m_gl, clearColor);
	m_gles2Renderer->render(width, height, frame);
	clearColorReference(&refBuffer, clearColor);
	m_refRenderer->render(&refBuffer, frame);
	readPixels(m_gl, &currentBuffer);

	if (!compareToReference(log, refBuffer, currentBuffer, 0, 0))
		m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
	else
		m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");

	return STOP;
}

} // anonymous

PartialUpdateTests::PartialUpdateTests (EglTestContext& eglTestCtx)
	: TestCaseGroup(eglTestCtx, "partial_update", "Partial update tests")
{
}

void PartialUpdateTests::init (void)
{
	const PartialUpdateTest::DrawType clearRender[2] =
	{
		PartialUpdateTest::DRAWTYPE_GLES2_CLEAR,
		PartialUpdateTest::DRAWTYPE_GLES2_RENDER
	};

	const PartialUpdateTest::DrawType renderClear[2] =
	{
		PartialUpdateTest::DRAWTYPE_GLES2_RENDER,
		PartialUpdateTest::DRAWTYPE_GLES2_CLEAR
	};

	vector< vector<PartialUpdateTest::DrawType> > frameDrawTypes;
	frameDrawTypes.push_back(vector<PartialUpdateTest::DrawType> ());
	frameDrawTypes.push_back(vector<PartialUpdateTest::DrawType> (1, PartialUpdateTest::DRAWTYPE_GLES2_CLEAR));
	frameDrawTypes.push_back(vector<PartialUpdateTest::DrawType> (1, PartialUpdateTest::DRAWTYPE_GLES2_RENDER));
	frameDrawTypes.push_back(vector<PartialUpdateTest::DrawType> (2, PartialUpdateTest::DRAWTYPE_GLES2_CLEAR));
	frameDrawTypes.push_back(vector<PartialUpdateTest::DrawType> (2, PartialUpdateTest::DRAWTYPE_GLES2_RENDER));
	frameDrawTypes.push_back(vector<PartialUpdateTest::DrawType> (DE_ARRAY_BEGIN(clearRender), DE_ARRAY_END(clearRender)));
	frameDrawTypes.push_back(vector<PartialUpdateTest::DrawType> (DE_ARRAY_BEGIN(renderClear), DE_ARRAY_END(renderClear)));

	for (size_t evenNdx = 0; evenNdx < frameDrawTypes.size(); evenNdx++)
	{
		const vector<PartialUpdateTest::DrawType>& evenFrameDrawType = frameDrawTypes[evenNdx];

		for (size_t oddNdx = evenNdx; oddNdx < frameDrawTypes.size(); oddNdx++)
		{
			const vector<PartialUpdateTest::DrawType>&	oddFrameDrawType = frameDrawTypes[oddNdx];
			const std::string							name			 = generateTestName(oddFrameDrawType, evenFrameDrawType);
			if (oddFrameDrawType.size() == 0 && evenFrameDrawType.size() == 0)
				continue;

			addChild(new PartialUpdateTest(m_eglTestCtx, oddFrameDrawType, evenFrameDrawType, name.c_str(), ""));
		}
	}
	addChild(new RenderOutsideDamageRegion(m_eglTestCtx));
	addChild(new RenderBeforeSetDamageRegion(m_eglTestCtx));
}

} // egl
} // deqp


text:
/* Automatically generated code, don't edit ! */

package org.urish.gwtit.titanium.ui;

import org.urish.gwtit.titanium.ui.events.AndroidBackHandler;
import org.urish.gwtit.titanium.ui.events.AndroidCameraHandler;
import org.urish.gwtit.titanium.ui.events.AndroidFocusHandler;
import org.urish.gwtit.titanium.ui.events.AndroidSearchHandler;
import org.urish.gwtit.titanium.ui.events.AndroidVolumeDownHandler;
import org.urish.gwtit.titanium.ui.events.AndroidVolumeUpHandler;
import org.urish.gwtit.titanium.ui.events.CloseHandler;
import org.urish.gwtit.titanium.ui.events.OpenHandler;
import org.urish.gwtit.titanium.ui.events.WindowBlurHandler;
import org.urish.gwtit.titanium.ui.events.WindowFocusHandler;

import com.google.gwt.core.client.JavaScriptObject;

/**
 * The Window is an empty drawing surface or container. The Window is created by
 * the method {@link org.urish.gwtit.titanium.ui.createWindow}. Unlike
 * [Views](Titanium.UI.View-object), Windows can be opened and closed and can
 * have special display properties such as `fullscreen` or `modal`.
 * <p>
 * Notes: ### Sub-contexts
 *
 * Windows can be loaded from another Javascript file by specifying the property
 * `url` and reference a file relative to your application `Resources` folder.
 * It's important to note that Titanium will refuse to load Javascript files
 * from a remote URL. Loading remote Javascript from a URL and providing it with
 * the full capabilities of the Titanium API would be very dangerous.
 *
 * When you Window is loaded from a separate Javascript file, the code will be
 * executed in a separate Javascript context (called a "sub-context") than your
 * `app.js` global context. It will also execute in its own separate thread.
 *
 * The special property <Titanium.UI.currentWindow> is available inside a
 * sub-context that points to the Javascript instance by reference in the global
 * context.
 *
 *
 * ### Passing Data
 *
 * By default, sub-context variables cannot access Javascript references in the
 * global context. However, the global context can allow its sub-contexts the
 * ability to have access to properties and functions in the global context by
 * reference assignment. An example best illustrates how to do this.
 *
 * In `app.js`, you could define a function and a property.
 *
 * var a = 1; function b() { return "hello"; }
 *
 * Now, you can create a new Window - let's call it `foo.js` - in your `app.js`.
 *
 * var w = Titanium.UI.createWindow({ url:'foo.js' });
 *
 * To _give_ your new window access to both `a` and `b`, you would need to
 * assign them to the new window reference `w`.
 *
 * w.a = a; w.b = b;
 *
 * Of course, you could give them a different name than their original names.
 * However, what name you give them in your `app.js` is how you will reference
 * them in `foo.js`. Now, let's look at the code for `foo.js`.
 *
 * alert("b() = "+Titanium.UI.currentWindow.b());
 *
 * In the above code, the `foo.js` will execute the function `b` in the global
 * context and return the result. Since `b` is a reference (vs. a copy by
 * value), any changes made to these Javascript references will be immediately
 * available in all sub-contexts.
 *
 * ### Events
 *
 * If you'd like to send events to a window from the global context and vice
 * versa, you could use the built-in event mechanism. For example, you could
 * define a custom event called `foo`. The window could listen for this event
 * and then respond with some action. For example, in your sub-context you might
 * define:
 *
 * Titanium.UI.currentWindow.addEventListener('foo',function(e) {
 * Titanium.API.info("foo event received = "+JSON.stringify(e)); });
 *
 * You could now fire the event from `app.js` like this:
 *
 * var window = Titanium.UI.createWindow({ url:'bar.js' }); window.open();
 * window.fireEvent('foo',{a:'b'});
 *
 * It's worth noting two important limitations of the example above:
 *
 * You must open the window before you can send events to it. You also may have
 * to fire the event after a specified amount of time if you intend to
 * immediately send data to the window. This is because windows are opened
 * asynchronously and on a separate thread than the caller thread. You can only
 * send JSON-serializable data in a fireEvent. If you attempt to send objects
 * that have function references, they will be null.
 *
 *
 * ### Animations
 *
 * Windows can be animated like any normal [View](Titanium.UI.View). To
 * transition between 2 windows, you can use the `transition` property on an
 * animation. For example, to flip right-to-left between two windows, you could
 * do the following:
 *
 * var window2 = Titanium.UI.createWindow({url:'foo.js'}); var t =
 * Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT;
 * window1.animate({view:window2,transition:t});
 *
 * In the above example, the `window2` view will be animated from the
 * right-to-left over `window1`.
 *
 * Windows can be opened or closed with animation. In the example below, we
 * create a window that will open from small to large with a bounce effect. This
 * is done by applying a transformation at initialization time that scales the
 * original size of the window to 0. When the window is opened, a new 2D
 * transformation is applied that will scale the window size from 0 to 110% of
 * it's original size and then, after 1/20th of a second, will scale it back to
 * it's original size at 100%. This gives the bounce effect during animation.
 *
 * var t = Titanium.UI.create2DMatrix().scale(0);
 *
 * // create a window with the initial transform scaled to 0 var w =
 * Titanium.UI.createWindow({ backgroundColor:'#336699', borderWidth:8,
 * borderColor:'#999', height:400, width:300, borderRadius:10, opacity:0.92,
 * transform:t });
 *
 * // create first transform to go beyond normal size var t1 =
 * Titanium.UI.create2DMatrix().scale(1.1);
 *
 * var a = Titanium.UI.createAnimation(); a.transform = t1; a.duration = 200;
 *
 * // when this animation completes, scale to normal size
 * a.addEventListener('complete', function() { // we can use the identity
 * transform to take it back to it's real size var t2 =
 * Titanium.UI.create2DMatrix(); w.animate({transform:t2, duration:200}); });
 *
 * ### iPad Modal Windows
 *
 * For iPad, iPhone SDK 3.2 and Titanium 1.2 introduced several new ways of
 * presenting modal windows.
 *
 * The example below is a modal window.
 *
 * ![modal](http://img.skitch.com/20100406-bqb3f8pb6e4ger7wkcdcw5mbar.png)
 *
 * You can create this type of modal window on iPad with the following code
 * snippet:
 *
 * var window = Titanium.UI.createWindow(); window.open({ modal:true,
 * modalTransitionStyle: Ti.UI.iPhone.MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL,
 * modalStyle: Ti.UI.iPhone.MODAL_PRESENTATION_FORMSHEET })
 *
 * ### Android "root" Windows
 *
 * In Android, you may wish to specify that a window which you create (such as
 * the first window) should be considered the root window and that the
 * application should exit when the back button is pressed from that window.
 * This is particularly useful if your application is not using a Tab Group and
 * therefore the splash screen window is appearing whenever you press the back
 * button from your lowest window on the stack.
 *
 * To indicate that a particular window should cause an application to exit when
 * the back button is pressed, pass `exitOnClose: true` as one of the creation
 * arguments, as shown here:
 *
 * var win = Titanium.UI.createWindow({ title: 'My Root Window', exitOnClose:
 * true });
 *
 * @since 0.9
 */
public class Window extends org.urish.gwtit.titanium.ui.View {
	protected Window() {
	}

	/**
	 * @return For heavyweight windows, this property contains a reference to
	 *         the Android Activity object associated with this window.
	 *
	 * @platforms android
	 */
	public final native org.urish.gwtit.titanium.android.Activity getActivity()
	/*-{
		return this.activity;
	}-*/;

	public final native void setActivity(org.urish.gwtit.titanium.android.Activity value)
	/*-{
		this.activity = value;
	}-*/;

	/**
	 * @return Title for the back button. This is only valid when the window is
	 *         a child of a tab.
	 * @platforms iphone, ipad
	 */
	public final native String getBackButtonTitle()
	/*-{
		return this.backButtonTitle;
	}-*/;

	public final native void setBackButtonTitle(String value)
	/*-{
		this.backButtonTitle = value;
	}-*/;

	/**
	 * @return Url to an image to show as the back button.This is only valid
	 *         when the window is a child of a tab.
	 * @platforms iphone, ipad
	 */
	public final native String getBackButtonTitleImage()
	/*-{
		return this.backButtonTitleImage;
	}-*/;

	public final native void setBackButtonTitleImage(String value)
	/*-{
		this.backButtonTitleImage = value;
	}-*/;

	/**
	 * @return Web named color or hex value for the color of the nav bar.
	 * @platforms iphone, ipad
	 */
	public final native String getBarColor()
	/*-{
		return this.barColor;
	}-*/;

	public final native void setBarColor(String value)
	/*-{
		this.barColor = value;
	}-*/;

	/**
	 * @return Url to a local image to place as the background of the nav bar.
	 * @platforms iphone, ipad
	 */
	public final native String getBarImage()
	/*-{
		return this.barImage;
	}-*/;

	public final native void setBarImage(String value)
	/*-{
		this.barImage = value;
	}-*/;

	/**
	 * @default False
	 * @return Boolean indicates if the application should exit when the Android
	 *         back button is pressed while the window is being shown. You can
	 *         only set this as a createWindow({...}) option. Setting it after
	 *         window creation will no effect.
	 * @platforms android
	 */
	public final native boolean getExitOnClose()
	/*-{
		return this.exitOnClose;
	}-*/;

	public final native void setExitOnClose(boolean value)
	/*-{
		this.exitOnClose = value;
	}-*/;

	/**
	 * @return Boolean indicates if the window is fullscreen (no device chrome)
	 */
	public final native boolean getFullscreen()
	/*-{
		return this.fullscreen;
	}-*/;

	public final native void setFullscreen(boolean value)
	/*-{
		this.fullscreen = value;
	}-*/;

	/**
	 * @return View to show in the left nav bar area.
	 * @platforms iphone, ipad
	 */
	public final native JavaScriptObject getLeftNavButton()
	/*-{
		return this.leftNavButton;
	}-*/;

	public final native void setLeftNavButton(JavaScriptObject value)
	/*-{
		this.leftNavButton = value;
	}-*/;

	/**
	 * @default False
	 * @return Boolean to indicate if the window should be opened modal in front
	 *         of other windows. Android note: the combination of
	 *         `fullscreen:true` and `modal:true` will not work as expected.
	 *         Android modal windows are translucent, and, in Android, the
	 *         contents of a translucent window cannot appear above the status
	 *         bar. I.e., even though you say `fullscreen:true`, the status bar
	 *         will still be visible *if* it was visible in the previous window.
	 *         `navBarHidden` and `modal` do work fine together, however.
	 */
	public final native boolean getModal()
	/*-{
		return this.modal;
	}-*/;

	public final native void setModal(boolean value)
	/*-{
		this.modal = value;
	}-*/;

	/**
	 * @default False
	 * @return For modal windows, hide the nav bar (true) or show the nav bar
	 *         (false, default).
	 */
	public final native boolean getNavBarHidden()
	/*-{
		return this.navBarHidden;
	}-*/;

	public final native void setNavBarHidden(boolean value)
	/*-{
		this.navBarHidden = value;
	}-*/;

	/**
	 * @return Array of orientation mode constants defined in {@link
	 *         org.urish.gwtit..Titanium.UI}. On Android, orientation modes that
	 *         can be set are dependant on the Android SDK level of the device
	 *         itself. It should be noted that, the definition of portrait or
	 *         landscape mode can vary based on the physical orientation of the
	 *         device. For example, on some devices
	 *         {@link org.urish.gwtit.titanium.UI.LANDSCAPE_LEFT} represents the
	 *         top of the device being at the 270 degree position but other
	 *         devices may (based on camera position for example) treat this
	 *         position as {@link org.urish.gwtit.titanium.UI.LANDSCAPE_RIGHT}.
	 *         In general, applications for Android that need to be aware of
	 *         orientation should try and limit their orientation logic to
	 *         handling either portrait or landscape rather than worrying about
	 *         the reverse modes. This approach will allow the orientation modes
	 *         to adopt a more natural feel for the specific device.
	 *
	 *         The following list breaks down the orientation behavior on
	 *         Android: 1) ({@link org.urish.gwtit.titanium.UI.PORTRAIT} OR
	 *         {@link org.urish.gwtit.titanium.UI.UPSIDE_PORTRAIT}) AND (
	 *         {@link org.urish.gwtit.titanium.UI.LANDSCAPE_LEFT} OR
	 *         {@link org.urish.gwtit.titanium.UI.LANDSCAPE_RIGHT}) - Enables
	 *         full sensor which lets the operating system control the
	 *         orientation of the screen based on the sensor inside the device.
	 *         2) {@link org.urish.gwtit.titanium.UI.PORTRAIT} OR
	 *         {@link org.urish.gwtit.titanium.UI.UPSIDE_PORTRAIT} - Enables
	 *         sensor portrait mode on Android 2.3 and above. Sensor portrait
	 *         mode on Android means the screen will shift between both portrait
	 *         modes according to the sensor inside the device. If the Android
	 *         version is less than 2.3, then normal portrait mode is locked. 3)
	 *         {@link org.urish.gwtit.titanium.UI.LANDSCAPE_LEFT} OR
	 *         {@link org.urish.gwtit.titanium.UI.LANDSCAPE_RIGHT} - Enables
	 *         sensor landscape mode on Android 2.3 and above. Sensor landscape
	 *         mode on Android means the screen will shift between both
	 *         landscape modes according to the sensor inside the device. If the
	 *         Android version is less than 2.3, then normal landscape mode is
	 *         locked. 4) {@link org.urish.gwtit.titanium.UI.PORTRAIT} - Locks
	 *         screen orientation to portrait mode 5)
	 *         {@link org.urish.gwtit.titanium.UI.LANDSCAPE} - Locks screen
	 *         orientation to landscape mode 6) empty array - resets the
	 *         orientation to default sensor control
	 */
	public final native int[] getOrientationModes()
	/*-{
		return this.orientationModes;
	}-*/;

	public final native void setOrientationModes(int[] value)
	/*-{
		this.orientationModes = value;
	}-*/;

	/**
	 * @return Current orientation of the window. Value will be one of the
	 *         orientation constants defined in {@link
	 *         org.urish.gwtit..Titanium.UI}.
	 */
	public final native int getOrientation()
	/*-{
		return this.orientation;
	}-*/;

	public final native void setOrientation(int value)
	/*-{
		this.orientation = value;
	}-*/;

	/**
	 * @return View to show in the right nav bar area.
	 * @platforms iphone, ipad
	 */
	public final native org.urish.gwtit.titanium.ui.View getRightNavButton()
	/*-{
		return this.rightNavButton;
	}-*/;

	public final native void setRightNavButton(org.urish.gwtit.titanium.ui.View value)
	/*-{
		this.rightNavButton = value;
	}-*/;

	/**
	 * @return Boolean to indicate if the tab bar should be hidden. this is only
	 *         valid when the window is a child of a tab.
	 */
	public final native boolean getTabBarHidden()
	/*-{
		return this.tabBarHidden;
	}-*/;

	public final native void setTabBarHidden(boolean value)
	/*-{
		this.tabBarHidden = value;
	}-*/;

	/**
	 * @return Title of the window.
	 */
	public final native String getTitle()
	/*-{
		return this.title;
	}-*/;

	public final native void setTitle(String value)
	/*-{
		this.title = value;
	}-*/;

	/**
	 * @return View to show in the title area.
	 * @platforms iphone, ipad
	 */
	public final native org.urish.gwtit.titanium.ui.View getTitleControl()
	/*-{
		return this.titleControl;
	}-*/;

	public final native void setTitleControl(org.urish.gwtit.titanium.ui.View value)
	/*-{
		this.titleControl = value;
	}-*/;

	/**
	 * @return Url to a image that show in the title area.
	 * @platforms iphone, ipad
	 */
	public final native String getTitleImage()
	/*-{
		return this.titleImage;
	}-*/;

	public final native void setTitleImage(String value)
	/*-{
		this.titleImage = value;
	}-*/;

	/**
	 * @return Title prompt for the window.
	 */
	public final native String getTitlePrompt()
	/*-{
		return this.titlePrompt;
	}-*/;

	public final native void setTitlePrompt(String value)
	/*-{
		this.titlePrompt = value;
	}-*/;

	/**
	 * @return The key in the locale file to use for the title property
	 */
	public final native String getTitleid()
	/*-{
		return this.titleid;
	}-*/;

	public final native void setTitleid(String value)
	/*-{
		this.titleid = value;
	}-*/;

	/**
	 * @return The key in the locale file to use for the titlePrompt property
	 */
	public final native String getTitlepromptid()
	/*-{
		return this.titlepromptid;
	}-*/;

	public final native void setTitlepromptid(String value)
	/*-{
		this.titlepromptid = value;
	}-*/;

	/**
	 * @return Array of button objects to show in the toolbar of the window.
	 *         This is only valid when the window is a child of a tab.
	 * @platforms iphone, ipad
	 */
	public final native JavaScriptObject[] getToolbar()
	/*-{
		return this.toolbar;
	}-*/;

	public final native void setToolbar(JavaScriptObject[] value)
	/*-{
		this.toolbar = value;
	}-*/;

	/**
	 * @return Boolean to indicate if the nav bar is translucent.
	 * @platforms iphone, ipad
	 */
	public final native boolean getTranslucent()
	/*-{
		return this.translucent;
	}-*/;

	public final native void setTranslucent(boolean value)
	/*-{
		this.translucent = value;
	}-*/;

	/**
	 * @return Url to a JavaScript file with the windows instructions. this
	 *         window will create a new JavaScript sub-context that will run in
	 *         its own thread and global variable space.
	 */
	public final native String getUrl()
	/*-{
		return this.url;
	}-*/;

	public final native void setUrl(String value)
	/*-{
		this.url = value;
	}-*/;

	/**
	 * @return One of
	 *         {@link org.urish.gwtit.titanium.ui.Android.SOFT_INPUT_ADJUST_PAN}
	 *         ,
	 *         {@link org.urish.gwtit.titanium.ui.Android.SOFT_INPUT_ADJUST_RESIZE}
	 *         , or
	 *         {@link org.urish.gwtit.titanium.ui.Android.SOFT_INPUT_ADJUST_UNSPECIFIED}
	 *         . Note: MUST be passed in the creation options. (Android Only)
	 *         [Android Doc:
	 *         Window.setSoftInputMode](http://developer.android.com
	 *         /reference/android/view/Window.html#setSoftInputMode(int))
	 *
	 * @platforms android
	 */
	public final native int getWindowSoftInputMode()
	/*-{
		return this.windowSoftInputMode;
	}-*/;

	public final native void setWindowSoftInputMode(int value)
	/*-{
		this.windowSoftInputMode = value;
	}-*/;

	/**
	 * @return Set the pixel format for the Activity's Window. The property is
	 *         ignored on a Titanium "lightweight" Window. Use one of the
	 *         {@link org.urish.gwtit.titanium.ui.Android}.PIXEL_FORMAT
	 *         constants to set the format. See [Android SDK
	 *         Window.setFormat](http
	 *         ://developer.android.com/reference/android/view
	 *         /Window.html#setFormat(int))
	 *
	 * @platforms android
	 * @since 1.8.0
	 */
	public final native float getWindowPixelFormat()
	/*-{
		return this.windowPixelFormat;
	}-*/;

	public final native void setWindowPixelFormat(float value)
	/*-{
		this.windowPixelFormat = value;
	}-*/;

	/**
	 * Close the window
	 */
	public final native void close()
	/*-{
		return this.close();
	}-*/;

	/**
	 * Close the window
	 *
	 * @param options
	 *            close the window with optional animation or display properties
	 */
	public final native void close(JavaScriptObject options)
	/*-{
		return this.close(options);
	}-*/;

	/**
	 * Open the window
	 */
	public final native void open()
	/*-{
		return this.open();
	}-*/;

	/**
	 * Open the window
	 *
	 * @param options
	 *            open the window with optional animation or display properties
	 */
	public final native void open(JavaScriptObject options)
	/*-{
		return this.open(options);
	}-*/;

	public final native void addAndroidBackHandler(AndroidBackHandler handler)
	/*-{
		return this.addEventListener('android:back', function(e) { handler.@org.urish.gwtit.titanium.ui.events.AndroidBackHandler::onAndroidBack(Lorg/urish/gwtit/titanium/ui/events/AndroidBackEvent;)(e); } );
	}-*/;

	public final native void addAndroidCameraHandler(AndroidCameraHandler handler)
	/*-{
		return this.addEventListener('android:camera', function(e) { handler.@org.urish.gwtit.titanium.ui.events.AndroidCameraHandler::onAndroidCamera(Lorg/urish/gwtit/titanium/ui/events/AndroidCameraEvent;)(e); } );
	}-*/;

	public final native void addAndroidFocusHandler(AndroidFocusHandler handler)
	/*-{
		return this.addEventListener('android:focus', function(e) { handler.@org.urish.gwtit.titanium.ui.events.AndroidFocusHandler::onAndroidFocus(Lorg/urish/gwtit/titanium/ui/events/AndroidFocusEvent;)(e); } );
	}-*/;

	public final native void addAndroidSearchHandler(AndroidSearchHandler handler)
	/*-{
		return this.addEventListener('android:search', function(e) { handler.@org.urish.gwtit.titanium.ui.events.AndroidSearchHandler::onAndroidSearch(Lorg/urish/gwtit/titanium/ui/events/AndroidSearchEvent;)(e); } );
	}-*/;

	public final native void addAndroidVolumeDownHandler(AndroidVolumeDownHandler handler)
	/*-{
		return this.addEventListener('android:voldown', function(e) { handler.@org.urish.gwtit.titanium.ui.events.AndroidVolumeDownHandler::onAndroidVolumeDown(Lorg/urish/gwtit/titanium/ui/events/AndroidVolumeDownEvent;)(e); } );
	}-*/;

	public final native void addAndroidVolumeUpHandler(AndroidVolumeUpHandler handler)
	/*-{
		return this.addEventListener('android:volup', function(e) { handler.@org.urish.gwtit.titanium.ui.events.AndroidVolumeUpHandler::onAndroidVolumeUp(Lorg/urish/gwtit/titanium/ui/events/AndroidVolumeUpEvent;)(e); } );
	}-*/;

	public final native void addBlurHandler(WindowBlurHandler handler)
	/*-{
		return this.addEventListener('blur', function(e) { handler.@org.urish.gwtit.titanium.ui.events.WindowBlurHandler::onWindowBlur(Lorg/urish/gwtit/titanium/ui/events/WindowBlurEvent;)(e); } );
	}-*/;

	public final native void addCloseHandler(CloseHandler handler)
	/*-{
		return this.addEventListener('close', function(e) { handler.@org.urish.gwtit.titanium.ui.events.CloseHandler::onClose(Lorg/urish/gwtit/titanium/ui/events/CloseEvent;)(e); } );
	}-*/;

	public final native void addFocusHandler(WindowFocusHandler handler)
	/*-{
		return this.addEventListener('focus', function(e) { handler.@org.urish.gwtit.titanium.ui.events.WindowFocusHandler::onWindowFocus(Lorg/urish/gwtit/titanium/ui/events/WindowFocusEvent;)(e); } );
	}-*/;

	public final native void addOpenHandler(OpenHandler handler)
	/*-{
		return this.addEventListener('open', function(e) { handler.@org.urish.gwtit.titanium.ui.events.OpenHandler::onOpen(Lorg/urish/gwtit/titanium/ui/events/OpenEvent;)(e); } );
	}-*/;

}


text:
@interface NSString (Hash_YAH)

- (NSString *)MD5;

- (NSString *)hmacSha1WithKey:(NSString*)key;

@end


text:
<?php

namespace JP\JobBoardBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\Persistence\ObjectManager;

use JP\JobBoardBundle\Entity\Country;

class LoadCountryData extends AbstractFixture implements FixtureInterface, OrderedFixtureInterface {

    public function load(ObjectManager $manager) {
        $country1 = new Country();
        $country1->setName('UAE');
		$country1->setCode('ARE');
		$country1->setSlug('uae');
        $manager->persist($country1);

        $country2 = new Country();
        $country2->setName('Qatar');
        $country2->setCode('QAT');
		$country2->setSlug('qatar');
        $manager->persist($country2);

        $country3 = new Country();
        $country3->setName('Saudi Arabia');
        $country3->setCode('SAU');
		$country3->setSlug('saudi-arabia');
        $manager->persist($country3);

        $country4 = new Country();
        $country4->setName('Kuwait');
        $country4->setCode('KWT');
		$country4->setSlug('kuwait');
        $manager->persist($country4);

		$country5 = new Country();
		$country5->setName('Oman');
		$country5->setCode('OMN');
		$country5->setSlug('oman');
		$manager->persist($country5);

		$country6 = new Country();
		$country6->setName('Bahrain');
		$country6->setCode('BHR');
		$country6->setSlug('bahrain');
		$manager->persist($country6);

		$country7 = new Country();
		$country7->setName('Egypt');
		$country7->setCode('EGY');
		$country7->setSlug('egypt');
		$manager->persist($country7);

		$country8 = new Country();
		$country8->setName('Iraq');
		$country8->setCode('IRQ');
		$country8->setSlug('iraq');
		$manager->persist($country8);

		$country9 = new Country();
		$country9->setName('Afghanistan');
		$country9->setCode('AFG');
		$country9->setSlug('afghanistan');
		$manager->persist($country9);

		$country10 = new Country();
		$country10->setName('Jordan');
		$country10->setCode('JOR');
		$country10->setSlug('jordan');
		$manager->persist($country10);

		$country11 = new Country();
		$country11->setName('Lebanon');
		$country11->setCode('LBN');
		$country11->setSlug('lebanon');
		$manager->persist($country11);

		$country12 = new Country();
		$country12->setName('Libya');
		$country12->setCode('LBY');
		$country12->setSlug('libya');
		$manager->persist($country12);

		$country13 = new Country();
		$country13->setName('Syria');
		$country13->setCode('SYR');
		$country13->setSlug('syria');
		$manager->persist($country13);

        $manager->flush();

		$this->addReference('uae', $country1);
		$this->addReference('qatar', $country2);
		$this->addReference('saudi', $country3);
		$this->addReference('kuwait', $country4);
		$this->addReference('oman', $country5);
    }

	public function getOrder() {
		return 1;
	}
}


text:
package com.pineone.icbms.so.virtualobject.context.contextmodel;

import com.pineone.icbms.so.virtualobject.common.IVirtualEntity;

/**
 * Context Model interface.<BR/>
 *
 * Created by uni4love on 2016. 11. 16..
 */
public interface IContextModel extends IVirtualEntity {
}


text:
<?php
namespace TYPO3\Flow\Mvc\Exception;

/**
 * This exception is thrown by a controller to stop the execution of the current
 * action and return the control to the dispatcher. The dispatcher catches this
 * exception and - depending on the "dispatched" status of the request - either
 * continues dispatching the request or returns control to the request handler.
 *
 * See the Action Controller's forward() and redirectToUri() methods for more information.
 *
 * @api
 */
class StopActionException extends \TYPO3\Flow\Mvc\Exception
{
}


text:
Welcome to Outer Circle!
Use this readme to get started setting up and exploring Outer Cricle!

## Inspiration
Has it been difficult for you to make friends? Imagine you as a recent college grad moved to Portland to land a job and you are looking for local things to do in town but you find it difficult to find a friend to hang out with. Despite the abundance of social media networks, you are not connected with anyone in Portland. You are open to meet with people who are different from you but you don't know how to go about finding them. Outer Circle is here to help to "expand their horizons. It helps you to find others who, despite differences, share the same interests as you and connects you to their profiles.

## How it works

1) The user logs into the website using their LinkedIn credentials and their profile is pulled into "OuterCircle." 2) They then are asked brief questions to find their interests
3) The app then finds dissimilar people with common interests to the user that they can connect with. 4) These profiles are presented and the user selects who they want to connect with. 5) If a match is made a chat is created between the users allowing them to learn more about each other and plan a meetup, if desired.

## Target audience

Social media users looking to connect with new people to expand their horizons.

## Required tools

If you don't already have these tools, download and install them before you start working with the Apparel Store app.

* Modern web browser (may we suggest [Chrome?](https://www.google.com/chrome/browser))
* Command Line Interface (CLI)
	* Mac OSX: Terminal is already installed, or try [iTerm](https://www.iterm2.com/)
	* Windows: Command Prompt (DOS)
* [Node.js](https://nodejs.org/download/)
* A text editor or coding tool of your choice. [Sublime Text 2](http://www.sublimetext.com/2) is available for free for Mac and Windows, but will occassionally ask you to purchase a license when you save your files.

## Setup

Once you have all prerequisites installed, open your CLI and navigate to the project folder.

_New to command line?_ Navigate to the project folder using `cd` (which stands for change directory). If you know the full path of the directory you can type it in, or you can click and drag the folder over to your CLI window and it will automatically fill in the path to that folder.

		cd /Users/mycomp/Documents/we-code-node-starter

Press return, and you'll be taken to that folder.

To install the app, type `npm install` and press return. You should see several packages and dependencies being installed.

To start the app, type `node app.js` in the command line. After a few seconds, you should see a success message. Keep your command line tool open, and open a new tab in your web browser. In the URL bar, type `http://localhost:8889/static/index.html`.

To stop serving the page to your browser, press Control+C in the CLI.


text:
PACKAGE_NAME=zabbix
PACKAGE_VERSION=${1:-6.2.3rc2}
PACKAGE_URL=https://github.com/zabbix/zabbix.git

yum update -y
curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm     && dnf install -y epel-release-latest-8.noarch.rpm     && rm -f epel-release-latest-8.noarch.rpm

yum install -y wget yum-utils
yum-config-manager --add-repo http://mirror.centos.org/centos/8-stream/AppStream/ppc64le/os/ && yum-config-manager --add-repo http://mirror.centos.org/centos/8-stream/PowerTools/ppc64le/os/ && yum-config-manager --add-repo http://mirror.centos.org/centos/8-stream/BaseOS/ppc64le/os/ && yum-config-manager --add-repo http://mirror.centos.org/centos/8-stream/virt/ppc64le/ovirt-44/
wget https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official && mv RPM-GPG-KEY-CentOS-Official /etc/pki/rpm-gpg/. && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Official
wget https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Virtualization && mv RPM-GPG-KEY-CentOS-SIG-Virtualization /etc/pki/rpm-gpg/. && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization
yum install -y initscripts httpd tar wget curl vim gcc make net-snmp php-mysqlnd  git httpd php libcurl-devel libxml2-devel php-xml php-gd php-bcmath php-mbstring php-ldap php-json libevent-devel pcre-devel cmake policycoreutils-python-utils automake pkgconfig gcc-c++ autoconf automake libtool procps yum-utils libcmocka-devel libyaml-devel perl-YAML-LibYAML libpath_utils-devel perl-IPC-Run3 perl-Path-Tiny mariadb-devel libxml2-devel net-snmp-devel OpenIPMI-devel libevent-devel libcurl-devel pcre-devel

mkdir -p /home/tester/output
cd /home/tester
OS_NAME=$(cat /etc/os-release | grep ^PRETTY_NAME | cut -d= -f2)

if ! git clone $PACKAGE_URL; then
        echo "------------------$PACKAGE_NAME:clone_fails---------------------------------------"
                echo "$PACKAGE_URL $PACKAGE_NAME" > /home/tester/output/clone_fails
        echo "$PACKAGE_NAME  |  $PACKAGE_URL |  $PACKAGE_VERSION | $OS_NAME | GitHub | Fail |  Clone_Fails" > /home/tester/output/version_tracker
        exit 0
fi

cd $PACKAGE_NAME

echo " --------------------------------- checkout version  $PACKAGE_VERSION ------------------------------------"
git checkout $PACKAGE_VERSION

./bootstrap.sh tests
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-openipmi
make
make install

echo "------------------Test the package---------------------"
if ! make tests; then
        echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------"
        echo "$PACKAGE_URL $PACKAGE_NAME" > /home/tester/output/test_fails
        echo "$PACKAGE_NAME  |  $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail |  Install_success_but_test_Fails" > /home/tester/output/version_tracker
        exit 1
else
        echo "------------------$PACKAGE_NAME:install_&_test_both_success-------------------------"
        echo "$PACKAGE_VERSION $PACKAGE_NAME" > /home/tester/output/test_success
        echo "$PACKAGE_NAME  |  $PACKAGE_VERSION | $PACKAGE_VERSION | $OS_NAME | GitHub  | Pass |  Both_Install_and_Test_Success" > /home/tester/output/version_tracker
        exit 0
fi


text:
layout: microblog_index
title: Brian Lundin's Microblog
pagination:
  enabled: true
  collection: microblog
  debug: false
  per_page: 20
reading_progress: false
---