text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>Return of the DevOps Engineer</title>
  <meta name="description" content="Yes, the title of this post is a Star Wars reference as I am currently in the midst of reviving my love of all things Jedi, Sith, and all the Star Wars lore....">

  <link rel="stylesheet" href="http://localhost:4000/assets/main.css">
  <link rel="canonical" href="http://localhost:4000/blog/return/2016/02/15/return-of-the-tony.html">
  <link rel="alternate" type="application/rss+xml" title="Tony's Thoughts" href="http://localhost:4000/feed.xml">
  <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Kaushan+Script" rel="stylesheet">

Hat's Brain Dump

Return of the DevOps Engineer

Monday, February 15-2016

Yes, the title of this post is a Star Wars reference as I am currently
in the midst of reviving my love of all things Jedi, Sith, and all the
Star Wars lore.

Looking back at this blog and how long it has been since I have made a post,
if my life were Star Wars movies I have finished my first trilogy and am
now onto my second. As for the title… something to do with
Computers, Sun, and Success.

Deciding to come to California originally to get back into taking
the steps to find out if I did in fact want to be a programmer
led to many great friendships, lots of knowledge, and a pivot from
programming to finding myself more down the DevOps career path.

I will keep this blog past rather short as I don't see the need
to ramble about everything that has happened in the last four years.
Instead, I will allow this to be the first of hopefully many new
blog posts to come which will give more insight as to all of
the many changes that have happened since I built my first robot,
had some fun with Photoshop, and taught game development. Now that
I look back on these old posts, I have a desire to start doing some photo
editing and being a maker again. Stay tuned and may the force be with you!

My personal blog where any given day I will attempt to convert the thoughts flowing through my mind into text.
It has been four years since I have blogged so enjoy the old material, which I also now laugh at, and feel free to critique anything that I write.

hat

ttys001

tony-hendrick


text:
<!DOCTYPE HTML>
<html>
<head>
<title>curl loading test for plain old javascript</title>

<script>

	curl = {
		debug: true,
		paths: {
			curl: '../src/curl',
			test1: {
				location: 'stuff/plain_old.js',
				config: {
					loader: 'curl/loader/legacy',
					exports: 'testDomain.foo.bar'
				}
			},
		    definedUpTop : 'stuff/dep-on-test1-in-define',
		    usingRequire : 'stuff/dep-on-test1'
		},
		packages: [
			{
				name: 'test2',
				location: 'stuff',
				main: 'plain_old_2',
				config: {
					loader: 'curl/loader/legacy',
					factory: function () { return testDomain.awesome; },
					requires: ['test1']
				}
			}
		],
		pluginPath: 'curl/plugin',
		prefetch: true
	};

</script>
<script src="../src/curl.js" type="text/javascript"></script>
<!--<script src="../dist/curl-with-js-and-domReady/curl.js" type="text/javascript"></script>-->

<script type="text/javascript">

curl(
	[
		'stuff/three',
		'test2',
		'test1',
		'definedUpTop',
		'usingRequire'
	]
).then(
	function (three, saucer, foobar,definedUpTop, usingRequire) {
		write('A module with dependencies loaded successfully if 3 == ' + three + '.');
		write('If the following line says something then the plain js files loaded in the right order:');

		//write(testDomain.foo.bar + ' ' + testDomain.awesome.sauce);
		write('Did js file with no deps return a value? ' + (foobar == 'whizzah!' ? 'SUCCESS' : 'FAILED'));

		write('Did module with non-amd deps load dep correctly? ' + (definedUpTop == 'whizzah!' ? 'SUCCESS' : 'FAILED'));
		write('Did module with non-amd deps load dep correctly? ' + (usingRequire == 'whizzah!' ? 'SUCCESS' : 'FAILED'));
	}
);

function write (msg) {
	curl(['domReady!'], function () {
		document.body.appendChild(document.createElement('div')).innerHTML = msg;
	})
}

</script>

</head>
<body>

</body>
</html>

redpajama_set_name: RedPajamaGithub


text:
<?php

require_once('lib/bootstrap.php');

class PageTest extends KirbyTestCase {

  public function testConstruction() {

    $kirby = $this->kirbyInstance();
    $site  = $this->siteInstance($kirby);
    $page  = new Page($site, '1-a');

    $this->assertInstanceOf('Kirby', $page->kirby());
    $this->assertEquals($kirby, $page->kirby());
    $this->assertInstanceOf('Site', $page->site());
    $this->assertEquals($site, $page->site());
    $this->assertInstanceOf('Site', $page->parent());
    $this->assertEquals($site, $page->parent());
    $this->assertEquals('1-a', $page->dirname());
    $this->assertEquals(1, $page->depth());
    $this->assertEquals($kirby->roots()->content() . DS . '1-a', $page->root());
    $this->assertEquals('1', $page->num());
    $this->assertEquals('a', $page->uid());
    $this->assertEquals('a', $page->id());
    $this->assertEquals('1-a', $page->diruri());
    $this->assertEquals('/a', $page->url());
    $this->assertTrue($page->isCachable());
    $this->assertEquals('a', $page->slug());
    $this->assertTrue($page->is($page));
    $this->assertTrue($page->equals($page));
    $this->assertFalse($page->isSite());
    $this->assertFalse($page->isActive());
    $this->assertFalse($page->isOpen());
    $this->assertTrue($page->isVisible());
    $this->assertFalse($page->isInvisible());
    $this->assertFalse($page->isHomePage());
    $this->assertFalse($page->isErrorPage());
    $this->assertEquals($page->id(), (string)$page);

  }

  public function testDate() {

    $site = $this->siteInstance();
    $page = new Page($site, '1-a');

    $this->assertEquals(1355270400, $page->date());
    $this->assertEquals('2012-12-12', $page->date('Y-m-d'));
    $this->assertEquals('2012-12-12', $page->date('Y-m-d', 'date'));
    $this->assertEquals('2012-12-12', $page->date('Y-m-d', 'created'));

    // switch the date handler
    $kirby = $this->kirbyInstance(array('date.handler' => 'strftime'));
    $site  = $this->siteInstance($kirby);
    $page  = new Page($site, '1-a');

    $this->assertEquals(1355270400, $page->date());
    $this->assertEquals('2012-12-12', $page->date('%Y-%m-%d'));
    $this->assertEquals('2012-12-12', $page->date('%Y-%m-%d', 'date'));
    $this->assertEquals('2012-12-12', $page->date('%Y-%m-%d', 'created'));

  }

  public function testModified() {

    $site = $this->siteInstance();
    $page = new Page($site, '1-a');

    $modified = f::modified($page->root());

    $this->assertEquals($modified, $page->modified());
    $this->assertEquals(date('Y-m-d', $modified), $page->modified('Y-m-d'));

    // switch the date handler
    $kirby = $this->kirbyInstance(array('date.handler' => 'strftime'));
    $site  = $this->siteInstance($kirby);
    $page  = new Page($site, '1-a');

    $this->assertEquals($modified, $page->modified());
    $this->assertEquals(strftime('%Y-%m-%d', $modified), $page->modified('%Y-%m-%d'));

  }

  public function testEmptyField() {

    $site = $this->siteInstance();
    $page = new Page($site, '1-a');

    $this->assertInstanceOf('Field', $page->missingfield());
    $this->assertTrue($page->missingfield()->empty());
    $this->assertTrue($page->missingfield()->isEmpty());

  }

  public function testNums() {

    $site  = $this->siteInstance();
    $tests = array(
      '1-a'    => array('1', 'a'),
      'a'      => array(null, 'a'),
      '-a'     => array(null, '-a'),
      '1-1-a'  => array('1', '1-a'),
      '1-1-1'  => array('1', '1-1'),
      '-1-1-1' => array(null, '-1-1-1'),
    );

    foreach($tests as $key => $value) {

      $page = new Page($site, $key);

      $this->assertEquals($value[0], $page->num());
      $this->assertEquals($value[1], $page->uid());

    }

  }

  public function testSort() {
    $site  = $this->siteInstance();
    $page  = new Page($site, '2-b');
    $this->assertEquals('2', $page->num());
    $this->assertEquals($page->num(), $page->sort());
    $this->assertTrue(true, $page->sort(3));
    $this->assertEquals('3', $page->num());
    $this->assertEquals($page->num(), $page->sort());
    $this->assertTrue(true, $page->sort(2));
    $this->assertEquals('2', $page->num());
    $this->assertEquals($page->num(), $page->sort());
  }

}


text:
'use strict';

var imageAnnotatorClient = require('./image_annotator_client');
var gax = require('google-gax');
var extend = require('extend');

function v1(options) {
  options = extend({
    scopes: v1.ALL_SCOPES
  }, options);
  var gaxGrpc = gax.grpc(options);
  return imageAnnotatorClient(gaxGrpc);
}

v1.GAPIC_VERSION = '0.7.1';
v1.SERVICE_ADDRESS = imageAnnotatorClient.SERVICE_ADDRESS;
v1.ALL_SCOPES = imageAnnotatorClient.ALL_SCOPES;

module.exports = v1;


text:
/*-----------------------------------------------------------
 * Implementation of functions defined in portable.h for ESP8266
 *
 * This is based on the version supplied in esp_iot_rtos_sdk,
 * which is in turn based on the ARM CM3 port.
 *----------------------------------------------------------*/

#include <xtensa/config/core.h>
#include <malloc.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <xtensa_ops.h>

#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "xtensa_rtos.h"

unsigned cpu_sr;
char level1_int_disabled;

/* Supervisor stack pointer entry. This is the "high water mark" of
   how far the supervisor stack grew down before task started. Is zero
   before the scheduler starts.

 After the scheduler starts, task stacks are all allocated from the
 heap and FreeRTOS checks for stack overflow.
*/
void *xPortSupervisorStackPointer;

void vAssertCalled(const char * pcFile, unsigned long ulLine)
{
    printf("rtos assert %s %lu\n", pcFile, ulLine);
    abort();
    //for (;;);
}

/*
 * Stack initialization
 */
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
{
    #define SET_STKREG(r,v) sp[(r) >> 2] = (portSTACK_TYPE)(v)
    portSTACK_TYPE *sp, *tp;

    /* Create interrupt stack frame aligned to 16 byte boundary */
    sp = (portSTACK_TYPE*) (((uint32_t)(pxTopOfStack + 1) - XT_CP_SIZE - XT_STK_FRMSZ) & ~0xf);

    /* Clear the entire frame (do not use memset() because we don't depend on C library) */
    for (tp = sp; tp <= pxTopOfStack; ++tp)
        *tp = 0;

    /* Explicitly initialize certain saved registers */
    SET_STKREG( XT_STK_PC,      pxCode                        );  /* task entrypoint                  */
    SET_STKREG( XT_STK_A0,      0                           );  /* to terminate GDB backtrace       */
    SET_STKREG( XT_STK_A1,      (uint32_t)sp + XT_STK_FRMSZ   );  /* physical top of stack frame      */
    SET_STKREG( XT_STK_A2,      pvParameters   );           /* parameters      */
    SET_STKREG( XT_STK_EXIT,    _xt_user_exit               );  /* user exception exit dispatcher   */

    /* Set initial PS to int level 0, EXCM disabled ('rfe' will enable), user mode. */
    SET_STKREG( XT_STK_PS,      PS_UM | PS_EXCM     );
    return sp;
}

static int pending_soft_sv;
static int pending_maclayer_sv;

/*
 * The portYIELD macro calls PendSV with SVC_Software to set a pending interrupt
 * service callback that allows a task switch, and this occur when interrupts
 * are enabled which might be after exiting the critical region below.
 *
 * The wdev NMI calls this function from pp_post() with SVC_MACLayer to set a
 * pending interrupt service callback which flushs the queue of messages that
 * the NMI stashes away. This interrupt will be triggered after the return from
 * the NMI and when interrupts are enabled. The NMI can not touch the FreeRTOS
 * queues itself. The NMI must not touch the interrupt masks so that path must
 * not call vPortEnterCritical and vPortExitCritical.
 */
void IRAM PendSV(enum SVC_ReqType req)
{
    if (req == SVC_Software) {
        vPortEnterCritical();
        pending_soft_sv = 1;
        WSR(BIT(INUM_SOFT), interrupt);
        vPortExitCritical();
    } else if (req == SVC_MACLayer) {
        pending_maclayer_sv= 1;
        WSR(BIT(INUM_SOFT), interrupt);
    }
}

/* This MAC layer ISR handler is defined in libpp.a, and is called
 * after a Blob SV requests a soft interrupt by calling
 * PendSV(SVC_MACLayer).
 */
extern portBASE_TYPE sdk_MacIsrSigPostDefHdl(void);

void IRAM SV_ISR(void *arg)
{
    portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE ;
    if (pending_maclayer_sv) {
        xHigherPriorityTaskWoken = sdk_MacIsrSigPostDefHdl();
        pending_maclayer_sv = 0;
    }
    if (xHigherPriorityTaskWoken || pending_soft_sv) {
        sdk__xt_timer_int1();
        pending_soft_sv = 0;
    }
}

void xPortSysTickHandle (void)
{
    if (xTaskIncrementTick() != pdFALSE) {
        vTaskSwitchContext();
    }
}

/*
 * See header file for description.
 */
portBASE_TYPE xPortStartScheduler( void )
{
    _xt_isr_attach(INUM_SOFT, SV_ISR, NULL);
    _xt_isr_unmask(BIT(INUM_SOFT));

    /* Initialize system tick timer interrupt and schedule the first tick. */
    _xt_isr_attach(INUM_TICK, sdk__xt_timer_int, NULL);
    _xt_isr_unmask(BIT(INUM_TICK));
    sdk__xt_tick_timer_init();

    vTaskSwitchContext();

    /* mark the supervisor stack pointer high water mark. xt_int_exit
       actually frees ~0x50 bytes off the stack, so this value is
       conservative.
    */
    __asm__ __volatile__ ("mov %0, a1\n" : "=a"(xPortSupervisorStackPointer));

    sdk__xt_int_exit();

    /* Should not get here as the tasks are now running! */
    return pdTRUE;
}

/* Determine free heap size via libc sbrk function & mallinfo

   sbrk gives total size in totally unallocated memory,
   mallinfo.fordblks gives free space inside area dedicated to heap.

   mallinfo is possibly non-portable, although glibc & newlib both support
   the fordblks member.
*/
size_t xPortGetFreeHeapSize( void )
{
    struct mallinfo mi = mallinfo();
    uint32_t brk_val = (uint32_t) sbrk(0);

    intptr_t sp = (intptr_t)xPortSupervisorStackPointer;
    if (sp == 0) {
        /* scheduler not started */
        SP(sp);
    }
    return sp - brk_val + mi.fordblks;
}

void vPortEndScheduler( void )
{
    /* No-op, nothing to return to */
}

/*-----------------------------------------------------------*/

static unsigned portBASE_TYPE uxCriticalNesting = 0;

/* These nested vPortEnter/ExitCritical macros are called by SDK
 * libraries in libmain, libnet80211, libpp
 *
 * It may be possible to replace the global nesting count variable
 * with a save/restore of interrupt level, although it's difficult as
 * the functions have no return value.
 *
 * These should not be called from the NMI in regular operation and
 * the NMI must not touch the interrupt mask, but that might occur in
 * exceptional paths such as aborts and debug code.
 */
void IRAM vPortEnterCritical(void) {
    portDISABLE_INTERRUPTS();
    uxCriticalNesting++;
}

/*-----------------------------------------------------------*/

void IRAM vPortExitCritical(void) {
    uxCriticalNesting--;
    if (uxCriticalNesting == 0)
        portENABLE_INTERRUPTS();
}

/* Backward compatibility, for the sdk library. */

signed portBASE_TYPE xTaskGenericCreate(TaskFunction_t pxTaskCode,
                                        const signed char * const pcName,
                                        unsigned short usStackDepth,
                                        void *pvParameters,
                                        unsigned portBASE_TYPE uxPriority,
                                        TaskHandle_t *pxCreatedTask,
                                        portSTACK_TYPE *puxStackBuffer,
                                        const MemoryRegion_t * const xRegions) {
    (void)puxStackBuffer;
    (void)xRegions;
    return xTaskCreate(pxTaskCode, (const char * const)pcName, usStackDepth,
                       pvParameters, uxPriority, pxCreatedTask);
}

BaseType_t xQueueGenericReceive(QueueHandle_t xQueue, void * const pvBuffer,
                                TickType_t xTicksToWait, const BaseType_t xJustPeeking) {
    configASSERT(xJustPeeking == 0);
    return xQueueReceive(xQueue, pvBuffer, xTicksToWait);
}


text:
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;

namespace DependencyAnalyser
{
    /// <summary>
    /// Interaction logic for ComponentManager.xaml
    /// </summary>
    public partial class ComponentManager
    {
        private readonly Services.IComponentsService _componentsService;
        private readonly ViewModels.ComponentManager _vm;

        public IEnumerable<Models.Component> Components => _vm.Components;

        public ComponentManager()
        {
            _componentsService = new Services.ComponentsService(Properties.Settings.Default.ApiUrl);

            _vm = new ViewModels.ComponentManager();

            InitializeComponent();
        }

        private void ComponentManager_OnLoaded(object sender, RoutedEventArgs e)
        {
            _vm.Components = new ObservableCollection<Models.Component>(_componentsService.GetList());

            DataContext = _vm;
        }

        private void Add_OnClick(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(_vm.NewComponentName))
            {
                MessageBox.Show("Please specify a component name");
            }
            else if (string.IsNullOrEmpty(_vm.NewComponentTeamCityBuildId))
            {
                MessageBox.Show("Please specify a build ID");
            }
            else
            {
                var newComponent =
                    _componentsService.Add(new Models.Component
                    {
                        Name = _vm.NewComponentName,
                        TeamCityBuildId = _vm.NewComponentTeamCityBuildId
                    });

                _vm.Components.Add(newComponent);
            }
        }

        private void Save_OnClick(object sender, RoutedEventArgs e)
        {
            _vm.Components.ToList().ForEach(c =>
            {
                _componentsService.Update(c);
            });
        }

        private void Delete_OnClick(object sender, RoutedEventArgs e)
        {
            if (MessageBox.Show("Are you sure?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) ==
                MessageBoxResult.Yes)
            {
                _componentsService.Delete((Models.Component)components.SelectedItem);

                _vm.Components.Remove((Models.Component)components.SelectedItem);
            }
        }

        private void Close_OnClick(object sender, RoutedEventArgs e)
        {
            Close();
        }
    }
}


text:
            <button type="button" class="btn btn-primary" data-ng-click="open()">
              {{NumberOfRecipe}} Recette(s)
            </button>

{{recipe.result.title}}

Temps de préparation : {{recipe.result.prepTime}} min

Temps de cuisson : {{recipe.result.cookingTime}} min

Voir la recette d'origine sur : {{recipe.origin}}

          <form name="quantitiesChange" class="css-form">

                <button class="btn btn-success" data-ng-click="saveRecetteInListeDeCourse()">

                  Ajouter à ma liste
                </button>

                    Nombre de Personnes
                    <h-number value="num" step="1" min="1" class="select-person-number col-xs-2 col-sm-2 col-md-2 col-lg-2"></h-number>

                  <input type="hidden" data-ng-model="oldNbrPersons"/>

                    {{ingredient.product}}

                     {{ingredient.quantity | number:1}} {{ingredient.unity}}

          </form>


text:
//===- unittest/ProfileData/CoverageMappingTest.cpp -------------------------=//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/ProfileData/Coverage/CoverageMappingReader.h"
#include "llvm/ProfileData/Coverage/CoverageMappingWriter.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/ProfileData/InstrProfWriter.h"
#include "llvm/Support/raw_ostream.h"
#include "gtest/gtest.h"

#include <ostream>
#include <utility>

using namespace llvm;
using namespace coverage;

static ::testing::AssertionResult NoError(Error E) {
  if (!E)
    return ::testing::AssertionSuccess();
  return ::testing::AssertionFailure() << "error: " << toString(std::move(E))
                                       << "\n";
}

namespace llvm {
namespace coverage {
void PrintTo(const Counter &C, ::std::ostream *os) {
  if (C.isZero())
    *os << "Zero";
  else if (C.isExpression())
    *os << "Expression " << C.getExpressionID();
  else
    *os << "Counter " << C.getCounterID();
}

void PrintTo(const CoverageSegment &S, ::std::ostream *os) {
  *os << "CoverageSegment(" << S.Line << ", " << S.Col << ", ";
  if (S.HasCount)
    *os << S.Count << ", ";
  *os << (S.IsRegionEntry ? "true" : "false") << ")";
}
}
}

namespace {

struct OutputFunctionCoverageData {
  StringRef Name;
  uint64_t Hash;
  std::vector<StringRef> Filenames;
  std::vector<CounterMappingRegion> Regions;

  OutputFunctionCoverageData() : Hash(0) {}

  OutputFunctionCoverageData(OutputFunctionCoverageData &&OFCD)
      : Name(OFCD.Name), Hash(OFCD.Hash), Filenames(std::move(OFCD.Filenames)),
        Regions(std::move(OFCD.Regions)) {}

  OutputFunctionCoverageData(const OutputFunctionCoverageData &) = delete;
  OutputFunctionCoverageData &
  operator=(const OutputFunctionCoverageData &) = delete;
  OutputFunctionCoverageData &operator=(OutputFunctionCoverageData &&) = delete;

  void fillCoverageMappingRecord(CoverageMappingRecord &Record) const {
    Record.FunctionName = Name;
    Record.FunctionHash = Hash;
    Record.Filenames = Filenames;
    Record.Expressions = {};
    Record.MappingRegions = Regions;
  }
};

struct CoverageMappingReaderMock : CoverageMappingReader {
  ArrayRef<OutputFunctionCoverageData> Functions;

  CoverageMappingReaderMock(ArrayRef<OutputFunctionCoverageData> Functions)
      : Functions(Functions) {}

  Error readNextRecord(CoverageMappingRecord &Record) override {
    if (Functions.empty())
      return make_error<CoverageMapError>(coveragemap_error::eof);

    Functions.front().fillCoverageMappingRecord(Record);
    Functions = Functions.slice(1);

    return Error::success();
  }
};

struct InputFunctionCoverageData {
  // Maps the global file index from CoverageMappingTest.Files
  // to the index of that file within this function. We can't just use
  // global file indexes here because local indexes have to be dense.
  // This map is used during serialization to create the virtual file mapping
  // (from local fileId to global Index) in the head of the per-function
  // coverage mapping data.
  SmallDenseMap<unsigned, unsigned> ReverseVirtualFileMapping;
  std::string Name;
  uint64_t Hash;
  std::vector<CounterMappingRegion> Regions;

  InputFunctionCoverageData(std::string Name, uint64_t Hash)
      : Name(std::move(Name)), Hash(Hash) {}

  InputFunctionCoverageData(InputFunctionCoverageData &&IFCD)
      : ReverseVirtualFileMapping(std::move(IFCD.ReverseVirtualFileMapping)),
        Name(std::move(IFCD.Name)), Hash(IFCD.Hash),
        Regions(std::move(IFCD.Regions)) {}

  InputFunctionCoverageData(const InputFunctionCoverageData &) = delete;
  InputFunctionCoverageData &
  operator=(const InputFunctionCoverageData &) = delete;
  InputFunctionCoverageData &operator=(InputFunctionCoverageData &&) = delete;
};

struct CoverageMappingTest : ::testing::TestWithParam<std::pair<bool, bool>> {
  bool UseMultipleReaders;
  StringMap<unsigned> Files;
  std::vector<InputFunctionCoverageData> InputFunctions;
  std::vector<OutputFunctionCoverageData> OutputFunctions;

  InstrProfWriter ProfileWriter;
  std::unique_ptr<IndexedInstrProfReader> ProfileReader;

  std::unique_ptr<CoverageMapping> LoadedCoverage;

  void SetUp() override {
    ProfileWriter.setOutputSparse(GetParam().first);
    UseMultipleReaders = GetParam().second;
  }

  unsigned getGlobalFileIndex(StringRef Name) {
    auto R = Files.find(Name);
    if (R != Files.end())
      return R->second;
    unsigned Index = Files.size();
    Files.try_emplace(Name, Index);
    return Index;
  }

  // Return the file index of file 'Name' for the current function.
  // Add the file into the global map if necessary.
  // See also InputFunctionCoverageData::ReverseVirtualFileMapping
  // for additional comments.
  unsigned getFileIndexForFunction(StringRef Name) {
    unsigned GlobalIndex = getGlobalFileIndex(Name);
    auto &CurrentFunctionFileMapping =
        InputFunctions.back().ReverseVirtualFileMapping;
    auto R = CurrentFunctionFileMapping.find(GlobalIndex);
    if (R != CurrentFunctionFileMapping.end())
      return R->second;
    unsigned IndexInFunction = CurrentFunctionFileMapping.size();
    CurrentFunctionFileMapping.insert(
        std::make_pair(GlobalIndex, IndexInFunction));
    return IndexInFunction;
  }

  void startFunction(StringRef FuncName, uint64_t Hash) {
    InputFunctions.emplace_back(FuncName.str(), Hash);
  }

  void addCMR(Counter C, StringRef File, unsigned LS, unsigned CS, unsigned LE,
              unsigned CE) {
    InputFunctions.back().Regions.push_back(CounterMappingRegion::makeRegion(
        C, getFileIndexForFunction(File), LS, CS, LE, CE));
  }

  void addExpansionCMR(StringRef File, StringRef ExpandedFile, unsigned LS,
                       unsigned CS, unsigned LE, unsigned CE) {
    InputFunctions.back().Regions.push_back(CounterMappingRegion::makeExpansion(
        getFileIndexForFunction(File), getFileIndexForFunction(ExpandedFile),
        LS, CS, LE, CE));
  }

  std::string writeCoverageRegions(InputFunctionCoverageData &Data) {
    SmallVector<unsigned, 8> FileIDs(Data.ReverseVirtualFileMapping.size());
    for (const auto &E : Data.ReverseVirtualFileMapping)
      FileIDs[E.second] = E.first;
    std::string Coverage;
    llvm::raw_string_ostream OS(Coverage);
    CoverageMappingWriter(FileIDs, None, Data.Regions).write(OS);
    return OS.str();
  }

  void readCoverageRegions(const std::string &Coverage,
                           OutputFunctionCoverageData &Data) {
    SmallVector<StringRef, 8> Filenames(Files.size());
    for (const auto &E : Files)
      Filenames[E.getValue()] = E.getKey();
    std::vector<CounterExpression> Expressions;
    RawCoverageMappingReader Reader(Coverage, Filenames, Data.Filenames,
                                    Expressions, Data.Regions);
    ASSERT_TRUE(NoError(Reader.read()));
  }

  void writeAndReadCoverageRegions(bool EmitFilenames = true) {
    OutputFunctions.resize(InputFunctions.size());
    for (unsigned I = 0; I < InputFunctions.size(); ++I) {
      std::string Regions = writeCoverageRegions(InputFunctions[I]);
      readCoverageRegions(Regions, OutputFunctions[I]);
      OutputFunctions[I].Name = InputFunctions[I].Name;
      OutputFunctions[I].Hash = InputFunctions[I].Hash;
      if (!EmitFilenames)
        OutputFunctions[I].Filenames.clear();
    }
  }

  void readProfCounts() {
    auto Profile = ProfileWriter.writeBuffer();
    auto ReaderOrErr = IndexedInstrProfReader::create(std::move(Profile));
    ASSERT_TRUE(NoError(ReaderOrErr.takeError()));
    ProfileReader = std::move(ReaderOrErr.get());
  }

  Expected<std::unique_ptr<CoverageMapping>> readOutputFunctions() {
    if (!UseMultipleReaders) {
      CoverageMappingReaderMock CovReader(OutputFunctions);
      return CoverageMapping::load(CovReader, *ProfileReader);
    }

    std::vector<std::unique_ptr<CoverageMappingReader>> CoverageReaders;
    for (const auto &OF : OutputFunctions) {
      ArrayRef<OutputFunctionCoverageData> Funcs(OF);
      CoverageReaders.push_back(make_unique<CoverageMappingReaderMock>(Funcs));
    }
    return CoverageMapping::load(CoverageReaders, *ProfileReader);
  }

  void loadCoverageMapping(bool EmitFilenames = true) {
    readProfCounts();
    writeAndReadCoverageRegions(EmitFilenames);
    auto CoverageOrErr = readOutputFunctions();
    ASSERT_TRUE(NoError(CoverageOrErr.takeError()));
    LoadedCoverage = std::move(CoverageOrErr.get());
  }
};

TEST_P(CoverageMappingTest, basic_write_read) {
  startFunction("func", 0x1234);
  addCMR(Counter::getCounter(0), "foo", 1, 1, 1, 1);
  addCMR(Counter::getCounter(1), "foo", 2, 1, 2, 2);
  addCMR(Counter::getZero(),     "foo", 3, 1, 3, 4);
  addCMR(Counter::getCounter(2), "foo", 4, 1, 4, 8);
  addCMR(Counter::getCounter(3), "bar", 1, 2, 3, 4);

  writeAndReadCoverageRegions();
  ASSERT_EQ(1u, InputFunctions.size());
  ASSERT_EQ(1u, OutputFunctions.size());
  InputFunctionCoverageData &Input = InputFunctions.back();
  OutputFunctionCoverageData &Output = OutputFunctions.back();

  size_t N = makeArrayRef(Input.Regions).size();
  ASSERT_EQ(N, Output.Regions.size());
  for (size_t I = 0; I < N; ++I) {
    ASSERT_EQ(Input.Regions[I].Count, Output.Regions[I].Count);
    ASSERT_EQ(Input.Regions[I].FileID, Output.Regions[I].FileID);
    ASSERT_EQ(Input.Regions[I].startLoc(), Output.Regions[I].startLoc());
    ASSERT_EQ(Input.Regions[I].endLoc(), Output.Regions[I].endLoc());
    ASSERT_EQ(Input.Regions[I].Kind, Output.Regions[I].Kind);
  }
}

TEST_P(CoverageMappingTest, correct_deserialize_for_more_than_two_files) {
  const char *FileNames[] = {"bar", "baz", "foo"};
  static const unsigned N = array_lengthof(FileNames);

  startFunction("func", 0x1234);
  for (unsigned I = 0; I < N; ++I)
    // Use LineStart to hold the index of the file name
    // in order to preserve that information during possible sorting of CMRs.
    addCMR(Counter::getCounter(0), FileNames[I], I, 1, I, 1);

  writeAndReadCoverageRegions();
  ASSERT_EQ(1u, OutputFunctions.size());
  OutputFunctionCoverageData &Output = OutputFunctions.back();

  ASSERT_EQ(N, Output.Regions.size());
  ASSERT_EQ(N, Output.Filenames.size());

  for (unsigned I = 0; I < N; ++I) {
    ASSERT_GT(N, Output.Regions[I].FileID);
    ASSERT_GT(N, Output.Regions[I].LineStart);
    EXPECT_EQ(FileNames[Output.Regions[I].LineStart],
              Output.Filenames[Output.Regions[I].FileID]);
  }
}

TEST_P(CoverageMappingTest, load_coverage_for_more_than_two_files) {
  InstrProfRecord Record("func", 0x1234, {0});
  NoError(ProfileWriter.addRecord(std::move(Record)));

  const char *FileNames[] = {"bar", "baz", "foo"};
  static const unsigned N = array_lengthof(FileNames);

  startFunction("func", 0x1234);
  for (unsigned I = 0; I < N; ++I)
    // Use LineStart to hold the index of the file name
    // in order to preserve that information during possible sorting of CMRs.
    addCMR(Counter::getCounter(0), FileNames[I], I, 1, I, 1);

  loadCoverageMapping();

  for (unsigned I = 0; I < N; ++I) {
    CoverageData Data = LoadedCoverage->getCoverageForFile(FileNames[I]);
    ASSERT_TRUE(!Data.empty());
    EXPECT_EQ(I, Data.begin()->Line);
  }
}

TEST_P(CoverageMappingTest, load_coverage_for_several_functions) {
  InstrProfRecord RecordFunc1("func1", 0x1234, {10});
  NoError(ProfileWriter.addRecord(std::move(RecordFunc1)));
  InstrProfRecord RecordFunc2("func2", 0x2345, {20});
  NoError(ProfileWriter.addRecord(std::move(RecordFunc2)));

  startFunction("func1", 0x1234);
  addCMR(Counter::getCounter(0), "foo", 1, 1, 5, 5);

  startFunction("func2", 0x2345);
  addCMR(Counter::getCounter(0), "bar", 2, 2, 6, 6);

  loadCoverageMapping();

  const auto FunctionRecords = LoadedCoverage->getCoveredFunctions();
  EXPECT_EQ(2U, std::distance(FunctionRecords.begin(), FunctionRecords.end()));
  for (const auto &FunctionRecord : FunctionRecords) {
    CoverageData Data = LoadedCoverage->getCoverageForFunction(FunctionRecord);
    std::vector<CoverageSegment> Segments(Data.begin(), Data.end());
    ASSERT_EQ(2U, Segments.size());
    if (FunctionRecord.Name == "func1") {
      EXPECT_EQ(CoverageSegment(1, 1, 10, true), Segments[0]);
      EXPECT_EQ(CoverageSegment(5, 5, false), Segments[1]);
    } else {
      ASSERT_EQ("func2", FunctionRecord.Name);
      EXPECT_EQ(CoverageSegment(2, 2, 20, true), Segments[0]);
      EXPECT_EQ(CoverageSegment(6, 6, false), Segments[1]);
    }
  }
}

TEST_P(CoverageMappingTest, expansion_gets_first_counter) {
  startFunction("func", 0x1234);
  addCMR(Counter::getCounter(1), "foo", 10, 1, 10, 2);
  // This starts earlier in "foo", so the expansion should get its counter.
  addCMR(Counter::getCounter(2), "foo", 1, 1, 20, 1);
  addExpansionCMR("bar", "foo", 3, 3, 3, 3);

  writeAndReadCoverageRegions();
  ASSERT_EQ(1u, OutputFunctions.size());
  OutputFunctionCoverageData &Output = OutputFunctions.back();

  ASSERT_EQ(CounterMappingRegion::ExpansionRegion, Output.Regions[2].Kind);
  ASSERT_EQ(Counter::getCounter(2), Output.Regions[2].Count);
  ASSERT_EQ(3U, Output.Regions[2].LineStart);
}

TEST_P(CoverageMappingTest, basic_coverage_iteration) {
  InstrProfRecord Record("func", 0x1234, {30, 20, 10, 0});
  NoError(ProfileWriter.addRecord(std::move(Record)));

  startFunction("func", 0x1234);
  addCMR(Counter::getCounter(0), "file1", 1, 1, 9, 9);
  addCMR(Counter::getCounter(1), "file1", 1, 1, 4, 7);
  addCMR(Counter::getCounter(2), "file1", 5, 8, 9, 1);
  addCMR(Counter::getCounter(3), "file1", 10, 10, 11, 11);
  loadCoverageMapping();

  CoverageData Data = LoadedCoverage->getCoverageForFile("file1");
  std::vector<CoverageSegment> Segments(Data.begin(), Data.end());
  ASSERT_EQ(7U, Segments.size());
  ASSERT_EQ(CoverageSegment(1, 1, 20, true),  Segments[0]);
  ASSERT_EQ(CoverageSegment(4, 7, 30, false), Segments[1]);
  ASSERT_EQ(CoverageSegment(5, 8, 10, true),  Segments[2]);
  ASSERT_EQ(CoverageSegment(9, 1, 30, false), Segments[3]);
  ASSERT_EQ(CoverageSegment(9, 9, false),     Segments[4]);
  ASSERT_EQ(CoverageSegment(10, 10, 0, true), Segments[5]);
  ASSERT_EQ(CoverageSegment(11, 11, false),   Segments[6]);
}

TEST_P(CoverageMappingTest, uncovered_function) {
  startFunction("func", 0x1234);
  addCMR(Counter::getZero(), "file1", 1, 2, 3, 4);
  loadCoverageMapping();

  CoverageData Data = LoadedCoverage->getCoverageForFile("file1");
  std::vector<CoverageSegment> Segments(Data.begin(), Data.end());
  ASSERT_EQ(2U, Segments.size());
  ASSERT_EQ(CoverageSegment(1, 2, 0, true), Segments[0]);
  ASSERT_EQ(CoverageSegment(3, 4, false),   Segments[1]);
}

TEST_P(CoverageMappingTest, uncovered_function_with_mapping) {
  startFunction("func", 0x1234);
  addCMR(Counter::getCounter(0), "file1", 1, 1, 9, 9);
  addCMR(Counter::getCounter(1), "file1", 1, 1, 4, 7);
  loadCoverageMapping();

  CoverageData Data = LoadedCoverage->getCoverageForFile("file1");
  std::vector<CoverageSegment> Segments(Data.begin(), Data.end());
  ASSERT_EQ(3U, Segments.size());
  ASSERT_EQ(CoverageSegment(1, 1, 0, true),  Segments[0]);
  ASSERT_EQ(CoverageSegment(4, 7, 0, false), Segments[1]);
  ASSERT_EQ(CoverageSegment(9, 9, false),    Segments[2]);
}

TEST_P(CoverageMappingTest, combine_regions) {
  InstrProfRecord Record("func", 0x1234, {10, 20, 30});
  NoError(ProfileWriter.addRecord(std::move(Record)));

  startFunction("func", 0x1234);
  addCMR(Counter::getCounter(0), "file1", 1, 1, 9, 9);
  addCMR(Counter::getCounter(1), "file1", 3, 3, 4, 4);
  addCMR(Counter::getCounter(2), "file1", 3, 3, 4, 4);
  loadCoverageMapping();

  CoverageData Data = LoadedCoverage->getCoverageForFile("file1");
  std::vector<CoverageSegment> Segments(Data.begin(), Data.end());
  ASSERT_EQ(4U, Segments.size());
  ASSERT_EQ(CoverageSegment(1, 1, 10, true), Segments[0]);
  ASSERT_EQ(CoverageSegment(3, 3, 50, true), Segments[1]);
  ASSERT_EQ(CoverageSegment(4, 4, 10, false), Segments[2]);
  ASSERT_EQ(CoverageSegment(9, 9, false), Segments[3]);
}

TEST_P(CoverageMappingTest, restore_combined_counter_after_nested_region) {
  InstrProfRecord Record("func", 0x1234, {10, 20, 40});
  NoError(ProfileWriter.addRecord(std::move(Record)));

  startFunction("func", 0x1234);
  addCMR(Counter::getCounter(0), "file1", 1, 1, 9, 9);
  addCMR(Counter::getCounter(1), "file1", 1, 1, 9, 9);
  addCMR(Counter::getCounter(2), "file1", 3, 3, 5, 5);
  loadCoverageMapping();

  CoverageData Data = LoadedCoverage->getCoverageForFile("file1");
  std::vector<CoverageSegment> Segments(Data.begin(), Data.end());
  ASSERT_EQ(4U, Segments.size());
  EXPECT_EQ(CoverageSegment(1, 1, 30, true), Segments[0]);
  EXPECT_EQ(CoverageSegment(3, 3, 40, true), Segments[1]);
  EXPECT_EQ(CoverageSegment(5, 5, 30, false), Segments[2]);
  EXPECT_EQ(CoverageSegment(9, 9, false), Segments[3]);
}

// If CodeRegions and ExpansionRegions cover the same area,
// only counts of CodeRegions should be used.
TEST_P(CoverageMappingTest, dont_combine_expansions) {
  InstrProfRecord Record1("func", 0x1234, {10, 20});
  InstrProfRecord Record2("func", 0x1234, {0, 0});
  NoError(ProfileWriter.addRecord(std::move(Record1)));
  NoError(ProfileWriter.addRecord(std::move(Record2)));

  startFunction("func", 0x1234);
  addCMR(Counter::getCounter(0), "file1", 1, 1, 9, 9);
  addCMR(Counter::getCounter(1), "file1", 3, 3, 4, 4);
  addCMR(Counter::getCounter(1), "include1", 6, 6, 7, 7);
  addExpansionCMR("file1", "include1", 3, 3, 4, 4);
  loadCoverageMapping();

  CoverageData Data = LoadedCoverage->getCoverageForFile("file1");
  std::vector<CoverageSegment> Segments(Data.begin(), Data.end());
  ASSERT_EQ(4U, Segments.size());
  ASSERT_EQ(CoverageSegment(1, 1, 10, true), Segments[0]);
  ASSERT_EQ(CoverageSegment(3, 3, 20, true), Segments[1]);
  ASSERT_EQ(CoverageSegment(4, 4, 10, false), Segments[2]);
  ASSERT_EQ(CoverageSegment(9, 9, false), Segments[3]);
}

// If an area is covered only by ExpansionRegions, they should be combinated.
TEST_P(CoverageMappingTest, combine_expansions) {
  InstrProfRecord Record("func", 0x1234, {2, 3, 7});
  NoError(ProfileWriter.addRecord(std::move(Record)));

  startFunction("func", 0x1234);
  addCMR(Counter::getCounter(1), "include1", 1, 1, 1, 10);
  addCMR(Counter::getCounter(2), "include2", 1, 1, 1, 10);
  addCMR(Counter::getCounter(0), "file", 1, 1, 5, 5);
  addExpansionCMR("file", "include1", 3, 1, 3, 5);
  addExpansionCMR("file", "include2", 3, 1, 3, 5);

  loadCoverageMapping();

  CoverageData Data = LoadedCoverage->getCoverageForFile("file");
  std::vector<CoverageSegment> Segments(Data.begin(), Data.end());
  ASSERT_EQ(4U, Segments.size());
  EXPECT_EQ(CoverageSegment(1, 1, 2, true), Segments[0]);
  EXPECT_EQ(CoverageSegment(3, 1, 10, true), Segments[1]);
  EXPECT_EQ(CoverageSegment(3, 5, 2, false), Segments[2]);
  EXPECT_EQ(CoverageSegment(5, 5, false), Segments[3]);
}

TEST_P(CoverageMappingTest, strip_filename_prefix) {
  InstrProfRecord Record("file1:func", 0x1234, {0});
  NoError(ProfileWriter.addRecord(std::move(Record)));

  startFunction("file1:func", 0x1234);
  addCMR(Counter::getCounter(0), "file1", 1, 1, 9, 9);
  loadCoverageMapping();

  std::vector<std::string> Names;
  for (const auto &Func : LoadedCoverage->getCoveredFunctions())
    Names.push_back(Func.Name);
  ASSERT_EQ(1U, Names.size());
  ASSERT_EQ("func", Names[0]);
}

TEST_P(CoverageMappingTest, strip_unknown_filename_prefix) {
  InstrProfRecord Record("<unknown>:func", 0x1234, {0});
  NoError(ProfileWriter.addRecord(std::move(Record)));

  startFunction("<unknown>:func", 0x1234);
  addCMR(Counter::getCounter(0), "", 1, 1, 9, 9);
  loadCoverageMapping(/*EmitFilenames=*/false);

  std::vector<std::string> Names;
  for (const auto &Func : LoadedCoverage->getCoveredFunctions())
    Names.push_back(Func.Name);
  ASSERT_EQ(1U, Names.size());
  ASSERT_EQ("func", Names[0]);
}

TEST_P(CoverageMappingTest, dont_detect_false_instantiations) {
  InstrProfRecord Record1("foo", 0x1234, {10});
  InstrProfRecord Record2("bar", 0x2345, {20});
  NoError(ProfileWriter.addRecord(std::move(Record1)));
  NoError(ProfileWriter.addRecord(std::move(Record2)));

  startFunction("foo", 0x1234);
  addCMR(Counter::getCounter(0), "expanded", 1, 1, 1, 10);
  addExpansionCMR("main", "expanded", 4, 1, 4, 5);

  startFunction("bar", 0x2345);
  addCMR(Counter::getCounter(0), "expanded", 1, 1, 1, 10);
  addExpansionCMR("main", "expanded", 9, 1, 9, 5);

  loadCoverageMapping();

  std::vector<const FunctionRecord *> Instantiations =
      LoadedCoverage->getInstantiations("expanded");
  ASSERT_TRUE(Instantiations.empty());
}

TEST_P(CoverageMappingTest, load_coverage_for_expanded_file) {
  InstrProfRecord Record("func", 0x1234, {10});
  NoError(ProfileWriter.addRecord(std::move(Record)));

  startFunction("func", 0x1234);
  addCMR(Counter::getCounter(0), "expanded", 1, 1, 1, 10);
  addExpansionCMR("main", "expanded", 4, 1, 4, 5);

  loadCoverageMapping();

  CoverageData Data = LoadedCoverage->getCoverageForFile("expanded");
  std::vector<CoverageSegment> Segments(Data.begin(), Data.end());
  ASSERT_EQ(2U, Segments.size());
  EXPECT_EQ(CoverageSegment(1, 1, 10, true), Segments[0]);
  EXPECT_EQ(CoverageSegment(1, 10, false), Segments[1]);
}

TEST_P(CoverageMappingTest, skip_duplicate_function_record) {
  InstrProfRecord Record("func", 0x1234, {1});
  NoError(ProfileWriter.addRecord(std::move(Record)));

  startFunction("func", 0x1234);
  addCMR(Counter::getCounter(0), "file1", 1, 1, 9, 9);

  startFunction("func", 0x1234);
  addCMR(Counter::getCounter(0), "file1", 1, 1, 9, 9);

  loadCoverageMapping();

  auto Funcs = LoadedCoverage->getCoveredFunctions();
  unsigned NumFuncs = std::distance(Funcs.begin(), Funcs.end());
  ASSERT_EQ(1U, NumFuncs);
}

// FIXME: Use ::testing::Combine() when llvm updates its copy of googletest.
INSTANTIATE_TEST_CASE_P(ParameterizedCovMapTest, CoverageMappingTest,
                        ::testing::Values(std::pair<bool, bool>({false, false}),
                                          std::pair<bool, bool>({false, true}),
                                          std::pair<bool, bool>({true, false}),
                                          std::pair<bool, bool>({true, true})));

} // end anonymous namespace


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Syn. meth. fung. (Göttingen) 2: 513 (1801)

#### Original name
Boletus calopus Pers., 1801

### Remarks
null


text:
PYUI=pyuic5
NAME_LAYOUT=QtLayout
NAME_PARAM=InputParameter

all : layout

.PHONY: all

layout:
	$(PYUI) $(NAME_LAYOUT).ui -o $(NAME_LAYOUT).py

input_param:
	$(PYUI) $(NAME_PARAM).ui -o $(NAME_PARAM).py

clean:
	rm -f $(NAME).py


text:
This custom script has accept to the route's `request` and `response` object.

## Send response
```javascript
response.set('Content-Type', 'application/json');
response.send({
  message: 'Hello from atmo!'
});
```

## Access request parameters
Set the url as below
> /user/:id

Now if you pass the id in the url, you should be able to access them in the script.

> /user/1

```javascript
if (request.params.id === "1") {
  response.send({
    message: 'Parameter is 1'
  });
} else {
  response.send({
    message: 'Prameter is not 1'
  });
}
```

## Acess query string parameters

```javascript
response.send({
  message: request.query.message
});
```

And then send the query parameter via the url as follows.

> /user?message=hello


text:
<resources>
    <string name="trustedshops_sdk_trustbadge_dialog_certified_title">Trusted Shops keurmerk</string>
    <string name="trustedshops_sdk_trustbadge_dialog_certified_point1_title">Gecertificeerde webwinkel</string>
    <string name="trustedshops_sdk_trustbadge_dialog_certified_point1_description">Deze webwinkel voldoet aan de Trusted Shops kwaliteitscriteria</string>
    <string name="trustedshops_sdk_trustbadge_dialog_certified_point2_title">Geld-terug-garantie</string>
    <string name="trustedshops_sdk_trustbadge_dialog_certified_point2_description">Zekerheid met de Trusted Shops garantie</string>
    <string name="trustedshops_sdk_trustbadge_dialog_certified_point3_title">Klantenservice</string>
    <string name="trustedshops_sdk_trustbadge_dialog_certified_point3_description">Neem bij vragen contact op met deze webwinkel of zo nodig met Trusted Shops</string>
    <string name="trustedshops_sdk_trustbadge_dialog_negative_button_text">CERTIFICAAT</string>
    <plurals
        name="reviewDescriptionLong">
        <item  quantity="one">%d beoordeling</item>
        <item  quantity="few">%d beoordelingen</item>
        <item  quantity="many">%d beoordelingen</item>
        <item  quantity="other">%d beoordelingen</item>
    </plurals>
    <string name="trustedshops_MARK_A">Uitstekend</string>
    <string name="trustedshops_MARK_B">Goed</string>
    <string name="trustedshops_MARK_C">Redelijk</string>
    <string name="trustedshops_MARK_D">Matig</string>
    <string name="trustedshops_MARK_E">Slecht</string>
</resources>


text:
/**
 * Base class for ccui.Button
 * @class
 * @extends ccui.Widget
 *
 * @property {Number}   boundingWidth       - Width of the bounding area of label, the real content width is limited by boundingWidth
 * @property {Number}   boundingHeight      - Height of the bounding area of label, the real content height is limited by boundingHeight
 * @property {String}   string              - The content string of the label
 * @property {Number}   stringLength        - <@readonly> The content string length of the label
 * @property {String}   font                - The label font with a style string: e.g. "18px Verdana"
 * @property {String}   fontName            - The label font name
 * @property {Number}   fontSize            - The label font size
 * @property {Number}   textAlign           - Horizontal Alignment of label, cc.TEXT_ALIGNMENT_LEFT|cc.TEXT_ALIGNMENT_CENTER|cc.TEXT_ALIGNMENT_RIGHT
 * @property {Number}   verticalAlign       - Vertical Alignment of label: cc.VERTICAL_TEXT_ALIGNMENT_TOP|cc.VERTICAL_TEXT_ALIGNMENT_CENTER|cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM
 * @property {Boolean}  touchScaleEnabled   - Indicate whether the label will scale when touching
 */
ccui.Text = ccui.Widget.extend(/** @lends ccui.Text# */{
    _touchScaleChangeEnabled: false,
    _normalScaleValueX: 1,
    _normalScaleValueY: 1,
    _fontName: "Thonburi",
    _fontSize: 10,
    _onSelectedScaleOffset:0.5,
    _labelRenderer: "",
    _textAreaSize: null,
    _textVerticalAlignment: 0,
    _textHorizontalAlignment: 0,
    _className: "Text",
    _type: null,
    _labelRendererAdaptDirty: true,

    /**
     * allocates and initializes a UILabel.
     * Constructor of ccui.Text
     * @constructor
     * @example
     * // example
     * var uiLabel = new ccui.Text();
     */
    ctor: function (textContent, fontName, fontSize) {
        this._type = ccui.Text.Type.SYSTEM;
        this._textAreaSize = cc.size(0, 0);
        ccui.Widget.prototype.ctor.call(this);

        fontSize && this.init(textContent, fontName, fontSize);

    },

    init: function (textContent, fontName, fontSize) {
        if (ccui.Widget.prototype.init.call(this)) {
            if(arguments.length > 0){
                this.setString(textContent);
                this.setFontName(fontName);
                this.setFontSize(fontSize);
            }
            return true;
        }
        return false;
    },

    _initRenderer: function () {
        this._labelRenderer = new cc.LabelTTF();
        this.addProtectedChild(this._labelRenderer, ccui.Text.RENDERER_ZORDER, -1);
    },

    /**
     * Changes the  value of label.
     * @deprecated
     * @param {String} text
     */
    setText: function (text) {
        cc.log("Please use the setString");
        this.setString(text);
    },

    /**
     * Changes the  value of label.
     * @param {String} text
     */
    setString: function (text) {
        this._labelRenderer.setString(text);
        this._updateContentSizeWithTextureSize(this._labelRenderer.getContentSize());
        this._labelRendererAdaptDirty = true;
    },

    /**
     * Gets the string value of label.
     * @deprecated
     * @returns {String}
     */
    getStringValue: function () {
        cc.log("Please use the getString");
        return this._labelRenderer.getString();
    },

    /**
     * Gets the string value of label.
     * @returns {String}
     */
    getString: function () {
        return this._labelRenderer.getString();
    },

    /**
     * Gets the string length of label.
     * @returns {Number}
     */
    getStringLength: function () {
        return this._labelRenderer.getStringLength();
    },

    /**
     * set fontSize
     * @param {Number} size
     */
    setFontSize: function (size) {
        this._labelRenderer.setFontSize(size);
        this._fontSize = size;
        this._updateContentSizeWithTextureSize(this._labelRenderer.getContentSize());
        this._labelRendererAdaptDirty = true;
    },

    /**
     * Get font Size
     * @returns {Number}
     */
    getFontSize: function () {
        return this._fontSize;
    },

    /**
     * Set font name
     * @return {String} name
     */
    setFontName: function (name) {
        this._fontName = name;
        this._labelRenderer.setFontName(name);
        this._updateContentSizeWithTextureSize(this._labelRenderer.getContentSize());
        this._labelRendererAdaptDirty = true;
    },

    /**
     * Get font name
     * @returns {string}
     */
    getFontName: function () {
        return this._fontName;
    },

    _setFont: function (font) {
        var res = cc.LabelTTF._fontStyleRE.exec(font);
        if (res) {
            this._fontSize = parseInt(res[1]);
            this._fontName = res[2];
            this._labelRenderer._setFont(font);
            this._labelScaleChangedWithSize();
        }
    },
    _getFont: function () {
        return this._labelRenderer._getFont();
    },

    getType: function(){
        return  this._type;
    },

    /**
     * set textAreaSize
     * @param {cc.Size} size
     */
    setTextAreaSize: function (size) {
        this._labelRenderer.setDimensions(size);
        this._updateContentSizeWithTextureSize(this._labelRenderer.getContentSize());
        this._labelRendererAdaptDirty = true;
    },

    getTextAreaSize: function(){
        return this._labelRenderer.getDimensions();
    },

    /**
     * set Horizontal Alignment of cc.LabelTTF
     * @param {cc.TEXT_ALIGNMENT_LEFT|cc.TEXT_ALIGNMENT_CENTER|cc.TEXT_ALIGNMENT_RIGHT} alignment Horizontal Alignment
     */
    setTextHorizontalAlignment: function (alignment) {
        this._labelRenderer.setHorizontalAlignment(alignment);
        this._updateContentSizeWithTextureSize(this._labelRenderer.getContentSize());
        this._labelRendererAdaptDirty = true;
    },

    /**
     * Return Horizontal Alignment of label
     * @returns {TEXT_ALIGNMENT_LEFT|TEXT_ALIGNMENT_CENTER|TEXT_ALIGNMENT_RIGHT}
     */
    getTextHorizontalAlignment: function () {
        return this._labelRenderer.getHorizontalAlignment();
    },

    /**
     * Set Vertical Alignment of label
     * @param {cc.VERTICAL_TEXT_ALIGNMENT_TOP|cc.VERTICAL_TEXT_ALIGNMENT_CENTER|cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM} alignment
     */
    setTextVerticalAlignment: function (alignment) {
        this._labelRenderer.setVerticalAlignment(alignment);
        this._updateContentSizeWithTextureSize(this._labelRenderer.getContentSize());
        this._labelRendererAdaptDirty = true;
    },

    /**
     * Get text vertical alignment.
     * @returns {VERTICAL_TEXT_ALIGNMENT_TOP|VERTICAL_TEXT_ALIGNMENT_CENTER|VERTICAL_TEXT_ALIGNMENT_BOTTOM}
     */
    getTextVerticalAlignment: function () {
        return this._labelRenderer.getVerticalAlignment();
    },

    /**
     * Sets the touch scale enabled of label.
     * @param {Boolean} enable
     */
    setTouchScaleChangeEnabled: function (enable) {
        this._touchScaleChangeEnabled = enable;
    },

    /**
     * Gets the touch scale enabled of label.
     * @returns {Boolean}
     */
    isTouchScaleChangeEnabled: function () {
        return this._touchScaleChangeEnabled;
    },

    _onPressStateChangedToNormal: function () {
        if (!this._touchScaleChangeEnabled)
            return;
        this._labelRenderer.setScaleX(this._normalScaleValueX);
        this._labelRenderer.setScaleY(this._normalScaleValueY);
    },

    _onPressStateChangedToPressed: function () {
        if (!this._touchScaleChangeEnabled)
            return;
        this._labelRenderer.setScaleX(this._normalScaleValueX + this._onSelectedScaleOffset);
        this._labelRenderer.setScaleY(this._normalScaleValueY + this._onSelectedScaleOffset);
    },

    _onPressStateChangedToDisabled: function () {

    },

    _updateFlippedX: function () {
        if (this._flippedX)
            this._labelRenderer.setScaleX(-1.0);
        else
            this._labelRenderer.setScaleX(1.0);
    },

    _updateFlippedY: function () {
        if (this._flippedY)
            this._labelRenderer.setScaleY(-1.0);
        else
            this._labelRenderer.setScaleY(1.0);
    },

    _onSizeChanged: function () {
        ccui.Widget.prototype._onSizeChanged.call(this);
        this._labelRendererAdaptDirty = true;
    },

    _adaptRenderers: function(){
        if (this._labelRendererAdaptDirty) {
            this._labelScaleChangedWithSize();
            this._labelRendererAdaptDirty = false;
        }
    },

    getVirtualRendererSize: function(){
        return this._labelRenderer.getContentSize();
    },

    /**
     * override "getVirtualRenderer" method of widget.
     * @returns {cc.Node}
     */
    getVirtualRenderer: function () {
        return this._labelRenderer;
    },

    _labelScaleChangedWithSize: function () {
        var locContentSize = this._contentSize;
        if (this._ignoreSize) {
            this._labelRenderer.setScale(1.0);
            this._normalScaleValueX = this._normalScaleValueY = 1;
        } else {
            this._labelRenderer.setDimensions(cc.size(locContentSize.width, locContentSize.height));
            var textureSize = this._labelRenderer.getContentSize();
            if (textureSize.width <= 0.0 || textureSize.height <= 0.0) {
                this._labelRenderer.setScale(1.0);
                return;
            }
            var scaleX = locContentSize.width / textureSize.width;
            var scaleY = locContentSize.height / textureSize.height;
            this._labelRenderer.setScaleX(scaleX);
            this._labelRenderer.setScaleY(scaleY);
            this._normalScaleValueX = scaleX;
            this._normalScaleValueY = scaleY;
        }
        this._labelRenderer.setPosition(locContentSize.width / 2.0, locContentSize.height / 2.0);
    },

    /**
     * Returns the "class name" of widget.
     * @returns {string}
     */
    getDescription: function () {
        return "Label";
    },

    enableShadow: function(shadowColor, offset, blurRadius){
        this._labelRenderer.enableShadow(shadowColor, offset, blurRadius);
    },

    enableOutline: function(outlineColor, outlineSize){
        this._labelRenderer.enableOutline(outlineColor, outlineSize);
    },

    enableGlow: function(glowColor){
        if (this._type == ccui.Text.Type.TTF)
            this._labelRenderer.enableGlow(glowColor);
    },

    disableEffect: function(){
        this._labelRenderer.disableEffect();
    },

    _createCloneInstance: function () {
        return ccui.Text.create();
    },

    _copySpecialProperties: function (uiLabel) {
        if(uiLabel instanceof ccui.Text){
            this.setFontName(uiLabel._fontName);
            this.setFontSize(uiLabel.getFontSize());
            this.setString(uiLabel.getString());
            this.setTouchScaleChangeEnabled(uiLabel.touchScaleEnabled);
            this.setTextAreaSize(uiLabel._textAreaSize);
            this.setTextHorizontalAlignment(uiLabel._labelRenderer.getHorizontalAlignment());
            this.setTextVerticalAlignment(uiLabel._labelRenderer.getVerticalAlignment());
        }
    },

    _setBoundingWidth: function (value) {
        this._textAreaSize.width = value;
        this._labelRenderer._setBoundingWidth(value);
        this._labelScaleChangedWithSize();
    },
    _setBoundingHeight: function (value) {
        this._textAreaSize.height = value;
        this._labelRenderer._setBoundingHeight(value);
        this._labelScaleChangedWithSize();
    },
    _getBoundingWidth: function () {
        return this._textAreaSize.width;
    },
    _getBoundingHeight: function () {
        return this._textAreaSize.height;
    }

});

var _p = ccui.Text.prototype;

// Extended properties
/** @expose */
_p.boundingWidth;
cc.defineGetterSetter(_p, "boundingWidth", _p._getBoundingWidth, _p._setBoundingWidth);
/** @expose */
_p.boundingHeight;
cc.defineGetterSetter(_p, "boundingHeight", _p._getBoundingHeight, _p._setBoundingHeight);
/** @expose */
_p.string;
cc.defineGetterSetter(_p, "string", _p.getString, _p.setString);
/** @expose */
_p.stringLength;
cc.defineGetterSetter(_p, "stringLength", _p.getStringLength);
/** @expose */
_p.font;
cc.defineGetterSetter(_p, "font", _p._getFont, _p._setFont);
/** @expose */
_p.fontSize;
cc.defineGetterSetter(_p, "fontSize", _p.getFontSize, _p.setFontSize);
/** @expose */
_p.fontName;
cc.defineGetterSetter(_p, "fontName", _p.getFontName, _p.setFontName);
/** @expose */
_p.textAlign;
cc.defineGetterSetter(_p, "textAlign", _p.getTextHorizontalAlignment, _p.setTextHorizontalAlignment);
/** @expose */
_p.verticalAlign;
cc.defineGetterSetter(_p, "verticalAlign", _p.getTextVerticalAlignment, _p.setTextVerticalAlignment);

_p = null;

/**
 * allocates and initializes a UILabel.
 * @deprecated
 * @return {ccui.Text}
 * @example
 * // example
 * var uiLabel = ccui.Text.create();
 */
ccui.Label = ccui.Text.create = function (textContent, fontName, fontSize) {
    return new ccui.Text(textContent, fontName, fontSize);
};

ccui.Text.RENDERER_ZORDER = -1;

ccui.Text.Type = {
    SYSTEM: 0,
    TTF: 1
};


text:
package com.google.cloud.dataflow.sdk.coders;

import static com.google.common.base.Preconditions.checkArgument;

import com.google.cloud.dataflow.sdk.util.InstanceBuilder;
import com.google.cloud.dataflow.sdk.values.TypeDescriptor;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * A {@code CoderProvider} may create a {@link Coder} for
 * any concrete class.
 */
public final class CoderProviders {

  // Static utility class
  private CoderProviders() { }

  /**
   * Creates a {@link CoderProvider} built from particular static methods of a class that
   * implements {@link Coder}, particularly for use in {@link DefaultCoder} annotations.
   *
   *
The class must have the following static method:
   *
   *
{@code
   * public static Coder<T> of(TypeDescriptor<T> type)
   * }
   *

   */
  public static <T> CoderProvider fromStaticMethods(Class<T> clazz) {
    return new CoderProviderFromStaticMethods(clazz);
  }

  /**
   * Returns a {@link CoderProvider} that consults each of the provider {@code coderProviders}
   * and returns the first {@link Coder} provided.
   *
   *
Note that the order in which the providers are listed matters: While the set of types
   * handled will be the union of those handled by all of the providers in the list, the actual
   * {@link Coder} provided by the first successful provider may differ, and may have inferior
   * properties. For example, not all {@link Coder Coders} are deterministic, handle {@code null}
   * values, or have comparable performance.
   */
  public static CoderProvider firstOf(CoderProvider... coderProviders) {
    return new FirstOf(ImmutableList.copyOf(coderProviders));
  }

  ///////////////////////////////////////////////////////////////////////////////////////////////

  /**
   * @see #firstOf
   */
  private static class FirstOf implements CoderProvider {

    private Iterable<CoderProvider> providers;

    public FirstOf(Iterable<CoderProvider> providers) {
      this.providers = providers;
    }

    @Override
    public <T> Coder<T> getCoder(TypeDescriptor<T> type) throws CannotProvideCoderException {
      List<String> messages = Lists.newArrayList();
      for (CoderProvider provider : providers) {
        try {
          return provider.getCoder(type);
        } catch (CannotProvideCoderException exc) {
          messages.add(String.format("%s could not provide a Coder for type %s: %s",
              provider, type, exc.getMessage()));
        }
      }
      throw new CannotProvideCoderException(
          String.format("Cannot provide coder for type %s: %s.",
              type, Joiner.on("; ").join(messages)));
    }
  }

  private static class CoderProviderFromStaticMethods implements CoderProvider {

    /** If true, then clazz has {@code of(TypeDescriptor)}. If false, {@code of(Class)}. */
    private final boolean takesTypeDescriptor;
    private final Class<?> clazz;

    public CoderProviderFromStaticMethods(Class<?> clazz) {
      // Note that the second condition supports older classes, which only needed to provide
      // of(Class), not of(TypeDescriptor). Our own classes have updated to accept a
      // TypeDescriptor. Hence the error message points only to the current specification,
      // not both acceptable conditions.
      checkArgument(classTakesTypeDescriptor(clazz) || classTakesClass(clazz),
          "Class " + clazz.getCanonicalName()
          + " is missing required static method of(TypeDescriptor).");

      this.takesTypeDescriptor = classTakesTypeDescriptor(clazz);
      this.clazz = clazz;
    }

    @Override
    public <T> Coder<T> getCoder(TypeDescriptor<T> type) throws CannotProvideCoderException {
      try {
        if (takesTypeDescriptor) {
          @SuppressWarnings("unchecked")
          Coder<T> result = InstanceBuilder.ofType(Coder.class)
              .fromClass(clazz)
              .fromFactoryMethod("of")
              .withArg(TypeDescriptor.class, type)
              .build();
          return result;
        } else {
          @SuppressWarnings("unchecked")
          Coder<T> result = InstanceBuilder.ofType(Coder.class)
              .fromClass(clazz)
              .fromFactoryMethod("of")
              .withArg(Class.class, type.getRawType())
              .build();
          return result;
        }
      } catch (RuntimeException exc) {
        if (exc.getCause() instanceof InvocationTargetException) {
          throw new CannotProvideCoderException(exc.getCause().getCause());
        }
        throw exc;
      }
    }

    private boolean classTakesTypeDescriptor(Class<?> clazz) {
      try {
        clazz.getDeclaredMethod("of", TypeDescriptor.class);
        return true;
      } catch (NoSuchMethodException | SecurityException exc) {
        return false;
      }
    }

    private boolean classTakesClass(Class<?> clazz) {
      try {
        clazz.getDeclaredMethod("of", Class.class);
        return true;
      } catch (NoSuchMethodException | SecurityException exc) {
        return false;
      }
    }
  }
}


text:
namespace Google.Cloud.BigQuery.DataExchange.V1Beta1.Snippets
{
    // [START analyticshub_v1beta1_generated_AnalyticsHubService_UpdateDataExchange_sync]
    using Google.Cloud.BigQuery.DataExchange.V1Beta1;
    using Google.Protobuf.WellKnownTypes;

    public sealed partial class GeneratedAnalyticsHubServiceClientSnippets
    {
        /// <summary>Snippet for UpdateDataExchange</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void UpdateDataExchangeRequestObject()
        {
            // Create client
            AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.Create();
            // Initialize request argument(s)
            UpdateDataExchangeRequest request = new UpdateDataExchangeRequest
            {
                UpdateMask = new FieldMask(),
                DataExchange = new DataExchange(),
            };
            // Make the request
            DataExchange response = analyticsHubServiceClient.UpdateDataExchange(request);
        }
    }
    // [END analyticshub_v1beta1_generated_AnalyticsHubService_UpdateDataExchange_sync]
}


text:
package com.tle.web.customlinks;

import com.tle.common.Check;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;

public class CustomLinkContentHandler implements ContentHandler {
  private String baseUri;
  private String iconUrl;

  @Override
  public void startElement(String uri, String localName, String qName, Attributes atts)
      throws SAXException {
    if (qName.equalsIgnoreCase("base") && Check.isEmpty(baseUri)) {
      baseUri = atts.getValue("href");
    } else if (qName.equalsIgnoreCase("link") && Check.isEmpty(iconUrl)) {
      if (atts.getValue("rel").equalsIgnoreCase("icon")) {
        iconUrl = atts.getValue("href");
      } else if (atts.getValue("rel").equalsIgnoreCase("shortcut icon")) {
        iconUrl = atts.getValue("href");
      }
    }
  }

  public void setBaseUri(String baseUri) {
    this.baseUri = baseUri;
  }

  public String getBaseUri() {
    return baseUri;
  }

  public void setIconUrl(String iconUrl) {
    this.iconUrl = iconUrl;
  }

  public String getIconUrl() {
    return iconUrl;
  }

  @Override
  public void startPrefixMapping(String prefix, String uri) throws SAXException {}

  @Override
  public void startDocument() throws SAXException {}

  @Override
  public void skippedEntity(String name) throws SAXException {}

  @Override
  public void setDocumentLocator(Locator locator) {}

  @Override
  public void processingInstruction(String target, String data) throws SAXException {}

  @Override
  public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {}

  @Override
  public void endPrefixMapping(String prefix) throws SAXException {}

  @Override
  public void endElement(String uri, String localName, String qName) throws SAXException {}

  @Override
  public void endDocument() throws SAXException {}

  @Override
  public void characters(char[] ch, int start, int length) throws SAXException {}
}


text:
//#####################
//# Mini Game Machine #
//#####################
//File: index.html
//Created by: Sam Walz <mail[at]samwalz.com> 05. September 2013
//Last changed by: Sam Walz <mail[at]samwalz.com> 20. September 2013

// global variables
var _timeToRespondTimer;
var _maximumTimePerGameTimer;
var _gameTimeCountdownTimer;
var _contentHeight = 800;
var _contentWidth = 450;
var _contentRatio = 1.77777777778;
var _gameRunning = false;
var _gameStartReceived = false;
var _currentGame;
var _selectedGames;
var _selectedGamesAmount;
var _totalScoreCurrentGame = 0;
var _gameTimeCoundown = 0;
var _totalPlayerScore = new Array();
var Player1 = 0;
var Player2 = 1;
var Player3 = 2;
var Player4 = 3;
var _unity; // a possible unity game

function utf8_to_b64(str) {
    var result = window.btoa(unescape(encodeURIComponent(str)));
    return result.substring(0, result.length - 1);
}

function b64_to_utf8(str) {
    return decodeURIComponent(escape(window.atob(str)));
}

// turns the game list into a linked list for convenience
makeLinkedGamesList();
function makeLinkedGamesList()
{
	var linkedGamesList = _g[0];
	var currentItem = linkedGamesList;
	currentItem.chosen = true;
	for (var i = 1; i < _g.length; i++)
	{
		currentItem.next = _g[i];
		currentItem.next.chosen = true;
		currentItem = currentItem.next;
	}

	_games = linkedGamesList;

}
// returns a non-linked copy of the linked list (so one can do destructive operations on it)
function gamesCopy()
{
    var gameCounter = 0;

	// move to the first chosen item in the list
	var currentItem = _games;
	while (currentItem != null && !currentItem.chosen) currentItem = currentItem.next;

	// make a copy of the first chosen item
	var copy = new Object();
	copy.first = gameCopy(currentItem);
	if (copy.first) {
		gameCounter++;
	}

	var currentItemCopy = copy.first;
	while (currentItem.next)
	{
		if (currentItem.next.chosen)
		{
			currentItemCopy.next = gameCopy(currentItem.next);
			gameCounter++;
			currentItemCopy = currentItemCopy.next;
		}
		currentItem = currentItem.next;
	}
	copy.length = gameCounter;
	return copy;
}
// creates a game copy
function gameCopy(game)
{
	var copy = new Object();
	copy.name = game.name;
	copy.path = game.path;
	copy.type = game.type;
	copy.credits = game.credits;
	copy.instructions = game.instructions;
	return copy;
}

// returns a number - and even if it has to rip it from a string
// worst case it will return a 0
function GetNumber(input)
{
	if (typeof input != "number") {
		var parseResult = parseInt(input);
		if (typeof parseResult != "number") {
		    return 0;
		}
	    return parseResult;
    } else {
		return input;
	}
}

/*
 * functions to be called from the menu-unity player and from the score board-unity player
 */
function PlayerOneControl(number)
{
	if (_gameRunning) return; // security
}

function PlayerTwoControl(number)
{
	if (_gameRunning) return; // security
}

function PlayerThreeControl(number)
{
	if (_gameRunning) return; // security
}

function PlayerFourControl(number)
{
	if (_gameRunning) return; // security
}

// will do another round of games with the same amount
function AnotherRound()
{
    CompileGamesList(_selectedGamesAmount);
	for (var player = 0; player < 4; player++)
	{
		document.getElementById("totalScorePlayer" + (player + 1)).innerHTML = 0;
		document.getElementById("currentScorePlayer" + (player + 1)).innerHTML = 0;
	}
	StartGames();
}

// compiles a random list of games
function CompileGamesList(amount)
{
	if (_gameRunning) return; // security
	_selectedGamesAmount = amount;

	var totalList = new Object();
	totalList = gamesCopy();

	var selection = cutListItem(totalList, Math.floor((Math.random()*totalList.length)));
	var currentItem = selection;

	for (var i = 1; i < amount; i++)
	{
		currentItem.next = cutListItem(totalList, Math.floor((Math.random()*totalList.length)));
		currentItem = currentItem.next;
	}
	currentItem.next = null;
	_selectedGames = selection;
	AddGamesToProgressDisplay();
}

// adds graphical representations of games to the progress display
function AddGamesToProgressDisplay()
{
	var widthList = $("#sideBarRight").width();
	var heightList = $("#sideBarRight").height();

	// count number of selected games
	var gameCount = 1;
	var currentItem = _selectedGames;
	while (currentItem.next != null)
	{
		gameCount++;
		currentItem = currentItem.next;
	}

	// calculate size for game cubes
	var widthGameCube = _gameCubeMaxSize;
	var problemSolved = false;
	var columnCount = Math.floor(widthList / widthGameCube) - 1;
	while (!problemSolved)
	{
		columnCount++;
		widthGameCube = widthList / columnCount;
		problemSolved = (heightList / widthGameCube) * columnCount > gameCount;
	}
	widthGameCube--;

	// add game cubes to the progress display
	$("#sideBarRight").empty();
	var currentItem = _selectedGames;
	while (currentItem != null)
	{
		$("#sideBarRight").append('

');
		currentItem = currentItem.next;
	}

	// assign css attributes
	$(".gameCube").css("width", widthGameCube - 6).css("height", widthGameCube - 6);

}

// colors a game cube according to who has won
function ColorGameCube()
{
    var gameCube = $("#game" + utf8_to_b64(_currentGame.path));
	gameCube.addClass("gameCubeSolved");
	if (_currentGame.score[Player1] > _currentGame.score[Player2]
		&& _currentGame.score[Player1] > _currentGame.score[Player3]
		&& _currentGame.score[Player1] > _currentGame.score[Player4]) {
		gameCube.addClass("gameCubePlayer1");
	} else if (_currentGame.score[Player2] > _currentGame.score[Player1]
		&& _currentGame.score[Player2] > _currentGame.score[Player3]
		&& _currentGame.score[Player2] > _currentGame.score[Player4]) {
		gameCube.addClass("gameCubePlayer2");
	} else if (_currentGame.score[Player3] > _currentGame.score[Player1]
		&& _currentGame.score[Player3] > _currentGame.score[Player2]
		&& _currentGame.score[Player3] > _currentGame.score[Player4]) {
		gameCube.addClass("gameCubePlayer3");
	} else if (_currentGame.score[Player4] > _currentGame.score[Player1]
		&& _currentGame.score[Player4] > _currentGame.score[Player2]
		&& _currentGame.score[Player4] > _currentGame.score[Player3]) {
		gameCube.addClass("gameCubePlayer4");
	}

}

// marks a game cube active
function ColorGameCubeActive()
{
    var gameCube = $("#game" + utf8_to_b64(_currentGame.path));
	gameCube.addClass("gameCubeActive");

}

// marks a game cube damaged
function ColorGameCubeDamaged()
{
    var gameCube = $("#game" + utf8_to_b64(_currentGame.path));
	gameCube.addClass("gameCubeDamaged");

}

// returns a game at a given position (destructive: removes it also from the list -> to make sure no game ends up twice in the new list)
function cutListItem(list, position)
{
	var item = list.first;
	if (position == 0) {list.first = item.next; list.length--; return item;}
	var previousItem;
	for (var i = 0; i < position; i++)
	{
		previousItem = item;
		item = item.next;
	}
	if (item) {
		previousItem.next = item.next;
		list.length--;
	}

	return item;
}

// will start the whole game lineup
function StartGames()
{
	if (_gameRunning) return; // security
	_totalPlayerScore[Player1] = 0; _totalPlayerScore[Player2] = 0; _totalPlayerScore[Player3] = 0; _totalPlayerScore[Player4] = 0; // reset total score

	ShowCountdownToGame();
}

/*
 * internal functions - not to be called from any unity-player
 */
function PlayerPoints(player, amount)
{
    var number = GetNumber(amount);
	if (_totalScoreCurrentGame + number <= _maxPointsPerGame)
	{
		_totalScoreCurrentGame += number;
		_currentGame.score[player] += number;
		_totalPlayerScore[player] += number;
		document.getElementById("totalScorePlayer" + (player + 1)).innerHTML = _totalPlayerScore[player];
		document.getElementById("currentScorePlayer" + (player + 1)).innerHTML = _currentGame.score[player];
	}
}

function ShowScoreboard() // will show the score board
{
	if (_gameRunning) return; // security
	LoadHTML5Game("scoreBoard.html");
}

OptimizeDimensions();
function OptimizeDimensions() // will resize everything so it will fit nicely in the window
{
	var screenWidth = $(window).width();
	var screenHeight = $(window).height();

	// recalculate content dimensions
	_contentHeight = (screenHeight / 4) * 3;
	_contentWidth = _contentRatio * _contentHeight;

	// set new dimensions
    $("#content").css("width", _contentWidth).css("height", _contentHeight);
    $("#unityPlayer").css("width", _contentWidth).css("height", _contentHeight);

	if (_contentWidth + 100 < screenWidth)
	{

		var sideBarWidth = (screenWidth - _contentWidth) / 2;
		$("#sideBarLeft").css("width", sideBarWidth).css("height", screenHeight)
		    .css("top", 0).css("left", 0);
		$("#sideBarRight").css("width", sideBarWidth).css("height", screenHeight)
		    .css("top", 0).css("left", _contentWidth + sideBarWidth);

		$("#score").css("height", screenHeight/4).css("width", _contentWidth)
		    .css("top", _contentHeight).css("left", sideBarWidth);
		$(".scoreBox").css("width", _contentWidth / 4.1);
	}
	else
	{

		var gapSize = (screenWidth - _contentWidth) / 2;
		var sideBarWidth = (screenHeight / 4);
		$("#sideBarLeft").css("width", sideBarWidth).css("height", sideBarWidth)
		    .css("top", _contentHeight).css("left", gapSize);
		$("#sideBarRight").css("width", sideBarWidth).css("height", sideBarWidth)
		    .css("top", _contentHeight).css("left", _contentWidth - sideBarWidth + gapSize);

		$("#score").css("height", screenHeight/4).css("width", _contentWidth - 2 * sideBarWidth)
		    .css("top", _contentHeight).css("left", sideBarWidth + gapSize);
		$(".scoreBox").css("width", (_contentWidth - 2 * sideBarWidth) / 4.2);
	}

}

function PrepareNextGame()
{
    if (_gameRunning) return; // security
	//_currentGameNumber++
	if (_currentGame == null) _currentGame = _selectedGames;
	else _currentGame = _currentGame.next;
}

function LoadNextGame() // will load the next game in the list
{
	if (_gameRunning) return; // security

	if (_currentGame == null)
	{
		ShowScoreboard();
	}
	else
	{
		LoadGame(_currentGame, true);
	}
}

function LoadGame(game, useTimers)
{
	if (_gameRunning) return; // security
    _gameStartReceived = false;

	// initialize score
	game.score = new Array();
	game.score[0] = 0; // score player 1
	game.score[1] = 0; // score player 2
	game.score[2] = 0; // score player 3
	game.score[3] = 0; // score player 4
	_totalScoreCurrentGame = 0;
	document.getElementById("currentScorePlayer1").innerHTML = 0;
	document.getElementById("currentScorePlayer2").innerHTML = 0;
	document.getElementById("currentScorePlayer3").innerHTML = 0;
	document.getElementById("currentScorePlayer4").innerHTML = 0;

	// load according to type
	switch (game.type)
	{
		case "unity":
			LoadUnityGame(_gamesDirectory + "/" + game.path);
		break;
		case "flash":
			LoadFlashGame(_gamesDirectory + "/" + game.path);
		break
		case "html5":
			LoadHTML5Game(_gamesDirectory + "/" + game.path);
		break;
		case "java":
			LoadJavaGame(_gamesDirectory + "/" + game.path);
		break;
	}

	if (useTimers)
	{
		// timeout for game to respond
		_timeToRespondTimer = window.setTimeout("GameDoesNotRespond()", _timeToRespond * 1000);
	}

	// now the game is running
	_gameRunning = true;
}

// game did not respond within given time
function GameDoesNotRespond()
{
	_gameRunning = false;
	ColorGameCubeDamaged();
	//window.clearInterval(_maximumTimePerGameTimer);
	ShowCountdownToGame();
}

// game ran longer than given time
function GameReachedMaximumTime()
{
	_gameRunning = false;
	ColorGameCube();
	ShowCountdownToGame();
}

function ShowCountdownToGame()
{
	window.clearInterval(_gameTimeCountdownTimer);

    // reset counter display
    document.getElementById("currentScorePlayer1").innerHTML = 0;
	document.getElementById("currentScorePlayer2").innerHTML = 0;
	document.getElementById("currentScorePlayer3").innerHTML = 0;
	document.getElementById("currentScorePlayer4").innerHTML = 0;
    PrepareNextGame();
	if (_currentGame) {
		ColorGameCubeActive();
		LoadHTML5Game("countdownBetweenGames.html#5"); // 5 second pause between games
	} else {
		ShowScoreboard();
	}

}

// will load a HTML5 game
function LoadHTML5Game(path)
{
	if (_gameRunning) return; // security

	// hide / show elements
	$("#html5Player").show().empty();
	$("#unityPlayer").hide().empty();
	$("#flashPlayer").hide().empty();
	$("#javaPlayer").hide().empty();

	$("#html5Player").append('');
	setTimeout(LoadHTML5GameSetFocus, 100);
}

// helper function to set focus on the html5 iFrame
function LoadHTML5GameSetFocus()
{
	var html5iFrame = $("#html5PlayeriFrame")[0];
    html5iFrame.tabIndex = 1235;
    html5iFrame.contentWindow.focus();
}

// will load a Flash game
function LoadFlashGame(path)
{
	if (_gameRunning) return; // security

	// hide / show elements
	$("#html5Player").hide().empty();
	$("#unityPlayer").hide().empty();
	$("#flashPlayer").show().empty();
	$("#javaPlayer").hide().empty();

	$("#flashPlayer").append('<embed id="flashPlayerEmbed" src="' + path + '" height=' + _contentHeight + ' width=' + _contentWidth + ' wmode="opaque" type="application/x-shockwave-flash"></embed>').focus();
	setTimeout(LoadFlashGameSetFlashFocus, 100);
}

// helper function to set focus on the flash element
function LoadFlashGameSetFlashFocus()
{
	var flash = document.getElementById("flashPlayerEmbed");
    flash.tabIndex = 1234;  // This was needed on Chrome 23
    flash.focus();
    // Attention: FireFox needs wmode "opaque"!
}

// will load a Java game
function LoadJavaGame(path)
{
	if (_gameRunning) return; // security

	// hide / show elements
	$("#html5Player").hide().empty();
	$("#unityPlayer").hide().empty();
	$("#flashPlayer").hide().empty();
	$("#javaPlayer").show().empty();

	$("#javaPlayer").append('<object type="application/x-java-applet" height=' + _contentHeight + ' width=' + _contentWidth + '>'
							+ '<param name="code" value="ChainJam" />'
							+ '<param name="archive" value="' + path + '" />'
							+ 'Applet failed to run.  No Java plug-in was found.'
							+ '</object>');
}

// will load a Unity3D game
function LoadUnityGame(path)
{
	if (_gameRunning) return; // security

	// hide / show elements
	$("#html5Player").hide().empty();
	$("#unityPlayer").show().empty();
	$("#flashPlayer").hide().empty();
	$("#javaPlayer").hide().empty();

	var config = {
		width: _contentWidth,
		height: _contentHeight,
		params: { enableDebugging:"0" }

	};
	_unity = new UnityObject2(config);

	jQuery(function() {

		var $missingScreen = jQuery("#unityPlayer").find(".missing");
		var $brokenScreen = jQuery("#unityPlayer").find(".broken");
		$missingScreen.hide();
		$brokenScreen.hide();

		_unity.observeProgress(function (progress) {
			switch(progress.pluginStatus) {
				case "broken":
					$brokenScreen.find("a").click(function (e) {
						e.stopPropagation();
						e.preventDefault();
						u.installPlugin();
						return false;
					});
					$brokenScreen.show();
				break;
				case "missing":
					$missingScreen.find("a").click(function (e) {
						e.stopPropagation();
						e.preventDefault();
						u.installPlugin();
						return false;
					});
					$missingScreen.show();
				break;
				case "installed":
					$missingScreen.remove();
				break;
				case "first":
				break;
			}
		});
		_unity.initPlugin(jQuery("#unityPlayer")[0], path);
		//$("#unityPlayer").focus();
	});
}

// unity menu tells javascript framework that it has loaded
function MenuIsLoaded()
{
	var chosenGames = 0;
	for (var i = 0; i < _g.length; i++) if (_g[i].chosen) chosenGames++;
	_unity.getUnity().SendMessage("Menu", "SetNumberOfGames", chosenGames);
}

// counts the amount of seconds left for the current game down
function CountDownGameTime() {
    _gameTimeCoundown--;
	if (_gameTimeCoundown > 0)
	{
		$("#gameTimeCountdown").text(_gameTimeCoundown);
	}
	else
	{
		$("#gameTimeCountdown").text("");
	}

	if (_gameTimeCoundown > 9)
	{
		$("#gameTimeCountdown").css("font-size", "3vh");
	}
	else
	{
		$("#gameTimeCountdown").css("font-size", (10 - _gameTimeCoundown + 3) + "vh");
	}
}


text:
<?php
namespace Robo\Common;

use Robo\Result;
use Symfony\Component\Process\ExecutableFinder;
use Symfony\Component\Process\Process;

/**
 * This task is supposed to be executed as shell command.
 * You can specify working directory and if output is printed.
 */
trait ExecCommand
{
    /**
     * @var bool
     */
    protected $isPrinted = true;

    /**
     * @var string
     */
    protected $workingDirectory;

    /**
     * @var \Robo\Common\TimeKeeper
     */
    protected $execTimer;

    /**
     * @return \Robo\Common\TimeKeeper
     */
    protected function getExecTimer()
    {
        if (!isset($this->execTimer)) {
            $this->execTimer = new TimeKeeper();
        }
        return $this->execTimer;
    }

    /**
     * Is command printing its output to screen
     *
     * @return bool
     */
    public function getPrinted()
    {
        return $this->isPrinted;
    }

    /**
     * Changes working directory of command
     *
     * @param string $dir
     *
     * @return $this
     */
    public function dir($dir)
    {
        $this->workingDirectory = $dir;
        return $this;
    }

    /**
     * Should command output be printed
     *
     * @param bool $arg
     *
     * @return $this
     */
    public function printed($arg)
    {
        if (is_bool($arg)) {
            $this->isPrinted = $arg;
        }
        return $this;
    }

    /**
     * Look for a "{$cmd}.phar" in the current working
     * directory; return a string to exec it if it is
     * found.  Otherwise, look for an executable command
     * of the same name via findExecutable.
     *
     * @param string $cmd
     *
     * @return bool|string
     */
    protected function findExecutablePhar($cmd)
    {
        if (file_exists("{$cmd}.phar")) {
            return "php {$cmd}.phar";
        }
        return $this->findExecutable($cmd);
    }

    /**
     * Return the best path to the executable program
     * with the provided name.  Favor vendor/bin in the
     * current project. If not found there, use
     * whatever is on the $PATH.
     *
     * @param string $cmd
     *
     * @return bool|string
     */
    protected function findExecutable($cmd)
    {
        $pathToCmd = $this->searchForExecutable($cmd);
        if ($pathToCmd) {
            return $this->useCallOnWindows($pathToCmd);
        }
        return false;
    }

    /**
     * @param string $cmd
     *
     * @return string
     */
    private function searchForExecutable($cmd)
    {
        $projectBin = $this->findProjectBin();

        $localComposerInstallation = $projectBin . DIRECTORY_SEPARATOR . $cmd;
        if (file_exists($localComposerInstallation)) {
            return $localComposerInstallation;
        }
        $finder = new ExecutableFinder();
        return $finder->find($cmd, null, []);
    }

    /**
     * @return bool|string
     */
    protected function findProjectBin()
    {
        $candidates = [ __DIR__ . '/../../vendor/bin', __DIR__ . '/../../bin' ];

        // If this project is inside a vendor directory, give highest priority
        // to that directory.
        $vendorDirContainingUs = realpath(__DIR__ . '/../../../..');
        if (is_dir($vendorDirContainingUs) && (basename($vendorDirContainingUs) == 'vendor')) {
            array_unshift($candidates, $vendorDirContainingUs . '/bin');
        }

        foreach ($candidates as $dir) {
            if (is_dir("$dir")) {
                return realpath($dir);
            }
        }
        return false;
    }

    /**
     * Wrap Windows executables in 'call' per 7a88757d
     *
     * @param string $cmd
     *
     * @return string
     */
    protected function useCallOnWindows($cmd)
    {
        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
            if (file_exists("{$cmd}.bat")) {
                $cmd = "{$cmd}.bat";
            }
            return "call $cmd";
        }
        return $cmd;
    }

    /**
     * @param string $command
     *
     * @return \Robo\Result
     */
    protected function executeCommand($command)
    {
        $process = new Process($command);
        $process->setTimeout(null);
        if ($this->workingDirectory) {
            $process->setWorkingDirectory($this->workingDirectory);
        }
        $this->getExecTimer()->start();
        if ($this->isPrinted) {
            $process->run(function ($type, $buffer) {
                print $buffer;
            });
        } else {
            $process->run();
        }
        $this->getExecTimer()->stop();

        return new Result($this, $process->getExitCode(), $process->getOutput(), ['time' => $this->getExecTimer()->elapsed()]);
    }
}


text:
<?php

namespace LinguaLeo\DataQuery;

interface ResultInterface extends \Countable
{
    /**
     * Returns a hash
     *
     * @return array
     */
    public function keyValue();

    /**
     * Returns a row
     *
     * @return array
     */
    public function one();

    /**
     * Returns a value
     *
     * @return mixed
     */
    public function value($name);

    /**
     * Returns an array of rows
     *
     * @return array
     */
    public function many();

    /**
     * Returns an array of columns
     *
     * @return array
     */
    public function table();

    /**
     * Returns a column
     *
     * @return array
     */
    public function column($number);

    /**
     * Free the result
     *
     * @return bool
     */
    public function free();
}


text:
package org.atlasapi.generation.generated.model;

import com.google.common.collect.ImmutableSet;
import org.atlasapi.entity.Identified;
import org.atlasapi.generation.model.FieldInfo;
import org.atlasapi.generation.model.JsonType;
import org.atlasapi.generation.model.ModelClassInfo;

import java.util.Set;

public class IdentifiedInfo implements ModelClassInfo {

    private static final Set<FieldInfo> fields = ImmutableSet.<FieldInfo>builder()
            .add(
                    FieldInfo.builder()
                            .withName("alias_urls")
                            .withDescription("")
                            .withType("String")
                            .withIsMultiple(true)
                            .withIsModelType(false)
                            .withJsonType(JsonType.ARRAY)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("aliases")
                            .withDescription("")
                            .withType("Alias")
                            .withIsMultiple(true)
                            .withIsModelType(true)
                            .withJsonType(JsonType.ARRAY)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("uri")
                            .withDescription("")
                            .withType("String")
                            .withIsMultiple(false)
                            .withIsModelType(false)
                            .withJsonType(JsonType.STRING)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("curie")
                            .withDescription("")
                            .withType("String")
                            .withIsMultiple(false)
                            .withIsModelType(false)
                            .withJsonType(JsonType.STRING)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("uris")
                            .withDescription("")
                            .withType("String")
                            .withIsMultiple(true)
                            .withIsModelType(false)
                            .withJsonType(JsonType.ARRAY)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("last_updated")
                            .withDescription("")
                            .withType("DateTime")
                            .withIsMultiple(false)
                            .withIsModelType(false)
                            .withJsonType(JsonType.STRING)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("id")
                            .withDescription("")
                            .withType("Id")
                            .withIsMultiple(false)
                            .withIsModelType(false)
                            .withJsonType(JsonType.STRING)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("equivalence_update")
                            .withDescription("")
                            .withType("DateTime")
                            .withIsMultiple(false)
                            .withIsModelType(false)
                            .withJsonType(JsonType.STRING)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("alias_urls")
                            .withDescription("")
                            .withType("String")
                            .withIsMultiple(true)
                            .withIsModelType(false)
                            .withJsonType(JsonType.ARRAY)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("aliases")
                            .withDescription("")
                            .withType("Alias")
                            .withIsMultiple(true)
                            .withIsModelType(true)
                            .withJsonType(JsonType.ARRAY)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("uri")
                            .withDescription("")
                            .withType("String")
                            .withIsMultiple(false)
                            .withIsModelType(false)
                            .withJsonType(JsonType.STRING)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("curie")
                            .withDescription("")
                            .withType("String")
                            .withIsMultiple(false)
                            .withIsModelType(false)
                            .withJsonType(JsonType.STRING)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("uris")
                            .withDescription("")
                            .withType("String")
                            .withIsMultiple(true)
                            .withIsModelType(false)
                            .withJsonType(JsonType.ARRAY)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("last_updated")
                            .withDescription("")
                            .withType("DateTime")
                            .withIsMultiple(false)
                            .withIsModelType(false)
                            .withJsonType(JsonType.STRING)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("id")
                            .withDescription("")
                            .withType("Id")
                            .withIsMultiple(false)
                            .withIsModelType(false)
                            .withJsonType(JsonType.STRING)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("equivalence_update")
                            .withDescription("")
                            .withType("DateTime")
                            .withIsMultiple(false)
                            .withIsModelType(false)
                            .withJsonType(JsonType.STRING)
                            .build()
            )
            .add(
                    FieldInfo.builder()
                            .withName("custom_fields")
                            .withDescription("")
                            .withType("<String, String>")
                            .withIsMultiple(true)
                            .withIsModelType(false)
                            .withJsonType(JsonType.MAP)
                            .build()
            )
            .build();

    @Override
    public Set<FieldInfo> fields() {
        return fields;
    }

    @Override
    public String key() {
        return "identified";
    }

    @Override
    public String description() {
        return " Base type for descriptions of resources. @author Robert Chatley @author Lee Denison";
    }

    @Override
    public Class<?> describedType() {
        return Identified.class;
    }

}


text:
package ru.fastcards.shop;

import java.util.List;

import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;

public class MainShopPagerAdapter extends PagerAdapter {
	private List<View> pages;

   public MainShopPagerAdapter(List<View> pages){
        this.pages = pages;
    }

    @Override
    public Object instantiateItem(View collection, int position){
        View v = pages.get(position);
        ((ViewPager) collection).addView(v, 0);
        return v;
    }

    @Override
    public void destroyItem(View collection, int position, Object view){
        ((ViewPager) collection).removeView((View) view);
    }

    @Override
    public int getCount(){
        return pages.size();
    }

    @Override
    public boolean isViewFromObject(View view, Object object){
        return view.equals(object);
    }

    @Override
    public void finishUpdate(View arg0){
    }

    @Override
    public void restoreState(Parcelable arg0, ClassLoader arg1){
    }

    @Override
    public Parcelable saveState(){
        return null;
    }

    @Override
    public void startUpdate(View arg0){
    }

}


text:
		<TITLE>Excel to HTML</TITLE>

Excel to HTML table conversion utility by Niral Soni

			Absolute Path of Excel file to read
			:
			<INPUT TYPE="file" ID="txtFilePath" value="">
			ID of the Sheet to read
			:
			<INPUT TYPE="text" ID="txtSheetName" value="">

			Header Row Start at
			:
			<INPUT TYPE="text" ID="txtHeaderRowStart" value="" onblur="numberOnly(this)">
			Header Column Start at
			:
			<INPUT TYPE="text" ID="txtHeaderColStart" value="" onblur="numberOnly(this)">

			Total Header Columns Count
			:
			<INPUT TYPE="text" ID="txtHeaderCols" value="" onblur="numberOnly(this)">
			Total Data Rows Count
			:
			<INPUT TYPE="text" ID="txtDataRows" value="" onblur="numberOnly(this)">

			<INPUT TYPE="button" VALUE="Convert to HTML" ONCLICK="convert2HTML()">

	<INPUT TYPE="button" VALUE="Toggle HTML View / Source" style="display: none;" id="btnGetSrc" ONCLICK="toggleSrc()">

		<TEXTAREA ID="txtOutput" style="width:100%; height: 100%;"></TEXTAREA>

			<INPUT TYPE="button" VALUE="Copy to Clipboard" ONCLICK="copy2Clipboard()">
			<INPUT TYPE="button" VALUE="Reset All" ONCLICK="resetFields()">


text:
#include <stdint.h>
#include <string.h>

#include <openssl/curve25519.h>

#include "../test/file_test.h"

static bool TestSignature(FileTest *t, void *arg) {
  std::vector<uint8_t> private_key, public_key, message, expected_signature;
  if (!t->GetBytes(&private_key, "PRIV") ||
      private_key.size() != 64 ||
      !t->GetBytes(&public_key, "PUB") ||
      public_key.size() != 32 ||
      !t->GetBytes(&message, "MESSAGE") ||
      !t->GetBytes(&expected_signature, "SIG") ||
      expected_signature.size() != 64) {
    return false;
  }

  uint8_t signature[64];
  if (!ED25519_sign(signature, message.data(), message.size(),
                    private_key.data())) {
    t->PrintLine("ED25519_sign failed");
    return false;
  }

  if (!t->ExpectBytesEqual(expected_signature.data(), expected_signature.size(),
                           signature, sizeof(signature))) {
    return false;
  }

  if (!ED25519_verify(message.data(), message.size(), signature,
                      public_key.data())) {
    t->PrintLine("ED25519_verify failed");
    return false;
  }

  return true;
}

int main(int argc, char **argv) {
  if (argc != 2) {
    fprintf(stderr, "%s <test input.txt>\n", argv[0]);
    return 1;
  }

  return FileTestMain(TestSignature, nullptr, argv[1]);
}