text:
<?php
 	/* -- Code Presenter - http://www.codepresenter.net --
	A simple, educational tool to engage student participation through real-time code sharing and presentation in the classroom
	An open source project coded by Charles McCrary https://github.com/McCraryCharles/ */

	// This file loads the correct page based on the URL / Host cookie

	include_once "php/db/dbLibrary.php"; // Include database library

	if(isset($_GET['page'])) { // Handels direct static pages
		switch ($_GET['page']) {
			case 'about':
				include_once 'php/pages/about/about.php'; // Load about page
			break;
			default:
				include_once 'php/pages/home.php'; // Load homepage
			break;
		}
		die; // Do not load other content, if a page is set
	}

	if(isset($_POST["g-recaptcha-response"]) && !isset($_COOKIE['userKey']) && !isset($_COOKIE['hostId']) && $config['captcha']!='false'){
		$captcha = $_POST["g-recaptcha-response"];
		include_once 'php/pages/home/captchaKey.php'; // File contains captcha key
		$response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$privatekey."&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']);
		$response = json_decode($response, true);
		if($response['success']==false) { // If CAPTCHA was entered incorrectly
			$connectError = "Invalid captcha response, please try again.";
			include_once 'php/pages/home.php'; // Load homepage
			die; // Stop loading
		}
	}
	if (isset($_POST['new-room'])) {
		if ($_POST['new-room'] == 'true') {
			header('Location: ?room='. createRoom()); // Create the room and assign cokies
			die; // Stop loading
		}
	}

	if(isset($_GET['room'])) { // If a room id was entered
		$roomCode = strtoupper($_GET['room']); // Set the room id variable
		$roomId = getRoomId($roomCode); // Get the room id, if code is invalid will set to false
		if (isset($_COOKIE['hostId'])) { // If a host cookie is set
			$hostId = strtoupper($_COOKIE['hostId']);
			$hostIdRoom = checkHost($hostId); // Verify the id
			if ($hostIdRoom == $roomId && !empty($roomId)) { // If host id is for the set room
				include_once 'php/pages/host/host.php'; // Load host page
			}
			else { // If there is a key mismatch
				setcookie('hostId', 0, time() - (60), "/"); // Expire host cookie to one min ago
				include_once 'php/pages/home.php'; // Load homepage
			}
		}
		else { // If host cookie is not set
			if (checkRoom($roomCode) != false) { // If room id is valid
				if (isset($_COOKIE['userKey'])) {
					$userKey = $_COOKIE['userKey'];
					// Check Key
					$userId = checkUser($userKey); // Checks DB for user and returns id, if does not exist returns false
					if ($userId != false && getUserRoom($userId) == $roomId) { // If id is valid, and user is for the correct room
						include_once 'php/pages/user/user.php'; // Load user room
					}
					else {
						setcookie('userKey', 0, time() - (60), "/"); // Expire user key to one min ago
						include_once 'php/pages/user/user.php'; // Load user room
						echo '<script>promptUser();</script>'; // Run promptuser JS on page load
					}
				}
				else {
					include_once 'php/pages/user/user.php'; // Load user room
					echo '<script>promptUser();</script>'; // Run promptuser JS on page load
				}
			}
			else { // If room id does not exist
				$connectError = "Room not found, please check your code.";
				include_once 'php/pages/home.php'; // Load homepage
			}
		}
	}
	else { // If no room id was set
		include_once 'php/pages/home.php'; // Load homepage
	}
?>


text:
#include "set/hdr_skiplist_set.h"
#include <cds/container/skip_list_set_ptb.h>
#include "unit/michael_alloc.h"
#include "map/print_skiplist_stat.h"

namespace set {

    void SkipListSetHdrTest::SkipList_PTB_less()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::item_counter< simple_item_counter >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_cmp()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
            co::compare< cmp<item > >
            ,co::item_counter< simple_item_counter >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_cmpless()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
            co::less< less<item > >
            ,co::compare< cmp<item > >
            ,co::item_counter< simple_item_counter >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_less_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_cmp_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_cmpless_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_xorshift_less()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::item_counter< simple_item_counter >
                ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_xorshift_cmp()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_xorshift_cmpless()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_xorshift_less_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
                ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_xorshift_cmp_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
                ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_xorshift_cmpless_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
                ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_turbopas_less()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::item_counter< simple_item_counter >
                ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_turbopas_cmp()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_turbopas_cmpless()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_turbopas_less_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
                ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_turbopas_cmp_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
                ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_turbopas_cmpless_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
                ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_michaelalloc_less()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::item_counter< simple_item_counter >
                ,co::allocator< memory::MichaelAllocator<int> >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_michaelalloc_cmp()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,co::allocator< memory::MichaelAllocator<int> >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_michaelalloc_cmpless()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,co::allocator< memory::MichaelAllocator<int> >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_michaelalloc_less_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
                ,co::allocator< memory::MichaelAllocator<int> >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_michaelalloc_cmp_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
                ,co::allocator< memory::MichaelAllocator<int> >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }

    void SkipListSetHdrTest::SkipList_PTB_michaelalloc_cmpless_stat()
    {
        typedef cc::SkipListSet< cds::gc::PTB, item,
            cc::skip_list::make_traits<
                co::less< less<item > >
                ,co::compare< cmp<item > >
                ,co::item_counter< simple_item_counter >
                ,co::stat< cc::skip_list::stat >
                ,co::allocator< memory::MichaelAllocator<int> >
            >::type
        > set ;
        test< set, misc::print_skiplist_stat<set::stat> >() ;
    }
} // namespace set

redpajama_set_name: RedPajamaGithub


text:
{% set addon_type = amo.ADDON_PERSONA %}
{% extends "impala/base_side_categories.html" %}

{% from "includes/forms.html" import pretty_field, tip %}
{% from "devhub/includes/macros.html" import some_html_tip %}

{% set title = _('Create a New Theme') %}

{% block title %}{{ page_title(title) }}{% endblock %}

{% block primary %}

  <masthead class="hero submit-theme">

{{ title }}

      {% trans submit_url=url('devhub.docs', 'themes') %}
        Background themes let you easily personalize the look of your Firefox.
        Submit your own design below, or learn how
        to create one!
      {% endtrans %}

  </masthead>

    <form method="post">
      {{ csrf() }}
      {{ form.unsaved_data }}
      <fieldset>
        <legend>{{ _('Theme Details') }}</legend>

          {{ pretty_field(form.name, label=_('Give your Theme a name.'), validate=True) }}

            {% set before_slug = ('%s/addon/' % settings.SITE_URL)|safe %}
            {{ pretty_field(form.slug, label=_('Supply a pretty URL for your detail page.'), tag=None, before=before_slug, validate=True) }}

              {{ _('Please use only letters, numbers, underscores, and dashes in your URL.') }}

          {{ pretty_field(form.category, label=_('Select the category that best describes your Theme.'),
                          class='row radios addon-cats', validate=True) }}

            {{ pretty_field(form.tags, label=_('Add some tags to describe your Theme.'), tag=None, opt=True, validate=True) }}

              {{ ngettext('Comma-separated, minimum of {0} character.',
                          'Comma-separated, minimum of {0} characters.',
                          amo.MIN_TAG_LENGTH)|f(amo.MIN_TAG_LENGTH) }}
              {{ _('Example: dark, cinema, noir. Limit 20.') }}

            {{ pretty_field(form.description, label=_('Describe your Theme.'),
                            tooltip=_("A short explanation of your theme's "
                                      "basic functionality that is displayed in "
                                      "search and browse listings, as well as at "
                                      "the top of your theme's details page."),
                            tag=None, opt=True, validate=True) }}

              {{ some_html_tip() }}

      </fieldset>
      <fieldset>
        <legend>{{ _('Theme License') }}</legend>

          {{ form.license }}
          {{ form.license.errors }}

{{ _("Can others share your Theme, as long as you're given credit?") }}

                <input type="radio" name="cc-attrib" value="0" data-cc="cc-attrib">
                {{ _('Yes') }}
                {{ tip(None, _('The licensor permits others to copy, distribute, '
                               'display, and perform the work, including for '
                               'commercial purposes.')) }}

                <input type="radio" name="cc-attrib" value="1" data-cc="copyr">
                {{ _('No') }}
                {{ tip(None, _('The licensor permits others to copy, distribute, '
                               'display, and perform the work for non-commercial '
                               'purposes only.')) }}

{{ _('Can others make commercial use of your Theme?') }}

                <input type="radio" name="cc-noncom" value="0">
                {{ _('Yes') }}
                {{ tip(None, _('The licensor permits others to copy, distribute, '
                               'display, and perform the work, including for '
                               'commercial purposes.')) }}

                <input type="radio" name="cc-noncom" value="1" data-cc="cc-noncom">
                {{ _('No') }}
                {{ tip(None, _('The licensor permits others to copy, distribute, '
                               'display, and perform the work for non-commercial '
                               'purposes only.')) }}

{{ _('Can others create derivative works from your Theme?') }}

                <input type="radio" name="cc-noderiv" value="0">
                {{ _('Yes') }}
                {{ tip(None, _('The licensor permits others to copy, distribute, '
                               'display and perform the work, as well as make '
                               'derivative works based on it.')) }}

                <input type="radio" name="cc-noderiv" value="1" data-cc="cc-share">
                {{ _('Yes, as long as they share alike') }}
                {{ tip(None, _('The licensor permits others to distribute derivative'
                               'works only under the same license or one compatible '
                               "with the one that governs the licensor's work.")) }}

                <input type="radio" name="cc-noderiv" value="2" data-cc="cc-noderiv">
                {{ _('No') }}
                {{ tip(None, _('The licensor permits others to copy, distribute and '
                               'transmit only unaltered copies of the work — not '
                               'derivative works based on it.')) }}

{{ _('Your Theme will be released under the following license:') }}

              {{ _('Select a different license.') }}

{{ _('Select a license for your Theme.') }}

            {% for license in amo.PERSONA_LICENSES %}

<input type="radio" name="license" value="{{ license.id }}">
                {{ license.name }}

            {% endfor %}

      </fieldset>
      <fieldset id="persona-design">
        <legend>{{ _('Theme Design') }}</legend>
        {% with required = True %}
          {% include "devhub/personas/includes/theme_design.html" %}
        {% endwith %}

{{ _('Select colors for your Theme.') }}

          {{ pretty_field(form.textcolor, label=_('Foreground Text'),
                          tooltip=_('This is the color of the tab text.'),
                          validate=True) }}
          {{ pretty_field(form.accentcolor, label=_('Background'),
                          tooltip=_('This is the color of the tabs.'),
                          validate=True) }}

      </fieldset>
      <fieldset id="persona-preview">
        <legend>{{ _('Preview') }}</legend>

                {{ _("Your Theme's Name") }}

                {% set user = request.user %}
                {% trans user=user.username,
                         profile_url=user.get_url_path() %}
                  by {{ user }}
                {% endtrans %}

      </fieldset>

          {{ form.agreed.as_widget(attrs={'required': ''}) }}
          {% trans agreement_url='https://developer.mozilla.org/en-US/Add-ons/AMO/Policy/Agreement',
                   privacy_notice_url='https://www.mozilla.org/en-US/privacy/websites/' %}
            I agree to the Firefox Add-on Distribution Agreement and to my information being handled as described in the Websites, Communications and Cookies Privacy Notice.
          {% endtrans %}

        {{ form.agreed.errors }}

<button class="button prominent" disabled type="submit">{{ _('Submit Theme') }}</button>

    </form>

{% endblock %}


text:
FactoryGirl.define do
  factory :school do
    sequence(:institution_id) { |n| "100016#{n}" }
    sequence(:institution_name) { |n| "Community College of the Air Force #{n}" }
    institution_address "130 W Maxwell Blvd"
    institution_city "Montgomery"
    institution_state "AL"
    institution_zip "36112-6613"
    institution_phone "334-953-6436"
    sequence(:institution_opeid) { |n| "01230800#{n}" }
    sequence(:institution_ipeds_unitid) { |n| "100636#{n}" }
    institution_web_address "www.maxwell.af.mil/au/ccaf/"
    sequence(:campus_id) { |n| "2#{n}" }
    sequence(:campus_name) { |n| "Community College of the Air Force - Sheppard #{n}" }
    campus_address "917 Missile Road"
    campus_city "Sheppard AFB"
    campus_state "TX"
    campus_zip "76311-2263"
    sequence(:campus_ipeds_unitid) { |n| "#{n}" }
    accreditation_type "Specialized"
    agency_name "American Physical Therapy Association, Commission on Accreditation in Physical Therapy Education"
    program_name "Physical Therapy (PTAA) - Programs for the physical therapist assistant"
    review_date "6/20/2016"
    accreditation_status "Accredited"
    accreditation_date_type "Actual"
    periods "12/01/1976 - Current"
    last_action ""
  end
end


text:
package ariba.ui.widgets;

import ariba.ui.aribaweb.core.AWComponent;
import ariba.ui.aribaweb.core.AWConcreteApplication;
import ariba.ui.aribaweb.core.AWDirectActionUrl;

public class CommunityContentPane extends AWComponent {

    public static final String APP_URL_PARAM = "appUrl";

    public String getCommunityContentIframeSrc () {
        return AWConcreteApplication.getAribaUserCommunityUrl()
                + "?" + APP_URL_PARAM + "=" + AWDirectActionUrl.checkoutFullUrl(requestContext()).finishUrl();
    }

}


text:
namespace echo
{
	class Window
	{
	public:
		Window(const std::string& title, const int width, const int height);
		~Window();

		bool init();

		std::string& getTitle() const;
		int getWidth() const;
		int getHeight() const;

	private:
		std:string mTitle;
		int mWidth;
		int mHeight;

		std::shared_ptr<SDL_Window> mWindow;
	}
}

#endif


text:
require 'spec_helper'

class DummyFacets
  include Elasticsearch::FacetedSearch::FacetBase
  facet_exclusive_or(:hd, 'media_hd', 'HD Media')

  #mock
  def type
    ['type_here']
  end

  #mock
  def filter_hd?
  end

  #mock
  def hd_value
    true
  end
end

module Elasticsearch
  module FacetedSearch
    describe FacetBase do
      let(:model) { DummyFacets.new({}) }

      describe "#class_facets" do
        it "returns class facets" do
          expect(DummyFacets).to receive(:facets) { {facet: true} }
          expect(model.class_facets).to eq({facet: true})
        end
      end

      describe "#query" do

        it "removes an empty items" do
          expect(model.query).to eq({:size=>32, :from=>0, :facets=>{:hd=>{:terms=>{:field=>"media_hd", :size=>70}}}})
        end

        describe "with facets and filters" do
          it "merges filters when filter_query has value" do
            expect(model).to receive(:filter_query).at_least(:once) { 'hi' }
            expect(model).to receive(:facet_query) { nil }
            expect(model.query).to eq({:size=>32, :from=>0, filter: {and: 'hi'}})
          end

          it "merges facets when facets has value" do
            expect(model).to receive(:filter_query) { nil }
            expect(model).to receive(:facet_query).at_least(:once) { 'hi' }
            expect(model.query).to eq({:size=>32, :from=>0, facets: 'hi'})
          end

          it "can merge both hashes" do
            expect(model).to receive(:filter_query).at_least(:once) { 'hi' }
            expect(model).to receive(:facet_query).at_least(:once) { 'hi' }
            expect(model.query).to eq({:size=>32, :from=>0, facets: 'hi', filter: {and: 'hi'}})
          end
        end
        describe "with limits" do
          before(:each) do
            expect(model).to receive(:filter_query).at_least(:once) { 'hi' }
            expect(model).to receive(:facet_query).at_least(:once) { 'hi' }
          end

          it "returns from params" do
            expect(model).to receive(:search_params).at_least(:once) { {limit: '10'}}
            expect(model.query).to eq({:size=>10, :from=>0, :filter=>{:and=>"hi"}, :facets=>"hi"})
          end

          it "defaults to 32" do
            expect(model.query).to eq({:size=>32, :from=>0, :filter=>{:and=>"hi"}, :facets=>"hi"})
          end
        end

        describe "with page" do
          before(:each) do
            expect(model).to receive(:filter_query).at_least(:once) { 'hi' }
            expect(model).to receive(:facet_query).at_least(:once) { 'hi' }
            expect(model).to receive(:search_params).at_least(:once) { {page: 10, limit: 3} }
          end

          it "returns from params" do
            expect(model.query).to eq({:size=>3, :from=>27, :filter=>{:and=>"hi"}, :facets=>"hi"})
          end
        end

        describe "with sort" do
          before(:each) do
            expect(model).to receive(:sorts).at_least(:once) {
              [
                {
                  label: "Relevant",
                  value: "relevant",
                  search: ["_score"],
                  default: false
                },
                {
                  label: "updated",
                  value: "updated",
                  search: ["updated"],
                  default: true
                }
              ]
            }
          end
          it "has a default sort" do
            expect(model.query).to eq({:size=>32, :from=>0, :sort=>["updated"], :facets=>{:hd=>{:terms=>{:field=>"media_hd", :size=>70}}}})
          end

          it "can have a selected sort" do
            expect(model).to receive(:search_params).at_least(:once) { {sort: 'relevant'} }
            expect(model.query).to eq({:size=>32, :from=>0, :sort=>["_score"], :facets=>{:hd=>{:terms=>{:field=>"media_hd", :size=>70}}}})
          end
        end
      end

      describe "#facet_query" do
        it "caches the request" do
          expect(model).to receive(:build_facets).once {'blah'}
          2.times { model.facet_query }
        end
      end

      describe "#filter_query" do
        it "caches the request" do
          expect(model).to receive(:build_filters).once {'blah'}
          2.times { model.filter_query }
        end
      end

      describe "#search_params" do
        it "returns the params" do
          expect(model).to receive(:params) { 'boom' }
          expect(model.search_params).to eq('boom')
        end
      end

      describe "#build_facets" do
        it "is private" do
          expect {
            model.build_facets
          }.to raise_error(NoMethodError)
        end
        describe "with filters" do
          it "equals a specific format" do
            expect(model).to receive(:filter_query).at_least(:once) { [{terms: {:hello => ['world']}}] }
            expect(model.send(:build_facets)).to eq(
              {
                :hd=>{
                  :terms=>{
                    :field=>"media_hd", :size=>70
                  },
                  :facet_filter=>{
                    :and=>[
                      {:terms=>{:hello=>["world"]}}
                    ]
                  }
                }
              }
            )
          end

          # Added spec due to improper merge on 0.0.2 release
          # => if this spec is failing, elastic search is going to complain
          it "has 2 keys" do
            expect(model).to receive(:filter_query).at_least(:once) { [{terms: {:hello => ['world']}}] }
            expect(model.send(:build_facets)[:hd].keys).to eq([:terms, :facet_filter])
          end

          it "can bypass the facet_filter declaration" do
            expect(model.send(:build_facets, false)).to eq(
              {
                :hd=>{
                  :terms=>{
                    :field=>"media_hd", :size=>70
                  }
                }
              }
            )
          end
        end
        describe "without filters" do
          before(:each) do
            expect(model).to receive(:filter_query) { [] }
          end
          it "equals a specific format" do
            expect(model.send(:build_facets)).to eq({
              :hd=>{
                :terms=>{:field=>"media_hd", :size=>70}
              }
            })
          end
        end
      end

      describe "#build_filters" do
        it "is private" do
          expect {
            model.build_filters
          }.to raise_error(NoMethodError)
        end
        describe "with #filter_XX? = true" do
          before(:each) do
            expect(model).to receive(:filter_hd?) { true }
          end

          it "returns filter hash for Elasticsearch" do
            expect(model.send(:build_filters)).to eq([{:terms=>{"media_hd"=>[true]}}])
          end
        end

        describe "with #filter_XX? = false" do
          before(:each) do
            expect(model).to receive(:filter_hd?) { false }
          end

          it "returns an empty array" do
            expect(model.send(:build_filters)).to be_blank
          end
        end
      end

      describe "#values_for" do
        it "is private" do
          expect {
            model.values_for(:hd)
          }.to raise_error(NoMethodError)
        end

        it "always returns an array" do
          expect(model).to receive(:temp_value) { 'hello' }
          expect(model.send(:values_for, :temp)).to eq(['hello'])
        end
      end

      describe "#execution_type" do
        it "is private" do
          expect {
            model.execution_type('multivalue_or')
          }.to raise_error(NoMethodError)
        end
        it "returns :or when 'multivalue_or'" do
          expect(model.send(:execution_type, 'multivalue_or')).to eq(:or)
        end

        it "returns :and when 'multivalue_and'" do
          expect(model.send(:execution_type, 'multivalue_and')).to eq(:and)
        end

        it "returns nil when 'exclusive_or'" do
          expect(model.send(:execution_type, 'exclusive_or')).to be_nil
        end
      end
    end
  end
end


text:
/**
*   \file   tokens.h
*   \author Dave Reid
*   \brief  Header file for the tokens extension.
*/
#ifndef __EASL_TOKENS_H_
#define __EASL_TOKENS_H_

#include "tokens/nexttoken.h"
#include "tokens/extracttokens.h"

#endif // __EASL_TOKENS_H_


text:
package carbon.widget;

import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Region;
import android.os.Build;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;

import com.nineoldandroids.view.ViewHelper;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import carbon.Carbon;
import carbon.R;
import carbon.drawable.EdgeEffectCompat;
import carbon.drawable.RippleDrawable;
import carbon.drawable.RippleView;
import carbon.drawable.TintPrimaryColorStateList;
import carbon.internal.ElevationComparator;
import carbon.shadow.Shadow;
import carbon.shadow.ShadowGenerator;
import carbon.shadow.ShadowView;

/**
 * Created by Marcin on 2015-04-28.
 */
public class RecyclerView extends android.support.v7.widget.RecyclerView implements TintedView {

    private Field mLeftGlowField;
    private Field mRightGlowField;
    private Field mTopGlowField;
    private Field mBottomGlowField;
    private EdgeEffectCompat leftGlow;
    private EdgeEffectCompat rightGlow;
    private EdgeEffectCompat topGlow;
    private EdgeEffectCompat bottomGlow;
    private boolean clipToPadding;

    public RecyclerView(Context context) {
        this(context, null);
    }

    public RecyclerView(Context context, AttributeSet attrs) {
        this(context, attrs, R.attr.carbon_recyclerViewStyle);
    }

    public RecyclerView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);

        Carbon.initTint(this, attrs, defStyleAttr);

        Class klass = android.support.v7.widget.RecyclerView.class;
        try {
            mLeftGlowField = klass.getDeclaredField("mLeftGlow");
            mLeftGlowField.setAccessible(true);
            mRightGlowField = klass.getDeclaredField("mRightGlow");
            mRightGlowField.setAccessible(true);
            mTopGlowField = klass.getDeclaredField("mTopGlow");
            mTopGlowField.setAccessible(true);
            mBottomGlowField = klass.getDeclaredField("mBottomGlow");
            mBottomGlowField.setAccessible(true);
        } catch (NoSuchFieldException e) {
            e.printStackTrace();
        }

        TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.RecyclerView, defStyleAttr, 0);
        for (int i = 0; i < a.getIndexCount(); i++) {
            int attr = a.getIndex(i);
            if (attr == R.styleable.RecyclerView_carbon_headerTint) {
                setHeaderTint(a.getColor(attr, 0));
            } else if (attr == R.styleable.RecyclerView_carbon_headerMinHeight) {
                setHeaderMinHeight((int) a.getDimension(attr, 0.0f));
            } else if (attr == R.styleable.RecyclerView_carbon_headerParallax) {
                setHeaderParallax(a.getFloat(attr, 0.0f));
            }
        }
        a.recycle();

        setClipToPadding(false);
    }

    void ensureLeftGlow() {
        if (leftGlow != null) {
            return;
        }
        leftGlow = new EdgeEffectCompat(getContext());
        if (tint != null)
            leftGlow.setColor(tint.getColorForState(getDrawableState(), tint.getDefaultColor()));
        try {
            mLeftGlowField.set(this, leftGlow);
        } catch (IllegalAccessException e) {
        }
        if (clipToPadding) {
            leftGlow.setSize(getMeasuredHeight() - getPaddingTop() - getPaddingBottom(),
                    getMeasuredWidth() - getPaddingLeft() - getPaddingRight());
        } else {
            leftGlow.setSize(getMeasuredHeight(), getMeasuredWidth());
        }
    }

    void ensureRightGlow() {
        if (rightGlow != null) {
            return;
        }
        rightGlow = new EdgeEffectCompat(getContext());
        if (tint != null)
            rightGlow.setColor(tint.getColorForState(getDrawableState(), tint.getDefaultColor()));
        try {
            mRightGlowField.set(this, rightGlow);
        } catch (IllegalAccessException e) {
        }
        if (clipToPadding) {
            rightGlow.setSize(getMeasuredHeight() - getPaddingTop() - getPaddingBottom(),
                    getMeasuredWidth() - getPaddingLeft() - getPaddingRight());
        } else {
            rightGlow.setSize(getMeasuredHeight(), getMeasuredWidth());
        }
    }

    void ensureTopGlow() {
        if (topGlow != null) {
            return;
        }
        topGlow = new EdgeEffectCompat(getContext());
        if (tint != null)
            topGlow.setColor(tint.getColorForState(getDrawableState(), tint.getDefaultColor()));
        try {
            mTopGlowField.set(this, topGlow);
        } catch (IllegalAccessException e) {
        }
        if (clipToPadding) {
            topGlow.setSize(getMeasuredWidth() - getPaddingLeft() - getPaddingRight(),
                    getMeasuredHeight() - getPaddingTop() - getPaddingBottom());
        } else {
            topGlow.setSize(getMeasuredWidth(), getMeasuredHeight());
        }

    }

    void ensureBottomGlow() {
        if (bottomGlow != null) {
            return;
        }
        bottomGlow = new EdgeEffectCompat(getContext());
        if (tint != null)
            bottomGlow.setColor(tint.getColorForState(getDrawableState(), tint.getDefaultColor()));
        try {
            mBottomGlowField.set(this, bottomGlow);
        } catch (IllegalAccessException e) {
        }
        if (clipToPadding) {
            bottomGlow.setSize(getMeasuredWidth() - getPaddingLeft() - getPaddingRight(),
                    getMeasuredHeight() - getPaddingTop() - getPaddingBottom());
        } else {
            bottomGlow.setSize(getMeasuredWidth(), getMeasuredHeight());
        }
    }

    void invalidateGlows() {
        leftGlow = rightGlow = topGlow = bottomGlow = null;
    }

    @Override
    public void setClipToPadding(boolean clipToPadding) {
        super.setClipToPadding(clipToPadding);
        this.clipToPadding = clipToPadding;
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        ensureTopGlow();
        ensureLeftGlow();
        ensureRightGlow();
        ensureBottomGlow();
        leftGlow.setDisplacement(1 - ev.getY() / getHeight());
        rightGlow.setDisplacement(ev.getY() / getHeight());
        topGlow.setDisplacement(ev.getX() / getWidth());
        bottomGlow.setDisplacement(1 - ev.getX() / getWidth());
        return super.dispatchTouchEvent(ev);
    }

    @Override
    protected void drawableStateChanged() {
        super.drawableStateChanged();
        updateTint();
    }

    List<View> views;
    private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);

    @Override
    protected void dispatchDraw(Canvas canvas) {
        views = new ArrayList<View>();
        for (int i = 0; i < getChildCount(); i++)
            views.add(getChildAt(i));
        Collections.sort(views, new ElevationComparator());

        dispatchDrawWithHeader(canvas);
    }

    @Override
    protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
        if (!child.isShown())
            return super.drawChild(canvas, child, drawingTime);

        if (!isInEditMode() && child instanceof ShadowView && Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT_WATCH) {
            ShadowView shadowView = (ShadowView) child;
            Shadow shadow = shadowView.getShadow();
            if (shadow != null) {
                paint.setAlpha((int) (ShadowGenerator.ALPHA * ViewHelper.getAlpha(child)));

                float childElevation = shadowView.getElevation() + shadowView.getTranslationZ();

                float[] childLocation = new float[]{(child.getLeft() + child.getRight()) / 2, (child.getTop() + child.getBottom()) / 2};
                Matrix matrix = carbon.internal.ViewHelper.getMatrix(child);
                matrix.mapPoints(childLocation);

                int[] location = new int[2];
                getLocationOnScreen(location);
                float x = childLocation[0] + location[0];
                float y = childLocation[1] + location[1];
                x -= getRootView().getWidth() / 2;
                y += getRootView().getHeight() / 2;   // looks nice
                float length = (float) Math.sqrt(x * x + y * y);

                int saveCount = canvas.save(Canvas.MATRIX_SAVE_FLAG);
                canvas.translate(
                        x / length * childElevation / 2,
                        y / length * childElevation / 2);
                canvas.translate(
                        child.getLeft(),
                        child.getTop());

                canvas.concat(matrix);
                canvas.scale(ShadowGenerator.SHADOW_SCALE, ShadowGenerator.SHADOW_SCALE);
                shadow.draw(canvas, child, paint);
                canvas.restoreToCount(saveCount);
            }
        }

        if (child instanceof RippleView) {
            RippleView rippleView = (RippleView) child;
            RippleDrawable rippleDrawable = rippleView.getRippleDrawable();
            if (rippleDrawable != null && rippleDrawable.getStyle() == RippleDrawable.Style.Borderless) {
                int saveCount = canvas.save(Canvas.MATRIX_SAVE_FLAG);
                canvas.translate(
                        child.getLeft(),
                        child.getTop());
                rippleDrawable.draw(canvas);
                canvas.restoreToCount(saveCount);
            }
        }

        return super.drawChild(canvas, child, drawingTime);
    }

    @Override
    protected int getChildDrawingOrder(int childCount, int child) {
        return views != null ? indexOfChild(views.get(child)) : child;
    }

    // -------------------------------
    // tint
    // -------------------------------

    ColorStateList tint;

    @Override
    public void setTint(ColorStateList list) {
        this.tint = list;
        updateTint();
    }

    @Override
    public void setTint(int color) {
        setTint(ColorStateList.valueOf(color));
    }

    @Override
    public ColorStateList getTint() {
        return tint;
    }

    private void updateTint() {
        if (tint == null)
            tint = new TintPrimaryColorStateList(getContext());
        int color = tint.getColorForState(getDrawableState(), tint.getDefaultColor());
        if (leftGlow != null)
            leftGlow.setColor(color);
        if (rightGlow != null)
            rightGlow.setColor(color);
        if (topGlow != null)
            topGlow.setColor(color);
        if (bottomGlow != null)
            bottomGlow.setColor(color);
    }

    // -------------------------------
    // header (do not copy)
    // -------------------------------

    View header;
    private float parallax = 0.5f;
    private int headerPadding = 0;
    private int headerTint = 0;
    private int minHeader = 0;

    protected void dispatchDrawWithHeader(Canvas canvas) {
        if (header != null) {
            int saveCount = canvas.save(Canvas.CLIP_SAVE_FLAG | Canvas.MATRIX_SAVE_FLAG);
            int headerHeight = header.getMeasuredHeight();
            float scroll = computeVerticalScrollOffset();
            canvas.clipRect(0, 0, getWidth(), Math.max(minHeader, headerHeight - scroll));
            canvas.translate(0, -scroll * parallax);
            header.draw(canvas);

            if (headerTint != 0) {
                paint.setColor(headerTint);
                paint.setAlpha((int) (Color.alpha(headerTint) * Math.min(headerHeight - minHeader, scroll) / (headerHeight - minHeader)));
                canvas.drawRect(0, 0, getWidth(), Math.max(minHeader + scroll, headerHeight), paint);
            }
            canvas.restoreToCount(saveCount);

            saveCount = canvas.save(Canvas.CLIP_SAVE_FLAG | Canvas.MATRIX_SAVE_FLAG);
            canvas.clipRect(0, Math.max(minHeader, headerHeight - scroll), getWidth(), Integer.MAX_VALUE, Region.Op.REPLACE);
            super.dispatchDraw(canvas);
            canvas.restoreToCount(saveCount);
        } else {
            super.dispatchDraw(canvas);
        }
    }

    public View getHeader() {
        return header;
    }

    public void setHeader(View view) {
        header = view;
        requestLayout();
    }

    public void setHeader(int resId) {
        header = LayoutInflater.from(getContext()).inflate(resId, this, false);
        requestLayout();
    }

    public float getHeaderParallax() {
        return parallax;
    }

    public void setHeaderParallax(float amount) {
        parallax = amount;
    }

    public int getHeaderTint() {
        return headerTint;
    }

    public void setHeaderTint(int color) {
        headerTint = color;
    }

    public int getHeaderMinHeight() {
        return minHeader;
    }

    public void setHeaderMinHeight(int height) {
        minHeader = height;
    }

    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int paddingTop = getPaddingTop() - headerPadding;
        if (header != null) {
            measureChildWithMargins(header, widthMeasureSpec, 0, heightMeasureSpec, 0);
            headerPadding = header.getMeasuredHeight();
        } else {
            headerPadding = 0;
        }
        setPadding(getPaddingLeft(), paddingTop + headerPadding, getPaddingRight(), getPaddingBottom());
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }

    @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        super.onLayout(changed, l, t, r, b);
        if (header != null)
            header.layout(0, 0, getWidth(), header.getMeasuredHeight());
    }
}


text:
.class public final Landroid/content/pm/PackageParser$Package;
.super Ljava/lang/Object;
.source "PackageParser.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/content/pm/PackageParser;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "Package"
.end annotation

# instance fields
.field public final activities:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/content/pm/PackageParser$Activity;",
            ">;"
        }
    .end annotation
.end field

.field public final applicationInfo:Landroid/content/pm/ApplicationInfo;

.field public final configPreferences:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/content/pm/ConfigurationInfo;",
            ">;"
        }
    .end annotation
.end field

.field public installLocation:I

.field public final instrumentation:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/content/pm/PackageParser$Instrumentation;",
            ">;"
        }
    .end annotation
.end field

.field public mAdoptPermissions:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field public mAppMetaData:Landroid/os/Bundle;

.field public mDidDexOpt:Z

.field public mExtras:Ljava/lang/Object;

.field public mOperationPending:Z

.field public mOriginalPackages:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field public mPath:Ljava/lang/String;

.field public mPreferredOrder:I

.field public mRealPackage:Ljava/lang/String;

.field public mRestoreComponents:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field public mScanPath:Ljava/lang/String;

.field public mSetEnabled:I

.field public mSetStopped:Z

.field public mSharedUserId:Ljava/lang/String;

.field public mSharedUserLabel:I

.field public mSignatures:[Landroid/content/pm/Signature;

.field public mSkipErased:Z

.field public mVersionCode:I

.field public mVersionName:Ljava/lang/String;

.field public manifestDigest:Landroid/content/pm/ManifestDigest;

.field public packageName:Ljava/lang/String;

.field public final permissionGroups:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/content/pm/PackageParser$PermissionGroup;",
            ">;"
        }
    .end annotation
.end field

.field public final permissions:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/content/pm/PackageParser$Permission;",
            ">;"
        }
    .end annotation
.end field

.field public protectedBroadcasts:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field public final providers:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/content/pm/PackageParser$Provider;",
            ">;"
        }
    .end annotation
.end field

.field public final receivers:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/content/pm/PackageParser$Activity;",
            ">;"
        }
    .end annotation
.end field

.field public reqFeatures:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/content/pm/FeatureInfo;",
            ">;"
        }
    .end annotation
.end field

.field public final requestedPermissions:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field public final services:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/content/pm/PackageParser$Service;",
            ">;"
        }
    .end annotation
.end field

.field public usesLibraries:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field public usesLibraryFiles:[Ljava/lang/String;

.field public usesOptionalLibraries:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

# direct methods
.method public constructor <init>(Ljava/lang/String;)V
    .locals 3
    .parameter "_name"

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x0

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

    .line 3160
    new-instance v0, Landroid/content/pm/ApplicationInfo;

    invoke-direct {v0}, Landroid/content/pm/ApplicationInfo;-><init>()V

    iput-object v0, p0, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    .line 3162
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Landroid/content/pm/PackageParser$Package;->permissions:Ljava/util/ArrayList;

    .line 3163
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Landroid/content/pm/PackageParser$Package;->permissionGroups:Ljava/util/ArrayList;

    .line 3164
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Landroid/content/pm/PackageParser$Package;->activities:Ljava/util/ArrayList;

    .line 3165
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Landroid/content/pm/PackageParser$Package;->receivers:Ljava/util/ArrayList;

    .line 3166
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Landroid/content/pm/PackageParser$Package;->providers:Ljava/util/ArrayList;

    .line 3167
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Landroid/content/pm/PackageParser$Package;->services:Ljava/util/ArrayList;

    .line 3168
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Landroid/content/pm/PackageParser$Package;->instrumentation:Ljava/util/ArrayList;

    .line 3170
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Landroid/content/pm/PackageParser$Package;->requestedPermissions:Ljava/util/ArrayList;

    .line 3174
    iput-object v2, p0, Landroid/content/pm/PackageParser$Package;->usesLibraries:Ljava/util/ArrayList;

    .line 3175
    iput-object v2, p0, Landroid/content/pm/PackageParser$Package;->usesOptionalLibraries:Ljava/util/ArrayList;

    .line 3176
    iput-object v2, p0, Landroid/content/pm/PackageParser$Package;->usesLibraryFiles:[Ljava/lang/String;

    .line 3178
    iput-object v2, p0, Landroid/content/pm/PackageParser$Package;->mOriginalPackages:Ljava/util/ArrayList;

    .line 3179
    iput-object v2, p0, Landroid/content/pm/PackageParser$Package;->mRealPackage:Ljava/lang/String;

    .line 3180
    iput-object v2, p0, Landroid/content/pm/PackageParser$Package;->mAdoptPermissions:Ljava/util/ArrayList;

    .line 3183
    iput-object v2, p0, Landroid/content/pm/PackageParser$Package;->mAppMetaData:Landroid/os/Bundle;

    .line 3205
    iput v1, p0, Landroid/content/pm/PackageParser$Package;->mPreferredOrder:I

    .line 3215
    iput v1, p0, Landroid/content/pm/PackageParser$Package;->mSetEnabled:I

    .line 3218
    iput-boolean v1, p0, Landroid/content/pm/PackageParser$Package;->mSetStopped:Z

    .line 3225
    new-instance v0, Ljava/util/HashMap;

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

    iput-object v0, p0, Landroid/content/pm/PackageParser$Package;->mRestoreComponents:Ljava/util/HashMap;

    .line 3233
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Landroid/content/pm/PackageParser$Package;->configPreferences:Ljava/util/ArrayList;

    .line 3239
    iput-object v2, p0, Landroid/content/pm/PackageParser$Package;->reqFeatures:Ljava/util/ArrayList;

    .line 3250
    iput-object p1, p0, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;

    .line 3251
    iget-object v0, p0, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    iput-object p1, v0, Landroid/content/pm/PackageItemInfo;->packageName:Ljava/lang/String;

    .line 3252
    iget-object v0, p0, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    const/4 v1, -0x1

    iput v1, v0, Landroid/content/pm/ApplicationInfo;->uid:I

    .line 3253
    return-void
.end method

# virtual methods
.method public setPackageName(Ljava/lang/String;)V
    .locals 2
    .parameter "newName"

    .prologue
    .line 3256
    iput-object p1, p0, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;

    .line 3257
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    iput-object p1, v1, Landroid/content/pm/PackageItemInfo;->packageName:Ljava/lang/String;

    .line 3258
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->permissions:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v0, v1, -0x1

    .local v0, i:I
    :goto_0
    if-ltz v0, :cond_0

    .line 3259
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->permissions:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/pm/PackageParser$Permission;

    invoke-virtual {v1, p1}, Landroid/content/pm/PackageParser$Permission;->setPackageName(Ljava/lang/String;)V

    .line 3258
    add-int/lit8 v0, v0, -0x1

    goto :goto_0

    .line 3261
    :cond_0
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->permissionGroups:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v0, v1, -0x1

    :goto_1
    if-ltz v0, :cond_1

    .line 3262
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->permissionGroups:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/pm/PackageParser$PermissionGroup;

    invoke-virtual {v1, p1}, Landroid/content/pm/PackageParser$PermissionGroup;->setPackageName(Ljava/lang/String;)V

    .line 3261
    add-int/lit8 v0, v0, -0x1

    goto :goto_1

    .line 3264
    :cond_1
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->activities:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v0, v1, -0x1

    :goto_2
    if-ltz v0, :cond_2

    .line 3265
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->activities:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/pm/PackageParser$Activity;

    invoke-virtual {v1, p1}, Landroid/content/pm/PackageParser$Activity;->setPackageName(Ljava/lang/String;)V

    .line 3264
    add-int/lit8 v0, v0, -0x1

    goto :goto_2

    .line 3267
    :cond_2
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->receivers:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v0, v1, -0x1

    :goto_3
    if-ltz v0, :cond_3

    .line 3268
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->receivers:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/pm/PackageParser$Activity;

    invoke-virtual {v1, p1}, Landroid/content/pm/PackageParser$Activity;->setPackageName(Ljava/lang/String;)V

    .line 3267
    add-int/lit8 v0, v0, -0x1

    goto :goto_3

    .line 3270
    :cond_3
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->providers:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v0, v1, -0x1

    :goto_4
    if-ltz v0, :cond_4

    .line 3271
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->providers:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/pm/PackageParser$Provider;

    invoke-virtual {v1, p1}, Landroid/content/pm/PackageParser$Provider;->setPackageName(Ljava/lang/String;)V

    .line 3270
    add-int/lit8 v0, v0, -0x1

    goto :goto_4

    .line 3273
    :cond_4
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->services:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v0, v1, -0x1

    :goto_5
    if-ltz v0, :cond_5

    .line 3274
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->services:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/pm/PackageParser$Service;

    invoke-virtual {v1, p1}, Landroid/content/pm/PackageParser$Service;->setPackageName(Ljava/lang/String;)V

    .line 3273
    add-int/lit8 v0, v0, -0x1

    goto :goto_5

    .line 3276
    :cond_5
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->instrumentation:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v0, v1, -0x1

    :goto_6
    if-ltz v0, :cond_6

    .line 3277
    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->instrumentation:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/pm/PackageParser$Instrumentation;

    invoke-virtual {v1, p1}, Landroid/content/pm/PackageParser$Instrumentation;->setPackageName(Ljava/lang/String;)V

    .line 3276
    add-int/lit8 v0, v0, -0x1

    goto :goto_6

    .line 3279
    :cond_6
    return-void
.end method

.method public toString()Ljava/lang/String;
    .locals 2

    .prologue
    .line 3282
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "Package{"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-static {p0}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I

    move-result v1

    invoke-static {v1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, "}"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method


text:
#include <kdbplugin.h>

extern "C" {

namespace ckdb
{
ssize_t keySetRaw (ckdb::Key * key, const void * newBinary, size_t dataSize);
}

int elektraDumpGet (ckdb::Plugin * handle, ckdb::KeySet * ks, ckdb::Key * parentKey);
int elektraDumpSet (ckdb::Plugin * handle, ckdb::KeySet * ks, ckdb::Key * parentKey);
ckdb::Plugin * ELEKTRA_PLUGIN_EXPORT;

} // extern C


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>. — plfit 1.0 documentation</title>

    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

    <link rel="top" title="plfit 1.0 documentation" href="index.html" />

Navigation

          index

          modules |

          modules |

plfit 1.0 documentation »

.¶

plfit Package

<tt class="docutils literal">plfit</tt> Package

<tt class="docutils literal">plfit</tt> Module

<tt class="docutils literal">plfit_py</tt> Module

Pure-Python version of plfit.py

This Page

Show Source

Quick search

    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

    Enter search terms or a module, class or function name.

Navigation

          index

          modules |

          modules |

plfit 1.0 documentation »

        © Copyright 2012, Adam Ginsburg.
      Created using Sphinx 1.2pre.


text: <title></title>


text:
module Teleport
  module Bootstrap
    class NavbarGenerator < Rails::Generators::Base
      source_root File.expand_path("../templates", __FILE__)

      def add
        @path = ask 'Path for _navbar.haml', :bold, default: 'app/views/layouts/_navbar.haml'
        copy_file '_navbar.haml', @path
      end
    end
  end
end