text:
#include "VKBuffer.h"
#include "../VKCore.h"
#include "../VKTypes.h"
#include "../Ext/VKExtensions.h"
#include "../Ext/VKExtensionRegistry.h"

namespace LLGL
{

static VkBufferUsageFlags GetVkBufferUsageFlags(const BufferDescriptor& desc)
{
    VkBufferUsageFlags flags = VK_BUFFER_USAGE_TRANSFER_DST_BIT;

    if ((desc.bindFlags & BindFlags::VertexBuffer) != 0)
        flags |= VK_BUFFER_USAGE_VERTEX_BUFFER_BIT;
    if ((desc.bindFlags & BindFlags::IndexBuffer) != 0)
        flags |= VK_BUFFER_USAGE_INDEX_BUFFER_BIT;
    if ((desc.bindFlags & BindFlags::ConstantBuffer) != 0)
        flags |= VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT;
    if ((desc.bindFlags & (BindFlags::Sampled | BindFlags::Storage)) != 0)
        flags |= VK_BUFFER_USAGE_STORAGE_BUFFER_BIT;
    if ((desc.bindFlags & BindFlags::IndirectBuffer) != 0)
        flags |= VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT;

    if ((desc.bindFlags & BindFlags::StreamOutputBuffer) != 0)
    {
        if (HasExtension(VKExt::EXT_transform_feedback))
        {
            /* Enable transform feedback with extension VK_EXT_transform_feedback */
            flags |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT;
        }
        else
        {
            /* Error: feature not supported due to missing extension */
            throw std::runtime_error("stream output buffer not supported by Vulkan renderer");
        }
    }

    if ((desc.cpuAccessFlags & CPUAccessFlags::Read) != 0 || (desc.bindFlags & BindFlags::CopySrc) != 0)
        flags |= VK_BUFFER_USAGE_TRANSFER_SRC_BIT;

    return flags;
}

VKBuffer::VKBuffer(const VKPtr<VkDevice>& device, const BufferDescriptor& desc) :
    Buffer            { desc.bindFlags },
    bufferObj_        { device         },
    bufferObjStaging_ { device         },
    size_             { desc.size      }
{
    if ((desc.bindFlags & BindFlags::IndexBuffer) != 0)
        indexType_ = VKTypes::ToVkIndexType(desc.format);

    VkBufferCreateInfo createInfo;
    {
        createInfo.sType                    = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
        createInfo.pNext                    = nullptr;
        createInfo.flags                    = 0;
        createInfo.size                     = desc.size;
        createInfo.usage                    = GetVkBufferUsageFlags(desc);
        createInfo.sharingMode              = VK_SHARING_MODE_EXCLUSIVE;
        createInfo.queueFamilyIndexCount    = 0;
        createInfo.pQueueFamilyIndices      = nullptr;
    }
    bufferObj_.CreateVkBuffer(device, createInfo);
}

BufferDescriptor VKBuffer::GetDesc() const
{
    BufferDescriptor bufferDesc;

    bufferDesc.size             = GetSize();
    bufferDesc.bindFlags        = GetBindFlags();
    #if 0//TODO
    bufferDesc.cpuAccessFlags   = 0;
    bufferDesc.miscFlags        = 0;
    #endif

    return bufferDesc;
}

void VKBuffer::BindMemoryRegion(VkDevice device, VKDeviceMemoryRegion* memoryRegion)
{
    bufferObj_.BindMemoryRegion(device, memoryRegion);
}

void VKBuffer::TakeStagingBuffer(VKDeviceBuffer&& deviceBuffer)
{
    bufferObjStaging_ = std::move(deviceBuffer);
}

void* VKBuffer::Map(VkDevice device, const CPUAccess access)
{
    mappedCPUAccess_ = access;
    return bufferObjStaging_.Map(device);
}

void VKBuffer::Unmap(VkDevice device)
{
    bufferObjStaging_.Unmap(device);
}

} // /namespace LLGL

// ================================================================================


text:
Some text.

## Level Two

Some more text.

### Level Three

Still more text.

redpajama_set_name: RedPajamaGithub


text:
<?php
namespace Core\Html\Elements;

use Core\Html\AbstractHtml;

class Li extends AbstractHtml
{

    protected $element = 'li';
}


text:
<?php

declare(strict_types=1);

namespace Sylius\Behat\Service\Checker;

use Liip\ImagineBundle\Service\FilterService;

final class ImageExistenceChecker implements ImageExistenceCheckerInterface
{
    private FilterService $filterService;

    private string $mediaRootPath;

    public function __construct(FilterService $filterService, string $mediaRootPath)
    {
        $this->filterService = $filterService;
        $this->mediaRootPath = $mediaRootPath;
    }

    public function doesImageWithUrlExist(string $imageUrl, string $liipImagineFilter): bool
    {
        $imageUrl = str_replace($liipImagineFilter . '/', '', substr($imageUrl, strpos($imageUrl, $liipImagineFilter), strlen($imageUrl)));

        $browserImagePath = $this->filterService->getUrlOfFilteredImage($imageUrl, $liipImagineFilter);

        return file_exists($this->mediaRootPath . parse_url($browserImagePath, \PHP_URL_PATH));
    }
}


text:
module Authlogic
  module AuthenticatesMany
    # An object of this class is used as a proxy for the authenticates_many relationship. It basically allows you to "save" scope details
    # and call them on an object, which allows you to do the following:
    #
    #   @account.user_sessions.new
    #   @account.user_sessions.find
    #   # ... etc
    #
    # You can call all of the class level methods off of an object with a saved scope, so that calling the above methods scopes the user
    # sessions down to that specific account. To implement this via ActiveRecord do something like:
    #
    #   class User < ActiveRecord::Base
    #     authenticates_many :user_sessions
    #   end
    class Association
      attr_accessor :klass, :find_options, :id

      def initialize(klass, find_options, id)
        self.klass = klass
        self.find_options = find_options
        self.id = id
      end

      [:create, :create!, :find, :new].each do |method|
        class_eval <<-"end_eval", __FILE__, __LINE__
          def #{method}(*args)
            klass.with_scope(scope_options) do
              klass.#{method}(*args)
            end
          end
        end_eval
      end
      alias_method :build, :new

      private
        def scope_options
          {:find_options => find_options, :id => id}
        end
    end
  end
end


text:
import os

from setuptools import setup

def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name='OnlineNIC',
    version='0.1.2',
    url='http://github.com/kolanos/onlinenic',
    license='MIT',
    author='Michael Lavers',
    author_email='kolanos@gmail.com',
    description='A simple wrapper for the OnlineNIC API.',
    long_description=read('README.rst'),
    py_modules=['onlinenic'],
    platforms='any',
    install_requires=['BeautifulSoup'],
    classifiers=[
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ]
)


text:
function brokenFunctionObject() }

var brokenFunctionExpression = function () }


text:
function controls$design$draw$sticker ( opt ) {
  return {
    /////////////
    _createLabel: function ( direction ) {
    /////////////
      var containerStyle
        ;

      switch ( direction ) {
        case 'n': containerStyle = 'STYLE-resizeChooseHorizontal';
        break;
        case 's': containerStyle = 'STYLE-resizeChooseHorizontal';
        break;
        case 'w': containerStyle = 'STYLE-resizeChooseVerticalLeft';
        break;
        case 'e': containerStyle = 'STYLE-resizeChooseVerticalRight';
        break;
        default: containerStyle = 'STYLE-resizeChooseHorizontal';
      }//END SWITCH

       var html = '
'
             +   '
'
             +     ''+direction+''
             +   '
'
             + '
'
             ;  return html;

    }//END _CREATELABEL

    //////////
    , _pxUnit: 'px'
    //////////

    ///////
    , bind: {
    ///////
        'mouseenter.sticker': function ( event ) { event.stopImmediatePropagation(); $( this ).trigger( 'leaveBottom' ); }
      , 'mouseleave.sticker': function ( event ) { $( this ).trigger( 'mouseenter' ); }
    }// BIND END

    ////////////
    , resizable: {
    ////////////
        minHeight: 10
      , minWidth: 10
      , handles: 's,e,w,n,se'
      , ghost: true
      , helper: 'ui-resizable-helperSticker'
      , start: function ( event, ui ) {
          var $handler = $( event.originalEvent.target )
            , data = ui.element.data( 'helperResizeData', [] ).data( 'helperResizeData' )
            , directions = 'n,s,w,e,se'.split(',')
            ;

          for ( var x in directions ) {
            if ( $handler.hasClass( 'ui-resizable-' + directions[ x ] ) ) {
              data.push( directions[ x ], $( controls$design$draw$sticker( '_createLabel' )( directions[ x ][ 0 ] ) ).appendTo( 'body' ).find( '.UI-BUTTON-choose' ) );
              if ( directions[ x ][ 1 ] ) data.push( $(  controls$design$draw$sticker( '_createLabel' )( directions[ x ][ 1 ] ) ).appendTo( 'body' ).find( '.UI-BUTTON-choose' ) );
            }//END IF
          }//END LOOP
      }//END START

      , resize: function ( event, ui ) {
        var resizeLabelSticker = ui.element.data( 'helperResizeData' )
          , pxUnit = controls$design$draw$sticker('_pxUnit')
          , label = resizeLabelSticker[ 0 ]
          , width = ui.size.width
          , height =  ui.size.height
          , w = { collision:'none none', of: ui.helper, my: 'right center', at: 'left center', offset: '0 0' }
          , e = { collision:'none none', of: ui.helper, my: 'left center', at: 'right center', offset: '0 0' }
          , n = { collision:'none none', of: ui.helper, my: 'center bottom', at: 'center top', offset: '0 0' }
          , s = { collision:'none none', of: ui.helper, my: 'center top', at: 'center bottom', offset: '0 0' }
          ;

        for ( var i in resizeLabelSticker ) {
          if ( i > 0 ) {
            var $currentLabel = resizeLabelSticker[ i ]
              , $sticker = $currentLabel.parent().parent()
              , stickerPos = $sticker.width() / 2
              ;

            if ( label == 'w' ) {
              $sticker.position( w );
              $currentLabel.html( width + pxUnit );
            }//END IF
            else if (  label == 'e' ) {
              $sticker.position( e );
              $currentLabel.html( width + pxUnit );
            }//END ELSE IF
            else if ( label == 'n'  ) {
              $sticker.position( n );
              $currentLabel.html( height + pxUnit );
            }//END ELSE IF
            else if ( label == 's' ) {
               $sticker.position( s );
               $currentLabel.html( height + pxUnit );
            }//END ELSE IF
            else if ( label == 'se' ) {
              if ( i == 1 ) {
                $sticker.position(e);
                $currentLabel.html( height + pxUnit );

              } else {
                $sticker.position(s);
                $currentLabel.html( width + pxUnit );
              } //END IF/ELSE
            }//END ELSE IF
          }//END IF
        }//END LOOP
      }//END RESIZE
      , stop: function ( event, ui ) {
          var stickerList = ui.element.data( 'helperResizeData' )
            , grid =  ui.element.closest( '.GRID' )
            ;

          for ( var sticker in stickerList  ) $( stickerList[ sticker ] ).parent().parent().remove();
          ui.element.removeData( 'helperResizeData' );
          grid.styleable( 'resize', ui.element, ui.size.height, ui.size.width, parseInt( ui.element.css( 'left' ) ), parseInt( ui.element.css( 'top' ) ));

      }//END STOP
    }//END RESIZABLE

    ////////////
    , draggable: {
    ////////////
        containment: '.STAGE'
      , start: function ( event, ui ) {
          var data = $( this ).data( 'helperResizeData', [] ).data( 'helperResizeData' );
          data.push(
            $(  controls$design$draw$sticker( '_createLabel' )( 'n' ) ).appendTo( 'body' ).find( '.UI-BUTTON-choose' )
          , $(  controls$design$draw$sticker( '_createLabel' )( 'w' ) ).appendTo( 'body' ).find( '.UI-BUTTON-choose' )
          )
          ;
      }//END START
      , drag: function ( event, ui ) {
          var resizeLabelSticker = $(this).data( 'helperResizeData')
            , n = { collision:'none none', of: ui.helper, my: 'center bottom', at: 'center top', offset: '0 0' }
            , w = { collision:'none none', of: ui.helper, my: 'right center', at: 'left center', offset: '0 0' }
            , $top = resizeLabelSticker[ 0 ]
            , $left = resizeLabelSticker[ 1 ]
            , $topSticker = resizeLabelSticker[ 0 ].parent().parent()
            , $leftSticker = resizeLabelSticker[ 1 ].parent().parent()
            ;

          $top.html( Math.round( ui.position.top )  + controls$design$draw$sticker( '_pxUnit' ) );
          $topSticker.position( n );

          $left.html( Math.round( ui.position.left ) + controls$design$draw$sticker( '_pxUnit' ) );
          $leftSticker.position( w );

      }//END DRAG
      , stop: function ( event, ui ) {
          var $this = $( this )
            , grid =  $this.closest( '.GRID' )
            , stickerList = $this.data( 'helperResizeData' )
            ;

          for ( var sticker in stickerList  ) $( stickerList[ sticker ] ).parent().parent().remove();
          $this.removeData( 'helperResizeData' );
          grid.styleable( 'resize', $this, $this.height(),  $this.width(), Math.round( ui.position.left ),  Math.round( ui.position.top ) );
      }//END STOP
    }//END DRAGABLE

    //////////////////
    , dev_gadgetFocus: {
    //////////////////
        activate: function ( event, ui ) {
          createdesign$draw( '_focusStart' )( ui );
          ui.element.resizable( 'disable' );// DISABLE RESIZABLE
          ui.element.draggable( 'disable' );// ENABLE REZISABLE
          createdesign$draw( '_showOnFocusByTask' )( ui.element, ui.element.data( 'styleable_item' ).task )
          ui.element.dev_gadgetRules( 'removeOverlay' );//Remove overlay from container
        }//END ACTIVATE

      , deactivate: function ( event, ui ) {
          createdesign$draw( '_focusStop' )( ui );
          ui.element.resizable( 'enable' );// DISABLE RESIZABLE
          ui.element.draggable( 'enable' );// ENABLE REZISABLE
          ui.element.dev_gadgetRules( 'reset' );//Rest subgrid overlay if nessesary
          createdesign$draw( '_hideOnDeFocusByTask' )( ui.element, ui.element.data( 'styleable_item' ).task )
        }//END DEACTIVATE
      }//END FOCUS

  }[ opt ]
  ;
}
;


text:
//-----------------------------------------------------------------------------------
//  Copyright (c) Microsoft Corporation.  All rights reserved.
//
//  The MIT License (MIT)
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//  ---------------------------------------------------------------------------------

using System.Threading.Tasks;
using System.Web.Configuration;
using System.Web.Http;
using Microsoft.ApplicationInsights;
using Microsoft.Azure.Mobile.Server.Config;
using PhotoSharingApp.AppService.Helpers;
using PhotoSharingApp.AppService.ServiceCore;
using PhotoSharingApp.AppService.Shared;
using PhotoSharingApp.AppService.Shared.Repositories;
using PhotoSharingApp.AppService.Shared.Validation;
using PhotoSharingApp.Portable.DataContracts;

namespace PhotoSharingApp.AppService.Controllers
{
    /// <summary>
    /// Controller to manage photos.
    /// </summary>
    [MobileAppController]
    public class PhotoController : BaseController
    {
        private readonly IPhotoValidation _photoValidation;
        private readonly IRepository _repository;
        private readonly TelemetryClient _telemetryClient;

        /// <summary>
        /// Controller for photo operations.
        /// </summary>
        /// <param name="repository">Data layer.</param>
        /// <param name="telemetryClient">Telemetry client.</param>
        /// <param name="photoValidation">Validation layer.</param>
        /// <param name="userRegistrationReferenceProvider">The user registration reference provider.</param>
        public PhotoController(IRepository repository, TelemetryClient telemetryClient,
            IPhotoValidation photoValidation, IUserRegistrationReferenceProvider userRegistrationReferenceProvider)
            : base(userRegistrationReferenceProvider)
        {
            _repository = repository;
            _telemetryClient = telemetryClient;
            _photoValidation = photoValidation;
        }

        /// <summary>
        /// Deletes the provided photo id.
        /// </summary>
        /// <verb>DELETE</verb>
        /// <url>http://{host}/api/photo/{id}</url>
        /// <param name="id">Photo Id to be deleted.</param>
        [Authorize]
        [Route("api/photo/{id}")]
        public async Task DeleteAsync(string id)
        {
            try
            {
                _telemetryClient.TrackEvent("PhotoController DeleteAsync invoked");
                var registrationReference = await ValidateAndReturnCurrentUserId();

                await _repository.DeletePhoto(id, registrationReference);
            }
            catch (DataLayerException ex)
            {
                _telemetryClient.TrackException(ex);

                if (ex.Error == DataLayerError.Unknown)
                {
                    throw ServiceExceptions.UnknownInternalFailureException(ServiceExceptions.Source);
                }

                throw ServiceExceptions.DataLayerException(ex.Message);
            }
        }

        /// <summary>
        /// Gets the data for provided photo id.
        /// </summary>
        /// <verb>GET</verb>
        /// <url>http://{host}/api/photo/{id}</url>
        /// <param name="id">Photo Id for which data needs to be fetched.</param>
        /// <returns>Photo Contract.</returns>
        [Route("api/photo/{id}")]
        public async Task<PhotoContract> GetAsync(string id)
        {
            try
            {
                _telemetryClient.TrackEvent("PhotoController GetAsync invoked");

                return await _repository.GetPhoto(id);
            }
            catch (DataLayerException ex)
            {
                _telemetryClient.TrackException(ex);

                if (ex.Error == DataLayerError.Unknown)
                {
                    throw ServiceExceptions.UnknownInternalFailureException(ServiceExceptions.Source);
                }

                throw ServiceExceptions.DataLayerException(ex.Message);
            }
        }

        /// <summary>
        /// Inserts a new photo.
        /// </summary>
        /// <verb>POST</verb>
        /// <url>http://{host}/api/photo</url>
        /// <param name="photo">Photo Contract.</param>
        /// <returns>Photo object.</returns>
        [Authorize]
        [Route("api/photo")]
        public async Task<PhotoContract> PostAsync(PhotoContract photo)
        {
            try
            {
                _telemetryClient.TrackEvent("PhotoController PostAsync invoked");
                await ValidateAndReturnCurrentUserId();

                int goldIncrement;
                int.TryParse(WebConfigurationManager.AppSettings["NewPhotoAward"], out goldIncrement);

                return await _repository.InsertPhoto(photo, goldIncrement);
            }
            catch (DataLayerException ex)
            {
                _telemetryClient.TrackException(ex);

                if (ex.Error == DataLayerError.Unknown)
                {
                    throw ServiceExceptions.UnknownInternalFailureException(ServiceExceptions.Source);
                }

                throw ServiceExceptions.DataLayerException(ex.Message);
            }
        }

        /// <summary>
        /// Updates an existing photo.
        /// </summary>
        /// <verb>PUT</verb>
        /// <url>http://{host}/api/photo</url>
        /// <param name="photo">Photo Contract.</param>
        /// <returns>Photo object.</returns>
        [Authorize]
        [Route("api/photo")]
        public async Task<PhotoContract> PutAsync(PhotoContract photo)
        {
            try
            {
                _telemetryClient.TrackEvent("Auth: PhotoController PutAsync invoked");

                var registrationReference = await ValidateAndReturnCurrentUserId();

                if (!await _photoValidation.IsUserPhotoOwner(registrationReference, photo.Id))
                {
                    throw ServiceExceptions.NotAllowed();
                }

                return await _repository.UpdatePhoto(photo);
            }
            catch (DataLayerException ex)
            {
                _telemetryClient.TrackException(ex);

                if (ex.Error == DataLayerError.Unknown)
                {
                    throw ServiceExceptions.UnknownInternalFailureException(ServiceExceptions.Source);
                }

                throw ServiceExceptions.DataLayerException(ex.Message);
            }
        }
    }
}


text:
<?php
class Data_model extends CI_Model {

    public $title;
    public $content;
    public $date;
    public function __construct()
    {
        parent::__construct();
    }
    public function getData($table, $limit = 100, $start=0, $end =0) {
        if($start != 0 && $end !=0 ) {
        $result = $this->mongo_db->where_between("time",$start/1000,$end/1000)->limit($limit)->get($table);
    } else {
        $result = $this->mongo_db->limit($limit)->get($table);
    }

        return $result;
    }

    public function insert_entry()
    {
            $this->title    = $_POST['title']; // please read the below note
            $this->content  = $_POST['content'];
            $this->date     = time();

            $this->db->insert('entries', $this);
    }

    public function update_entry()
    {
            $this->title    = $_POST['title'];
            $this->content  = $_POST['content'];
            $this->date     = time();

            $this->db->update('entries', $this, array('id' => $_POST['id']));
    }
}


text:
#ifndef _FENV_H_
#define _FENV_H_

#ifdef __cplusplus
extern "C" {
#endif

/* Primary sources:

     The Open Group Base Specifications Issue 6:
   http://www.opengroup.org/onlinepubs/000095399/basedefs/fenv.h.html

     C99 Language spec (draft n1256):
   <url unknown>

     Intel® 64 and IA-32 Architectures Software Developer's Manuals:
   http://www.intel.com/products/processor/manuals/

     GNU C library manual pages:
   http://www.gnu.org/software/libc/manual/html_node/Control-Functions.html
   http://www.gnu.org/software/libc/manual/html_node/Rounding.html
   http://www.gnu.org/software/libc/manual/html_node/FP-Exceptions.html
   http://www.gnu.org/software/libc/manual/html_node/Status-bit-operations.html

     Linux online man page(s):
   http://linux.die.net/man/3/fegetexcept

    The documentation quotes these sources for reference.  All definitions and
   code have been developed solely based on the information from these specs.

*/

/*  Represents the entire floating-point environment. The floating-point
   environment refers collectively to any floating-point status flags and
   control modes supported by the implementation.
    In this implementation, the struct contains the state information from
   the fstenv/fnstenv instructions and a copy of the SSE MXCSR, since GCC
   uses SSE for a lot of floating-point operations.  (Cygwin assumes i686
   or above these days, as does the compiler.)  */

typedef struct _fenv_t
{
  struct _fpu_env_info {
    unsigned int _fpu_cw;	/* low 16 bits only. */
    unsigned int _fpu_sw;	/* low 16 bits only. */
    unsigned int _fpu_tagw;	/* low 16 bits only. */
    unsigned int _fpu_ipoff;
    unsigned int _fpu_ipsel;
    unsigned int _fpu_opoff;
    unsigned int _fpu_opsel;	/* low 16 bits only. */
  } _fpu;
  unsigned int _sse_mxcsr;
} fenv_t;

/*  Represents the floating-point status flags collectively, including
   any status the implementation associates with the flags. A floating-point
   status flag is a system variable whose value is set (but never cleared)
   when a floating-point exception is raised, which occurs as a side effect
   of exceptional floating-point arithmetic to provide auxiliary information.
    A floating-point control mode is a system variable whose value may be
   set by the user to affect the subsequent behavior of floating-point
   arithmetic.  */

typedef struct _fexcept_t
{
  unsigned short _fpu_exceptions;
  unsigned short _sse_exceptions;
} fexcept_t;

/*  The <fenv.h> header shall define the following constants if and only
   if the implementation supports the floating-point exception by means
   of the floating-point functions feclearexcept(), fegetexceptflag(),
   feraiseexcept(), fesetexceptflag(), and fetestexcept(). Each expands to
   an integer constant expression with values such that bitwise-inclusive
   ORs of all combinations of the constants result in distinct values.  */

#define FE_DIVBYZERO	(1 << 2)
#define FE_INEXACT	(1 << 5)
#define FE_INVALID	(1 << 0)
#define FE_OVERFLOW	(1 << 3)
#define FE_UNDERFLOW	(1 << 4)

/*  This is not defined by Posix, but since x87 supports it we provide
   a definition according to the same naming scheme used above.  */
#define FE_DENORMAL	(1 << 1)

/*  The <fenv.h> header shall define the following constant, which is
   simply the bitwise-inclusive OR of all floating-point exception
   constants defined above:  */

#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID \
			| FE_OVERFLOW | FE_UNDERFLOW | FE_DENORMAL)

/*  The <fenv.h> header shall define the following constants if and only
   if the implementation supports getting and setting the represented
   rounding direction by means of the fegetround() and fesetround()
   functions. Each expands to an integer constant expression whose values
   are distinct non-negative vales.  */

#define FE_DOWNWARD	(1)
#define FE_TONEAREST	(0)
#define FE_TOWARDZERO	(3)
#define FE_UPWARD	(2)

/*  Precision bit values.  Not defined by Posix, but follow logically.  */
#define FE_SINGLEPREC	(0)
#define FE_RESERVEDPREC	(1)
#define FE_DOUBLEPREC	(2)
#define FE_EXTENDEDPREC	(3)

/*  The <fenv.h> header shall define the following constant, which
   represents the default floating-point environment (that is, the one
   installed at program startup) and has type pointer to const-qualified
   fenv_t. It can be used as an argument to the functions within the
   <fenv.h> header that manage the floating-point environment.  */

extern const fenv_t *_fe_dfl_env;
#define FE_DFL_ENV (_fe_dfl_env)

/*  Additional implementation-defined environments, with macro
   definitions beginning with FE_ and an uppercase letter,and having
   type "pointer to const-qualified fenv_t",may also be specified by
   the implementation.  */

#ifdef _GNU_SOURCE
/*  If possible, the GNU C Library defines a macro FE_NOMASK_ENV which
   represents an environment where every exception raised causes a trap
   to occur. You can test for this macro using #ifdef. It is only defined
   if _GNU_SOURCE is defined.  */
extern const fenv_t *_fe_nomask_env;
#define FE_NOMASK_ENV (_fe_nomask_env)
#endif /* _GNU_SOURCE */

/*  The following shall be declared as functions and may also be
   defined as macros. Function prototypes shall be provided.  */
extern int feclearexcept (int excepts);
extern int fegetexceptflag (fexcept_t *flagp, int excepts);
extern int feraiseexcept (int excepts);
extern int fesetexceptflag (const fexcept_t *flagp, int excepts);
extern int fetestexcept (int excepts);
extern int fegetround (void);
extern int fesetround (int round);
extern int fegetenv (fenv_t *envp);
extern int feholdexcept (fenv_t *envp);
extern int fesetenv (const fenv_t *envp);
extern int feupdateenv (const fenv_t *envp);

/* These are not defined in Posix, but make sense by obvious extension.  */
extern int fegetprec (void);
extern int fesetprec (int prec);

/* This is Cygwin-custom, not from the standard, for use in the Cygwin CRT.  */
extern void _feinitialise (void);

/* These are GNU extensions defined in glibc.  */
extern int feenableexcept (int excepts);
extern int fedisableexcept (int excepts);
extern int fegetexcept (void);

#ifdef __cplusplus
}
#endif

#endif /* _FENV_H_ */


text:
module Treetop
  module Compiler
    class Choice < ParsingExpression
      def compile(address, builder, parent_expression = nil)
        super
        begin_comment(self)
        use_vars :result, :start_index
        compile_alternatives(alternatives)
        end_comment(self)
      end

      def compile_alternatives(alternatives)
        obtain_new_subexpression_address
        alternatives.first.compile(subexpression_address, builder)
        builder.if__ subexpression_success? do
          assign_result subexpression_result_var
          extend_result_with_declared_module
          extend_result_with_inline_module
        end
        builder.else_ do
          if alternatives.size == 1
            reset_index
            assign_failure start_index_var
          else
            compile_alternatives(alternatives[1..-1])
          end
        end
      end
    end
  end
end


text:
package com.ab.util;

import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;

// TODO: Auto-generated Javadoc
/**
 * © 2012 amsoft.cn
 * 名称:AbDes.java
 * 描述:DES工具类.
 *
 * @author 还如一梦中
 * @version v1.0
 * @date:2011-11-10 下午11:52:13
 */
public class AbDes {

	private byte[] iv;

	public AbDes(byte[] iv) {
		super();
		this.iv = iv;
	}

	public static AbDes newInstance(byte[] iv) {
		AbDes des = new AbDes(iv);
		return des;
	}

	public String encrypt(byte[] encryptByte, String encryptKey) {
		try {
			IvParameterSpec zeroIv = new IvParameterSpec(iv);
			SecretKeySpec key = new SecretKeySpec(encryptKey.getBytes(), "DES");
			Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
			cipher.init(Cipher.ENCRYPT_MODE, key, zeroIv);
			byte[] encryptedData = cipher.doFinal(encryptByte);
			return AbBase64.encode(encryptedData);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public byte[] decrypt(String encryptString, String encryptKey) {
		try {
			byte[] encryptByte = AbBase64.decode(encryptString);
			IvParameterSpec zeroIv = new IvParameterSpec(iv);
			SecretKeySpec key = new SecretKeySpec(encryptKey.getBytes(), "DES");
			Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
			cipher.init(Cipher.DECRYPT_MODE, key, zeroIv);
			return cipher.doFinal(encryptByte);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	/**
     * The main method.
     *
     * @param args the arguments
     */
    public static void main(String[] args) {
    	AbDes des = AbDes.newInstance("yxs!1sdf".getBytes());
    	String a = des.encrypt("ssssss".getBytes(),"bywhjgpt");
    	System.out.println(a);
		System.out.println(des.decrypt(a,"bywhjgpt"));
	}
}


text:
package org.neo4art.importer.wikipedia.parser.util;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class InfoboxCollectionsParser
{

  private static Log logger = LogFactory.getLog(InfoboxCollectionsParser.class);

  public InfoboxCollectionsParser()
  {

  }

  public static String infoboxCollectionCount(String coll)
  {
    try
    {
      if(coll.contains("<"))
      {
        String[] da = StringUtils.split(coll, "<");

        return da[0];
      }
    }
    catch (Exception e)
    {
      logger.error("Error parsing Collections infobox: " + e.getMessage());
    }

    return null;
  }

}


text:
layout: page
title: Bridges Research Dinner
date: 2016-05-24
author: Andrea Jennings
tags: weekly links, java
status: published
summary: Cum sociis natoque penatibus et.
banner: images/banner/leisure-05.jpg
booking:
  startDate: 03/10/2017
  endDate: 03/12/2017
  ctyhocn: SPLNJHX
  groupCode: BRD
published: true
---
Nam id vulputate nisl. Morbi molestie porttitor orci, et tincidunt dolor lacinia id. Nulla facilisi. Quisque fermentum accumsan feugiat. Praesent magna arcu, congue sed feugiat sit amet, volutpat nec ligula. Etiam tincidunt pharetra imperdiet. Fusce laoreet maximus scelerisque. Nunc nec magna a augue gravida scelerisque. Aenean nec quam ut tortor gravida lobortis. Curabitur semper orci quis leo fringilla, vitae viverra arcu lacinia.

1 Suspendisse venenatis risus ut erat aliquet posuere quis vel metus
1 Duis mollis turpis id fringilla ultrices
1 Pellentesque porta magna hendrerit, mollis est a, dapibus ipsum
1 Etiam sit amet lectus aliquet, porttitor lectus at, rutrum mi.

Phasellus eu velit ut tellus fringilla congue. In a luctus tellus. Morbi volutpat, metus et hendrerit ultrices, massa purus fermentum ante, vitae iaculis turpis erat a lectus. Fusce finibus, lectus ac euismod euismod, tortor tellus fringilla libero, at varius enim ligula eget sapien. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras vestibulum vitae metus quis mollis. Suspendisse vulputate magna ornare magna sollicitudin, at vulputate eros volutpat.


text:
<?xml version="1.0" encoding="utf-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
 <item android:drawable="@drawable/splash_back" />
 <item>
	<bitmap
     android:gravity="center"
     android:src="@drawable/movies" />
 </item>
</layer-list>


text:
class UniqueBTreeNode;

class UniqueBTreeNode_NeedSplit {};

class UniqueBTreeSuperblock {
	Block *block;

public:
	uint32_t &keySize;
	uint32_t &rootNodeId;
	UniqueBTreeSuperblock(Block *block);
	~UniqueBTreeSuperblock();

	void update();
};

class UniqueBTree {
	UniqueBTreeNode *root;

public:
	BlockStorage storage;

	UniqueBTreeSuperblock *superblock;
	uint32_t keySize;
	uint32_t blockSize;

	UniqueBTree(const char *filename, bool readOnlyMode = false);
	~UniqueBTree();

	void create(size_t blockSize);
	void load();
	void reload();
	bool add(const void *key);
	bool check(const void *key);

	void setKeySize(unsigned char size);

	UniqueBTreeNode *get(uint32_t id);
};

#endif


text:
#include "../Headers/stdafx.h"
#include "../Headers/Session.hpp"
#include "../Headers/Server.hpp"

std::string ReplaceString(std::string subject, const std::string& search, const std::string& replace)
{
	size_t pos = 0;
	while ((pos = subject.find(search, pos)) != std::string::npos)
	{
		subject.replace(pos, search.length(), replace);
		pos += replace.length();
	}
	return subject;
}

void Session::Initialize()
{

	SetSocketOptions();

	local_ = socket_.local_endpoint().address().to_string();
	remote_ = socket_.remote_endpoint().address().to_string();
	localp_ = socket_.local_endpoint().port();
	remotep_ = socket_.remote_endpoint().port();

	m_aulLastReceiveTime.store(GetTickCount64());
	m_aulReceiveCount.store(0);
	m_aulPrevReceiveCount.store(0);

	/* Generate ID for this session */
	/*char buf[256];

	std::string withoutDots = ReplaceString(remote_, ".", "");
	sprintf_s(buf, "%s%hu", withoutDots.c_str(), remotep_);

	m_ulSessionID = _atoi64(buf);*/

}

void Session::SetSocketOptions()
{
	socket_.set_option(boost::asio::socket_base::send_buffer_size(INTERNAL_SEND_BUFFER_SIZE));
	socket_.set_option(boost::asio::socket_base::receive_buffer_size(INTERNAL_RECV_BUFFER_SIZE));

#ifdef USE_KEEP_ALIVE
	socket_.set_option(boost::asio::socket_base::keep_alive(true));
#endif

#ifdef USE_TCP_NODELAY
	socket_.set_option(tcp::no_delay(true));
#endif
}

void Session::CheckAlive()
{
	if (isDisconnected)
	{
		// printf("disconnected, but lingering..\n");
		((Server<Session>*)serverPtr)->OnBrokenSession(shared_from_this());
		return;
	}
}

/*
	Sends given buffer to the connected endpoint.
	@params
	void * buf			The buffer to send.
	size_t len			The length of the buffer.
*/
void Session::Send(void * buf, size_t len)
{
	boost::asio::async_write
		(
		socket_,
		boost::asio::buffer(buf, len),
		// Bind callback function
		boost::bind
		(
		&Session::OnWriteCompleted,
		shared_from_this(),
		boost::asio::placeholders::error,
		boost::asio::placeholders::bytes_transferred)
		);
}

void Session::DispatchRead()
{
	if (isDisconnected)
		return;

	unsigned long long curTick = GetTickCount64();

	/*
	Auto kick sessions which are inactive
	*/
#ifdef AUTOKICK_INACTIVE_SESSIONS
	unsigned long long diff = curTick - m_aulLastReceiveTime;
	if (diff >= MAX_NO_RESPONSE_PERIOD)
	{
		printf("> socket_dispatchread \n	socket is inactive for [ %llu ] seconds\n	disconnecting..\n>\n", diff / 1000);
		Disconnect();
		return;
	}

#endif

	/*
	Auto kick flooding sessions
	*/
#if 0 /*AUTOKICK_ON_EXCESSIVE_TRANSMISSION*/
	/* TO-DO : It spends way too much unneccessary CPU time.*/
	/* The old method*/
	if (socket_.available() > MAX_TRANSMISSION_AMOUNT)
	{
		printf("> socket_dispatchread \n	someone's probably flooding(avail too high) [ %u ]\n	disconnecting..\n>\n", socket_.available());
		Disconnect();
		return;
	}
#endif

	m_aulReceiveCount++;

	if (curTick - m_aulLastReceiveTime >= 1000)
	{
#ifdef AUTOKICK_ON_EXCESSIVE_RECV
		if (m_aulReceiveCount - m_aulPrevReceiveCount > MAX_RECV_COUNT_PER_SEC)
		{
			printf("> socket_dispatchread \n	someone's probably flooding(packet per second) [ %d ]\n	disconnecting..\n>\n", m_aulReceiveCount - m_aulPrevReceiveCount);
			Disconnect();
			return;
		}
#endif
		m_aulPrevReceiveCount.store(m_aulReceiveCount);
		m_aulLastReceiveTime.store(GetTickCount64());
	}

	boost::asio::async_read
		(
		// Socket to read from
		socket_,
		// Buffer
		boost::asio::buffer(m_readBuffer.GetBuffer(), m_readBuffer.GetSpace()),
		// Minimum transfer amount
		boost::asio::transfer_at_least(MIN_RECV_TRANSFER_AMOUNT),
		boost::bind
		(
		&Session::OnReadCompleted,
		shared_from_this(),
		boost::asio::placeholders::error,
		boost::asio::placeholders::bytes_transferred
		)
		);
}

#pragma warning(suppress: 6262)
void Session::DispatchParse(size_t rSize)
{
	if (isDisconnected)
		return;

	#ifdef AUTOKICK_ON_EXCESSIVE_TRANSMISSION
	/* The new implementation */
	if (rSize > MAX_TRANSMISSION_AMOUNT)
	{
		printf("> socket_dispatchparse \n	someone's probably flooding(avail too high) [ %u ]\n	disconnecting..\n>\n", rSize);
		Disconnect();
		return;
	}

	#endif

	unsigned char first_chunk[2 + SIZE_TYPE];
	unsigned char head[2], tail[2], tmpSize[SIZE_TYPE];
    char core[MAX_INDIVIDUAL_PACKET_SIZE];

	__int64 size = 0;

	// We need at least 7 byte(s) to issue a parse.
	if (m_readBuffer.GetSize() < MIN_RECV_TRANSFER_AMOUNT)
		return;

	memcpy(&first_chunk, m_readBuffer.GetBufferStart(), 2 + SIZE_TYPE);
	memcpy(&head, &first_chunk, 2);
	memcpy(&tmpSize, &first_chunk[2], SIZE_TYPE);

	// Check the packet header
	if (memcmp(head, (unsigned char*)(HEADER), 2) == 0)
	{
		// Read the size of the content

		switch (SIZE_TYPE)
		{
		case 2:
			size = ((short*)tmpSize)[0];
			break;
		case 4:
			size = ((__int32*)tmpSize)[0];
			break;
		case 8:
			size = ((__int64*)tmpSize)[0];
			break;
		}
		//printf("size :%d\n", m_readBuffer.GetSize());
		// Confirm that content size + header + 4 + tail matches received amount.
		// Confirm that size is not minus.
		if (size <= 0 || size > MAX_INDIVIDUAL_PACKET_SIZE)
		{
			// That means something's wrong with this packet.
			// We should disconnect this session.
			printf("< dispatch_parse\n	session [%s:%hu]\n	either content size is zero or exceeds the maximum amount.\n	disconnecting..\n>\n", GetRemoteIPAddress().c_str(), GetRemotePort());
			Disconnect();
		}

		if (m_readBuffer.GetSize() >= (unsigned int)(4 + SIZE_TYPE + size))
		{
			m_readBuffer.Remove(2 + SIZE_TYPE);
			// Read the message to the new allocated buffer
			m_readBuffer.Read(&core, size);
			// Read the tail
			m_readBuffer.Read((char*)tail, 2);

			if (memcmp(tail, (unsigned char*)(TAIL), 2) == 0)
			{
				// Valid packet.
				// TO-DO : Process it.
				OnDataReceived(&core[0], size);
			} // EOF tail check
		} // EOF size > 0
		else
		{
			if (++fragment_count == MAX_PACKET_FRAGMENT_COUNT)
			{
				printf("< dispatch_parse \n	fragmentation level exceeded maximum value.\n	disconnecting..\n>\n");
				Disconnect();
				return;
			}
			else
				return;
		}

		/*

		Else, it means we don't have the whole data yet.
		But, it should never happen.

		We're using async_read_until to read data from socket, so incoming data
		always must have "the tail".

		*/
	}
	else
	{
		printf("< session_dispatchparse\n	Header mismatch.\n	Value : [%x,%x]\n>\n", head[0], head[1]);
		Disconnect();
	}
}

void Session::OnConnect()
{
	// Start reading..
	DispatchRead();
	/*
		Call the virtual function to inform inherited class
	*/
	OnConnected();
}

void Session::OnWriteCompleted(const boost::system::error_code&, size_t s)
{
	//	TO-DO: Implement this.
	((Server<Session>*)serverPtr)->OnSend(s);
}

void Session::OnReadCompleted(const boost::system::error_code& err, size_t s)
{
	// scoped lock
	{
		boost::unique_lock<boost::recursive_mutex> scoped_lock(readMutex);

		switch (err.value())
		{
		case ERROR_SUCCESS:
		case boost::asio::error::in_progress:
		case boost::asio::error::operation_aborted:
			break;
			// Operation aborted error only occurs when socket is closed by us.
			return;
		default:
			Disconnect();
			return;
		}

		// Commit the data
		m_readBuffer.IncrementWritten(s);

		// Parse incoming data
		DispatchParse(s);

		// Update the recv amount..
		((Server<Session>*)serverPtr)->OnReceive(s);

		// Dispatch the read event again
		if (!isDisconnected)
			DispatchRead();
	}
}

void Session::Disconnect()
{
	boost::unique_lock<boost::recursive_mutex> scoped_lock(readMutex);
	{

		if (isDisconnected)
			return;
		isDisconnected = true;
		socket_.close();
		/*
			Call the virtual function.
		*/
		OnDisconnected();
		((Server<Session>*)serverPtr)->OnSessionDisconnect(shared_from_this());
	}
}


text:
namespace TraktApiSharp.Objects.Get.Users.Statistics.Json.Writer
{
    using Newtonsoft.Json;
    using Objects.Json;
    using System;
    using System.Threading;
    using System.Threading.Tasks;

    internal class UserSeasonsStatisticsObjectJsonWriter : AObjectJsonWriter<ITraktUserSeasonsStatistics>
    {
        public override async Task WriteObjectAsync(JsonTextWriter jsonWriter, ITraktUserSeasonsStatistics obj, CancellationToken cancellationToken = default)
        {
            if (jsonWriter == null)
                throw new ArgumentNullException(nameof(jsonWriter));

            await jsonWriter.WriteStartObjectAsync(cancellationToken).ConfigureAwait(false);

            if (obj.Ratings.HasValue)
            {
                await jsonWriter.WritePropertyNameAsync(JsonProperties.USER_SEASONS_STATISTICS_PROPERTY_NAME_RATINGS, cancellationToken).ConfigureAwait(false);
                await jsonWriter.WriteValueAsync(obj.Ratings, cancellationToken).ConfigureAwait(false);
            }

            if (obj.Comments.HasValue)
            {
                await jsonWriter.WritePropertyNameAsync(JsonProperties.USER_SEASONS_STATISTICS_PROPERTY_NAME_COMMENTS, cancellationToken).ConfigureAwait(false);
                await jsonWriter.WriteValueAsync(obj.Comments, cancellationToken).ConfigureAwait(false);
            }

            await jsonWriter.WriteEndObjectAsync(cancellationToken).ConfigureAwait(false);
        }
    }
}


text:
artifacts_location=$1
artifacts_location_sas_token=$2

clouddriver_config_file="/opt/spinnaker/config/clouddriver-local.yml"

# Configure Spinnaker for DockerHub
sudo wget -O $clouddriver_config_file "${artifacts_location}resources/docker_only.yml${artifacts_location_sas_token}"

# Restart spinnaker so that config changes take effect
sudo restart spinnaker


text:
=head1 NAME

SGN::View::Mason - Mason View Component for SGN

=head1 DESCRIPTION

Mason View Component for SGN. This extends Catalyst::View::HTML::Mason.

=cut

package SGN::View::Mason;
use Moose;
use Moose::Util::TypeConstraints;
use namespace::autoclean;

extends 'Catalyst::View::HTML::Mason';
with 'Catalyst::Component::ApplicationAttribute';

__PACKAGE__->config(
    globals => ['$c'],
    template_extension => '.mas',
    interp_args => {
        data_dir => SGN->tempfiles_base->subdir('mason'),
        comp_root => [
            [ main => SGN->path_to('mason') ],
        ],
        preamble => "use utf8; ",
    },
);

=head1 CONFIGURATION SETTINGS (which are also accessors)

=head2 add_comp_root

Configurable arrayref of additional Mason component roots.  These will
be searched before the default ones.  Must be absolute paths.

=cut

# munges the interp_args comp_root to include the add_comp_root
# configuration, plus the comp roots for SiteFeatures
sub COMPONENT {
    my ( $class, $c, $args ) = @_;

    $args = $class->merge_config_hashes( $class->config, $args );

    # coerce add_comp_root to arrayref
    if( $args->{add_comp_root} && ! ref $args->{add_comp_root} ) {
        $args->{add_comp_root} = [ $args->{add_comp_root} ];
    }

    # add comp roots for features and add_comp_root
    unshift @{ $args->{interp_args}->{comp_root} }, (
            # add_comp_root
            ( map [ additional => $_ ], @{ $args->{add_comp_root} || [] } ),
            # SiteFeatures
            ( map [ $_->feature_name, $_->path_to('mason')], $c->features ),
    );

    return $class->new($c, $args);
}

=head1 FUNCTIONS

=head2 $self->component_exists($component)

Check if a Mason component exists. Returns 1 if the component exists, otherwise 0.

=cut

sub component_exists {
    my ( $self, $component ) = @_;

    return $self->interp->comp_exists( $component ) ? 1 : 0;
}

=head1 SEE ALSO

L<SGN>, L<HTML::Mason>, L<Catalyst::View::HTML::Mason>

=head1 AUTHORS

Robert Buels, Jonathan "Duke" Leto

=head1 LICENSE

This library is free software . You can redistribute it and/or modify it under
the same terms as perl itself.

=cut

__PACKAGE__->meta->make_immutable;
1;


text:
/*global module:false*/
'use strict';

module.exports = function(grunt){
  // Project configuration.
  grunt.initConfig({
    postcss:{
      options:{
        //diff: true,
        /**
        map:{
          inline: false, // save all sourcemaps as separate files...
          annotation: 'assets/css/' // ...to the specified directory
        },
        */
        processors:[
          //require('pixrem')(), // add fallbacks for rem units
          require('autoprefixer')({browsers: 'last 2 versions'}), // add vendor prefixes
          require('cssnano')() // minify the result
        ]
      },
      dist:{
        src: 'assets/css/main.css'
      }
    }

  });

  // Load tasks from NPM
  grunt.loadNpmTasks('grunt-postcss');

  // Default task.
  grunt.registerTask('default', ['postcss:dist']);

};


text:
package uk.ac.ebi.quickgo.annotation;

/**
 * Enumeration of all the parameters accepted by the annotation search endpoint
 */
public enum AnnotationParameters {
    ASSIGNED_BY_PARAM("assignedBy"),
    GO_EVIDENCE_PARAM("goIdEvidence"),
    REF_PARAM("reference"),
    QUALIFIER_PARAM("qualifier"),
    EVIDENCE_CODE_PARAM("evidenceCode"),
    EVIDENCE_CODE_USAGE_RELATIONS_PARAM("evidenceCodeUsageRelationships"),
    EVIDENCE_CODE_USAGE_PARAM("evidenceCodeUsage"),
    PAGE_PARAM("page"),
    LIMIT_PARAM("limit"),
    TAXON_ID_PARAM("taxonId"),
    TAXON_USAGE_PARAM("taxonUsage"),
    GO_ID_PARAM("goId"),
    GO_USAGE_RELATIONS_PARAM("goUsageRelationships"),
    GO_USAGE_PARAM("goUsage"),
    WITHFROM_PARAM("withFrom"),
    GENE_PRODUCT_ID_PARAM("geneProductId"),
    GENE_PRODUCT_TYPE_PARAM("geneProductType"),
    GP_SUBSET_PARAM("geneProductSubset"),
    TARGET_SET_PARAM("targetSet"),
    GO_ASPECT_PARAM("aspect"),
    EXTENSION_PARAM("extension"),
    INCLUDE_FIELD_PARAM("includeFields"),
    SELECTED_FIELD_PARAM("selectedFields"),
    PROTEOME_PARAM("proteome");

    private String name;

    AnnotationParameters(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }
}


text:
.class public Lcom/android/keyguard/iris/KeyguardIrisView;
.super Landroid/widget/FrameLayout;
.source "KeyguardIrisView.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/keyguard/iris/KeyguardIrisView$1;
    }
.end annotation

# instance fields
.field private mAccessibilityManager:Landroid/view/accessibility/AccessibilityManager;

.field private mBouncerShowing:Z

.field private mCurrentMobileKeyboardState:I

.field private mCurrentOrientation:I

.field private mIrisPreview:Landroid/widget/FrameLayout;

.field private mKeyguardShowing:Z

.field private mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

.field private mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

.field private final mUpdateMonitorCallback:Lcom/android/keyguard/KeyguardUpdateMonitorCallback;

# direct methods
.method static synthetic -get0(Lcom/android/keyguard/iris/KeyguardIrisView;)Landroid/view/accessibility/AccessibilityManager;
    .locals 1

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mAccessibilityManager:Landroid/view/accessibility/AccessibilityManager;

    return-object v0
.end method

.method static synthetic -get1(Lcom/android/keyguard/iris/KeyguardIrisView;)Z
    .locals 1

    iget-boolean v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mBouncerShowing:Z

    return v0
.end method

.method static synthetic -get2(Lcom/android/keyguard/iris/KeyguardIrisView;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic -get3(Lcom/android/keyguard/iris/KeyguardIrisView;)Landroid/widget/FrameLayout;
    .locals 1

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mIrisPreview:Landroid/widget/FrameLayout;

    return-object v0
.end method

.method static synthetic -get4(Lcom/android/keyguard/iris/KeyguardIrisView;)Z
    .locals 1

    iget-boolean v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardShowing:Z

    return v0
.end method

.method static synthetic -get5(Lcom/android/keyguard/iris/KeyguardIrisView;)Lcom/android/keyguard/KeyguardUpdateMonitor;
    .locals 1

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    return-object v0
.end method

.method static synthetic -set0(Lcom/android/keyguard/iris/KeyguardIrisView;Z)Z
    .locals 0

    iput-boolean p1, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mBouncerShowing:Z

    return p1
.end method

.method static synthetic -set1(Lcom/android/keyguard/iris/KeyguardIrisView;Z)Z
    .locals 0

    iput-boolean p1, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardShowing:Z

    return p1
.end method

.method static synthetic -wrap0(Lcom/android/keyguard/iris/KeyguardIrisView;)Z
    .locals 1

    invoke-direct {p0}, Lcom/android/keyguard/iris/KeyguardIrisView;->isTimerRunning()Z

    move-result v0

    return v0
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/android/keyguard/iris/KeyguardIrisView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2

    invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 v0, -0x1

    iput v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mCurrentOrientation:I

    new-instance v0, Lcom/android/keyguard/iris/KeyguardIrisView$1;

    invoke-direct {v0, p0}, Lcom/android/keyguard/iris/KeyguardIrisView$1;-><init>(Lcom/android/keyguard/iris/KeyguardIrisView;)V

    iput-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mUpdateMonitorCallback:Lcom/android/keyguard/KeyguardUpdateMonitorCallback;

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mContext:Landroid/content/Context;

    invoke-static {v0}, Lcom/android/keyguard/KeyguardUpdateMonitor;->getInstance(Landroid/content/Context;)Lcom/android/keyguard/KeyguardUpdateMonitor;

    move-result-object v0

    iput-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    new-instance v0, Lcom/android/internal/widget/LockPatternUtils;

    iget-object v1, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/android/internal/widget/LockPatternUtils;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mContext:Landroid/content/Context;

    const-string/jumbo v1, "accessibility"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/accessibility/AccessibilityManager;

    iput-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mAccessibilityManager:Landroid/view/accessibility/AccessibilityManager;

    return-void
.end method

.method private isInViewArea(FFLandroid/view/View;)Z
    .locals 3

    const/4 v0, 0x0

    invoke-virtual {p3}, Landroid/view/View;->getVisibility()I

    move-result v1

    if-nez v1, :cond_0

    invoke-virtual {p3}, Landroid/view/View;->getX()F

    move-result v1

    cmpl-float v1, p1, v1

    if-ltz v1, :cond_0

    invoke-virtual {p3}, Landroid/view/View;->getX()F

    move-result v1

    invoke-virtual {p3}, Landroid/view/View;->getWidth()I

    move-result v2

    int-to-float v2, v2

    add-float/2addr v1, v2

    cmpg-float v1, p1, v1

    if-gtz v1, :cond_0

    invoke-virtual {p3}, Landroid/view/View;->getY()F

    move-result v1

    cmpl-float v1, p2, v1

    if-ltz v1, :cond_0

    invoke-virtual {p3}, Landroid/view/View;->getY()F

    move-result v1

    invoke-virtual {p3}, Landroid/view/View;->getHeight()I

    move-result v2

    int-to-float v2, v2

    add-float/2addr v1, v2

    cmpg-float v1, p2, v1

    if-gtz v1, :cond_0

    const/4 v0, 0x1

    :cond_0
    return v0
.end method

.method private isTimerRunning()Z
    .locals 6

    invoke-static {}, Lcom/android/keyguard/KeyguardUpdateMonitor;->getCurrentUser()I

    move-result v2

    iget-object v3, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

    invoke-virtual {v3, v2}, Lcom/android/internal/widget/LockPatternUtils;->getLockoutAttemptDeadline(I)J

    move-result-wide v0

    iget-object v3, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;

    invoke-virtual {v3, v2}, Lcom/android/internal/widget/LockPatternUtils;->getLockoutBiometricAttemptDeadline(I)J

    move-result-wide v4

    add-long/2addr v0, v4

    const-wide/16 v4, 0x0

    cmp-long v3, v0, v4

    if-eqz v3, :cond_0

    const/4 v3, 0x1

    :goto_0
    return v3

    :cond_0
    const/4 v3, 0x0

    goto :goto_0
.end method

# virtual methods
.method protected onAttachedToWindow()V
    .locals 2

    invoke-super {p0}, Landroid/widget/FrameLayout;->onAttachedToWindow()V

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    iget-object v1, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mUpdateMonitorCallback:Lcom/android/keyguard/KeyguardUpdateMonitorCallback;

    invoke-virtual {v0, v1}, Lcom/android/keyguard/KeyguardUpdateMonitor;->registerCallback(Lcom/android/keyguard/KeyguardUpdateMonitorCallback;)V

    return-void
.end method

.method protected onConfigurationChanged(Landroid/content/res/Configuration;)V
    .locals 6

    const/4 v5, 0x5

    const/4 v4, 0x4

    const/4 v3, 0x1

    const/4 v2, 0x0

    invoke-super {p0, p1}, Landroid/widget/FrameLayout;->onConfigurationChanged(Landroid/content/res/Configuration;)V

    sget-boolean v0, Lcom/android/systemui/Rune;->SYSUI_SUPPORT_MOBILE_KEYBOARD:Z

    if-eqz v0, :cond_0

    iget v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mCurrentMobileKeyboardState:I

    iget v1, p1, Landroid/content/res/Configuration;->semMobileKeyboardCovered:I

    if-eq v0, v1, :cond_0

    iget v0, p1, Landroid/content/res/Configuration;->semMobileKeyboardCovered:I

    iput v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mCurrentMobileKeyboardState:I

    iget v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mCurrentMobileKeyboardState:I

    if-ne v0, v3, :cond_3

    const-string/jumbo v0, "KeyguardIrisView"

    const-string/jumbo v1, "Mobile Keyboard covered"

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

    :cond_0
    :goto_0
    iget v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mCurrentOrientation:I

    iget v1, p1, Landroid/content/res/Configuration;->orientation:I

    if-eq v0, v1, :cond_1

    iget v0, p1, Landroid/content/res/Configuration;->orientation:I

    iput v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mCurrentOrientation:I

    :cond_1
    iget v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mCurrentOrientation:I

    if-ne v0, v3, :cond_4

    iget-boolean v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mBouncerShowing:Z

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v0}, Lcom/android/keyguard/KeyguardUpdateMonitor;->isIrisUnlockState()Z

    move-result v0

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v0}, Lcom/android/keyguard/KeyguardUpdateMonitor;->isUnlockingWithBiometricAllowed()Z

    move-result v0

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v0}, Lcom/android/keyguard/KeyguardUpdateMonitor;->isIrisRunning()Z

    move-result v0

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mIrisPreview:Landroid/widget/FrameLayout;

    invoke-virtual {v0}, Landroid/widget/FrameLayout;->getVisibility()I

    move-result v0

    if-eqz v0, :cond_4

    const-string/jumbo v0, "KeyguardIrisView"

    const-string/jumbo v1, "preview to VISIBLE - onConfigurationChanged"

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

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v0, v5}, Lcom/android/keyguard/KeyguardUpdateMonitor;->setIrisViewType(I)V

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mIrisPreview:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v2}, Landroid/widget/FrameLayout;->setVisibility(I)V

    :cond_2
    :goto_1
    return-void

    :cond_3
    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v0}, Lcom/android/keyguard/KeyguardUpdateMonitor;->isIrisRunning()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-boolean v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mBouncerShowing:Z

    if-eqz v0, :cond_0

    const-string/jumbo v0, "KeyguardIrisView"

    const-string/jumbo v1, "preview to VISIBLE - Mobile Keyboard detached"

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

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v0, v5}, Lcom/android/keyguard/KeyguardUpdateMonitor;->setIrisViewType(I)V

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mIrisPreview:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v2}, Landroid/widget/FrameLayout;->setVisibility(I)V

    goto :goto_0

    :cond_4
    iget v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mCurrentOrientation:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_2

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mIrisPreview:Landroid/widget/FrameLayout;

    invoke-virtual {v0}, Landroid/widget/FrameLayout;->getVisibility()I

    move-result v0

    if-nez v0, :cond_2

    const-string/jumbo v0, "KeyguardIrisView"

    const-string/jumbo v1, "preview to INVISIBLE - onConfigurationChanged"

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

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v0, v4}, Lcom/android/keyguard/KeyguardUpdateMonitor;->setIrisViewType(I)V

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mIrisPreview:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v4}, Landroid/widget/FrameLayout;->setVisibility(I)V

    goto :goto_1
.end method

.method protected onDetachedFromWindow()V
    .locals 2

    invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    iget-object v1, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mUpdateMonitorCallback:Lcom/android/keyguard/KeyguardUpdateMonitorCallback;

    invoke-virtual {v0, v1}, Lcom/android/keyguard/KeyguardUpdateMonitor;->removeCallback(Lcom/android/keyguard/KeyguardUpdateMonitorCallback;)V

    return-void
.end method

.method protected onFinishInflate()V
    .locals 2

    invoke-super {p0}, Landroid/widget/FrameLayout;->onFinishInflate()V

    const-string/jumbo v0, "KeyguardIrisView"

    const-string/jumbo v1, "onFinishInflate()"

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

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v0}, Lcom/android/keyguard/KeyguardUpdateMonitor;->isDexMode()Z

    move-result v0

    if-eqz v0, :cond_1

    const/4 v0, 0x4

    invoke-virtual {p0, v0}, Lcom/android/keyguard/iris/KeyguardIrisView;->setVisibility(I)V

    :goto_0
    const v0, 0x7f0a0277

    invoke-virtual {p0, v0}, Lcom/android/keyguard/iris/KeyguardIrisView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/FrameLayout;

    iput-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mIrisPreview:Landroid/widget/FrameLayout;

    sget-boolean v0, Lcom/android/systemui/Rune;->SYSUI_SUPPORT_MOBILE_KEYBOARD:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    iget v0, v0, Landroid/content/res/Configuration;->semMobileKeyboardCovered:I

    iput v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mCurrentMobileKeyboardState:I

    :cond_0
    iget-object v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    iget v0, v0, Landroid/content/res/Configuration;->orientation:I

    iput v0, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mCurrentOrientation:I

    return-void

    :cond_1
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/android/keyguard/iris/KeyguardIrisView;->setVisibility(I)V

    goto :goto_0
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 6

    const/4 v5, 0x1

    const/4 v4, 0x0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v1

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v2

    iget-object v3, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mIrisPreview:Landroid/widget/FrameLayout;

    invoke-direct {p0, v1, v2, v3}, Lcom/android/keyguard/iris/KeyguardIrisView;->isInViewArea(FFLandroid/view/View;)Z

    move-result v1

    if-nez v1, :cond_0

    return v4

    :cond_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :cond_1
    :pswitch_0
    return v4

    :pswitch_1
    return v5

    :pswitch_2
    iget-object v1, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v1}, Lcom/android/keyguard/KeyguardUpdateMonitor;->isIrisRunning()Z

    move-result v1

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v1}, Lcom/android/keyguard/KeyguardUpdateMonitor;->isPossibleToForceCancelIris()Z

    move-result v1

    if-eqz v1, :cond_1

    const-string/jumbo v1, "KeyguardIrisView"

    const-string/jumbo v2, "Stop recognition by touch on IrisPreview"

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

    iget-object v1, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v1}, Lcom/android/keyguard/KeyguardUpdateMonitor;->stopIrisCamera()V

    iget-object v1, p0, Lcom/android/keyguard/iris/KeyguardIrisView;->mKeyguardUpdateMonitor:Lcom/android/keyguard/KeyguardUpdateMonitor;

    invoke-virtual {v1, v4}, Lcom/android/keyguard/KeyguardUpdateMonitor;->setIrisUnlockFailedState(Z)V

    return v5

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_2
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method


text:
iCal-Event-Creator-App
=====================

Original project developed to create iCal Events.
Team Boynton: Justin Lee, Cheri Kau, Katie Konno, and Jenna Inouye

Installation instructions:
1. Install the Eclipse IDE
2. Import project into workspace

The iCal Event Creator creates .ics files that can be imported into any iCal calendar.


text:
package atg.tools.dynunit;

import javax.inject.Qualifier;
import java.lang.annotation.Documented;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Injection qualifier for a Nucleus instance. This annotation should be used on the test class itself or on a
 * {@link atg.nucleus.Nucleus Nucleus} field. The class should use {@link atg.tools.dynunit.DynUnit#init(Object)} to
 * inject the Nucleus along with any Nucleus-registered components.
 *
 * @author msicker
 * @version 1.0.0
 */
@Documented
@Retention(RUNTIME)
@Target({ TYPE, FIELD })
@Qualifier
@Inherited
public @interface Nuke {

    /**
     * Root ATG-Config-Path to use for Nucleus instance.
     */
    public String value();

    public String[] modules() default { };
}


text:
function setupTests(tester, plugin) {
  //////////////////////////////////////////////////////////////////////////////
  // Test Helpers
  //////////////////////////////////////////////////////////////////////////////

  // These are the coordinates of the upper-left corner of the nacl plugin
  // TODO(mball): Avoid hardcoding this location by querying the location
  // of the plugin.
  var leftCorner = 8, topCorner = 79

  function simulateMouseEvent(eventName) {
    var event = document.createEvent('MouseEvents');
    event.initMouseEvent(
        eventName,
        true,                      // bubbles
        true,                       // cancelable
        document.defaultView,
        1,                          // one click
        0, 0,                       // Screen coordinate
        leftCorner, topCorner,      // Client coordinate
        false, false, false, false, // no key modifiers
        0,                          // button: 0 - left, 1 - middle, 2 - right
        null);                      // no related targets
    plugin.dispatchEvent(event);
  }

  function addTest(testName, testCaseEvent, eventResponse,
                   eventGeneratorCallback) {
    tester.addAsyncTest('PPP_InputEvent::' + testName + '_' + testCaseEvent,
                        function(test) {
      var messages = [testName + ':PASSED',
                      'HandleInputEvent:' + eventResponse,
                      'Cleanup:PASSED'];
      // TODO(mball,polina): These listener functions should fail when an event
      // is not bubbled up from the Nacl module.
      var pluginListener = test.wrap(function(message) {
        test.log('plugin received ' + message);
      });
      var parentListener = test.wrap(function(message) {
        test.log('plugin.parentNode received ' + message);
      });
      test.expectMessageSequence(
        plugin, messages,
        function(message) {
          if (message == messages[0]) {
            // TODO(polina): why does this forward and bubble the event even
            // though it was handled? Based on headers, the listeners below
            // should contain test.fail(). Figure out if this is a bug
            // (crbug.com/88728) or if the header comments are off.
            plugin.addEventListener(testCaseEvent, pluginListener, false);
            plugin.parentNode.addEventListener(
              testCaseEvent, parentListener, false);
            eventGeneratorCallback(testCaseEvent);
          } else if (message == messages[1]) {
            plugin.removeEventListener(testCaseEvent, pluginListener, false);
            plugin.parentNode.removeEventListener(
              testCaseEvent, parentListener, false);
            plugin.postMessage('Cleanup');
          } else if (message != messages[2]) {
            test.fail('Unknown message: ' + message);
          }
        });
      plugin.postMessage(testName);
    });
  }

  //////////////////////////////////////////////////////////////////////////////
  // Tests
  //////////////////////////////////////////////////////////////////////////////
  var mouseEventTests = [
    'TestUnfilteredMouseEvents',
    'TestBubbledMouseEvents',
    'TestUnbubbledMouseEvents'];

  mouseEventTests.map(function(testName) {
    addTest(
      testName,
      'mousedown',
      'PP_INPUTEVENT_TYPE_MOUSEDOWN' +
          ':PP_INPUTEVENT_MODIFIER_LEFTBUTTONDOWN' +
          ':PP_INPUTEVENT_MOUSEBUTTON_LEFT' +
          ':Position=0,0:ClickCount=1',
      simulateMouseEvent);
  });
}


text:
<?php

// autoload_namespaces.php generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
    'Twig_Extensions_' => $vendorDir . '/twig/extensions/lib',
    'Twig_' => $vendorDir . '/twig/twig/lib',
    'Symfony\\Bundle\\SwiftmailerBundle' => $vendorDir . '/symfony/swiftmailer-bundle',
    'Symfony\\Bundle\\MonologBundle' => $vendorDir . '/symfony/monolog-bundle',
    'Symfony\\Bundle\\AsseticBundle' => $vendorDir . '/symfony/assetic-bundle',
    'Symfony' => $vendorDir . '/symfony/symfony/src',
    'SessionHandlerInterface' => $vendorDir . '/symfony/symfony/src/Symfony/Component/HttpFoundation/Resources/stubs',
    'Sensio\\Bundle\\GeneratorBundle' => $vendorDir . '/sensio/generator-bundle',
    'Sensio\\Bundle\\FrameworkExtraBundle' => $vendorDir . '/sensio/framework-extra-bundle',
    'Sensio\\Bundle\\DistributionBundle' => $vendorDir . '/sensio/distribution-bundle',
    'PhpOption\\' => $vendorDir . '/phpoption/phpoption/src',
    'PhpCollection' => $vendorDir . '/phpcollection/phpcollection/src',
    'OAuth2' => $vendorDir . '/friendsofsymfony/oauth2-php/lib',
    'Monolog' => $vendorDir . '/monolog/monolog/src',
    'Metadata\\' => $vendorDir . '/jms/metadata/src',
    'JMS\\SerializerBundle' => $vendorDir . '/jms/serializer-bundle',
    'JMS\\Serializer' => $vendorDir . '/jms/serializer/src',
    'JMS\\SecurityExtraBundle' => $vendorDir . '/jms/security-extra-bundle',
    'JMS\\DiExtraBundle' => $vendorDir . '/jms/di-extra-bundle',
    'JMS\\AopBundle' => $vendorDir . '/jms/aop-bundle',
    'JMS\\' => $vendorDir . '/jms/parser-lib/src',
    'Ivory\\GoogleMapBundle' => $vendorDir . '/egeloen/google-map-bundle',
    'Ivory\\GoogleMap' => $vendorDir . '/egeloen/google-map/src',
    'Geocoder' => $vendorDir . '/willdurand/geocoder/src',
    'FOS\\UserBundle' => $vendorDir . '/friendsofsymfony/user-bundle',
    'FOS\\OAuthServerBundle' => $vendorDir . '/friendsofsymfony/oauth-server-bundle',
    'Doctrine\\ORM' => $vendorDir . '/doctrine/orm/lib',
    'Doctrine\\DBAL' => $vendorDir . '/doctrine/dbal/lib',
    'Doctrine\\Common\\Lexer\\' => $vendorDir . '/doctrine/lexer/lib',
    'Doctrine\\Common\\Annotations\\' => $vendorDir . '/doctrine/annotations/lib',
    'Doctrine\\Common' => $vendorDir . '/doctrine/common/lib',
    'Doctrine\\Bundle\\DoctrineBundle' => $vendorDir . '/doctrine/doctrine-bundle',
    'DoctrineExtensions' => $vendorDir . '/beberlei/DoctrineExtensions/lib',
    'CG\\' => $vendorDir . '/jms/cg/src',
    'Bmatzner\\JQueryBundle' => $vendorDir . '/bmatzner/jquery-bundle',
    'Bmatzner\\FoundationBundle' => $vendorDir . '/bmatzner/foundation-bundle',
    'Assetic' => $vendorDir . '/kriswallsmith/assetic/src',
    '' => $baseDir . '/src',
);


text:
import inspect

import sqlparser
from sqlparser import ENodeType

Continue = 0
Break = 1
ContinueAndNotify = 2

node_functions = {}

class NodeVisitor:

    def __init__(self, root_node):
        self.root = root_node
        self.node_functions = {}
        tmp = dir(self)

        if 'visit_node' in tmp:
            self.has_visit_node = True
        else:
            self.has_visit_node = False

        if 'visit_string' in tmp:
            self.has_visit_string = True
        else:
            self.has_visit_string = False

        if 'visit_generic' in tmp:
            self.has_visit_generic = True
        else:
            self.has_visit_generic = False

        for k in dir(self.__class__):
            func = getattr(self.__class__, k)
            if hasattr(func, 'when'):
                self.node_functions[func.when] = func

    def traverse(self, node=None, d=0, name='root'):
        if not node:
            node = self.root
        ret = Continue

        if self.has_visit_generic:
            self.visit_generic(node, d, name)
        if isinstance(node, sqlparser.Node):
            if node.node_type in self.node_functions:
                ret = self.node_functions[node.node_type](self, node, d, name)
            elif self.has_visit_node:
                ret = self.visit_node(node, d, name)

            if node.node_type == ENodeType.list:
                if ret == Continue or ret == ContinueAndNotify:
                    for idx, i in enumerate(node.list):
                        self.traverse(i, d + 1, 'item' + str(idx))
            else:
                if ret == Continue or ret == ContinueAndNotify:
                    for k, v in node.__dict__.iteritems():
                        if v:
                            self.traverse(v, d + 1, k)
                if ret == ContinueAndNotify:
                    self.leave_node(node, d, name)
        elif isinstance(node, str):
            if self.has_visit_string:
                self.visit_string(node, d, name)
        elif isinstance(node, int):
            pass

def when(*args):
    def decorate(f):
        setattr(f, 'when', args[0])
        return f
    return decorate