text:
<?php

/**
 *  @see MarketplaceWebServiceProducts_Model
 */

require_once (dirname(__FILE__) . '/../Model.php');

/**
 * MarketplaceWebServiceProducts_Model_GetServiceStatusResponse
 *
 * Properties:
 *

 *
 *
GetServiceStatusResult: MarketplaceWebServiceProducts_Model_GetServiceStatusResult

 *
ResponseMetadata: MarketplaceWebServiceProducts_Model_ResponseMetadata

 *
ResponseHeaderMetadata: MarketplaceWebServiceProducts_Model_ResponseHeaderMetadata

 *
 *

 */

 class MarketplaceWebServiceProducts_Model_GetServiceStatusResponse extends MarketplaceWebServiceProducts_Model {

    public function __construct($data = null)
    {
    $this->_fields = array (
    'GetServiceStatusResult' => array('FieldValue' => null, 'FieldType' => 'MarketplaceWebServiceProducts_Model_GetServiceStatusResult'),
    'ResponseMetadata' => array('FieldValue' => null, 'FieldType' => 'MarketplaceWebServiceProducts_Model_ResponseMetadata'),
    'ResponseHeaderMetadata' => array('FieldValue' => null, 'FieldType' => 'MarketplaceWebServiceProducts_Model_ResponseHeaderMetadata'),
    );
    parent::__construct($data);
    }

    /**
     * Get the value of the GetServiceStatusResult property.
     *
     * @return GetServiceStatusResult GetServiceStatusResult.
     */
    public function getGetServiceStatusResult()
    {
        return $this->_fields['GetServiceStatusResult']['FieldValue'];
    }

    /**
     * Set the value of the GetServiceStatusResult property.
     *
     * @param MarketplaceWebServiceProducts_Model_GetServiceStatusResult getServiceStatusResult
     * @return this instance
     */
    public function setGetServiceStatusResult($value)
    {
        $this->_fields['GetServiceStatusResult']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Check to see if GetServiceStatusResult is set.
     *
     * @return true if GetServiceStatusResult is set.
     */
    public function isSetGetServiceStatusResult()
    {
                return !is_null($this->_fields['GetServiceStatusResult']['FieldValue']);
            }

    /**
     * Set the value of GetServiceStatusResult, return this.
     *
     * @param getServiceStatusResult
     *             The new value to set.
     *
     * @return This instance.
     */
    public function withGetServiceStatusResult($value)
    {
        $this->setGetServiceStatusResult($value);
        return $this;
    }

    /**
     * Get the value of the ResponseMetadata property.
     *
     * @return ResponseMetadata ResponseMetadata.
     */
    public function getResponseMetadata()
    {
        return $this->_fields['ResponseMetadata']['FieldValue'];
    }

    /**
     * Set the value of the ResponseMetadata property.
     *
     * @param MarketplaceWebServiceProducts_Model_ResponseMetadata responseMetadata
     * @return this instance
     */
    public function setResponseMetadata($value)
    {
        $this->_fields['ResponseMetadata']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Check to see if ResponseMetadata is set.
     *
     * @return true if ResponseMetadata is set.
     */
    public function isSetResponseMetadata()
    {
                return !is_null($this->_fields['ResponseMetadata']['FieldValue']);
            }

    /**
     * Set the value of ResponseMetadata, return this.
     *
     * @param responseMetadata
     *             The new value to set.
     *
     * @return This instance.
     */
    public function withResponseMetadata($value)
    {
        $this->setResponseMetadata($value);
        return $this;
    }

    /**
     * Get the value of the ResponseHeaderMetadata property.
     *
     * @return ResponseHeaderMetadata ResponseHeaderMetadata.
     */
    public function getResponseHeaderMetadata()
    {
        return $this->_fields['ResponseHeaderMetadata']['FieldValue'];
    }

    /**
     * Set the value of the ResponseHeaderMetadata property.
     *
     * @param MarketplaceWebServiceProducts_Model_ResponseHeaderMetadata responseHeaderMetadata
     * @return this instance
     */
    public function setResponseHeaderMetadata($value)
    {
        $this->_fields['ResponseHeaderMetadata']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Check to see if ResponseHeaderMetadata is set.
     *
     * @return true if ResponseHeaderMetadata is set.
     */
    public function isSetResponseHeaderMetadata()
    {
                return !is_null($this->_fields['ResponseHeaderMetadata']['FieldValue']);
            }

    /**
     * Set the value of ResponseHeaderMetadata, return this.
     *
     * @param responseHeaderMetadata
     *             The new value to set.
     *
     * @return This instance.
     */
    public function withResponseHeaderMetadata($value)
    {
        $this->setResponseHeaderMetadata($value);
        return $this;
    }
    /**
     * Construct MarketplaceWebServiceProducts_Model_GetServiceStatusResponse from XML string
     *
     * @param $xml
     *        XML string to construct from
     *
     * @return MarketplaceWebServiceProducts_Model_GetServiceStatusResponse
     */
    public static function fromXML($xml)
    {
        $dom = new DOMDocument();
        $dom->loadXML($xml);
        $xpath = new DOMXPath($dom);
        $response = $xpath->query("//*[local-name()='GetServiceStatusResponse']");
        if ($response->length == 1) {
            return new MarketplaceWebServiceProducts_Model_GetServiceStatusResponse(($response->item(0)));
        } else {
            throw new Exception ("Unable to construct MarketplaceWebServiceProducts_Model_GetServiceStatusResponse from provided XML.
                                  Make sure that GetServiceStatusResponse is a root element");
        }
    }
    /**
     * XML Representation for this object
     *
     * @return string XML for this object
     */
    public function toXML()
    {
        $xml = "";
        $xml .= "<GetServiceStatusResponse xmlns=\"http://mws.amazonservices.com/schema/Products/2011-10-01\">";
        $xml .= $this->_toXMLFragment();
        $xml .= "</GetServiceStatusResponse>";
        return $xml;
    }

}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v11/common/asset_types.proto

package com.google.ads.googleads.v11.common;

public interface PriceOfferingOrBuilder extends
    // @@protoc_insertion_point(interface_extends:google.ads.googleads.v11.common.PriceOffering)
    com.google.protobuf.MessageOrBuilder {

  /**
   *

   * Required. The header of the price offering.
   * The length of this string should be between 1 and 25, inclusive.
   *

   *
   * string header = 1 [(.google.api.field_behavior) = REQUIRED];
   * @return The header.
   */
  java.lang.String getHeader();
  /**
   *

   * Required. The header of the price offering.
   * The length of this string should be between 1 and 25, inclusive.
   *

   *
   * string header = 1 [(.google.api.field_behavior) = REQUIRED];
   * @return The bytes for header.
   */
  com.google.protobuf.ByteString
      getHeaderBytes();

  /**
   *

   * Required. The description of the price offering.
   * The length of this string should be between 1 and 25, inclusive.
   *

   *
   * string description = 2 [(.google.api.field_behavior) = REQUIRED];
   * @return The description.
   */
  java.lang.String getDescription();
  /**
   *

   * Required. The description of the price offering.
   * The length of this string should be between 1 and 25, inclusive.
   *

   *
   * string description = 2 [(.google.api.field_behavior) = REQUIRED];
   * @return The bytes for description.
   */
  com.google.protobuf.ByteString
      getDescriptionBytes();

  /**
   *

   * Required. The price value of the price offering.
   *

   *
   * .google.ads.googleads.v11.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
   * @return Whether the price field is set.
   */
  boolean hasPrice();
  /**
   *

   * Required. The price value of the price offering.
   *

   *
   * .google.ads.googleads.v11.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
   * @return The price.
   */
  com.google.ads.googleads.v11.common.Money getPrice();
  /**
   *

   * Required. The price value of the price offering.
   *

   *
   * .google.ads.googleads.v11.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];
   */
  com.google.ads.googleads.v11.common.MoneyOrBuilder getPriceOrBuilder();

  /**
   *

   * The price unit of the price offering.
   *

   *
   * .google.ads.googleads.v11.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
   * @return The enum numeric value on the wire for unit.
   */
  int getUnitValue();
  /**
   *

   * The price unit of the price offering.
   *

   *
   * .google.ads.googleads.v11.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
   * @return The unit.
   */
  com.google.ads.googleads.v11.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit getUnit();

  /**
   *

   * Required. The final URL after all cross domain redirects.
   *

   *
   * string final_url = 5 [(.google.api.field_behavior) = REQUIRED];
   * @return The finalUrl.
   */
  java.lang.String getFinalUrl();
  /**
   *

   * Required. The final URL after all cross domain redirects.
   *

   *
   * string final_url = 5 [(.google.api.field_behavior) = REQUIRED];
   * @return The bytes for finalUrl.
   */
  com.google.protobuf.ByteString
      getFinalUrlBytes();

  /**
   *

   * The final mobile URL after all cross domain redirects.
   *

   *
   * string final_mobile_url = 6;
   * @return The finalMobileUrl.
   */
  java.lang.String getFinalMobileUrl();
  /**
   *

   * The final mobile URL after all cross domain redirects.
   *

   *
   * string final_mobile_url = 6;
   * @return The bytes for finalMobileUrl.
   */
  com.google.protobuf.ByteString
      getFinalMobileUrlBytes();
}

redpajama_set_name: RedPajamaGithub


text:
"""
Django settings for pychart project.

Generated by 'django-admin startproject' using Django 1.10.5.

For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""

import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get("SECRET_KEY", "")

# SECURITY WARNING: don't run with debug turned on in production!

#TODO: Make this an environmental variable.
DEBUG = True

ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS").split()

# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'pychart',
    'pychart_profile',
    'pychart_datarender',
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'pychart.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'pychart.wsgi.application'

# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': os.environ.get("PYCHART_DB", "pychart_db"),
        'USER': os.environ.get("DB_USERNAME", ""),
        'PASSWORD': os.environ.get("DB_PASSWORD", ""),
        'HOST': os.environ.get("DB_ENDPOINT", ""),
        'PORT': '5432',
        'TEST': {
            'NAME': os.environ.get("TEST_PYCHART_DB", "test_pychart_db")
        }
    }
}

# Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]

# Internationalization
# https://docs.djangoproject.com/en/1.10/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'America/Los_Angeles'

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/

STATIC_ROOT = os.path.join(BASE_DIR, 'pychart', 'static')
STATIC_URL = '/static/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'MEDIA')
MEDIA_URL = "/media/"

LOGIN_REDIRECT_URL = 'pychart_profile:profile'

# Email setup
ACCOUNT_ACTIVATION_DAYS = 7
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'thepychart@gmail.com'
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD", "")

# Set to None to prevent issues with ajax calls.
# TODO: Research best way to make data-heavy AJAX calls to back end.
DATA_UPLOAD_MAX_NUMBER_FIELDS = None


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Interface org.apache.river.fiddler.Fiddler (River-Internet vtrunk API Documentation (internals))</title>
<meta name="date" content="2016-03-28">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Interface
org.apache.river.fiddler.Fiddler

Packages that use Fiddler

Package
Description

org.apache.river.fiddler

Provides the server side of an implementation of the lookup discovery service
(see LookupDiscoveryService).

Uses of Fiddler in org.apache.river.fiddler

Classes in org.apache.river.fiddler that implement Fiddler

Modifier and Type
Class and Description

(package private) class
ActivatableFiddlerImpl

Convenience class intended for use with the
 ServiceStarter framework to start
 an implementation of Fiddler that is activatable, and which will
 log its state information to persistent storage.

(package private) class
FiddlerImpl

This class is the server side of an implementation of the lookup
 discovery service.

(package private) class
NonActivatableFiddlerImpl

Convenience class intended for use with the
 ServiceStarter framework to start
 an implementation of Fiddler that is not activatable, but which
 will log its state information to persistent storage.

(package private) class
TransientFiddlerImpl

Convenience class intended for use with the
 ServiceStarter framework to start
 a transient (non-activatable, non-persistent) implementation
 of Fiddler.

Fields in org.apache.river.fiddler declared as Fiddler

Modifier and Type
Field and Description

private Fiddler
FiddlerImpl.innerProxy

The inner proxy (stub or dynamic proxy) to this server

(package private) Fiddler
FiddlerRegistration.server

The reference through which communication occurs between the
 client-side and the server-side of the lookup discovery service

(package private) Fiddler
FiddlerProxy.server

The reference through which communication occurs between the
 client-side and the server-side of the lookup discovery service

(package private) Fiddler
FiddlerLeaseMap.server

The reference to the back-end server of the lookup discovery service

(package private) Fiddler
FiddlerLease.server

The reference to the back-end server of the lookup discovery service
 that granted this lease (the granting entity).

(package private) Fiddler
FiddlerAdminProxy.server

The reference through which communication occurs between the
 client-side and the server-side of the lookup discovery service

Methods in org.apache.river.fiddler that return Fiddler

Modifier and Type
Method and Description

private static Fiddler
FiddlerProxy.check(Fiddler server,
     Uuid proxyID)

private static Fiddler
FiddlerRegistration.check(Fiddler server,
     Uuid registrationID,
     EventRegistration eventReg)

private static Fiddler
FiddlerRegistration.ConstrainableFiddlerRegistration.constrainServer(Fiddler server,
               MethodConstraints constraints)

Returns a copy of the given server proxy having the client method
  constraints that result after the specified method mapping is
  applied to the given client method constraints.

private static Fiddler
FiddlerProxy.ConstrainableFiddlerProxy.constrainServer(Fiddler server,
               MethodConstraints constraints)

Returns a copy of the given server proxy having the client method
  constraints that result after the specified method mapping is
  applied to the given client method constraints.

private static Fiddler
FiddlerLeaseMap.ConstrainableFiddlerLeaseMap.constrainServer(Fiddler server,
               MethodConstraints constraints)

Returns a copy of the given server proxy having the client method
  constraints that result after the specified method mapping is
  applied to the given client method constraints.

private static Fiddler
FiddlerLease.ConstrainableFiddlerLease.constrainServer(Fiddler server,
               MethodConstraints constraints)

Returns a copy of the given server proxy having the client method
  constraints that result after the specified method mapping is
  applied to the given client method constraints.

private static Fiddler
FiddlerAdminProxy.ConstrainableFiddlerAdminProxy.constrainServer(Fiddler server,
               MethodConstraints constraints)

Returns a copy of the given server proxy having the client method
  constraints that result after the specified method mapping is
  applied to the given client method constraints.

(package private) Fiddler
FiddlerLease.getServer()

Returns a reference to the back-end server of the lookup discovery
 service that granted this lease.

Methods in org.apache.river.fiddler with parameters of type Fiddler

Modifier and Type
Method and Description

private static boolean
ProxyVerifier.check(Fiddler innerProxy,
     Uuid proxyID)

private static Fiddler
FiddlerProxy.check(Fiddler server,
     Uuid proxyID)

private static Fiddler
FiddlerRegistration.check(Fiddler server,
     Uuid registrationID,
     EventRegistration eventReg)

private static boolean
FiddlerLease.check(Fiddler server,
     Uuid serverID,
     Uuid registrationID)

private static Fiddler
FiddlerRegistration.ConstrainableFiddlerRegistration.constrainServer(Fiddler server,
               MethodConstraints constraints)

Returns a copy of the given server proxy having the client method
  constraints that result after the specified method mapping is
  applied to the given client method constraints.

private static Fiddler
FiddlerProxy.ConstrainableFiddlerProxy.constrainServer(Fiddler server,
               MethodConstraints constraints)

Returns a copy of the given server proxy having the client method
  constraints that result after the specified method mapping is
  applied to the given client method constraints.

private static Fiddler
FiddlerLeaseMap.ConstrainableFiddlerLeaseMap.constrainServer(Fiddler server,
               MethodConstraints constraints)

Returns a copy of the given server proxy having the client method
  constraints that result after the specified method mapping is
  applied to the given client method constraints.

private static Fiddler
FiddlerLease.ConstrainableFiddlerLease.constrainServer(Fiddler server,
               MethodConstraints constraints)

Returns a copy of the given server proxy having the client method
  constraints that result after the specified method mapping is
  applied to the given client method constraints.

private static Fiddler
FiddlerAdminProxy.ConstrainableFiddlerAdminProxy.constrainServer(Fiddler server,
               MethodConstraints constraints)

Returns a copy of the given server proxy having the client method
  constraints that result after the specified method mapping is
  applied to the given client method constraints.

static FiddlerAdminProxy
FiddlerAdminProxy.createAdminProxy(Fiddler server,
                Uuid proxyID)

Public static factory method that creates and returns an instance of
 FiddlerAdminProxy.

static FiddlerLease
FiddlerLease.createLease(Fiddler server,
           Uuid serverID,
           Uuid registrationID,
           Uuid leaseID,
           long expiration)

Public static factory method that creates and returns an instance of
 FiddlerLease.

static FiddlerRegistration
FiddlerRegistration.createRegistration(Fiddler server,
                  Uuid registrationID,
                  EventRegistration eventReg)

Public static factory method that creates and returns an instance of
 FiddlerRegistration.

static FiddlerProxy
FiddlerProxy.createServiceProxy(Fiddler server,
                  Uuid proxyID)

Public static factory method that creates and returns an instance of
 FiddlerProxy.

Constructors in org.apache.river.fiddler with parameters of type Fiddler

Constructor and Description

ConstrainableFiddlerAdminProxy(Fiddler server,
                              Uuid proxyID,
                              MethodConstraints methodConstraints)

Constructs a new ConstrainableFiddlerAdminProxy
  instance.

ConstrainableFiddlerLease(Fiddler server,
                         Uuid serverID,
                         Uuid registrationID,
                         Uuid leaseID,
                         long expiration,
                         MethodConstraints methodConstraints)

Constructs a new ConstrainableFiddlerLease instance.

ConstrainableFiddlerLeaseMap(Fiddler server,
                            FiddlerLease lease,
                            long duration,
                            MethodConstraints methodConstraints)

Constructs a new ConstrainableFiddlerLeaseMap
  instance.

ConstrainableFiddlerProxy(Fiddler server,
                         Uuid proxyID,
                         MethodConstraints methodConstraints)

Constructs a new ConstrainableFiddlerProxy instance.

ConstrainableFiddlerRegistration(Fiddler server,
                                Uuid registrationID,
                                EventRegistration eventReg,
                                MethodConstraints methodConstraints)

Constructs a new ConstrainableFiddlerRegistration
  instance.

FiddlerAdminProxy(Fiddler server,
                 Uuid proxyID)

Constructs a new instance of FiddlerAdminProxy.

FiddlerLease(Fiddler server,
            Uuid serverID,
            Uuid registrationID,
            Uuid leaseID,
            long expiration)

Constructs a proxy to the lease the Fiddler implementation of the
 lookup discovery service places on a client's requested registration.

FiddlerLeaseMap(Fiddler server,
               FiddlerLease lease,
               long duration)

Constructs a new instance of FiddlerLeaseMap.

FiddlerProxy(Fiddler server,
            Uuid proxyID)

Constructs a new instance of FiddlerProxy.

FiddlerRegistration(Fiddler server,
                   Uuid registrationID,
                   EventRegistration eventReg)

Constructs a new instance of FiddlerRegistration.

ProxyVerifier(Fiddler innerProxy,
             Uuid proxyID)

Constructs an instance of TrustVerifier that can be
  used to determine whether or not a given proxy is equivalent in
  trust, content, and function to the service's innerProxy
  referenced in the class constructed here.

ProxyVerifier(Fiddler innerProxy,
             Uuid proxyID,
             boolean check)

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.


text:
//
//  GTLAdSenseHostCustomChannel.m
//

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   AdSense Host API (adsensehost/v4.1)
// Description:
//   Gives AdSense Hosts access to report generation, ad code generation, and
//   publisher management capabilities.
// Documentation:
//   https://developers.google.com/adsense/host/
// Classes:
//   GTLAdSenseHostCustomChannel (0 custom class methods, 4 custom properties)

#import "GTLAdSenseHostCustomChannel.h"

// ----------------------------------------------------------------------------
//
//   GTLAdSenseHostCustomChannel
//

@implementation GTLAdSenseHostCustomChannel
@dynamic code, identifier, kind, name;

+ (NSDictionary *)propertyToJSONKeyMap {
  NSDictionary *map = @{
    @"identifier" : @"id"
  };
  return map;
}

+ (void)load {
  [self registerObjectClassForKind:@"adsensehost#customChannel"];
}

@end


text:
Support images for Ant editor

## Support

Ruby:  2.0+

Rails: 4.2+

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'ant-images'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install ant-images

## Usage

Add to application.js

```js
//= require ant/images
```

Add to application.scss

```css
@import "ant/images";
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dancingbytes/ant-images.

### License

Author: Tyralion (piliaiev@gmail.com)

Copyright (c) 2016 DansingBytes.ru, released under the BSD license


text:
module Gitsh::Commands
  module Tree
    class Branch
      def initialize(left, right)
        @left = left
        @right = right
      end

      private

      attr_reader :left, :right
    end

    class Multi < Branch
      def execute
        left.execute
        right.execute
      end
    end

    class Or < Branch
      def execute
        left.execute || right.execute
      end
    end

    class And < Branch
      def execute
        left.execute && right.execute
      end
    end
  end
end


text:
package controllersContribution

import (
	"bytes"
	"net/http"
	"net/http/httptest"
	"testing"

	_ "github.com/wheatandcat/dotstamp_server/routers"
	"github.com/wheatandcat/dotstamp_server/tests"

	"github.com/astaxie/beego"
	. "github.com/smartystreets/goconvey/convey"
)

func setUpSearch() {
	test.Setup()
	test.SetupFixture([]string{
		"user_masters",
		"user_contributions",
		"user_contribution_details",
		"user_contribution_tags",
		"user_contribution_searches",
	})
}

func TestSearchPost(t *testing.T) {
	setUpSearch()

	json := `{
		"search":"a",
		"order":1,
		"page":1,
		"limit":10
	}`

	r, err := http.NewRequest(
		"POST",
		"/api/contributions/search/",
		bytes.NewBuffer([]byte(json)),
	)

	if err != nil {
		panic(err)
	}

	r.Header.Set("Content-Type", "application/json")

	w := httptest.NewRecorder()
	beego.BeeApp.Handlers.ServeHTTP(w, r)

	Convey("/contribution/search/\n", t, func() {
		Convey("Status Code Should Be 200", func() {
			So(w.Code, ShouldEqual, 200)
		})
		Convey("The Result Should Not Be Empty", func() {
			So(w.Body.Len(), ShouldBeGreaterThan, 0)
		})
	})
}


text:
.article-nav-table{
    position:fixed;
    right:20px;
    top:120px;
    display:none;
}
.article-inner-nav-wapper{
    background-color: seashell;
    color: #ff4366;
}
.article-inner-nav{
    margin: 0;
    padding: 0;
    list-style: circle inside;
    width: 387px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.8;
}
.aside2 .list-group-ul{
    margin: 0;
    padding: 0;
    list-style-position: inside;
}


text:
/** \file os/solaris/code/os_sharedmem.c
 *  \brief Solaris shared memory management
 *
 * Implements shared memory management for Solaris by
 * including the POSIX, SVR4 and heap implementation
 */

#include <assert.h>
#include <sys/stat.h> /* define file permission macro's */

#include "../posix/code/os_sharedmem_file.c"
#include <../svr4/code/os_sharedmem_seg.c>
#include "../common/code/os_sharedmem_heap.c"
#include "../common/code/os_sharedmem.c"

void
os_sharedAttrInit (
    os_sharedAttr *sharedAttr)
{
    assert (sharedAttr != NULL);
    sharedAttr->lockPolicy = OS_LOCK_DEFAULT;
    sharedAttr->sharedImpl = OS_MAP_ON_SEG;
    sharedAttr->userCred.uid = 0;
    sharedAttr->userCred.gid = 0;
    sharedAttr->map_address = (void *)0xA0000000;
}


text: require "deploygate/api"


text:
package myProject.util;

public class StringUtil {

    public static boolean isEmpty(String s) {
        return s == null || s.length() == 0;
    }

    public static boolean isMatch(String s1, String s2) {
        if (s1 == null && s2 == null) {
            return true;
        }
        return s1 != null && s1.equals(s2);
    }
}


text:
package csp

import (
	"fmt"
	_ "testing"
)

func ExampleOpts() {
	h := Opts{
		DefaultSrc: []string{SourceNone},
		ImgSrc:     []string{SourceSelf, "https://example.org"},
		StyleSrc:   []string{SourceSelf},
		ScriptSrc:  []string{SourceSelf, SourceUnsafeInline},
		ReportUri:  "/csp_report",
	}
	fmt.Println(h.Header())
	// Output: default-src 'none' ; img-src 'self' https://example.org ; style-src 'self' ; script-src 'self' 'unsafe-inline' ; report-uri /csp_report
}


text:
import testtools

class BaseTestCase(testtools.TestCase):
    def setUp(self):
        super(BaseTestCase, self).setUp()
        self.order_id = 'order1234'
        self.keystone_id = 'keystone1234'

    def tearDown(self):
        super(BaseTestCase, self).tearDown()


text:
package sh.komet.gui.contract.preferences;

public interface ConfigurationPreference {
}


text:
import messages from 'ringcentral-integration/modules/Conference/messages';

export default {
  [messages.requireAditionalNumbers]: 'Seleziona i numeri di accesso aggiuntivi.'
};

// @key: @#@"[messages.requireAditionalNumbers]"@#@ @source: @#@"Please select the additional dial-in numbers."@#@


text:
#pragma once

class ZcHeapOperators {
    private:
        static void * __stdcall allocRawMem(size_t size);
        static void * __stdcall allocRawMem(size_t size, const char *pFName,
                                             int nLine);
        static void   __stdcall freeRawMem(void *p);
        static void   __stdcall freeRawMem(void *p, const char *pFName,
                                            int nLine);
    public:

#undef new
#undef delete
        static void* operator new(size_t size) {
            void *p = allocRawMem(size);
            __assume(p != NULL);
            return p;
        }

        static void* operator new[](size_t size) {
            void *p = allocRawMem(size);
            __assume(p != NULL);
            return p;
        }

        static void* operator new(size_t size, const char *pFName,
                                  int nLine)
        {
            void * p = allocRawMem(size, pFName, nLine);
            __assume(p != NULL);
            return p;
        }

        static void* operator new[](size_t size,
                                    const char *pFName, int nLine)
        {
            void *p = allocRawMem(size, pFName, nLine);
            __assume(p != NULL);
            return p;
        }

        static void operator delete(void *p) {
            if(p != NULL)
                freeRawMem(p);
        }

        static void operator delete[](void *p) {
            if(p != NULL)
                freeRawMem(p);
        }

        static void operator delete(void *p, const char *pFName,
                                    int nLine)
        {
            if (p != NULL)
                freeRawMem(p, pFName, nLine);
        }

        static void operator delete[](void *p,
                                      const char *pFName, int nLine)
        {
            if (p != NULL)
                freeRawMem(p, pFName, nLine);
        }

};

#ifdef MEM_DEBUG

#define new DEBUG_NEW
#define delete DEBUG_DELETE
#endif


text:
'''
(C) 2014-2019 Roman Sirokov and contributors
Licensed under BSD license

http://github.com/r0x0r/pywebview/
'''

import os
import platform
import json
import logging
import webbrowser
import socket
import sys
from uuid import uuid1
from copy import deepcopy
from threading import Semaphore, Event

from webview import _debug, _user_agent, OPEN_DIALOG, FOLDER_DIALOG, SAVE_DIALOG, windows
from webview.window import Window, FixPoint
from webview.util import convert_string, default_html, parse_api_js, js_bridge_call
from webview.js.css import disable_text_select
from webview.screen import Screen
from webview.window import FixPoint

logger = logging.getLogger('pywebview')

settings = {}

from qtpy import QtCore

logger.debug('Using Qt %s' % QtCore.__version__)

from qtpy.QtWidgets import QMainWindow, QApplication, QFileDialog, QMessageBox, QAction
from qtpy.QtGui import QColor, QScreen
from qtpy import PYQT6, PYSIDE6

try:
    from qtpy.QtWebEngineWidgets import QWebEngineView as QWebView, QWebEnginePage as QWebPage, QWebEngineProfile
    from qtpy.QtWebChannel import QWebChannel
    renderer = 'qtwebengine'
    is_webengine = True
except ImportError:
    from PyQt5 import QtWebKitWidgets
    from PyQt5.QtWebKitWidgets import QWebView, QWebPage
    is_webengine = False
    renderer = 'qtwebkit'

_main_window_created = Event()
_main_window_created.clear()

# suppress invalid style override error message on some Linux distros
os.environ['QT_STYLE_OVERRIDE'] = ''
_qt6 = True if PYQT6 or PYSIDE6 else False

class BrowserView(QMainWindow):
    instances = {}
    inspector_port = None  # The localhost port at which the Remote debugger listens

    create_window_trigger = QtCore.Signal(object)
    set_title_trigger = QtCore.Signal(str)
    load_url_trigger = QtCore.Signal(str)
    html_trigger = QtCore.Signal(str, str)
    dialog_trigger = QtCore.Signal(int, str, bool, str, str)
    destroy_trigger = QtCore.Signal()
    hide_trigger = QtCore.Signal()
    show_trigger = QtCore.Signal()
    fullscreen_trigger = QtCore.Signal()
    window_size_trigger = QtCore.Signal(int, int, FixPoint)
    window_move_trigger = QtCore.Signal(int, int)
    window_minimize_trigger = QtCore.Signal()
    window_restore_trigger = QtCore.Signal()
    current_url_trigger = QtCore.Signal()
    evaluate_js_trigger = QtCore.Signal(str, str)
    on_top_trigger = QtCore.Signal(bool)

    class JSBridge(QtCore.QObject):
        qtype = QtCore.QJsonValue if is_webengine else str

        def __init__(self):
            super(BrowserView.JSBridge, self).__init__()

        @QtCore.Slot(str, qtype, str, result=str)
        def call(self, func_name, param, value_id):
            func_name = BrowserView._convert_string(func_name)
            param = BrowserView._convert_string(param)

            return js_bridge_call(self.window, func_name, json.loads(param), value_id)

    class WebView(QWebView):
        def __init__(self, parent=None):
            super(BrowserView.WebView, self).__init__(parent)

            if parent.frameless and parent.easy_drag:
                QApplication.instance().installEventFilter(self)
                self.setMouseTracking(True)

            self.transparent = parent.transparent
            if parent.transparent:
                self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
                self.setAttribute(QtCore.Qt.WA_OpaquePaintEvent, False)
                self.setStyleSheet("background: transparent;")

        def contextMenuEvent(self, event):
            if _qt6:
                menu = self.createStandardContextMenu()
            else:
                menu = self.page().createStandardContextMenu()

            # If 'Inspect Element' is present in the default context menu, it
            # means the inspector is already up and running.
            for i in menu.actions():
                if i.text() == 'Inspect Element':
                    break
            else:
                # Inspector is not up yet, so create a pseudo 'Inspect Element'
                # menu that will fire it up.
                inspect_element = QAction('Inspect Element', menu)
                inspect_element.triggered.connect(self.show_inspector)
                menu.addAction(inspect_element)

            menu.exec_(event.globalPos())

        # Create a new webview window pointing at the Remote debugger server
        def show_inspector(self):
            uid = self.parent().uid + '-inspector'
            try:
                # If inspector already exists, bring it to the front
                BrowserView.instances[uid].raise_()
                BrowserView.instances[uid].activateWindow()
            except KeyError:
                title = 'Web Inspector - {}'.format(self.parent().title)
                url = 'http://localhost:{}'.format(BrowserView.inspector_port)
                print(url)
                window = Window('web_inspector', title, url, '', 700, 500, None, None, True, False,
                                (300, 200), False, False, False, False, False, False, '#fff', None, False, False, None)
                window.localization = self.parent().localization

                inspector = BrowserView(window)
                inspector.show()

        def mousePressEvent(self, event):
            if event.button() == QtCore.Qt.LeftButton:
                self.drag_pos = event.globalPos() - self.parent().frameGeometry().topLeft()

            event.accept()

        def mouseMoveEvent(self, event):
            parent = self.parent()
            if parent.frameless and parent.easy_drag and int(event.buttons()) == 1:  # left button is pressed
                parent.move(event.globalPos() - self.drag_pos)

        def eventFilter(self, object, event):
            if object.parent() == self:
                if event.type() == QtCore.QEvent.MouseMove:
                    self.mouseMoveEvent(event)
                elif event.type() == QtCore.QEvent.MouseButtonPress:
                    self.mousePressEvent(event)

            return False

    # New-window-requests handler for Qt 5.5+ only
    class NavigationHandler(QWebPage):
        def __init__(self, parent=None):
            super(BrowserView.NavigationHandler, self).__init__(parent)

        def acceptNavigationRequest(self, url, type, is_main_frame):
            webbrowser.open(url.toString(), 2, True)
            return False

    class WebPage(QWebPage):
        def __init__(self, parent=None, profile=None):
            super(BrowserView.WebPage, self).__init__(profile, parent)
            if is_webengine:
                self.featurePermissionRequested.connect(self.onFeaturePermissionRequested)
                self.nav_handler = BrowserView.NavigationHandler(self)
            else:
                self.nav_handler = None

            if parent.transparent:
                self.setBackgroundColor(QtCore.Qt.transparent)

        if is_webengine:
            def onFeaturePermissionRequested(self, url, feature):
                if feature in (
                    QWebPage.MediaAudioCapture,
                    QWebPage.MediaVideoCapture,
                    QWebPage.MediaAudioVideoCapture,
                ):
                    self.setFeaturePermission(url, feature, QWebPage.PermissionGrantedByUser)
                else:
                    self.setFeaturePermission(url, feature, QWebPage.PermissionDeniedByUser)
        else:
            def acceptNavigationRequest(self, frame, request, type):
                if frame is None:
                    webbrowser.open(request.url().toString(), 2, True)
                    return False
                return True

        def userAgentForUrl(self, url):
            user_agent = settings.get('user_agent') or _user_agent
            if user_agent:
                return user_agent
            else:
                return super().userAgentForUrl(url)

        def createWindow(self, type):
            return self.nav_handler

    def __init__(self, window):
        super(BrowserView, self).__init__()
        BrowserView.instances[window.uid] = self
        self.uid = window.uid
        self.pywebview_window = window

        self.js_bridge = BrowserView.JSBridge()
        self.js_bridge.window = window

        self.is_fullscreen = False
        self.confirm_close = window.confirm_close
        self.text_select = window.text_select

        self._file_name_semaphore = Semaphore(0)
        self._current_url_semaphore = Semaphore(0)

        self.loaded = window.events.loaded
        self.shown = window.events.shown

        self.localization = window.localization

        self._js_results = {}
        self._current_url = None
        self._file_name = None

        self.resize(window.initial_width, window.initial_height)
        self.title = window.title
        self.setWindowTitle(window.title)

        # Set window background color
        self.background_color = QColor()
        self.background_color.setNamedColor(window.background_color)
        palette = self.palette()
        palette.setColor(self.backgroundRole(), self.background_color)
        self.setPalette(palette)

        if not window.resizable:
            self.setFixedSize(window.initial_width, window.initial_height)

        self.setMinimumSize(window.min_size[0], window.min_size[1])

        self.frameless = window.frameless
        self.easy_drag = window.easy_drag
        flags = self.windowFlags()
        if self.frameless:
            flags = flags | QtCore.Qt.FramelessWindowHint

        if window.on_top:
            flags = flags | QtCore.Qt.WindowStaysOnTopHint

        self.setWindowFlags(flags)

        self.transparent = window.transparent
        if self.transparent:
            # Override the background color
            self.background_color = QColor('transparent')
            palette = self.palette()
            palette.setColor(self.backgroundRole(), self.background_color)
            self.setPalette(palette)
            # Enable the transparency hint
            self.setAttribute(QtCore.Qt.WA_TranslucentBackground)

        self.view = BrowserView.WebView(self)

        if is_webengine:
            os.environ['QTWEBENGINE_CHROMIUM_FLAGS'] = (
                '--use-fake-ui-for-media-stream --enable-features=AutoplayIgnoreWebAudio')

        if _debug['mode'] and is_webengine:
            # Initialise Remote debugging (need to be done only once)
            if not BrowserView.inspector_port:
                BrowserView.inspector_port = BrowserView._get_debug_port()
                os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = BrowserView.inspector_port
        else:
            self.view.setContextMenuPolicy(QtCore.Qt.NoContextMenu)  # disable right click context menu

        global _qprofile  # prevent 'Release of profile requested but WebEnginePage still not deleted. Expect troubles !'
        _qprofile = QWebEngineProfile('pywebview') if _qt6 and '--no-cache' not in sys.argv else None
        self.view.setPage(BrowserView.WebPage(self.view, profile=_qprofile))
        self.view.page().loadFinished.connect(self.on_load_finished)

        self.setCentralWidget(self.view)

        self.create_window_trigger.connect(BrowserView.on_create_window)
        self.load_url_trigger.connect(self.on_load_url)
        self.html_trigger.connect(self.on_load_html)
        self.dialog_trigger.connect(self.on_file_dialog)
        self.destroy_trigger.connect(self.on_destroy_window)
        self.show_trigger.connect(self.on_show_window)
        self.hide_trigger.connect(self.on_hide_window)
        self.fullscreen_trigger.connect(self.on_fullscreen)
        self.window_size_trigger.connect(self.on_window_size)
        self.window_move_trigger.connect(self.on_window_move)
        self.window_minimize_trigger.connect(self.on_window_minimize)
        self.window_restore_trigger.connect(self.on_window_restore)
        self.current_url_trigger.connect(self.on_current_url)
        self.evaluate_js_trigger.connect(self.on_evaluate_js)
        self.set_title_trigger.connect(self.on_set_title)
        self.on_top_trigger.connect(self.on_set_on_top)

        if is_webengine and platform.system() != 'OpenBSD':
            self.channel = QWebChannel(self.view.page())
            self.view.page().setWebChannel(self.channel)

        if window.fullscreen:
            self.toggle_fullscreen()

        if window.real_url is not None:
            self.view.setUrl(QtCore.QUrl(window.real_url))
        elif window.uid == 'web_inspector':
            self.view.setUrl(QtCore.QUrl(window.original_url))
        elif window.html:
            self.view.setHtml(window.html, QtCore.QUrl(''))
        else:
            self.view.setHtml(default_html, QtCore.QUrl(''))

        if window.initial_x is not None and window.initial_y is not None:
            self.move(window.initial_x, window.initial_y)
        else:
            if _qt6:
                center = QScreen.availableGeometry(QApplication.primaryScreen()).center() - self.rect().center()
                self.move(center.x(), center.y() - 16)
            else:
                center = QApplication.desktop().availableGeometry().center() - self.rect().center()
                self.move(center.x(), center.y())

        if not window.minimized:
            self.activateWindow()
            self.raise_()

        self.shown.set()

    def on_set_title(self, title):
        self.setWindowTitle(title)

    def on_file_dialog(self, dialog_type, directory, allow_multiple, save_filename, file_filter):
        if dialog_type == FOLDER_DIALOG:
            self._file_name = QFileDialog.getExistingDirectory(self, self.localization['linux.openFolder'], options=QFileDialog.ShowDirsOnly)
        elif dialog_type == OPEN_DIALOG:
            if allow_multiple:
                self._file_name = QFileDialog.getOpenFileNames(self, self.localization['linux.openFiles'], directory, file_filter)
            else:
                self._file_name = QFileDialog.getOpenFileName(self, self.localization['linux.openFile'], directory, file_filter)
        elif dialog_type == SAVE_DIALOG:
            if directory:
                save_filename = os.path.join(str(directory), str(save_filename))

            self._file_name = QFileDialog.getSaveFileName(self, self.localization['global.saveFile'], save_filename)

        self._file_name_semaphore.release()

    def on_current_url(self):
        url = BrowserView._convert_string(self.view.url().toString())
        self._current_url = None if url == '' or url.startswith('data:text/html') else url
        self._current_url_semaphore.release()

    def on_load_url(self, url):
        self.view.setUrl(QtCore.QUrl(url))

    def on_load_html(self, content, base_uri):
        self.view.setHtml(content, QtCore.QUrl(base_uri))

    def on_set_on_top(self, top):
        flags = self.windowFlags()
        if top:
            self.setWindowFlags(flags | QtCore.Qt.WindowStaysOnTopHint)
        else:
            self.setWindowFlags(flags & ~QtCore.Qt.WindowStaysOnTopHint)

        self.show()

    def closeEvent(self, event):
        if self.confirm_close:
            reply = QMessageBox.question(self, self.title, self.localization['global.quitConfirmation'],
                                         QMessageBox.Yes, QMessageBox.No)

            if reply == QMessageBox.No:
                event.ignore()
                return

        should_cancel = self.pywebview_window.events.closing.set()

        if should_cancel:
            event.ignore()
            return

        event.accept()
        BrowserView.instances[self.uid].close()
        del BrowserView.instances[self.uid]

        if self.pywebview_window in windows:
            windows.remove(self.pywebview_window)

        self.pywebview_window.events.closed.set()

        if len(BrowserView.instances) == 0:
            self.hide()
            _app.exit()

    def changeEvent(self, e):
        if e.type() != QtCore.QEvent.WindowStateChange:
            return

        if self.windowState() == QtCore.Qt.WindowMinimized:
            self.pywebview_window.events.minimized.set()

        if self.windowState() == QtCore.Qt.WindowMaximized:
            self.pywebview_window.events.maximized.set()

        if self.windowState() == QtCore.Qt.WindowNoState and e.oldState() in (QtCore.Qt.WindowMinimized, QtCore.Qt.WindowMaximized):
            self.pywebview_window.events.restored.set()

    def resizeEvent(self, e):
        if self.pywebview_window.initial_width != self.width() or \
           self.pywebview_window.initial_height != self.height():
            self.pywebview_window.events.resized.set(self.width(), self.height())

    def eventFilter(self, object, event):
        if event.type() == QtCore.QEvent.Move:
            self.pywebview_window.events.moved.set(self.x(), self.y())

        return super().eventFilter(object, event)

    def on_show_window(self):
        self.show()

    def on_hide_window(self):
        self.hide()

    def on_destroy_window(self):
        self.close()

    def on_fullscreen(self):
        if self.is_fullscreen:
            self.showNormal()
        else:
            self.showFullScreen()

        self.is_fullscreen = not self.is_fullscreen

    def on_window_size(self, width, height, fix_point):
        geo = self.geometry()

        if fix_point & FixPoint.EAST:
            # Keep the right of the window in the same place
            geo.setX(geo.x() + geo.width() - width)

        if fix_point & FixPoint.SOUTH:
            # Keep the top of the window in the same place
            geo.setY(geo.y() + geo.height() - height)

        self.setGeometry(geo)
        self.setFixedSize(width, height)

    def on_window_move(self, x, y):
        self.move(x, y)

    def on_window_minimize(self):
        self.setWindowState(QtCore.Qt.WindowMinimized)

    def on_window_restore(self):
        self.setWindowState(QtCore.Qt.WindowNoState)
        self.raise_()
        self.activateWindow()

    def on_evaluate_js(self, script, uuid):
        def return_result(result):
            result = BrowserView._convert_string(result)
            uuid_ = BrowserView._convert_string(uuid)

            js_result = self._js_results[uuid_]
            js_result['result'] = None if result is None or result == 'null' else result if result == '' else json.loads(result)
            js_result['semaphore'].release()

        try:    # < Qt5.6
            if _qt6:
                self.view.page().runJavaScript(script, 0, return_result)
            else:
                self.view.page().runJavaScript(script, return_result)
        except TypeError:
            self.view.page().runJavaScript(script)  # PySide2 & PySide6
        except AttributeError:
            result = self.view.page().mainFrame().evaluateJavaScript(script)
            return_result(result)
        except Exception as e:
            logger.exception(e)

    def on_load_finished(self):
        if self.uid == 'web_inspector':
            return

        self._set_js_api()

        if not self.text_select:
            script = disable_text_select.replace('\n', '')

            try:
                self.view.page().runJavaScript(script)
            except: # QT < 5.6
                self.view.page().mainFrame().evaluateJavaScript(script)

        if _debug['mode']:
            self.view.show_inspector()

    def set_title(self, title):
        self.set_title_trigger.emit(title)

    def get_current_url(self):
        self.loaded.wait()
        self.current_url_trigger.emit()
        self._current_url_semaphore.acquire()

        return self._current_url

    def load_url(self, url):
        self.loaded.clear()
        self.load_url_trigger.emit(url)

    def load_html(self, content, base_uri):
        self.loaded.clear()
        self.html_trigger.emit(content, base_uri)

    def create_file_dialog(self, dialog_type, directory, allow_multiple, save_filename, file_filter):
        self.dialog_trigger.emit(dialog_type, directory, allow_multiple, save_filename, file_filter)
        self._file_name_semaphore.acquire()

        if dialog_type == FOLDER_DIALOG:
            file_names = (self._file_name,)
        elif dialog_type == SAVE_DIALOG or not allow_multiple:
            file_names = (self._file_name[0],)
        else:
            file_names = tuple(self._file_name[0])

        # Check if we got an empty tuple, or a tuple with empty string
        if len(file_names) == 0 or len(file_names[0]) == 0:
            return None
        else:
            return file_names

    def hide_(self):
        self.hide_trigger.emit()

    def show_(self):
        self.show_trigger.emit()

    def destroy_(self):
        self.destroy_trigger.emit()

    def toggle_fullscreen(self):
        self.fullscreen_trigger.emit()

    def resize_(self, width, height, fix_point):
        self.window_size_trigger.emit(width, height, fix_point)

    def move_window(self, x, y):
        self.window_move_trigger.emit(x, y)

    def minimize(self):
        self.window_minimize_trigger.emit()

    def restore(self):
        self.window_restore_trigger.emit()

    def set_on_top(self, top):
        self.on_top_trigger.emit(top)

    def evaluate_js(self, script):
        self.loaded.wait()
        result_semaphore = Semaphore(0)
        unique_id = uuid1().hex
        self._js_results[unique_id] = {'semaphore': result_semaphore, 'result': ''}

        self.evaluate_js_trigger.emit(script, unique_id)
        result_semaphore.acquire()

        result = deepcopy(self._js_results[unique_id]['result'])
        del self._js_results[unique_id]

        return result

    def _set_js_api(self):
        def _register_window_object():
            frame.addToJavaScriptWindowObject('external', self.js_bridge)

        code = 'qtwebengine' if is_webengine else 'qtwebkit'
        script = parse_api_js(self.js_bridge.window, code)

        if is_webengine:
            qwebchannel_js = QtCore.QFile('://qtwebchannel/qwebchannel.js')
            if qwebchannel_js.open(QtCore.QFile.ReadOnly):
                source = bytes(qwebchannel_js.readAll()).decode('utf-8')
                self.view.page().runJavaScript(source)
                self.channel.registerObject('external', self.js_bridge)
                qwebchannel_js.close()
        else:
            frame = self.view.page().mainFrame()
            _register_window_object()

        try:
            self.view.page().runJavaScript(script)
        except AttributeError:  # < QT 5.6
            self.view.page().mainFrame().evaluateJavaScript(script)

        self.loaded.set()

    @staticmethod
    def _convert_string(result):
        try:
            if result is None or result.isNull():
                return None

            result = result.toString() # QJsonValue conversion
        except AttributeError:
            pass

        return convert_string(result)

    @staticmethod
    def _get_debug_port():
        """
        Check if default debug port 8228 is available,
        increment it by 1 until a port is available.
        :return: port: str
        """
        port_available = False
        port = 8228

        while not port_available:
            try:
                sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                sock.bind(('localhost', port))
                port_available = True
            except:
                port_available = False
                logger.warning('Port %s is in use' % port)
                port += 1
            finally:
                sock.close()

        return str(port)

    @staticmethod
    # Receive func from subthread and execute it on the main thread
    def on_create_window(func):
        func()

def create_window(window):
    def _create():
        browser = BrowserView(window)
        browser.installEventFilter(browser)

        _main_window_created.set()

        if window.minimized:
            # showMinimized does not work on start without showNormal first
            # looks like a bug in QT
            browser.showNormal()
            browser.showMinimized()
        elif not window.hidden:
            browser.show()

    if window.uid == 'master':
        global _app
        _app = QApplication.instance() or QApplication(sys.argv)

        _create()
        _app.exec_()
    else:
        _main_window_created.wait()
        i = list(BrowserView.instances.values())[0] # arbitrary instance
        i.create_window_trigger.emit(_create)

def set_title(title, uid):
    BrowserView.instances[uid].set_title(title)

def get_current_url(uid):
    return BrowserView.instances[uid].get_current_url()

def load_url(url, uid):
    BrowserView.instances[uid].load_url(url)

def load_html(content, base_uri, uid):
    BrowserView.instances[uid].load_html(content, base_uri)

def destroy_window(uid):
    BrowserView.instances[uid].destroy_()

def hide(uid):
    BrowserView.instances[uid].hide_()

def show(uid):
    BrowserView.instances[uid].show_()

def minimize(uid):
    BrowserView.instances[uid].minimize()

def restore(uid):
    BrowserView.instances[uid].restore()

def toggle_fullscreen(uid):
    BrowserView.instances[uid].toggle_fullscreen()

def set_on_top(uid, top):
    BrowserView.instances[uid].set_on_top(top)

def resize(width, height, uid, fix_point):
    BrowserView.instances[uid].resize_(width, height, fix_point)

def move(x, y, uid):
    BrowserView.instances[uid].move_window(x, y)

def create_file_dialog(dialog_type, directory, allow_multiple, save_filename, file_types, uid):
    # Create a file filter by parsing allowed file types
    file_types = [s.replace(';', ' ') for s in file_types]
    file_filter = ';;'.join(file_types)

    i = BrowserView.instances[uid]
    return i.create_file_dialog(dialog_type, directory, allow_multiple, save_filename, file_filter)

def evaluate_js(script, uid):
    return BrowserView.instances[uid].evaluate_js(script)

def get_position(uid):
    position = BrowserView.instances[uid].pos()
    return position.x(), position.y()

def get_size(uid):
    window = BrowserView.instances[uid]
    return window.width(), window.height()

def get_screens():
    global _app
    _app = QApplication.instance() or QApplication(sys.argv)

    geometries = [s.geometry() for s in _app.screens()]
    screens = [Screen(g.width(), g.height()) for g in geometries]

    return screens


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/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>tvTable: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

tvTable
    01.00

A sample of using a Table View in a Xamarin.tvOS app

Main Page

Packages

Classes

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

tvTable.AttractionTableCell Member List

This is the complete list of members for tvTable.AttractionTableCell, including all inherited members.

_attraction	tvTable.AttractionTableCell	private

Attraction	tvTable.AttractionTableCell

AttractionTableCell(IntPtr handle)	tvTable.AttractionTableCell

Favorite	tvTable.AttractionTableCell	private

ReleaseDesignerOutlets()	tvTable.AttractionTableCell	private

Title	tvTable.AttractionTableCell	private

UpdateUI()	tvTable.AttractionTableCell	private

Generated on Wed Mar 9 2016 10:24:51 for tvTable by

     1.8.11


text:
module HealthSeven::V2_3_1
class Om1 < ::HealthSeven::Segment
  # Sequence Number - Test/Observation Master File
  attribute :sequence_number_test_observation_master_file, Nm, position: "OM1.1"
  # Producer's Test/Observation ID
  attribute :producer_s_test_observation_id, Ce, position: "OM1.2"
  # Permitted Data Types
  attribute :permitted_data_types, Array[Id], position: "OM1.3", multiple: true
  # Specimen Required
  attribute :specimen_required, Id, position: "OM1.4"
  # Producer ID
  attribute :producer_id, Ce, position: "OM1.5"
  # Observation Description
  attribute :observation_description, Tx, position: "OM1.6"
  # Other Test/Observation IDs for the Observation
  attribute :other_test_observation_ids_for_the_observation, Ce, position: "OM1.7"
  # Other Names
  attribute :other_names, Array[St], position: "OM1.8", multiple: true
  # Preferred Report Name for the Observation
  attribute :preferred_report_name_for_the_observation, St, position: "OM1.9"
  # Preferred Short Name or Mnemonic for Observation
  attribute :preferred_short_name_or_mnemonic_for_observation, St, position: "OM1.10"
  # Preferred Long Name for the Observation
  attribute :preferred_long_name_for_the_observation, St, position: "OM1.11"
  # Orderability
  attribute :orderability, Id, position: "OM1.12"
  # Identity of Instrument Used to Perform this Study
  attribute :identity_of_instrument_used_to_perform_this_studies, Array[Ce], position: "OM1.13", multiple: true
  # Coded Representation of Method
  attribute :coded_representation_of_methods, Array[Ce], position: "OM1.14", multiple: true
  # Portable
  attribute :portable, Id, position: "OM1.15"
  # Observation Producing Department/Section
  attribute :observation_producing_department_sections, Array[Ce], position: "OM1.16", multiple: true
  # Telephone Number of Section
  attribute :telephone_number_of_section, Xtn, position: "OM1.17"
  # Nature of Test/Observation
  attribute :nature_of_test_observation, Is, position: "OM1.18", require: true
  # Report Subheader
  attribute :report_subheader, Ce, position: "OM1.19"
  # Report Display Order
  attribute :report_display_order, St, position: "OM1.20"
  # Date/Time Stamp for any change in Definition for the Observation
  attribute :date_time_stamp_for_any_change_in_definition_for_the_observation, Ts, position: "OM1.21"
  # Effective Date/Time of Change
  attribute :effective_date_time_of_change, Ts, position: "OM1.22"
  # Typical Turn-Around Time
  attribute :typical_turn_around_time, Nm, position: "OM1.23"
  # Processing Time
  attribute :processing_time, Nm, position: "OM1.24"
  # Processing Priority
  attribute :processing_priorities, Array[Id], position: "OM1.25", multiple: true
  # Reporting Priority
  attribute :reporting_priority, Id, position: "OM1.26"
  # Outside Site(s) Where Observation may be Performed
  attribute :outside_site_s_where_observation_may_be_performeds, Array[Ce], position: "OM1.27", multiple: true
  # Address of Outside Site(s)
  attribute :address_of_outside_site_s, Array[Xad], position: "OM1.28", multiple: true
  # Phone Number of Outside Site
  attribute :phone_number_of_outside_site, Xtn, position: "OM1.29"
  # Confidentiality Code
  attribute :confidentiality_code, Is, position: "OM1.30"
  # Observations Required to Interpret the Obs
  attribute :observations_required_to_interpret_the_obs, Ce, position: "OM1.31"
  # Interpretation of Observations
  attribute :interpretation_of_observations, Tx, position: "OM1.32"
  # Contraindications to Observations
  attribute :contraindications_to_observations, Ce, position: "OM1.33"
  # Reflex Tests/Observations
  attribute :reflex_tests_observations, Array[Ce], position: "OM1.34", multiple: true
  # Rules that Trigger Reflex Testing
  attribute :rules_that_trigger_reflex_testing, Tx, position: "OM1.35"
  # Fixed Canned Message
  attribute :fixed_canned_message, Ce, position: "OM1.36"
  # Patient Preparation
  attribute :patient_preparation, Tx, position: "OM1.37"
  # Procedure Medication
  attribute :procedure_medication, Ce, position: "OM1.38"
  # Factors that may Effect the Observation
  attribute :factors_that_may_effect_the_observation, Tx, position: "OM1.39"
  # Test/Observation Performance Schedule
  attribute :test_observation_performance_schedules, Array[St], position: "OM1.40", multiple: true
  # Description of Test Methods
  attribute :description_of_test_methods, Tx, position: "OM1.41"
  # Kind of Quantity Observed
  attribute :kind_of_quantity_observed, Ce, position: "OM1.42"
  # Point Versus Interval
  attribute :point_versus_interval, Ce, position: "OM1.43"
  # Challenge Information
  attribute :challenge_information, TxChallenge, position: "OM1.44"
  # Relationship Modifier
  attribute :relationship_modifier, Ce, position: "OM1.45"
  # Target Anatomic Site Of Test
  attribute :target_anatomic_site_of_test, Ce, position: "OM1.46"
  # Modality Of Imaging Measurement
  attribute :modality_of_imaging_measurement, Ce, position: "OM1.47"
end
end


text: import './core-css.css'


text:
<?php

/* Staff Needs Custom Post Type
 * The staff needs custom post type includes all of the data
 * related to the particular needs of the position needing to be filled.
 */

function staffing_needs_cpt() {
	$labels = array(
		'name'               => _x( 'Staffing Needs', 'post type general name', 'water-tower' ),
		'singular_name'      => _x( 'Staffing Need', 'post type singular name', 'water-tower' ),
		'add_new'            => _x( 'Add New Staffing Need', 'staff_needs', 'water-tower' ),
		'add_new_item'       => __( 'Add New Staffing Need', 'water-tower' ),
		'edit_item'          => __( 'Edit Staffing Need', 'water-tower' ),
		'new_item'           => __( 'New Staffing Need', 'water-tower' ),
		'all_items'          => __( 'Staffing Needs', 'water-tower' ),
		'view_item'          => __( 'View Staffing Needs', 'water-tower' ),
		'search_items'       => __( 'Search Staffing Needs', 'water-tower' ),
		'not_found'          => __( 'No staffing needs found', 'water-tower' ),
		'not_found_in_trash' => __( 'No staffing needs found in the Trash', 'water-tower' ),
		'menu_name'          => __( 'Staffing Needs', 'water-tower' ),
	);
	$args = array(
		'labels'        => $labels,
		'description'   => 'Holds our staffing needs and staffing needs specific data',
		'public'        => true,
		'menu_position' => 6,
		'menu_icon'			 => 'dashicons-welcome-learn-more',
		'supports'      => array( 'title', 'editor', 'thumbnail', 'revisions' ),
		'show_in_menu'  => 'edit.php?post_type=page',
		'has_archive'   => true,
		'exclude_from_search' => true,
		'taxonomies' 	=> array('post_tag'),
		'rewrite' => array('slug' => 'staffing-needs'),
	);
	register_post_type( 'staffing_needs', $args );
}
add_action( 'init', 'staffing_needs_cpt' );

// Disable Single Post View
function staffing_needs_redirect_post() {
	$queried_post_type = get_query_var( 'post_type' );
	if ( is_single() && 'staffing_needs' == $queried_post_type ) {
		wp_redirect( get_bloginfo( 'url' ) . '/staffing-needs/', 301 );
		exit;
	}
}

add_action( 'template_redirect', 'staffing_needs_redirect_post' );

?>


text:
namespace blink {
namespace scheduler {
class WorkerScheduler;

// Helper class for communication between parent scheduler (may be a frame
// scheduler on the main thread or another woker scheduler on a worker thread)
// and worker scheduler (worker thread).
//
// It's owned by DedicatedWorkerThread and is created and destroyed
// on the parent thread. It's passed to WorkerScheduler during its
// construction. Given that DedicatedWorkerThread object outlives worker thread,
// this class outlives worker thread too.
class PLATFORM_EXPORT WorkerSchedulerProxy {
 public:
  explicit WorkerSchedulerProxy(FrameOrWorkerScheduler* scheduler);
  WorkerSchedulerProxy(const WorkerSchedulerProxy&) = delete;
  WorkerSchedulerProxy& operator=(const WorkerSchedulerProxy&) = delete;
  ~WorkerSchedulerProxy();

  void OnWorkerSchedulerCreated(
      base::WeakPtr<WorkerScheduler> worker_scheduler);

  void OnLifecycleStateChanged(SchedulingLifecycleState lifecycle_state);

  // Accessed only during init.
  SchedulingLifecycleState lifecycle_state() const {
    DCHECK(!initialized_);
    return lifecycle_state_;
  }

  // Accessed only during init.
  absl::optional<FrameOriginType> parent_frame_type() const {
    DCHECK(!initialized_);
    return parent_frame_type_;
  }

  // Accessed only during init.
  ukm::SourceId ukm_source_id() const {
    DCHECK(!initialized_);
    return ukm_source_id_;
  }

  // Accessed only during init.
  FrameStatus initial_frame_status() const {
    DCHECK(!initialized_);
    return initial_frame_status_;
  }

 private:
  // Can be accessed only from the worker thread.
  base::WeakPtr<WorkerScheduler> worker_scheduler_;

  // Const after init on the worker thread.
  scoped_refptr<base::SingleThreadTaskRunner> worker_thread_task_runner_;

  SchedulingLifecycleState lifecycle_state_ =
      SchedulingLifecycleState::kNotThrottled;

  std::unique_ptr<FrameOrWorkerScheduler::LifecycleObserverHandle>
      throttling_observer_handle_;

  bool initialized_ = false;
  absl::optional<FrameOriginType> parent_frame_type_;
  FrameStatus initial_frame_status_ = FrameStatus::kNone;
  ukm::SourceId ukm_source_id_ = ukm::kInvalidSourceId;

  THREAD_CHECKER(parent_thread_checker_);
};

}  // namespace scheduler
}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_WORKER_WORKER_SCHEDULER_PROXY_H_


text:
/*globals console sparks $ breadModel getBreadBoard */

(function() {

  sparks.SectionView = function(section){
    this.section = section;
  };

  sparks.SectionView.prototype = {

    clear: function() {
      $('#breadboard').html('');
      $('#image').html('');
      sparks.sectionController.currentPage.view.clear();
    },

    getImageView: function() {
      var $imagediv = $("<div>").addClass("question-image");
      $imagediv.append(
        $("<img>").attr('src', this.getImgSrc(this.section.image))
      );
      return $imagediv;
    },

    getImgSrc: function(fileName) {
      if (fileName.indexOf("http") > -1){
        return fileName;
      } else if (!!this.section.images_url) {
        return this.section.images_url + "/" + fileName;
      }
      console.log(fileName + " appears to be a relative filename, but there is no base activity url.");
      return "";
    }

  };
})();


text:
#include "driverClass.h"

#include <SdkTrays.h>
#include <SdkCameraMan.h>

#include <OgreEntity.h>
#include <OgreLogManager.h>
#include <OgreRoot.h>

#include <OgreException.h>
#include <OgreConfigFile.h>
#include <OgreCamera.h>
#include <OgreViewport.h>
#include <OgreSceneManager.h>
#include <OgreRenderWindow.h>
#include <OgreEntity.h>
#include <OgreWindowEventUtilities.h>
#include <OgreMeshManager.h>
#include <unistd.h>
#include <ctime>

#include "tower.h"
#include "creep.h"
#include "bullet.h"
#include "OgreText.h"
#include "objectController.h"
#include "gameController.h"

#include <OgreOverlayManager.h>
#include <OgreOverlay.h>
#include <OgreOverlayContainer.h>

#include <sys/time.h>
#include <sstream>

//TODO: change scenemanager to a singleton instance.
/** \class DriverClass
    \brief driver class for game.

    This is to driver class for the program. It contains the main() function.
*/

/**
    Constructor for DriverClass.
*/
//-------------------------------------------------------------------------------------
DriverClass::DriverClass(void)
 : mRoot(0),
	mResourcesCfg(Ogre::StringUtil::BLANK),
    mPluginsCfg(Ogre::StringUtil::BLANK)
{
}
//-------------------------------------------------------------------------------------
/**
    Destructor for DriverClass.
*/
DriverClass::~DriverClass(void)
{
    //Remove ourself as a Window listener
    Ogre::WindowEventUtilities::removeWindowEventListener(mWindow, this);
    windowClosed(mWindow);
    delete mRoot; //TODO: delete stuff like here! :)
}

/**
    Startup of game, ran by main().
*/
bool DriverClass::go(void)
{

#ifdef _DEBUG
    mResourcesCfg = "resources_d.cfg";
    mPluginsCfg = "plugins_d.cfg";
#else
    mResourcesCfg = "resources.cfg";
    mPluginsCfg = "plugins.cfg";
#endif
    gameover = false;
    // construct Ogre::Root
    mRoot = new Ogre::Root(mPluginsCfg);

    // set up resources
    // Load resource paths from config file
    Ogre::ConfigFile cf;
    cf.load(mResourcesCfg);

    // Go through all sections & settings in the file
    Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();

    Ogre::String secName, typeName, archName;
    while (seci.hasMoreElements())
    {
        secName = seci.peekNextKey();
        Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
        Ogre::ConfigFile::SettingsMultiMap::iterator i;
        for (i = settings->begin(); i != settings->end(); ++i)
        {
            typeName = i->first;
            archName = i->second;
            Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
                archName, typeName, secName);
        }
    }

    // configure
    // Show the configuration dialog and initialise the system
    if(!(mRoot->restoreConfig() || mRoot->showConfigDialog()))
    {
        return false;
    }

    gsManager = new gameStateManager();
    gsManager->setState(1);

    mWindow = mRoot->initialise(true, "Tower Defence Game");

    gController = new gameController();
    objController = new objectController();
    initialiseOIS();

    //Set initial mouse clipping size
    windowResized(mWindow);

    //Register as a Window listener
    Ogre::WindowEventUtilities::addWindowEventListener(mWindow, this);

    oldTime = GetMillisecondsTime();

    objController->createScene(*mRoot, *mWindow);
    objController->setupOverlay();

    //gameloop
    while(true)
    {
        //capture input at every tick
        mKeyboard->capture();
        mMouse->capture();

        //update elapsed time at every tick
        newTime = GetMillisecondsTime();
        timeElapsed = timeElapsed + (newTime - oldTime);

        //check if logic should be executed at this tick
        if(timeElapsed > 33.0) { //16.6 = 1/60th of a second (in milliseconds). //TODO remove random number
            timeElapsed =  timeElapsed - 33.0;
            tick = true;
        }

        if(tick){ //update logic
            switch(gsManager->getState()) {
                case 1: //pre-game, press space to start
                    if(mKeyboard->isKeyDown(OIS::KC_SPACE)) {
                        gsManager->setState(2);
                    }
                    objController->oStartGame();
                    break;
                case 2: //ingame
                    objController->hideOverlay();
                    if(!runGame()) //returns false if game is lost
                       gsManager->setState(3);
                    break;
                case 3: //game lost
                    objController->oGameLost();
                    break;
                case 4: //game won
                    objController->oGameWon();
                    break;
            }
        }

        // Pump window messages as we are not using startRendering()
        Ogre::WindowEventUtilities::messagePump();

        // Render a frame, exit if fail
        if(!mRoot->renderOneFrame())
            return false;

         //if exit
        if(mWindow->isClosed())
                return false;

        //if escape pressed exit
        if(mKeyboard->isKeyDown(OIS::KC_ESCAPE))
            return false;

        oldTime = newTime;
    }

    return true;
}

/**
    @returns false if the game is lost
*/
bool DriverClass::runGame() {
    tick = false;
                //framerate = 1/60th of second i.e. 60 fps
                //TODO: multi-threading

                //update loop
                if(!objController->updateLogic(gController->getLevel(), *gController)) {
                    gController->upLevel(*objController);
                //go next level if creeps are all dead (return false)
                }

                if(!objController->creepMovement()) {
                    return false;
                }

                tower = objController->rInput(*mKeyboard);
                if(tower == 3) {
                    gController->placeTower(3,*objController);
                } else if(tower == 4) {
                    gController->placeTower(4,*objController);
                }

                if(gController->getLevel() == 6 && !gameover) {
                    //update currency when tower is placed.
                    gsManager->setState(4);
                    //gameover = true;
                }
            return true;
}

/**
    Initilaises the Object Oriented Input System. This library used to create the game window and receive keyboard/mouse input.
*/
void DriverClass::initialiseOIS()
{
    Ogre::LogManager::getSingletonPtr()->logMessage("*** Initializing OIS ***");
    OIS::ParamList pl;
    size_t windowHnd = 0;
    std::ostringstream windowHndStr;

    mWindow->getCustomAttribute("WINDOW", &windowHnd);
    windowHndStr << windowHnd;
    pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));

    mInputManager = OIS::InputManager::createInputSystem( pl );

    mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject( OIS::OISKeyboard, false ));
    mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject( OIS::OISMouse, false ));

}

//Adjust mouse clipping area
/**
    Sets mouse clipping area based on window size.
*/
void DriverClass::windowResized(Ogre::RenderWindow* rw)
{
    unsigned int width, height, depth;
    int left, top;
    rw->getMetrics(width, height, depth, left, top);

    const OIS::MouseState &ms = mMouse->getMouseState();
    ms.width = width;
    ms.height = height;
}

//Unattach OIS before window shutdown (very important, or there is no way to exit!)
/**
    Function needs to run uninitialise OIS for successful window,
    else window can not be closed(and stays in fullscreen! hard restart required!)
*/
void DriverClass::windowClosed(Ogre::RenderWindow* rw)
{
    //Only close for window that created the OIS
    if(rw == mWindow)
    {
        if(mInputManager)
        {
            mInputManager->destroyInputObject( mMouse );
            mInputManager->destroyInputObject( mKeyboard );

            OIS::InputManager::destroyInputSystem(mInputManager);
            mInputManager = 0;
        }
    }
}

unsigned long DriverClass::GetMillisecondsTime()
{
   struct timeval tv;
   if(gettimeofday(&tv, NULL) != 0) return 0;
   return (unsigned long)((tv.tv_sec * 1000ul) + (tv.tv_usec / 1000ul));
}

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
    INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
    int main(int argc, char *argv[])
#endif
    {
        // Create application object
        DriverClass app;

        try {
            app.go();
        } catch( Ogre::Exception& e ) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
            MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
            std::cerr << "An exception has occured: " <<
                e.getFullDescription().c_str() << std::endl;
#endif
        }

        return 0;
    }

#ifdef __cplusplus
}
#endif


text:
#import "AutoScalingDescribeScheduledActionsResponse.h"

@implementation AutoScalingDescribeScheduledActionsResponse

@synthesize scheduledUpdateGroupActions;
@synthesize nextToken;

-(id)init
{
    if (self = [super init]) {
        scheduledUpdateGroupActions = [[NSMutableArray alloc] initWithCapacity:1];
        nextToken                   = nil;
    }

    return self;
}

-(void)setException:(AmazonServiceException *)theException
{
    AmazonServiceException *newException = nil;

    if ([[theException errorCode] isEqualToString:@"InvalidNextToken"]) {
        newException = [[AutoScalingInvalidNextTokenException alloc] initWithMessage:@""];
    }

    if (newException != nil) {
        [newException setPropertiesWithException:theException];
        [exception release];
        exception = newException;
    }
    else {
        [exception release];
        exception = [theException retain];
    }
}

-(AutoScalingScheduledUpdateGroupAction *)scheduledUpdateGroupActionsObjectAtIndex:(int)index
{
    return (AutoScalingScheduledUpdateGroupAction *)[scheduledUpdateGroupActions objectAtIndex:index];
}

-(NSString *)description
{
    NSMutableString *buffer = [[NSMutableString alloc] initWithCapacity:256];

    [buffer appendString:@"{"];
    [buffer appendString:[[[NSString alloc] initWithFormat:@"ScheduledUpdateGroupActions: %@,", scheduledUpdateGroupActions] autorelease]];
    [buffer appendString:[[[NSString alloc] initWithFormat:@"NextToken: %@,", nextToken] autorelease]];
    [buffer appendString:[super description]];
    [buffer appendString:@"}"];

    return [buffer autorelease];
}

-(void)dealloc
{
    [scheduledUpdateGroupActions release];
    [nextToken release];

    [super dealloc];
}

@end


text:
import React, { PropTypes } from 'react';
import Component from 'react-pure-render/component';
import IconButton from 'material-ui/IconButton';
import { grey500 } from 'material-ui/styles/colors';

export default class RichEditorButton extends Component {

  static propTypes = {
    onToggle: PropTypes.func,
    active: PropTypes.boolean,
    label: PropTypes.string,
    icon: PropTypes.func.isRequired,
    style: PropTypes.string.isRequired
  };

  constructor(props) {
    super(props);
    this.onToggle = this.onToggle.bind(this);
  }

  onToggle(e) {
    e.preventDefault();
    const { onToggle, style } = this.props;
    onToggle(style);
  }

  render() {
    const { active, label, icon } = this.props;
    const props = {
      color: active ? null : grey500
    };

    return (
      <IconButton
        disableTouchRipple
        onMouseDown={this.onToggle}
        tooltip={label}
      >
        {icon(props)}
      </IconButton>
    );
  }
}


text:
.CommentForm-textarea {
  min-height: 80px;
}


text:
package com.mixpanel.android.mpmetrics;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Point;
import android.os.Build;
import android.util.Log;
import android.view.Display;
import android.view.WindowManager;

import com.mixpanel.android.util.RemoteService;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

import javax.net.ssl.SSLSocketFactory;

/* package */ class DecideChecker {

    /* package */ static class Result {
        public Result() {
            surveys = new ArrayList<Survey>();
            notifications = new ArrayList<InAppNotification>();
            eventBindings = EMPTY_JSON_ARRAY;
            variants = EMPTY_JSON_ARRAY;
        }

        public final List<Survey> surveys;
        public final List<InAppNotification> notifications;
        public JSONArray eventBindings;
        public JSONArray variants;
    }

    public DecideChecker(final Context context, final MPConfig config) {
        mContext = context;
        mConfig = config;
        mChecks = new LinkedList<DecideMessages>();
    }

    public void addDecideCheck(final DecideMessages check) {
        mChecks.add(check);
    }

    public void runDecideChecks(final RemoteService poster) throws RemoteService.ServiceUnavailableException {
        final Iterator<DecideMessages> itr = mChecks.iterator();
        while (itr.hasNext()) {
            final DecideMessages updates = itr.next();
            final String distinctId = updates.getDistinctId();
            try {
                final Result result = runDecideCheck(updates.getToken(), distinctId, poster);
                updates.reportResults(result.surveys, result.notifications, result.eventBindings, result.variants);
            } catch (final UnintelligibleMessageException e) {
                Log.e(LOGTAG, e.getMessage(), e);
            }
        }
    }

    /* package */ static class UnintelligibleMessageException extends Exception {
        private static final long serialVersionUID = -6501269367559104957L;

        public UnintelligibleMessageException(String message, JSONException cause) {
            super(message, cause);
        }
    }

    private Result runDecideCheck(final String token, final String distinctId, final RemoteService poster)
        throws RemoteService.ServiceUnavailableException, UnintelligibleMessageException {
        final String responseString = getDecideResponseFromServer(token, distinctId, poster);
        if (MPConfig.DEBUG) {
            Log.v(LOGTAG, "Mixpanel decide server response was:\n" + responseString);
        }

        Result parsed = new Result();
        if (null != responseString) {
            parsed = parseDecideResponse(responseString);
        }

        final Iterator<InAppNotification> notificationIterator = parsed.notifications.iterator();
        while (notificationIterator.hasNext()) {
            final InAppNotification notification = notificationIterator.next();
            final Bitmap image = getNotificationImage(notification, mContext, poster);
            if (null == image) {
                Log.i(LOGTAG, "Could not retrieve image for notification " + notification.getId() +
                        ", will not show the notification.");
                notificationIterator.remove();
            } else {
                notification.setImage(image);
            }
        }

        return parsed;
    }// runDecideCheck

    /* package */ static Result parseDecideResponse(String responseString)
            throws UnintelligibleMessageException {
        JSONObject response;
        final Result ret = new Result();

        try {
            response = new JSONObject(responseString);
        } catch (final JSONException e) {
            final String message = "Mixpanel endpoint returned unparsable result:\n" + responseString;
            throw new UnintelligibleMessageException(message, e);
        }

        JSONArray surveys = null;
        if (response.has("surveys")) {
            try {
                surveys = response.getJSONArray("surveys");
            } catch (final JSONException e) {
                Log.e(LOGTAG, "Mixpanel endpoint returned non-array JSON for surveys: " + response);
            }
        }

        if (null != surveys) {
            for (int i = 0; i < surveys.length(); i++) {
                try {
                    final JSONObject surveyJson = surveys.getJSONObject(i);
                    final Survey survey = new Survey(surveyJson);
                    ret.surveys.add(survey);
                } catch (final JSONException e) {
                    Log.e(LOGTAG, "Received a strange response from surveys service: " + surveys.toString());
                } catch (final BadDecideObjectException e) {
                    Log.e(LOGTAG, "Received a strange response from surveys service: " + surveys.toString());
                }
            }
        }

        JSONArray notifications = null;
        if (response.has("notifications")) {
            try {
                notifications = response.getJSONArray("notifications");
            } catch (final JSONException e) {
                Log.e(LOGTAG, "Mixpanel endpoint returned non-array JSON for notifications: " + response);
            }
        }

        if (null != notifications) {
            final int notificationsToRead = Math.min(notifications.length(), MPConfig.MAX_NOTIFICATION_CACHE_COUNT);
            for (int i = 0; i < notificationsToRead; i++) {
                try {
                    final JSONObject notificationJson = notifications.getJSONObject(i);
                    final InAppNotification notification = new InAppNotification(notificationJson);
                    ret.notifications.add(notification);
                } catch (final JSONException e) {
                    Log.e(LOGTAG, "Received a strange response from notifications service: " + notifications.toString(), e);
                } catch (final BadDecideObjectException e) {
                    Log.e(LOGTAG, "Received a strange response from notifications service: " + notifications.toString(), e);
                } catch (final OutOfMemoryError e) {
                    Log.e(LOGTAG, "Not enough memory to show load notification from package: " + notifications.toString(), e);
                }
            }
        }

        if (response.has("event_bindings")) {
            try {
                ret.eventBindings = response.getJSONArray("event_bindings");
            } catch (final JSONException e) {
                Log.e(LOGTAG, "Mixpanel endpoint returned non-array JSON for event bindings: " + response);
            }
        }

        if (response.has("variants")) {
            try {
                ret.variants = response.getJSONArray("variants");
            } catch (final JSONException e) {
                Log.e(LOGTAG, "Mixpanel endpoint returned non-array JSON for variants: " + response);
            }
        }

        return ret;
    }

    private String getDecideResponseFromServer(String unescapedToken, String unescapedDistinctId, RemoteService poster)
            throws RemoteService.ServiceUnavailableException {
        final String escapedToken;
        final String escapedId;
        try {
            escapedToken = URLEncoder.encode(unescapedToken, "utf-8");
            if (null != unescapedDistinctId) {
                escapedId = URLEncoder.encode(unescapedDistinctId, "utf-8");
            } else {
                escapedId = null;
            }
        } catch (final UnsupportedEncodingException e) {
            throw new RuntimeException("Mixpanel library requires utf-8 string encoding to be available", e);
        }

        final StringBuilder queryBuilder = new StringBuilder()
                .append("?version=1&lib=android&token=")
                .append(escapedToken);

        if (null != escapedId) {
            queryBuilder.append("&distinct_id=").append(escapedId);
        }

        final String checkQuery = queryBuilder.toString();
        final String[] urls;
        if (mConfig.getDisableFallback()) {
            urls = new String[]{mConfig.getDecideEndpoint() + checkQuery};
        } else {
            urls = new String[]{mConfig.getDecideEndpoint() + checkQuery,
                    mConfig.getDecideFallbackEndpoint() + checkQuery};
        }

        if (MPConfig.DEBUG) {
            Log.v(LOGTAG, "Querying decide server, urls:");
            for (int i = 0; i < urls.length; i++) {
                Log.v(LOGTAG, "    >> " + urls[i]);
            }
        }

        final byte[] response = getUrls(poster, mContext, urls);
        if (null == response) {
            return null;
        }
        try {
            return new String(response, "UTF-8");
        } catch (final UnsupportedEncodingException e) {
            throw new RuntimeException("UTF not supported on this platform?", e);
        }
    }

    private static Bitmap getNotificationImage(InAppNotification notification, Context context, RemoteService poster)
        throws RemoteService.ServiceUnavailableException {
        Bitmap ret = null;
        String[] urls = {notification.getImage2xUrl(), notification.getImageUrl()};

        final WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
        final Display display = wm.getDefaultDisplay();
        final int displayWidth = getDisplayWidth(display);

        if (notification.getType() == InAppNotification.Type.TAKEOVER && displayWidth >= 720) {
            urls = new String[]{notification.getImage4xUrl(), notification.getImage2xUrl(), notification.getImageUrl()};
        }

        final byte[] response = getUrls(poster, context, urls);
        if (null != response) {
            ret = BitmapFactory.decodeByteArray(response, 0, response.length);
        } else {
            Log.i(LOGTAG, "Failed to download images from " + Arrays.toString(urls));
        }

        return ret;
    }

    @SuppressWarnings("deprecation")
    @SuppressLint("NewApi")
    private static int getDisplayWidth(final Display display) {
        if (Build.VERSION.SDK_INT < 13) {
            return display.getWidth();
        } else {
            final Point displaySize = new Point();
            display.getSize(displaySize);
            return displaySize.x;
        }
    }

    private static byte[] getUrls(RemoteService poster, Context context, String[] urls)
        throws RemoteService.ServiceUnavailableException {
        if (! poster.isOnline(context)) {
            return null;
        }

        byte[] response = null;
        for (String url : urls) {
            try {
                final MPConfig config = MPConfig.getInstance(context);
                final SSLSocketFactory socketFactory = config.getSSLSocketFactory();
                response = poster.performRequest(url, null, socketFactory);
                break;
            } catch (final MalformedURLException e) {
                Log.e(LOGTAG, "Cannot interpret " + url + " as a URL.", e);
            } catch (final FileNotFoundException e) {
                if (MPConfig.DEBUG) {
                    Log.v(LOGTAG, "Cannot get " + url + ", file not found.", e);
                }
            } catch (final IOException e) {
                if (MPConfig.DEBUG) {
                    Log.v(LOGTAG, "Cannot get " + url + ".", e);
                }
            } catch (final OutOfMemoryError e) {
                Log.e(LOGTAG, "Out of memory when getting to " + url + ".", e);
                break;
            }
        }

        return response;
    }

    private final MPConfig mConfig;
    private final Context mContext;
    private final List<DecideMessages> mChecks;

    private static final JSONArray EMPTY_JSON_ARRAY = new JSONArray();

    private static final String LOGTAG = "MixpanelAPI.DChecker";
}