text:
<?php
/**
 * FFmpegMovie represents a movie file
 *
 * @author char0n (Vladimír Gorej, vladimir.gorej@gmail.com)
 * @package FFmpegPHP
 * @license New BSD
 * @version 2.6
 */
class FFmpegMovie implements Serializable {

    protected static $REGEX_DURATION            = '/Duration: ([0-9]{2}):([0-9]{2}):([0-9]{2})(\.([0-9]+))?/';
    protected static $REGEX_FRAME_RATE          = '/([0-9\.]+\sfps,\s)?([0-9\.]+)\stb(?:r|n)/';
    protected static $REGEX_COMMENT             = '/comment\s*(:|=)\s*(.+)/i';
    protected static $REGEX_TITLE               = '/title\s*(:|=)\s*(.+)/i';
    protected static $REGEX_ARTIST              = '/(artist|author)\s*(:|=)\s*(.+)/i';
    protected static $REGEX_COPYRIGHT           = '/copyright\s*(:|=)\s*(.+)/i';
    protected static $REGEX_GENRE               = '/genre\s*(:|=)\s*(.+)/i';
    protected static $REGEX_TRACK_NUMBER        = '/track\s*(:|=)\s*(.+)/i';
    protected static $REGEX_YEAR                = '/year\s*(:|=)\s*(.+)/i';
    protected static $REGEX_FRAME_WH            = '/Video:.+?([1-9][0-9]*)x([1-9][0-9]*)/';
    protected static $REGEX_PIXEL_FORMAT        = '/Video: [^,]+, ([^,]+)/';
    protected static $REGEX_PIXEL_ASPECT_RATIO  = '/Video:.+DAR ([0-9]+):([0-9]+)\]/';
    protected static $REGEX_BITRATE             = '/bitrate: ([0-9]+) kb\/s/';
    protected static $REGEX_VIDEO_BITRATE       = '/Video:.+?([0-9]+) kb\/s/';
    protected static $REGEX_AUDIO_BITRATE       = '/Audio:.+?([0-9]+) kb\/s/';
    protected static $REGEX_AUDIO_SAMPLE_RATE   = '/Audio:.+?([0-9]+) Hz/';
    protected static $REGEX_VIDEO_CODEC         = '/Video:\s([^,]+),/';
    protected static $REGEX_AUDIO_CODEC         = '/Audio:\s([^,]+),/';
    protected static $REGEX_AUDIO_CHANNELS      = '/Audio:\s[^,]+,[^,]+,([^,]+)/';
    protected static $REGEX_HAS_AUDIO           = '/Stream.+Audio/';
    protected static $REGEX_HAS_VIDEO           = '/Stream.+Video/';
    protected static $REGEX_ERRORS              = '/.*(Error|Permission denied|could not seek to position|Invalid pixel format|Unknown encoder|could not find codec|does not contain any stream).*/i';

    /**
     * FFmpeg binary
     *
     * @var string
     */
    protected $ffmpegBinary;
    /**
     * Output provider
     *
     * @var OutputProvider
     */
    protected $provider;

    /**
    * Movie file path
    *
    * @var string
    */
    protected $movieFile;

    /**
    * provider output
    *
    * @var string
    */
    protected $output;

    /**
    * Movie duration in seconds
    *
    * @var float
    */
    protected $duration;
    /**
    * Current frame index
    *
    * @var int
    */
    protected $frameCount;
    /**
    * Movie frame rate
    *
    * @var float
    */
    protected $frameRate;
    /**
    * Comment ID3 field
    *
    * @var string
    */
    protected $comment;
    /**
    * Title ID3 field
    *
    * @var string
    */
    protected $title;
    /**
    * Author ID3 field
    *
    * @var string
    */
    protected $artist;
    /**
    * Copyright ID3 field
    *
    * @var string
    */
    protected $copyright;
    /**
    * Genre ID3 field
    *
    * @var string
    */
    protected $genre;
    /**
    * Track ID3 field
    *
    * @var int
    */
    protected $trackNumber;
    /**
    * Year ID3 field
    *
    * @var int
    */
    protected $year;
    /**
    * Movie frame height
    *
    * @var int
    */
    protected $frameHeight;
    /**
    * Movie frame width
    *
    * @var int
    */
    protected $frameWidth;
    /**
    * Movie pixel format
    *
    * @var string
    */
    protected $pixelFormat;
    /**
    * Movie pixel aspect ratio
    *
    * @var float
    */
    protected $pixelAspectRatio;
    /**
    * Movie bit rate combined with audio bit rate
    *
    * @var int
    */
    protected $bitRate;
    /**
    * Movie video stream bit rate
    *
    * @var int
    */
    protected $videoBitRate;
    /**
    * Movie audio stream bit rate
    *
    * @var int
    */
    protected $audioBitRate;
    /**
    * Audio sample rate
    *
    * @var int
    */
    protected $audioSampleRate;
    /**
    * Current frame number
    *
    * @var int
    */
    protected $frameNumber;
    /**
    * Movie video cocec
    *
    * @var string
    */
    protected $videoCodec;
    /**
    * Movie audio coded
    *
    * @var string
    */
    protected $audioCodec;
    /**
    * Movie audio channels
    *
    * @var int
    */
    protected $audioChannels;

    /**
    * Open a video or audio file and return it as an FFmpegMovie object.
    * If ffmpeg and ffprobe are both installed on host system, ffmpeg
    * gets priority in extracting info from the movie file. However
    * to override this default behaviour use any implementation of OutputProvider interface
    * as the second constructor argumentwhile instantiating
    *
    *
    * @param string $moviePath full path to the movie file
    * @param OutputProvider $outputProvider provides parsable output
    * @param string $ffmpegBinary ffmpeg executable, if $outputProvider not specified
    * @throws Exception
    */
    public function __construct($moviePath, OutputProvider $outputProvider = null,
        $ffmpegBinary = 'C:\\wamp64\\ffmpeg\\bin\\ffmpeg.exe') {

        $this->movieFile       = $moviePath;
        $this->frameNumber     = 0;
        $this->ffmpegBinary    = $ffmpegBinary;
        if ($outputProvider === null) {
            $outputProvider = new FFmpegOutputProvider($ffmpegBinary);
        }
        $this->setProvider($outputProvider);
    }

    /**
     * Setting provider implementation
     *
     * @param OutputProvider $outputProvider
     */
    public function setProvider(OutputProvider $outputProvider) {
        $this->provider = $outputProvider;
        $this->provider->setMovieFile($this->movieFile);
        $this->output = $this->provider->getOutput();
    }

    /**
     * Getting current provider implementation
     *
     * @return OutputProvider
     */
    public function getProvider() {
        return $this->provider;
    }

    /**
    * Return the duration of a movie or audio file in seconds.
    *
    * @return float movie duration in seconds
    */
    public function getDuration() {
        if ($this->duration === null) {
            $match = array();
            preg_match(self::$REGEX_DURATION, $this->output, $match);
            if (array_key_exists(1, $match) && array_key_exists(2, $match) && array_key_exists(3, $match)) {
                $hours     = (int)    $match[1];
                $minutes   = (int)    $match[2];
                $seconds   = (int)    $match[3];
                $fractions = (float)  ((array_key_exists(5, $match)) ? "0.$match[5]" : 0.0);

                $this->duration = (($hours * (3600)) + ($minutes * 60) + $seconds + $fractions);
            } else {
                $this->duration = 0.0;
            }

            return $this->duration;
        }

        return $this->duration;
    }

    /**
    * Return the number of frames in a movie or audio file.
    *
    * @return int
    */
    public function getFrameCount() {
        if ($this->frameCount === null) {
            $this->frameCount = (int) ($this->getDuration() * $this->getFrameRate());
        }

        return $this->frameCount;
    }

    /**
    * Return the frame rate of a movie in fps.
    *
    * @return float
    */
    public function getFrameRate() {
        if ($this->frameRate === null) {
            $match = array();
            preg_match(self::$REGEX_FRAME_RATE, $this->output, $match);
            $this->frameRate = (float) ((array_key_exists(1, $match)) ? $match[1] : 0.0);
        }

        return $this->frameRate;
    }

    /**
    * Return the path and name of the movie file or audio file.
    *
    * @return string
    */
    public function getFilename() {
        return $this->movieFile;
    }

    /**
    * Return the comment field from the movie or audio file.
    *
    * @return string
    */
    public function getComment() {
        if ($this->comment === null) {
             $match = array();
             preg_match(self::$REGEX_COMMENT, $this->output, $match);
             $this->comment = (array_key_exists(2, $match)) ? trim($match[2]) : '';
        }

        return $this->comment;
    }

    /**
    * Return the title field from the movie or audio file.
    *
    * @return string
    */
    public function getTitle() {
        if ($this->title === null) {
            $match = array();
            preg_match(self::$REGEX_TITLE, $this->output, $match);
            $this->title = (array_key_exists(2, $match)) ? trim($match[2]) : '';
        }

        return $this->title;
    }

    /**
    * Return the author field from the movie or the artist ID3 field from an mp3 file; alias $movie->getArtist()
    *
    * @return string
    */
    public function getArtist() {
        if ($this->artist === null) {
            $match = array();
            preg_match(self::$REGEX_ARTIST, $this->output, $match);
            $this->artist = (array_key_exists(3, $match)) ? trim($match[3]) : '';
        }

        return $this->artist;
    }

    /**
    * Return the author field from the movie or the artist ID3 field from an mp3 file.
    *
    * @return string
    */
    public function getAuthor() {
        return $this->getArtist();
    }

    /**
    * Return the copyright field from the movie or audio file.
    *
    * @return string
    */
    public function getCopyright() {
        if ($this->copyright === null) {
            $match = array();
            preg_match(self::$REGEX_COPYRIGHT, $this->output, $match);
            $this->copyright = (array_key_exists(2, $match)) ? trim($match[2]) : '';
        }

        return $this->copyright;
    }

    /**
    * Return the genre ID3 field from an mp3 file.
    *
    * @return string
    */
    public function getGenre() {
        if ($this->genre === null) {
            $match = array();
            preg_match(self::$REGEX_GENRE, $this->output, $match);
            $this->genre = (array_key_exists(2, $match)) ? trim($match[2]) : '';
        }

        return $this->genre;
    }

    /**
    * Return the track ID3 field from an mp3 file.
    *
    * @return int
    */
    public function getTrackNumber() {
        if ($this->trackNumber === null) {
            $match = array();
            preg_match(self::$REGEX_TRACK_NUMBER, $this->output, $match);
            $this->trackNumber = (int) ((array_key_exists(2, $match)) ? $match[2] : 0);
        }

        return $this->trackNumber;
    }

    /**
    * Return the year ID3 field from an mp3 file.
    *
    * @return int
    */
    public function getYear() {
        if ($this->year === null) {
            $match = array();
            preg_match(self::$REGEX_YEAR, $this->output, $match);
	    $this->year = (int) ((array_key_exists(2, $match)) ? $match[2] : 0);
        }

        return $this->year;
    }

    /**
    * Return the height of the movie in pixels.
    *
    * @return int
    */
    public function getFrameHeight() {
        if ($this->frameHeight == null) {
            $match = array();
            preg_match(self::$REGEX_FRAME_WH, $this->output, $match);
            if (array_key_exists(1, $match) && array_key_exists(2, $match)) {
                $this->frameWidth  = (int) $match[1];
                $this->frameHeight = (int) $match[2];
            } else {
                $this->frameWidth  = 0;
                $this->frameHeight = 0;
            }
        }

        return $this->frameHeight;
    }

    /**
    * Return the width of the movie in pixels.
    *
    * @return int
    */
    public function getFrameWidth() {
        if ($this->frameWidth === null) {
            $this->getFrameHeight();
        }

        return $this->frameWidth;
    }

    /**
    * Return the pixel format of the movie.
    *
    * @return string
    */
    public function getPixelFormat() {
        if ($this->pixelFormat === null) {
            $match = array();
            preg_match(self::$REGEX_PIXEL_FORMAT, $this->output, $match);
            $this->pixelFormat = (array_key_exists(1, $match)) ? trim($match[1]) : '';
        }

        return $this->pixelFormat;
    }

    /**
    * Return the pixel aspect ratio of the movie.
    *
    * @return float
    */
    public function getPixelAspectRatio() {
        if ($this->pixelAspectRatio === null) {
            $match = array();
            preg_match(self::$REGEX_PIXEL_ASPECT_RATIO, $this->output, $match);
            $this->pixelAspectRatio = (array_key_exists(1, $match) && array_key_exists(2, $match)) ? ($match[1] / $match[2]) : 0;
        }

        return $this->pixelAspectRatio;
    }

    /**
    * Return the bit rate of the movie or audio file in bits per second.
    *
    * @return int
    */
    public function getBitRate() {
        if ($this->bitRate === null) {
            $match = array();
            preg_match(self::$REGEX_BITRATE, $this->output, $match);
            $this->bitRate = (int) ((array_key_exists(1, $match)) ? ($match[1] * 1000) : 0);
        }

        return $this->bitRate;
    }

    /**
    * Return the bit rate of the video in bits per second.
    *
    * NOTE: This only works for files with constant bit rate.
    *
    * @return int
    */
    public function getVideoBitRate() {
        if ($this->videoBitRate === null) {
            $match = array();
            preg_match(self::$REGEX_VIDEO_BITRATE, $this->output, $match);
            $this->videoBitRate = (int) ((array_key_exists(1, $match)) ? ($match[1] * 1000) : 0);
        }

        return $this->videoBitRate;
    }

    /**
    * Return the audio bit rate of the media file in bits per second.
    *
    * @return int
    */
    public function getAudioBitRate() {
        if ($this->audioBitRate === null) {
            $match = array();
            preg_match(self::$REGEX_AUDIO_BITRATE, $this->output, $match);
            $this->audioBitRate = (int) ((array_key_exists(1, $match)) ? ($match[1] * 1000) : 0);
        }

        return $this->audioBitRate;
    }

    /**
    * Return the audio sample rate of the media file in bits per second.
    *
    * @return int
    */
    public function getAudioSampleRate() {
        if ($this->audioSampleRate === null) {
            $match = array();
            preg_match(self::$REGEX_AUDIO_SAMPLE_RATE, $this->output, $match);
            $this->audioSampleRate = (int) ((array_key_exists(1, $match)) ? $match[1] : 0);
        }

        return $this->audioSampleRate;
    }

    /**
    * Return the current frame index.
    *
    * @return int
    */
    public function getFrameNumber() {
        return ($this->frameNumber == 0) ? 1 : $this->frameNumber;
    }

    /**
    * Return the name of the video codec used to encode this movie as a string.
    *
    * @return string
    */
    public function getVideoCodec() {
        if ($this->videoCodec === null) {
            $match = array();
            preg_match(self::$REGEX_VIDEO_CODEC, $this->output, $match);
            $this->videoCodec = (array_key_exists(1, $match)) ? trim($match[1]) : '';
        }

        return $this->videoCodec;
    }

    /**
    * Return the name of the audio codec used to encode this movie as a string.
    *
    * @return string
    */
    public function getAudioCodec() {
        if ($this->audioCodec === null) {
            $match = array();
            preg_match(self::$REGEX_AUDIO_CODEC, $this->output, $match);
            $this->audioCodec = (array_key_exists(1, $match)) ? trim($match[1]) : '';
        }

        return $this->audioCodec;
    }

    /**
    * Return the number of audio channels in this movie as an integer.
    *
    * @return int
    */
    public function getAudioChannels() {
        if ($this->audioChannels === null) {
            $match = array();
            preg_match(self::$REGEX_AUDIO_CHANNELS, $this->output, $match);
            if (array_key_exists(1, $match)) {
                switch (trim($match[1])) {
                    case 'mono':
                        $this->audioChannels = 1; break;
                    case 'stereo':
                        $this->audioChannels = 2; break;
                    case '5.1':
                        $this->audioChannels = 6; break;
                    case '5:1':
                        $this->audioChannels = 6; break;
                    default:
                        $this->audioChannels = (int) $match[1];
                }
            } else {
                $this->audioChannels = 0;
            }
        }

        return $this->audioChannels;
    }

    /**
    * Return boolean value indicating whether the movie has an audio stream.
    *
    * @return boolean
    */
    public function hasAudio() {
        return (boolean) preg_match(self::$REGEX_HAS_AUDIO, $this->output);
    }

    /**
    * Return boolean value indicating whether the movie has a video stream.
    *
    * @return boolean
    */
    public function hasVideo() {
        return (boolean) preg_match(self::$REGEX_HAS_VIDEO, $this->output);
    }

    /**
    * Returns a frame from the movie as an FFmpegFrame object. Returns false if the frame was not found.
    *
    *   * framenumber - Frame from the movie to return. If no framenumber is specified, returns the next frame of the movie.
    *
    * @param int $framenumber
 	* @param int $width
    * @param int $height
	* @param int $quality
    * @return FFmpegFrame|boolean
    */
	public function getFrame($framenumber = null, $width = null, $height = null, $quality = null) {
    	$framePos = ($framenumber === null) ? $this->frameNumber : (((int) $framenumber) - 1);

		// Frame position out of range
        if (!is_numeric($framePos) || $framePos < 0 || $framePos > $this->getFrameCount()) {
            return false;
        }

	    $frameTime     = round((($framePos / $this->getFrameCount()) * $this->getDuration()), 4);

		$frame = $this->getFrameAtTime($frameTime, $width, $height, $quality);

	    // Increment internal frame number
        if ($framenumber === null) {
            ++$this->frameNumber;
        }

		return $frame;
	}

    /**
     * Returns a frame from the movie as an FFmpegFrame object. Returns false if the frame was not found.
     *
     * @param float $seconds
     * @param int $width
	 * @param int $height
     * @param int $quality
     * @param string $frameFilePath
     * @param array $output
     *
     * @throws Exception
     *
     * @return FFmpegFrame|boolean
     *
    */
	 public function getFrameAtTime($seconds = null, $width = null, $height = null, $quality = null, $frameFilePath = null, &$output = null) {
        // Set frame position for frame extraction
        $frameTime = ($seconds === null) ? 0 : $seconds;

        // time out of range
        if (!is_numeric($frameTime) || $frameTime < 0 || $frameTime > $this->getDuration()) {
			throw(new Exception('Frame time is not in range '.$frameTime.'/'.$this->getDuration().' '.$this->getFilename()));
        }

        if(is_numeric($height) && is_numeric($width)) {
            $image_size = ' -s '.$width.'x'.$height;
        } else {
            $image_size = '';
        }

        if(is_numeric($quality)) {
            $quality = ' -qscale '.$quality;
        } else {
            $quality = '';
        }

		$deleteTmp = false;
        if ($frameFilePath === null) {
            // $frameFilePath = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('frame', true).'.jpg';
            $frameFilePath = 'C:\\wamp64\\www\\temp'.DIRECTORY_SEPARATOR.uniqid('frame', true).'.jpg';
			$deleteTmp = true;
        }

		$output = array();

		// Fast and accurate way to seek. First quick-seek before input up to
		// a point just before the frame, and then accurately seek after input
		// to the exact point.
		// See: http://ffmpeg.org/trac/ffmpeg/wiki/Seeking%20with%20FFmpeg
		if ($frameTime > 30) {
			$seek1 = $frameTime - 30;
			$seek2 = 30;
		} else {
			$seek1 = 0;
			$seek2 = $frameTime;
		}

        exec(implode(' ', array(
            $this->ffmpegBinary,
            '-ss '.'00:00:01',
            '-i '.escapeshellarg($this->movieFile),
            '-vframes 1',
            escapeshellarg($frameFilePath),
        )), $output, $retVar);
        $output = join(PHP_EOL, $output);

        // Cannot write frame to the data storage
        if (!file_exists($frameFilePath)) {
			// Find error in output
			preg_match(self::$REGEX_ERRORS, $output, $errors);
			if ($errors) {
				throw new Exception($errors[0]);
			}
			// Default file not found error
            throw new Exception('TMP image not found/written '. $frameFilePath);
        }

        // Create gdimage and delete temporary image
        switch (getimagesize($frameFilePath)[2]) {
            case IMAGETYPE_GIF:
                $gdImage = imagecreatefromgif($frameFilePath);
                break;
            case IMAGETYPE_PNG:
                $gdImage = imagecreatefrompng($frameFilePath);
                break;
            default:
                $gdImage = imagecreatefromjpeg($frameFilePath);
        }

        if ($deleteTmp && is_writable("C:\\wamp64\\www\\temp")) {
            unlink($frameFilePath);
        }

        $frame = new FFmpegFrame($gdImage, $frameTime);
        imagedestroy($gdImage);

        return $frame;
    }

    /**
    * Returns the next key frame from the movie as an FFmpegFrame object. Returns false if the frame was not found.
    *
    * @return FFmpegFrame|boolean
    */
    public function getNextKeyFrame() {
        return $this->getFrame();
    }

    public function __clone() {
        $this->provider = clone $this->provider;
    }

    public function serialize() {
        $data = serialize(array(
            $this->ffmpegBinary,
            $this->movieFile,
            $this->output,
            $this->frameNumber,
            $this->provider
        ));

        return $data;
    }

    public function unserialize($serialized) {
        list($this->ffmpegBinary,
             $this->movieFile,
             $this->output,
             $this->frameNumber,
             $this->provider
        ) = unserialize($serialized);

    }
}


text:
from django.contrib.auth.views import login
from users.models import User
from django.core.validators import validate_email

def login_view(request):
    return login(request)

redpajama_set_name: RedPajamaGithub


text:
package org.drools.planner.core.constructionheuristic.scope;

import org.drools.planner.core.move.Move;
import org.drools.planner.core.phase.step.AbstractStepScope;

public class ConstructionHeuristicStepScope extends AbstractStepScope {

    private final ConstructionHeuristicSolverPhaseScope phaseScope;

    private Object entity = null;
    private Move step = null;
    private String stepString = null;
    private Move undoStep = null;
    private Long selectedMoveCount = null;

    public ConstructionHeuristicStepScope(ConstructionHeuristicSolverPhaseScope phaseScope) {
        this.phaseScope = phaseScope;
    }

    @Override
    public ConstructionHeuristicSolverPhaseScope getPhaseScope() {
        return phaseScope;
    }

    @Override
    public boolean isBestSolutionCloningDelayed() {
        return true;
    }

    /**
     * Should not be called because {@link #isBestSolutionCloningDelayed} return true
     * @return throws exception
     */
    @Override
    public int getUninitializedVariableCount() {
        throw new UnsupportedOperationException();
    }

    public Object getEntity() {
        return entity;
    }

    public void setEntity(Object entity) {
        this.entity = entity;
    }

    public Move getStep() {
        return step;
    }

    public void setStep(Move step) {
        this.step = step;
    }

    /**
     * @return null if logging level is to high
     */
    public String getStepString() {
        return stepString;
    }

    public void setStepString(String stepString) {
        this.stepString = stepString;
    }

    public Move getUndoStep() {
        return undoStep;
    }

    public void setUndoStep(Move undoStep) {
        this.undoStep = undoStep;
    }

    public Long getSelectedMoveCount() {
        return selectedMoveCount;
    }

    public void setSelectedMoveCount(Long selectedMoveCount) {
        this.selectedMoveCount = selectedMoveCount;
    }

    // ************************************************************************
    // Calculated methods
    // ************************************************************************

}


text:
using Miles.Sample.Application;
using Miles.Sample.Domain.Command.Leagues;
using Miles.Sample.Domain.Command.Teams;
using Miles.Sample.Domain.Read.Leagues;
using Miles.Sample.Domain.Read.Teams;
using Miles.Sample.Web.Models.Leagues;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;

namespace Miles.Sample.Web.Controllers
{
    public class LeaguesController : Controller
    {
        private readonly LeagueManager leagueManager;
        private readonly ILeagueReader leagueReader;
        private readonly ITeamReader teamReader;

        public LeaguesController(
            LeagueManager leagueManager,
            ILeagueReader leagueReader,
            ITeamReader teamReader)
        {
            this.leagueManager = leagueManager;
            this.leagueReader = leagueReader;
            this.teamReader = teamReader;
        }

        // GET: Leagues
        public async Task<ActionResult> Index()
        {
            var leagues = await leagueReader.GetLeaguesAsync();
            return View(new IndexModel
            {
                Leagues = leagues.Select(x => new IndexModelLeague
                {
                    Abbreviation = x.Abbreviation,
                    Name = x.Name
                }).ToList()
            });
        }

        public ActionResult Create()
        {
            return View(new CreateModel());
        }

        [HttpPost]
        public async Task<ActionResult> Create(CreateModel model)
        {
            if (!ModelState.IsValid)
                return View(model);

            await leagueManager.CreateLeagueAsync(
                LeagueAbbreviation.Parse(model.Abbreviation),
                model.Name);

            return RedirectToAction("Index");
        }

        public async Task<ActionResult> Standings(string id)
        {
            var standings = await leagueReader.GetStandingsAsync(id);
            return View(new StandingsModel
            {
                Teams = standings.Select(x => new StandingModelTeam
                {
                    Name = x.Name,
                    Played = x.Played,
                    Wins = x.Wins,
                    Draws = x.Draws,
                    Losses = x.Losses,
                    PointsFor = x.PointsFor,
                    PointsAgainst = x.PointsAgainst,
                    Points = x.Points
                }).ToList()
            });
        }

        public async Task<ActionResult> Fixtures(string id)
        {
            var teams = await leagueReader.GetTeamsAsync(id);
            var fixtures = await leagueReader.GetFixturesAsync(id);
            return View(new FixturesModel
            {
                LeagueId = id,
                Teams = teams,
                Fixtures = fixtures.Select(x => new FixturesModelFixture
                {
                    Id = x.Id,
                    TeamA = x.TeamA,
                    TeamAPoints = x.TeamAPoints,
                    TeamB = x.TeamB,
                    TeamBPoints = x.TeamBPoints,
                    ScheduledDateTime = x.ScheduledDateTime,
                    Active = x.Active,
                    Completed = x.Completed
                }).ToList()
            });
        }

        public async Task<ActionResult> RegisterTeam(string id)
        {
            var teams = await teamReader.GetTeamsNotInLeagueAsync(id);
            return View(new RegisterTeamModel
            {
                LeagueId = id,
                Teams = teams
            });
        }

        [HttpPost]
        public async Task<ActionResult> RegisterTeam(string id, RegisterTeamModel model)
        {
            if (!ModelState.IsValid)
            {
                var teams = await teamReader.GetTeamsNotInLeagueAsync(id);
                model.Teams = teams;
                return View(model);
            }

            var team = TeamAbbreviation.Parse(model.Team);
            var league = LeagueAbbreviation.Parse(id);

            await leagueManager.RegisterTeam(league, team);

            return RedirectToAction("Index");
        }
    }
}


text:
package edu.ynu.lab3;

import java.util.Scanner;

public class ContinueLoop {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner in=new Scanner(System.in);
		for(int count=1;count<=10;count++)
		{
			if(count==5)
			{
				continue;
			}
			System.out.println("count= "+count );
		}

		System.out.println("Used continue statement to skip printing 5 ");
		System.out.println("穆桂海,20121120138");

	}

}


text:
require 'XLearn'

----------------------------------------------------------------------
-- parse options
--
op = OptionParser('%prog [options]')
op:add_option{'-l', '--load', action='store', dest='network',
              help='path to existing [trained] network'}
op:add_option{'-s', '--save', action='store', dest='saveto',
              help='file name to save network [saving is done after each epoch]'}
op:add_option{'-d', '--dataset', action='store', dest='dataset',
              help='path to dataset'}
op:add_option{'-n', '--show', action='store', dest='nb_samples',
              help='show N samples from dataset'}
op:add_option{'-f', '--full', action='store_true', dest='full',
              help='use full dataset (60,000 samples) to train'}
op:add_option{'-r', '--randseed', action='store', dest='seed',
              help='force random seed (if not provided, then initial conditions are random)'}

options,args = op:parse_args()

----------------------------------------------------------------------
-- To save networks
--
os.execute('mkdir -p scratch')

----------------------------------------------------------------------
-- ConvNet to train: CSCSCF
--

local nbClasses = 10
local connex = {6,16,120}
local fanin = {1,6,16}

-- use seed (for repeatable experiments)
if options.seed then
   random.manualSeed(options.seed)
end

-- Build network
convnet = nn.SequentialHessian()
convnet:add(nn.SpatialConvolutionTableHessian(nn.SpatialConvolutionTable:FullTable(1,connex[1]), 5, 5))
convnet:add(nn.TanhHessian())
convnet:add(nn.SpatialSubSamplingHessian(connex[1], 2, 2, 2, 2))
convnet:add(nn.TanhHessian())
convnet:add(nn.SpatialConvolutionTableHessian(nn.SpatialConvolutionTable:FullTable(connex[1],connex[2]), 5, 5))
convnet:add(nn.TanhHessian())
convnet:add(nn.SpatialSubSamplingHessian(connex[2], 2, 2, 2, 2))
convnet:add(nn.TanhHessian())
convnet:add(nn.SpatialConvolutionTableHessian(nn.SpatialConvolutionTable:FullTable(connex[2],connex[3]), 5, 5))
convnet:add(nn.TanhHessian())
convnet:add(nn.SpatialLinearHessian(connex[3],nbClasses))

----------------------------------------------------------------------
-- learning criterion: simple Mean-Square error
--
criterion = nn.MSECriterionHessian()
criterion.sizeAverage = true

----------------------------------------------------------------------
-- trainer: std stochastic trainer
--
trainer = nn.StochasticHessianTrainer(convnet, criterion)
trainer:setShuffle(false)
trainer.hessianUpdateFrequency = 500
trainer.boundOnLearningRates = 0.1
trainer.hessianSamplesUsed = 100
trainer.learningRate = 1e-2
trainer.learningRateDecay = 0
trainer.weightDecay = 1e-5
trainer.maxEpoch = 50

----------------------------------------------------------------------
-- load datasets
--
path_dataset = options.dataset or '../datasets/mnist/'
path_trainData = paths.concat(path_dataset,'train-images-idx3-ubyte')
path_trainLabels = paths.concat(path_dataset,'train-labels-idx1-ubyte')
path_testData = paths.concat(path_dataset,'t10k-images-idx3-ubyte')
path_testLabels = paths.concat(path_dataset,'t10k-labels-idx1-ubyte')

trainData = {}
testData = {}

nbTrainingPatches = 2000
nbTestingPatches = 1000

if options.full then
   nbTrainingPatches = 60000
   nbTestingPatches = 10000
else
   print('# warning: only using 2000 samples to train quickly (use flag --full to use 60000 samples)')
end

-- load data+labels
local data = toolBox.loadIDX(path_trainData):resize(28,28,nbTrainingPatches)
local labels = toolBox.loadIDX(path_trainLabels):resize(nbTrainingPatches)
for i=1,data:size(3) do
   local target = torch.Tensor(1,1,nbClasses):fill(-1)
   target[1][1][labels[i]+1] = 1
   local sample = torch.Tensor(32,32,1):fill(0)
   sample:narrow(1,3,28):narrow(2,3,28):copy(data:narrow(3,i,1)):mul(0.01)
   trainData[i] = {sample,target}
end
trainData.size = function (self) return #self end

-- load data+labels
data = toolBox.loadIDX(path_testData):resize(28,28,nbTestingPatches)
labels = toolBox.loadIDX(path_testLabels):resize(nbTestingPatches)
for i=1,data:size(3) do
   local target = torch.Tensor(1,1,nbClasses):fill(-1)
   target[1][1][labels[i]+1] = 1
   local sample = torch.Tensor(32,32,1):fill(0)
   sample:narrow(1,3,28):narrow(2,3,28):copy(data:narrow(3,i,1)):mul(0.01)
   testData[i] = {sample,target}
end
testData.size = function (self) return #self end

-- display ?
if options.nb_samples then
   local samples = {}
   for i = 1,options.nb_samples do
      table.insert(samples, trainData[i][1])
   end
   image.displayList{images=samples, gui=false}
end

----------------------------------------------------------------------
-- training hooks
--
confusion = nn.ConfusionMatrix(nbClasses)

trainer.hookTrainSample = function(trainer, sample)
   -- update confusion matrix
   confusion:add(trainer.module.output[1][1], sample[2][1][1])
end

trainer.hookTestSample = function(trainer, sample)
   -- update confusion matrix
   confusion:add(trainer.module.output[1][1], sample[2][1][1])
end

trainer.hookTrainEpoch = function(trainer)
   -- print confusion
   print(confusion)
   confusion:zero()

   -- run on test_set
   trainer:test(testData)

   -- print confusion
   print(confusion)
   confusion:zero()

   -- save net
   local filename = paths.concat('scratch', (options.saveto or 'network-mnist')..'-'..os.date("%Y_%m_%d@%X"))
   print('# saving network to '..filename)
   trainer.module:writef(filename)
end

----------------------------------------------------------------------
-- run trainer
--
trainer:train(trainData)


text:
package de.uni.freiburg.iig.telematik.sepia.petrinet.pt;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({ PTPlaceTest.class, PTTransitionTest.class, PTFlowRelationTest.class, PTNetTest.class })
public class AllPTTests {
}


text:
.class Landroid/speech/tts/BlockingAudioTrack;
.super Ljava/lang/Object;
.source "BlockingAudioTrack.java"

# static fields
.field private static final DBG:Z = false

.field private static final MAX_PROGRESS_WAIT_MS:J = 0x9c4L

.field private static final MAX_SLEEP_TIME_MS:J = 0x9c4L

.field private static final MIN_AUDIO_BUFFER_SIZE:I = 0x2000

.field private static final MIN_SLEEP_TIME_MS:J = 0x14L

.field private static final TAG:Ljava/lang/String; = "TTS.BlockingAudioTrack"

# instance fields
.field private mAudioBufferSize:I

.field private final mAudioFormat:I

.field private final mAudioParams:Landroid/speech/tts/TextToSpeechService$AudioOutputParams;

.field private mAudioTrack:Landroid/media/AudioTrack;

.field private mAudioTrackLock:Ljava/lang/Object;

.field private final mBytesPerFrame:I

.field private mBytesWritten:I

.field private final mChannelCount:I

.field private mIsShortUtterance:Z

.field private final mSampleRateInHz:I

.field private mSessionId:I

.field private volatile mStopped:Z

# direct methods
.method constructor <init>(Landroid/speech/tts/TextToSpeechService$AudioOutputParams;III)V
    .locals 3

    const/4 v2, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesWritten:I

    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrackLock:Ljava/lang/Object;

    iput-object p1, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioParams:Landroid/speech/tts/TextToSpeechService$AudioOutputParams;

    iput p2, p0, Landroid/speech/tts/BlockingAudioTrack;->mSampleRateInHz:I

    iput p3, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioFormat:I

    iput p4, p0, Landroid/speech/tts/BlockingAudioTrack;->mChannelCount:I

    iget v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioFormat:I

    invoke-static {v0}, Landroid/media/AudioFormat;->getBytesPerSample(I)I

    move-result v0

    iget v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mChannelCount:I

    mul-int/2addr v0, v1

    iput v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesPerFrame:I

    iput-boolean v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mIsShortUtterance:Z

    iput v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioBufferSize:I

    iput v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesWritten:I

    const/4 v0, 0x0

    iput-object v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;

    iput-boolean v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mStopped:Z

    return-void
.end method

.method private blockUntilCompletion(Landroid/media/AudioTrack;)V
    .locals 14

    const-wide/16 v4, 0x9c4

    iget v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesWritten:I

    iget v3, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesPerFrame:I

    div-int v10, v2, v3

    const/4 v11, -0x1

    const/4 v8, 0x0

    const-wide/16 v6, 0x0

    :goto_0
    invoke-virtual {p1}, Landroid/media/AudioTrack;->getPlaybackHeadPosition()I

    move-result v8

    if-ge v8, v10, :cond_0

    invoke-virtual {p1}, Landroid/media/AudioTrack;->getPlayState()I

    move-result v2

    const/4 v3, 0x3

    if-ne v2, v3, :cond_0

    iget-boolean v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mStopped:Z

    xor-int/lit8 v2, v2, 0x1

    if-eqz v2, :cond_0

    sub-int v2, v10, v8

    mul-int/lit16 v2, v2, 0x3e8

    invoke-virtual {p1}, Landroid/media/AudioTrack;->getSampleRate()I

    move-result v3

    div-int/2addr v2, v3

    int-to-long v0, v2

    const-wide/16 v2, 0x14

    invoke-static/range {v0 .. v5}, Landroid/speech/tts/BlockingAudioTrack;->clip(JJJ)J

    move-result-wide v12

    if-ne v8, v11, :cond_1

    add-long/2addr v6, v12

    cmp-long v2, v6, v4

    if-lez v2, :cond_2

    const-string/jumbo v2, "TTS.BlockingAudioTrack"

    const-string/jumbo v3, "Waited unsuccessfully for 2500ms for AudioTrack to make progress, Aborting"

    invoke-static {v2, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :cond_0
    :goto_1
    return-void

    :cond_1
    const-wide/16 v6, 0x0

    :cond_2
    move v11, v8

    :try_start_0
    invoke-static {v12, v13}, Ljava/lang/Thread;->sleep(J)V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v9

    goto :goto_1
.end method

.method private blockUntilDone(Landroid/media/AudioTrack;)V
    .locals 1

    iget v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesWritten:I

    if-gtz v0, :cond_0

    return-void

    :cond_0
    iget-boolean v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mIsShortUtterance:Z

    if-eqz v0, :cond_1

    invoke-direct {p0}, Landroid/speech/tts/BlockingAudioTrack;->blockUntilEstimatedCompletion()V

    :goto_0
    return-void

    :cond_1
    invoke-direct {p0, p1}, Landroid/speech/tts/BlockingAudioTrack;->blockUntilCompletion(Landroid/media/AudioTrack;)V

    goto :goto_0
.end method

.method private blockUntilEstimatedCompletion()V
    .locals 6

    iget v4, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesWritten:I

    iget v5, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesPerFrame:I

    div-int v3, v4, v5

    mul-int/lit16 v4, v3, 0x3e8

    iget v5, p0, Landroid/speech/tts/BlockingAudioTrack;->mSampleRateInHz:I

    div-int/2addr v4, v5

    int-to-long v0, v4

    :try_start_0
    invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v2

    goto :goto_0
.end method

.method private static final clip(FFF)F
    .locals 1

    cmpg-float v0, p0, p1

    if-gez v0, :cond_0

    :goto_0
    return p1

    :cond_0
    cmpg-float v0, p0, p2

    if-gez v0, :cond_1

    move p1, p0

    goto :goto_0

    :cond_1
    move p1, p2

    goto :goto_0
.end method

.method private static final clip(JJJ)J
    .locals 2

    cmp-long v0, p0, p2

    if-gez v0, :cond_0

    :goto_0
    return-wide p2

    :cond_0
    cmp-long v0, p0, p4

    if-gez v0, :cond_1

    move-wide p2, p0

    goto :goto_0

    :cond_1
    move-wide p2, p4

    goto :goto_0
.end method

.method private createStreamingAudioTrack()Landroid/media/AudioTrack;
    .locals 8

    const/4 v4, 0x1

    iget v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mChannelCount:I

    invoke-static {v1}, Landroid/speech/tts/BlockingAudioTrack;->getChannelConfig(I)I

    move-result v6

    iget v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mSampleRateInHz:I

    iget v5, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioFormat:I

    invoke-static {v1, v6, v5}, Landroid/media/AudioTrack;->getMinBufferSize(III)I

    move-result v7

    const/16 v1, 0x2000

    invoke-static {v1, v7}, Ljava/lang/Math;->max(II)I

    move-result v3

    new-instance v1, Landroid/media/AudioFormat$Builder;

    invoke-direct {v1}, Landroid/media/AudioFormat$Builder;-><init>()V

    invoke-virtual {v1, v6}, Landroid/media/AudioFormat$Builder;->setChannelMask(I)Landroid/media/AudioFormat$Builder;

    move-result-object v1

    iget v5, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioFormat:I

    invoke-virtual {v1, v5}, Landroid/media/AudioFormat$Builder;->setEncoding(I)Landroid/media/AudioFormat$Builder;

    move-result-object v1

    iget v5, p0, Landroid/speech/tts/BlockingAudioTrack;->mSampleRateInHz:I

    invoke-virtual {v1, v5}, Landroid/media/AudioFormat$Builder;->setSampleRate(I)Landroid/media/AudioFormat$Builder;

    move-result-object v1

    invoke-virtual {v1}, Landroid/media/AudioFormat$Builder;->build()Landroid/media/AudioFormat;

    move-result-object v2

    new-instance v0, Landroid/media/AudioTrack;

    iget-object v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioParams:Landroid/speech/tts/TextToSpeechService$AudioOutputParams;

    iget-object v1, v1, Landroid/speech/tts/TextToSpeechService$AudioOutputParams;->mAudioAttributes:Landroid/media/AudioAttributes;

    iget-object v5, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioParams:Landroid/speech/tts/TextToSpeechService$AudioOutputParams;

    iget v5, v5, Landroid/speech/tts/TextToSpeechService$AudioOutputParams;->mSessionId:I

    invoke-direct/range {v0 .. v5}, Landroid/media/AudioTrack;-><init>(Landroid/media/AudioAttributes;Landroid/media/AudioFormat;III)V

    invoke-virtual {v0}, Landroid/media/AudioTrack;->getState()I

    move-result v1

    if-eq v1, v4, :cond_0

    const-string/jumbo v1, "TTS.BlockingAudioTrack"

    const-string/jumbo v4, "Unable to create audio track."

    invoke-static {v1, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    invoke-virtual {v0}, Landroid/media/AudioTrack;->release()V

    const/4 v1, 0x0

    return-object v1

    :cond_0
    iput v3, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioBufferSize:I

    iget-object v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioParams:Landroid/speech/tts/TextToSpeechService$AudioOutputParams;

    iget v1, v1, Landroid/speech/tts/TextToSpeechService$AudioOutputParams;->mVolume:F

    iget-object v4, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioParams:Landroid/speech/tts/TextToSpeechService$AudioOutputParams;

    iget v4, v4, Landroid/speech/tts/TextToSpeechService$AudioOutputParams;->mPan:F

    invoke-static {v0, v1, v4}, Landroid/speech/tts/BlockingAudioTrack;->setupVolume(Landroid/media/AudioTrack;FF)V

    return-object v0
.end method

.method static getChannelConfig(I)I
    .locals 1

    const/4 v0, 0x1

    if-ne p0, v0, :cond_0

    const/4 v0, 0x4

    return v0

    :cond_0
    const/4 v0, 0x2

    if-ne p0, v0, :cond_1

    const/16 v0, 0xc

    return v0

    :cond_1
    const/4 v0, 0x0

    return v0
.end method

.method private static setupVolume(Landroid/media/AudioTrack;FF)V
    .locals 7

    const/4 v6, 0x0

    const/high16 v5, 0x3f800000    # 1.0f

    invoke-static {p1, v6, v5}, Landroid/speech/tts/BlockingAudioTrack;->clip(FFF)F

    move-result v1

    const/high16 v4, -0x40800000    # -1.0f

    invoke-static {p2, v4, v5}, Landroid/speech/tts/BlockingAudioTrack;->clip(FFF)F

    move-result v0

    move v2, v1

    move v3, v1

    cmpl-float v4, v0, v6

    if-lez v4, :cond_2

    sub-float v4, v5, v0

    mul-float v2, v1, v4

    :cond_0
    :goto_0
    invoke-virtual {p0, v2, v3}, Landroid/media/AudioTrack;->setStereoVolume(FF)I

    move-result v4

    if-eqz v4, :cond_1

    const-string/jumbo v4, "TTS.BlockingAudioTrack"

    const-string/jumbo v5, "Failed to set volume"

    invoke-static {v4, v5}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    :cond_1
    return-void

    :cond_2
    cmpg-float v4, v0, v6

    if-gez v4, :cond_0

    add-float v4, v5, v0

    mul-float v3, v1, v4

    goto :goto_0
.end method

.method private static writeToAudioTrack(Landroid/media/AudioTrack;[B)I
    .locals 4

    invoke-virtual {p0}, Landroid/media/AudioTrack;->getPlayState()I

    move-result v2

    const/4 v3, 0x3

    if-eq v2, v3, :cond_0

    invoke-virtual {p0}, Landroid/media/AudioTrack;->play()V

    :cond_0
    const/4 v0, 0x0

    :goto_0
    array-length v2, p1

    if-ge v0, v2, :cond_1

    array-length v2, p1

    invoke-virtual {p0, p1, v0, v2}, Landroid/media/AudioTrack;->write([BII)I

    move-result v1

    if-gtz v1, :cond_2

    :cond_1
    return v0

    :cond_2
    add-int/2addr v0, v1

    goto :goto_0
.end method

# virtual methods
.method getAudioLengthMs(I)J
    .locals 5

    iget v3, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesPerFrame:I

    div-int v2, p1, v3

    mul-int/lit16 v3, v2, 0x3e8

    iget v4, p0, Landroid/speech/tts/BlockingAudioTrack;->mSampleRateInHz:I

    div-int/2addr v3, v4

    int-to-long v0, v3

    return-wide v0
.end method

.method public init()Z
    .locals 3

    invoke-direct {p0}, Landroid/speech/tts/BlockingAudioTrack;->createStreamingAudioTrack()Landroid/media/AudioTrack;

    move-result-object v0

    iget-object v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrackLock:Ljava/lang/Object;

    monitor-enter v1

    :try_start_0
    iput-object v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v1

    if-nez v0, :cond_0

    const/4 v1, 0x0

    return v1

    :catchall_0
    move-exception v2

    monitor-exit v1

    throw v2

    :cond_0
    const/4 v1, 0x1

    return v1
.end method

.method public setNotificationMarkerPosition(I)V
    .locals 2

    iget-object v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrackLock:Ljava/lang/Object;

    monitor-enter v1

    :try_start_0
    iget-object v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;

    if-eqz v0, :cond_0

    iget-object v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;

    invoke-virtual {v0, p1}, Landroid/media/AudioTrack;->setNotificationMarkerPosition(I)I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :cond_0
    monitor-exit v1

    return-void

    :catchall_0
    move-exception v0

    monitor-exit v1

    throw v0
.end method

.method public setPlaybackPositionUpdateListener(Landroid/media/AudioTrack$OnPlaybackPositionUpdateListener;)V
    .locals 2

    iget-object v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrackLock:Ljava/lang/Object;

    monitor-enter v1

    :try_start_0
    iget-object v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;

    if-eqz v0, :cond_0

    iget-object v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;

    invoke-virtual {v0, p1}, Landroid/media/AudioTrack;->setPlaybackPositionUpdateListener(Landroid/media/AudioTrack$OnPlaybackPositionUpdateListener;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :cond_0
    monitor-exit v1

    return-void

    :catchall_0
    move-exception v0

    monitor-exit v1

    throw v0
.end method

.method public stop()V
    .locals 2

    iget-object v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrackLock:Ljava/lang/Object;

    monitor-enter v1

    :try_start_0
    iget-object v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;

    if-eqz v0, :cond_0

    iget-object v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;

    invoke-virtual {v0}, Landroid/media/AudioTrack;->stop()V

    :cond_0
    const/4 v0, 0x1

    iput-boolean v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mStopped:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v1

    return-void

    :catchall_0
    move-exception v0

    monitor-exit v1

    throw v0
.end method

.method public waitAndRelease()V
    .locals 3

    const/4 v0, 0x0

    iget-object v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrackLock:Ljava/lang/Object;

    monitor-enter v1

    :try_start_0
    iget-object v0, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v1

    if-nez v0, :cond_0

    return-void

    :catchall_0
    move-exception v2

    monitor-exit v1

    throw v2

    :cond_0
    iget v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesWritten:I

    iget v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioBufferSize:I

    if-ge v1, v2, :cond_1

    iget-boolean v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mStopped:Z

    xor-int/lit8 v1, v1, 0x1

    if-eqz v1, :cond_1

    const/4 v1, 0x1

    iput-boolean v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mIsShortUtterance:Z

    invoke-virtual {v0}, Landroid/media/AudioTrack;->stop()V

    :cond_1
    iget-boolean v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mStopped:Z

    if-nez v1, :cond_2

    iget-object v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;

    invoke-direct {p0, v1}, Landroid/speech/tts/BlockingAudioTrack;->blockUntilDone(Landroid/media/AudioTrack;)V

    :cond_2
    iget-object v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrackLock:Ljava/lang/Object;

    monitor-enter v1

    const/4 v2, 0x0

    :try_start_1
    iput-object v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    monitor-exit v1

    invoke-virtual {v0}, Landroid/media/AudioTrack;->release()V

    return-void

    :catchall_1
    move-exception v2

    monitor-exit v1

    throw v2
.end method

.method public write([B)I
    .locals 4

    const/4 v1, 0x0

    iget-object v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrackLock:Ljava/lang/Object;

    monitor-enter v2

    :try_start_0
    iget-object v1, p0, Landroid/speech/tts/BlockingAudioTrack;->mAudioTrack:Landroid/media/AudioTrack;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v2

    if-eqz v1, :cond_0

    iget-boolean v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mStopped:Z

    if-eqz v2, :cond_1

    :cond_0
    const/4 v2, -0x1

    return v2

    :catchall_0
    move-exception v3

    monitor-exit v2

    throw v3

    :cond_1
    invoke-static {v1, p1}, Landroid/speech/tts/BlockingAudioTrack;->writeToAudioTrack(Landroid/media/AudioTrack;[B)I

    move-result v0

    iget v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesWritten:I

    add-int/2addr v2, v0

    iput v2, p0, Landroid/speech/tts/BlockingAudioTrack;->mBytesWritten:I

    return v0
.end method


text:
Ext.namespace('Ridechicago.admin.model');

Ridechicago.admin.model.CLASSES_PROXY_URL = '/api/classes';

Ext.regModel('Ridechicago.admin.model.Classes', {
    fields: [
		'id',
		'lastModified',
		'classDays',
		'price',
		'deposit',
		'enrollmentSeats',
		'enrollmentWaitList',
		'enrollmentSeatsUsed',
		'enrollmentWaitListUsed',
		'promotionLimit',
		{name: 'classRegistrationStartDate', type: Ext.data.Types.DATEONLY},
		{name: 'classStartDate', type: Ext.data.Types.DATEONLY},
		{name: 'classEndDate', type: Ext.data.Types.DATEONLY},
		'instructorId',
		'onlineRegistrationStatus',
		'status',
		'notes',
		'classtypeId',
		'classtype',
		'code',
		'longName'
	],

    proxy: {
        type: 'rest',
        url : Ridechicago.admin.model.CLASSES_PROXY_URL,
		appendId: true,

        reader: {
			type: 'json',
			root: 'data'
		}
    }
});


text:
package org.sejda.sambox.pdmodel.interactive.annotation.handlers;

import java.io.IOException;

import org.sejda.sambox.cos.COSArray;
import org.sejda.sambox.cos.COSBase;
import org.sejda.sambox.cos.COSNumber;
import org.sejda.sambox.pdmodel.PDAppearanceContentStream;
import org.sejda.sambox.pdmodel.common.PDRectangle;
import org.sejda.sambox.pdmodel.interactive.annotation.PDAnnotation;
import org.sejda.sambox.pdmodel.interactive.annotation.PDAnnotationMarkup;
import org.sejda.sambox.pdmodel.interactive.annotation.PDAnnotationSquareCircle;
import org.sejda.sambox.pdmodel.interactive.annotation.PDAppearanceStream;
import org.sejda.sambox.pdmodel.interactive.annotation.PDBorderEffectDictionary;
import org.sejda.sambox.pdmodel.interactive.annotation.PDBorderStyleDictionary;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Handler to generate the square annotations appearance.
 *
 */
public class PDSquareAppearanceHandler extends PDAbstractAppearanceHandler
{
    private static final Logger LOG = LoggerFactory.getLogger(PDSquareAppearanceHandler.class);

    public PDSquareAppearanceHandler(PDAnnotation annotation)
    {
        super(annotation);
    }

    @Override
    public void generateAppearanceStreams()
    {
        generateNormalAppearance();
        generateRolloverAppearance();
        generateDownAppearance();
    }

    @Override
    public void generateNormalAppearance()
    {
        float lineWidth = getLineWidth();
        PDAnnotationSquareCircle annotation = (PDAnnotationSquareCircle) getAnnotation();

        try (PDAppearanceContentStream contentStream = getNormalAppearanceAsContentStream())
        {
            boolean hasStroke = contentStream.setStrokingColorOnDemand(getColor());
            boolean hasBackground = contentStream
                    .setNonStrokingColorOnDemand(annotation.getInteriorColor());

            setOpacity(contentStream, annotation.getConstantOpacity());

            contentStream.setBorderLine(lineWidth, annotation.getBorderStyle(),
                    annotation.getBorder());
            PDBorderEffectDictionary borderEffect = annotation.getBorderEffect();

            if (borderEffect != null
                    && borderEffect.getStyle().equals(PDBorderEffectDictionary.STYLE_CLOUDY))
            {
                CloudyBorder cloudyBorder = new CloudyBorder(contentStream,
                        borderEffect.getIntensity(), lineWidth, getRectangle());
                cloudyBorder.createCloudyRectangle(annotation.getRectDifference());
                annotation.setRectangle(cloudyBorder.getRectangle());
                annotation.setRectDifference(cloudyBorder.getRectDifference());
                PDAppearanceStream appearanceStream = annotation.getNormalAppearanceStream();
                appearanceStream.setBBox(cloudyBorder.getBBox());
                appearanceStream.setMatrix(cloudyBorder.getMatrix());
            }
            else
            {
                PDRectangle borderBox = handleBorderBox(annotation, lineWidth);
                if(borderBox != null)
                {

                    contentStream.addRect(borderBox.getLowerLeftX(), borderBox.getLowerLeftY(),
                            borderBox.getWidth(), borderBox.getHeight());
                }
            }

            contentStream.drawShape(lineWidth, hasStroke, hasBackground);
        }
        catch (IOException e)
        {
            LOG.error("Error writing to the content stream", e);
        }
    }

    @Override
    public void generateRolloverAppearance()
    {
        // TODO to be implemented
    }

    @Override
    public void generateDownAppearance()
    {
        // TODO to be implemented
    }

    /**
     * Get the line with of the border.
     *
     * Get the width of the line used to draw a border around the annotation. This may either be specified by the
     * annotation dictionaries Border setting or by the W entry in the BS border style dictionary. If both are missing
     * the default width is 1.
     *
     * @return the line width
     */
    // TODO: according to the PDF spec the use of the BS entry is annotation
    // specific
    // so we will leave that to be implemented by individual handlers.
    // If at the end all annotations support the BS entry this can be handled
    // here and removed from the individual handlers.
    float getLineWidth()
    {
        PDAnnotationMarkup annotation = (PDAnnotationMarkup) getAnnotation();

        PDBorderStyleDictionary bs = annotation.getBorderStyle();

        if (bs != null)
        {
            return bs.getWidth();
        }

        COSArray borderCharacteristics = annotation.getBorder();
        if (borderCharacteristics.size() >= 3)
        {
            COSBase base = borderCharacteristics.getObject(2);
            if (base instanceof COSNumber)
            {
                return ((COSNumber) base).floatValue();
            }
        }

        return 1;
    }
}


text:
using System;
using System.Threading;

namespace Moen
{
    public static class RandomUtil
    {
        static ThreadLocal<Random> r_InstanceOfCurrentThread = new ThreadLocal<Random>(() => new Random(GetSeedOfCurrentThread()));
        public static Random InstanceOfCurrentThread { get { return r_InstanceOfCurrentThread.Value; } }

        public static int GetSeedOfCurrentThread()
        {
            return Thread.CurrentThread.GetHashCode() ^ (int)DateTime.UtcNow.Ticks;
        }
    }
}


text:
<!DOCTYPE html>

  <meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
  <meta name="generator" content="2017.0.4.363"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

  <title>Home</title>

  <link rel="stylesheet" type="text/css" href="css/site_global.css?crc=443350757"/>
  <link rel="stylesheet" type="text/css" href="css/master_a-master.css?crc=4233918928"/>
  <link rel="stylesheet" type="text/css" href="css/index.css?crc=138579267" id="pagesheet"/>

     webkori

   web•ko•ri
   / webkôrē/

     verb

            1.  perform (any action, the precise nature of which is always spectacular) on the web.

                "enthusiasts must webkori to empower their passions"

                synonyms: wondertake, executech, su-perform, ac.com.plish;

      ;
      noun

            1.  (.org) online land of possibilities, where dreamsmiths make reality.

                "Once the  construction of webkori.org is done, your worries are undone"


text:
JQuery (delete)
======

Executing the command `./fiddle.sh "delete" "jquery" "0000"` from the `scripts` directory produces the following output.

      H o u s e
      oooooooooooo  o8o        .o8        .o8  oooo
       888       8  `"'        888        888   888
       888         oooo   .oooo888   .oooo888   888   .ooooo.
       888oooo8     888  d88   888  d88   888   888  d88   88b
       888          888  888   888  888   888   888  888ooo888
       888          888  888   888  888   888   888  888    .o
      o888o        o888o  Y8bod88P   Y8bod88P  o888o  Y8bod8P

      FIDDLE.SH
      FIDDLE-DELETE.SH

      fiddle type:	jquery
      fiddle name:	fiddle-0000-Template

      Are you sure you want to delete this fiddle? [Y/n]

Enter `Y` and press [Enter].  This will produce the following output:

        FIDDLE-INDEX.SH
        09-29-16
        Done. All "jquery" fiddles have been re-indexed.
        The "fiddle-0000-Template" jquery fiddle has been deleted successfully.

Note, when a `jquery` fiddle is deleted, the `fiddle.sh index jquery` command is automatically initiated.  This
command will remove the reference to the fiddle from the root jquery [index.html](index.html) page.


text:
(function($) {
    CKEDITOR.plugins.add( 'filerimage', {
        lang: 'en,it',
        icons: 'filerimage',
        init: function( editor ) {
            lang = editor.lang.filerimage,
            editor.addCommand( 'filerImageDialog', new CKEDITOR.dialogCommand( 'filerImageDialog' ) );

            editor.ui.addButton( 'Filer Image', {
                label: lang.name,
                command: 'filerImageDialog',
                toolbar: 'insert',
                icon: 'filerimage'
            });

            if ( editor.contextMenu ) {
                editor.addMenuGroup( 'Filer' );
                editor.addMenuItem( 'imageItem', {
                    label: lang.edit,
                    icon: this.path + 'icons/filerimage.png',
                    command: 'filerImageDialog',
                    group: 'Filer'
                });

                editor.contextMenu.addListener( function( element ) {
                    if ( element.getAscendant( 'img', true ) ) {
                        return { imageItem: CKEDITOR.TRISTATE_OFF };
                    }
                });
            }

            CKEDITOR.dialog.add( 'filerImageDialog', this.path + 'dialogs/filerImageDialog.js' );

            var dialog = CKEDITOR.dialog.getCurrent();

            $.get('/ckeditor_filer/url_reverse/', { url_name: "admin:filer-directory_listing-last"}, function(data) {

            });
        }
    });
})(django.jQuery);


text:
/*============================================================================

*** FIX.

This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
Arithmetic Package, Release 2b.

Written by John R. Hauser.  This work was made possible in part by the
International Computer Science Institute, located at Suite 600, 1947 Center
Street, Berkeley, California 94704.  Funding was partially provided by the
National Science Foundation under grant MIP-9311980.  The original version
of this code was written as part of a project to build a fixed-point vector
processor in collaboration with the University of California at Berkeley,
overseen by Profs. Nelson Morgan and John Wawrzynek.  More information
is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
arithmetic/SoftFloat.html'.

THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort has
been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.

Derivative works are acceptable, even for commercial purposes, so long as
(1) the source code for the derivative work includes prominent notice that
the work is derivative, and (2) the source code includes prominent notice with
these four paragraphs for those parts of this code that are retained.

=============================================================================*/

/*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/
#define LITTLEENDIAN

#ifndef UINT64_C
# define UINT64_C(x) (x ## ULL)
# define INT64_C(x) (x ## LL)
#endif


text:
package hudson;

import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;
import jenkins.model.Jenkins;

/**
 * Marker interface that designates extensible components
 * in Jenkins that can be implemented by plugins.
 *
 *

 * See respective interfaces/classes for more about how to register custom
 * implementations to Jenkins. See {@link Extension} for how to have
 * Jenkins auto-discover your implementations.
 *
 *

 * This interface is used for auto-generating
 * documentation.
 *
 * @author Kohsuke Kawaguchi
 * @see Plugin
 * @see Extension
 */
public interface ExtensionPoint {
    /**
     * Used by designers of extension points (direct subtypes of {@link ExtensionPoint}) to indicate that
     * the legacy instances are scoped to {@link Jenkins} instance. By default, legacy instances are
     * static scope.
     */
    @Target(TYPE)
    @Retention(RUNTIME)
    @interface LegacyInstancesAreScopedToHudson {}
}


text:
namespace WalletGui {

TransactionDetailsDialog::TransactionDetailsDialog(const QModelIndex& _index, QWidget* _parent) : QDialog(_parent),
  m_ui(new Ui::TransactionDetailsDialog), m_detailsTemplate(
    "<meta name=\"qrichtext\" content=\"1\" />\n"
    "Status: %1

\n"
    "Date: %2

\n"
    "To: %4

\n"
    "Amount: %5

\n"
    "Fee: %6

\n"
    "Transaction hash: %8

\n"
    "Messages:

%9

\n"
    "%10"
    "") {
  m_ui->setupUi(this);

  QModelIndex transactionIndex = TransactionsModel::instance().index(_index.data(TransactionsModel::ROLE_ROW).toInt(),
    _index.data(TransactionsModel::ROLE_ROW).toInt());

  quint64 numberOfConfirmations = transactionIndex.data(TransactionsModel::ROLE_NUMBER_OF_CONFIRMATIONS).value<quint64>();
  QString amountText = transactionIndex.sibling(transactionIndex.row(), TransactionsModel::COLUMN_AMOUNT).data().toString() + " " +
    CurrencyAdapter::instance().getCurrencyTicker().toUpper();
  QString feeText = CurrencyAdapter::instance().formatAmount(transactionIndex.data(TransactionsModel::ROLE_FEE).value<quint64>()) + " " +
    CurrencyAdapter::instance().getCurrencyTicker().toUpper();
  QStringList messageList = _index.data(TransactionsModel::ROLE_MESSAGES).toStringList();

  for (quint32 i = 0; i < messageList.size(); ++i) {
    messageList[i] = messageList[i].toHtmlEscaped().replace("\n", "
");
  }

  CryptoNote::DepositId depositId = transactionIndex.data(TransactionsModel::ROLE_DEPOSIT_ID).value<CryptoNote::DepositId>();

  QString depositInfo;
  if (depositId != CryptoNote::WALLET_LEGACY_INVALID_DEPOSIT_ID) {
    QModelIndex depositIndex = DepositModel::instance().index(depositId, 0);
    QString depositAmount = depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_AMOUNT).data().toString() + " " +
      CurrencyAdapter::instance().getCurrencyTicker().toUpper();
    QString depositInterest = depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_INTEREST).data().toString() + " " +
      CurrencyAdapter::instance().getCurrencyTicker().toUpper();
    QString depositSum = depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_SUM).data().toString() + " " +
      CurrencyAdapter::instance().getCurrencyTicker().toUpper();
    QString depositInfoTemplate =
      "Deposit info:

\n"
      "Status: %1

\n"
      "Amount: %2

\n"
      "Interest: %3

\n"
      "Sum: %4

\n"
      "Year interest rate: %5

\n"
      "Term: %6

\n"
      "Unlock height: %7

\n"
      "Expected unlock time: %8

\n"
      "Creating transaction: %9

\n"
      "Creating height: %10

\n"
      "Creating time: %11

\n"
      "Spending transaction: %12

\n"
      "Spending height: %13

\n"
      "Spending time: %14

\n";
      depositInfo = depositInfoTemplate.
          arg(depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_STATE).data().toString()).
          arg(depositAmount).arg(depositInterest).arg(depositSum).
          arg(depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_YEAR_RATE).data().toString()).
          arg(depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_TERM).data().toString()).
          arg(depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_UNLOCK_HEIGHT).data().toString()).
          arg(depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_UNLOCK_TIME).data().toString()).
          arg(depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_CREATRING_TRANSACTION_HASH).data().toString()).
          arg(depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_CREATING_HEIGHT).data().toString()).
          arg(depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_CREATING_TIME).data().toString()).
          arg(depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_SPENDING_TRANSACTION_HASH).data().toString()).
          arg(depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_SPENDING_HEIGHT).data().toString()).
          arg(depositIndex.sibling(depositIndex.row(), DepositModel::COLUMN_SPENDING_TIME).data().toString());
  }

  m_ui->m_detailsBrowser->setHtml(m_detailsTemplate.arg(QString("%1 confirmations").arg(numberOfConfirmations)).
    arg(transactionIndex.sibling(transactionIndex.row(), TransactionsModel::COLUMN_DATE).data().toString()).arg(transactionIndex.sibling(transactionIndex.row(),
    TransactionsModel::COLUMN_ADDRESS).data().toString()).arg(amountText).arg(feeText).
    arg(transactionIndex.sibling(transactionIndex.row(), TransactionsModel::COLUMN_HASH).data().toString()).
    arg(messageList.join("

=========

")).
    arg(depositInfo));
}

TransactionDetailsDialog::~TransactionDetailsDialog() {
}

}


text:
<?php

class Anagrafica extends Eloquent {

	protected $table = 'anagrafiche';
	protected $softDelete = true;

   	public function fatturaCliente()
	{
		return $this->hasMany('FatturaCliente');
	}

}


text:
(function (angular, buildfire, location) {
    'use strict';
    //created mediaCenterWidget module
    angular
        .module('soundCloudContentServices', ['soundCloudContentEnums'])
        .provider('Buildfire', [function () {
            this.$get = function () {
                return buildfire;
            };
        }])
        .service('soundCloudAPI', ['$http', '$q', function ($http, $q) {
            var that = this;

            that.verify = function (clientId,link) {
                    SC.initialize({
                        client_id: clientId
                    });

                    return SC.resolve(link);
            };

        }])
        .factory("DB", ['Buildfire', '$q', 'MESSAGES', 'CODES', function (Buildfire, $q, MESSAGES, CODES) {
            function DB(tagName) {
                this._tagName = tagName;
            }
            DB.prototype.get = function () {
                var that = this;
                var deferred = $q.defer();
                Buildfire.datastore.get(that._tagName, function (err, result) {
                    if (err && err.code == CODES.NOT_FOUND) {
                        return deferred.resolve();
                    }
                    else if (err) {
                        return deferred.reject(err);
                    }
                    else {
                        return deferred.resolve(result);
                    }
                });
                return deferred.promise;
            };
            DB.prototype.save = function (item) {
                var that = this;
                var deferred = $q.defer();
                if (typeof item == 'undefined') {
                    return deferred.reject(new Error(MESSAGES.ERROR.DATA_NOT_DEFINED));
                }
                Buildfire.datastore.save(item, that._tagName, function (err, result) {
                    if (err) {
                        return deferred.reject(err);
                    }
                    else if (result) {
                        return deferred.resolve(result);
                    } else {
                        return deferred.reject(new Error(MESSAGES.ERROR.NOT_FOUND));
                    }
                });
                return deferred.promise;
            };
            return DB;
        }]);
})(window.angular, window.buildfire, window.location);


text:
FROM debian:latest
MAINTAINER raccoon<a60814billy@gmail.com>

RUN apt-get update
RUN apt-get install vim apache2 php5 \
	php5-mcrypt php5-readline php5-memcache php5-curl php5-gd \
	php5-sqlite php5-mysql php5-pgsql \
	libapache2-mod-php5 mysql-client -y

RUN apt-get autoremove --purge -y
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*

ADD start.sh /start.sh
ADD php.ini /etc/php5/apache2/
ADD envvars /etc/apache2/
RUN chmod +x start.sh
RUN useradd -u 1000 -M -s /bin/false -G www-data raccoon

EXPOSE 80
VOLUME ["/var/www/html", "/var/log/apache2"]
WORKDIR /
CMD ["/start.sh"]


text:
<?xml version="1.0" encoding="UTF-8"?>
<model>
  <entity name="aggregation" root="true">
    <entity-ref name="aggregation-rule" type="list" names="aggregation-rules" />
  </entity>
  <entity name="aggregation-rule">
    <attribute name="type" value-type="int" />
    <attribute name="domain" value-type="String" />
    <attribute name="pattern" value-type="String" />
    <attribute name="sample" value-type="String" />
    <attribute name="display-name" value-type="String" />
    <attribute name="creation-date" value-type="Date" format="yyyy-MM-dd HH:mm:ss" />
  </entity>
</model>


text:
package org.apache.carbondata.datamap.examples;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.log4j.Logger;

import org.apache.carbondata.common.logging.LogServiceFactory;
import org.apache.carbondata.core.datamap.DataMapDistributable;
import org.apache.carbondata.core.datamap.DataMapMeta;
import org.apache.carbondata.core.datamap.Segment;
import org.apache.carbondata.core.datamap.dev.DataMapBuilder;
import org.apache.carbondata.core.datamap.dev.DataMapModel;
import org.apache.carbondata.core.datamap.dev.DataMapWriter;
import org.apache.carbondata.core.datamap.dev.cgdatamap.CoarseGrainDataMap;
import org.apache.carbondata.core.datamap.dev.cgdatamap.CoarseGrainDataMapFactory;
import org.apache.carbondata.core.datastore.block.SegmentProperties;
import org.apache.carbondata.core.features.TableOperation;
import org.apache.carbondata.core.memory.MemoryException;
import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
import org.apache.carbondata.core.metadata.schema.table.DataMapSchema;
import org.apache.carbondata.core.metadata.schema.table.column.CarbonColumn;
import org.apache.carbondata.core.scan.filter.intf.ExpressionType;
import org.apache.carbondata.core.util.path.CarbonTablePath;
import org.apache.carbondata.events.Event;

/**
 * Min Max DataMap Factory
 */
public class MinMaxIndexDataMapFactory extends CoarseGrainDataMapFactory {
  private static final Logger LOGGER = LogServiceFactory.getLogService(
      MinMaxIndexDataMapFactory.class.getName());
  private DataMapMeta dataMapMeta;
  private String dataMapName;
  private AbsoluteTableIdentifier identifier;

  public MinMaxIndexDataMapFactory(CarbonTable carbonTable, DataMapSchema dataMapSchema) {
    super(carbonTable, dataMapSchema);

    // this is an example for datamap, we can choose the columns and operations that
    // will be supported by this datamap. Furthermore, we can add cache-support for this datamap.

    // columns that will be indexed
    List<CarbonColumn> allColumns = getCarbonTable().getCreateOrderColumn();

    // operations that will be supported on the indexed columns
    List<ExpressionType> optOperations = new ArrayList<>();
    optOperations.add(ExpressionType.EQUALS);
    optOperations.add(ExpressionType.GREATERTHAN);
    optOperations.add(ExpressionType.GREATERTHAN_EQUALTO);
    optOperations.add(ExpressionType.LESSTHAN);
    optOperations.add(ExpressionType.LESSTHAN_EQUALTO);
    optOperations.add(ExpressionType.NOT_EQUALS);
    LOGGER.error("MinMaxDataMap support operations: " + StringUtils.join(optOperations, ", "));
    this.dataMapMeta = new DataMapMeta(allColumns, optOperations);
  }

  /**
   * createWriter will return the MinMaxDataWriter.
   *
   * @param segment
   * @param shardName
   * @return
   */
  @Override
  public DataMapWriter createWriter(Segment segment, String shardName,
      SegmentProperties segmentProperties) {
    return new MinMaxDataWriter(getCarbonTable(), getDataMapSchema(), segment, shardName,
        dataMapMeta.getIndexedColumns());
  }

  @Override
  public DataMapBuilder createBuilder(Segment segment, String shardName,
      SegmentProperties segmentProperties) throws IOException {
    return null;
  }

  /**
   * getDataMaps Factory method Initializes the Min Max Data Map and returns.
   *
   * @param segment
   * @return
   * @throws IOException
   */
  @Override
  public List<CoarseGrainDataMap> getDataMaps(Segment segment)
      throws IOException {
    List<CoarseGrainDataMap> dataMapList = new ArrayList<>();
    // Form a dataMap of Type MinMaxIndexDataMap.
    MinMaxIndexDataMap dataMap = new MinMaxIndexDataMap();
    try {
      dataMap.init(new DataMapModel(
          MinMaxDataWriter.genDataMapStorePath(
              CarbonTablePath.getSegmentPath(
                  identifier.getTablePath(), segment.getSegmentNo()),
              dataMapName), new Configuration(false)));
    } catch (MemoryException ex) {
      throw new IOException(ex);
    }
    dataMapList.add(dataMap);
    return dataMapList;
  }

  /**
   * @param segment
   * @return
   */
  @Override
  public List<DataMapDistributable> toDistributable(Segment segment) {
    return null;
  }

  /**
   * Clear the DataMap.
   *
   * @param segment
   */
  @Override
  public void clear(String segmentNo) {
  }

  /**
   * Clearing the data map.
   */
  @Override
  public void clear() {
  }

  @Override
  public List<CoarseGrainDataMap> getDataMaps(DataMapDistributable distributable)
      throws IOException {
    return getDataMaps(distributable.getSegment());
  }

  @Override
  public void fireEvent(Event event) {

  }

  @Override
  public DataMapMeta getMeta() {
    return this.dataMapMeta;
  }

  @Override
  public void deleteDatamapData(Segment segment) throws IOException {

  }

  @Override
  public void deleteDatamapData() {

  }

  @Override
  public boolean willBecomeStale(TableOperation operation) {
    return false;
  }
}


text:
package Fatal;

use 5.006_001;
use Carp;
use strict;
our($AUTOLOAD, $Debug, $VERSION);

$VERSION = 1.06;

$Debug = 0 unless defined $Debug;

sub import {
    my $self = shift(@_);
    my($sym, $pkg);
    my $void = 0;
    $pkg = (caller)[0];
    foreach $sym (@_) {
	if ($sym eq ":void") {
	    $void = 1;
	}
	else {
	    &_make_fatal($sym, $pkg, $void);
	}
    }
};

sub AUTOLOAD {
    my $cmd = $AUTOLOAD;
    $cmd =~ s/.*:://;
    &_make_fatal($cmd, (caller)[0]);
    goto &$AUTOLOAD;
}

sub fill_protos {
  my $proto = shift;
  my ($n, $isref, @out, @out1, $seen_semi) = -1;
  while ($proto =~ /\S/) {
    $n++;
    push(@out1,[$n,@out]) if $seen_semi;
    push(@out, $1 . "{\$_[$n]}"), next if $proto =~ s/^\s*\\([\@%\$\&])//;
    push(@out, "\$_[$n]"), next if $proto =~ s/^\s*([_*\$&])//;
    push(@out, "\@_[$n..\$#_]"), last if $proto =~ s/^\s*(;\s*)?\@//;
    $seen_semi = 1, $n--, next if $proto =~ s/^\s*;//; # XXXX ????
    die "Unknown prototype letters: \"$proto\"";
  }
  push(@out1,[$n+1,@out]);
  @out1;
}

sub write_invocation {
  my ($core, $call, $name, $void, @argvs) = @_;
  if (@argvs == 1) {		# No optional arguments
    my @argv = @{$argvs[0]};
    shift @argv;
    return "\t" . one_invocation($core, $call, $name, $void, @argv) . ";\n";
  } else {
    my $else = "\t";
    my (@out, @argv, $n);
    while (@argvs) {
      @argv = @{shift @argvs};
      $n = shift @argv;
      push @out, "$ {else}if (\@_ == $n) {\n";
      $else = "\t} els";
      push @out,
          "\t\treturn " . one_invocation($core, $call, $name, $void, @argv) . ";\n";
    }
    push @out, <<EOC;
	}
	die "$name(\@_): Do not expect to get ", scalar \@_, " arguments";
EOC
    return join '', @out;
  }
}

sub one_invocation {
  my ($core, $call, $name, $void, @argv) = @_;
  local $" = ', ';
  if ($void) {
    return qq/(defined wantarray)?$call(@argv):
              $call(@argv) || croak "Can't $name(\@_)/ .
           ($core ? ': $!' : ', \$! is \"$!\"') . '"'
  } else {
    return qq{$call(@argv) || croak "Can't $name(\@_)} .
           ($core ? ': $!' : ', \$! is \"$!\"') . '"';
  }
}

sub _make_fatal {
    my($sub, $pkg, $void) = @_;
    my($name, $code, $sref, $real_proto, $proto, $core, $call);
    my $ini = $sub;

    $sub = "${pkg}::$sub" unless $sub =~ /::/;
    $name = $sub;
    $name =~ s/.*::// or $name =~ s/^&//;
    print "# _make_fatal: sub=$sub pkg=$pkg name=$name void=$void\n" if $Debug;
    croak "Bad subroutine name for Fatal: $name" unless $name =~ /^\w+$/;
    if (defined(&$sub)) {	# user subroutine
	$sref = \&$sub;
	$proto = prototype $sref;
	$call = '&$sref';
    } elsif ($sub eq $ini && $sub !~ /^CORE::GLOBAL::/) {
	# Stray user subroutine
	die "$sub is not a Perl subroutine"
    } else {			# CORE subroutine
        $proto = eval { prototype "CORE::$name" };
	die "$name is neither a builtin, nor a Perl subroutine"
	  if $@;
	die "Cannot make the non-overridable builtin $name fatal"
	  if not defined $proto;
	$core = 1;
	$call = "CORE::$name";
    }
    if (defined $proto) {
      $real_proto = " ($proto)";
    } else {
      $real_proto = '';
      $proto = '@';
    }
    $code = <<EOS;
sub$real_proto {
	local(\$", \$!) = (', ', 0);
EOS
    my @protos = fill_protos($proto);
    $code .= write_invocation($core, $call, $name, $void, @protos);
    $code .= "}\n";
    print $code if $Debug;
    {
      no strict 'refs'; # to avoid: Can't use string (...) as a symbol ref ...
      $code = eval("package $pkg; use Carp; $code");
      die if $@;
      no warnings;   # to avoid: Subroutine foo redefined ...
      *{$sub} = $code;
    }
}

1;

__END__

=head1 NAME

Fatal - replace functions with equivalents which succeed or die

=head1 SYNOPSIS

    use Fatal qw(open close);

    sub juggle { . . . }
    import Fatal 'juggle';

=head1 DESCRIPTION

C<Fatal> provides a way to conveniently replace functions which normally
return a false value when they fail with equivalents which raise exceptions
if they are not successful.  This lets you use these functions without
having to test their return values explicitly on each call.  Exceptions
can be caught using C<eval{}>.  See L<perlfunc> and L<perlvar> for details.

The do-or-die equivalents are set up simply by calling Fatal's
C<import> routine, passing it the names of the functions to be
replaced.  You may wrap both user-defined functions and overridable
CORE operators (except C<exec>, C<system> which cannot be expressed
via prototypes) in this way.

If the symbol C<:void> appears in the import list, then functions
named later in that import list raise an exception only when
these are called in void context--that is, when their return
values are ignored.  For example

	use Fatal qw/:void open close/;

	# properly checked, so no exception raised on error
	if(open(FH, "< /bogotic") {
		warn "bogo file, dude: $!";
	}

	# not checked, so error raises an exception
	close FH;

=head1 BUGS

You should not fatalize functions that are called in list context, because this
module tests whether a function has failed by testing the boolean truth of its
return value in scalar context.

=head1 AUTHOR

Lionel Cons (CERN).

Prototype updates by Ilya Zakharevich <ilya@math.ohio-state.edu>.

=cut


text:
package org.jretty.log;

public class LogFactoryTest {

}