text:
namespace LicenseAudit
{
    partial class frmRdViewComputersWithInstalledItem
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.dgComputerList = new System.Windows.Forms.DataGridView();
            this.btnClose = new System.Windows.Forms.Button();
            this.grpFilter = new System.Windows.Forms.GroupBox();
            this.lblEntity = new System.Windows.Forms.Label();
            this.txtFilterEntity = new System.Windows.Forms.TextBox();
            ((System.ComponentModel.ISupportInitialize)(this.dgComputerList)).BeginInit();
            this.grpFilter.SuspendLayout();
            this.SuspendLayout();
            //
            // dgComputerList
            //
            this.dgComputerList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.dgComputerList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dgComputerList.Location = new System.Drawing.Point(12, 69);
            this.dgComputerList.Name = "dgComputerList";
            this.dgComputerList.Size = new System.Drawing.Size(541, 395);
            this.dgComputerList.TabIndex = 0;
            //
            // btnClose
            //
            this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.btnClose.Location = new System.Drawing.Point(478, 470);
            this.btnClose.Name = "btnClose";
            this.btnClose.Size = new System.Drawing.Size(75, 23);
            this.btnClose.TabIndex = 1;
            this.btnClose.Text = "Close";
            this.btnClose.UseVisualStyleBackColor = true;
            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
            //
            // grpFilter
            //
            this.grpFilter.Controls.Add(this.txtFilterEntity);
            this.grpFilter.Controls.Add(this.lblEntity);
            this.grpFilter.Location = new System.Drawing.Point(12, 12);
            this.grpFilter.Name = "grpFilter";
            this.grpFilter.Size = new System.Drawing.Size(541, 51);
            this.grpFilter.TabIndex = 2;
            this.grpFilter.TabStop = false;
            this.grpFilter.Text = "Filter";
            //
            // lblEntity
            //
            this.lblEntity.AutoSize = true;
            this.lblEntity.Location = new System.Drawing.Point(7, 20);
            this.lblEntity.Name = "lblEntity";
            this.lblEntity.Size = new System.Drawing.Size(36, 13);
            this.lblEntity.TabIndex = 0;
            this.lblEntity.Text = "Entity:";
            //
            // txtFilterEntity
            //
            this.txtFilterEntity.Location = new System.Drawing.Point(50, 20);
            this.txtFilterEntity.Name = "txtFilterEntity";
            this.txtFilterEntity.Size = new System.Drawing.Size(193, 20);
            this.txtFilterEntity.TabIndex = 1;
            this.txtFilterEntity.TextChanged += new System.EventHandler(this.txtFilterEntity_TextChanged);
            //
            // frmRdViewComputersWithInstalledItem
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(565, 505);
            this.Controls.Add(this.grpFilter);
            this.Controls.Add(this.btnClose);
            this.Controls.Add(this.dgComputerList);
            this.Name = "frmRdViewComputersWithInstalledItem";
            this.Text = "frmRdViewComputersWithInstalledItem";
            ((System.ComponentModel.ISupportInitialize)(this.dgComputerList)).EndInit();
            this.grpFilter.ResumeLayout(false);
            this.grpFilter.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.DataGridView dgComputerList;
        private System.Windows.Forms.Button btnClose;
        private System.Windows.Forms.GroupBox grpFilter;
        private System.Windows.Forms.TextBox txtFilterEntity;
        private System.Windows.Forms.Label lblEntity;
    }
}


text:
<?php

namespace App\Http\Controllers\Admin;

use App\Model\Certs;
use App\Model\Companies;
use App\Model\Notes;
use App\Model\Sales;
use App\User;

use Illuminate\Http\Request;
use Flash;
use Auth;
use SlevomatEET\Cryptography\CryptographyService;
use SlevomatEET\Driver\GuzzleSoapClientDriver;
use SlevomatEET\Configuration;
use SlevomatEET\EvidenceEnvironment;
use SlevomatEET\Client;
use SlevomatEET\Receipt;

class SalesController extends AdminController
{
    /**
     * @var $sales
     */
    private $sales;

    /**
     * Create a new dashboard controller instance.
     *
     * @return void
     */
    public function __construct(Request $request, Sales $sales)
    {
        parent::__construct($request);

        $this->middleware(function ($request, $next) {

            if (session('isAdmin') == false && session('isCashier') == false && session('isManager') == false){
                return redirect(route('admin.dashboard'));
            }

            return $next($request);
        });

        $this->sales = $sales;

        $this->page_title = 'Tržby';
        $this->page_icon = 'fa fa-money';
    }

    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index(Companies $companies, Certs $certs, Notes $notes)
    {
        if (session('isAdmin') || session('isManager')){
            $sales = $this->sales->getAllForChart(session('selectedCompany'))->get();
            $sales_all = $this->sales->getAll(session('selectedCompany'))->get();
        }elseif (session('isCashier') && session('haveStorno')){
            $sales = $this->sales->getAll(session('selectedCompany'))->take(10)->get();
        }else{
            $sales = $this->sales->getAll(session('selectedCompany'))->where('user_id', Auth::user()->id)->take(5)->get();
        }

        foreach ($sales as $sale){
            if ($sale->products != ''){
                $product = explode(";", $sale->products);

                $products = '';
                foreach ($product as $key => $p){
                    $temp = explode("||", $p);

                    $products .= $temp[0] . '; ';

                }
                $products = substr($products, 0, -2);
                $sale->products = $products;
            }

        }

        $all_notes = $notes->getAllFromCompany(session('selectedCompany'))->get();
        $note = [];

        foreach ($all_notes as $n){
            if ($n->sale_id){
                if (isset($note[$n->sale_id]) && strlen($note[$n->sale_id])< 50){
                    $note[$n->sale_id] = $note[$n->sale_id] .';'. $n->note;
                }else{
                    $note[$n->sale_id] = $n->note;
                }
                if (strlen($note[$n->sale_id]) > 50)
                    $note[$n->sale_id] = substr($note[$n->sale_id], 0, 47) . '...';
            }
        }

        $period_notes = $notes->getAllPeriod(session('selectedCompany'))->get()->take(5);

        $not_sent = $this->sales->getNotSent(session('selectedCompany'))->toArray();

        $companies = $companies->findOrFail(session('selectedCompany'));
        $cert = $certs->find($companies->cert_id);

        return view('admin.sales.index', compact('sales', 'cert', 'sales_all', 'note', 'period_notes', 'not_sent'));
    }

    /**
     * Storno the eet
     *
     * @param $id
     */
    public function storno($id){
        $sale = $this->sales->findOrFail($id);

        $total_price = $sale->total_price*(-100);
        $userid = Auth::user()->id;

        $receiptNumber = $sale->receiptNumber . '-storno';
        $premiseId = '1';
        $cashregister = 'pokl-user-'. $userid;

        //if sale wasnt sent before, just set it as storned in db
        //if was sent, make new one with the negative same price
        if ($sale->not_sent == 0){
            $response = $this->eetSend($total_price, $receiptNumber, $premiseId, $cashregister);
        }else{
            $sale->not_sent = 2;
        }

        $sale->storno = 1;
        $sale->save();

        Flash::success('Tržba bola stornovaná!');

        return redirect()->back();
    }

    /**
     * show receipt
     *
     * @param $id
     */
    public function generateReceipt($id, Companies $companies){
        $sale = $this->sales->findOrFail($id);

        $company = $companies->findOrFail($sale->company_id);

        if ($sale->products != ''){
            $product = explode(";", $sale->products);

            foreach ($product as $key => $p){
                $temp = explode("||", $p);

                $products[$key]['name'] = $temp[0];
                $products[$key]['price'] = $temp[1];
            }
        }else{
            $products[0]['name'] = 'Produkty';
            $products[0]['price'] = $sale->total_price;
        }

        return view('admin.sales.receipt', compact('sale', 'company', 'products'));
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        $total_price = $request['total_price'];
        $userid = Auth::user()->id;

        $lastid = $this->sales->getAll(session('selectedCompany'))->first();

        if ($lastid != null){
            $lastid = $lastid->receiptNumber;
        }else{
            $lastid = 0;
        }

        $receiptNumber = ($lastid+1);
        $premiseId = '1';
        $cashregister = 'pokl-'. $userid;

        $response = $this->eetSend($total_price*100, $receiptNumber, $premiseId, $cashregister);

        if ( $response['fik'] == 'error' ){
            $store = $this->sales->create([
                'user_id' => $userid,
                'company_id' => session('selectedCompany'),
                'products' => $request['products'],
                'total_price' => $total_price,
                'fik' => '',
                'bkp' => $response['bkp'],
                'receiptNumber' => $receiptNumber,
                'premiseId' => $premiseId,
                'cash_register' => $cashregister,
                'receipt_time' => date("Y-m-d H:i:s"),
                'not_sent' => 1
            ]);

            Flash::success('Tržba bola zapísaná ale nebola úspešne zaevidovaná!');
        }else{
            $store = $this->sales->create([
                'user_id' => $userid,
                'company_id' => session('selectedCompany'),
                'products' => $request['products'],
                'total_price' => $total_price,
                'fik' => $response['fik'],
                'bkp' => $response['bkp'],
                'receiptNumber' => $receiptNumber,
                'premiseId' => $premiseId,
                'cash_register' => $cashregister,
                'receipt_time' => date("Y-m-d H:i:s"),
                'not_sent' => 0
            ]);

            Flash::success('Tržba bola úspešne vytvorná a zaevidovaná!');
        }

        if (isset($request['with_receipt'])){
            return redirect(route('admin.sales.generate_receipt', $store->id));
        }else{
            return redirect(route('admin.sales.create_new'));
        }
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function detail($id, User $user, Notes $notes)
    {
        $sales = $this->sales->findOrFail($id);
        $user = $user->findOrFail($sales->user_id);
        $notes = $notes->getAllBySaleId($id)->get();

        $products = [];
        if ($sales->products != ''){
            $product = explode(";", $sales->products);

            foreach ($product as $key => $p){
                $temp = explode("||", $p);

                $products[$key]['name'] = $temp[0];
                $products[$key]['price'] = $temp[1];
            }
        }

        return view('admin.sales.detail', compact('sales', 'user', 'products', 'notes'));
    }

    /**
     * Send eet to finances server
     *
     * @param  string  $price, $receiptNumber, $premiseId, $cashregister
     * @return array
     */
    private function eetSend($price, $receiptNumber, $premiseId, $cashregister){
        $companies = new Companies();
        $company = $companies->findOrFail(session('selectedCompany'));
        $crypto = new CryptographyService(DIR_CERT . session('selectedCompany').'/private.key', DIR_CERT . session('selectedCompany').'/public.pub');
        $configuration = new Configuration(
            $company->dic,
            $premiseId,
            $cashregister,
            new EvidenceEnvironment(EvidenceEnvironment::PLAYGROUND),
            false
        );

        $client = new Client($crypto, $configuration, new GuzzleSoapClientDriver(new \GuzzleHttp\Client()));

        $receipt = new Receipt(
            true,
            null,
            $receiptNumber,
            new \DateTimeImmutable('now'),
            $price
        );

        try {
            $response = $client->send($receipt);
            return ['fik' => $response->getFik(), 'bkp' => $response->getBkp()];
        }
        catch (\SlevomatEET\FailedRequestException $e) {
            echo $e->getRequest()->getPkpCode(); // if request fails you need to print the PKP and BKP codes to receipt
            return ['fik' => 'error', 'bkp' => $e->getRequest()->getBkpCode()];
        } catch (\SlevomatEET\InvalidResponseReceivedException $e) {
            echo $e->getResponse()->getRequest()->getBkpCode(); // on invalid response you need to print the PKP and BKP too
            return ['fik' => 'error', 'bkp' => $e->getResponse()->getRequest()->getBkpCode()];
        }
    }

    /**
     * @param $id
     * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
     */
    public function delete($id)
    {
        $products = $this->sales->findOrFail($id);
        $products->delete();

        Flash::success('Tržba bola odstránená z databázy!');

        return redirect()->back();
    }

    /**
     * Show sales, which waren not succesfully sent before
     */
    public function showNotSent(){
        $this->page_description = "neodoslané na EET";

        $sales = $this->sales->getNotSent(session('selectedCompany'));

        foreach ($sales as $s){
            $diff = date_diff(date_create(date('Y-m-d H:i:s')), date_create($s->receipt_time));
            $s->hours = ($diff->y * 365.25 + $diff->m * 30 + $diff->d) * 24 + $diff->h;
        }

        $not_sent = $sales->toArray();

        return view('admin.sales.not_sent', compact('sales', 'not_sent'));
    }

    /**
     * Try to send all sales, which warent succesfully sent before
     */
    public function TrySentAgain(){
        $sales = $this->sales->getNotSent(session('selectedCompany'));

        foreach ($sales as $s){
            $total_price = $s->total_price;
            $receiptNumber = $s->receiptNumber;
            $premiseId = $s->premiseId;
            $cashregister = $s->cash_register;

            $response = $this->eetSend($total_price*100, $receiptNumber, $premiseId, $cashregister);

            if ($response['fik'] != 'error'){
                $s->not_sent = 0;
                $s->fik = $response['fik'];
                $s->bkp = $response['bkp'];
                $s->save();
            }
        }

        return redirect()->back();
    }
}

redpajama_set_name: RedPajamaGithub


text:
cask 'sunlogin-remote' do
  version '1.1'
  sha256 '81cf6e9b088cf7d05489228fd9f7c84388ab44dbaba5821865089a4d1a1d6a18'

  url "https://download.oray.com/sunlogin/SunloginRemote_v#{version}.dmg"
  name 'Sunlogin Remote'
  name '向日葵控制端'
  homepage 'https://sunlogin.oray.com'
  license :unknown # TODO: change license and remove this comment; ':unknown' is a machine-generated placeholder

  app 'Sunlogin Remote.app'
end


text:
FROM hadoop-base:base
MAINTAINER Ambling <ambling07@gmail.com>

# variables
#ENV key val

# add chd5 yum repo for centos6 and install hadoop
ADD . /tmp
RUN yum install -y hadoop-yarn-resourcemanager

# config hadoop
# you have to configure hostname and ssh public keys first
RUN cp -r /tmp/conf.cluster /etc/hadoop/
RUN alternatives --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.cluster 50
RUN alternatives --set hadoop-conf /etc/hadoop/conf.cluster

# change user
#USER yarn

# make necessary directories for yarn
RUN mkdir -p /var/lib/hadoop-yarn/data/yarn/local /var/lib/hadoop-yarn/data/yarn/logs
RUN chown -R yarn:yarn /var/lib/hadoop-yarn/data/yarn/local /var/lib/hadoop-yarn/data/yarn/logs
RUN chmod -R 755 /var/lib/hadoop-yarn/data/yarn/local /var/lib/hadoop-yarn/data/yarn/logs

# ports for resourcemanager (also need to use -p in docker run command, see startup.sh)
# yarn.resourcemanager.scheduler.address TCP
EXPOSE 8030
# yarn.resourcemanager.webapp.address TCP
EXPOSE 8088
# yarn.resourcemanager.address TCP
EXPOSE 8032
# yarn.resourcemanager.admin.address TCP
EXPOSE 8033
# yarn.resourcemanager.resource-tracker.address TCP
EXPOSE 8031

# change user back to boot
#USER root

# config supervisor
RUN mv /tmp/supervisord.conf /etc/

# clean up
RUN rm -rf /tmp/*

# run the supervisor to start service
CMD supervisord


text:
layout: page
title: the bucket list
---

The Bucket List

The whole thinking behind the concept of a bucket list is to create a list of challenging goals.
    I've gone one step further to also create a list of impossible goals. Check 'em out!

Improbable

    {% for item in site.data.bucketList.improbable %}

        {{item.title}}
        {{item.desc}}

    {% endfor %}

Impossible

    {% for item in site.data.bucketList.impossible %}

        {{item.title}}
        {{item.desc}}

    {% endfor %}


text:
package com.bitdubai.fermat_core.layer.dap_identity.asset_user;

import com.bitdubai.fermat_api.FermatException;
import com.bitdubai.fermat_api.Plugin;
import com.bitdubai.fermat_dap_api.layer.dap_identity.CantStartSubsystemException;
import com.bitdubai.fermat_dap_api.layer.dap_identity.DAPIdentitySubsystem;
import com.bitdubai.fermat_dap_plugin.layer.identity.asset.user.developer.bitdubai.DeveloperBitDubai;

/**
 * Created by Nerio on 11/09/15.
 */
public class AssetUserIdentitySubsystem implements DAPIdentitySubsystem {

    Plugin plugin;

    @Override
    public void start() throws CantStartSubsystemException {
        try {
            DeveloperBitDubai developerBitDubai = new DeveloperBitDubai();
            plugin = developerBitDubai.getPlugin();
        }
        catch (Exception exception)
        {
            throw new CantStartSubsystemException(FermatException.wrapException(exception),"AssetUserIdentitySubsystem","Unexpected Exception");
        }
    }

    @Override
    public Plugin getPlugin() {
        return plugin;
    }
}


text:
"""A module that provides rapt authentication errors."""

class ReauthError(Exception):
    """Base exception for reauthentication."""
    pass

class HttpAccessTokenRefreshError(Exception):
    """Error (with HTTP status) trying to refresh an expired access token."""
    def __init__(self, message, status=None):
        super(HttpAccessTokenRefreshError, self).__init__(message)
        self.status = status

class ReauthUnattendedError(ReauthError):
    """An exception for when reauth cannot be answered."""

    def __init__(self):
        super(ReauthUnattendedError, self).__init__(
            'Reauthentication challenge could not be answered because you are '
            'not in an interactive session.')

class ReauthFailError(ReauthError):
    """An exception for when reauth failed."""

    def __init__(self, message=None):
        super(ReauthFailError, self).__init__(
            'Reauthentication challenge failed. {0}'.format(message))

class ReauthAPIError(ReauthError):
    """An exception for when reauth API returned something we can't handle."""

    def __init__(self, api_error):
        super(ReauthAPIError, self).__init__(
            'Reauthentication challenge failed due to API error: {0}.'.format(
                api_error))

class ReauthAccessTokenRefreshError(ReauthError):
    """An exception for when we can't get an access token for reauth."""

    def __init__(self, message=None, status=None):
        super(ReauthAccessTokenRefreshError, self).__init__(
            'Failed to get an access token for reauthentication. {0}'.format(
                message))
        self.status = status


text:
#ifndef __SKYEYE_PORTABLE_BEOS_STDINT_H_
#define __SKYEYE_PORTABLE_BEOS_STDINT_H_

#include <inttypes.h>
#include <limits.h>

#ifndef INT32_MAX
#define INT32_MAX	INT_MAX
#endif /* INT32_MAX */

#endif /* __SKYEYE_PORTABLE_BEOS_STDINT_H_*/


text:
package Moose::Meta::Attribute::Custom::Trait::MergeHashRef;
BEGIN {
  $Moose::Meta::Attribute::Custom::Trait::MergeHashRef::VERSION = '1.002';
}
use Moose::Role;
use MooseX::Traits::Attribute::MergeHashRef;

has 'clearer' => (is => 'rw', default => sub { 'clear_' . $_[0]->name } );

sub accessor_metaclass { 'MooseX::Traits::Attribute::MergeHashRef' }

after 'install_accessors' => sub {
    my $attr  = shift;
    my $class = $attr->associated_class;
    my $method = sub { $_[0]->${\('clear_'.$attr->name)}; shift->${\($attr->name)}(@_); };
    $class->add_method( 'set_' . $attr->name, $method );
};

1;
__END__
=pod

=head1 NAME

Moose::Meta::Attribute::Custom::Trait::MergeHashRef

=head1 VERSION

version 1.002

=head1 AUTHOR

Moritz Onken

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2011 by Moritz Onken.

This is free software, licensed under:

  The (three-clause) BSD License

=cut


text:
package com.example.log4j2;

import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Timer;
import java.util.TimerTask;

public class MainActivity extends AppCompatActivity {

    private static final String TAG = "MainActivity";
    private static Logger sLogger;
    private Timer mTimer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        checkPermission();
    }

    private void checkPermission() {
        if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) !=
                PackageManager.PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
        } else {
            sLogger = LoggerFactory.getLogger(TAG);
            sLogger.info("before onPostPermissionCheckCompleted");
            onPostPermissionCheckCompleted();
        }
    }

    private void onPermissionCheckCompleted() {
        if (Build.VERSION.SDK_INT >= 23) {
            runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    AppGlobal.getInstance().applyLog4j2Update();
                    sLogger = LoggerFactory.getLogger(TAG);
                    sLogger.info("onPermissionCheckCompleted");
                    onPostPermissionCheckCompleted();
                }
            });
        }
    }

    private void onPostPermissionCheckCompleted() {
        testLog4j();
    }

    private void testLog4j() {
        mTimer = new Timer("Log4j2Test");
        mTimer.schedule(new TimerTask() {
            @Override
            public void run() {
                sLogger.debug("Life is sad at times, but it is up to you to make your own life happy.");
            }
        }, 0, 1000);
    }

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
        if (requestCode == 1 && grantResults.length == 1) {
            if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                onPermissionCheckCompleted();
            } else {
                finish();
            }
        }
    }

    @Override
    protected void onDestroy() {
        if (mTimer != null) {
            mTimer.cancel();
        }
        super.onDestroy();
    }
}


text:
<?php

namespace SerieBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Episode
 *
 * @ORM\Table(name="episode")
 * @ORM\Entity(repositoryClass="SerieBundle\Repository\EpisodeRepository")
 */
class Episode
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="synopsis", type="text", nullable=true)
     */
    private $synopsis;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="runtime", type="time", nullable=true)
     */
    private $runtime;

    /**
     * @var int
     *
     * @ORM\Column(name="number", type="integer")
     */
    private $number;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="airedDate", type="datetimetz", nullable=true)
     */
    private $airedDate;

    /**
     * @var
     *
     * @ORM\ManyToOne(targetEntity="Season", inversedBy="episodes")
     * @ORM\JoinColumn(nullable=false)
     */
    private $season;

    /**
     * @ORM\ManyToMany(targetEntity="Person", mappedBy="appearances")
     */
    private $guests;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Episode
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set synopsis
     *
     * @param string $synopsis
     * @return Episode
     */
    public function setSynopsis($synopsis)
    {
        $this->synopsis = $synopsis;

        return $this;
    }

    /**
     * Get synopsis
     *
     * @return string
     */
    public function getSynopsis()
    {
        return $this->synopsis;
    }

    /**
     * Set runtime
     *
     * @param \DateTime $runtime
     * @return Episode
     */
    public function setRuntime($runtime)
    {
        $this->runtime = $runtime;

        return $this;
    }

    /**
     * Get runtime
     *
     * @return \DateTime
     */
    public function getRuntime()
    {
        return $this->runtime;
    }

    /**
     * Set number
     *
     * @param integer $number
     * @return Episode
     */
    public function setNumber($number)
    {
        $this->number = $number;

        return $this;
    }

    /**
     * Get number
     *
     * @return integer
     */
    public function getNumber()
    {
        return $this->number;
    }

    /**
     * Set airedDate
     *
     * @param \DateTime $airedDate
     * @return Episode
     */
    public function setAiredDate($airedDate)
    {
        $this->airedDate = $airedDate;

        return $this;
    }

    /**
     * Get airedDate
     *
     * @return \DateTime
     */
    public function getAiredDate()
    {
        return $this->airedDate;
    }

    /**
     * Set season
     *
     * @param \SerieBundle\Entity\Season $season
     * @return Episode
     */
    public function setSeason(\SerieBundle\Entity\Season $season)
    {
        $this->season = $season;

        return $this;
    }

    /**
     * Get season
     *
     * @return \SerieBundle\Entity\Season
     */
    public function getSeason()
    {
        return $this->season;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->guests = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add guests
     *
     * @param \SerieBundle\Entity\Person $guests
     * @return Episode
     */
    public function addGuest(\SerieBundle\Entity\Person $guests)
    {
        $this->guests[] = $guests;

        return $this;
    }

    /**
     * Remove guests
     *
     * @param \SerieBundle\Entity\Person $guests
     */
    public function removeGuest(\SerieBundle\Entity\Person $guests)
    {
        $this->guests->removeElement($guests);
    }

    /**
     * Get guests
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getGuests()
    {
        return $this->guests;
    }
}


text:
git-sweep
=========

A command-line tool that helps you clean up Git branches that have been merged
into master.

One of the best features of Git is cheap branches. There are existing branching
models like `GitHub Flow`_ and Vincent Driessen's `git-flow`_ that describe
methods for using this feature.

The problem
-----------

Your ``master`` branch is typically where all your code lands. All features
branches are meant to be short-lived and merged into ``master`` once they are
completed.

As time marches on, you can build up **a long list of branches that are no
longer needed**. They've been merged into ``master``, what do we do with them
now?

The answer
----------

Using ``git-sweep`` you can **safely remove remote branches that have been
merged into master**.

To install it run:

::

    pip install git-sweep || easy_install git-sweep

Try it for yourself (safely)
----------------------------

To see a list of branches that git-sweep detects are merged into your master branch:

You need to have your Git repository as your current working directory.

::

    $ cd myrepo

The ``preview`` command doesn't make any changes to your repo.

::

    $ git sweep preview
    Fetching from the remote
    These branches have been merged into master:

      branch1
      branch2
      branch3
      branch4
      branch5

    To delete them, run again with `git sweep cleanup`

If you are happy with the list, you can run the command that deletes these
branches from the remote, ``cleanup``:

::

    $ git sweep cleanup
    Fetching from the remote
    These branches have been merged into master:

      branch1
      branch2
      branch3
      branch4
      branch5

    Delete these branches? (y/n) y
      deleting branch1 (done)
      deleting branch2 (done)
      deleting branch3 (done)
      deleting branch4 (done)
      deleting branch5 (done)

    All done!

    Tell everyone to run `git fetch --prune` to sync with this remote.
    (you don't have to, yours is synced)

*Note: this can take a little time, it's talking over the tubes to the remote.*

You can also give it a different name for your remote and master branches.

::

    $ git sweep preview --master=develop --origin=github
    ...

Tell it to skip the ``git fetch`` that it does by default.

::

    $ git sweep preview --nofetch
    These branches have been merged into master:

      branch1

    To delete them, run again with `git sweep cleanup --nofetch`

Make it skip certain branches.

::

    $ git sweep preview --skip=develop
    Fetching from the remote
    These branches have been merged into master:

      important-upgrade
      upgrade-libs
      derp-removal

    To delete them, run again with `git sweep cleanup --skip=develop`

Once git-sweep finds the branches, you'll be asked to confirm that you wish to
delete them.

::

    Delete these branches? (y/n)

You can use the ``--force`` option to bypass this and start deleting
immediately.

::

    $ git sweep cleanup --skip=develop --force
    Fetching from the remote
    These branches have been merged into master:

      important-upgrade
      upgrade-libs
      derp-removal

      deleting important-upgrade (done)
      deleting upgrade-libs (done)
      deleting derp-removal (done)

    All done!

    Tell everyone to run `git fetch --prune` to sync with this remote.
    (you don't have to, yours is synced)

Development
-----------

git-sweep uses `git-flow`_ for development and release cylces. If you want to
hack on this with us, fork the project and put a pull request into the
``develop`` branch when you get done.

To run the tests, bootstrap Buildout and run this command:

::

    $ git clone http://github.com/arc90/git-sweep.git
    $ cd git-sweep
    $ python2.7 bootstrap.py
    ...
    $ ./bin/buildout
    ...
    $ ./bin/test

We also use Tox_. It will run the tests for Python 2.6 and 2.7.

::

    $ ./bin/tox

Requirements
------------

* Git >= 1.7
* Python >= 2.6

License
-------

Friendly neighborhood MIT license.

.. _GitHub Flow: http://scottchacon.com/2011/08/31/github-flow.html
.. _git-flow: http://nvie.com/posts/a-successful-git-branching-model/
.. _Tox: http://pypi.python.org/pypi/tox


text: <html id="bla notbla" />


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Septocylindrium tapeinosporum Sacc.

### Remarks
null


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>io.grpc.examples.helloworld (grpc-examples 0.1.0-SNAPSHOT API)</title>
<meta name="date" content="2015-03-19">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

io.grpc.examples.helloworld

Interfaces

GreeterGrpc.Greeter

GreeterGrpc.GreeterBlockingClient

GreeterGrpc.GreeterFutureClient

HelloRequestOrBuilder

HelloResponseOrBuilder

Classes

GreeterGrpc

GreeterGrpc.GreeterBlockingStub

GreeterGrpc.GreeterFutureStub

GreeterGrpc.GreeterServiceDescriptor

GreeterGrpc.GreeterStub

HelloRequest

HelloRequest.Builder

HelloResponse

HelloResponse.Builder

HelloWorldClient

HelloWorldProto

HelloWorldServer


text:
using TS3QueryLib.Net.Core.Client.Responses;
using TS3QueryLib.Net.Core.Common.Commands;

namespace TS3QueryLib.Net.Core.Client.Commands
{
    /// <summary>
    /// Retrieves information about ourself
    /// </summary>
    public class WhoAmICommand : ExecutableCommand<WhoAmICommandResponse>
    {
        public WhoAmICommand() : base("WhoAmI")
        {
        }
    }
}


text:
from Data.Analysis import Analysis
from Data.Events import ChangeEvent
from Data.Paper import Paper
from Data.Vertex import Vertex

class CalcSheetAnalysis(Analysis):
	def __init__(self, name, document):
		Analysis.__init__(self, name, Analysis.CalcSheetAnalysisType, document)
		self._calcs = []
		self._size = Vertex(1, 1)

	def get_calculations(self):
		return self._calcs

	def create_calculation(self):
		pass

	@property
	def size(self):
		return [self._size.x, self._size.y]


text: window.open("http://www.wrox.com/", "topFrame");


text:
class Assessment::Question < ActiveRecord::Base
  acts_as_paranoid
  acts_as_duplicable
  acts_as_superclass as: :as_question
  acts_as_taggable

  attr_accessible :creator_id, :dependent_id
  attr_accessible :title, :description, :max_grade, :attempt_limit, :staff_comments
  attr_accessible :auto_graded

  belongs_to  :creator, class_name: "User"
  belongs_to  :dependent_on, class_name: "Assessment::Question", foreign_key: "dependent_id"

  #TODO, dependent: :destroy here
  has_many  :question_assessments, dependent: :destroy
  has_many  :answers, class_name: Assessment::Answer, dependent: :destroy
  has_many  :answer_gradings, class_name: Assessment::AnswerGrading, through: :answers
  has_one   :comment_topic, as: :topic

  before_update :clean_up_description, :if => :description_changed?
  after_update  :update_assessment_grade, if: :max_grade_changed?
  after_update  :update_attempt_limit, if: :attempt_limit_changed?

  #TOFIX
  def get_title
    title && !title.empty? ? title : "Question #{question_assessments.first.position + 1}"
  end

  def answers_of_students(students)
    answers.where(std_course_id: students)
  end

  def wrong_answers_of_students(students)
    answers_of_students(students).where(correct: false)
  end

  #callback methods

  def clean_up_description
    self.description = CoursemologyFormatter.clean_code_block(description)
  end

  def update_assessment_grade
    puts "update grade", self.question_assessments.count
    self.question_assessments.each do |qa|
      qa.assessment.update_grade
    end
  end

  def update_attempt_limit
    old_tl = changed_attributes[:attempt_limit] || 0
    diff = attempt_limit - old_tl
    if diff != 0
      Thread.start {
        answers.each do |sa|
          sa.attempt_left = [0, sa.attempt_left + diff].max
          sa.save
        end
      }
    end
  end

  #proxy methods
  def self.assessments
    Assessment.joins("LEFT JOIN  question_assessments ON question_assessments.assessment_id = assessments.id")
    .where("question_assessments.question_id IN (?)", self.all).uniq
  end

  #TODO: i hope mysql is smart enough to optimize this
  def self.finalised(sbm)
    grouped_answers = "SELECT *, MIN(created_at)
                      FROM assessment_answers
                      WHERE assessment_answers.finalised = 1 and assessment_answers.submission_id = #{sbm.id}
                      GROUP BY  assessment_answers.question_id"
    self.joins("INNER JOIN (#{grouped_answers}) uaaq ON assessment_questions.id = uaaq.question_id")
  end

  #overrides
  def dup
    s = self.specific
    d = s.amoeba_dup
    qn = super
    d.question = qn
    qn.as_question = d
    qn
  end
end


text:
@font-face {
    font-family: 'pluto_sanscond_medium';
    src: url('hvd_fonts_-_plutosanscondmedium-webfont.eot');
    src: url('hvd_fonts_-_plutosanscondmedium-webfont.eot?#iefix') format('embedded-opentype'),
         url('hvd_fonts_-_plutosanscondmedium-webfont.woff') format('woff'),
         url('hvd_fonts_-_plutosanscondmedium-webfont.ttf') format('truetype'),
         url('hvd_fonts_-_plutosanscondmedium-webfont.svg#pluto_sanscond_medium') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'pluto_sanscond_regular';
    src: url('hvd_fonts_-_plutosanscondregular-webfont.eot');
    src: url('hvd_fonts_-_plutosanscondregular-webfont.eot?#iefix') format('embedded-opentype'),
         url('hvd_fonts_-_plutosanscondregular-webfont.woff') format('woff'),
         url('hvd_fonts_-_plutosanscondregular-webfont.ttf') format('truetype'),
         url('hvd_fonts_-_plutosanscondregular-webfont.svg#pluto_sanscond_regular') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'pluto_sanscond_light';
    src: url('hvd_fonts_-_plutosanscondlight-webfont.eot');
    src: url('hvd_fonts_-_plutosanscondlight-webfont.eot?#iefix') format('embedded-opentype'),
         url('hvd_fonts_-_plutosanscondlight-webfont.woff') format('woff'),
         url('hvd_fonts_-_plutosanscondlight-webfont.ttf') format('truetype'),
         url('hvd_fonts_-_plutosanscondlight-webfont.svg#pluto_sanscond_light') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'pluto_sanscond_exlight';
    src: url('hvd_fonts_-_plutosanscondexlight-webfont.eot');
    src: url('hvd_fonts_-_plutosanscondexlight-webfont.eot?#iefix') format('embedded-opentype'),
         url('hvd_fonts_-_plutosanscondexlight-webfont.woff') format('woff'),
         url('hvd_fonts_-_plutosanscondexlight-webfont.ttf') format('truetype'),
         url('hvd_fonts_-_plutosanscondexlight-webfont.svg#pluto_sanscond_exlight') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'pluto_sanscond_thin';
    src: url('hvd_fonts_-_plutosanscondthin-webfont.eot');
    src: url('hvd_fonts_-_plutosanscondthin-webfont.eot?#iefix') format('embedded-opentype'),
         url('hvd_fonts_-_plutosanscondthin-webfont.woff') format('woff'),
         url('hvd_fonts_-_plutosanscondthin-webfont.ttf') format('truetype'),
         url('hvd_fonts_-_plutosanscondthin-webfont.svg#pluto_sanscond_thin') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'pluto_sans_regular';
    src: url('hvd_fonts_-_plutosansregular-webfont.eot');
    src: url('hvd_fonts_-_plutosansregular-webfont.eot?#iefix') format('embedded-opentype'),
         url('hvd_fonts_-_plutosansregular-webfont.woff') format('woff'),
         url('hvd_fonts_-_plutosansregular-webfont.ttf') format('truetype'),
         url('hvd_fonts_-_plutosansregular-webfont.svg#pluto_sans_regular') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'PlutoSansExtraLight';
    src: url('http://elyseholladay.com/fonts/plutosans_exlight.eot');
    src: url('http://elyseholladay.com/fonts/plutosans_exlight.eot?#iefix') format('embedded-opentype'),
         url('http://elyseholladay.com/fonts/plutosans_exlight.woff') format('woff'),
         url('http://elyseholladay.com/fonts/plutosans_exlight.ttf') format('truetype'),
         url('http://elyseholladay.com/fonts/plutosans_exlight.svg#PlutoSansExtraLight') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'PlutoSansRegular';
    src: url('http://elyseholladay.com/fonts/plutosans_regular.eot');
    src: url('http://elyseholladay.com/fonts/plutosans_regular.eot?#iefix') format('embedded-opentype'),
         url('http://elyseholladay.com/fonts/plutosans_regular.woff') format('woff'),
         url('http://elyseholladay.com/fonts/plutosans_regular.ttf') format('truetype'),
         url('http://elyseholladay.com/fonts/plutosans_regular.svg#PlutoSansRegular') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'PlutoSansBold';
    src: url('http://elyseholladay.com/fonts/plutosans_bold.eot');
    src: url('http://elyseholladay.com/fonts/plutosans_bold.eot?#iefix') format('embedded-opentype'),
         url('http://elyseholladay.com/fonts/plutosans_bold.woff') format('woff'),
         url('http://elyseholladay.com/fonts/plutosans_bold.ttf') format('truetype'),
         url('http://elyseholladay.com/fonts/plutosans_bold.svg#PlutoSansBold') format('svg');
    font-weight: normal;
    font-style: normal;

}


text:
package org.scalatest
// SKIP-SCALATESTJS,NATIVE-START
import org.junit.Test
import org.scalatestplus.junit.JUnit3Suite
import org.scalatestplus.junit.JUnitSuite
import org.scalatest.refspec.RefSpec
import org.scalatestplus.testng.TestNGSuite
import org.testng.annotations.{Test => TestNG }
// SKIP-SCALATESTJS,NATIVE-END
import SharedHelpers._
import org.scalactic._
import org.scalatest.{ featurespec, flatspec, freespec, funspec, funsuite, propspec, wordspec }
import org.scalatest.featurespec.AnyFeatureSpec
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.freespec.AnyFreeSpec
import org.scalatest.funspec.AnyFunSpec
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.propspec.AnyPropSpec
import org.scalatest.wordspec.AnyWordSpec

class TestDataProp extends AllSuiteProp {

  type FixtureServices = TestDataFixtureServices

  // SKIP-SCALATESTJS,NATIVE-START
  def spec = new ExampleTestDataSpec
  def junit3Suite = new ExampleTestDataJUnit3Suite
  def junitSuite = new ExampleTestDataJUnitSuite
  def testngSuite = new ExampleTestDataTestNGSuite
  // SKIP-SCALATESTJS,NATIVE-END
  def funSuite = new ExampleTestDataFunSuite
  def fixtureFunSuite = new ExampleTestDataFixtureFunSuite
  def funSpec = new ExampleTestDataFunSpec
  def fixtureFunSpec = new ExampleTestDataFixtureFunSpec
  def featureSpec = new ExampleTestDataFeatureSpec
  def fixtureFeatureSpec = new ExampleTestDataFixtureFeatureSpec
  def flatSpec = new ExampleTestDataFlatSpec
  def fixtureFlatSpec = new ExampleTestDataFixtureFlatSpec
  def freeSpec = new ExampleTestDataFreeSpec
  def fixtureFreeSpec = new ExampleTestDataFixtureFreeSpec
  def propSpec = new ExampleTestDataPropSpec
  def fixturePropSpec = new ExampleTestDataFixturePropSpec
  def wordSpec = new ExampleTestDataWordSpec
  def fixtureWordSpec = new ExampleTestDataFixtureWordSpec
  def pathFreeSpec = new ExampleTestDataPathFreeSpec
  def pathFunSpec = new ExampleTestDataPathFunSpec

  test("TestData should include correct configMap, name, scopes and text") {
    forAll(examples.filter(_.included)) { s =>
      s.run(None, Args(reporter = SilentReporter, configMap = ConfigMap("key1" -> "value1")))
      assert(s.testData != null, s.getClass.getName + "'s testData is null.")
      assert(s.expectedTestData.configMap === s.testData.configMap)
      assert(s.expectedTestData.name === s.testData.name)
      assert(s.expectedTestData.scopes === s.testData.scopes)
      assert(s.expectedTestData.text === s.testData.text)
      assert(s.expectedTestData.tags === s.testData.tags)
    }
  }
}

trait TestDataFixtureServices {
  def included = this match {
    case _ => true
  }
  def testData: TestData
  val expectedTestData: TestData
}

object TestDataTag extends Tag("org.scalatest.tags.TestDataTag")

// SKIP-SCALATESTJS,NATIVE-START
@DoNotDiscover
class ExampleTestDataSpec extends RefSpec with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Scope 1 Scope 2 test 1"
    val scopes = Vector("Scope 1", "Scope 2")
    val text = "test 1"
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.SlowAsMolasses")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: NoArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }

  object `Scope 1` {
    object `Scope 2` {
      @SlowAsMolasses
      def `test 1`: Unit = {}
    }
  }
}

@DoNotDiscover
class ExampleTestDataJUnit3Suite extends JUnit3Suite with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "testMethod1"
    val scopes = Vector.empty
    val text = "testMethod1"
    val tags = Set.empty[String]
    val pos = Some(source.Position.here)
  }
  var testData: TestData = this.testDataFor("testMethod1", ConfigMap("key1" -> "value1"))

  def testMethod1(): Unit = {}
}

@DoNotDiscover
class ExampleTestDataJUnitSuite extends JUnitSuite with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "testMethod1"
    val scopes = Vector.empty
    val text = "testMethod1"
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.Ignore")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = this.testDataFor("testMethod1", ConfigMap("key1" -> "value1"))

  @org.junit.Ignore
  @Test def testMethod1(): Unit = ()
}

@DoNotDiscover
class ExampleTestDataTestNGSuite extends TestNGSuite with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "testMethod1"
    val scopes = Vector.empty
    val text = "testMethod1"
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.Ignore")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = this.testDataFor("testMethod1", ConfigMap("key1" -> "value1"))
  @TestNG
  @Ignore
  def testMethod1(): Unit = {}
}
// SKIP-SCALATESTJS,NATIVE-END

@DoNotDiscover
protected[scalatest] class ExampleTestDataFunSuite extends AnyFunSuite with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Test 1"
    val scopes = Vector.empty
    val text = "Test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: NoArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  test("Test 1", TestDataTag) {}
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataFixtureFunSuite extends funsuite.FixtureAnyFunSuite with TestDataFixtureServices with StringFixture {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Test 1"
    val scopes = Vector.empty
    val text = "Test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: OneArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  test("Test 1", TestDataTag) { s => }
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataFunSpec extends AnyFunSpec with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Scope 1 Scope 2 test 1"
    val scopes = Vector("Scope 1", "Scope 2")
    val text = "test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: NoArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  describe("Scope 1") {
    describe("Scope 2") {
      it("test 1", TestDataTag) {}
    }
  }
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataFixtureFunSpec extends funspec.FixtureAnyFunSpec with TestDataFixtureServices with StringFixture {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Scope 1 Scope 2 test 1"
    val scopes = Vector("Scope 1", "Scope 2")
    val text = "test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: OneArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  describe("Scope 1") {
    describe("Scope 2") {
      it("test 1", TestDataTag) { s => }
    }
  }
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataFeatureSpec extends AnyFeatureSpec with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Feature: Feature 1 Scenario: Scenario 1"
    val scopes = Vector("Feature: Feature 1")
    val text = "Scenario: Scenario 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: NoArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  Feature("Feature 1") {
    Scenario("Scenario 1", TestDataTag) {}
  }
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataFixtureFeatureSpec extends featurespec.FixtureAnyFeatureSpec with TestDataFixtureServices with StringFixture {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Feature: Feature 1 Scenario: Scenario 1"
    val scopes = Vector("Feature: Feature 1")
    val text = "Scenario: Scenario 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: OneArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  Feature("Feature 1") {
    Scenario("Scenario 1", TestDataTag) { s => }
  }
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataFlatSpec extends AnyFlatSpec with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Scope 1 should test 1"
    val scopes = Vector("Scope 1")
    val text = "should test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: NoArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  "Scope 1" should "test 1" taggedAs(TestDataTag) in {}
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataFixtureFlatSpec extends flatspec.FixtureAnyFlatSpec with TestDataFixtureServices with StringFixture {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Scope 1 should test 1"
    val scopes = Vector("Scope 1")
    val text = "should test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: OneArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  "Scope 1" should "test 1" taggedAs(TestDataTag) in { s => }
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataFreeSpec extends AnyFreeSpec with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Scope 1 Scope 2 test 1"
    val scopes = Vector("Scope 1", "Scope 2")
    val text = "test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: NoArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  "Scope 1" - {
    "Scope 2" - {
      "test 1" taggedAs(TestDataTag) in {}
    }
  }
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataFixtureFreeSpec extends freespec.FixtureAnyFreeSpec with TestDataFixtureServices with StringFixture {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Scope 1 Scope 2 test 1"
    val scopes = Vector("Scope 1", "Scope 2")
    val text = "test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: OneArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  "Scope 1" - {
    "Scope 2" - {
      "test 1" taggedAs(TestDataTag) in { s => }
    }
  }
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataPropSpec extends AnyPropSpec with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Test 1"
    val scopes = Vector.empty
    val text = "Test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: NoArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  property("Test 1", TestDataTag) {}
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataFixturePropSpec extends propspec.FixtureAnyPropSpec with TestDataFixtureServices with StringFixture {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Test 1"
    val scopes = Vector.empty
    val text = "Test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: OneArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  property("Test 1", TestDataTag) { s => }
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataWordSpec extends AnyWordSpec with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Scope 1 should Scope 2 should test 1"
    val scopes = Vector("Scope 1 should", "Scope 2 should")
    val text = "test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: NoArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  "Scope 1" should {
    "Scope 2" should {
      "test 1" taggedAs(TestDataTag) in {}
    }
  }
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataFixtureWordSpec extends wordspec.FixtureAnyWordSpec with TestDataFixtureServices with StringFixture {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Scope 1 should Scope 2 should test 1"
    val scopes = Vector("Scope 1 should", "Scope 2 should")
    val text = "test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  var testData: TestData = null
  override def withFixture(test: OneArgTest): Outcome = {
    testData = test
    super.withFixture(test)
  }
  "Scope 1" should {
    "Scope 2" should {
      "test 1" taggedAs(TestDataTag) in { s => }
    }
  }
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataPathFreeSpec extends freespec.PathAnyFreeSpec with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Scope 1 Scope 2 test 1"
    val scopes = Vector("Scope 1", "Scope 2")
    val text = "test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  def testData: TestData = testDataFor("Scope 1 Scope 2 test 1", ConfigMap("key1" -> "value1"))
  "Scope 1" - {
    "Scope 2" - {
      "test 1" taggedAs(TestDataTag) in {}
    }
  }
  override def newInstance: freespec.PathAnyFreeSpecLike = new ExampleTestDataPathFreeSpec
}

@DoNotDiscover
protected[scalatest] class ExampleTestDataPathFunSpec extends funspec.PathAnyFunSpec with TestDataFixtureServices {
  val expectedTestData = new TestData {
    val configMap = ConfigMap("key1" -> "value1")
    val name = "Scope 1 Scope 2 test 1"
    val scopes = Vector("Scope 1", "Scope 2")
    val text = "test 1"
    // SKIP-SCALATESTJS,NATIVE-START
    val tags = Set("org.scalatest.DoNotDiscover", "org.scalatest.tags.TestDataTag")
    // SKIP-SCALATESTJS,NATIVE-END
    //SCALATESTJS,NATIVE-ONLY val tags = Set("org.scalatest.tags.TestDataTag")
    val pos = Some(source.Position.here)
  }
  def testData: TestData = testDataFor("Scope 1 Scope 2 test 1", ConfigMap("key1" -> "value1"))
  describe("Scope 1") {
    describe("Scope 2") {
      it("test 1", TestDataTag) {}
    }
  }
  override def newInstance: funspec.PathAnyFunSpecLike = new ExampleTestDataPathFunSpec
}


text:
particle::particle(direct3d const &d3d,
	ComPtr<ID3D11ShaderResourceView> const &view)
	: view_(view), quad_(std::make_shared<quad>(d3d))
{}

particle::~particle()
{}


text:
class ReorderAnswers < ActiveRecord::Migration
  def up
    change_table :answers do |t|
      t.change :question_id, :integer, after: :content, null: false

      t.change :created_at, :datetime, after: :user_id, null: false
      t.change :updated_at, :datetime, after: :user_id, null: false

      t.change :user_id, :integer, null: false
    end

    add_index :answers, :question_id
    add_index :answers, :user_id
  end

  def down
  end
end


text:
<?php

final class ManiphestTaskDescriptionTransaction
  extends ManiphestTaskTransactionType {

  const TRANSACTIONTYPE = 'description';

  public function generateOldValue($object) {
    return $object->getDescription();
  }

  public function applyInternalEffects($object, $value) {
    $object->setDescription($value);
  }

  public function getActionName() {
    return pht('Edited');
  }

  public function getTitle() {
    return pht(
      '%s updated the task description.',
      $this->renderAuthor());
  }

  public function getTitleForFeed() {
    return pht(
      '%s updated the task description for %s.',
      $this->renderAuthor(),
      $this->renderObject());
  }

  public function hasChangeDetailView() {
    return true;
  }

  public function getMailDiffSectionHeader() {
    return pht('CHANGES TO TASK DESCRIPTION');
  }

  public function newChangeDetailView() {
    $viewer = $this->getViewer();

    return id(new PhabricatorApplicationTransactionTextDiffDetailView())
      ->setViewer($viewer)
      ->setOldText($this->getOldValue())
      ->setNewText($this->getNewValue());
  }

  public function newRemarkupChanges() {
    $changes = array();

    $changes[] = $this->newRemarkupChange()
      ->setOldValue($this->getOldValue())
      ->setNewValue($this->getNewValue());

    return $changes;
  }

}


text:
package org.fossasia.alarms;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.preference.PreferenceManager;
import android.support.v4.content.LocalBroadcastManager;

import org.fossasia.db.DatabaseManager;
import org.fossasia.fragments.SettingsFragment;
import org.fossasia.services.AlarmIntentService;

/**
 * This class monitors bookmarks and preferences changes to dispatch alarm update work to AlarmIntentService.
 *
 * @author Christophe Beyls
 */
public class FosdemAlarmManager implements OnSharedPreferenceChangeListener {

    private static FosdemAlarmManager instance;
    private final BroadcastReceiver scheduleRefreshedReceiver = new BroadcastReceiver() {

        @Override
        public void onReceive(Context context, Intent intent) {
            // When the schedule DB is updated, update the alarms too
            startUpdateAlarms();
        }
    };
    private final BroadcastReceiver bookmarksReceiver = new BroadcastReceiver() {

        @Override
        public void onReceive(Context context, Intent intent) {
            // Dispatch the Bookmark broadcasts to the service
            Intent serviceIntent = new Intent(context, AlarmIntentService.class);
            serviceIntent.setAction(intent.getAction());
            serviceIntent.putExtras(intent.getExtras());
            context.startService(serviceIntent);
        }
    };
    private Context context;
    private boolean isEnabled;

    private FosdemAlarmManager(Context context) {
        this.context = context;
        SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
        isEnabled = sharedPreferences.getBoolean(SettingsFragment.KEY_PREF_NOTIFICATIONS_ENABLED, false);
        if (isEnabled) {
            registerReceivers();
        }
        sharedPreferences.registerOnSharedPreferenceChangeListener(this);
    }

    public static void init(Context context) {
        if (instance == null) {
            instance = new FosdemAlarmManager(context);
        }
    }

    public static FosdemAlarmManager getInstance() {
        return instance;
    }

    public boolean isEnabled() {
        return isEnabled;
    }

    @Override
    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
        if (SettingsFragment.KEY_PREF_NOTIFICATIONS_ENABLED.equals(key)) {
            isEnabled = sharedPreferences.getBoolean(SettingsFragment.KEY_PREF_NOTIFICATIONS_ENABLED, false);
            if (isEnabled) {
                registerReceivers();
                startUpdateAlarms();
            } else {
                unregisterReceivers();
                startDisableAlarms();
            }
        } else if (SettingsFragment.KEY_PREF_NOTIFICATIONS_DELAY.equals(key)) {
            startUpdateAlarms();
        }
    }

    private void registerReceivers() {
        LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
        lbm.registerReceiver(scheduleRefreshedReceiver, new IntentFilter(DatabaseManager.ACTION_SCHEDULE_REFRESHED));
        IntentFilter filter = new IntentFilter();
        filter.addAction(DatabaseManager.ACTION_ADD_BOOKMARK);
        filter.addAction(DatabaseManager.ACTION_REMOVE_BOOKMARKS);
        lbm.registerReceiver(bookmarksReceiver, filter);
    }

    private void unregisterReceivers() {
        LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
        lbm.unregisterReceiver(scheduleRefreshedReceiver);
        lbm.unregisterReceiver(bookmarksReceiver);
    }

    private void startUpdateAlarms() {
        Intent serviceIntent = new Intent(context, AlarmIntentService.class);
        serviceIntent.setAction(AlarmIntentService.ACTION_UPDATE_ALARMS);
        context.startService(serviceIntent);
    }

    private void startDisableAlarms() {
        Intent serviceIntent = new Intent(context, AlarmIntentService.class);
        serviceIntent.setAction(AlarmIntentService.ACTION_DISABLE_ALARMS);
        context.startService(serviceIntent);
    }
}


text:
<!DOCTYPE html>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />

/*globals askiaVista,jQuery,window*/
/*!
 * jQuery AskiaVista UI Pagination
 * Extend askiaVista with some helpers methods to manage the pagination on getPages and getInterviews
 *
 * Version 1.1.4 (14-APR-2015)
 *      + Fix issue while replacing the chart,
 *        if the chart key is a number in the initial query,
 *        it only replace the first chart and then crash
 *       + Fix tabStyle replacement take in account the additional class like askia-crosstab ...
 *         Replace via a regexp to be sure
 *
 * Version 1.1.3 (15-JAN-2013)
 *      + Add options to deals with the 'singlePage'
 *      + Add options 'scrollIntoView' when using the 'singlePage'
 *
 * Version 1.1.2 (30-Nov-2012)
 *      + Add the method to clear the pagination
 *
 * Version 1.1.1
 *      + Add the method to replace the tabStyle in all pages in memory
 *
 * Version 1.1.0 (10-Nov-2011)
 *		+ Add the compatibility with the HTML 5 'nav' tag
 *		+ Code validates with jsHint using the strict statement
 *
 * Version 1.0.0 (08-JUN-2011)
 *		+ Creates the pagination using the list of links or the dropdown
 *		+ Code validates with jsLint
 *
 * @requires jquery.askiavista.js v2.0.2 or later
 *
 * Examples at: http://dev.askia.com
 * Copyright (c) 1994-2010 Askia
 */

(function ($, askiaVista) {
    "use strict";

    // Validates the presence of askiaVista
    if (!askiaVista) {
        alert("AskiaVista AJAX script was not found!\r\nPlease add it into the document OR add the current plugin script ('UI-DropDown') after AskiaVista.");
        return;
    }

    // Append some locale for the current plugin
    askiaVista.config({
        i18n : {
            'UI-Pagination' : {
                // Next page
                next  : "Next",
                // Last page
                last : "Last",
                // Previous page
                back : "Back",
                // First page
                first : "First",
                // Page
                page : "Page",
                // Table
                table : "Table",
                // Chart
                chart : "Chart"
            }
        }
    });

    // Defines the plugin
    var that = {
            name         : "UI-Pagination",
            description  : "This plugin creates the pagination for the pages and interviews.",
            category     : "ui",
            version      : "1.1.3",
            date         : "15-JAN-2013",
            author       : "Askia",
            website      : "http://www.askia.com",
            helpUrl      : "https://dev.askia.com/projects/askiavista-sdk/wiki/AskiaVista_AJAX_Plugins_UI_Pagination",
            localeFile   : "UI-Pagination",
            dependencies : [
                {
                    name    : "askiaVista",
                    version : ">=2.0.1"
                }
            ]
        },

    // Collection of paginations
        collection = {},

    /*
     * @name pagination
     * @memberOf askiaVista
     * @function
     * Creates a new pagination.
     * @param {String} id Id of the pagination container
     * @param {Object|String} data Result of the askiaVista methods: getPages or getInterviews
     * @param {Object} [query] Query used to keep the context
     * @param {Object} [options] Options of the pagination
     * @param {Object} [queryOptions] Options from the query
     * @return {Object} Pagination object
     */
        pagination = function (id, data, query, options, queryOptions) {
            if (!id) {
                return undefined;
            }

            // Returns the existing pagination item
            if (arguments.length === 1 && typeof (id) === "string") {
                return collection[id];
            }

            /*
             * Default options
             * @private
             */
            var opts = {
                max      : 5,
                format   : '',
                first    : false,
                previous : true,
                next     : true,
                last     : false,
                singlePage : false,
                scrollIntoView : false
            }, visibleRange = [], pages, pageIndex, pageLength, changeEvents = [];

            /*
             * Clear the pagination
             * @return {Object} Returns the pagination object
             */
            function clear() {
                visibleRange = [];
                pages        = [];
                pageIndex    = -1;
                pageLength   = 0;
                $("#" + id).empty();
                return collection[id];
            }

            /*
             * Change or returns the options of the pagination
             *
             * @param {Object} [o] Options to change
             * @return {Object} Returns the pagination object
             */
            function config(o) {
                if (!o) {
                    return opts;
                }
                $.extend(true, opts, o);
                return collection[id];
            }

            /*
             * Calculate the startindex of a given index
             * @param {Number} index Index of the page to display
             */
            function getStartIndex(index) {
                var ret = index;
                while ((ret % opts.max) !== 0) {
                    ret -= 1;
                }
                return ret;
            }

            /*
             * Register or fire the change event
             *
             * @param {Function} [fn] Function to register
             * @return {Object} Returns the pagination object
             */
            function change(fn) {
                if (!fn) {
                    var i, l;
                    for (i = 0, l = changeEvents.length; i < l; i += 1) {
                        changeEvents[i].call(collection[id]);
                    }
                } else {
                    if (typeof (fn) === "function") {
                        changeEvents.push(fn);
                    }
                }

                return collection[id];
            }

            /*
             * Display the result of a given page
             * @param {Number} index Index of page to display
             */
            function display(index) {
                if (opts.singlePage) {
                    return collection[id];
                }

                if (index < 0) { // Fix the index
                    index = 0;
                } else if (index >= pageLength) { // Fix the index
                    index = pageLength - 1;
                }
                if (query.action === askiaVista.action.getPages) {
                    if (opts.scrollIntoView) {
                        $('#' + query.containerId + '_page' + index)[0].scrollIntoView();
                    } else {
                        queryOptions.page = index;
                        askiaVista.displayResult(pages, query, queryOptions);
                    }
                } else if (query.action === askiaVista.action.getInterviews) {
                    // Re-run the query
                    query.page = index;
                    askiaVista.getInterviews(query);
                }
                pageIndex = index;
                change(); // Fire the event
                return collection[id];
            }

            /*
             * Format the text of the pagination
             *
             * @param {Number} index Index of the page
             */
            function formatText(index) {
                if (!opts.format || typeof (opts.format) !== "string") {
                    return (index + 1);
                }

                var ret = opts.format,
                    page;

                ret = ret.replace(/%index/gi, (index + 1));

                if (query.action === askiaVista.action.getPages) {
                    page = pages[index];

                    if (page) {
                        ret = ret.replace(/%name/gi, page.name);
                        ret = ret.replace(/%icon/gi, getIconType(page.type));
                        ret = ret.replace(/%type/gi, that.translate(page.type));
                    }
                }

                return ret;
            }

            /*
             * Returns the HTML for the icon of the type
             *
             * @param type, either Table or Chart
             * @return {String} HTML code for the icon
             */
            function getIconType(givenType) {
                if(givenType === 'table') {
                    return '';
                } else  if(givenType === 'chart'){
                    return '';
                }
            }

            /*
             * Returns the HTML for the UL or OL pagination list
             *
             * @param {Number} [startAt] Start index of the pagination
             * @return {String} HTML code for the pagination
             */
            function getList(startAt) {
                var index = startAt || 0, // Start index
                    i, l,
                    str = [];

                visibleRange.length = 0; // Clear the range

                l = (pageLength < opts.max) ? pageLength : (((index + opts.max) > pageLength) ? pageLength : (index + opts.max));

                if (opts.first) {
                    str.push('
' + that.translate("first") + '
');
                }
                if (opts.previous) {
                    str.push('
' + that.translate("back") + '
');
                }
                if (index > 0) {
                    str.push('
...
');
                }
                for (i = index; i < l; i += 1) {
                    visibleRange.push(i);
                    str.push('
' + formatText(i) + '
');
                    if (i === (l - 1) && pageLength > l) {
                        str.push('
...
');
                    }
                }
                if (opts.next) {
                    str.push('
' + that.translate("next") + '
');
                }
                if (opts.last) {
                    str.push('
' + that.translate("last") + '
');
                }

                return str.join('');
            }

            /*
             * Returns the HTML for the SELECT
             *
             * @return {String} HTML code for drop-down the pagination
             */
            function getSelectOptions() {
                var i, l, str = [], selected = "";

                if (!opts.format) {
                    if (query.action === askiaVista.action.getPages) {
                        opts.format = "%index %name";
                    } else if (query.action === askiaVista.action.getInterviews) {
                        opts.format = that.translate("page") + " %index";
                    }
                }

                for (i = 0, l = pageLength; i < l; i += 1) {
                    selected = (pageIndex === i) ? ' selected="selected"' : '';
                    str.push('<option value="' + i + '"' + selected + '>' + formatText(i) + '</option>');
                }

                return str.join('');
            }

            /*
             * Write the pagination
             * @param {Number} [startAt] Start index of the pagination
             */
            function write(startAt) {
                var $p = $("#" + id),
                    str = "";

                if (!$p.length) {
                    return;
                }

                // Pagination using the list of links
                if ($p.is("nav, ul, ol")) {
                    str = getList(startAt);
                    if ($p.is("nav")) {
                        str = '
' + str + '
';
                    }
                    $p
                        .undelegate("li", "click.askiavista.pagination")
                        .delegate("li", "click.askiavista.pagination", function (e) {
                            e.preventDefault();
                            e.stopPropagation();

                            var index = $("a", this).data("pageindex");

                            if (index === "previous") { // Previous
                                index = pageIndex - 1;
                            } else if (index === "next") { // Next
                                index = pageIndex + 1;
                            } else if (index === "first") { // First
                                index = 0;
                            } else if (index === "last") { // Last
                                index = pageLength - 1;
                            } else {
                                index = parseInt(index, 10);
                            }

                            display(index);
                            collection[id].update();
                            return false;
                        });
                }

                // Pagination using a drop-down
                if ($p.is("select")) {
                    str = getSelectOptions();
                    $p
                        .unbind("change.askiavista.pagination")
                        .bind("change.askiavista.pagination", function (e) {
                            e.stopPropagation();
                            e.preventDefault();
                            display(parseInt($(this).val(), 10));
                            return false;
                        });
                }

                $p.html(str);
                return collection[id];
            }

            function changePageIndex(givenPageIndex) {
                pageIndex = givenPageIndex;
            }

            /*
             * Update the pagination list
             */
            function update() {
                var $p = $("#" + id);

                if (!$p.is("nav, ul, ol")) { // Only list with links
                    return;
                }

                // Current index is not visible
                if (pageIndex > visibleRange[visibleRange.length - 1] || pageIndex < visibleRange[0]) {
                    write(getStartIndex(pageIndex));
                }

                // Search the link associated with the current page
                $p.find('a').each(function () {
                    if (parseInt($(this).data("pageindex"), 10) === pageIndex) {
                        $(this).addClass("pagination-current");
                        $(this).parent().addClass("active");
                    } else {
                        $(this).removeClass("pagination-current");
                        $(this).parent().removeClass("active");
                    }
                });

                if (pageLength === 1) {
                    $p.find(".prev, .next, .first, .last").hide();
                } else {
                    $p.find(".prev, .next, .first, .last").show();
                }

                // Hide or show the next/previous/first/last
                $p.find(".prev, .first")[((pageIndex !== 0) ? 'remove' : 'add') + 'Class']('disabled');
                $p.find(".next, .last")[((pageIndex < (pageLength - 1)) ? 'remove' : 'add') + 'Class']('disabled');

                return collection[id];
            }

            /*
             * Replace the tabStyle in the list of pages
             * @param {Object} oldTabStyle tabStyle to replace
             * @param {Object} tabStyle tabStyle to apply
             */
            function replaceTabStyle(oldTabStyle, tabStyle) {
                if (query.action !== askiaVista.action.getPages) {
                    return;
                }

                var i = 0,
                    oldClass = new RegExp('(class="askiatable (?:.*)\\s*)(' + oldTabStyle.root + ')(\\s*(?:.*)\\s*")', 'gi'),
                    newClass = tabStyle.root;

                for (; i < pageLength; i += 1) {
                    if (pages[i].type === "table") {
                        pages[i].output = pages[i].output.replace(oldClass, "$1" + newClass + "$3");
                    }
                }
            }

            /*
             * Replace the chart template in the list of pages
             * @param {Object} chart Definition of chart to apply
             */
            function replaceChartTemplate(chart) {
                if (query.action !== askiaVista.action.getPages) {
                    return;
                }
                if ($.isPlainObject(chart)) { // Replace the chart in the initial query options
                    queryOptions.chart = chart;
                }
                if (!opts.singlePage || !$.isPlainObject(chart)) {
                    display(pageIndex);
                    return;
                }

                // When all pages are in a single page, redraw all charts
                var i, l, obj, chartPlugin = askiaVista.getPlugin(chart.name);
                if (!chartPlugin) {
                    return;
                }

                for (i = 0, l = pages.length; i < l; i += 1) {
                    if (pages[i].type === "chart" && pages[i].output) {
                        obj = $.extend({}, query, {
                            containerId : query.containerId + '_page' + i
                        });
                        obj.chart = chart;
                        chartPlugin.draw(pages[i].output, chart.options, obj);
                    }
                }
            }

            // Initialize the pagination
            (function () {
                var d = (typeof data === 'string') ? JSON.parse(data) : data;

                queryOptions = queryOptions || {};

                if (query.containerId && typeof (query.containerId) === "string") {
                    opts.containerId = query.containerId;
                }
                if (!query.containerId && options && options.containerId && typeof (options.containerId) === "string") {
                    query.containerId = options.containerId; // Update the query
                }
                if (query.pagination && $.isPlainObject(query.pagination)) {
                    opts = $.extend(true, opts, query.pagination);
                }
                if (options && $.isPlainObject(options)) {
                    opts = $.extend(true, opts, options);
                }

                if (opts.scrollIntoView === 'auto') {
                    opts.scrollIntoView = queryOptions.singlePage;
                }
                if (opts.scrollIntoView) {
                    opts.singlePage =  false;
                }

                if (query.action === askiaVista.action.getPages) {
                    pages = d;
                    if (opts.singlePage) {
                        pageLength = 1;
                    } else {
                        pageLength = pages.length;
                    }
                } else {
                    pageLength = d.totalPages;
                }
                pageIndex = query.page || 0;
                if (opts.singlePage) {
                    pageIndex = 0;
                }

                write();

                update();
            } ());

            // Public interface of the pagination
            collection[id] = {
                length : function () {
                    return pageLength;
                },
                current : function () {
                    return pageIndex;
                },
                clear   : clear,
                change : change,
                display : display,
                update : update,
                config : config,
                replaceTabStyle : replaceTabStyle,
                replaceChartTemplate : replaceChartTemplate,
                changePageIndex : changePageIndex
            };

            return collection[id];
        };

    /*
     * Manage the shorthand using the 'pagination' key in queries
     *
     * @param {String} data JSON string from the AskiaVista AJAX response
     * @param {Object} query Query used to obtain the data
     * @param {Object} options Options of the cross-tab
     */
    that.beforeSuccess = function (data, query, options) {
        if (!query.pagination || (!$.isPlainObject(query.pagination) &&  typeof (query.pagination) !== "string")) {
            return;
        }
        if (query.action !== askiaVista.action.getPages && query.action !== askiaVista.action.getInterviews) {
            return;
        }

        var id = "", opts = {};
        if (typeof (query.pagination) === "string") {
            id = query.pagination;
        } else if ($.isPlainObject(query.pagination)) {
            id = query.pagination.id;
            opts = query.pagination;
        }
        opts.singlePage = (options && options.singlePage);
        pagination(id, data, query, opts, options);
    };

    //  Initialize the plugin
    that.init = function () {
        // Extend askiaVista
        askiaVista.extend({
            pagination : pagination
        });
    };

    // Add the plugin
    askiaVista.addPlugin(that);

}(jQuery, askiaVista));


text:
namespace Xamarin.Camera.Controls
{

    public enum CameraOptions
    {

        Rear,

        Front

    }

}


text:
package brooklyn.entity.messaging.rabbit;

import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import brooklyn.entity.basic.AbstractEntity;
import brooklyn.entity.messaging.amqp.AmqpExchange;
import brooklyn.location.basic.SshMachineLocation;

import com.google.common.base.Objects.ToStringHelper;
import com.google.common.base.Predicates;
import com.google.common.collect.Iterables;

public abstract class RabbitDestination extends AbstractEntity implements AmqpExchange {
    public static final Logger log = LoggerFactory.getLogger(RabbitDestination.class);

    private String virtualHost;
    private String exchange;
    protected SshMachineLocation machine;
    protected Map<String,String> shellEnvironment;

    public RabbitDestination() {
    }

    @Override
    public void onManagementStarting() {
        super.onManagementStarting();

        exchange = (getConfig(EXCHANGE_NAME) != null) ? getConfig(EXCHANGE_NAME) : getDefaultExchangeName();
        virtualHost = getConfig(RabbitBroker.VIRTUAL_HOST_NAME);
        setAttribute(RabbitBroker.VIRTUAL_HOST_NAME, virtualHost);

        machine = (SshMachineLocation) Iterables.find(getParent().getLocations(), Predicates.instanceOf(SshMachineLocation.class));
        shellEnvironment = getParent().getShellEnvironment();
    }

    // FIXME Should return RabbitBroker; won't work if gets a proxy rather than "real" entity
    @Override
    public RabbitBroker getParent() {
        return (RabbitBroker) super.getParent();
    }

    public void create() {
        connectSensors();
    }

    public void delete() {
        disconnectSensors();
    }

    protected void connectSensors() { }

    protected void disconnectSensors() { }

    public String getVirtualHost() {
        return virtualHost;
    }

    @Override
    public String getExchangeName() {
        return exchange;
    }

    public String getDefaultExchangeName() {
        return AmqpExchange.DIRECT;
    }

    @Override
    protected ToStringHelper toStringHelper() {
        return super.toStringHelper().add("virtualHost", getParent().getVirtualHost()).add("exchange", getExchangeName());
    }
}


text:
struct GcContext;

struct GcContext *gc_context();
void *gc_root(struct GcContext *ctx, size_t size);
void *gc_alloc(struct GcContext *ctx, size_t size);
int gc_finalizer(struct GcContext *ctx, void *ptr, void (*deleter)(void*));
void gc_collect(struct GcContext *ctx);

#endif


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Science Rep. Yokohama Nat. Univ. , Section 2 4: 7 (1955)

#### Original name
Microglossum capitatum F.L. Tai

### Remarks
null


text:
package com.marcobehler.saito.core.plugins;

import com.marcobehler.saito.core.configuration.SaitoConfig;
import org.junit.Test;

import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.TreeSet;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * @author Marco Behler <marco@marcobehler.com>
 */
public class PluginTest {

    @Test
    public void test_ordering() {
        Set<Plugin> plugins = new HashSet<>();

        FileWatcherPlugin fileWatcherPlugin = new FileWatcherPlugin(Collections.emptySet());
        plugins.add(fileWatcherPlugin);

        SaitoConfig config = new SaitoConfig(null);

        JettyPlugin jettyPlugin = new JettyPlugin(config);
        plugins.add(jettyPlugin);

        LiveReloadPlugin liveReloadPlugin = new LiveReloadPlugin(config);
        plugins.add(liveReloadPlugin);

        TreeSet<Plugin> sortedPlugins = new TreeSet<>(plugins);
        assertThat(sortedPlugins.first()).isEqualTo(liveReloadPlugin);
        assertThat(sortedPlugins.last()).isEqualTo(jettyPlugin);
    }

}


text:
package com.hazelcast.map.impl.iterator;

import com.hazelcast.internal.iteration.IterationPointer;
import com.hazelcast.internal.nio.IOUtil;
import com.hazelcast.map.impl.MapDataSerializerHook;
import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;
import com.hazelcast.internal.serialization.Data;

import java.io.IOException;
import java.util.AbstractMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

/**
 * Container class for a collection of entries along with pointers defining
 * the iteration state from which new keys can be fetched.
 * This class is usually used when iterating map entries.
 *
 * @see com.hazelcast.map.impl.proxy.MapProxyImpl#iterator
 */
public class MapEntriesWithCursor extends AbstractCursor<Map.Entry<Data, Data>> {

    public MapEntriesWithCursor() {
    }

    public MapEntriesWithCursor(List<Map.Entry<Data, Data>> entries, IterationPointer[] pointers) {
        super(entries, pointers);
    }

    @Override
    void writeElement(ObjectDataOutput out, Entry<Data, Data> entry) throws IOException {
        IOUtil.writeData(out, entry.getKey());
        IOUtil.writeData(out, entry.getValue());
    }

    @Override
    Entry<Data, Data> readElement(ObjectDataInput in) throws IOException {
        final Data key = IOUtil.readData(in);
        final Data value = IOUtil.readData(in);
        return new AbstractMap.SimpleEntry<>(key, value);
    }

    @Override
    public int getClassId() {
        return MapDataSerializerHook.ENTRIES_WITH_CURSOR;
    }
}