text:
layout: frontpage
---

[EventFlow](https://github.com/eventflow/EventFlow)
is a easy to use async/await first CQRS+ES framework for the Microsoft .NET
platform.

View documentation at https://docs.geteventflow.net/.

{% highlight csharp %}
using (var resolver = EventFlowOptions.New
  .AddEvents(typeof (TestAggregate).Assembly)
  .AddCommandHandlers(typeof (TestAggregate).Assembly)
  .UseInMemoryReadStoreFor<TestAggregate, TestReadModel>()
  .CreateResolver())
{
  var commandBus = resolver.Resolve<ICommandBus>();
  var eventStore = resolver.Resolve<IEventStore>();
  var readModelStore = resolver.Resolve<IInMemoryReadModelStore<
    TestAggregate,
    TestReadModel>>();
  var id = TestId.New;

  // Publish a command
  await commandBus.PublishAsync(new PingCommand(id));

  // Load aggregate
  var testAggregate = await eventStore.LoadAggregateAsync<TestAggregate>(id);

  // Get read model from in-memory read store
  var testReadModel = await readModelStore.GetAsync(id);
}
{% endhighlight %}

View the GitHub project page at
[https://github.com/eventflow/EventFlow](https://github.com/eventflow/EventFlow)
for more information.


text:
/*
 * =====================================================================================
 *
 *       Filename:  config.h
 *
 *    Description:  config headers
 *
 *        Version:  1.0
 *        Created:  2014/07/11 18时06分31秒
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  sampeng(penglingjun) (), penglingjun@baofeng.com
 *   Organization:
 *
 * =====================================================================================
 */
#ifndef _UTILS_CONFIG_H
#define _UTILS_CONFIG_H

#define isNull(o) (NULL==o)
#define GET_ARRAY_LEN(array,len) {len = (sizeof(array) / sizeof(array[0]));}

typedef struct Config {
    char *redisInfoFile;
} Config;

Config *IntConfigObj(int argc,char const *argv[],char const *configName);
#endif

redpajama_set_name: RedPajamaGithub


text:
<!--
id: 294474227
link: http://tumblr.atmos.org/post/294474227/60-stunning-satellite-photos-of-earth
slug: 60-stunning-satellite-photos-of-earth
date: Mon Dec 21 2009 20:36:58 GMT-0800 (PST)
publish: 2009-12-021
tags:
title: 60 Stunning Satellite Photos of Earth | Webdesigner Depot
-->

60 Stunning Satellite Photos of Earth | Webdesigner Depot
=========================================================

![](http://www.tumblr.com/photo/1280/atmos/294474227/1/tumblr_kv1e5ndDXn1qz4sng)


text:
set -ex

# device specific settings
HYPRIOT_DEVICE="ODROID C1/C1+"

# set up /etc/resolv.conf
echo "nameserver 8.8.8.8" > /etc/resolv.conf

# set up ODROID repository
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AB19BAC9 D986B59D
echo "deb http://deb.odroid.in/c1/ xenial main" > /etc/apt/sources.list.d/odroid.list

# set up Hypriot Schatzkiste repository
wget -q https://packagecloud.io/gpg.key -O - | apt-key add -
echo 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ jessie main' > /etc/apt/sources.list.d/hypriot.list

# Set up docker repository
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2C52609D
echo 'deb [arch=armhf] https://apt.dockerproject.org/repo debian-jessie main' > /etc/apt/sources.list.d/docker.list

# update all apt repository lists
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get upgrade -y

# define packages to install
packages=(
    # as the Odroid C1/C1+ does not have a hardware clock we need a fake one
    fake-hwclock

    # install device-init
    device-init=${DEVICE_INIT_VERSION}

    # install dependencies for docker-tools
    cgroupfs-mount \
    cgroup-bin \
    libltdl7 \

    # required to install docker-compose
    python-pip

    # install docker-engine, docker-machine
    docker-engine="${DOCKER_ENGINE_VERSION}"
)

apt-get -y install --no-install-recommends ${packages[*]}

# install docker-compose
pip install docker-compose=="${DOCKER_COMPOSE_VERSION}"

# install docker-machine
curl -L "https://github.com/docker/machine/releases/download/v${DOCKER_MACHINE_VERSION}/docker-machine-$(uname -s)-$(dpkg --print-architecture)" > /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine

# install ODROID kernel
touch /boot/uImage
apt-get install -y \
    --no-install-recommends \
    u-boot-tools \
    initramfs-tools \
    linux-image-"${KERNEL_VERSION}"

# cleanup APT cache and lists
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# set device label and version number
echo "HYPRIOT_DEVICE=\"$HYPRIOT_DEVICE\"" >> /etc/os-release
echo "HYPRIOT_IMAGE_VERSION=\"$HYPRIOT_IMAGE_VERSION\"" >> /etc/os-release


text:
package xmlrpc

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"net/rpc"
	"reflect"
)

type Client struct {
	*rpc.Client
}

// clientCodec is rpc.ClientCodec interface implementation.
type clientCodec struct {
	// url presents url of xmlrpc service
	url string

	// httpClient works with HTTP protocol
	httpClient *http.Client

	// cookies stores cookies received on last request
	cookies []*http.Cookie

	// responses presents map of active requests. It is required to return request id, that
	// rpc.Client can mark them as done.
	responses map[uint64]*http.Response

	// responseBody holds response body of last request.
	responseBody []byte

	// ready presents channel, that is used to link request and it`s response.
	ready chan uint64
}

func (codec *clientCodec) WriteRequest(request *rpc.Request, params interface{}) (err error) {
	httpRequest, err := newRequest(codec.url, request.ServiceMethod, params)

	if codec.cookies != nil {
		for _, cookie := range codec.cookies {
			httpRequest.AddCookie(cookie)
		}
	}

	if err != nil {
		return err
	}

	var httpResponse *http.Response
	httpResponse, err = codec.httpClient.Do(httpRequest)

	if err != nil {
		return err
	}

	if codec.cookies == nil {
		codec.cookies = httpResponse.Cookies()
	}

	codec.responses[request.Seq] = httpResponse
	codec.ready <- request.Seq

	return nil
}

func (codec *clientCodec) ReadResponseHeader(response *rpc.Response) (err error) {
	seq := <-codec.ready
	httpResponse := codec.responses[seq]

	codec.responseBody, err = ioutil.ReadAll(httpResponse.Body)

	if err != nil {
		return err
	}

	httpResponse.Body.Close()

	if fault, _ := responseFailed(codec.responseBody); fault {
		response.Error = fmt.Sprintf("%v", parseFailedResponse(codec.responseBody))
	}

	response.Seq = seq
	delete(codec.responses, seq)

	return nil
}

func (codec *clientCodec) ReadResponseBody(x interface{}) (err error) {
	if (x == nil) {
		return nil
	}

	var result interface{}
	result, err = parseSuccessfulResponse(codec.responseBody)

	if err != nil {
		return err
	}

	v := reflect.ValueOf(x)

	if v.Kind() == reflect.Ptr {
		v = v.Elem()
	}

	v.Set(reflect.ValueOf(result))

	return nil
}

func (codec *clientCodec) Close() error {
	transport := codec.httpClient.Transport.(*http.Transport)
	transport.CloseIdleConnections()
	return nil
}

// NewClient returns instance of rpc.Client object, that is used to send request to xmlrpc service.
func NewClient(url string, transport *http.Transport) (*Client, error) {
	if transport == nil {
		transport = &http.Transport{}
	}

	httpClient := &http.Client{Transport: transport}

	codec := clientCodec{
		url:        url,
		httpClient: httpClient,
		ready:      make(chan uint64),
		responses:  make(map[uint64]*http.Response),
	}

	return &Client{rpc.NewClientWithCodec(&codec)}, nil
}


text:
<?php

namespace AppBundle\EventListener;

use AppBundle\Events;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
use Symfony\Component\Templating\EngineInterface;

/**
 * Notifies user.
 */
class ContactNotificationSubscriber implements EventSubscriberInterface
{
    /**
     * @var \Swift_Mailer
     */
    private $mailer;

    /**
     * @var EngineInterface
     */
    private $templating;

    /**
     * @var EntityManagerInterface
     */
    private $em;

    /**
     * @var string
     */
    private $senderMail;

    /**
     * @var string
     */
    private $senderName;

    /**
     * Constructor.
     *
     * @param \Swift_Mailer   $mailer
     * @param EngineInterface $templating
     * @param string          $sender
     */
    public function __construct(\Swift_Mailer $mailer, EngineInterface $templating, EntityManagerInterface $em, $senderMail, $senderName)
    {
        $this->mailer = $mailer;
        $this->templating = $templating;
        $this->em = $em;
        $this->senderMail = $senderMail;
        $this->senderName = $senderName;
    }

    public static function getSubscribedEvents()
    {
        return [
            Events::CONTACT_MESSAGE => 'onContactMessage',
        ];
    }

    /**
     * @param GenericEvent $event
     */
    public function onContactMessage(GenericEvent $event)
    {
        /** @var array $data */
        $data = $event->getSubject();

        $this->sendToTeam($data);
        $this->notifyUser($data);
    }

    private function sendToTeam($data)
    {
        $subject = '[GRYC Contact]['.$data['category'].'] '.$data['subject'];
        $textBody = $this->templating->render('mail/contact_message.txt.twig', [
            'data' => $data,
        ]);
        $htmlBody = $this->templating->render('mail/contact_message.html.twig', [
            'data' => $data,
        ]);

        // Retrieve admins from DB
        $admins = $this->em->getRepository('AppBundle:User')->getAdmins();
        $adminsMails = [];
        foreach ($admins as $admin) {
            $adminsMails[$admin->getEmail()] = $admin->getFullName();
        }

        if (empty($adminsMails)) {
            throw new \Exception('No admins mails');
        }

        $message = \Swift_Message::newInstance()
            ->setFrom($this->senderMail, $this->senderName)
            ->setTo($adminsMails)
            ->setReplyTo($data['email'], $data['firstName'].' '.$data['lastName'])
            ->setSubject($subject)
            ->setContentType('text/plain; charset=UTF-8')
            ->setBody($textBody, 'text/plain')
            ->addPart($htmlBody, 'text/html')
        ;

        $this->mailer->send($message);
    }

    private function notifyUser($data)
    {
        $subject = 'Reception of your message';
        $textBody = $this->templating->render('mail/confirmation_contact_message.txt.twig', [
                'data' => $data, ]
        );
        $htmlBody = $this->templating->render('mail/confirmation_contact_message.html.twig', [
        'data' => $data, ]
        );

        $message = \Swift_Message::newInstance()
            ->setFrom($this->senderMail, $this->senderName)
            ->setTo($data['email'], $data['firstName'].' '.$data['lastName'])
            ->setSubject($subject)
            ->setContentType('text/plain; charset=UTF-8')
            ->setBody($textBody, 'text/plain')
            ->addPart($htmlBody, 'text/html')
        ;

        $this->mailer->send($message);
    }
}


text:
module.exports = {
  Tab: require('./components/Tab'),
  Tabs: require('./components/Tabs')
};


text:
from rx import Observable, AnonymousObservable
from rx.internal.exceptions import SequenceContainsNoElementsError
from rx.internal import extensionmethod

def first_or_default_async(source, has_default=False, default_value=None):
    def subscribe(observer):
        def on_next(x):
            observer.on_next(x)
            observer.on_completed()

        def on_completed():
            if not has_default:
                observer.on_error(SequenceContainsNoElementsError())
            else:
                observer.on_next(default_value)
                observer.on_completed()

        return source.subscribe(on_next, observer.on_error, on_completed)
    return AnonymousObservable(subscribe)

@extensionmethod(Observable)
def first_or_default(self, predicate=None, default_value=None):
    """Returns the first element of an observable sequence that satisfies
    the condition in the predicate, or a default value if no such element
    exists.

    Example:
    res = source.first_or_default()
    res = source.first_or_default(lambda x: x > 3)
    res = source.first_or_default(lambda x: x > 3, 0)
    res = source.first_or_default(null, 0)

    Keyword arguments:
    predicate -- {Function} [optional] A predicate function to evaluate for
        elements in the source sequence.
    default_value -- {Any} [Optional] The default value if no such element
        exists.  If not specified, defaults to None.

    Returns {Observable} Sequence containing the first element in the
    observable sequence that satisfies the condition in the predicate, or a
    default value if no such element exists.
    """

    return self.filter(predicate).first_or_default(None, default_value) if predicate else first_or_default_async(self, True, default_value)


text:
<!DOCTYPE html>

    <meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>Protech CMS : Products</title>
    <?php $this->load->view("CMS/Links"); ?>

<?php  if($this->session->userdata('loggedIn') != true){redirect('Login');}   ?>

            <?php $this->load->view('CMS/MainSideBar'); ?>

            <?php $this->load->view('CMS/MainHeader'); ?>

                <?php if($type=="printer"): ?>

                        <?php require_once("ProductsSidebar.php"); ?>

                    <?php else: ?>

                        <?php endif; ?>

                                        <?php if($type == 'printer'): ?>

Products

                                            <?php else: ?>

Parts

                                                <?php endif; ?>

                                                    <form id="hackerSearchForm">

                                                                        <input type="text" class="form-control" placeholder="Search" id="hackerSearchBar" value="">

                                  <button type="submit">

                                                                        </button>

                                                    </form>

                                                    <button class="btn btn-sucess" id="AddNewProductShow"> Add New Product</button>

                                                            ID
                                                            Title
                                                            Img
                                                            Family
                                                            Edit
                                                            Delete

                                                        <?php foreach ($products as $product ):?>
                                                            <?php if($type == 'printer'): ?>
                                                                <tr data-id="<?=$product['printer_id']?>" class="hackerSearch">

                                                                        <?=$product['printer_id']?>

                                                                    <?php else: ?>
                                                                        <tr data-id="<?=$product['part_id']?>" class="hackerSearch">

                                                                                <?=$product['part_id']?>

                                                                            <?php endif; ?>
                                                                                <?php  $the_id = ($type == 'printer' ?  'printer_id' : 'part_id') ?>;

                                                                                <?=$product['name']?>

                                                                                <?php if(isset($product['images'][0])): ?>
                                                                                <img src="<?=base_url().$product['images'][0]['image_path']?>" class="prodimg">
                                                                                <?php else: ?>
                                                                                no photo
                                                                                <?php endif; ?>

                                                                                <?php if(isset($product['family_name'])): ?>
                                                                                <?=$product['family_name']?>
                                                                                <?php endif; ?>

                                                                                <a href='#' class='editeBtn' id="EditProductOverlayFormShow" data-placement='right' data-type="<?=$type;?>" data-id="<?=$product[$the_id]?>">
                                                                                <a href='#' class='deleteBtn' data-target='#DeleteProductModal' data-toggle='modal' title='delete' data-id="<?=$product[$the_id]?>" data-placement='right'>

                                                                        <?php endforeach; ?>

                                                                «

1

2

3

4

5

                                                                »

 Add New Product

            <form method="POST" action="<?=base_url()?>index.php/<?=$type?>/create" enctype="multipart/form-data">

Product Information

                                    Product Title :
                                    <input type="text" name="printer_name" class="form-control InputProduct" placeholder="Product Title" />

                                    Product Pdf:
                                    <input type="file" name="PDF" class="form-control InputProduct" />

                                <?php if($type == 'printer'): ?>

                                        Product Family:
                                        <select name="family" class="form-control InputProduct">
                                            <option value="0">Choose Family</option>
                                            <?php foreach ($families as $family):?>
                                                <option value="<?=$family['family_id']?>">
                                                    <?=$family['family_name']?>
                                                </option>
                                                <?php endforeach;?>
                                        </select>

                                    <?php else: ?>

                                            Product ID:
                                            <select name="family" class="form-control InputProduct">
                                                <option value="0">Choose Product ID</option>
                                                <?php if(isset($results_printer)):?>
                                                    <?php foreach($results_printer as $key_view => $row_view) : ?>
                                                        <option value="<?= $row_view['printer_id'];?>">
                                                            <?= $row_view['name'];?>
                                                        </option>
                                                        <?php endforeach;?>
                                                            <?php endif;?>
                                            </select>

                                        <?php endif;?>
                                            <button type="button" class="btn btn-md" id="incrementAdd">Add Image</button>

                                                Product Image:
                                                <input type="file" name="image[]" class="form-control InputProduct" multiple="" />

                                    Product Driver Link:
                                    <input type="text" name="ProductDriverLink" class="form-control InputProduct" />

                                    Description:
                                    <input name="description" type="text" value="" placeholder="Write description" />

                                    <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                        Choose tags
                                    </button>

                                        <input class="form-group formLayout" type="text" id="hackerDownSearch" placeholder="Search for tag">
                                        <?php foreach ($tags as $tag):?>

<?=$tag['tag_name']?>
         <input value="<?=$tag['tag_name']?>" name="tags[]" type="checkbox">

                                            <?php endforeach;?>

General Specifications

                                        Product Specifications :
                                        <input type="text" name="General[]" class="form-control overlayproduct" placeholder="Product Specifications" />

                                    <button type="button" class="btn btn-md AddNewSpecificationsbtn" onclick="add_generalspecification();">
                                        </button>

Printing Specifications

                                        Printing Specifications :
                                        <input type="text" name="Printing[]" class="form-control overlayproduct" placeholder="Printing Specifications" />

                                    <button type="button" class="btn btn-md AddNewSpecificationsbtn" onclick="add_printingspecifications();">
                                        </button>

Guarantee

                                        Product Guarantee :
                                        <input type="text" name="Guarantee[]" class="form-control overlayproduct" placeholder="Product Guarantee" />

                                    <button type="button" class="btn btn-md AddNewSpecificationsbtn" onclick="add_Guarantee();">
                                        </button>

                            <button type="submit" class="btn btn-md OverLayFormBtn">ADD PRODUCT</button>

            </form>

 Edit Product

            <form action="<?=base_url().'index.php/'.$type.'/edit'?>" method="POST" enctype="multipart/form-data">
                <input type="hidden" name="id" value="" id="hackerID" />

Product Information

                                    Product Title :
                                    <input type="text" name="ProductTitle" class="form-control InputProduct" placeholder="Product Title" id="hackerTitle" />

                                    Product Pdf:
                                    <input type="file" name="ProductPdf" class="form-control InputProduct" id="hackerPDF" />

The existant pdf:

                                <?php if($type == 'printer'): ?>
                                    Product Family:

                                        <select name="ProductFamily" class="form-control InputProduct" id="hackerSelect">
                                            <option value="0">Choose Family</option>
                                        </select>

                                    <?php else: ?>
                                        Product ID:

                                            <select name="ProductFamily" class="form-control InputProduct" id="hackerSelect">
                                                <option value="0">Choose Product ID</option>
                                            </select>

                                        <?php endif;?>

                                            <button type="button" class="btn btn-md" id="incrementAdd1">Add Image</button>

                                                Product Image:
                                                <input type="file" name="image[]" class="form-control InputProduct" multiple="" />

                                    Product Driver Link:
                                    <input type="text" name="product_driver" class="form-control InputProduct" id="hackerDRIVER" />

                                    Description:
                                    <input type="text" name="description" id="hackerDescription" />

Product Images

General Specifications

                                <button type="button" class="btn btn-md" id="AddNewSpecificationsbtn1">
                                    </button>

Printing Specifications

                                <button type="button" class="btn btn-md" id="AddNewSpecificationsbtn2">
                                    </button>

Guarantee

                                <button type="button" class="btn btn-md" id="AddNewSpecificationsbtn3">
                                    </button>

                            <button type="submit" class="btn btn-md OverLayFormBtn">Edit</button>

            </form>

                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

                    <form id="deleteConfirmed" method="post">

Delete Product

Are you sure that you need to delete this Data ?

                                <input type="text" id="deleteConfirm" name="RecoredId" class="form-control" placeholder="RecoredId" />

                            <button class="btn customBtn" type="submit"> Delete</button>

                    </form>

                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

                    <form id="ForgotPassForm" method="post">

Post Tags

                                <input type="text" id='PostTag_post_id' class="form-control" placeholder="RecoredId" />

                            <button class="btn customBtn" type="submit" data-dismiss="modal">Close</button>

                    </form>


text:
<?php

namespace Google\Service\Compute;

class CommitmentsScopedList extends \Google\Collection
{
  protected $collection_key = 'commitments';
  protected $commitmentsType = Commitment::class;
  protected $commitmentsDataType = 'array';
  protected $warningType = CommitmentsScopedListWarning::class;
  protected $warningDataType = '';

  /**
   * @param Commitment[]
   */
  public function setCommitments($commitments)
  {
    $this->commitments = $commitments;
  }
  /**
   * @return Commitment[]
   */
  public function getCommitments()
  {
    return $this->commitments;
  }
  /**
   * @param CommitmentsScopedListWarning
   */
  public function setWarning(CommitmentsScopedListWarning $warning)
  {
    $this->warning = $warning;
  }
  /**
   * @return CommitmentsScopedListWarning
   */
  public function getWarning()
  {
    return $this->warning;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CommitmentsScopedList::class, 'Google_Service_Compute_CommitmentsScopedList');


text:
print("Status: 302")
print("Location: /static/apps/index.html")


text:
/*
 * Write a program that reads a list of words from a file words.txt
 * and finds how many times each of the words is contained in another
 * file test.txt. The result should be written in the file result.txt
 * and the words should be sorted by the number of their occurrences
 * in descending order. Handle all possible exceptions in your methods.
*/

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;

class WordsCount
{
    static void Main()
    {
        try
        {
            //Dictionary hold the word and number of how many times it's contained in test.txt
            Dictionary<string, int> words = new Dictionary<string, int>();
            //List holidng the words in words.txt
            List<string> wordsInFile = new List<string>();
            StreamReader file = new StreamReader("test.txt");
            StreamReader fileWithWords = new StreamReader("words.txt");

            //Reading words.txt and filling wordsInFile
            using (fileWithWords)
            {
                string line = fileWithWords.ReadLine();
                while (line != null)
                {
                    string[] splittedLine = line.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                    foreach (var word in splittedLine)
                    {
                        wordsInFile.Add(word);
                    }
                    line = fileWithWords.ReadLine();
                }
            }

            string fileData;

            using (file)
            {
                //Reading the file test.txt
                fileData = file.ReadToEnd();
                foreach (var word in wordsInFile)
                {
                    //for each word in words.txt find the number of matches in test.txt
                    //and Add in the dictionary the word + the count
                    string regex = "\\b" + word + "\\b";
                    int count = Regex.Matches(fileData, regex, RegexOptions.IgnoreCase).Count;
                    words.Add(word, count);
                }
            }

            //List holding the lines of the output file
            List<string> output = new List<string>();

            //The lines start with the number so we can sort the words by the number of occurrences
            foreach (var item in words)
            {
                output.Add(item.Value + " : " + item.Key);
            }

            //Sorting and reversing the list
            output.Sort();
            output.Reverse();
            StreamWriter writer = new StreamWriter("result.txt");
            using (writer)
            {
                foreach (var item in output)
                {
                    writer.WriteLine(item);
                }
            }
            Console.WriteLine("The program finished it's work successfuly!");
        }
        catch (ArgumentException)
        {
            Console.WriteLine("One or both of the files does not exist!");
        }
        catch (FileNotFoundException)
        {
            Console.WriteLine("One or both of the files does not exist!");
        }
        catch (DirectoryNotFoundException)
        {
            Console.WriteLine("The directory where one of the files or both should be does not exist!");
        }
        catch (UnauthorizedAccessException)
        {
            Console.WriteLine("There is no permission for writing in the file result.txt!");
        }
        catch (System.Security.SecurityException)
        {
            Console.WriteLine("A security error has been detected!");
        }
        catch (ObjectDisposedException)
        {
            Console.WriteLine("It has been a problem to write into the file!");
        }
        catch (NotSupportedException)
        {
            Console.WriteLine("Compatibility error!");
        }
        catch (PathTooLongException)
        {
            Console.WriteLine("The path to result.txt is too long!");
        }
        catch (IOException)
        {
            Console.WriteLine("IO Exception has accured!");
        }
        catch (OutOfMemoryException)
        {
            Console.WriteLine("Out of memory!");
        }
    }
}


text:
package com.microsoft.windowsazure.services.media.authentication;

public interface TokenProvider {

    /**
     * Acquire an access token
     *
     * @return a valid access token
     * @throws Exception
     */
    AzureAdAccessToken acquireAccessToken() throws Exception;

}


text:
/*
 * ProjectEuler/src/c/Problem007.c
 *
 * 10001st prime
 * =============
 * Published on Friday, 28th December 2001, 06:00 pm
 *
 * By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see
 * that the 6th prime is 13. What is the 10 001st prime number?
 */

#include <stdio.h>
#include "ProjectEuler/ProjectEuler.h"
#include "ProjectEuler/Problem007.h"

int main(int argc, char** argv) {

    return 0;
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">

    <title>Ugly Truth MVP</title>
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
      <link rel="stylesheet" href="themes/my-custom-theme.min.css" />
      <link rel="stylesheet" href="themes/jquery.mobile.icons.min.css" />

      <link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons">
      <link rel="stylesheet" href="collapzion.min.css">

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

            Back

Ugly Truth

Home

Search

My Account

Sign Up

        <form action="action_page.html">
          이메일 주소
          <input type="text" id="textinput-hide" placeholder="이메일 주소">
          비밀번호
          <input type="password" id="textinput-hide" placeholder="비밀번호">
          <fieldset data-role="controlgroup" data-type="horizontal">
              <input type="radio" name="radio-choice-h-2" id="radio-choice-h-2a" value="on" checked="checked" data-mini="true">
              남자
              <input type="radio" name="radio-choice-h-2" id="radio-choice-h-2b" value="off" data-mini="true">
              여자
          </fieldset>
          가입하기

Already have an Account? Sign in

        </form>


text:
const hello =
Hello {this.props.name}
;


text:
Describe "[$($Lab.Name)] DHCP" -Tag DHCP {
Context "Role deployment successful" {
        It "[DHCP] Should return the correct amount of machines" {
            (Get-LabVm -Role DHCP).Count | Should -Be $(Get-Lab).Machines.Where({$_.Roles.Name -contains 'DHCP'}).Count
        }
    }
}


text:
namespace blink {

class ImageQualityControllerTest : public RenderingTest {
protected:
    ImageQualityController* controller() { return m_controller; }

private:
    void SetUp() override
    {
        m_controller = ImageQualityController::imageQualityController();
        RenderingTest::SetUp();
    }
    void TearDown() override
    {
    }

    ImageQualityController* m_controller;
};

TEST_F(ImageQualityControllerTest, RegularImage)
{
    setBodyInnerHTML("");
    LayoutObject* obj = document().body()->firstChild()->layoutObject();

    EXPECT_EQ(InterpolationDefault, controller()->chooseInterpolationQuality(*obj, nullptr, nullptr, LayoutSize()));
}

TEST_F(ImageQualityControllerTest, ImageRenderingPixelated)
{
    setBodyInnerHTML("");
    LayoutObject* obj = document().body()->firstChild()->layoutObject();

    EXPECT_EQ(InterpolationNone, controller()->chooseInterpolationQuality(*obj, nullptr, nullptr, LayoutSize()));
}

#if !USE(LOW_QUALITY_IMAGE_INTERPOLATION)

class TestImageAnimated : public Image {
public:
    bool maybeAnimated() override { return true; }
    bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override { return false; }
    IntSize size() const override { return IntSize(); }
    void destroyDecodedData() override { }
    void draw(SkCanvas*, const SkPaint&, const FloatRect& dstRect, const FloatRect& srcRect, RespectImageOrientationEnum, ImageClampingMode) override { }
    PassRefPtr<SkImage> imageForCurrentFrame() override { return nullptr; }
};

TEST_F(ImageQualityControllerTest, ImageMaybeAnimated)
{
    setBodyInnerHTML("");
    LayoutImage* img = toLayoutImage(document().body()->firstChild()->layoutObject());

    RefPtr<TestImageAnimated> testImage = adoptRef(new TestImageAnimated);
    EXPECT_EQ(InterpolationMedium, controller()->chooseInterpolationQuality(*img, testImage.get(), nullptr, LayoutSize()));
}

class TestImageWithContrast : public Image {
public:
    bool maybeAnimated() override { return true; }
    bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override { return false; }
    IntSize size() const override { return IntSize(); }
    void destroyDecodedData() override { }
    void draw(SkCanvas*, const SkPaint&, const FloatRect& dstRect, const FloatRect& srcRect, RespectImageOrientationEnum, ImageClampingMode) override { }

    bool isBitmapImage() const override { return true; }
    PassRefPtr<SkImage> imageForCurrentFrame() override { return nullptr; }
};

TEST_F(ImageQualityControllerTest, LowQualityFilterForContrast)
{
    setBodyInnerHTML("");
    LayoutImage* img = toLayoutImage(document().body()->firstChild()->layoutObject());

    RefPtr<TestImageWithContrast> testImage = adoptRef(new TestImageWithContrast);
    EXPECT_EQ(InterpolationLow, controller()->chooseInterpolationQuality(*img, testImage.get(), testImage.get(), LayoutSize()));
}

class TestImageLowQuality : public Image {
public:
    bool maybeAnimated() override { return true; }
    bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override { return false; }
    IntSize size() const override { return IntSize(1, 1); }
    void destroyDecodedData() override { }
    void draw(SkCanvas*, const SkPaint&, const FloatRect& dstRect, const FloatRect& srcRect, RespectImageOrientationEnum, ImageClampingMode) override { }

    bool isBitmapImage() const override { return true; }
    PassRefPtr<SkImage> imageForCurrentFrame() override { return nullptr; }
};

TEST_F(ImageQualityControllerTest, MediumQualityFilterForUnscaledImage)
{
    setBodyInnerHTML("");
    LayoutImage* img = toLayoutImage(document().body()->firstChild()->layoutObject());

    RefPtr<TestImageLowQuality> testImage = adoptRef(new TestImageLowQuality);
    EXPECT_EQ(InterpolationMedium, controller()->chooseInterpolationQuality(*img, testImage.get(), testImage.get(), LayoutSize(1, 1)));
}

class MockTaskRunner : public WebTaskRunner {
public:
    void setTime(double newTime) { m_time = newTime; }

    MockTaskRunner()
    : WebTaskRunner(), m_time(0.0), m_currentTask(nullptr)
    { }

    virtual ~MockTaskRunner()
    {
        if (m_currentTask)
            delete m_currentTask;
    }

private:
    void postTask(const WebTraceLocation&, Task*) override { }
    void postDelayedTask(const WebTraceLocation&, Task* task, double) override
    {
        if (m_currentTask)
            delete m_currentTask;
        m_currentTask = task;

    }
    bool runsTasksOnCurrentThread() override { return true; }
    std::unique_ptr<WebTaskRunner> clone() override { return nullptr; }
    double virtualTimeSeconds() const override { return 0.0; }
    double monotonicallyIncreasingVirtualTimeSeconds() const override { return m_time; }
    SingleThreadTaskRunner* taskRunner() override { return nullptr; }

    double m_time;
    Task* m_currentTask;
};

class MockTimer : public TaskRunnerTimer<ImageQualityController> {
public:
    using TimerFiredFunction = typename TaskRunnerTimer<ImageQualityController>::TimerFiredFunction;

    MockTimer(ImageQualityController* o, TimerFiredFunction f)
        : TaskRunnerTimer(&m_taskRunner, o, f)
    {
    }

    void fire()
    {
        fired();
        stop();
    }

    void setTime(double newTime)
    {
        m_taskRunner.setTime(newTime);
    }

private:
    MockTaskRunner m_taskRunner;
};

TEST_F(ImageQualityControllerTest, LowQualityFilterForResizingImage)
{
    MockTimer* mockTimer = new MockTimer(controller(), &ImageQualityController::highQualityRepaintTimerFired);
    controller()->setTimer(wrapUnique(mockTimer));
    setBodyInnerHTML("");
    LayoutImage* img = toLayoutImage(document().body()->firstChild()->layoutObject());

    RefPtr<TestImageLowQuality> testImage = adoptRef(new TestImageLowQuality);
    std::unique_ptr<PaintController> paintController = PaintController::create();
    GraphicsContext context(*paintController);

    // Paint once. This will kick off a timer to see if we resize it during that timer's execution.
    EXPECT_EQ(InterpolationMedium, controller()->chooseInterpolationQuality(*img, testImage.get(), testImage.get(), LayoutSize(2, 2)));

    // Go into low-quality mode now that the size changed.
    EXPECT_EQ(InterpolationLow, controller()->chooseInterpolationQuality(*img, testImage.get(), testImage.get(), LayoutSize(3, 3)));

    // Stay in low-quality mode since the size changed again.
    EXPECT_EQ(InterpolationLow, controller()->chooseInterpolationQuality(*img, testImage.get(), testImage.get(), LayoutSize(4, 4)));

    mockTimer->fire();
    // The timer fired before painting at another size, so this doesn't count as animation. Therefore not painting at low quality.
    EXPECT_EQ(InterpolationMedium, controller()->chooseInterpolationQuality(*img, testImage.get(), testImage.get(), LayoutSize(4, 4)));
}

TEST_F(ImageQualityControllerTest, MediumQualityFilterForNotAnimatedWhileAnotherAnimates)
{
    MockTimer* mockTimer = new MockTimer(controller(), &ImageQualityController::highQualityRepaintTimerFired);
    controller()->setTimer(wrapUnique(mockTimer));
    setBodyInnerHTML(" ");
    LayoutImage* animatingImage = toLayoutImage(document().getElementById("myAnimatingImage")->layoutObject());
    LayoutImage* nonAnimatingImage = toLayoutImage(document().getElementById("myNonAnimatingImage")->layoutObject());

    RefPtr<TestImageLowQuality> testImage = adoptRef(new TestImageLowQuality);
    std::unique_ptr<PaintController> paintController = PaintController::create();
    GraphicsContext context(*paintController);

    // Paint once. This will kick off a timer to see if we resize it during that timer's execution.
    EXPECT_EQ(InterpolationMedium, controller()->chooseInterpolationQuality(*animatingImage, testImage.get(), testImage.get(), LayoutSize(2, 2)));

    // Go into low-quality mode now that the size changed.
    EXPECT_EQ(InterpolationLow, controller()->chooseInterpolationQuality(*animatingImage, testImage.get(), testImage.get(), LayoutSize(3, 3)));

    // The non-animating image receives a medium-quality filter, even though the other one is animating.
    EXPECT_EQ(InterpolationMedium, controller()->chooseInterpolationQuality(*nonAnimatingImage, testImage.get(), testImage.get(), LayoutSize(4, 4)));

    // Now the second image has animated, so it also gets painted with a low-quality filter.
    EXPECT_EQ(InterpolationLow, controller()->chooseInterpolationQuality(*nonAnimatingImage, testImage.get(), testImage.get(), LayoutSize(3, 3)));

    mockTimer->fire();
    // The timer fired before painting at another size, so this doesn't count as animation. Therefore not painting at low quality for any image.
    EXPECT_EQ(InterpolationMedium, controller()->chooseInterpolationQuality(*animatingImage, testImage.get(), testImage.get(), LayoutSize(4, 4)));
    EXPECT_EQ(InterpolationMedium, controller()->chooseInterpolationQuality(*nonAnimatingImage, testImage.get(), testImage.get(), LayoutSize(4, 4)));
}

TEST_F(ImageQualityControllerTest, DontKickTheAnimationTimerWhenPaintingAtTheSameSize)
{
    MockTimer* mockTimer = new MockTimer(controller(), &ImageQualityController::highQualityRepaintTimerFired);
    controller()->setTimer(wrapUnique(mockTimer));
    setBodyInnerHTML("");
    LayoutImage* img = toLayoutImage(document().body()->firstChild()->layoutObject());

    RefPtr<TestImageLowQuality> testImage = adoptRef(new TestImageLowQuality);

    // Paint once. This will kick off a timer to see if we resize it during that timer's execution.
    EXPECT_EQ(InterpolationMedium, controller()->chooseInterpolationQuality(*img, testImage.get(), testImage.get(), LayoutSize(2, 2)));

    // Go into low-quality mode now that the size changed.
    EXPECT_EQ(InterpolationLow, controller()->chooseInterpolationQuality(*img, testImage.get(), testImage.get(), LayoutSize(3, 3)));

    // Stay in low-quality mode since the size changed again.
    EXPECT_EQ(InterpolationLow, controller()->chooseInterpolationQuality(*img, testImage.get(), testImage.get(), LayoutSize(4, 4)));

    mockTimer->stop();
    EXPECT_FALSE(mockTimer->isActive());
    // Painted at the same size, so even though timer is still executing, don't go to low quality.
    EXPECT_EQ(InterpolationLow, controller()->chooseInterpolationQuality(*img, testImage.get(), testImage.get(), LayoutSize(4, 4)));
    // Check that the timer was not kicked. It should not have been, since the image was painted at the same size as last time.
    EXPECT_FALSE(mockTimer->isActive());
}

TEST_F(ImageQualityControllerTest, DontRestartTimerUnlessAdvanced)
{
    MockTimer* mockTimer = new MockTimer(controller(), &ImageQualityController::highQualityRepaintTimerFired);
    controller()->setTimer(wrapUnique(mockTimer));
    setBodyInnerHTML("");
    LayoutImage* img = toLayoutImage(document().body()->firstChild()->layoutObject());

    RefPtr<TestImageLowQuality> testImage = adoptRef(new TestImageLowQuality);

    // Paint once. This will kick off a timer to see if we resize it during that timer's execution.
    mockTimer->setTime(0.1);
    EXPECT_FALSE(controller()->shouldPaintAtLowQuality(*img, testImage.get(), testImage.get(), LayoutSize(2, 2), 0.1));
    EXPECT_EQ(ImageQualityController::cLowQualityTimeThreshold, mockTimer->nextFireInterval());

    // Go into low-quality mode now that the size changed.
    double nextTime = 0.1 + ImageQualityController::cTimerRestartThreshold / 2.0;
    mockTimer->setTime(nextTime);
    EXPECT_EQ(true, controller()->shouldPaintAtLowQuality(*img, testImage.get(), testImage.get(), LayoutSize(3, 3), nextTime));
    // The fire interval has decreased, because we have not restarted the timer.
    EXPECT_EQ(ImageQualityController::cLowQualityTimeThreshold - ImageQualityController::cTimerRestartThreshold / 2.0, mockTimer->nextFireInterval());

    // This animation is far enough in the future to make the timer restart, since it is half over.
    nextTime = 0.1 + ImageQualityController::cTimerRestartThreshold + 0.01;
    EXPECT_EQ(true, controller()->shouldPaintAtLowQuality(*img, testImage.get(), testImage.get(), LayoutSize(4, 4), nextTime));
    // Now the timer has restarted, leading to a larger fire interval.
    EXPECT_EQ(ImageQualityController::cLowQualityTimeThreshold, mockTimer->nextFireInterval());
}

#endif

} // namespace blink


text:
;           Copyright Oliver Kowalke 2009.
;  Distributed under the Boost Software License, Version 1.0.
;     (See accompanying file LICENSE_1_0.txt or copy at
;           http://www.boost.org/LICENSE_1_0.txt)

;  ---------------------------------------------------------------------------------
;  |    0    |    1    |    2    |    3    |    4    |    5    |    6    |    7    |
;  ---------------------------------------------------------------------------------
;  |    0h   |   04h   |   08h   |   0ch   |   010h  |   014h  |   018h  |   01ch  |
;  ---------------------------------------------------------------------------------
;  | fc_mxcsr|fc_x87_cw| fc_strg |fc_deallo|  limit  |   base  |  fc_seh |   EDI   |
;  ---------------------------------------------------------------------------------
;  ---------------------------------------------------------------------------------
;  |    8    |    9    |   10    |    11   |    12   |    13   |    14   |    15   |
;  ---------------------------------------------------------------------------------
;  |   020h  |  024h   |  028h   |   02ch  |   030h  |   034h  |   038h  |   03ch  |
;  ---------------------------------------------------------------------------------
;  |   ESI   |   EBX   |   EBP   |   EIP   |   EXIT  |         | SEH NXT |SEH HNDLR|
;  ---------------------------------------------------------------------------------

.386
.XMM
.model flat, c
; standard C library function
_exit PROTO, value:SDWORD
.code

make_fcontext PROC BOOST_CONTEXT_EXPORT
    ; first arg of make_fcontext() == top of context-stack
    mov  eax, [esp+04h]

    ; reserve space for first argument of context-function
    ; EAX might already point to a 16byte border
    lea  eax, [eax-08h]

    ; shift address in EAX to lower 16 byte boundary
    and  eax, -16

    ; reserve space for context-data on context-stack
    ; size for fc_mxcsr .. EIP + return-address for context-function
    ; on context-function entry: (ESP -0x4) % 8 == 0
    ; additional space is required for SEH
    lea  eax, [eax-03ch]

    ; first arg of make_fcontext() == top of context-stack
    mov  ecx, [esp+04h]
    ; save top address of context stack as 'base'
    mov  [eax+014h], ecx
    ; second arg of make_fcontext() == size of context-stack
    mov  edx, [esp+08h]
    ; negate stack size for LEA instruction (== substraction)
    neg  edx
    ; compute bottom address of context stack (limit)
    lea  ecx, [ecx+edx]
    ; save bottom address of context-stack as 'limit'
    mov  [eax+010h], ecx
    ; save bottom address of context-stack as 'dealloction stack'
    mov  [eax+0ch], ecx

    ; third arg of make_fcontext() == address of context-function
    mov  ecx, [esp+0ch]
    mov  [eax+02ch], ecx

    ; save MMX control- and status-word
    stmxcsr  [eax]
    ; save x87 control-word
    fnstcw  [eax+04h]

    ; compute abs address of label finish
    mov  ecx, finish
    ; save address of finish as return-address for context-function
    ; will be entered after context-function returns
    mov  [eax+030h], ecx

    ; traverse current seh chain to get the last exception handler installed by Windows
    ; note that on Windows Server 2008 and 2008 R2, SEHOP is activated by default
    ; the exception handler chain is tested for the presence of ntdll.dll!FinalExceptionHandler
    ; at its end by RaiseException all seh-handlers are disregarded if not present and the
    ; program is aborted
    assume  fs:nothing
    ; load NT_TIB into ECX
    mov  ecx, fs:[0h]
    assume  fs:error

walk:
    ; load 'next' member of current SEH into EDX
    mov  edx, [ecx]
    ; test if 'next' of current SEH is last (== 0xffffffff)
    inc  edx
    jz  found
    dec  edx
    ; exchange content; ECX contains address of next SEH
    xchg edx, ecx
    ; inspect next SEH
    jmp  walk

found:
    ; load 'handler' member of SEH == address of last SEH handler installed by Windows
    mov  ecx, [ecx+04h]
    ; save address in ECX as SEH handler for context
    mov  [eax+03ch], ecx
    ; set ECX to -1
    mov  ecx, 0ffffffffh
    ; save ECX as next SEH item
    mov  [eax+038h], ecx
    ; load address of next SEH item
    lea  ecx, [eax+038h]
    ; save next SEH
    mov  [eax+018h], ecx

    ret ; return pointer to context-data

finish:
    ; exit code is zero
    xor  eax, eax
    mov  [esp], eax
    ; exit application
    call  _exit
    hlt
make_fcontext ENDP
END


text:
package com.impos.helpers.shapes;

/**
 * This interface describes that the object can be drawn in rectangular shape
 *
 * @author pldmacikowski
 */
public interface Rectangular {
	Rectangle toRectangle();
}


text:
// their libraries
var express = require('express')
var router = express.Router()
const mongo_client = require('mongodb').MongoClient
var ObjectId = require('mongodb').ObjectID
var sha256 = require('js-sha256')

// my libraries
var {normalize} = require('../libs/return_normalizer.js')
var {check_if_admin, login} = require('../libs/permissions.js')
var schema = require('../libs/schema.js')
var {generate_errors_list, has_valid_id} = require('../libs/errors.js')
var {generate_inputs} = require('../libs/input_normalizer.js')
/*
  administrator level apis
  this apis are used for adminastrator level transactions
*/

/*
  normal users api
  this apis are for every registered user is service, both admin and normal
*/

/* register new device */
router.post('/register', function(req, res, next) {
  var input = generate_inputs(req, res)
  if(!input)
    return;
  login(input, schema.models.user, res, (user_db) => {
    input.location.user_id = user_db._id
    var location_model = new schema.models.location(input.location)
    location_model.validate((err) => {
      if(err)
        res.json({success: false, errors: generate_errors_list(err.errors)})
      else{
        input.location.user_id = user_db._id
        location_model.save((err, location_db) => {
          res.json({
            success: true,
            location: location_db
          })
        })
      }
    })
  })
})

/* get loactions registered by a user */
router.post('/get', function(req, res, next) {
  var input = generate_inputs(req, res)
  if(!input)
    return;
  login(input, schema.models.user, res, (user_db) => {
    var proc = schema.models.location.find({user_id: user_db._id}).sort(input.sort)
    if('offset' in input)
      proc = proc.skip(input.offset)
    if('limit' in input)
      proc = proc.limit(input.limit)
    proc.exec((err, locations) => {
      if(err)
        res.json({success: false, errors: generate_errors_list(err.errors)})
      else
        res.json({success: true, locations: locations})
    })
  })
})

/* update a location by owner user */
router.post('/update', function(req, res, next) {
  var input = generate_inputs(req, res)
  if(!input)
    return;
  if(!has_valid_id('location_id', input))
    res.json({success: false, errors: [{code: 222, message: "location_id is required", fa_message: 'آدرس مورد نیاز است'}]})
  if(!('location' in input))
    res.json({success: false, errors: [{code: 223, message: "location is required", fa_message: 'آدرس مورد نیاز است'}]})

  login(input, schema.models.user, res, (user_db) => {
    schema.models.location.findOneAndUpdate({_id: input.location_id}, input.location, {new: true}, (err, location_db) => {
      if(err)
        res.json({success: false, errors: generate_errors_list(err.errors)})
      else
        res.json({success: true, location: location_db})
    })
  })
})

/* remove a location by owner user */
router.post('/remove', function(req, res, next) {
  var input = generate_inputs(req, res)
  if(!input)
    return;
  if(!has_valid_id('location_id', input)){
    res.json({success: false, errors: [{code: 222, message: "location_id is required", fa_message: 'آدرس مورد نیاز است'}]})
    return
  }
  login(input, schema.models.user, res, (user_db) => {
    schema.models.location.where({_id: input.location_id}).findOneAndRemove((err, location_db) => {
      if(err)
        res.json({success: false, errors: generate_errors_list(err.errors)})
      else
        res.json({success: true, location: location_db})
    })
  })
})
var schema = 'NOT_CONNECTED'
var init = (sch) => {
  schema = sch
}
module.exports = {router, init, title: 'locations'}


text:
<!DOCTYPE html>

	<title>thymeleaf replaced</title>

			[[ ${csapHostEnvironmentName} ]]

			<select id="environment-select"
					title="Select Environment">
				<optgroup id="definition-group"
						  class="env-spacer-label"
						  label="Current Application">
				</optgroup>

				<optgroup id="discovery-group"
						  class=""
						  label="Discovered Application(s)">
				</optgroup>

			</select>

				secure connection available

			[[ ${ deployedArtifact } ]]

			<select id="portal-help-select">

				<option class=hidden>Help</option>

				<option class="csap-logout"
						value="logout"
						data-target="_self">Log Out</option>

				<optgroup label="Application Help">
					<option class="csap-window"
							th:each="toolEntry : ${ helpMap }"
							th:value="@{ ${toolEntry.value} }"
							th:text="${ toolEntry.key }"></option>
				</optgroup>

				<optgroup label="CSAP Help">
					<option th:each="helpItem : ${@applicationConfiguration.getHelpUrls().entrySet()}"
							th:value="${helpItem.value}"
							th:text="${helpItem.key}">updated-by-eval</option>
				</optgroup>

			</select>

					Alerts:

					Backlog:

				navigation bar

						 Agent
Dashboard
						0

						OS Explorer

						container logs

						Command Runner

						Output

						Top ++

						File Systems

						File Manager

						OS Performance

						CPU Cores

						Memory

						Service Views

							 default

							<select title="default selection for views. If a service is selected, it will be used when views are first opened or refreshed"
									id=host-service-names>
								<option>default</option>
							</select>

						Logs

						Process Metrics

						Java Metrics

						Application

						CSAP Live

						Performance
						0

						Real Time
						Application RT

						Kubernetes RT

						Events

							Event Browser

						Details

							Alerts
							0

						Service Reports

						User Activity

						Trends

						Application

						Service Resources

						Host Resources

						Host Containers

						Kubernetes

						Infrastructure

						Deployments

						CSAP View and Deploy

						Services

							readme

						Logs

						Metrics

							Definition Files

							Jobs

							helm values

						Batch Operations

							Backlog
							0

						Kubernetes Summary View

							Nodes

							0

						Details

							Volumes

							0

						Details

							Pods

							0

							pod-name

						Logs
						Details

							Events

							0

						Details

						Hosts

						Real Time Reports
						Summary
						Container
						CPU
						File Systems
						Infrastructure
						Network
						Services
						OS

						Projects

						<select id="active-project">
							<option th:each="name : ${projectNames}"
									th:selected="${name == activeProject }"
									th:value="${name}"
									th:text="${name}">replaced by template</option>
							<option th:value="${ viewConstants.get('ALL_PACKAGES') }"
									th:selected="${ viewConstants.get('ALL_PACKAGES') == selectedRelease }">All Projects
							</option>
						</select>

							Editor

						 Activate
						Environment View
						Attribute View
						Project View
						File View

						Tools
						Locator
						Application Inspector

						Settings & Tools

				<button title="toggle display of navigation bar"
						class="csap-icon csap-hide-control"></button>

			[[${ csapHostName }]]


text:
import expect from 'expect';
import * as actions from '../actions';
import * as types from '../constants';

describe('CarouselWidget actions', () => {
  it('should handle CAROUSEL_ADD_IMAGE', () => {
    const image = {
      url: 'http://google.com/avatar.png',
    };
    const expected = {
      type: types.CAROUSEL_ADD_IMAGE,
      image,
    };
    expect(
      actions.carouselAddImage(image)
    ).toEqual(expected);
  });
  it('should handle CAROUSEL_REMOVE_IMAGE', () => {
    const index = 1;
    const expected = {
      type: types.CAROUSEL_REMOVE_IMAGE,
      index,
    };
    expect(
      actions.carouselRemoveImage(index)
    ).toEqual(expected);
  });
  it('should handle CAROUSEL_EDIT_IMAGE', () => {
    const index = 1;
    const image = {
      url: 'http://helloworld.com',
    };
    const expected = {
      type: types.CAROUSEL_EDIT_IMAGE,
      image,
      index,
    };
    expect(
      actions.carouselEditImage(index, image)
    ).toEqual(expected);
  });
  it('should handle CAROUSEL_SET_EDITING', () => {
    const index = 1;
    const expected = {
      type: types.CAROUSEL_SET_EDITING,
      index,
    };
    expect(
      actions.carouselSetEditing(index)
    ).toEqual(expected);
  });
  it('should handle CAROUSEL_CANCEL_EDITING', () => {
    const index = 1;
    const expected = {
      type: types.CAROUSEL_CANCEL_EDITING,
      index,
    };
    expect(
      actions.carouselCancelEditing(index)
    ).toEqual(expected);
  });
  it('should handle CAROUSEL_SET_IMAGES', () => {
    const images = [
      {
        id: 0,
        url: 'http://google.com/helloworld.png',
      },
    ];
    const expected = {
      type: types.CAROUSEL_SET_IMAGES,
      images,
    };
    expect(
      actions.carouselSetImages(images)
    ).toEqual(expected);
  });
});


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_clase"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.motetronica.apptutores.Clase_tutoria">

</RelativeLayout>


text:
DIRSTACKSIZE=8
setopt autopushd pushdminus pushdsilent pushdtohome
alias dh='dirs -v'


text:
package org.yeastrc.xlink.www.objects;

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

import org.slf4j.LoggerFactory;  import org.slf4j.Logger;
import org.yeastrc.xlink.www.dao.PeptideDAO;
import org.yeastrc.xlink.dao.UnifiedReportedPeptideLookupDAO;
import org.yeastrc.xlink.dao.UnifiedRepPepDynamicModLookupDAO;
import org.yeastrc.xlink.dao.UnifiedRepPepIsotopeLabelLookupDAO;
import org.yeastrc.xlink.dao.UnifiedRepPepMatchedPeptideLookupDAO;
import org.yeastrc.xlink.www.dto.SearchDTO;
import org.yeastrc.xlink.dto.UnifiedReportedPeptideLookupDTO;
import org.yeastrc.xlink.dto.PeptideDTO;
import org.yeastrc.xlink.dto.UnifiedRepPepDynamicModLookupDTO;
import org.yeastrc.xlink.dto.UnifiedRepPepIsotopeLabelLookupDTO;
import org.yeastrc.xlink.dto.UnifiedRepPepMatchedPeptideLookupDTO;
import org.yeastrc.xlink.www.exceptions.ProxlWebappDataException;
import org.yeastrc.xlink.www.searcher.SearchProteinSearcher;
import org.yeastrc.xlink.www.web_utils.FormatDynamicModsToString;
import org.yeastrc.xlink.www.web_utils.FormatIsotopeLablesToString;

public class MergedSearchPeptideUnlinked implements IMergedSearchLink {

	private static final Logger log = LoggerFactory.getLogger( MergedSearchPeptideUnlinked.class);

	@Override
	public Collection<SearchDTO> getSearches() {

		return searches;
	}

	public void setSearches(Collection<SearchDTO> searches) {
		this.searches = searches;
	}

	@Override
	public int hashCode() {
		return this.peptide.getSequence().hashCode();
	}

	/**
	 * Returns true if both MergedSearchPeptideUnlinked objects describe the same two peptides at the same two positions in each respective peptide
	 */
	@Override
	public boolean equals( Object o ) {
		if( !( o instanceof MergedSearchPeptideUnlinked ) ) return false;

		MergedSearchPeptideUnlinked mrpc = (MergedSearchPeptideUnlinked)o;

		try {
			if( this.getPeptide().getSequence() != mrpc.getPeptide().getSequence() ) return false;

		} catch( Exception e ) {
			return false;
		}

		return true;
	}

	private void populatePeptides() throws Exception {

		try {
			UnifiedReportedPeptideLookupDTO UnifiedReportedPeptideLookupDTOLocal = this.getUnifiedReportedPeptideLookupDTO();

			List<UnifiedRepPepMatchedPeptideLookupDTO> unifiedRpMatchedPeptideDTOList
			= UnifiedRepPepMatchedPeptideLookupDAO.getInstance().getUnifiedRpMatchedPeptideDTOForUnifiedReportedPeptideId( UnifiedReportedPeptideLookupDTOLocal.getId() );

			UnifiedRepPepMatchedPeptideLookupDTO unifiedRpMatchedPeptide = unifiedRpMatchedPeptideDTOList.get(0);

			PeptideDTO peptideDTO = PeptideDAO.getInstance().getPeptideDTOFromDatabase( unifiedRpMatchedPeptide.getPeptideId() );
			this.setPeptide( peptideDTO );

			List<UnifiedRepPepDynamicModLookupDTO> unifiedRpDynamicModListPeptide = UnifiedRepPepDynamicModLookupDAO.getInstance().getUnifiedRpDynamicModDTOForMatchedPeptideId( unifiedRpMatchedPeptide.getId() );

			modsStringPeptide = FormatDynamicModsToString.formatDynamicModsToString( unifiedRpDynamicModListPeptide );

			unifiedRepPepIsotopeLabelListPeptide =
					UnifiedRepPepIsotopeLabelLookupDAO.getInstance()
					.getUnifiedRepPepIsotopeLabelLookupDTOForMatchedPeptideId( unifiedRpMatchedPeptide.getId() );
			isotopeLabelsStringPeptide = FormatIsotopeLablesToString.formatIsotopeLabelsToString( unifiedRepPepIsotopeLabelListPeptide );

		} catch ( Exception e ) {

			String msg = "Exception in populatePeptides(): " + e.toString();
			log.error( msg, e );

			throw e;
		}
	}

	public int getUnifiedReportedPeptideId() {
		return unifiedReportedPeptideId;
	}
	public void setUnifiedReportedPeptideId(int unifiedReportedPeptideId) {
		this.unifiedReportedPeptideId = unifiedReportedPeptideId;
	}

	public UnifiedReportedPeptideLookupDTO getUnifiedReportedPeptideLookupDTO() throws Exception {

		if ( UnifiedReportedPeptideLookupDTO == null ) {

			UnifiedReportedPeptideLookupDTO = UnifiedReportedPeptideLookupDAO.getInstance().getUnifiedReportedPeptideFromDatabase( this.unifiedReportedPeptideId );
		}

		return UnifiedReportedPeptideLookupDTO;
	}
	public void setUnifiedReportedPeptideLookupDTO(
			UnifiedReportedPeptideLookupDTO UnifiedReportedPeptideLookupDTO) {
		this.UnifiedReportedPeptideLookupDTO = UnifiedReportedPeptideLookupDTO;
	}

	public UnifiedRepPepMatchedPeptideLookupDTO getUnifiedRpMatchedPeptide() throws Exception {
		if( this.unifiedRpMatchedPeptide == null )
			this.populatePeptides();
		return unifiedRpMatchedPeptide;
	}
	public List<UnifiedRepPepDynamicModLookupDTO> getUnifiedRpDynamicModListPeptide() throws Exception {
		if( this.unifiedRpDynamicModListPeptide == null )
			this.populatePeptides();
		return unifiedRpDynamicModListPeptide;
	}
	public List<UnifiedRepPepIsotopeLabelLookupDTO> getUnifiedRepPepIsotopeLabelListPeptide() throws Exception {
		if( this.unifiedRepPepIsotopeLabelListPeptide == null )
			this.populatePeptides();
		return unifiedRepPepIsotopeLabelListPeptide;
	}
	public String getModsStringPeptide() throws Exception {
		if( this.modsStringPeptide == null )
			this.populatePeptides();
		return modsStringPeptide;
	}
	public String getIsotopeLabelsStringPeptide() throws Exception {
		if( this.isotopeLabelsStringPeptide == null )
			this.populatePeptides();
		return isotopeLabelsStringPeptide;
	}

	public PeptideDTO getPeptide() throws Exception {

		if( this.peptide == null )
			this.populatePeptides();

		return peptide;
	}

	public void setPeptide(PeptideDTO peptide) {
		this.peptide = peptide;
	}

	public List<MergedSearchProteinPosition> getProteinPositions() throws Exception {

		if( this.proteinPositions == null ) {

			//  Get proteins for the peptide

			this.proteinPositions = getUnlinkedOrDimerPeptideProteinPositions( this.getPeptide() );

			//  WAS
//			this.proteinPositions = MergedSearchProteinSearcher.getInstance().getProteinForUnlinked( this.getSearches(), this.getPeptide());

		}

		return this.proteinPositions;
	}

	private List<MergedSearchProteinPosition> getUnlinkedOrDimerPeptideProteinPositions( PeptideDTO peptide ) throws Exception {

		try {

			Map<Integer, MergedSearchProteinPosition> mergedSearchProteinPosition_MappedOn_ProtId = new HashMap<>();

			for ( SearchDTO search : searches ) {

				Integer reportedPeptideIdForSearchId =
						reportedPeptideIds_KeyedOnSearchId_Map.get( search.getSearchId() );

				if ( reportedPeptideIdForSearchId == null ) {

					String msg = "reportedPeptideIdForSearchId == null for getCrosslinkPeptideProteinPositions()."
							+ ", search.getId(): " + search.getSearchId();
					log.error( msg );
					throw new ProxlWebappDataException(msg);
				}

				List<SearchProteinPosition> resultPerSearch =
						SearchProteinSearcher.getInstance()
						.getProteinForUnlinked( search, reportedPeptideIdForSearchId, peptide.getId() );

				for ( SearchProteinPosition searchProteinPosition : resultPerSearch ) {

					Integer proteinId = searchProteinPosition.getProtein().getProteinSequenceVersionObject().getProteinSequenceVersionId();

					//  get MergedSearchProteinPosition for protein id, position

					MergedSearchProteinPosition mergedSearchProteinPosition = mergedSearchProteinPosition_MappedOn_ProtId.get( proteinId );

					if ( mergedSearchProteinPosition == null ) {

						mergedSearchProteinPosition = new MergedSearchProteinPosition();
						mergedSearchProteinPosition_MappedOn_ProtId.put( proteinId, mergedSearchProteinPosition );

						List<SearchDTO> searches = new ArrayList<>();
						MergedSearchProtein mergedSearchProtein = new MergedSearchProtein( searches, searchProteinPosition.getProtein().getProteinSequenceVersionObject() );
						mergedSearchProteinPosition.setProtein( mergedSearchProtein );
					}

					//  If search is not in searches, add it

					Collection<SearchDTO> searches = mergedSearchProteinPosition.getProtein().getSearchs();

					boolean searchFound = false;

					for ( SearchDTO searchInSearches : searches ) {

						if ( search.getSearchId() == searchInSearches.getSearchId() ) {

							searchFound = true;
							break;
						}
					}

					if ( ! searchFound ) {

						searches.add( search );
					}
				}
			}

			//  Transfer to a list;

			List<MergedSearchProteinPosition> mergedSearchProteinPositionList = new ArrayList<>();

			for ( Map.Entry<Integer, MergedSearchProteinPosition> mergedSearchProteinPosition_MappedOn_ProtIdEntry :
				mergedSearchProteinPosition_MappedOn_ProtId.entrySet() ) {

				MergedSearchProteinPosition mergedSearchProteinPosition = mergedSearchProteinPosition_MappedOn_ProtIdEntry.getValue();

				mergedSearchProteinPositionList.add( mergedSearchProteinPosition );
			}

			//  Sort list

			Collections.sort( mergedSearchProteinPositionList, new Comparator<MergedSearchProteinPosition>() {

				@Override
				public int compare(MergedSearchProteinPosition o1, MergedSearchProteinPosition o2) {

					return o1.getProtein().getProteinSequenceVersionObject().getProteinSequenceVersionId() - o2.getProtein().getProteinSequenceVersionObject().getProteinSequenceVersionId();
				}
			});

			return mergedSearchProteinPositionList;

		} catch ( Exception e ) {

			String msg = "Exception in populatePeptides(): " + e.toString();
			log.error( msg, e );

			throw e;
		}

	}

	public Map<Integer, Integer> getReportedPeptideIds_KeyedOnSearchId_Map() {
		return reportedPeptideIds_KeyedOnSearchId_Map;
	}

	public void setReportedPeptideIds_KeyedOnSearchId_Map(
			Map<Integer, Integer> reportedPeptideIds_KeyedOnSearchId_Map) {
		this.reportedPeptideIds_KeyedOnSearchId_Map = reportedPeptideIds_KeyedOnSearchId_Map;
	}

	private int unifiedReportedPeptideId;

	private UnifiedReportedPeptideLookupDTO UnifiedReportedPeptideLookupDTO;

	private UnifiedRepPepMatchedPeptideLookupDTO unifiedRpMatchedPeptide;

	private List<UnifiedRepPepDynamicModLookupDTO> unifiedRpDynamicModListPeptide;
	private List<UnifiedRepPepIsotopeLabelLookupDTO> unifiedRepPepIsotopeLabelListPeptide;

	private String modsStringPeptide;
	private String isotopeLabelsStringPeptide;

	private PeptideDTO peptide;

	private List<MergedSearchProteinPosition> proteinPositions;

	private Collection<SearchDTO> searches;

	private Map<Integer, Integer> reportedPeptideIds_KeyedOnSearchId_Map;

}


text:
import player
import json

class BG(object):
    def __init__(self):
        self.id = 0
        self.players = []
        self.chosen = []

    def load(self, file):
        with open(file) as data_file:
            data = json.load(data_file)
            self.id = data['id']
            for datum in data['players']:
                newPlayer = player.Player()
                newPlayer.load(datum['filename'])
                self.players.append(newPlayer)
        self.players = sorted(self.players, key=lambda player: player.id, reverse=False)

    def __str__(self):
        temp = 'BG ' + self.id + '\n'
        # temp += pprint.pformat(self.chosen)
        # temp += '\n'
        for p in self.players:
                temp += '  ' + p.__str__()
        temp += '\n'
        temp += 'Power Rating: %d' % self.power()
        return temp

    def power(self):
        power = 0
        for i in self.chosen:
            power += i['pi']
        return power

    def countDuplicates(self, printout=False):
        number = 0
        for i in self.chosen:
            exists = list(filter(lambda existingCharacter: existingCharacter["character"] == i["character"], self.chosen))
            if len(exists) > 1:
                if (printout == True):
                    print('Duplicate', i["character"], ' in ', self.id, ' by ', i['player'])
                number += 1/len(exists);
        return number

    def theoretical(self):
        while (len(self.chosen) < len(self.players) * 5):
            for p in self.players:
                    p.champs = sorted(p.champs, key=lambda champ:(-champ.pi))
                    for c in p.champs:
                        if (p.added < 5):
                            self.chosen.append({
                                "character": c.name,
                                "player": p.id,
                                "pi": c.pi,
                                "defender": c.defense
                            })
                            p.chosen.append({
                                "character": c.name,
                                "player": p.id,
                                "pi": c.pi
                            })
                            p.added += 1
        self.chosen = sorted(self.chosen, key=lambda chosen: chosen['player'], reverse=False)

    def optimize(self, duplicates=False):
        while (len(self.chosen) < len(self.players) * 5):
            for p in self.players:
                    for c in p.champs:
                        if (p.added < 5):
                            if (c.defense == True):
                                print(c.name + ' ' + 'Defender')
                            if (c.attack == True):
                                continue
                            else:
                                exists = list(filter(lambda existingCharacter: existingCharacter["character"] == c.name, self.chosen))
                                if len(exists) == 0:
                                    self.chosen.append({
                                        "character": c.name,
                                        "player": p.id,
                                        "pi": c.pi,
                                        "defender": c.defense
                                    })
                                    p.chosen.append({
                                        "character": c.name,
                                        "player": p.id,
                                        "pi": c.pi
                                    })
                                    p.added += 1
                                else:
                                    if (c.pi > exists[0]['pi'] or c.defense == True):

                                        otherPlayer = list(filter(lambda otherPlayer: otherPlayer.id == exists[0]['player'], self.players))
                                        otherCharacter = list(filter(lambda otherCharacter: otherCharacter.name == c.name, otherPlayer[0].champs))

                                        #make sure other player isn't a defender
                                        if ( (c.defense == True and otherCharacter[0].defense == True) or
                                             (duplicates == True)):
                                            #add both
                                            p.chosen.append({
                                                "character": c.name,
                                                "player": p.id,
                                                "pi": c.pi
                                            })
                                            self.chosen.append({
                                                "character": c.name,
                                                "player": p.id,
                                                "pi": c.pi,
                                                "defender": c.defense
                                            })
                                            p.added += 1
                                        elif (otherCharacter[0].defense == True):
                                            #don't add keep going
                                            continue
                                        else:
                                            #remove added from the player
                                            self.chosen[:] = [d for d in self.chosen if d.get('character') != c.name]
                                            otherPlayer[0].added -= 1
                                            otherPlayer[0].chosen[:] = [d for d in otherPlayer[0].chosen if d.get('character') != c.name]

                                            p.chosen.append({
                                                "character": c.name,
                                                "player": p.id,
                                                "pi": c.pi
                                            })
                                            self.chosen.append({
                                                "character": c.name,
                                                "player": p.id,
                                                "pi": c.pi,
                                                "defender": c.defense
                                            })
                                            p.added += 1
        self.chosen = sorted(self.chosen, key=lambda chosen: chosen['player'], reverse=False)


text:
.. _exclude-from-raid:

How To: Exclude some drives from RAID-1 array
=============================================

RAID-1 spans all configured disks on a node,
putting a boot partition on each disk
because OpenStack does not have access to the BIOS.
It is not currently possible to exclude some drives
from the Fuel configuration on the Fuel UI.
This means that one cannot, for example,
configure some drives to be used for backup and recover
or as b-cache.

You can work around this issue as follows.
This example is for a system that has three disks: sda, sdb, and sdc.
Fuel will provision sda and sdb as RAID-1 for OpenStack
but sdc will not be used  as part of the RAID-1 array:

#. Use the Fuel CLI to obtain provisioning data:
   ::

     fuel provisioning --env-id 1 -d

#. Remove the drive which you do not want to be part of RAID:
   ::

     - size: 300
       type: boot
     - file_system: ext2
       mount: /boot
       name: Boot
       size: 200
       type: raid

#. Run deployment
   ::

     fuel provisioning --env-id 1 -u

#. Confirm that your partition is not included in the RAID array:
   ::

     [root@node-2 ~]# cat /proc/mdstat
     Personalities : [raid1]
     md0 : active raid1 sda3[0] sdb3[1] 204736 blocks
           super 1.0 [2/2] [UU]


text:
ACCEPTED

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

#### Published in
Rev. gén. Bot. 64: 150 (1957)

#### Original name
Chadefaudia Feldm.-Maz.

### Remarks
null


text:
package org.apache.phoenix.pherf.result;

import java.util.Comparator;
import java.util.Date;

import javax.xml.bind.annotation.XmlAttribute;

public class RunTime implements Comparator<RunTime>, Comparable<RunTime> {
	private Date startTime;
	private Integer elapsedDurationInMs;
	private String message;
	private Long resultRowCount;
	private String explainPlan;

	public RunTime(Integer elapsedDurationInMs) {
		this(null, elapsedDurationInMs);
	}

	public RunTime(Long resultRowCount, Integer elapsedDurationInMs) {
		this(null, resultRowCount, elapsedDurationInMs);
	}

	public RunTime(Date startTime, Long resultRowCount, Integer elapsedDurationInMs) {
		this(null, null, startTime, resultRowCount, elapsedDurationInMs);
	}

	public RunTime(String message, Date startTime, Long resultRowCount, Integer elapsedDurationInMs) {
		this(message, null, startTime, resultRowCount, elapsedDurationInMs);
	}

	public RunTime(String message, String explainPlan, Date startTime, Long resultRowCount, Integer elapsedDurationInMs) {
		this.elapsedDurationInMs = elapsedDurationInMs;
		this.startTime = startTime;
		this.resultRowCount = resultRowCount;
		this.message = message;
		this.explainPlan = explainPlan;
	}

	public RunTime() {
	}

	@XmlAttribute()
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	@XmlAttribute()
	public Integer getElapsedDurationInMs() {
		return elapsedDurationInMs;
	}

	public void setElapsedDurationInMs(Integer elapsedDurationInMs) {
		this.elapsedDurationInMs = elapsedDurationInMs;
	}

	@Override
	public int compare(RunTime r1, RunTime r2) {
		return r1.getElapsedDurationInMs().compareTo(r2.getElapsedDurationInMs());
	}

	@Override
	public int compareTo(RunTime o) {
		return compare(this, o);
	}

	@XmlAttribute()
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@XmlAttribute()
	public String getExplainPlan() {
		return explainPlan;
	}

	public void setExplainPlan(String explainPlan) {
		this.explainPlan = explainPlan;
	}

	@XmlAttribute()
	public Long getResultRowCount() {
		return resultRowCount;
	}

	public void setResultRowCount(Long resultRowCount) {
		this.resultRowCount = resultRowCount;
	}
}


text:
<?xml version="1.0"?>
<!DOCTYPE name [
<!ENTITY entity <caret>>
]>
<name>&entity;</name>


text:
ThunderScript::ThunderScript(GameObject *owner) : Script(owner) {}
void ThunderScript::Start() {

  CreateAnimations();
  position = GetOwner()->GetPosition();
  animator = (Animator *)GetOwner()->GetComponent("Animator");
  input = InputSystem::GetInstance();
  GetOwner()->SetZoomProportion(Vector(0,0));

}
void ThunderScript::CreateAnimations(){

  auto thunderImage = new Image("assets/Sprites/dashes.png",0,0,2952, 815);

  auto thunderBlueAnimation= new Animation(GetOwner(),thunderImage );
  for (int i = 0; i < 6; i++)
    thunderBlueAnimation->AddFrame(new Frame(i * 100,135, 100, 267));

  auto thunderYellowAnimation= new Animation(GetOwner(),thunderImage );
  for (int i = 0; i < 5; i++)
    thunderYellowAnimation->AddFrame(new Frame(555 + (i * 59),135, 59, 267));

  // animator
      auto thunderAnimator = new Animator(GetOwner());

      thunderAnimator->AddAnimation("thunderBlueAnimation", thunderBlueAnimation);
      thunderAnimator->AddAnimation("thunderYellowAnimation", thunderYellowAnimation);

}

void ThunderScript::ComponentUpdate() {

    if(input->GetKeyDown(INPUT_1)){
      animator->PlayAnimation("thunderBlueAnimation");
    }

    if(input->GetKeyDown(INPUT_2)){
      animator->PlayAnimation("thunderYellowAnimation");
    }

    else{
    //animator->StopAllAnimations();
    }

}
void ThunderScript::FixedComponentUpdate() {

        //position->m_x=0;
        //position->m_y=0;

}