text:
(function () {
  'use strict';
  (function(i,s,o,g,r,a,m){i['CrDXObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://storage.googleapis.com/chops-feedback/feedback.js','crdx');
  crdx('setFeedbackButtonLink', 'https://bugs.chromium.org/p/chromium/issues/entry?components=Infra%3ELUCI%3EArtifacts%3ELogging');

  utils.setLocale();
  $(document).tooltip({
    show: false,
    hide: false
  });

  function setMode(mode) {
    document.cookie = `html-mode=${mode}; path=/`;
    location.reload(true);  // Changing modes require a force refresh.
  }

  $("#to-full").click(() => setMode("full"));
  $("#to-lite").click(() => setMode("lite"));
}());


text:
############################################################################################################################################
# Script par obtener el tamaño de las BDs de Contenidos
# Parámetros necesarios: N/A
############################################################################################################################################

If ((Get-PSSnapIn -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
{ Add-PSSnapIn -Name Microsoft.SharePoint.PowerShell }

#Hacemos un buen uso de PowerShell para no penalizar el rendimiento
$host.Runspace.ThreadOptions = "ReuseThread"

#Definición de la función que obtiene el tamaño de las BD's de contenidos
function Get-ContentDBSizes
{
    try
    {
        $spWebApps = Get-SPWebApplication -IncludeCentralAdministration
        foreach($spWebApp in $spWebApps)
        {
            #$spWebApp.Name
            $ContentDatabases = $spWebApp.ContentDatabases
            foreach($ContentDatabase in $ContentDatabases)
            {
                $ContentDatabaseSize = [Math]::Round(($ContentDatabase.disksizerequired/1GB),2)
                $ContentDatabaseInfo= $spWebApp.DisplayName + "," + $ContentDatabase.Name + "," + $ContentDatabaseSize + " GB"
                $ContentDatabaseInfo
                #Write-Host " * "  $spWebApp.DisplayName "-" $ContentDatabase.Name ": " $ContentDatabaseSize " GB"
            }
        }
    }
    catch [System.Exception]
    {
        write-host -f red $_.Exception.ToString()
    }
}

Start-SPAssignment –Global
Get-ContentDBSizes > ContentDBs.csv
Stop-SPAssignment –Global
Remove-PsSnapin Microsoft.SharePoint.PowerShell

redpajama_set_name: RedPajamaGithub


text:
var config       = require('../config')
if(!config.tasks.css) return

var gulp         = require('gulp')
var sassLint     = require('gulp-sass-lint')
var browserSync  = require('browser-sync')
var sass         = require('gulp-sass')
var sourcemaps   = require('gulp-sourcemaps')
var handleErrors = require('../lib/handleErrors')
var autoprefixer = require('gulp-autoprefixer')
var path         = require('path')

var paths = {
  src: path.join(config.root.src, config.tasks.css.src, '/**/*.{' + config.tasks.css.extensions + '}'),
  dest: path.join(config.root.dest, config.tasks.css.dest)
}

var cssTask = function () {
  return gulp.src(paths.src)
    .pipe(sourcemaps.init())
    .pipe(sass(config.tasks.css.sass))
    // .pipe(sassLint())
    // .pipe(sassLint.format())
    // .pipe(sassLint.failOnError())
    .on('error', handleErrors)
    .pipe(autoprefixer(config.tasks.css.autoprefixer))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(paths.dest))
    .pipe(browserSync.stream())
}

gulp.task('css', cssTask)
module.exports = cssTask


text:
import { shallow, mount } from 'enzyme'

import Icon from '../../../src/Icon.js'

describe('Icon Spec', () => {
  it('should generate a i tag', () => {
    const wrapper1 = shallow(<Icon/>)

    expect(wrapper1).to.have.tagName('i')
  })

  it('should generate a i tag with default icon prefix', () => {
    const wrapper1 = shallow(<Icon icon='foo' />)

    expect(wrapper1).to.have.className('icon-foo')
  })

  it('should generate correct size-css with default icon prefix by number or string', () => {
    const wrapper1 = shallow(<Icon size='3' icon='home' />)
    const wrapper2 = shallow(<Icon size={4} icon='home' />)

    expect(wrapper1).to.have.className('icon-3x')
    expect(wrapper2).to.have.className('icon-4x')
  })

  it('should generate correct size-css with default icon prefix by multiple', () => {
    const wrapper1 = shallow(<Icon size='3x' icon='foo' />)
    const wrapper2 = shallow(<Icon size='4x' icon='foo' />)

    expect(wrapper1).to.have.className('icon-3x')
    expect(wrapper2).to.have.className('icon-4x')
  })

  it('should generate correct font-size without icon', () => {
    const wrapper1 = shallow(<Icon size={3}></Icon>)
    const wrapper2 = shallow(<Icon size={4}></Icon>)

    expect(wrapper1.find({ style: { fontSize: '3rem' } })).to.have.length(1)
    expect(wrapper2.find({ style: { fontSize: '4rem' } })).to.have.length(1)
  })

  it('should append icon-spin class by spin prop', () => {
    const wrapper1 = shallow(<Icon icon='foo' spin />)

    expect(wrapper1).to.have.className('icon-spin')
  })

  it('should use native prefix by setPrefix()', () => {
    Icon.setPrefix('fa')

    const wrapper1 = shallow(<Icon icon='foo' />)

    expect(wrapper1).to.have.className('fa-foo')
  })
})


text:
package hello.models;

import leap.web.security.user.UserDetails;

public class UserDetailsImpl implements UserDetails {

    protected String id;
    protected String name;
    protected String loginName;
    protected String password;

    @Override
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    @Override
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}


text:
.. Django-Jython documentation master file, created by
   sphinx-quickstart on Tue Oct 27 19:45:12 2009.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to Django-Jython's documentation!
=========================================

Django-Jython is a collection of tools to use the `Django
<http://www.djangoproject.com/>`_ web framework on top of `Jython
<http://www.jython.org>`_.

It allows you to mix the awesome development speed of Django with the richness
and robustness of the Java platform.

Contents:

.. toctree::
   :maxdepth: 2

   quickstart
   database-backends
   war-deployment
   xml-test-runner
   release-notes


text:
package fake

import (
	v1alpha1 "github.com/openshift/brokersdk/pkg/client/clientset_generated/clientset/typed/broker/v1alpha1"
	rest "k8s.io/client-go/rest"
	testing "k8s.io/client-go/testing"
)

type FakeBrokerV1alpha1 struct {
	*testing.Fake
}

func (c *FakeBrokerV1alpha1) ServiceInstances(namespace string) v1alpha1.ServiceInstanceInterface {
	return &FakeServiceInstances{c, namespace}
}

// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeBrokerV1alpha1) RESTClient() rest.Interface {
	var ret *rest.RESTClient
	return ret
}


text:
ListeningSocketHandler
======================

The opposite of logging.handlers.SocketHandler

.. image:: https://travis-ci.org/bencord0/ListeningSocketHandler.png?branch=master

Installation
------------
    $ pip install ListeningSocketHandler

Example Usage
-------------

1. Create a logger

    >>> import logging
    >>> from ListeningSocketHandler import ListeningSocketHandler
    >>> log = logging.getLogger()
    >>> log.setLevel(logging.DEBUG)

2. Create some handlers

    A normal StreamHandler that outputs to stderr and
    a ListeningSocketHandler bound to port 12345.

    >>> sh = logging.StreamHandler()
    >>> sh.setLevel(logging.WARN)
    >>> lh = ListeningSocketHandler(12345)
    >>> lh.setLevel(logging.DEBUG)

3. Add handlers to the logger

    >>> log.addHandler(sh)
    >>> log.addHandler(lh)

4. Log some things

    >>> log.info("An informational message")
    >>> log.warn("A warning message")
    A warning message

5. Connect to the logger, and log more detailed events

    In a new shell, connect to the logger.

    $ telnet localhost 12345

    Back in python, use different log levels.

    >>> log.critical("A critical message")
    A critical message
    >>> log.debug("A debugging message")

    Watch the detailed stream in the telnet session.

    A critical message
    A debugging message

Making it work with Django
--------------------------

1. Install the handler

    $ pip install LoggingSocketHandler

2. Add the ListeningSocketHandler to the LOGGING dict

    LOGGING = {
        ...
        'handlers': {
            'listeningsocket': {
                'level': 'DEBUG',
                'class': 'ListeningSocketHandler.ListeningSocketHandler',
            },
            ...
        },
        'loggers': {
            'myapp': {
                'handlers': ['listeningsocket'],
                'level': 'DEBUG',
                'propagate': True,
            },
            ...
        },
    }

3. Run the server, and check the logs

    $ ./manage.py runserver
    ListeningSocketHandler on port: 40955
    ListeningSocketHandler on port: 49830
    Validating models...

    0 errors found
    Django version 1.4.2, using settings 'myproject.settings'
    Development server is running at http://127.0.0.1:8000/
    Quit the server with CONTROL-C.

the default runserver is stupid, use foreman instead.

    $ foreman start
    17:55:11 web.1     | started with pid 24927
    17:55:13 web.1     | ListeningSocketHandler on port: 36688
    17:55:13 web.1     | Validating models...
    17:55:13 web.1     |
    17:55:13 web.1     | 0 errors found
    17:55:13 web.1     | Django version 1.4.2, using settings 'myproject.settings'
    17:55:13 web.1     | Development server is running at http://0.0.0.0:5000/
    17:55:13 web.1     | Quit the server with CONTROL-C.

4. Connect to the socket (telnet, netcat etc.)

    $ telnet localhost 36688
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.

5. Use django normally, and watch the detailed logs scroll past your terminal,
   or pipe them to a file for later analysis.

   $ ncat localhost 36688 > detailed-log.txt
   ^C

   Refresh the view, or perform the task to reproduce your bug, then break out
   with Control-C when you've got the logs that you want.


text:
{-# LANGUAGE ExistentialQuantification  #-}
{-# LANGUAGE ScopedTypeVariables        #-}

-----------------------------------------------------------------------------
-- |
-- Module      :  Control.Distributed.Process.ManagedProcess.UnsafeClient
-- Copyright   :  (c) Tim Watson 2012 - 2013
-- License     :  BSD3 (see the file LICENSE)
--
-- Maintainer  :  Tim Watson <watson.timothy@gmail.com>
-- Stability   :  experimental
-- Portability :  non-portable (requires concurrency)
--
-- Unsafe variant of the /Managed Process Client API/. This module implements
-- the client portion of a Managed Process using the unsafe variants of cloud
-- haskell's messaging primitives. It relies on the -extras implementation of
-- @UnsafePrimitives@, which forces evaluation for types that provide an
-- @NFData@ instance. Direct use of the underlying unsafe primitives (from
-- the distributed-process library) without @NFData@ instances is unsupported.
--
-- IMPORTANT NOTE: As per the platform documentation, it is not possible to
-- /guarantee/ that an @NFData@ instance will force evaluation in the same way
-- that a @Binary@ instance would (when encoding to a byte string). Please read
-- the unsafe primitives documentation carefully and make sure you know what
-- you're doing. You have been warned.
--
-- See "Control.Distributed.Process.Extras".
-- See "Control.Distributed.Process.Extras.UnsafePrimitives".
-- See "Control.Distributed.Process.UnsafePrimitives".
-----------------------------------------------------------------------------

-- TODO: This module is basically cut+paste duplicaton of the /safe/ Client - fix
-- Caveats... we've got to support two different type constraints, somehow, so
-- that the correct implementation gets used depending on whether or not we're
-- passing NFData or just Binary instances...

module Control.Distributed.Process.ManagedProcess.UnsafeClient
  ( -- * Unsafe variants of the Client API
    sendControlMessage
  , shutdown
  , call
  , safeCall
  , tryCall
  , callTimeout
  , flushPendingCalls
  , callAsync
  , cast
  , callChan
  , syncCallChan
  , syncSafeCallChan
  ) where

import Control.Distributed.Process
  ( Process
  , ProcessId
  , ReceivePort
  , newChan
  , matchChan
  , match
  , die
  , terminate
  , receiveTimeout
  , unsafeSendChan
  )
import Control.Distributed.Process.Async
  ( Async
  , async
  , task
  )
import Control.Distributed.Process.Extras
  ( awaitResponse
  , Addressable
  , Routable(..)
  , NFSerializable
  , ExitReason
  , Shutdown(..)
  )
import Control.Distributed.Process.ManagedProcess.Internal.Types
  ( Message(CastMessage, ChanMessage)
  , CallResponse(..)
  , ControlPort(..)
  , unsafeInitCall
  , waitResponse
  )
import Control.Distributed.Process.Extras.Time
  ( TimeInterval
  , asTimeout
  )
import Control.Distributed.Process.Serializable hiding (SerializableDict)
import Data.Maybe (fromJust)

-- | Send a control message over a 'ControlPort'. This version of
-- @shutdown@ uses /unsafe primitives/.
--
sendControlMessage :: Serializable m => ControlPort m -> m -> Process ()
sendControlMessage cp m = unsafeSendChan (unPort cp) (CastMessage m)

-- | Send a signal instructing the process to terminate. This version of
-- @shutdown@ uses /unsafe primitives/.
shutdown :: ProcessId -> Process ()
shutdown pid = cast pid Shutdown

-- | Make a synchronous call - uses /unsafe primitives/.
call :: forall s a b . (Addressable s, NFSerializable a, NFSerializable b)
                 => s -> a -> Process b
call sid msg = unsafeInitCall sid msg >>= waitResponse Nothing >>= decodeResult
  where decodeResult (Just (Right r))  = return r
        decodeResult (Just (Left err)) = die err
        decodeResult Nothing {- the impossible happened -} = terminate

-- | Safe version of 'call' that returns information about the error
-- if the operation fails - uses /unsafe primitives/.
safeCall :: forall s a b . (Addressable s, NFSerializable a, NFSerializable b)
                 => s -> a -> Process (Either ExitReason b)
safeCall s m = unsafeInitCall s m >>= waitResponse Nothing >>= return . fromJust

-- | Version of 'safeCall' that returns 'Nothing' if the operation fails.
--  Uses /unsafe primitives/.
tryCall :: forall s a b . (Addressable s, NFSerializable a, NFSerializable b)
                 => s -> a -> Process (Maybe b)
tryCall s m = unsafeInitCall s m >>= waitResponse Nothing >>= decodeResult
  where decodeResult (Just (Right r)) = return $ Just r
        decodeResult _                = return Nothing

-- | Make a synchronous call, but timeout and return @Nothing@ if a reply
-- is not received within the specified time interval  - uses /unsafe primitives/.
--
callTimeout :: forall s a b . (Addressable s, NFSerializable a, NFSerializable b)
                 => s -> a -> TimeInterval -> Process (Maybe b)
callTimeout s m d = unsafeInitCall s m >>= waitResponse (Just d) >>= decodeResult
  where decodeResult :: (NFSerializable b)
               => Maybe (Either ExitReason b)
               -> Process (Maybe b)
        decodeResult Nothing               = return Nothing
        decodeResult (Just (Right result)) = return $ Just result
        decodeResult (Just (Left reason))  = die reason

flushPendingCalls :: forall b . (NFSerializable b)
                  => TimeInterval
                  -> (b -> Process b)
                  -> Process (Maybe b)
flushPendingCalls d proc = do
  receiveTimeout (asTimeout d) [
      match (\(CallResponse (m :: b) _) -> proc m)
    ]

-- | Invokes 'call' /out of band/, and returns an "async handle."
-- Uses /unsafe primitives/.
--
callAsync :: forall s a b . (Addressable s, NFSerializable a, NFSerializable b)
          => s -> a -> Process (Async b)
callAsync server msg = async $ task $ call server msg

-- | Sends a /cast/ message to the server identified by @server@ - uses /unsafe primitives/.
--
cast :: forall a m . (Addressable a, NFSerializable m)
                 => a -> m -> Process ()
cast server msg = unsafeSendTo server ((CastMessage msg) :: Message m ())

-- | Sends a /channel/ message to the server and returns a @ReceivePort@ - uses /unsafe primitives/.
callChan :: forall s a b . (Addressable s, NFSerializable a, NFSerializable b)
         => s -> a -> Process (ReceivePort b)
callChan server msg = do
  (sp, rp) <- newChan
  unsafeSendTo server ((ChanMessage msg sp) :: Message a b)
  return rp

syncCallChan :: forall s a b . (Addressable s, NFSerializable a, NFSerializable b)
         => s -> a -> Process b
syncCallChan server msg = do
  r <- syncSafeCallChan server msg
  case r of
    Left e   -> die e
    Right r' -> return r'

syncSafeCallChan :: forall s a b . (Addressable s, NFSerializable a, NFSerializable b)
            => s -> a -> Process (Either ExitReason b)
syncSafeCallChan server msg = do
  rp <- callChan server msg
  awaitResponse server [ matchChan rp (return . Right) ]


text:
cd ${TRAVIS_BUILD_DIR}

# remove temporary directories
rm -R travis-dep
rm -R travis-build
rm -R travis-install


text:
<?php

namespace Ephp\Bundle\SinistriBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Scheda
 *
 * @ORM\Table(name="sx_tabellone")
 * @ORM\Entity(repositoryClass="Ephp\Bundle\SinistriBundle\Entity\SchedaRepository")
 */
class Scheda {

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="Ospedale")
     * @ORM\JoinColumn(name="ospedale_id", referencedColumnName="id")
     */
    private $ospedale;

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

    /**
     * @ORM\ManyToOne(targetEntity="\Ephp\Bundle\GestoriBundle\Entity\Gestore")
     * @ORM\JoinColumn(name="gestore_id", referencedColumnName="id")
     */
    private $gestore;

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

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

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

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

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

    /**
     * @var float
     *
     * @ORM\Column(name="first_reserve", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $first_reserve;

    /**
     * @var float
     *
     * @ORM\Column(name="amount_reserved", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $amount_reserved;

    /**
     * @var float
     *
     * @ORM\Column(name="franchigia", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $franchigia;

    /**
     * @ORM\ManyToOne(targetEntity="Stato")
     * @ORM\JoinColumn(name="stato_id", referencedColumnName="id")
     */
    private $stato;

    /**
     * @ORM\ManyToOne(targetEntity="StatoOperativo")
     * @ORM\JoinColumn(name="stato_operativo_id", referencedColumnName="id", nullable=true)
     */
    private $stato_operativo;

    /**
     * @var float
     *
     * @ORM\Column(name="sa", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $sa;

    /**
     * @var string
     *
     * @ORM\Column(name="offerta_nostra", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $offerta_nostra;

    /**
     * @var float
     *
     * @ORM\Column(name="offerta_loro", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $offerta_loro;

    /**
     * @var string
     *
     * @ORM\Column(name="recupero_offerta_nostra", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $recupero_offerta_nostra;

    /**
     * @var float
     *
     * @ORM\Column(name="recupero_offerta_loro", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $recupero_offerta_loro;

    /**
     * @ORM\ManyToOne(targetEntity="Priorita")
     * @ORM\JoinColumn(name="priorita_id", referencedColumnName="id")
     */
    private $priorita;

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

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

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

    /**
     * @var \Doctrine\Common\Collections\ArrayCollection
     *
     * @ORM\OneToMany(targetEntity="Evento", mappedBy="scheda", cascade={"persist", "remove", "merge", "refresh"}, orphanRemoval=true)
     * @ORM\OrderBy({"data_ora" = "ASC"})
     */
    private $eventi;

    /**
     * @var \Doctrine\Common\Collections\ArrayCollection
     *
     * @ORM\OneToMany(targetEntity="Report", mappedBy="scheda", cascade={"persist", "remove", "merge", "refresh"}, orphanRemoval=true)
     * @ORM\OrderBy({"number" = "DESC"})
     */
    private $reports;

    /**
     * @var \Doctrine\Common\Collections\ArrayCollection
     *
     * @ORM\OneToMany(targetEntity="Link", mappedBy="scheda", cascade={"persist", "remove", "merge", "refresh"}, orphanRemoval=true)
     * @ORM\OrderBy({"sito" = "ASC"})
     */
    private $links;

    /**
     * @var float
     *
     * @ORM\Column(name="prima_pagina", type="boolean", nullable=true)
     */
    private $prima_pagina;

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

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

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

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

    /**
     * @var float
     *
     * @ORM\Column(name="possible_recovery", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $possible_recovery;

    /**
     * @var float
     *
     * @ORM\Column(name="applicable_deductable", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $applicable_deductable;

    // REPORT

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

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

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

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

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

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

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

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

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

    /**
     * @var float
     *
     * @ORM\Column(name="report_possible_recovery", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $report_possible_recovery;

    /**
     * @var float
     *
     * @ORM\Column(name="report_amount_reserved", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $report_amount_reserved;

    /**
     * @var float
     *
     * @ORM\Column(name="report_applicable_deductable", type="decimal", precision=15, scale=2, nullable=true)
     */
    private $report_applicable_deductable;

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

    /**
     * @ORM\ManyToOne(targetEntity="\Ephp\Bundle\GestoriBundle\Entity\Gestore")
     * @ORM\JoinColumn(name="report_gestore_id", referencedColumnName="id")
     */
    private $report_gestore;

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

    /**
     * Constructor
     */
    public function __construct() {
        $this->eventi = new \Doctrine\Common\Collections\ArrayCollection();
    }

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

    /**
     * Set anno
     *
     * @param integer $anno
     * @return Scheda
     */
    public function setAnno($anno) {
        $this->anno = $anno;

        return $this;
    }

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

    /**
     * Get anno a due cifre
     *
     * @return integer
     */
    public function getAnno2() {
        return $this->anno < 10 ? '0' . $this->anno : $this->anno;
    }

    /**
     * Set dasc
     *
     * @param \DateTime $dasc
     * @return Scheda
     */
    public function setDasc($dasc) {
        $this->dasc = $dasc;

        return $this;
    }

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

    /**
     * Set tpa
     *
     * @param integer $tpa
     * @return Scheda
     */
    public function setTpa($tpa) {
        $this->tpa = $tpa;

        return $this;
    }

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

    /**
     * Set claimant
     *
     * @param string $claimant
     * @return Scheda
     */
    public function setClaimant($claimant) {
        $this->claimant = $claimant;

        return $this;
    }

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

    /**
     * Set soi
     *
     * @param string $soi
     * @return Scheda
     */
    public function setSoi($soi) {
        $this->soi = $soi;

        return $this;
    }

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

    /**
     * Set first_reserve
     *
     * @param float $firstReserve
     * @return Scheda
     */
    public function setFirstReserve($firstReserve) {
        $this->first_reserve = $firstReserve;

        return $this;
    }

    /**
     * Get first_reserve
     *
     * @return float
     */
    public function getFirstReserve() {
        return $this->first_reserve;
    }

    /**
     * Set amount_reserved
     *
     * @param float $amountReserved
     * @return Scheda
     */
    public function setAmountReserved($amountReserved) {
        $this->amount_reserved = $amountReserved;

        return $this;
    }

    /**
     * Get amount_reserved
     *
     * @return float
     */
    public function getAmountReserved() {
        return $this->amount_reserved;
    }

    /**
     * Set sa
     *
     * @param float $sa
     * @return Scheda
     */
    public function setSa($sa) {
        $this->sa = $sa;

        return $this;
    }

    /**
     * Get sa
     *
     * @return float
     */
    public function getSa() {
        return $this->sa;
    }

    /**
     * Set offerta_nostra
     *
     * @param float $offertaNostra
     * @return Scheda
     */
    public function setOffertaNostra($offertaNostra) {
        $this->offerta_nostra = $offertaNostra;

        return $this;
    }

    /**
     * Get offerta_nostra
     *
     * @return float
     */
    public function getOffertaNostra() {
        return $this->offerta_nostra;
    }

    /**
     * Set offerta_loro
     *
     * @param float $offertaLoro
     * @return Scheda
     */
    public function setOffertaLoro($offertaLoro) {
        $this->offerta_loro = $offertaLoro;

        return $this;
    }

    /**
     * Get offerta_loro
     *
     * @return float
     */
    public function getOffertaLoro() {
        return $this->offerta_loro;
    }

    /**
     * Set recupero_offerta_nostra
     *
     * @param float $recuperoOffertaNostra
     * @return Scheda
     */
    public function setRecuperoOffertaNostra($recuperoOffertaNostra) {
        $this->recupero_offerta_nostra = $recuperoOffertaNostra;

        return $this;
    }

    /**
     * Get recupero_offerta_nostra
     *
     * @return float
     */
    public function getRecuperoOffertaNostra() {
        return $this->recupero_offerta_nostra;
    }

    /**
     * Set recupero_offerta_loro
     *
     * @param float $recuperoOffertaLoro
     * @return Scheda
     */
    public function setRecuperoOffertaLoro($recuperoOffertaLoro) {
        $this->recupero_offerta_loro = $recuperoOffertaLoro;

        return $this;
    }

    /**
     * Get recupero_offerta_loro
     *
     * @return float
     */
    public function getRecuperoOffertaLoro() {
        return $this->recupero_offerta_loro;
    }

    /**
     * Set note
     *
     * @param string $note
     * @return Scheda
     */
    public function setNote($note) {
        $this->note = $note;

        return $this;
    }

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

    /**
     * Set ospedale
     *
     * @param \Ephp\Bundle\SinistriBundle\Entity\Ospedale $ospedale
     * @return Scheda
     */
    public function setOspedale(\Ephp\Bundle\SinistriBundle\Entity\Ospedale $ospedale = null) {
        $this->ospedale = $ospedale;

        return $this;
    }

    /**
     * Get ospedale
     *
     * @return \Ephp\Bundle\SinistriBundle\Entity\Ospedale
     */
    public function getOspedale() {
        return $this->ospedale;
    }

    /**
     * Set gestore
     *
     * @param \Ephp\Bundle\GestoriBundle\Entity\Gestore $gestore
     * @return Scheda
     */
    public function setGestore(\Ephp\Bundle\GestoriBundle\Entity\Gestore $gestore = null) {
        $this->gestore = $gestore;

        return $this;
    }

    /**
     * Get gestore
     *
     * @return \Ephp\Bundle\GestoriBundle\Entity\Gestore
     */
    public function getGestore() {
        return $this->gestore;
    }

    /**
     * Set stato
     *
     * @param \Ephp\Bundle\SinistriBundle\Entity\Stato $stato
     * @return Scheda
     */
    public function setStato(\Ephp\Bundle\SinistriBundle\Entity\Stato $stato = null) {
        $this->stato = $stato;

        return $this;
    }

    /**
     * Get stato
     *
     * @return \Ephp\Bundle\SinistriBundle\Entity\Stato
     */
    public function getStato() {
        return $this->stato;
    }

    /**
     * Set stato_operativo
     *
     * @param \Ephp\Bundle\SinistriBundle\Entity\StatoOperativo $stato_operativo
     * @return Scheda
     */
    public function setStatoOperativo(\Ephp\Bundle\SinistriBundle\Entity\StatoOperativo $stato_operativo = null) {
        $this->stato_operativo = $stato_operativo;

        return $this;
    }

    /**
     * Get stato_operativo
     *
     * @return \Ephp\Bundle\SinistriBundle\Entity\StatoOperativo
     */
    public function getStatoOperativo() {
        return $this->stato_operativo;
    }

    /**
     * Set priorita
     *
     * @param \Ephp\Bundle\SinistriBundle\Entity\Priorita $priorita
     * @return Scheda
     */
    public function setPriorita(\Ephp\Bundle\SinistriBundle\Entity\Priorita $priorita = null) {
        $this->priorita = $priorita;

        return $this;
    }

    /**
     * Get priorita
     *
     * @return \Ephp\Bundle\SinistriBundle\Entity\Priorita
     */
    public function getPriorita() {
        return $this->priorita;
    }

    /**
     * Add eventi
     *
     * @param \Ephp\Bundle\SinistriBundle\Entity\Evento $eventi
     * @return Scheda
     */
    public function addEventi(\Ephp\Bundle\SinistriBundle\Entity\Evento $eventi) {
        $this->eventi[] = $eventi;

        return $this;
    }

    /**
     * Remove eventi
     *
     * @param \Ephp\Bundle\SinistriBundle\Entity\Evento $eventi
     */
    public function removeEventi(\Ephp\Bundle\SinistriBundle\Entity\Evento $eventi) {
        $this->eventi->removeElement($eventi);
    }

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

    /**
     * Set franchigia
     *
     * @param float $franchigia
     * @return Scheda
     */
    public function setFranchigia($franchigia)
    {
        $this->franchigia = $franchigia;

        return $this;
    }

    /**
     * Get franchigia
     *
     * @return float
     */
    public function getFranchigia()
    {
        return $this->franchigia;
    }

    /**
     * Add links
     *
     * @param \Ephp\Bundle\SinistriBundle\Entity\Link $links
     * @return Scheda
     */
    public function addLink(\Ephp\Bundle\SinistriBundle\Entity\Link $links)
    {
        $this->links[] = $links;

        return $this;
    }

    /**
     * Remove links
     *
     * @param \Ephp\Bundle\SinistriBundle\Entity\Link $links
     */
    public function removeLink(\Ephp\Bundle\SinistriBundle\Entity\Link $links)
    {
        $this->links->removeElement($links);
    }

    /**
     * Get links
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getLinks()
    {
        return $this->links;
    }
    /**
     * Set prima_pagina
     *
     * @param boolean $prima_pagina
     * @return Scheda
     */
    public function setPrimaPagina($prima_pagina)
    {
        $this->prima_pagina = $prima_pagina;

        return $this;
    }

    /**
     * Get prima_pagina
     *
     * @return boolean
     */
    public function getPrimaPagina()
    {
        return $this->prima_pagina;
    }

    /**
     * Set legali_avversari
     *
     * @param string $legaliAvversari
     * @return Scheda
     */
    public function setLegaliAvversari($legaliAvversari)
    {
        $this->legali_avversari = $legaliAvversari;

        return $this;
    }

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

    /**
     * Set dati
     *
     * @param string $dati
     * @return Scheda
     */
    public function setDati($dati)
    {
        $this->dati = $dati;

        return $this;
    }

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

    /**
     * Set dol
     *
     * @param \DateTime $dol
     * @return Scheda
     */
    public function setDol($dol)
    {
        $this->dol = $dol;

        return $this;
    }

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

    /**
     * Set don
     *
     * @param \DateTime $don
     * @return Scheda
     */
    public function setDon($don)
    {
        $this->don = $don;

        return $this;
    }

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

    /**
     * Set type_of_loss
     *
     * @param string $typeOfLoss
     * @return Scheda
     */
    public function setTypeOfLoss($typeOfLoss)
    {
        $this->type_of_loss = $typeOfLoss;

        return $this;
    }

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

    /**
     * Set possible_recovery
     *
     * @param float $possibleRecovery
     * @return Scheda
     */
    public function setPossibleRecovery($possibleRecovery)
    {
        $this->possible_recovery = $possibleRecovery;

        return $this;
    }

    /**
     * Get possible_recovery
     *
     * @return float
     */
    public function getPossibleRecovery()
    {
        return $this->possible_recovery;
    }

    /**
     * Set report_soi
     *
     * @param string $reportSoi
     * @return Scheda
     */
    public function setReportSoi($reportSoi)
    {
        $this->report_soi = $reportSoi;

        return $this;
    }

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

    /**
     * Set report_dol
     *
     * @param \DateTime $reportDol
     * @return Scheda
     */
    public function setReportDol($reportDol)
    {
        $this->report_dol = $reportDol;

        return $this;
    }

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

    /**
     * Set report_don
     *
     * @param \DateTime $reportDon
     * @return Scheda
     */
    public function setReportDon($reportDon)
    {
        $this->report_don = $reportDon;

        return $this;
    }

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

    /**
     * Set report_descrizione
     *
     * @param string $reportDescrizione
     * @return Scheda
     */
    public function setReportDescrizione($reportDescrizione)
    {
        $this->report_descrizione = $reportDescrizione;

        return $this;
    }

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

    /**
     * Set report_mpl
     *
     * @param string $reportMpl
     * @return Scheda
     */
    public function setReportMpl($reportMpl)
    {
        $this->report_mpl = $reportMpl;

        return $this;
    }

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

    /**
     * Set report_giudiziale
     *
     * @param string $reportGiudiziale
     * @return Scheda
     */
    public function setReportGiudiziale($reportGiudiziale)
    {
        $this->report_giudiziale = $reportGiudiziale;

        return $this;
    }

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

    /**
     * Set report_other_policies
     *
     * @param string $reportOtherPolicies
     * @return Scheda
     */
    public function setReportOtherPolicies($reportOtherPolicies)
    {
        $this->report_other_policies = $reportOtherPolicies;

        return $this;
    }

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

    /**
     * Set report_type_of_loss
     *
     * @param string $reportTypeOfLoss
     * @return Scheda
     */
    public function setReportTypeOfLoss($reportTypeOfLoss)
    {
        $this->report_type_of_loss = $reportTypeOfLoss;

        return $this;
    }

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

    /**
     * Set report_possible_recovery
     *
     * @param float $reportPossibleRecovery
     * @return Scheda
     */
    public function setReportPossibleRecovery($reportPossibleRecovery)
    {
        $this->report_possible_recovery = $reportPossibleRecovery;

        return $this;
    }

    /**
     * Get report_possible_recovery
     *
     * @return float
     */
    public function getReportPossibleRecovery()
    {
        return $this->report_possible_recovery;
    }

    /**
     * Set report_amount_reserved
     *
     * @param float $reportAmountReserved
     * @return Scheda
     */
    public function setReportAmountReserved($reportAmountReserved)
    {
        $this->report_amount_reserved = $reportAmountReserved;

        return $this;
    }

    /**
     * Get report_amount_reserved
     *
     * @return float
     */
    public function getReportAmountReserved()
    {
        return $this->report_amount_reserved;
    }

    /**
     * Set report_applicable_deductable
     *
     * @param string $reportApplicableDeductable
     * @return Scheda
     */
    public function setReportApplicableDeductable($reportApplicableDeductable)
    {
        $this->report_applicable_deductable = $reportApplicableDeductable;

        return $this;
    }

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

    /**
     * Set report_future_conduct
     *
     * @param string $reportFutureConduct
     * @return Scheda
     */
    public function setReportFutureConduct($reportFutureConduct)
    {
        $this->report_future_conduct = $reportFutureConduct;

        return $this;
    }

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

    /**
     * Set report_gestore
     *
     * @param \Ephp\Bundle\GestoriBundle\Entity\Gestore $reportGestore
     * @return Scheda
     */
    public function setReportGestore(\Ephp\Bundle\GestoriBundle\Entity\Gestore $reportGestore = null)
    {
        $this->report_gestore = $reportGestore;

        return $this;
    }

    /**
     * Get report_gestore
     *
     * @return \Ephp\Bundle\GestoriBundle\Entity\Gestore
     */
    public function getReportGestore()
    {
        return $this->report_gestore;
    }

    /**
     * Set applicable_deductable
     *
     * @param float $applicableDeductable
     * @return Scheda
     */
    public function setApplicableDeductable($applicableDeductable)
    {
        $this->applicable_deductable = $applicableDeductable;

        return $this;
    }

    /**
     * Get applicable_deductable
     *
     * @return float
     */
    public function getApplicableDeductable()
    {
        return $this->applicable_deductable;
    }

    /**
     * Set service_provider
     *
     * @param string $serviceProvider
     * @return Scheda
     */
    public function setServiceProvider($serviceProvider)
    {
        $this->service_provider = $serviceProvider;

        return $this;
    }

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

    /**
     * Set report_service_provider
     *
     * @param string $reportServiceProvider
     * @return Scheda
     */
    public function setReportServiceProvider($reportServiceProvider)
    {
        $this->report_service_provider = $reportServiceProvider;

        return $this;
    }

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

    /**
     * Set report_old
     *
     * @param string $reportOld
     * @return Scheda
     */
    public function setReportOld($reportOld)
    {
        $this->report_old = $reportOld;

        return $this;
    }

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

    /**
     * Add reports
     *
     * @param \Ephp\Bundle\SinistriBundle\Entity\Report $reports
     * @return Scheda
     */
    public function addReport(\Ephp\Bundle\SinistriBundle\Entity\Report $reports)
    {
        $this->reports[] = $reports;

        return $this;
    }

    /**
     * Remove reports
     *
     * @param \Ephp\Bundle\SinistriBundle\Entity\Report $reports
     */
    public function removeReport(\Ephp\Bundle\SinistriBundle\Entity\Report $reports)
    {
        $this->reports->removeElement($reports);
    }

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

    public function __toString() {
        return "{$this->getOspedale()->getSigla()}/{$this->getAnno2()}/{$this->getTpa()} {$this->getClaimant()}";
    }

    /**
     * Set giudiziale
     *
     * @param string $giudiziale
     * @return Scheda
     */
    public function setGiudiziale($giudiziale)
    {
        $this->giudiziale = $giudiziale;

        return $this;
    }

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


text:
package io.github.yamacraft.getimageviewpager;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.WorkerThread;

import java.io.IOException;

import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
import timber.log.Timber;

/**
 * 画像取得AsyncTask
 * Created by yamacraft on 2016/03/04.
 */
public class GetImageAsyncTask extends AsyncTask<String, Void, Bitmap> {
    private static final long MAX_IMAGE_SIZE = 1920 * 1080;

    public interface OnDownloadedListener {
        void onSuccess(@Nullable Bitmap bitmap);
    }

    private OnDownloadedListener mListener;

    public GetImageAsyncTask(OnDownloadedListener listener) {
        this.mListener = listener;
    }

    @Override
    protected Bitmap doInBackground(String... params) {
        if (params == null || params.length < 1) {
            return null;
        }
        String url = params[0];
        return downloadFile(url);
    }

    @Override
    protected void onPostExecute(Bitmap bitmap) {
        super.onPostExecute(bitmap);
        if (mListener != null) {
            mListener.onSuccess(bitmap);
        }
    }

    /**
     * 画像取得
     *
     * @param url 取得先URL
     * @return リサイズ済みBitmap画像
     */
    @WorkerThread
    private static Bitmap downloadFile(@NonNull String url) {
        ResponseBody response = getResponse(url);
        if (response == null) {
            return null;
        }

        BitmapFactory.Options options = new BitmapFactory.Options();
        options.inJustDecodeBounds = true;
        BitmapFactory.decodeStream(response.byteStream(), null, options);
        Timber.d("original image w:%d h:%d", options.outWidth, options.outHeight);

        options.inSampleSize = 1;
        while ((options.outWidth * options.outHeight) / options.inSampleSize > MAX_IMAGE_SIZE * 4) {
            options.inSampleSize *= 2;
        }
        Timber.d("options.inSampleSize: %d", options.inSampleSize);

        options.inJustDecodeBounds = false;
        response = getResponse(url);
        if (response == null) {
            return null;
        }

        Bitmap bitmap = BitmapFactory.decodeStream(response.byteStream(), null, options);
        response.close();
        return bitmap;
    }

    /**
     * APIからレスポンスを取得する
     *
     * @param url リクエストURL
     * @return レスポンス
     */
    private static ResponseBody getResponse(@NonNull String url) {
        Timber.d("get url:%s", url);
        Request request = new Request.Builder().url(url).get().build();
        try {
            Response response = new OkHttpClient().newCall(request).execute();
            if (!response.isSuccessful()) {
                Timber.d("response error %d: %s", response.code(), response.message());
                return null;
            }
            return response.body();
        } catch (IOException e) {
            Timber.e("IOException %s", e.getMessage());
            return null;
        }
    }
}


text:
use super::{rocket, index};
use rocket::local::Client;
use rocket::http::{Status, ContentType};

fn extract_id(from: &str) -> Option<String> {
    from.rfind('/').map(|i| &from[(i + 1)..]).map(|s| s.trim_right().to_string())
}

#[test]
fn check_index() {
    let client = Client::new(rocket()).unwrap();

    // Ensure the index returns what we expect.
    let mut response = client.get("/").dispatch();
    assert_eq!(response.status(), Status::Ok);
    assert_eq!(response.content_type(), Some(ContentType::Plain));
    assert_eq!(response.body_string(), Some(index().into()))
}

fn upload_paste(client: &Client, body: &str) -> String {
    let mut response = client.post("/").body(body).dispatch();
    assert_eq!(response.status(), Status::Ok);
    assert_eq!(response.content_type(), Some(ContentType::Plain));
    extract_id(&response.body_string().unwrap()).unwrap()
}

fn download_paste(client: &Client, id: &str) -> String {
    let mut response = client.get(format!("/{}", id)).dispatch();
    assert_eq!(response.status(), Status::Ok);
    response.body_string().unwrap()
}

#[test]
fn pasting() {
    let client = Client::new(rocket()).unwrap();

    // Do a trivial upload, just to make sure it works.
    let body_1 = "Hello, world!";
    let id_1 = upload_paste(&client, body_1);
    assert_eq!(download_paste(&client, &id_1), body_1);

    // Make sure we can keep getting that paste.
    assert_eq!(download_paste(&client, &id_1), body_1);
    assert_eq!(download_paste(&client, &id_1), body_1);
    assert_eq!(download_paste(&client, &id_1), body_1);

    // Upload some unicode.
    let body_2 = "こんにちは";
    let id_2 = upload_paste(&client, body_2);
    assert_eq!(download_paste(&client, &id_2), body_2);

    // Make sure we can get both pastes.
    assert_eq!(download_paste(&client, &id_1), body_1);
    assert_eq!(download_paste(&client, &id_2), body_2);
    assert_eq!(download_paste(&client, &id_1), body_1);
    assert_eq!(download_paste(&client, &id_2), body_2);

    // Now a longer upload.
    let body_3 = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
        do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
        ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
        aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
        in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
        Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
        officia deserunt mollit anim id est laborum.";
    let id_3 = upload_paste(&client, body_3);
    assert_eq!(download_paste(&client, &id_3), body_3);
    assert_eq!(download_paste(&client, &id_1), body_1);
    assert_eq!(download_paste(&client, &id_2), body_2);
}


text:
/*! \file version.h
 *  \brief Compile-time macros encoding Thrust release version
 *
 *         <thrust/version.h> is the only Thrust header that is guaranteed to
 *         change with every thrust release.
 */

#pragma once

#include <thrust/detail/config.h>

//  This is the only thrust header that is guaranteed to
//  change with every thrust release.
//
//  THRUST_VERSION % 100 is the sub-minor version
//  THRUST_VERSION / 100 % 1000 is the minor version
//  THRUST_VERSION / 100000 is the major version

/*! \def THRUST_VERSION
 *  \brief The preprocessor macro \p THRUST_VERSION encodes the version
 *         number of the Thrust library.
 *
 *         <tt>THRUST_VERSION % 100</tt> is the sub-minor version.
 *         <tt>THRUST_VERSION / 100 % 1000</tt> is the minor version.
 *         <tt>THRUST_VERSION / 100000</tt> is the major version.
 */
#define THRUST_VERSION 100600

/*! \def THRUST_MAJOR_VERSION
 *  \brief The preprocessor macro \p THRUST_MAJOR_VERSION encodes the
 *         major version number of the Thrust library.
 */
#define THRUST_MAJOR_VERSION     (THRUST_VERSION / 100000)

/*! \def THRUST_MINOR_VERSION
 *  \brief The preprocessor macro \p THRUST_MINOR_VERSION encodes the
 *         minor version number of the Thrust library.
 */
#define THRUST_MINOR_VERSION     (THRUST_VERSION / 100 % 1000)

/*! \def THRUST_SUBMINOR_VERSION
 *  \brief The preprocessor macro \p THRUST_SUBMINOR_VERSION encodes the
 *         sub-minor version number of the Thrust library.
 */
#define THRUST_SUBMINOR_VERSION  (THRUST_VERSION % 100)

// Declare these namespaces here for the purpose of Doxygenating them

/*! \namespace thrust
 *  \brief \p thrust is the top-level namespace which contains all Thrust
 *         functions and types.
 */
namespace thrust
{

}


text:
// Generated from "es_ES.txt".

namespace I18N.West
{

using System;
using System.Globalization;
using I18N.Common;

public class CID0c0a : CID000a
{
	public CID0c0a() : base(0x0C0A) {}

	public override String Name
	{
		get
		{
			return "es-ES";
		}
	}
	public override String ThreeLetterWindowsLanguageName
	{
		get
		{
			return "ESN";
		}
	}
	public override String Country
	{
		get
		{
			return "ES";
		}
	}

	public override NumberFormatInfo NumberFormat
	{
		get
		{
			NumberFormatInfo nfi = base.NumberFormat;
			nfi.CurrencyDecimalSeparator = ",";
			nfi.CurrencyGroupSeparator = ".";
			nfi.NumberGroupSeparator = ".";
			nfi.PercentGroupSeparator = ".";
			nfi.NegativeSign = "-";
			nfi.NumberDecimalSeparator = ",";
			nfi.PercentDecimalSeparator = ",";
			nfi.PercentSymbol = "%";
			nfi.PerMilleSymbol = "\u2030";
			return nfi;
		}
		set
		{
			base.NumberFormat = value; // not used
		}
	}

	private class PrivateTextInfo : _I18NTextInfo
	{
		public PrivateTextInfo(int culture) : base(culture) {}

		public override int EBCDICCodePage
		{
			get
			{
				return 20284;
			}
		}
		public override int OEMCodePage
		{
			get
			{
				return 850;
			}
		}
		public override String ListSeparator
		{
			get
			{
				return ";";
			}
		}

	}; // class PrivateTextInfo

	public override TextInfo TextInfo
	{
		get
		{
			return new PrivateTextInfo(LCID);
		}
	}

}; // class CID0c0a

public class CNes_es : CID0c0a
{
	public CNes_es() : base() {}

}; // class CNes_es

}; // namespace I18N.West


text:
@interface XMGSubTagCell ()

@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *nameView;
@property (weak, nonatomic) IBOutlet UILabel *numView;

@end

@implementation XMGSubTagCell

- (void)setItem:(XMGSubTagItem *)item{
    _item = item;

    [_iconView sd_setImageWithURL:[NSURL URLWithString:item.image_list] placeholderImage:[UIImage imageNamed:@"defaultUserIcon"] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        // 用分类,裁剪成圆形图片
        UIImage *newImage = [UIImage imageWithBorderW:0 borderColor:nil originalImage:image];

        _iconView.image = newImage;
    }];

    _nameView.text = item.theme_name;

    _numView.text = [NSString stringWithFormat:@"%@万订阅量",item.sub_number];

    // 如果订阅量超过10000,则做处理
    NSInteger numTag = [item.sub_number intValue];
    CGFloat numF = 0;
    if (numTag > 10000) {

        numF = numTag / 10000.0;
        _numView.text = [NSString stringWithFormat:@"%.1f万订阅量",numF];
    }

}

#pragma mark -
#pragma mark 点击订阅调用此方法
- (IBAction)tagBtnClick {
    XMGFunc;
}

#pragma mark -
#pragma mark 设置cell的frame
- (void)setFrame:(CGRect)frame{

    frame.size.height -= 0.6;

    [super setFrame:frame];
}

- (void)awakeFromNib {

    //设置分割线的间隔,此方法只支持8.0以上
//    self.layoutMargins = UIEdgeInsetsZero;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end


text:
module WhiteListModel

  PROFILES = {
    :empty => {
      :attributes => [],
      :bad_tags => [],
      :protocols => [],
      :tags => []
    },
    :mini => {
      :attributes => [],
      :bad_tags => %w(script),
      :protocols => %w(ed2k ftp http https irc mailto news gopher nntp telnet webcal xmpp callto feed),
      :tags => []
    },
    :base => {
      :attributes => %w(href src),
      :bad_tags => %w(script),
      :protocols => %w(ed2k ftp http https irc mailto news gopher nntp telnet webcal xmpp callto feed),
      :tags => %w(b i u strike br)
    },
    :web => {
      :attributes => %w(href src),
      :bad_tags => %w(script),
      :protocols => %w(ed2k ftp http https irc mailto news gopher nntp telnet webcal xmpp callto feed),
      :tags => %w(b u i strike br ul ol li)
    },
    :default => {
      :attributes => %w(href src width height alt cite datetime title class),
      :bad_tags => %w(script),
      :protocols => %w(ed2k ftp http https irc mailto news gopher nntp telnet webcal xmpp callto feed),
      :tags => %w(strong em b i u p code pre tt output samp kbd var sub sup dfn cite big small address hr br div span h1 h2 h3 h4 h5 h6 ul ol li dt dd abbr acronym a img blockquote del ins fieldset legend)
    }
  }

  def self.included(base)
    base.extend(ClassMethods)
  end

  module ClassMethods

    def white_list(options = {})
      before_validation :white_list_fields
      update_white_list_options(options)
      class_inheritable_reader :white_list_options
      include WhiteListModel::InstanceMethods
    end

    protected

    def update_white_list_options(options)
      opts = read_inheritable_attribute(:white_list_options) || {}
      only = options.delete(:only)
      except = options.delete(:except)
      method = options.delete(:method)
      method = :replace unless [ :replace, :update ].include?(method)
      options = format_white_list_options(options)

      return if only && except

      if only.nil? && except.nil?
        opts = {} if method == :replace
        opts[:white_list_defaults] = options
      elsif only
        opts = {} if method == :replace
        only.to_a.each do |key|
          opts[key] = options
        end
      else
        new_options = { :white_list_defaults => options }
        except.to_a.each do |e|
          new_options[e] = ( method == :replace ? 0 : opts[e] || 0 )
        end
        opts = new_options
      end
      write_inheritable_attribute(:white_list_options, opts)
    end

    def format_white_list_options(options)
      opts = {
        :attributes => options[:attributes] || [],
        :bad_tags   => options[:bad_tags]   || [],
        :profile    => options[:profile]    || :default,
        :protocols  => options[:protocols]  || [],
        :tags       => options[:tags]       || []
      }
      opts
    end

  end

  module InstanceMethods

    def white_list_fields
      # fix a bug with Rails internal AR::Base models that get loaded before
      # the plugin, like CGI::Sessions::ActiveRecordStore::Session
      return if white_list_options.nil? || !white_list_options.is_a?(Hash)

      profiles = WhiteListModel::PROFILES

      self.class.columns.each do |column|
        next unless (column.type == :string || column.type == :text)

        field = column.name.to_sym
        value = self[field]

        next if value.nil?

        field_options = white_list_options[field] || white_list_options[:white_list_defaults]
        next if field_options.nil? || field_options == 0

        opts = {}
        profile = ( profiles.keys.include?(field_options[:profile].to_sym) )? profiles[field_options[:profile].to_sym] : profiles[:default]
        opts[:attributes] = (profile[:attributes] + field_options[:attributes]).uniq
        opts[:bad_tags]   = (profile[:bad_tags]   + field_options[:bad_tags]).uniq
        opts[:protocols]  = (profile[:protocols]  + field_options[:protocols]).uniq
        opts[:tags]       = (profile[:tags]       + field_options[:tags]).uniq

        self[field] = white_list_parse(value, opts )
      end
    end

    protected
      def white_list_parse(text, options = {})
        protocol_attributes = Set.new %w(src href)
        return text if text.blank? || !text.include?('<')
        attrs    = Set.new(options[:attributes])
        bad_tags = Set.new(options[:bad_tags])
        prot     = Set.new(options[:protocols])
        tags     = Set.new(options[:tags])
        @included_bad_tags = []
        returning [] do |new_text|
          tokenizer = HTML::Tokenizer.new(text)
          bad       = nil
          while token = tokenizer.next
            node = HTML::Node.parse(nil, 0, 0, token, false)
            new_text << case node
              when HTML::Tag
                node.attributes.keys.each do |attr_name|
                  value = node.attributes[attr_name].to_s
                  if !attrs.include?(attr_name) || (protocol_attributes.include?(attr_name) && contains_bad_protocols?(value, prot))
                    node.attributes.delete(attr_name)
                  else
                    node.attributes[attr_name] = CGI::escapeHTML(value)
                  end
                end if node.attributes
                if tags.include?(node.name)
                  node
                elsif bad_tags.include?(node.name)
                  indent_bad_tag(node)
                else
                  node.to_s.gsub(/</, '<') if @included_bad_tags.empty?
                end
              else
                node.to_s.gsub(/</, '<') if @included_bad_tags.empty?
            end
          end
        end.join
      end

      def indent_bad_tag(tag)
        case tag.closing
        when nil then @included_bad_tags << tag.name
        when :close then @included_bad_tags.delete_at( @included_bad_tags.index(tag.name) ) rescue nil
        else nil
        end
        nil
      end

      def contains_bad_protocols?(value, protocols)
        protocol_separator  = /:|(&#0*58)|(&#x70)|(%|%)3A/
        value =~ protocol_separator && !protocols.include?(value.split(protocol_separator).first)
      end

  end
end


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevO2.UI;

namespace Tester
{

    public partial class fPermisos : Form
    {
       // [PermissionsControl("12", "button1")]
        public fPermisos()
        {
            InitializeComponent();
        }
    }
}


text:
Setup:
-----------------------

Install node: http://www.nodejs.org

Install gulp: npm install gulp -g

Install tsd: npm install tsd -g

from a console prompt:

npm install

tsd install

(change Visual Studio Code settings, see below)

Compile

run 'node TodoWebService.js' to start the server.

browse to: http://localhost:3000/build/index.html

-----------------------
Visual Studio Code
-----------------------

if you want to use a local copy of the typescript compiler
edit the file settings.json and specify the correct absolute path for "typescript.tsdk"

Tricks:

- if you place a tsconfig.json file on the root VSCode will internally pick that and use it. This way any .ts and .d.ts will be read and compiled and there will be no need to add /// <reference path="tsd.d.ts" /> all around.
- if you place a jsconfig.json file on the root VSCode will internally pick that and use it to provide some JavaScript goodies.

-----------------------
Update definitions:
-----------------------
tsd update -s -o
tsd rebundle

ncu --upgradeAll
npm install

-----------------------
Purge global caches:
-----------------------

tsd purge


text:
using EstimatorX.Client.Stores;
using EstimatorX.Shared.Models;

using Microsoft.AspNetCore.Components;

namespace EstimatorX.Client.Pages.Templates.Components;

public partial class TemplateTabs
{
    [Inject]
    public TemplateStore Store { get; set; }

    public Template Model => Store.Model;

}


text:
package com.github.sdarioo.testgen.recorder.values;

import static org.junit.Assert.*;

import org.junit.Test;

import com.github.sdarioo.testgen.Configuration;
import com.github.sdarioo.testgen.generator.TestSuiteBuilder;
import com.github.sdarioo.testgen.generator.source.TestClass;

public class StringValueTest
{
    @SuppressWarnings("nls")
    @Test
    public void testSourceCode()
    {
        StringValue v = new StringValue("");
        assertEquals("\"\"", v.toSourceCode(String.class, new TestSuiteBuilder()));
    }

    @SuppressWarnings("nls")
    @Test
    public void shouldEscapeText()
    {
        StringValue p = new StringValue("c:\\win\\path");
        assertEquals("\"c:\\\\win\\\\path\"", p.toSourceCode(String.class, new TestSuiteBuilder()));

        p = new StringValue("line1\n\rline2");
        assertEquals("\"line1\\n\\rline2\"", p.toSourceCode(String.class, new TestSuiteBuilder()));
    }

    @Test
    public void testCountLines()
    {
        assertEquals(1, StringValue.getLinesCount(""));
        assertEquals(1, StringValue.getLinesCount("text"));
        assertEquals(2, StringValue.getLinesCount("\n"));
        assertEquals(3, StringValue.getLinesCount("\n\n"));
        assertEquals(3, StringValue.getLinesCount("1\n2\n3"));
    }

    @Test
    public void testCreateResource()
    {
        StringBuilder sb = new StringBuilder();
        int maxStringLength = Configuration.getDefault().getMaxStringLength();
        for (int i = 0; i< maxStringLength; i++) {
            sb.append("XX");
        }
        StringValue p = new StringValue(sb.toString());
        TestSuiteBuilder builder = new TestSuiteBuilder();
        String code = p.toSourceCode(String.class, builder);
        assertTrue(code.length() < maxStringLength);

        TestClass test = builder.buildTestClass();
        assertEquals(1, test.getResources().size());
        assertEquals(sb.toString(), test.getResources().get(0).getContent());
    }
}


text:
namespace media_router {

TEST(MediaRouterCastModesWithMediaSourcesTest, AddAndRemoveSources) {
  const MediaSource presentationSource1(MediaSource::ForPresentationUrl(
      GURL("http://www.example.com/presentation.html")));
  const MediaSource presentationSource2(MediaSource::ForPresentationUrl(
      GURL("http://www.example.net/presentation.html")));
  const MediaSource tabSourceA(MediaSource::ForTab(123));
  const CastModeSet castModeSetEmpty;
  const CastModeSet castModeSetPresentation({MediaCastMode::PRESENTATION});
  const CastModeSet castModeSetTab({MediaCastMode::TAB_MIRROR});
  const CastModeSet castModeSetPresentationAndTab(
      {MediaCastMode::PRESENTATION, MediaCastMode::TAB_MIRROR});

  CastModesWithMediaSources sources(CreateDialSink("sinkId", "name"));
  EXPECT_TRUE(sources.IsEmpty());
  EXPECT_EQ(sources.GetCastModes(), castModeSetEmpty);

  // After the below addition, |sources| should contain:
  // [Presentation: 1]
  sources.AddSource(MediaCastMode::PRESENTATION, presentationSource1);
  EXPECT_TRUE(
      sources.HasSource(MediaCastMode::PRESENTATION, presentationSource1));
  EXPECT_FALSE(
      sources.HasSource(MediaCastMode::PRESENTATION, presentationSource2));
  EXPECT_FALSE(
      sources.HasSource(MediaCastMode::TAB_MIRROR, presentationSource1));
  EXPECT_FALSE(sources.IsEmpty());
  EXPECT_EQ(sources.GetCastModes(), castModeSetPresentation);

  // Trying to remove non-existing sources should be no-op.
  sources.RemoveSource(MediaCastMode::PRESENTATION, presentationSource2);
  sources.RemoveSource(MediaCastMode::TAB_MIRROR, presentationSource1);
  sources.RemoveSource(MediaCastMode::TAB_MIRROR, tabSourceA);
  EXPECT_TRUE(
      sources.HasSource(MediaCastMode::PRESENTATION, presentationSource1));
  EXPECT_EQ(sources.GetCastModes(), castModeSetPresentation);

  // [Presentation: 1; Tab: A]
  sources.AddSource(MediaCastMode::TAB_MIRROR, tabSourceA);
  EXPECT_TRUE(
      sources.HasSource(MediaCastMode::PRESENTATION, presentationSource1));
  EXPECT_TRUE(sources.HasSource(MediaCastMode::TAB_MIRROR, tabSourceA));
  EXPECT_EQ(sources.GetCastModes(), castModeSetPresentationAndTab);

  // [Presentation: 1,2; Tab: A]
  sources.AddSource(MediaCastMode::PRESENTATION, presentationSource2);
  EXPECT_TRUE(
      sources.HasSource(MediaCastMode::PRESENTATION, presentationSource2));
  EXPECT_EQ(sources.GetCastModes(), castModeSetPresentationAndTab);

  // [Presentation: 2; Tab: A]
  sources.RemoveSource(MediaCastMode::PRESENTATION, presentationSource1);
  EXPECT_FALSE(
      sources.HasSource(MediaCastMode::PRESENTATION, presentationSource1));
  EXPECT_TRUE(
      sources.HasSource(MediaCastMode::PRESENTATION, presentationSource2));
  EXPECT_EQ(sources.GetCastModes(), castModeSetPresentationAndTab);

  // [Tab: A]
  sources.RemoveSource(MediaCastMode::PRESENTATION, presentationSource2);
  EXPECT_FALSE(
      sources.HasSource(MediaCastMode::PRESENTATION, presentationSource1));
  EXPECT_FALSE(sources.IsEmpty());
  EXPECT_EQ(sources.GetCastModes(), castModeSetTab);

  // []
  sources.RemoveSource(MediaCastMode::TAB_MIRROR, tabSourceA);
  EXPECT_FALSE(
      sources.HasSource(MediaCastMode::PRESENTATION, presentationSource1));
  EXPECT_FALSE(
      sources.HasSource(MediaCastMode::PRESENTATION, presentationSource2));
  EXPECT_FALSE(sources.HasSource(MediaCastMode::TAB_MIRROR, tabSourceA));
  EXPECT_TRUE(sources.IsEmpty());
  EXPECT_EQ(sources.GetCastModes(), castModeSetEmpty);
}

}  // namespace media_router


text:
.class public final Lcom/android/internal/graphics/palette/Palette;
.super Ljava/lang/Object;
.source "Palette.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/internal/graphics/palette/Palette$1;,
        Lcom/android/internal/graphics/palette/Palette$Builder;,
        Lcom/android/internal/graphics/palette/Palette$Filter;,
        Lcom/android/internal/graphics/palette/Palette$PaletteAsyncListener;,
        Lcom/android/internal/graphics/palette/Palette$Swatch;
    }
.end annotation

# static fields
.field static final DEFAULT_CALCULATE_NUMBER_COLORS:I = 0x10

.field static final DEFAULT_FILTER:Lcom/android/internal/graphics/palette/Palette$Filter;

.field static final DEFAULT_RESIZE_BITMAP_AREA:I = 0x3100

.field static final LOG_TAG:Ljava/lang/String; = "Palette"

.field static final LOG_TIMINGS:Z = false

.field static final MIN_CONTRAST_BODY_TEXT:F = 4.5f

.field static final MIN_CONTRAST_TITLE_TEXT:F = 3.0f

# instance fields
.field private final mDominantSwatch:Lcom/android/internal/graphics/palette/Palette$Swatch;

.field private final mSelectedSwatches:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Lcom/android/internal/graphics/palette/Target;",
            "Lcom/android/internal/graphics/palette/Palette$Swatch;",
            ">;"
        }
    .end annotation
.end field

.field private final mSwatches:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/android/internal/graphics/palette/Palette$Swatch;",
            ">;"
        }
    .end annotation
.end field

.field private final mTargets:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/android/internal/graphics/palette/Target;",
            ">;"
        }
    .end annotation
.end field

.field private final mUsedColors:Landroid/util/SparseBooleanArray;

# direct methods
.method static constructor <clinit>()V
    .locals 1

    new-instance v0, Lcom/android/internal/graphics/palette/Palette$1;

    invoke-direct {v0}, Lcom/android/internal/graphics/palette/Palette$1;-><init>()V

    sput-object v0, Lcom/android/internal/graphics/palette/Palette;->DEFAULT_FILTER:Lcom/android/internal/graphics/palette/Palette$Filter;

    return-void
.end method

.method constructor <init>(Ljava/util/List;Ljava/util/List;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/android/internal/graphics/palette/Palette$Swatch;",
            ">;",
            "Ljava/util/List",
            "<",
            "Lcom/android/internal/graphics/palette/Target;",
            ">;)V"
        }
    .end annotation

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

    iput-object p1, p0, Lcom/android/internal/graphics/palette/Palette;->mSwatches:Ljava/util/List;

    iput-object p2, p0, Lcom/android/internal/graphics/palette/Palette;->mTargets:Ljava/util/List;

    new-instance v0, Landroid/util/SparseBooleanArray;

    invoke-direct {v0}, Landroid/util/SparseBooleanArray;-><init>()V

    iput-object v0, p0, Lcom/android/internal/graphics/palette/Palette;->mUsedColors:Landroid/util/SparseBooleanArray;

    new-instance v0, Landroid/util/ArrayMap;

    invoke-direct {v0}, Landroid/util/ArrayMap;-><init>()V

    iput-object v0, p0, Lcom/android/internal/graphics/palette/Palette;->mSelectedSwatches:Ljava/util/Map;

    invoke-direct {p0}, Lcom/android/internal/graphics/palette/Palette;->findDominantSwatch()Lcom/android/internal/graphics/palette/Palette$Swatch;

    move-result-object v0

    iput-object v0, p0, Lcom/android/internal/graphics/palette/Palette;->mDominantSwatch:Lcom/android/internal/graphics/palette/Palette$Swatch;

    return-void
.end method

.method private static copyHslValues(Lcom/android/internal/graphics/palette/Palette$Swatch;)[F
    .locals 4

    const/4 v3, 0x3

    const/4 v2, 0x0

    new-array v0, v3, [F

    invoke-virtual {p0}, Lcom/android/internal/graphics/palette/Palette$Swatch;->getHsl()[F

    move-result-object v1

    invoke-static {v1, v2, v0, v2, v3}, Ljava/lang/System;->arraycopy([FI[FII)V

    return-object v0
.end method

.method private findDominantSwatch()Lcom/android/internal/graphics/palette/Palette$Swatch;
    .locals 6

    const/high16 v2, -0x80000000

    const/4 v3, 0x0

    const/4 v1, 0x0

    iget-object v5, p0, Lcom/android/internal/graphics/palette/Palette;->mSwatches:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v0

    :goto_0
    if-ge v1, v0, :cond_1

    iget-object v5, p0, Lcom/android/internal/graphics/palette/Palette;->mSwatches:Ljava/util/List;

    invoke-interface {v5, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/android/internal/graphics/palette/Palette$Swatch;

    invoke-virtual {v4}, Lcom/android/internal/graphics/palette/Palette$Swatch;->getPopulation()I

    move-result v5

    if-le v5, v2, :cond_0

    move-object v3, v4

    invoke-virtual {v4}, Lcom/android/internal/graphics/palette/Palette$Swatch;->getPopulation()I

    move-result v2

    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_1
    return-object v3
.end method

.method public static from(Landroid/graphics/Bitmap;)Lcom/android/internal/graphics/palette/Palette$Builder;
    .locals 1

    new-instance v0, Lcom/android/internal/graphics/palette/Palette$Builder;

    invoke-direct {v0, p0}, Lcom/android/internal/graphics/palette/Palette$Builder;-><init>(Landroid/graphics/Bitmap;)V

    return-object v0
.end method

.method public static from(Ljava/util/List;)Lcom/android/internal/graphics/palette/Palette;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/android/internal/graphics/palette/Palette$Swatch;",
            ">;)",
            "Lcom/android/internal/graphics/palette/Palette;"
        }
    .end annotation

    new-instance v0, Lcom/android/internal/graphics/palette/Palette$Builder;

    invoke-direct {v0, p0}, Lcom/android/internal/graphics/palette/Palette$Builder;-><init>(Ljava/util/List;)V

    invoke-virtual {v0}, Lcom/android/internal/graphics/palette/Palette$Builder;->generate()Lcom/android/internal/graphics/palette/Palette;

    move-result-object v0

    return-object v0
.end method

.method public static generate(Landroid/graphics/Bitmap;)Lcom/android/internal/graphics/palette/Palette;
    .locals 1
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    invoke-static {p0}, Lcom/android/internal/graphics/palette/Palette;->from(Landroid/graphics/Bitmap;)Lcom/android/internal/graphics/palette/Palette$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/android/internal/graphics/palette/Palette$Builder;->generate()Lcom/android/internal/graphics/palette/Palette;

    move-result-object v0

    return-object v0
.end method

.method public static generate(Landroid/graphics/Bitmap;I)Lcom/android/internal/graphics/palette/Palette;
    .locals 1
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    invoke-static {p0}, Lcom/android/internal/graphics/palette/Palette;->from(Landroid/graphics/Bitmap;)Lcom/android/internal/graphics/palette/Palette$Builder;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/android/internal/graphics/palette/Palette$Builder;->maximumColorCount(I)Lcom/android/internal/graphics/palette/Palette$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/android/internal/graphics/palette/Palette$Builder;->generate()Lcom/android/internal/graphics/palette/Palette;

    move-result-object v0

    return-object v0
.end method

.method public static generateAsync(Landroid/graphics/Bitmap;ILcom/android/internal/graphics/palette/Palette$PaletteAsyncListener;)Landroid/os/AsyncTask;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/graphics/Bitmap;",
            "I",
            "Lcom/android/internal/graphics/palette/Palette$PaletteAsyncListener;",
            ")",
            "Landroid/os/AsyncTask",
            "<",
            "Landroid/graphics/Bitmap;",
            "Ljava/lang/Void;",
            "Lcom/android/internal/graphics/palette/Palette;",
            ">;"
        }
    .end annotation

    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    invoke-static {p0}, Lcom/android/internal/graphics/palette/Palette;->from(Landroid/graphics/Bitmap;)Lcom/android/internal/graphics/palette/Palette$Builder;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/android/internal/graphics/palette/Palette$Builder;->maximumColorCount(I)Lcom/android/internal/graphics/palette/Palette$Builder;

    move-result-object v0

    invoke-virtual {v0, p2}, Lcom/android/internal/graphics/palette/Palette$Builder;->generate(Lcom/android/internal/graphics/palette/Palette$PaletteAsyncListener;)Landroid/os/AsyncTask;

    move-result-object v0

    return-object v0
.end method

.method public static generateAsync(Landroid/graphics/Bitmap;Lcom/android/internal/graphics/palette/Palette$PaletteAsyncListener;)Landroid/os/AsyncTask;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/graphics/Bitmap;",
            "Lcom/android/internal/graphics/palette/Palette$PaletteAsyncListener;",
            ")",
            "Landroid/os/AsyncTask",
            "<",
            "Landroid/graphics/Bitmap;",
            "Ljava/lang/Void;",
            "Lcom/android/internal/graphics/palette/Palette;",
            ">;"
        }
    .end annotation

    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    invoke-static {p0}, Lcom/android/internal/graphics/palette/Palette;->from(Landroid/graphics/Bitmap;)Lcom/android/internal/graphics/palette/Palette$Builder;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/android/internal/graphics/palette/Palette$Builder;->generate(Lcom/android/internal/graphics/palette/Palette$PaletteAsyncListener;)Landroid/os/AsyncTask;

    move-result-object v0

    return-object v0
.end method

.method private generateScore(Lcom/android/internal/graphics/palette/Palette$Swatch;Lcom/android/internal/graphics/palette/Target;)F
    .locals 10

    const/high16 v9, 0x3f800000    # 1.0f

    const/4 v8, 0x0

    invoke-virtual {p1}, Lcom/android/internal/graphics/palette/Palette$Swatch;->getHsl()[F

    move-result-object v0

    const/4 v4, 0x0

    const/4 v1, 0x0

    const/4 v3, 0x0

    iget-object v5, p0, Lcom/android/internal/graphics/palette/Palette;->mDominantSwatch:Lcom/android/internal/graphics/palette/Palette$Swatch;

    if-eqz v5, :cond_3

    iget-object v5, p0, Lcom/android/internal/graphics/palette/Palette;->mDominantSwatch:Lcom/android/internal/graphics/palette/Palette$Swatch;

    invoke-virtual {v5}, Lcom/android/internal/graphics/palette/Palette$Swatch;->getPopulation()I

    move-result v2

    :goto_0
    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getSaturationWeight()F

    move-result v5

    cmpl-float v5, v5, v8

    if-lez v5, :cond_0

    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getSaturationWeight()F

    move-result v5

    const/4 v6, 0x1

    aget v6, v0, v6

    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getTargetSaturation()F

    move-result v7

    sub-float/2addr v6, v7

    invoke-static {v6}, Ljava/lang/Math;->abs(F)F

    move-result v6

    sub-float v6, v9, v6

    mul-float v4, v5, v6

    :cond_0
    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getLightnessWeight()F

    move-result v5

    cmpl-float v5, v5, v8

    if-lez v5, :cond_1

    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getLightnessWeight()F

    move-result v5

    const/4 v6, 0x2

    aget v6, v0, v6

    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getTargetLightness()F

    move-result v7

    sub-float/2addr v6, v7

    invoke-static {v6}, Ljava/lang/Math;->abs(F)F

    move-result v6

    sub-float v6, v9, v6

    mul-float v1, v5, v6

    :cond_1
    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getPopulationWeight()F

    move-result v5

    cmpl-float v5, v5, v8

    if-lez v5, :cond_2

    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getPopulationWeight()F

    move-result v5

    invoke-virtual {p1}, Lcom/android/internal/graphics/palette/Palette$Swatch;->getPopulation()I

    move-result v6

    int-to-float v6, v6

    int-to-float v7, v2

    div-float/2addr v6, v7

    mul-float v3, v5, v6

    :cond_2
    add-float v5, v4, v1

    add-float/2addr v5, v3

    return v5

    :cond_3
    const/4 v2, 0x1

    goto :goto_0
.end method

.method private generateScoredTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;
    .locals 4

    invoke-direct {p0, p1}, Lcom/android/internal/graphics/palette/Palette;->getMaxScoredSwatchForTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-virtual {p1}, Lcom/android/internal/graphics/palette/Target;->isExclusive()Z

    move-result v1

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/android/internal/graphics/palette/Palette;->mUsedColors:Landroid/util/SparseBooleanArray;

    invoke-virtual {v0}, Lcom/android/internal/graphics/palette/Palette$Swatch;->getRgb()I

    move-result v2

    const/4 v3, 0x1

    invoke-virtual {v1, v2, v3}, Landroid/util/SparseBooleanArray;->append(IZ)V

    :cond_0
    return-object v0
.end method

.method private getMaxScoredSwatchForTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;
    .locals 7

    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v1, 0x0

    iget-object v6, p0, Lcom/android/internal/graphics/palette/Palette;->mSwatches:Ljava/util/List;

    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v0

    :goto_0
    if-ge v1, v0, :cond_2

    iget-object v6, p0, Lcom/android/internal/graphics/palette/Palette;->mSwatches:Ljava/util/List;

    invoke-interface {v6, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/android/internal/graphics/palette/Palette$Swatch;

    invoke-direct {p0, v5, p1}, Lcom/android/internal/graphics/palette/Palette;->shouldBeScoredForTarget(Lcom/android/internal/graphics/palette/Palette$Swatch;Lcom/android/internal/graphics/palette/Target;)Z

    move-result v6

    if-eqz v6, :cond_1

    invoke-direct {p0, v5, p1}, Lcom/android/internal/graphics/palette/Palette;->generateScore(Lcom/android/internal/graphics/palette/Palette$Swatch;Lcom/android/internal/graphics/palette/Target;)F

    move-result v4

    if-eqz v3, :cond_0

    cmpl-float v6, v4, v2

    if-lez v6, :cond_1

    :cond_0
    move-object v3, v5

    move v2, v4

    :cond_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_2
    return-object v3
.end method

.method private shouldBeScoredForTarget(Lcom/android/internal/graphics/palette/Palette$Swatch;Lcom/android/internal/graphics/palette/Target;)Z
    .locals 5

    const/4 v4, 0x2

    const/4 v3, 0x1

    invoke-virtual {p1}, Lcom/android/internal/graphics/palette/Palette$Swatch;->getHsl()[F

    move-result-object v0

    aget v1, v0, v3

    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getMinimumSaturation()F

    move-result v2

    cmpl-float v1, v1, v2

    if-ltz v1, :cond_0

    aget v1, v0, v3

    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getMaximumSaturation()F

    move-result v2

    cmpg-float v1, v1, v2

    if-gtz v1, :cond_0

    aget v1, v0, v4

    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getMinimumLightness()F

    move-result v2

    cmpl-float v1, v1, v2

    if-ltz v1, :cond_0

    aget v1, v0, v4

    invoke-virtual {p2}, Lcom/android/internal/graphics/palette/Target;->getMaximumLightness()F

    move-result v2

    cmpg-float v1, v1, v2

    if-gtz v1, :cond_0

    iget-object v1, p0, Lcom/android/internal/graphics/palette/Palette;->mUsedColors:Landroid/util/SparseBooleanArray;

    invoke-virtual {p1}, Lcom/android/internal/graphics/palette/Palette$Swatch;->getRgb()I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/util/SparseBooleanArray;->get(I)Z

    move-result v1

    xor-int/lit8 v1, v1, 0x1

    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method

# virtual methods
.method generate()V
    .locals 5

    const/4 v1, 0x0

    iget-object v3, p0, Lcom/android/internal/graphics/palette/Palette;->mTargets:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v0

    :goto_0
    if-ge v1, v0, :cond_0

    iget-object v3, p0, Lcom/android/internal/graphics/palette/Palette;->mTargets:Ljava/util/List;

    invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {v2}, Lcom/android/internal/graphics/palette/Target;->normalizeWeights()V

    iget-object v3, p0, Lcom/android/internal/graphics/palette/Palette;->mSelectedSwatches:Ljava/util/Map;

    invoke-direct {p0, v2}, Lcom/android/internal/graphics/palette/Palette;->generateScoredTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;

    move-result-object v4

    invoke-interface {v3, v2, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_0
    iget-object v3, p0, Lcom/android/internal/graphics/palette/Palette;->mUsedColors:Landroid/util/SparseBooleanArray;

    invoke-virtual {v3}, Landroid/util/SparseBooleanArray;->clear()V

    return-void
.end method

.method public getColorForTarget(Lcom/android/internal/graphics/palette/Target;I)I
    .locals 1

    invoke-virtual {p0, p1}, Lcom/android/internal/graphics/palette/Palette;->getSwatchForTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/android/internal/graphics/palette/Palette$Swatch;->getRgb()I

    move-result p2

    :cond_0
    return p2
.end method

.method public getDarkMutedColor(I)I
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->DARK_MUTED:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0, p1}, Lcom/android/internal/graphics/palette/Palette;->getColorForTarget(Lcom/android/internal/graphics/palette/Target;I)I

    move-result v0

    return v0
.end method

.method public getDarkMutedSwatch()Lcom/android/internal/graphics/palette/Palette$Swatch;
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->DARK_MUTED:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0}, Lcom/android/internal/graphics/palette/Palette;->getSwatchForTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;

    move-result-object v0

    return-object v0
.end method

.method public getDarkVibrantColor(I)I
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->DARK_VIBRANT:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0, p1}, Lcom/android/internal/graphics/palette/Palette;->getColorForTarget(Lcom/android/internal/graphics/palette/Target;I)I

    move-result v0

    return v0
.end method

.method public getDarkVibrantSwatch()Lcom/android/internal/graphics/palette/Palette$Swatch;
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->DARK_VIBRANT:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0}, Lcom/android/internal/graphics/palette/Palette;->getSwatchForTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;

    move-result-object v0

    return-object v0
.end method

.method public getDominantColor(I)I
    .locals 1

    iget-object v0, p0, Lcom/android/internal/graphics/palette/Palette;->mDominantSwatch:Lcom/android/internal/graphics/palette/Palette$Swatch;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/internal/graphics/palette/Palette;->mDominantSwatch:Lcom/android/internal/graphics/palette/Palette$Swatch;

    invoke-virtual {v0}, Lcom/android/internal/graphics/palette/Palette$Swatch;->getRgb()I

    move-result p1

    :cond_0
    return p1
.end method

.method public getDominantSwatch()Lcom/android/internal/graphics/palette/Palette$Swatch;
    .locals 1

    iget-object v0, p0, Lcom/android/internal/graphics/palette/Palette;->mDominantSwatch:Lcom/android/internal/graphics/palette/Palette$Swatch;

    return-object v0
.end method

.method public getLightMutedColor(I)I
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->LIGHT_MUTED:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0, p1}, Lcom/android/internal/graphics/palette/Palette;->getColorForTarget(Lcom/android/internal/graphics/palette/Target;I)I

    move-result v0

    return v0
.end method

.method public getLightMutedSwatch()Lcom/android/internal/graphics/palette/Palette$Swatch;
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->LIGHT_MUTED:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0}, Lcom/android/internal/graphics/palette/Palette;->getSwatchForTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;

    move-result-object v0

    return-object v0
.end method

.method public getLightVibrantColor(I)I
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->LIGHT_VIBRANT:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0, p1}, Lcom/android/internal/graphics/palette/Palette;->getColorForTarget(Lcom/android/internal/graphics/palette/Target;I)I

    move-result v0

    return v0
.end method

.method public getLightVibrantSwatch()Lcom/android/internal/graphics/palette/Palette$Swatch;
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->LIGHT_VIBRANT:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0}, Lcom/android/internal/graphics/palette/Palette;->getSwatchForTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;

    move-result-object v0

    return-object v0
.end method

.method public getMutedColor(I)I
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->MUTED:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0, p1}, Lcom/android/internal/graphics/palette/Palette;->getColorForTarget(Lcom/android/internal/graphics/palette/Target;I)I

    move-result v0

    return v0
.end method

.method public getMutedSwatch()Lcom/android/internal/graphics/palette/Palette$Swatch;
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->MUTED:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0}, Lcom/android/internal/graphics/palette/Palette;->getSwatchForTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;

    move-result-object v0

    return-object v0
.end method

.method public getSwatchForTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;
    .locals 1

    iget-object v0, p0, Lcom/android/internal/graphics/palette/Palette;->mSelectedSwatches:Ljava/util/Map;

    invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/android/internal/graphics/palette/Palette$Swatch;

    return-object v0
.end method

.method public getSwatches()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Lcom/android/internal/graphics/palette/Palette$Swatch;",
            ">;"
        }
    .end annotation

    iget-object v0, p0, Lcom/android/internal/graphics/palette/Palette;->mSwatches:Ljava/util/List;

    invoke-static {v0}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;

    move-result-object v0

    return-object v0
.end method

.method public getTargets()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Lcom/android/internal/graphics/palette/Target;",
            ">;"
        }
    .end annotation

    iget-object v0, p0, Lcom/android/internal/graphics/palette/Palette;->mTargets:Ljava/util/List;

    invoke-static {v0}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;

    move-result-object v0

    return-object v0
.end method

.method public getVibrantColor(I)I
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->VIBRANT:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0, p1}, Lcom/android/internal/graphics/palette/Palette;->getColorForTarget(Lcom/android/internal/graphics/palette/Target;I)I

    move-result v0

    return v0
.end method

.method public getVibrantSwatch()Lcom/android/internal/graphics/palette/Palette$Swatch;
    .locals 1

    sget-object v0, Lcom/android/internal/graphics/palette/Target;->VIBRANT:Lcom/android/internal/graphics/palette/Target;

    invoke-virtual {p0, v0}, Lcom/android/internal/graphics/palette/Palette;->getSwatchForTarget(Lcom/android/internal/graphics/palette/Target;)Lcom/android/internal/graphics/palette/Palette$Swatch;

    move-result-object v0

    return-object v0
.end method