text:
/// <reference path="../../_references.ts"/>

module powerbitests {
    import TextProperties = powerbi.TextProperties;
    import TextMeasurementService = powerbi.TextMeasurementService;

    describe("Text measurement service", () => {
        let Ellipsis = '…';

        describe('measureSvgTextElementWidth', () => {
            it('svg text element', () => {
                let element = $("<text>")
                    .text("PowerBI rocks!")
                    .css({
                        "font-family": "Arial",
                        "font-size": "11px",
                        "font-weight": "bold",
                        "font-style": "italic",
                        "white-space": "nowrap",
                    });
                attachToDom(element);

                let width = TextMeasurementService.measureSvgTextElementWidth(<any>element.get(0));
                expect(width).toBeGreaterThan(50);
            });
        });

        it("measureSvgTextWidth", () => {
            let getTextWidth = (fontSize: number) => {
                let textProperties = getTextProperties(fontSize);
                return TextMeasurementService.measureSvgTextWidth(textProperties);
            };

            expect(getTextWidth(10)).toBeLessThan(getTextWidth(12));
        });

        it("estimateSvgTextHeight", () => {
            let getTextHeight = (fontSize: number) => {
                let textProperties = getTextProperties(fontSize);
                return TextMeasurementService.estimateSvgTextHeight(textProperties);
            };

            expect(getTextHeight(10)).toBeLessThan(getTextHeight(12));
        });

        it("estimateSvgTextBaselineDelta", () => {
            let getTextBaselineDelta = (fontSize: number) => {
                let textProperties = getTextProperties(fontSize);
                return TextMeasurementService.estimateSvgTextBaselineDelta(textProperties);
            };

            expect(getTextBaselineDelta(10)).toBeLessThan(getTextBaselineDelta(20));
        });

        it("estimateSvgTextHeight numeric", () => {
            let getTextHeight = (fontSize: number, numeric) => {
                let textProperties = getTextProperties(fontSize);
                return TextMeasurementService.estimateSvgTextHeight(textProperties, numeric);
            };

            expect(getTextHeight(12, true)).toBeLessThan(getTextHeight(12, false));
        });

        describe('estimate cache', () => {
            let setDataSpy: jasmine.Spy;

            beforeEach(() => {
                powerbi.ephemeralStorageService['clearCache']();
                setDataSpy = spyOn(powerbi.ephemeralStorageService, 'setData');
                setDataSpy.and.callThrough();
            });

            it("estimateSvgTextHeight does cache", () => {
                TextMeasurementService.estimateSvgTextHeight(getTextProperties(10, 'A', 'RandomFont'));
                TextMeasurementService.estimateSvgTextHeight(getTextProperties(10, 'B', 'RandomFont'));
                TextMeasurementService.estimateSvgTextHeight(getTextProperties(14, 'C', 'RandomFont'));
                TextMeasurementService.estimateSvgTextHeight(getTextProperties(14, 'D', 'RandomFont'));
                TextMeasurementService.estimateSvgTextHeight(getTextProperties(10, 'E', 'RandomFont2'));
                TextMeasurementService.estimateSvgTextHeight(getTextProperties(10, 'F', 'RandomFont2'));

                expect(setDataSpy.calls.count()).toBe(3);
            });

            it("estimateSvgTextBaselineDelta does cache", () => {
                TextMeasurementService.estimateSvgTextBaselineDelta(getTextProperties(10, 'A', 'RandomFont'));
                TextMeasurementService.estimateSvgTextBaselineDelta(getTextProperties(10, 'B', 'RandomFont'));
                TextMeasurementService.estimateSvgTextBaselineDelta(getTextProperties(14, 'C', 'RandomFont'));
                TextMeasurementService.estimateSvgTextBaselineDelta(getTextProperties(14, 'D', 'RandomFont'));
                TextMeasurementService.estimateSvgTextBaselineDelta(getTextProperties(10, 'E', 'RandomFont2'));
                TextMeasurementService.estimateSvgTextBaselineDelta(getTextProperties(10, 'F', 'RandomFont2'));

                expect(setDataSpy.calls.count()).toBe(3);
            });
        });

        it("measureSvgTextHeight", () => {
            let getTextHeight = (fontSize: number) => {
                let textProperties = getTextProperties(fontSize);
                return TextMeasurementService.measureSvgTextHeight(textProperties);
            };

            expect(getTextHeight(10)).toBeLessThan(getTextHeight(12));
        });

        it("measureSvgTextRect", () => {
            let getTextRect = (fontSize: number) => {
                let textProperties = getTextProperties(fontSize);
                return TextMeasurementService.measureSvgTextRect(textProperties);
            };

            let smallRect = getTextRect(10);
            let largeRect = getTextRect(14);

            expect(smallRect.height).toBeLessThan(largeRect.height);
            //the y point of the rect is at the top of the rect, the y point of the text is (almost) at the bottom of the text.
            //both y will be less than 0, testing the absolute y value.
            expect(Math.abs(smallRect.y)).toBeLessThan(Math.abs(largeRect.y));
        });

        it("getMeasurementProperties", () => {
            let element = $("<text>")
                .text("PowerBI rocks!")
                .css({
                    "font-family": "Arial",
                    "font-size": "11px",
                    "font-weight": "bold",
                    "font-style": "italic",
                    "white-space": "nowrap",
                });
            attachToDom(element);

            let properties = TextMeasurementService.getMeasurementProperties(element);
            let expectedProperties: TextProperties = {
                fontFamily: "Arial",
                fontSize: "11px",
                fontWeight: "bold",
                fontStyle: "italic",
                whiteSpace: "nowrap",
                text: "PowerBI rocks!",
            };

            expect(properties).toEqual(expectedProperties);
        });

        describe("getSvgMeasurementProperties", () => {
            it("svg text element", () => {
                let svg = $("<svg>");
                let element = $("<text>")
                    .text("PowerBI rocks!")
                    .css({
                        "font-family": "Arial",
                        "font-size": "11px",
                        "font-weight": "bold",
                        "font-style": "italic",
                        "white-space": "nowrap",
                    });
                svg.append(element);
                attachToDom(svg);

                let properties = TextMeasurementService.getSvgMeasurementProperties(<any>element[0]);
                let expectedProperties: TextProperties = {
                    fontFamily: "Arial",
                    fontSize: "11px",
                    fontWeight: "bold",
                    fontStyle: "italic",
                    whiteSpace: "nowrap",
                    text: "PowerBI rocks!",
                };

                expect(properties).toEqual(expectedProperties);
            });
        });

        describe('getTailoredTextOrDefault', () => {
            it("without ellipsis", () => {
                let properties: TextProperties = {
                    fontFamily: "Arial",
                    fontSize: "11px",
                    fontWeight: "bold",
                    fontStyle: "italic",
                    whiteSpace: "nowrap",
                    text: "PowerBI rocks!",
                };

                let text = TextMeasurementService.getTailoredTextOrDefault(properties, 100);

                expect(text).toEqual("PowerBI rocks!");
            });

            it("with ellipsis", () => {
                let properties: TextProperties = {
                    fontFamily: "Arial",
                    fontSize: "11px",
                    fontWeight: "bold",
                    fontStyle: "italic",
                    whiteSpace: "nowrap",
                    text: "PowerBI rocks!",
                };

                let text = TextMeasurementService.getTailoredTextOrDefault(properties, 45);

                expect(jsCommon.StringExtensions.endsWith(text, Ellipsis)).toBeTruthy();
                expect(jsCommon.StringExtensions.startsWithIgnoreCase(text, 'Pow')).toBeTruthy();
            });
        });

        describe('svgEllipsis', () => {
            it("with ellipsis", () => {
                let element = createSvgTextElement("PowerBI rocks!");
                attachToDom(element);

                TextMeasurementService.svgEllipsis(<any>element[0], 20);

                let text = $(element).text();
                expect(jsCommon.StringExtensions.endsWith(text, Ellipsis)).toBeTruthy();
            });

            it("without ellipsis", () => {
                let element = createSvgTextElement("PowerBI rocks!");
                attachToDom(element);

                TextMeasurementService.svgEllipsis(<any>element[0], 100);

                let text = $(element).text();
                expect(text).toEqual("PowerBI rocks!");
            });
        });

        describe('wordBreak', () => {
            it('with no breaks', () => {
                let originalText = "ContentWithNoBreaks!";
                let element = createSvgTextElement(originalText);
                attachToDom(element);

                TextMeasurementService.wordBreak(<any>element[0], 25 /* maxLength */, 20 * 1 /* maxHeight */);

                let text = $(element).text();
                expect($(element).find('tspan').length).toBe(1);
                expect(jsCommon.StringExtensions.endsWith(text, Ellipsis)).toBeTruthy();
            });

            it('with breaks and ellipses', () => {
                let originalText = "PowerBI rocks!";
                let element = createSvgTextElement(originalText);
                attachToDom(element);

                TextMeasurementService.wordBreak(<any>element[0], 25 /* maxLength */, 20 * 2 /* maxHeight */);

                let text = $(element).text();
                expect($(element).find('tspan').length).toBe(2);
                expect(text.match(RegExp(Ellipsis, 'g')).length).toBe(2);
            });

            it('with breaks but forced to single line', () => {
                let originalText = "PowerBI rocks!";
                let element = createSvgTextElement(originalText);
                attachToDom(element);

                TextMeasurementService.wordBreak(<any>element[0], 25 /* maxLength */, 20 * 1 /* maxHeight */);

                let text = $(element).text();
                expect($(element).find('tspan').length).toBe(1);
                expect(jsCommon.StringExtensions.endsWith(text, Ellipsis)).toBeTruthy();
            });

            it('with breaks but forced to single line due to low max height', () => {
                let originalText = "PowerBI rocks!";
                let element = createSvgTextElement(originalText);
                attachToDom(element);

                TextMeasurementService.wordBreak(<any>element[0], 25 /* maxLength */, 1 /* maxHeight */);

                let text = $(element).text();
                expect($(element).find('tspan').length).toBe(1);
                expect(jsCommon.StringExtensions.endsWith(text, Ellipsis)).toBeTruthy();
            });

            it('with breaks multiple words on each line', () => {
                let originalText = "The Quick Brown Fox Jumped Over The Lazy Dog";
                let element = createSvgTextElement(originalText);
                attachToDom(element);

                TextMeasurementService.wordBreak(<any>element[0], 75 /* maxLength */, 20 * 3 /* maxHeight */);

                let text = $(element).text();
                expect($(element).find('tspan').length).toBe(3);
                expect(jsCommon.StringExtensions.endsWith(text, Ellipsis)).toBeTruthy();
            });
        });

        describe('wordBreakOverflowingText', () => {
            it('with no breaks', () => {
                var originalText = "ContentWithNoBreaks!";
                var element = createSpanElement(originalText);
                attachToDom(element);

                TextMeasurementService.wordBreakOverflowingText(<any>element[0], 25 /* maxLength */, 20 * 1 /* maxHeight */);
                var children = getChildren(element);
                expect(children.length).toBe(1);
                helpers.verifyEllipsisActive(children.first());
            });

            it('with breaks and ellipses', () => {
                var originalText = "PowerBI rocks!";
                var element = createSpanElement(originalText);
                attachToDom(element);

                TextMeasurementService.wordBreakOverflowingText(<any>element[0], 25 /* maxLength */, 20 * 2 /* maxHeight */);

                var children = getChildren(element);
                expect(children.length).toBe(2);
                helpers.verifyEllipsisActive(children.first());
                helpers.verifyEllipsisActive(children.last());
            });

            it('with breaks but forced to single line', () => {
                var originalText = "PowerBI rocks!";
                var element = createSpanElement(originalText);
                attachToDom(element);

                TextMeasurementService.wordBreakOverflowingText(<any>element[0], 25 /* maxLength */, 20 * 1 /* maxHeight */);

                var children = getChildren(element);
                expect(children.length).toBe(1);
                helpers.verifyEllipsisActive(children.first());
            });

            it('with breaks but forced to single line due to low max height', () => {
                var originalText = "PowerBI rocks!";
                var element = createSpanElement(originalText);
                attachToDom(element);

                TextMeasurementService.wordBreakOverflowingText(<any>element[0], 25 /* maxLength */, 1 /* maxHeight */);

                var children = getChildren(element);
                expect(children.length).toBe(1);
                helpers.verifyEllipsisActive(children.first());
            });

            it('with breaks multiple words on each line', () => {
                var originalText = "The Quick Brown Fox Jumped Over The Lazy Dog";
                var element = createSpanElement(originalText);
                attachToDom(element);

                TextMeasurementService.wordBreakOverflowingText(<any>element[0], 75 /* maxLength */, 20 * 3 /* maxHeight */);

                var children = getChildren(element);
                expect(children.length).toBe(3);
                helpers.verifyEllipsisActive(children.last());
            });

            function getChildren(element: JQuery): JQuery {
                return $(element).children();
            }
        });

        function attachToDom(element: JQuery|Element): JQuery {
            let dom = powerbitests.helpers.testDom('100px', '100px');
            dom.append([element]);
            return dom;
        }

        function createSvgTextElement(text: string): SVGTextElement {
            let svg = $("<svg>");
            let element = d3.select($("<text>").get(0)).text(text);
            svg.append(element);

            return element[0];
        }

        function createSpanElement(text: string): JQuery {
            var element = $("<span>");
            element.text(text);

            return element;
        }

        function getTextProperties(fontSize: number, text?: string, fontFamily?: string): TextProperties {
            return {
                fontFamily: fontFamily ? fontFamily : "Arial",
                fontSize: fontSize + "px",
                text: text ? text : "PowerBI rocks!",
            };
        }
    });
}


text:
namespace mitk
{

  ///
  /// d pointer forward declaration
  ///
  struct EndoDebugFromXmlFileData;

  ///
  /// read EndoDebug params from xml file
  ///
  class mitkCameraCalibration_EXPORT EndoDebugFromXmlFile:
    public Algorithm
  {
  public:
    ///
    /// init default values
    ///
    EndoDebugFromXmlFile(
      const std::string* _FileName,
      EndoDebug* _EndoDebug);

    ///
    /// Actually Updates the algorithm
    ///
    void Update();

    ///
    /// nothing to do here yet
    ///
    virtual ~EndoDebugFromXmlFile();
  protected:
  private:
    ///
    /// d pointer implementation
    ///
    EndoDebugFromXmlFileData* d;
  };

} // namespace mitk

#endif // mitkEndoDebugFromXmlFile_h

redpajama_set_name: RedPajamaGithub


text:
<?php

use Zcard\GeoIP\Wrapper;

class IPTest extends PHPUnit_Framework_TestCase
{
	/**
	 * Starting the wrapper without config may raise an
	 * exception for non existing database
	 *
	 * @expectedException UnexpectedValueException
	 */
	public function testInitNoConfig()
	{
		$app = new Wrapper();
	}

	/**
	 * Trying to open invalid database should fire up
	 * an exception
	 *
	 * @expectedException MaxMind\Db\Reader\InvalidDatabaseException
	 */
	public function testMaxMindDriverWithExistingFileThatIsNotDatabase()
	{
		$app = new Wrapper(array(
			'driver'	=> 'maxmind',
			'maxmind_db'=> '/etc/passwd',
		));
	}

	public function testInitLowercaseMySQL()
	{
		$app = new Wrapper(array('driver' => 'mysql'));
	}

	public function testInitMixedCaseMySQL()
	{
		$app = new Wrapper(array('driver' => 'MySQL'));
	}

	/**
	 * @expectedException InvalidArgumentException
	 */
	public function testBadDriver()
	{
		$app = new Wrapper(array('driver' => 'Bad Driver'));
	}

	/**
	 * This function should test both ipv4 and ipv6
	 * without issues.
	 *
	 */
	public function testIpAddressChecker()
	{
		$app = new Wrapper(array('driver' => 'test'));

		$ipList = array(
			'127.0.0.1' => true,
			'192.168.0.1' => false,
			'87.255.127.98' => true,
			'008.008.008.008' => false,
			'256.256.256.256' => false,
			'255.255.255.255' => true,
			'0.0.0.0' => true,

			'2607:f0d0:1002:51::4' => true,
			'2607:f0d0:1002:0051:0000:0000:0000:0004' => true,
		);

		foreach($ipList as $ip => $assertion)
		{
			if ( $assertion )
			{
				$this->assertTrue($app->isValidIp($ip), 'Address: ' . $ip);
			}
			else
			{
				$this->assertFalse($app->isValidIp($ip), 'Address: ' . $ip);
			}
		}
	}
}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/accessapproval/v1/accessapproval.proto

package com.google.cloud.accessapproval.v1;

public interface ResourcePropertiesOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.accessapproval.v1.ResourceProperties)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Whether an approval will exclude the descendants of the resource being
   * requested.
   *

   *
   * bool excludes_descendants = 1;
   *
   * @return The excludesDescendants.
   */
  boolean getExcludesDescendants();
}


text:
package org.apache.geode.management.internal.web.domain;

import java.io.Serializable;

import javax.management.ObjectName;
import javax.management.QueryExp;

/**
 * The QueryParameterSource class encapsulates details in order to perform a query on an JMX MBean
 * server.
 * <p>
 *
 * @see java.io.Serializable
 * @see javax.management.ObjectName
 * @see javax.management.QueryExp
 * @since GemFire 8.0
 */
@SuppressWarnings("unused")
public class QueryParameterSource implements Serializable {

  private static final long serialVersionUID = 34131123582155l;

  private final ObjectName objectName;

  private final QueryExp queryExpression;

  public QueryParameterSource(final ObjectName objectName, final QueryExp queryExpression) {
    this.objectName = objectName;
    this.queryExpression = queryExpression;
  }

  public ObjectName getObjectName() {
    return objectName;
  }

  public QueryExp getQueryExpression() {
    return queryExpression;
  }

  @Override
  public String toString() {
    return "{" + "{ objectName = " + getObjectName()
        + ", queryExpression = " + getQueryExpression()
        + " }";
  }

}


text:
module ChgkRating
  module Request
    include ChgkRating::Connection

    def get(path, params = {})
      respond perform_get(path, params)
    end

    private

    def perform_get(path, params)
      connection.get do |req|
        req.url path
        req.params = params
      end
    end

    def respond(response)
      body = MultiJson.load response.body
      raise MultiJson::ParseError if body.respond_to?(:has_key?) && body.key?('error')

      body
    rescue MultiJson::ParseError
      respond_with_error response.status, response.body
    end

    def respond_with_error(code, body)
      raise ChgkRating::Error::ERRORS[code].from_response(body)
    end
  end
end


text:
<?php

namespace Auth\Service;

use Application\Entity\WcUser;
use Application\Service\AbstractService;
use Zend\Authentication\Result;
use Zend\Stdlib\Hydrator\ClassMethods;

class AuthService extends AbstractService
{

    protected $entity = 'Application\Entity\WcUser';

    public function loginUser()
    {
        if ( in_array( $this->getUserLogged()->getLevel(), [ '1', '2' ] ) ) {

            $resultUser = $this->em->getRepository( 'Application\Entity\WcUser' )->find( $this->getUserLogged()->getId() );
            $result     = new Result( Result::SUCCESS, [ 'user' => $resultUser ], [ 'OK' ] );
            $this->setSessionUser( $result, "SessaoAdmin" );
            /**
             * Se For Revenda
             * Cria a Sessão authRevenda
             */
        }
    }

    public function recover( Array $data = [ ] )
    {

        $translator = $this->sl->get( "translator" );

        $user = $this->em->getRepository( "Application\\Entity\\WcUser" )->findOneBy( $data );
        if ( $user ) {

            /** @var \Application\Service\ApplicationEmailService $serviceMail */
            $serviceMail = $this->sl->get( "Application\\Service\\ApplicationEmailService" );
            $serviceMail->sendMail( [
                'view'    => 'recover-password',
                'to'      => $data['email'],
                'subject' => $translator->translate( "Recover Passord" ),
                'data'    => $user,
            ] );

            return [
                'success' => TRUE,
                'message' => "Successfully sent E-mail
 Verify in your box's e-mail, if not received, verify in your folder of spam",
            ];
        } else {
            return [
                'success' => FALSE,
                'message' => "E-mail not found!",
            ];
        }

    }

    public function activate( $key )
    {

        $translator = $this->sl->get( "translator" );
        $repo       = $this->em->getRepository( "Application\\Entity\\WcUser" );

        /** @var \Application\Entity\WcUser $user */
        $user = $repo->findOneByActivationKey( $key );

        if ( $user && $user->getStatus() == 1 ) {

            $user->setSalt( $user->generateSalt() );
            $user->setActivationKey( $user->generateActivationKey() );

            $newPassword = rand();

            $user->setPassword( $newPassword );
            $this->em->persist( $user );
            $this->em->flush();

            /** @var \Application\Service\ApplicationEmailService $serviceMail */
            $serviceMail = $this->sl->get( "Application\\Service\\ApplicationEmailService" );
            $serviceMail->sendMail( [
                'view'    => 'new-password',
                'to'      => $user->getEmail(),
                'subject' => $translator->translate( "New Passord" ),
                'data'    => [ 'entity' => $user, 'new_password' => $newPassword ],
            ] );

            return [
                'success' => TRUE,
                'message' => "A new email was sent!
 Verify in your box's e-mail, if not received, verify in your folder of spam",
            ];
        } else {
            return [
                'success' => FALSE,
                'message' => "Password Activated",
            ];
        }
    }

    public function getArraySession( WcUser $user )
    {

        $arraySession = [
            'id'           => $user->getId(),
            'firstname'    => $user->getFirstname(),
            'lastname'     => $user->getLastname(),
            'email'        => $user->getEmail(),
            'level'        => $user->getLevel(),
            'status'       => $user->getStatus(),
            'owner'        => [
                'id'        => $user->getOwner()->getId(),
                'firstname' => $user->getOwner()->getFirstname(),
                'lastname'  => $user->getOwner()->getLastname(),
                'email'     => $user->getOwner()->getEmail(),
            ],
            'language'     => [
                'id'           => $user->getLanguage()->getId(),
                'name'         => $user->getLanguage()->getName(),
                'flag'         => $user->getLanguage()->getFlag(),
                'abbreviation' => $user->getLanguage()->getAbbreviation(),
            ],
            'created_at'   => $user->getCreatedAt()->format( 'Y-m-d H:i:s' ),
            'updated_at'   => $user->getUpdatedAt()->format( 'Y-m-d H:i:s' ),
            'user_created' => [
                'id'        => ( $user->getUserCreated() ) ? $user->getUserCreated()->getId() : '',
                'firstname' => ( $user->getUserCreated() ) ? $user->getUserCreated()->getFirstname() : '',
                'lastname'  => ( $user->getUserCreated() ) ? $user->getUserCreated()->getLastname() : '',
                'email'     => ( $user->getUserCreated() ) ? $user->getUserCreated()->getEmail() : '',
            ],
            'user_updated' => [
                'id'        => ( $user->getUserUpdated() ) ? $user->getUserUpdated()->getId() : '',
                'firstname' => ( $user->getUserUpdated() ) ? $user->getUserUpdated()->getFirstname() : '',
                'lastname'  => ( $user->getUserUpdated() ) ? $user->getUserUpdated()->getLastname() : '',
                'email'     => ( $user->getUserUpdated() ) ? $user->getUserUpdated()->getEmail() : '',
            ],
        ];

        $object = new ClassMethods();

        /** @var \Auth\Service\AuthUserEntity $authUserEntity */
        $authUserEntity = new AuthUserEntity();

        $object->hydrate( $arraySession, $authUserEntity );

        return $authUserEntity;
    }

}


text:
<?php

/* SensioDistributionBundle:Configurator:check.html.twig */
class __TwigTemplate_668d4975c9694b0e230936a63a251d0f4c071aeb262cb57387e2c764f94ad85e extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        try {
            $this->parent = $this->env->loadTemplate("SensioDistributionBundle::Configurator/layout.html.twig");
        } catch (Twig_Error_Loader $e) {
            $e->setTemplateFile($this->getTemplateName());
            $e->setTemplateLine(1);

            throw $e;
        }

        $this->blocks = array(
            'content' => array($this, 'block_content'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "SensioDistributionBundle::Configurator/layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_content($context, array $blocks = array())
    {
        // line 4
        echo "    ";
        if (twig_length_filter($this->env, (isset($context["majors"]) ? $context["majors"] : $this->getContext($context, "majors")))) {
            // line 5
            echo "
Major Problems that need to be fixed now

            We have detected ";
            // line 7
            echo twig_escape_filter($this->env, twig_length_filter($this->env, (isset($context["majors"]) ? $context["majors"] : $this->getContext($context, "majors"))), "html", null, true);
            echo " major problems.
            You must fix them before continuing:

            ";
            // line 11
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["majors"]) ? $context["majors"] : $this->getContext($context, "majors")));
            foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
                // line 12
                echo "
";
                echo twig_escape_filter($this->env, $context["message"], "html", null, true);
                echo "

            ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 14
            echo "

    ";
        }
        // line 16
        echo "
    ";
        // line 17
        if (twig_length_filter($this->env, (isset($context["minors"]) ? $context["minors"] : $this->getContext($context, "minors")))) {
            // line 18
            echo "
Some Recommendations

            ";
            // line 21
            if (twig_length_filter($this->env, (isset($context["majors"]) ? $context["majors"] : $this->getContext($context, "majors")))) {
                // line 22
                echo "            Additionally, we
            ";
            } else {
                // line 24
                echo "            We
            ";
            }
            // line 26
            echo "            have detected some minor problems that we recommend you to fix to have a better Symfony
            experience:

                ";
            // line 30
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["minors"]) ? $context["minors"] : $this->getContext($context, "minors")));
            foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
                // line 31
                echo "
";
                echo twig_escape_filter($this->env, $context["message"], "html", null, true);
                echo "

                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 33
            echo "

    ";
        }
        // line 37
        echo "
    ";
        // line 38
        if ( !twig_length_filter($this->env, (isset($context["majors"]) ? $context["majors"] : $this->getContext($context, "majors")))) {
            // line 39
            echo "

env, (isset($context["url"]) ? $context["url"] : $this->getContext($context, "url")), "html", null, true);
            echo "\">Configure your Symfony Application online

    ";
        }
    }

    public function getTemplateName()
    {
        return "SensioDistributionBundle:Configurator:check.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  123 => 40,  120 => 39,  118 => 38,  115 => 37,  109 => 33,  100 => 31,  96 => 30,  90 => 26,  86 => 24,  82 => 22,  80 => 21,  75 => 18,  73 => 17,  70 => 16,  66 => 14,  57 => 12,  53 => 11,  46 => 7,  42 => 5,  39 => 4,  36 => 3,  11 => 1,);
    }
}


text:
  Puymangou est
       un village
       géographiquement positionné dans le département de Dordogne en Aquitaine. On dénombrait 96 habitants en 2008.

À coté de Puymangou sont positionnées géographiquement les villes de
Saint-Aigulin située à 7 km, 1 943 habitants,
La Roche-Chalais localisée à 7 km, 2 765 habitants,
Médillac à 6 km, 158 habitants,
Bonnes localisée à 7 km, 344 habitants,
Saint-Aulaye localisée à 4 km, 1 364 habitants,
Parcoul située à 3 km, 351 habitants,
 entre autres. De plus, Puymangou est située à seulement 23 km de Coutras.

Si vous envisagez de emmenager à Puymangou, vous pourrez facilement trouver une maison à acheter.

Le nombre d'habitations, à Puymangou, se décomposait en 2011 en zero appartements et 55 maisons soit
 un marché relativement équilibré.


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>org.netbeans.modules.php.project</type>
    <configuration>
        <data xmlns="http://www.netbeans.org/ns/php-project/1">
            <name>course-hub</name>
        </data>
    </configuration>
</project>


text:
/**
 * Created by i070970 on 8/3/14.
 */
(function () {
    'use strict';

    var SAP_LOGIN_PATH = '/login';

    function config($routeProvider) {
        $routeProvider.
            when(SAP_LOGIN_PATH, {
                controller: 'sapLoginController',
                controllerAs: 'controller',
                templateUrl: 'partials/index/login/login.html'
            });
    }

    function run($rootScope, $location, sapSharedAuthenticationService) {
        $rootScope.$on('$locationChangeStart', function () {
            if ($location.path() !== SAP_LOGIN_PATH && !sapSharedAuthenticationService.isAuthenticated()) {
                sapSharedAuthenticationService.setRedirectPath($location.path());
                $location.path(SAP_LOGIN_PATH);
            }
        });
    }

    angular.
        module('sapLogin', ['ngRoute', 'ngAnimate', 'sapShared']).
        constant('SAP_LOGIN_PATH', SAP_LOGIN_PATH).
        config(['$routeProvider', config]).
        run(['$rootScope', '$location', 'sapSharedAuthenticationService', run]);

}());


text:
import itertools
from ordereddict import OrderedDict

from django.conf import settings

from tower import ugettext_lazy as _lazy

# WARNING: When adding a new app feature here also include a migration.
#
# WARNING: Order matters here. Don't re-order these or alphabetize them. If you
# add new ones put them on the end.
#
# These are used to dynamically generate the field list for the AppFeatures
# django model in mkt.webapps.models.
APP_FEATURES = OrderedDict([
    ('APPS', {
        'name': _lazy(u'App Management API'),
        'description': _lazy(u'The app requires the `navigator.mozApps` API '
                             u'to install and manage other apps.'),
        'apis': ('navigator.mozApps',),
    }),
    ('PACKAGED_APPS', {
        'name': _lazy(u'Packaged Apps Install API'),
        'description': _lazy(
            u'The app requires the `navigator.mozApps.installPackage` API '
            u'to install other packaged apps.'),
        'apis': ('navigator.mozApps.installPackage',),
    }),
    ('PAY', {
        'name': _lazy(u'Web Payment'),
        'description': _lazy(u'The app requires the `navigator.mozApps` API.'),
        'apis': ('navigator.pay', 'navigator.mozPay',),
    }),
    ('ACTIVITY', {
        'name': _lazy(u'Web Activities'),
        'description': _lazy(u'The app requires Web Activities '
                             u'(the `MozActivity` API).'),
        'apis': ('MozActivity',),
    }),
    ('LIGHT_EVENTS', {
        'name': _lazy(u'Ambient Light Sensor'),
        'description': _lazy(u'The app requires an ambient light sensor '
                             u'(the `ondevicelight` API).'),
        'apis': ('window.ondevicelight',),
    }),
    ('ARCHIVE', {
        'name': _lazy(u'Archive'),
        'description': _lazy(u'The app requires the `ArchiveReader` API.'),
        'apis': ('ArchiveReader',),
    }),
    ('BATTERY', {
        'name': _lazy(u'Battery'),
        'description': _lazy(u'The app requires the `navigator.battery` API.'),
        'apis': ('navigator.battery',),
    }),
    ('BLUETOOTH', {
        'name': u'Bluetooth',
        'description': _lazy(u'The app requires the `navigator.mozBluetooth` '
                             u'API.'),
        'apis': ('navigator.bluetooth', 'navigator.mozBluetooth'),
    }),
    ('CONTACTS', {
        'name': _lazy(u'Contacts'),
        'description': _lazy(u'The app requires the `navigator.mozContacts` '
                             u'API.'),
        'apis': ('navigator.contacts', 'navigator.mozContacts'),
    }),
    ('DEVICE_STORAGE', {
        'name': _lazy(u'Device Storage'),
        'description': _lazy(u'The app requires the Device Storage API to '
                             u'access files on the filesystem.'),
        'apis': ('navigator.getDeviceStorage',),
    }),
    ('INDEXEDDB', {
        'name': u'IndexedDB',
        'description': _lazy(u'The app requires the platform to support '
                             u'IndexedDB.'),
        'apis': ('navigator.indexedDB', 'navigator.mozIndexedDB'),
    }),
    ('GEOLOCATION', {
        'name': _lazy(u'Geolocation'),
        'description': _lazy(u'The app requires the platform to support the '
                             u'`navigator.geolocation` API.'),
        'apis': ('navigator.geolocation',),
    }),
    ('IDLE', {
        'name': _lazy(u'Idle'),
        'description': _lazy(u'The app requires the platform to support the '
                             u'`addIdleObserver` API.'),
        'apis': ('addIdleObserver', 'removeIdleObserver'),
    }),
    ('NETWORK_INFO', {
        'name': _lazy(u'Network Information'),
        'description': _lazy(u'The app requires the ability to get '
                             u'information about the network connection (the '
                             u'`navigator.mozConnection` API).'),
        'apis': ('navigator.mozConnection', 'navigator.mozMobileConnection'),
    }),
    ('NETWORK_STATS', {
        'name': _lazy(u'Network Stats'),
        'description': _lazy(u'The app requires the '
                             u'`navigator.mozNetworkStats` API.'),
        'apis': ('navigator.networkStats', 'navigator.mozNetworkStats'),
    }),
    ('PROXIMITY', {
        'name': _lazy(u'Proximity'),
        'description': _lazy(u'The app requires a proximity sensor (the '
                             u'`ondeviceproximity` API).'),
        'apis': ('navigator.ondeviceproximity',),
    }),
    ('PUSH', {
        'name': _lazy(u'Simple Push'),
        'description': _lazy(u'The app requires the `navigator.mozPush` API.'),
        'apis': ('navigator.push', 'navigator.mozPush'),
    }),
    ('ORIENTATION', {
        'name': _lazy(u'Screen Orientation'),
        'description': _lazy(u'The app requires the platform to support the '
                             u'`ondeviceorientation` API.'),
        'apis': ('ondeviceorientation',),
    }),
    ('TIME_CLOCK', {
        'name': _lazy(u'Time/Clock'),
        'description': _lazy(u'The app requires the `navigator.mozTime` API.'),
        'apis': ('navigator.time', 'navigator.mozTime'),
    }),
    ('VIBRATE', {
        'name': _lazy(u'Vibration'),
        'description': _lazy(u'The app requires the device to support '
                             u'vibration (the `navigator.vibrate` API).'),
        'apis': ('navigator.vibrate',),
    }),
    ('FM', {
        'name': u'WebFM',
        'description': _lazy(u'The app requires the `navigator.mozFM` or '
                             u'`navigator.mozFMRadio` APIs.'),
        'apis': ('navigator.mozFM', 'navigator.mozFMRadio'),
    }),
    ('SMS', {
        'name': u'WebSMS',
        'description': _lazy(u'The app requires the `navigator.mozSms` API.'),
        'apis': ('navigator.mozSms', 'navigator.mozSMS'),
    }),
    ('TOUCH', {
        'name': _lazy(u'Touch'),
        'description': _lazy(u'The app requires the platform to support touch '
                             u'events. This option indicates that the app '
                             u'will not function when used with a mouse.'),
        'apis': ('window.ontouchstart',),
    }),
    ('QHD', {
        'name': _lazy(u'Smartphone-Sized Displays (qHD)'),
        'description': _lazy(u'The app requires the platform to have a '
                             u'smartphone-sized display (having qHD '
                             u'resolution). This option indicates that the '
                             u'app will be unusable on larger displays '
                             u'(e.g., tablets, desktop, large or high-DPI '
                             u'phones).'),
        'apis': (),
    }),
    ('MP3', {
        'name': u'MP3',
        'description': _lazy(u'The app requires that the platform can decode '
                             u'and play MP3 files.'),
        'apis': (),
    }),
    ('AUDIO', {
        'name': _lazy(u'Audio'),
        'description': _lazy(u'The app requires that the platform supports '
                             u'the HTML5 audio API.'),
        'apis': ('Audio',),
    }),
    ('WEBAUDIO', {
        'name': _lazy(u'Web Audio'),
        'description': _lazy(u'The app requires that the platform supports '
                             u'the Web Audio API (`window.AudioContext`).'),
        'apis': ('AudioContext', 'mozAudioContext', 'webkitAudioContext'),
    }),
    ('VIDEO_H264', {
        'name': u'H.264',
        'description': _lazy(u'The app requires that the platform can decode '
                             u'and play H.264 video files.'),
        'apis': (),
    }),
    ('VIDEO_WEBM', {
        'name': u'WebM',
        'description': _lazy(u'The app requires that the platform can decode '
                             u'and play WebM video files (VP8).'),
        'apis': (),
    }),
    ('FULLSCREEN', {
        'name': _lazy(u'Full Screen'),
        'description': _lazy(u'The app requires the Full Screen API '
                             u'(`requestFullScreen` or '
                             u'`mozRequestFullScreen`).'),
        'apis': ('document.documentElement.requestFullScreen',),
    }),
    ('GAMEPAD', {
        'name': _lazy(u'Gamepad'),
        'description': _lazy(u'The app requires the platform to support the '
                             u'gamepad API (`navigator.getGamepads`).'),
        'apis': ('navigator.getGamepad', 'navigator.mozGetGamepad'),
    }),
    ('QUOTA', {
        'name': _lazy(u'Quota Management'),
        'description': _lazy(u'The app requires the platform to allow '
                             u'persistent storage limit increases above the '
                             u'normally allowed limits for an app '
                             u'(`window.StorageInfo` or '
                             u'`window.persistentStorage`).'),
        'apis': ('navigator.persistentStorage', 'navigator.temporaryStorage'),
    }),
    ('CAMERA', {
        'name': _lazy(u'Camera'),
        'description': _lazy(u'The app requires the platform to allow access '
                             u'to video from the device camera via a '
                             u'LocalMediaStream object.'),
        'apis': ('navigator.getUserMedia({video: true, picture: true})',),
    }),
    ('MIC', {
        'name': _lazy(u'Microphone'),
        'description': _lazy(u'The app requires the platform to allow access '
                             u'to audio from the device microphone.'),
        'apis': ('navigator.getUserMedia({audio: true})',),
    }),
    ('SCREEN_CAPTURE', {
        'name': _lazy(u'Screen Capture'),
        'description': _lazy(u'The app requires the platform to allow access '
                             u'to the device screen for capture.'),
        'apis': ('navigator.getUserMedia({video: {mandatory: '
                 '{chromeMediaSource: "screen"}}})',),
    }),
    ('WEBRTC_MEDIA', {
        'name': _lazy(u'WebRTC MediaStream'),
        'description': _lazy(u'The app requires the platform to allow web '
                             u'real-time communication browser-to-browser '
                             u'inbound media streams.'),
        'apis': ('MediaStream',),
    }),
    ('WEBRTC_DATA', {
        'name': _lazy(u'WebRTC DataChannel'),
        'description': _lazy(u'The app requires the platform to allow '
                             u'peer-to-peer exchange of data other than audio '
                             u'and video.'),
        'apis': ('DataChannel',),
    }),
    ('WEBRTC_PEER', {
        'name': _lazy(u'WebRTC PeerConnection'),
        'description': _lazy(u'The app requires the platform to allow '
                             u'communication of streaming data between '
                             u'peers.'),
        'apis': ('RTCPeerConnection',),
    }),
    ('SPEECH_SYN', {
        'name': _lazy(u'Web Speech Synthesis'),
        'description': _lazy(u'The app requires the platform to allow the use '
                             u'of text-to-speech.'),
        'apis': ('SpeechSynthesis',)
    }),
    ('SPEECH_REC', {
        'name': _lazy(u'Web Speech Recognition'),
        'description': _lazy(u'The app requires the platform to allow '
                             u'the use of speech-to-text.'),
        'apis': ('SpeechRecognition',)
    }),
    ('POINTER_LOCK', {
        'name': _lazy(u'Pointer Lock'),
        'description': _lazy(u'The app requires the platform to provide '
                             u'additional information and control about the '
                             u'pointer.'),
        'apis': ('document.documentElement.requestPointerLock',)
    }),
    ('NOTIFICATION', {
        'name': _lazy(u'Notifications'),
        'description': _lazy(u'The app requires the platform to allow the '
                             u'displaying phone and desktop notifications to '
                             u'the user.'),
        'apis': ('Notification', 'navigator.mozNotification')
    }),
    ('ALARM', {
        'name': _lazy(u'Alarms'),
        'description': _lazy(u'The app requires the platform to provide '
                             u'access to the device alarm settings to '
                             u'schedule notifications and events at specific '
                             u'time.'),
        'apis': ('navigator.mozAlarms',)
    }),
    ('SYSTEMXHR', {
        'name': _lazy(u'SystemXHR'),
        'description': _lazy(u'The app requires the platform to allow the '
                             u'sending of asynchronous HTTP requests without '
                             u'the restrictions of the same-origin policy.'),
        'apis': ('XMLHttpRequest({mozSystem: true})',)
    }),
    ('TCPSOCKET', {
        'name': _lazy(u'TCP Sockets'),
        'description': _lazy(u'The app requires the platform to allow opening '
                             u'raw TCP sockets.'),
        'apis': ('TCPSocket', 'navigator.mozTCPSocket')
    }),
    ('THIRDPARTY_KEYBOARD_SUPPORT', {
        'name': _lazy(u'Third-Party Keyboard Support'),
        'description': _lazy(u'The app requires the platform to support '
                             u'third-party keyboards.'),
        'apis': ('navigator.mozInputMethod',),
    }),
    ('NETWORK_INFO_MULTIPLE', {
        'name': _lazy(u'Multiple Network Information'),
        'description': _lazy(u'The app requires the ability to get '
                             u'information about multiple network '
                             u'connections.'),
        'apis': ('navigator.mozMobileConnections',),
    }),
    ('MOBILEID', {
        'name': _lazy(u'Mobile ID'),
        'description': _lazy(u'The app requires access to the '
                             u'`navigator.getMobileIdAssertion` API.'),
        'apis': ('navigator.getMobileIdAssertion',),
    }),
    ('PRECOMPILE_ASMJS', {
        'name': _lazy(u'Asm.js Precompilation'),
        'description': _lazy(u'The app requires the device to support '
                             u'precompilation of asm.js code.'),
        'apis': (),
    }),
    ('HARDWARE_512MB_RAM', {
        'name': _lazy(u'512MB RAM Device'),
        'description': _lazy(u'The app requires the device to have at least '
                             u'512MB RAM.'),
        'apis': (),
    }),
    ('HARDWARE_1GB_RAM', {
        'name': _lazy(u'1GB RAM Device'),
        'description': _lazy(u'The app requires the device to have at least '
                             u'1GB RAM.'),
        'apis': (),
    }),
    ('NFC', {
        'name': _lazy(u'NFC'),
        'description': _lazy(u'The app requires access to the Near Field '
                             u'Communication (NFC) API.'),
        'apis': ('navigator.mozNfc',),
    })
])

PRERELEASE_PERMISSIONS = [
    'moz-attention',
    'moz-firefox-accounts',
    'moz-audio-channel-telephony',
    'moz-audio-channel-ringer',
]

class FeatureProfile(OrderedDict):
    """
    Convenience class for performing conversion operations on feature profile
    representations.
    """

    def __init__(self, _default=False, **kwargs):
        """
        Creates a FeatureProfile object.

        Takes kwargs to the features to enable or disable. Features not
        specified but that are in APP_FEATURES will be False by default.

        E.g.:

            >>> FeatureProfile(sms=True).to_signature()
            '400.32.1'

        """
        super(FeatureProfile, self).__init__()
        for af in APP_FEATURES:
            key = af.lower()
            self[key] = kwargs.get(key, _default)

    @classmethod
    def from_int(cls, features, limit=None):
        """
        Construct a FeatureProfile object from a integer bitfield.

        >>> FeatureProfile.from_int(0x42)
        FeatureProfile([('apps', False), ('packaged_apps', True), ...)
        """
        instance = cls()  # Defaults to everything set to False.
        if limit is None:
            limit = len(APP_FEATURES)
        app_features_to_consider = OrderedDict(
            itertools.islice(APP_FEATURES.iteritems(), limit))
        for i, k in enumerate(reversed(app_features_to_consider)):
            instance[k.lower()] = bool(features & 1 << i)
        return instance

    @classmethod
    def from_signature(cls, signature):
        """
        Construct a FeatureProfile object from a decimal signature.

        >>> FeatureProfile.from_signature('40000000.32.1')
        FeatureProfile([('apps', False), ('packaged_apps', True), ...)
        """
        # If the signature is invalid, let the ValueError be raised, it's up to
        # the caller to decide what to do with it.
        number, limit, version = signature.split('.')
        return cls.from_int(int(number, 16), limit=int(limit))

    def to_int(self):
        """
        Convert a FeatureProfile object to an integer bitfield.

        >>> profile.to_int()
        66
        """
        features = 0
        for i, v in enumerate(reversed(self.values())):
            features |= bool(v) << i
        return features

    def to_signature(self):
        """
        Convert a FeatureProfile object to its decimal signature.

        >>> profile.to_signature()
        '40000000.32.1'
        """
        return '%x.%s.%s' % (self.to_int(), len(self),
                             settings.APP_FEATURES_VERSION)

    def to_list(self):
        """
        Returns a list representing the true values of this profile.
        """
        return [k for k, v in self.iteritems() if v]

    def to_kwargs(self, prefix=''):
        """
        Returns a dict representing the false values of this profile.

        Parameters:
        - `prefix` - a string prepended to the key name. Helpful if being used
                     to traverse relations

        This only includes keys for which the profile is False, which is useful
        for querying apps where we want to filter by apps which do not require
        a feature.

        >>> profile = FeatureProject.from_signature(request.get('pro'))
        >>> Webapp.objects.filter(**profile.to_kwargs())

        """
        return dict((prefix + k, False) for k, v in self.iteritems() if not v)


text:
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

//  Authors: Douglas Gregor
//           Andrew Lumsdaine
#ifndef BOOST_GRAPH_DISTRIBUTED_ST_CONNECTED_HPP
#define BOOST_GRAPH_DISTRIBUTED_ST_CONNECTED_HPP

#include <boost/graph/graph_traits.hpp>
#include <boost/graph/two_bit_color_map.hpp>
#include <boost/graph/iteration_macros.hpp>
#include <boost/pending/queue.hpp>

namespace boost { namespace graph {

template<typename Graph, typename ColorMap>
bool
st_connected(const Graph& g,
             typename graph_traits<Graph>::vertex_descriptor s,
             typename graph_traits<Graph>::vertex_descriptor t,
             ColorMap color)
{
  typedef typename property_traits<ColorMap>::value_type Color;
  typedef color_traits<Color> ColorTraits;
  typedef typename graph_traits<Graph>::vertex_descriptor Vertex;

  // Set all vertices to white (unvisited)
  BGL_FORALL_VERTICES_T(v, g, Graph)
    put(color, v, ColorTraits::white());

  // Vertices found from the source are grey
  put(color, s, ColorTraits::gray());

  // Vertices found from the target are greeen
  put(color, t, ColorTraits::green());
  queue<Vertex> Q;
  Q.push(s);
  Q.push(t);

  while (!Q.empty()) {
    Vertex u = Q.top(); Q.pop();
    Color u_color = get(color, u);

    BGL_FORALL_OUTEDGES_T(u, e, g, Graph) {
      Vertex v = target(e, g);
      Color v_color = get(color, v);
      if (v_color == ColorTraits::white()) {
        // We have not seen "v" before; mark it with the same color as u
        Color u_color = get(color, u);
        put(color, v, u_color);

        // Push it on the queue
        Q.push(v);
      } else if (v_color != ColorTraits::black() && u_color != v_color) {
        // Colors have collided. We're done!
        return true;
      }
    }
    // u is done, so mark it black
    put(color, u, ColorTraits::black());
  }

  return false;
}

template<typename Graph>
inline bool
st_connected(const Graph& g,
             typename graph_traits<Graph>::vertex_descriptor s,
             typename graph_traits<Graph>::vertex_descriptor t)
{
  return st_connected(g, s, t,
                      make_two_bit_color_map(num_vertices(g),
                                             get(vertex_index, g)));
}

} } // end namespace boost::graph

#endif // BOOST_GRAPH_DISTRIBUTED_ST_CONNECTED_HPP


text:
package com.blink.designer.model;

public class App extends BaseBlinkModel {

	/**
	 *
	 */
	private static final long serialVersionUID = -2966011436100520439L;

	private DBType db;

	private PersistenceAPIType persistenceAPI;

	private SecurityAPIType securityAPI;

	private SecurityStoreType securityStore;

	private FrontendType frontend;

	private ServiceAPIType serviceAPIType;

	private String basePackage;

	public String getBasePackage() {
		return basePackage;
	}

	public void setBasePackage(String basePackage) {
		this.basePackage = basePackage;
	}

	public DBType getDb() {
		return db;
	}

	public void setDb(DBType db) {
		this.db = db;
	}

	public PersistenceAPIType getPersistenceAPI() {
		return persistenceAPI;
	}

	public void setPersistenceAPI(PersistenceAPIType persistenceAPI) {
		this.persistenceAPI = persistenceAPI;
	}

	public SecurityAPIType getSecurityAPI() {
		return securityAPI;
	}

	public void setSecurityAPI(SecurityAPIType securityAPI) {
		this.securityAPI = securityAPI;
	}

	public SecurityStoreType getSecurityStore() {
		return securityStore;
	}

	public void setSecurityStore(SecurityStoreType securityStore) {
		this.securityStore = securityStore;
	}

	public FrontendType getFrontend() {
		return frontend;
	}

	public void setFrontend(FrontendType frontend) {
		this.frontend = frontend;
	}

	public ServiceAPIType getServiceAPIType() {
		return serviceAPIType;
	}

	public void setServiceAPIType(ServiceAPIType serviceAPIType) {
		this.serviceAPIType = serviceAPIType;
	}

	@Override
	public String toString() {
		return "App [db=" + db + ", persistenceAPI=" + persistenceAPI
				+ ", securityAPI=" + securityAPI + ", securityStore="
				+ securityStore + ", frontend=" + frontend
				+ ", serviceAPIType=" + serviceAPIType + "]";
	}

}


text:
.class Lcom/android/internal/telephony/uicc/UsimCSGHandler$2;
.super Landroid/telephony/PhoneStateListener;
.source "UsimCSGHandler.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/internal/telephony/uicc/UsimCSGHandler;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$0:Lcom/android/internal/telephony/uicc/UsimCSGHandler;

# direct methods
.method constructor <init>(Lcom/android/internal/telephony/uicc/UsimCSGHandler;)V
    .locals 0

    .prologue
    .line 741
    iput-object p1, p0, Lcom/android/internal/telephony/uicc/UsimCSGHandler$2;->this$0:Lcom/android/internal/telephony/uicc/UsimCSGHandler;

    invoke-direct {p0}, Landroid/telephony/PhoneStateListener;-><init>()V

    return-void
.end method

# virtual methods
.method public onDataConnectionStateChanged(I)V
    .locals 5
    .param p1, "state"    # I

    .prologue
    .line 745
    const-string v2, "UsimCSGHandler"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "onDataConnectionStateChanged(): state = "

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

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ",  StopPDP = "

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

    move-result-object v3

    iget-object v4, p0, Lcom/android/internal/telephony/uicc/UsimCSGHandler$2;->this$0:Lcom/android/internal/telephony/uicc/UsimCSGHandler;

    iget-boolean v4, v4, Lcom/android/internal/telephony/uicc/UsimCSGHandler;->mRequestStopPDP:Z

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v3

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

    move-result-object v3

    invoke-static {v2, v3}, Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 746
    iget-object v2, p0, Lcom/android/internal/telephony/uicc/UsimCSGHandler$2;->this$0:Lcom/android/internal/telephony/uicc/UsimCSGHandler;

    iget-boolean v2, v2, Lcom/android/internal/telephony/uicc/UsimCSGHandler;->mRequestStopPDP:Z

    if-eqz v2, :cond_2

    .line 748
    iget-object v2, p0, Lcom/android/internal/telephony/uicc/UsimCSGHandler$2;->this$0:Lcom/android/internal/telephony/uicc/UsimCSGHandler;

    # getter for: Lcom/android/internal/telephony/uicc/UsimCSGHandler;->mPhone:Lcom/android/internal/telephony/gsm/GSMPhone;
    invoke-static {v2}, Lcom/android/internal/telephony/uicc/UsimCSGHandler;->access$800(Lcom/android/internal/telephony/uicc/UsimCSGHandler;)Lcom/android/internal/telephony/gsm/GSMPhone;

    move-result-object v2

    invoke-virtual {v2}, Lcom/android/internal/telephony/gsm/GSMPhone;->getDataConnectionState()Lcom/android/internal/telephony/PhoneConstants$DataState;

    move-result-object v0

    .line 749
    .local v0, "ds":Lcom/android/internal/telephony/PhoneConstants$DataState;
    const-string v2, "UsimCSGHandler"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "onDataConnectionStateChanged(): data status = "

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

    move-result-object v3

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

    move-result-object v3

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

    move-result-object v3

    invoke-static {v2, v3}, Landroid/telephony/Rlog;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 750
    sget-object v2, Lcom/android/internal/telephony/PhoneConstants$DataState;->DISCONNECTED:Lcom/android/internal/telephony/PhoneConstants$DataState;

    if-eq v0, v2, :cond_0

    sget-object v2, Lcom/android/internal/telephony/PhoneConstants$DataState;->SUSPENDED:Lcom/android/internal/telephony/PhoneConstants$DataState;

    if-ne v0, v2, :cond_2

    .line 753
    :cond_0
    iget-object v2, p0, Lcom/android/internal/telephony/uicc/UsimCSGHandler$2;->this$0:Lcom/android/internal/telephony/uicc/UsimCSGHandler;

    # getter for: Lcom/android/internal/telephony/uicc/UsimCSGHandler;->mContext:Landroid/content/Context;
    invoke-static {v2}, Lcom/android/internal/telephony/uicc/UsimCSGHandler;->access$700(Lcom/android/internal/telephony/uicc/UsimCSGHandler;)Landroid/content/Context;

    move-result-object v2

    const-string v3, "phone"

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

    move-result-object v1

    check-cast v1, Landroid/telephony/TelephonyManager;

    .line 754
    .local v1, "telephonyService":Landroid/telephony/TelephonyManager;
    if-eqz v1, :cond_1

    .line 755
    iget-object v2, p0, Lcom/android/internal/telephony/uicc/UsimCSGHandler$2;->this$0:Lcom/android/internal/telephony/uicc/UsimCSGHandler;

    # getter for: Lcom/android/internal/telephony/uicc/UsimCSGHandler;->mPhoneStateListener:Landroid/telephony/PhoneStateListener;
    invoke-static {v2}, Lcom/android/internal/telephony/uicc/UsimCSGHandler;->access$900(Lcom/android/internal/telephony/uicc/UsimCSGHandler;)Landroid/telephony/PhoneStateListener;

    move-result-object v2

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/telephony/TelephonyManager;->listen(Landroid/telephony/PhoneStateListener;I)V

    .line 757
    :cond_1
    iget-object v2, p0, Lcom/android/internal/telephony/uicc/UsimCSGHandler$2;->this$0:Lcom/android/internal/telephony/uicc/UsimCSGHandler;

    const/4 v3, 0x6

    invoke-virtual {v2, v3}, Lcom/android/internal/telephony/uicc/UsimCSGHandler;->removeMessages(I)V

    .line 758
    iget-object v2, p0, Lcom/android/internal/telephony/uicc/UsimCSGHandler$2;->this$0:Lcom/android/internal/telephony/uicc/UsimCSGHandler;

    const/4 v3, 0x1

    # setter for: Lcom/android/internal/telephony/uicc/UsimCSGHandler;->bManualSearchDoing:Z
    invoke-static {v2, v3}, Lcom/android/internal/telephony/uicc/UsimCSGHandler;->access$102(Lcom/android/internal/telephony/uicc/UsimCSGHandler;Z)Z

    .line 759
    iget-object v2, p0, Lcom/android/internal/telephony/uicc/UsimCSGHandler$2;->this$0:Lcom/android/internal/telephony/uicc/UsimCSGHandler;

    # invokes: Lcom/android/internal/telephony/uicc/UsimCSGHandler;->requestCSGIDList()V
    invoke-static {v2}, Lcom/android/internal/telephony/uicc/UsimCSGHandler;->access$600(Lcom/android/internal/telephony/uicc/UsimCSGHandler;)V

    .line 762
    .end local v0    # "ds":Lcom/android/internal/telephony/PhoneConstants$DataState;
    .end local v1    # "telephonyService":Landroid/telephony/TelephonyManager;
    :cond_2
    return-void
.end method


text:
During the development of the xz package for Go a number of issues with
the xz file format were observed. They are documented here to help a
later development of an improved format.

# xz file format

## Consistency

## General

Packets should either be constant size or should have encoded the size
in the header. File header and footer are constant size and the block
header has the size encoded. The index doesn't fulfill the criteria even
when its size is included in the footer.

## Index

The index doesn't have the size in the header. So in a stream you are
forced to read the whole index to identify its length.

The index should have made optional. This would require to remove the
index size from the footer and include its own footer in the index.

## Padding

The padding should allow direct mapping of the CRC values into memory, but it
wastes bytes bearing no information. This is certainly not optimal for a
compression format. It is argued alignment makes it faster to read and
write the checksum values, but the time spent there is much less than on
encoding and decoding itself.

## Filters for each block

Filters should have been defined in front of blocks. This way they
would not need to be repeated.

# LZMA2

## Consistent header byte.

LZMA2 consists of a series of chunks with a header byte. The header byte
has a different format depending on whether it is an uncompressed or
compressed chunk. This has the consequence a complete reset of state,
properties and dictionary is not possible with an uncompressed chunk.
The encoder has to keep a state variable tracking a dictionary reset in
an uncompressed chunk to ensure that the flags are added in the first
compressed chunk to follow. This complicates the implementation of the
encoder and decoder.

## Dictionary capacity is not encoded

LZMA2 doesn't encode the dictionary capacity, so LZMA2 doesn't work
standalone.


text:
using System;
using System.Collections.Generic;
using System.Linq;

namespace SumAdjacentEqualNumbers
{
    public class SumAdjacentEqualNumbers
    {
        public static void Main()
        {
            List<string> input = Console.ReadLine().Split().ToList();
            List<double> nums = new List<double>();

            foreach (string inputNum in input)
            {
                nums.Add(double.Parse(inputNum));
            }

            for (int i = 0; i < nums.Count - 1; i++)
            {
                if(nums[i] == nums[i + 1])
                {
                    nums[i] = nums[i] + nums[i + 1];
                    nums.Remove(nums[i + 1]);
                    i = -1;
                }
            }

            Console.WriteLine(string.Join(" ", nums));
        }
    }
}


text:
<?hh
namespace Titon\Utility;

use Titon\Test\TestCase;

class StrTest extends TestCase {

    protected $string = 'Titon: A PHP Modular Framework';
    protected $lipsum = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eget tellus nibh.';

    public function testCharAt(): void {
        $this->assertEquals('T', Str::charAt('Titon', 0));
        $this->assertEquals('i', Str::charAt('Titon', 1));
        $this->assertEquals('t', Str::charAt('Titon', 2));
        $this->assertEquals('o', Str::charAt('Titon', 3));
        $this->assertEquals('n', Str::charAt('Titon', 4));
        $this->assertEquals(null, Str::charAt('Titon', 5));
        $this->assertEquals(null, Str::charAt('Titon', -1));
    }

    public function testCompare(): void {
        $this->assertEquals('0', Str::compare('foo', 'foo'));

        $this->assertLessThan('0', Str::compare('foo', 'Foobar'));
        $this->assertGreaterThan('0', Str::compare('foobar', 'Foo'));

        $this->assertEquals('0', Str::compare('foo', 'Foobar', 3));
        $this->assertGreaterThan('0', Str::compare('foobar', 'Foo', 5));
    }

    public function testContains(): void {
        $this->assertTrue(Str::contains($this->string, 'Titon'));
        $this->assertFalse(Str::contains($this->string, 'Zend'));

        // case-insensitive
        $this->assertTrue(Str::contains($this->string, 'TITON', false));

        // offset
        $this->assertFalse(Str::contains($this->string, 'Titon', true, 5));
    }

    public function testEndsWith(): void {
        $this->assertTrue(Str::endsWith($this->string, 'work'));
        $this->assertFalse(Str::endsWith($this->string, 'works'));

        // case-insensitive
        $this->assertTrue(Str::endsWith($this->string, 'WORK', false));
        $this->assertFalse(Str::endsWith($this->string, 'WORKS', false));
    }

    public function testExtract(): void {
        $this->assertEquals('Titon: A PHP Modular Framework', Str::extract($this->string, 0));
        $this->assertEquals('Titon', Str::extract($this->string, 0, 5));
        $this->assertEquals('Framework', Str::extract($this->string, -9));
        $this->assertEquals('Frame', Str::extract($this->string, -9, 5));
        $this->assertEquals('Modular', Str::extract($this->string, 13, 7));
    }

    public function testGenerate(): void {
        $this->assertNotEquals('ABCDEFGHIJ', Str::generate(10));
        $this->assertTrue(strlen(Str::generate(10)) == 10);

        $this->assertNotEquals('ABCDEFGHIJ12345', Str::generate(15));
        $this->assertTrue(strlen(Str::generate(15)) == 15);

        $this->assertEquals('aaaaa', Str::generate(5, 'aaaaa'));
        $this->assertTrue(strlen(Str::generate(5)) == 5);
    }

    public function testHash(): void {
        $md51 = Str::hash($this->string, 'md5');
        $md52 = Str::hash($this->string, 'md5', 'md5.salt');

        $this->assertTrue(strlen($md51) === 32);
        $this->assertTrue(strlen($md52) === 32);
        $this->assertNotEquals($md51, $md52);

        $sha1 = Str::hash($this->string, 'sha1');
        $sha2 = Str::hash($this->string, 'sha1', 'sha1.salt');

        $this->assertTrue(strlen($sha1) === 40);
        $this->assertTrue(strlen($sha2) === 40);
        $this->assertNotEquals($sha1, $sha2);

        $sha1 = Str::hash($this->string, 'sha256');
        $sha2 = Str::hash($this->string, 'sha256', 'sha256.salt');

        $this->assertTrue(strlen($sha1) === 64);
        $this->assertTrue(strlen($sha2) === 64);
        $this->assertNotEquals($sha1, $sha2);
    }

    public function testIndexOf(): void {
        $this->assertEquals(0, Str::indexOf($this->string, 'T'));
        $this->assertEquals(2, Str::indexOf($this->string, 't'));
        $this->assertEquals(7, Str::indexOf($this->string, 'A'));
        $this->assertEquals(13, Str::indexOf($this->string, 'M'));
        $this->assertEquals(21, Str::indexOf($this->string, 'F'));

        // Not found
        $this->assertEquals(-1, Str::indexOf($this->string, 'x'));

        // Case-insensitive
        $this->assertEquals(0, Str::indexOf($this->string, 'T', false));
        $this->assertEquals(0, Str::indexOf($this->string, 't', false));

        // Offset
        $this->assertEquals(3, Str::indexOf($this->string, 'o'));
        $this->assertEquals(14, Str::indexOf($this->string, 'o', true, 5));
    }

    public function testInsert(): void {
        $this->assertEquals('Titon is the best PHP framework around!', Str::insert('{framework} is the best {lang} framework around!', Map {
            'framework' => 'Titon',
            'lang' => 'PHP'
        }));

        $this->assertEquals('Titon is the best PHP framework around!', Str::insert(':framework is the best :lang framework around!', Map {
            'framework' => 'Titon',
            'lang' => 'PHP'
        }, Map {
            'before' => ':',
            'after' => ''
        }));
    }

    public function testLastIndexOf(): void {
        $this->assertEquals(0, Str::lastIndexOf($this->string, 'T'));
        $this->assertEquals(2, Str::lastIndexOf($this->string, 't'));
        $this->assertEquals(7, Str::lastIndexOf($this->string, 'A'));
        $this->assertEquals(13, Str::lastIndexOf($this->string, 'M'));
        $this->assertEquals(21, Str::lastIndexOf($this->string, 'F'));

        // Not found
        $this->assertEquals(-1, Str::indexOf($this->string, 'x'));

        // Case-insensitive
        $this->assertEquals(2, Str::lastIndexOf($this->string, 'T', false));
        $this->assertEquals(24, Str::lastIndexOf($this->string, 'M', false));
        $this->assertEquals(24, Str::lastIndexOf($this->string, 'm', false));

        // Offset
        $this->assertEquals(27, Str::lastIndexOf($this->string, 'o'));
        $this->assertEquals(27, Str::lastIndexOf($this->string, 'o', true, 5));
    }

    public function testListing(): void {
        $this->assertEquals('red, blue & green', Str::listing(Vector {'red', 'blue', 'green'}));
        $this->assertEquals('red & green', Str::listing(Vector {'red', 'green'}));
        $this->assertEquals('blue', Str::listing(Vector {'blue'}));
        $this->assertEquals('green', Str::listing(Vector {'green'}));

        // custom
        $this->assertEquals('red, blue, and green', Str::listing(Vector {'red', 'blue', 'green'}, ', and '));
        $this->assertEquals('red - blue and green', Str::listing(Vector {'red', 'blue', 'green'}, ' and ', ' - '));
    }

    public function testObfuscate(): void {
        $this->assertEquals('Titon Framework', Str::obfuscate('Titon Framework'));
    }

    public function testShorten(): void {
        $this->assertEquals('Lorem … nibh.', Str::shorten($this->lipsum, 10));
        $this->assertEquals('Lorem ipsum … tellus nibh.', Str::shorten($this->lipsum, 25));
        $this->assertEquals('Lorem ipsum dolor sit … Morbi eget tellus nibh.', Str::shorten($this->lipsum, 50));
        $this->assertEquals($this->lipsum, Str::shorten($this->lipsum, 100));

        // custom
        $this->assertEquals('Lorem ... nibh.', Str::shorten($this->lipsum, 10, ' ... '));
    }

    public function testStartsWith(): void {
        $this->assertTrue(Str::startsWith($this->string, 'Titon'));
        $this->assertFalse(Str::startsWith($this->string, 'Titan'));

        // case-insensitive
        $this->assertTrue(Str::startsWith($this->string, 'TITON', false));
        $this->assertFalse(Str::startsWith($this->string, 'TITAN', false));
    }

    public function testTruncate(): void {
        $string = 'This has anchor tags & entities in it. It has "quotes" as well.';

        // Preserve HTML and word
        $this->assertEquals('This has anchor…', Str::truncate($string, 15));
        $this->assertEquals('This has anchor tags &…', Str::truncate($string, 25));
        $this->assertEquals('This has anchor tags & entities in…', Str::truncate($string, 35));
        $this->assertEquals('This has anchor tags & entities in it. It…', Str::truncate($string, 45));
        $this->assertEquals('This has anchor tags & entities in it. It has "quotes" as well.', Str::truncate($string, 0));

        // Preserve HTML
        $this->assertEquals('This has anch…', Str::truncate($string, 13, Map {'word' => false}));
        $this->assertEquals('This has anchor tags & en…', Str::truncate($string, 25, Map {'word' => false}));
        $this->assertEquals('This has anchor tags & entities in…', Str::truncate($string, 35, Map {'word' => false}));
        $this->assertEquals('This has anchor tags & entities in it. It has…', Str::truncate($string, 45, Map {'word' => false}));
        $this->assertEquals('This has anchor tags & entities in it. It has "quo…', Str::truncate($string, 50, Map {'word' => false}));

        // Preserve none
        $this->assertEquals('This has anchor tags & en…', Str::truncate($string, 25, Map {'word' => false, 'html' => false}));
        $this->assertEquals('This has anchor tags & entities in…', Str::truncate($string, 35, Map {'word' => false, 'html' => false}));
        $this->assertEquals('This has anchor tags & entities in it. It has…', Str::truncate($string, 45, Map {'word' => false, 'html' => false}));
        $this->assertEquals('This has anchor tags & entities in it. It has "quotes" as well.', Str::truncate($string, 0, Map {'word' => false, 'html' => false}));

        // Preserve none with custom suffix
        $this->assertEquals('This has anchor tags & en...', Str::truncate($string, 25, Map {'word' => false, 'html' => false, 'suffix' => '...'}));
        $this->assertEquals('This has anchor tags & entities in...', Str::truncate($string, 35, Map {'word' => false, 'html' => false, 'suffix' => '...'}));
        $this->assertEquals('This has anchor tags & entities in it. It has...', Str::truncate($string, 45, Map {'word' => false, 'html' => false, 'suffix' => '...'}));
        $this->assertEquals('This has anchor tags & entities in it. It has "quotes" as well.', Str::truncate($string, 0, Map {'word' => false, 'html' => false, 'suffix' => '...'}));

        // Custom tags (BB code)
        $string = 'This has [url="/"]anchor tags[/url] & entities in it. It has "quotes" as well.';

        $this->assertEquals('This has [url="/"]anchor[/url]…', Str::truncate($string, 15, Map {'open' => '[', 'close' => ']'}));
        $this->assertEquals('This has [url="/"]anchor tags[/url] &…', Str::truncate($string, 25, Map {'open' => '[', 'close' => ']'}));
        $this->assertEquals('This has [url="/"]anchor tags[/url] & entities in…', Str::truncate($string, 35, Map {'open' => '[', 'close' => ']'}));
        $this->assertEquals('This has [url="/"]anchor tags[/url] & entities in it. It…', Str::truncate($string, 45, Map {'open' => '[', 'close' => ']'}));
        $this->assertEquals('This has [url="/"]anchor tags[/url] & entities in it. It has "quotes" as well.', Str::truncate($string, 0, Map {'open' => '[', 'close' => ']'}));
    }

    public function testUuid(): void {
        $this->assertRegExp('/^[a-f0-9]{8}\-[a-f0-9]{4}\-4[a-f0-9]{3}\-[89AB]{1}[a-f0-9]{3}\-[a-f0-9]{12}$/i', Str::uuid());
        $this->assertRegExp('/^[a-f0-9]{8}\-[a-f0-9]{4}\-4[a-f0-9]{3}\-[89AB]{1}[a-f0-9]{3}\-[a-f0-9]{12}$/i', Str::uuid());
        $this->assertRegExp('/^[a-f0-9]{8}\-[a-f0-9]{4}\-4[a-f0-9]{3}\-[89AB]{1}[a-f0-9]{3}\-[a-f0-9]{12}$/i', Str::uuid());
    }

}


text:
using UnityEngine;
using System.Collections;

public class prefButton : manipObject {

    public pauseMenu menu;
    public Renderer gearRenderer;
    menuManager manager;

    Material mat;
    Color normalColor = new Color(.5f, .5f, 1);
    Color normalOnColor = new Color(.5f, .5f, 1);
    Color selectColor = new Color(.85f, .85f, 1);
    Color grabColor = new Color(.85f, .85f, 1);

    bool tipsOn = false;

    public override void Awake()
    {
        base.Awake();
        normalColor = Color.HSVToRGB(.6f, 1f, .06f);
        normalOnColor = Color.HSVToRGB(.6f, .95f, .2f);
        selectColor = Color.HSVToRGB(.6f, .95f, .5f);
        grabColor = Color.HSVToRGB(.6f, .9f, 1f);

        mat = gearRenderer.material;
        mat.SetColor("_TintColor", normalColor);
        manager = transform.parent.parent.GetComponent<menuManager>();
    }

    public override void setState(manipState state)
    {
        if (curState == state) return;

        curState = state;

        if (curState == manipState.none)
        {
            mat.SetColor("_TintColor", normalColor);
        }
        else if (curState == manipState.selected)
        {
            mat.SetColor("_TintColor", selectColor);
            manager.SelectAudio();
        }
        else if (curState == manipState.grabbed)
        {
            mat.SetColor("_TintColor", grabColor);
            menu.toggleMenu();
            manager.GrabAudio();
        }
    }
}


text:
require 'spec_helper'

describe Puppet::Type.type(:dsc_xexchinstall) do

  let :dsc_xexchinstall do
    Puppet::Type.type(:dsc_xexchinstall).new(
      :name     => 'foo',
      :dsc_path => 'foo',
    )
  end

  it "should stringify normally" do
    expect(dsc_xexchinstall.to_s).to eq("Dsc_xexchinstall[foo]")
  end

  it 'should require that dsc_path is specified' do
    #dsc_xexchinstall[:dsc_path]
    expect { Puppet::Type.type(:dsc_xexchinstall).new(
      :name     => 'foo',
      :dsc_arguments => 'foo',
      :dsc_credential => 'foo',
    )}.to raise_error(Puppet::Error, /dsc_path is a required attribute/)
  end

  it 'should not accept array for dsc_path' do
    expect{dsc_xexchinstall[:dsc_path] = ["foo", "bar", "spec"]}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept boolean for dsc_path' do
    expect{dsc_xexchinstall[:dsc_path] = true}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept int for dsc_path' do
    expect{dsc_xexchinstall[:dsc_path] = -16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept uint for dsc_path' do
    expect{dsc_xexchinstall[:dsc_path] = 16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept array for dsc_arguments' do
    expect{dsc_xexchinstall[:dsc_arguments] = ["foo", "bar", "spec"]}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept boolean for dsc_arguments' do
    expect{dsc_xexchinstall[:dsc_arguments] = true}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept int for dsc_arguments' do
    expect{dsc_xexchinstall[:dsc_arguments] = -16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept uint for dsc_arguments' do
    expect{dsc_xexchinstall[:dsc_arguments] = 16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept array for dsc_credential' do
    expect{dsc_xexchinstall[:dsc_credential] = ["foo", "bar", "spec"]}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept boolean for dsc_credential' do
    expect{dsc_xexchinstall[:dsc_credential] = true}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept int for dsc_credential' do
    expect{dsc_xexchinstall[:dsc_credential] = -16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept uint for dsc_credential' do
    expect{dsc_xexchinstall[:dsc_credential] = 16}.to raise_error(Puppet::ResourceError)
  end

  # Configuration PROVIDER TESTS

  describe "powershell provider tests" do

    it "should successfully instanciate the provider" do
      described_class.provider(:powershell).new(dsc_xexchinstall)
    end

    before(:each) do
      @provider = described_class.provider(:powershell).new(dsc_xexchinstall)
    end

    describe "when dscmeta_import_resource is true (default) and dscmeta_module_name existing/is defined " do

      it "should compute powershell dsc test script with Invoke-DscResource" do
        expect(@provider.ps_script_content('test')).to match(/Invoke-DscResource/)
      end

      it "should compute powershell dsc test script with method Test" do
        expect(@provider.ps_script_content('test')).to match(/Method\s+=\s*'test'/)
      end

      it "should compute powershell dsc set script with Invoke-DscResource" do
        expect(@provider.ps_script_content('set')).to match(/Invoke-DscResource/)
      end

      it "should compute powershell dsc test script with method Set" do
        expect(@provider.ps_script_content('set')).to match(/Method\s+=\s*'set'/)
      end

    end

  end
end


text:
PhysShapeBullet::PhysShapeBullet(Physics* phys, const PhysInfo &physDescr) : PhysShape(physDescr)
{
	PhysicsBullet* physics = static_cast<PhysicsBullet*>(phys);
	m_world = physics->getWorld();

	btScalar friction = 0.2f;
	btScalar restitution = 0.0f;
	btScalar ldamping = 0.0f;
	btScalar adamping = 0.0f;

	m_collShape = NULL;

	if (m_physInfo.shapeType == PhysInfo::ST_BOX)
	{
		btVector3 halfSize = 0.5f * vectorToBt(m_physInfo.params);
		m_collShape = new btBoxShape(halfSize);
	}
	else
	{
		restitution = SPHERE_RESTITUTION;
		ldamping = SPHERE_LDAMPING;
		adamping = SPHERE_ADAMPING;

		if (m_physInfo.shapeType == PhysInfo::ST_SPHERE)
		{
			m_collShape = new btSphereShape(0.5f * m_physInfo.params.x);
		}
		else if (m_physInfo.shapeType == PhysInfo::ST_CAPSULE)
		{
			btVector3 sizes = vectorToBt(m_physInfo.params);
			m_collShape = new btCapsuleShapeZ(0.5f*sizes.x(), sizes.y() - sizes.x());// radius, height
		}
		else if (m_physInfo.shapeType == PhysInfo::ST_CYLINDER)
		{
			btVector3 halfSize = 0.5f * vectorToBt(m_physInfo.params);
			m_collShape = new btCylinderShapeZ(halfSize);
		}
		else
		{
			Con::errorf("PhysShapeBullet::PhysShapeBullet(): Wrong phys type %d",int(m_physInfo.shapeType));
		}
	}

	AssertFatal(m_collShape,"Can't create physic collision shape ");

	btScalar mass = m_physInfo.mass;
	btVector3 localInertia(0, 0, 0);

	m_physInfo.bodyType = PhysInfo::BT_STATIC;
	if (mass > 0.f + FLT_EPSILON)
	{
		m_collShape->calculateLocalInertia(mass, localInertia);
		m_physInfo.bodyType = PhysInfo::BT_DYNAMIC;
	}

	btRigidBody::btRigidBodyConstructionInfo rbInfo(mass, NULL, m_collShape, localInertia);
	rbInfo.m_friction = friction;
	rbInfo.m_restitution = restitution;
	rbInfo.m_linearDamping = ldamping;
	rbInfo.m_angularDamping = adamping;
	m_body = new btRigidBody(rbInfo);

	if(m_physInfo.bodyType == PhysInfo::BT_DYNAMIC)
	{
		m_body->setCollisionFlags(m_body->getCollisionFlags() |
			btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK);
	}

	m_body->setUserPointer(&mUserData);

	m_world->addRigidBody(m_body);

	//enable CCD and set margin for small object(i.e. grenades)
	if (m_physInfo.shapeType == PhysInfo::ST_BOX)
	{
		btVector3 sizes = vectorToBt(m_physInfo.params);
		if (sizes.m_floats[sizes.maxAxis()]<0.9f)
		{
			static const float marginGrenade = 0.1f;
			static btScalar frictionGr = 0.5f;
			//static btScalar ldampingGr = 0.5f;
			//static btScalar adampingGr = 0.7f;

			btScalar treshhold = 0.5f*sizes.m_floats[sizes.minAxis()];
			m_body->setCcdMotionThreshold(treshhold);
			m_collShape->setMargin(marginGrenade);
			m_body->setCcdSweptSphereRadius(treshhold);

			m_body->setFriction(frictionGr);
			//m_body->setDamping(ldampingGr,adampingGr);

		}
	}
}

PhysShapeBullet::PhysShapeBullet(Physics* phys,void* vBuffer,int vNum,int vStride,
									void* iBuffer, int iNum, int triStride)
{
	PhysicsBullet* physics = static_cast<PhysicsBullet*>(phys);
	m_world = physics->getWorld();
	m_physInfo.mass = 0.f;
	m_physInfo.shapeType = PhysInfo::ST_MESH;

	//transform into bullet coords
	VectorF* it = (VectorF*)vBuffer;
	for (int i=0;i<vNum;i++)
	{
		F64 temp = it->y;
		it->y = it->z;
		it->z = temp;
		it++;
	}

	btTriangleIndexVertexArray*	indexVertexArrays = new btTriangleIndexVertexArray(iNum/3,(int *)iBuffer,triStride,
		vNum,(btScalar*)vBuffer,vStride);

	m_collShape  = new btBvhTriangleMeshShape(indexVertexArrays,true);

	btScalar mass(0.f);
	btVector3 localInertia(0,0,0);
	m_physInfo.bodyType = PhysInfo::BT_STATIC;

	btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,NULL,m_collShape,localInertia);
	rbInfo.m_friction = PhysicsBullet::getStaticFriction();
	rbInfo.m_restitution = 1.f;
	m_body = new btRigidBody(rbInfo);

	m_body->setUserPointer(this);
	m_world->addRigidBody(m_body);

	mTransformInv = m_physInfo.transform;
	mTransformInv.inverse();
}

PhysShapeBullet::~PhysShapeBullet()
{
	m_world->removeRigidBody(m_body);
	delete m_body;
	if (m_physInfo.shapeType==PhysInfo::ST_MESH)
	{
		btBvhTriangleMeshShape* meshShape = static_cast<btBvhTriangleMeshShape*>(m_collShape);
		btStridingMeshInterface* meshInterface = meshShape->getMeshInterface();
		if (meshInterface)
			delete meshInterface;
	}
	delete m_collShape;
}

void PhysShapeBullet::setPhysicTransform(const MatrixF& tr)
{
	btTransform& physTr = m_body->getWorldTransform();
	physTr = matrix4toBt(tr);
}

void PhysShapeBullet::getPhysicTransform(MatrixF & tr)
{
	btTransform& physTr = m_body->getWorldTransform();
	tr = matrix4fromBt(physTr);
}

VectorF PhysShapeBullet::getLinVelocity()
{
	btVector3 vel = m_body->getLinearVelocity();
	VectorF v = vectorFromBt(vel);

	return v;
}

void PhysShapeBullet::setLinVelocity(const VectorF& vel)
{
	btVector3 v = vectorToBt(vel);
	m_body->setLinearVelocity(v);
}

VectorF PhysShapeBullet::getAngVelocity()
{
	btVector3 vel = m_body->getAngularVelocity();
	VectorF v = vectorFromBt(vel);

	return v;
}

void PhysShapeBullet::setAngVelocity(const VectorF& vel)
{
	btVector3 v = vectorToBt(vel);
	m_body->setAngularVelocity(v);
}

void PhysShapeBullet::addForce(const VectorF& force)
{
	m_body->activate(true);
	btVector3 f = vectorToBt(force);
	//m_body->applyCentralImpulse(f);
	m_body->applyCentralForce(f);
}

void PhysShapeBullet::addForce(const VectorF& forceAdd, const Point3F& pos)
{
	m_body->activate(true);
	static F32 scaler = 1.f;
	VectorF force = scaler * forceAdd;

	btVector3 f = vectorToBt(force);
	btVector3 p = vectorToBt(pos);
	btVector3 relPos = p - m_body->getWorldTransform().getOrigin();
	m_body->applyForce(f, relPos);
}

void PhysShapeBullet::applyDampingOnCollistion(float dampFactorLinear, float dampFactorAngular)
{
	m_body->setLinearVelocity(dampFactorLinear*m_body->getLinearVelocity());
	m_body->setAngularVelocity(dampFactorAngular*m_body->getAngularVelocity());
}

void PhysShapeBullet::reset()
{
	m_body->clearForces();
	setLinVelocity(VectorF::Zero);
	setAngVelocity(VectorF::Zero);
}

void PhysShapeBullet::setForce(const VectorF& force)
{
	m_body->activate(true);
	m_body->clearForces();
	btVector3 f = vectorToBt(force);
	m_body->applyCentralForce(f);
}

VectorF  PhysShapeBullet::getForce()
{
	btVector3 f = m_body->getTotalForce();
	VectorF force = vectorFromBt(f);
	return force;
}
void  PhysShapeBullet::setTorque(const VectorF& torque)
{
	m_body->activate(true);
	btVector3 t = vectorToBt(torque);
	m_body->applyTorque(t);
}
VectorF  PhysShapeBullet::getTorque()
{
	btVector3 t = m_body->getTotalTorque();
	VectorF torque = vectorFromBt(t);
	return torque;
}

void PhysShapeBullet::setEnable(bool isEnabled)
{
	if(isEnabled)
	{
		m_body->forceActivationState(ACTIVE_TAG);
		m_body->setCollisionFlags(m_body->getCollisionFlags() & ~btCollisionObject::CF_NO_CONTACT_RESPONSE);

	}
	else
	{
		m_body->setActivationState(DISABLE_SIMULATION);
		m_body->setCollisionFlags(m_body->getCollisionFlags() | btCollisionObject::CF_NO_CONTACT_RESPONSE);
	}
}

bool PhysShapeBullet::isEnabled()
{
	return m_body->getActivationState()!=DISABLE_SIMULATION;
}

bool PhysShapeBullet::isActive()
{
	return m_body->getActivationState()!=ISLAND_SLEEPING;
}
void PhysShapeBullet::setActive(bool flg)
{
	if (flg)
		m_body->forceActivationState(ACTIVE_TAG);
	else
		m_body->forceActivationState(ISLAND_SLEEPING);
}

bool PhysShapeBullet::castRay(const Point3F &start, const Point3F &end, RayInfo* info)
{
	btVector3 from  = vectorToBt(start);
	btVector3 to  = vectorToBt(end);
	btTransform fromTr;
	fromTr.setIdentity();
	fromTr.setOrigin(from);
	btTransform toTr;
	toTr.setIdentity();
	toTr.setOrigin(to);

	btCollisionWorld::ClosestRayResultCallback result(from,to);

	btCollisionWorld::rayTestSingle(fromTr,toTr,(btCollisionObject*)m_body,
		m_body->getCollisionShape(),m_body->getWorldTransform(),(btCollisionWorld::RayResultCallback&)result);
	if (result.hasHit())
	{
		if (info)
		{
			info->t        = result.m_closestHitFraction; // finally divide...
			info->setContactPoint( start, end );

			info->material = NULL;
			info->object = (SceneObject*)m_physInfo.owner;
			//force will be applying in direction opposite to normal

			info->normal   = start-end;//vectorFromBt(result.m_hitNormalWorld);
			info->normal.normalize();

		}

		return true;
	}
	return false;
}

class DrawTriangleCallback: btTriangleCallback
{
	DebugDrawer* m_drawer;
public:
	DrawTriangleCallback(){
		m_drawer = DebugDrawer::get();
	};
	virtual ~DrawTriangleCallback(){};
	virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex)
	{
		VectorF a = vectorFromBt(triangle[0]);
		VectorF b = vectorFromBt(triangle[1]);
		VectorF c = vectorFromBt(triangle[2]);
		m_drawer->drawTri(a,b,c);
		m_drawer->setLastTTL(DebugDrawer::DD_INFINITE);
	};
};