text:
<?php

/**
 * This code was generated by
 * \ / _    _  _|   _  _
 * | (_)\/(_)(_|\/| |(/_  v1.0.0
 * /       /
 */

namespace Twilio\Rest\Notify\V1;

use Twilio\Options;
use Twilio\Values;

/**
 * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
 */
abstract class ServiceOptions {
    /**
     * @param string $friendlyName A string to describe the resource
     * @param string $apnCredentialSid The SID of the Credential to use for APN
     *                                 Bindings
     * @param string $gcmCredentialSid The SID of the Credential to use for GCM
     *                                 Bindings
     * @param string $messagingServiceSid The SID of the Messaging Service to use
     *                                    for SMS Bindings
     * @param string $facebookMessengerPageId Deprecated
     * @param string $defaultApnNotificationProtocolVersion The protocol version to
     *                                                      use for sending APNS
     *                                                      notifications
     * @param string $defaultGcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending GCM
     *                                                      notifications
     * @param string $fcmCredentialSid The SID of the Credential to use for FCM
     *                                 Bindings
     * @param string $defaultFcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending FCM
     *                                                      notifications
     * @param bool $logEnabled Whether to log notifications
     * @param string $alexaSkillId Deprecated
     * @param string $defaultAlexaNotificationProtocolVersion Deprecated
     * @return CreateServiceOptions Options builder
     */
    public static function create($friendlyName = Values::NONE, $apnCredentialSid = Values::NONE, $gcmCredentialSid = Values::NONE, $messagingServiceSid = Values::NONE, $facebookMessengerPageId = Values::NONE, $defaultApnNotificationProtocolVersion = Values::NONE, $defaultGcmNotificationProtocolVersion = Values::NONE, $fcmCredentialSid = Values::NONE, $defaultFcmNotificationProtocolVersion = Values::NONE, $logEnabled = Values::NONE, $alexaSkillId = Values::NONE, $defaultAlexaNotificationProtocolVersion = Values::NONE) {
        return new CreateServiceOptions($friendlyName, $apnCredentialSid, $gcmCredentialSid, $messagingServiceSid, $facebookMessengerPageId, $defaultApnNotificationProtocolVersion, $defaultGcmNotificationProtocolVersion, $fcmCredentialSid, $defaultFcmNotificationProtocolVersion, $logEnabled, $alexaSkillId, $defaultAlexaNotificationProtocolVersion);
    }

    /**
     * @param string $friendlyName The string that identifies the Service resources
     *                             to read
     * @return ReadServiceOptions Options builder
     */
    public static function read($friendlyName = Values::NONE) {
        return new ReadServiceOptions($friendlyName);
    }

    /**
     * @param string $friendlyName A string to describe the resource
     * @param string $apnCredentialSid The SID of the Credential to use for APN
     *                                 Bindings
     * @param string $gcmCredentialSid The SID of the Credential to use for GCM
     *                                 Bindings
     * @param string $messagingServiceSid The SID of the Messaging Service to use
     *                                    for SMS Bindings
     * @param string $facebookMessengerPageId Deprecated
     * @param string $defaultApnNotificationProtocolVersion The protocol version to
     *                                                      use for sending APNS
     *                                                      notifications
     * @param string $defaultGcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending GCM
     *                                                      notifications
     * @param string $fcmCredentialSid The SID of the Credential to use for FCM
     *                                 Bindings
     * @param string $defaultFcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending FCM
     *                                                      notifications
     * @param bool $logEnabled Whether to log notifications
     * @param string $alexaSkillId Deprecated
     * @param string $defaultAlexaNotificationProtocolVersion Deprecated
     * @param string $deliveryCallbackUrl Webhook URL
     * @param bool $deliveryCallbackEnabled Enable delivery callbacks
     * @return UpdateServiceOptions Options builder
     */
    public static function update($friendlyName = Values::NONE, $apnCredentialSid = Values::NONE, $gcmCredentialSid = Values::NONE, $messagingServiceSid = Values::NONE, $facebookMessengerPageId = Values::NONE, $defaultApnNotificationProtocolVersion = Values::NONE, $defaultGcmNotificationProtocolVersion = Values::NONE, $fcmCredentialSid = Values::NONE, $defaultFcmNotificationProtocolVersion = Values::NONE, $logEnabled = Values::NONE, $alexaSkillId = Values::NONE, $defaultAlexaNotificationProtocolVersion = Values::NONE, $deliveryCallbackUrl = Values::NONE, $deliveryCallbackEnabled = Values::NONE) {
        return new UpdateServiceOptions($friendlyName, $apnCredentialSid, $gcmCredentialSid, $messagingServiceSid, $facebookMessengerPageId, $defaultApnNotificationProtocolVersion, $defaultGcmNotificationProtocolVersion, $fcmCredentialSid, $defaultFcmNotificationProtocolVersion, $logEnabled, $alexaSkillId, $defaultAlexaNotificationProtocolVersion, $deliveryCallbackUrl, $deliveryCallbackEnabled);
    }
}

class CreateServiceOptions extends Options {
    /**
     * @param string $friendlyName A string to describe the resource
     * @param string $apnCredentialSid The SID of the Credential to use for APN
     *                                 Bindings
     * @param string $gcmCredentialSid The SID of the Credential to use for GCM
     *                                 Bindings
     * @param string $messagingServiceSid The SID of the Messaging Service to use
     *                                    for SMS Bindings
     * @param string $facebookMessengerPageId Deprecated
     * @param string $defaultApnNotificationProtocolVersion The protocol version to
     *                                                      use for sending APNS
     *                                                      notifications
     * @param string $defaultGcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending GCM
     *                                                      notifications
     * @param string $fcmCredentialSid The SID of the Credential to use for FCM
     *                                 Bindings
     * @param string $defaultFcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending FCM
     *                                                      notifications
     * @param bool $logEnabled Whether to log notifications
     * @param string $alexaSkillId Deprecated
     * @param string $defaultAlexaNotificationProtocolVersion Deprecated
     */
    public function __construct($friendlyName = Values::NONE, $apnCredentialSid = Values::NONE, $gcmCredentialSid = Values::NONE, $messagingServiceSid = Values::NONE, $facebookMessengerPageId = Values::NONE, $defaultApnNotificationProtocolVersion = Values::NONE, $defaultGcmNotificationProtocolVersion = Values::NONE, $fcmCredentialSid = Values::NONE, $defaultFcmNotificationProtocolVersion = Values::NONE, $logEnabled = Values::NONE, $alexaSkillId = Values::NONE, $defaultAlexaNotificationProtocolVersion = Values::NONE) {
        $this->options['friendlyName'] = $friendlyName;
        $this->options['apnCredentialSid'] = $apnCredentialSid;
        $this->options['gcmCredentialSid'] = $gcmCredentialSid;
        $this->options['messagingServiceSid'] = $messagingServiceSid;
        $this->options['facebookMessengerPageId'] = $facebookMessengerPageId;
        $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion;
        $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion;
        $this->options['fcmCredentialSid'] = $fcmCredentialSid;
        $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion;
        $this->options['logEnabled'] = $logEnabled;
        $this->options['alexaSkillId'] = $alexaSkillId;
        $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion;
    }

    /**
     * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
     *
     * @param string $friendlyName A string to describe the resource
     * @return $this Fluent Builder
     */
    public function setFriendlyName($friendlyName) {
        $this->options['friendlyName'] = $friendlyName;
        return $this;
    }

    /**
     * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings.
     *
     * @param string $apnCredentialSid The SID of the Credential to use for APN
     *                                 Bindings
     * @return $this Fluent Builder
     */
    public function setApnCredentialSid($apnCredentialSid) {
        $this->options['apnCredentialSid'] = $apnCredentialSid;
        return $this;
    }

    /**
     * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
     *
     * @param string $gcmCredentialSid The SID of the Credential to use for GCM
     *                                 Bindings
     * @return $this Fluent Builder
     */
    public function setGcmCredentialSid($gcmCredentialSid) {
        $this->options['gcmCredentialSid'] = $gcmCredentialSid;
        return $this;
    }

    /**
     * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
     *
     * @param string $messagingServiceSid The SID of the Messaging Service to use
     *                                    for SMS Bindings
     * @return $this Fluent Builder
     */
    public function setMessagingServiceSid($messagingServiceSid) {
        $this->options['messagingServiceSid'] = $messagingServiceSid;
        return $this;
    }

    /**
     * Deprecated.
     *
     * @param string $facebookMessengerPageId Deprecated
     * @return $this Fluent Builder
     */
    public function setFacebookMessengerPageId($facebookMessengerPageId) {
        $this->options['facebookMessengerPageId'] = $facebookMessengerPageId;
        return $this;
    }

    /**
     * The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
     *
     * @param string $defaultApnNotificationProtocolVersion The protocol version to
     *                                                      use for sending APNS
     *                                                      notifications
     * @return $this Fluent Builder
     */
    public function setDefaultApnNotificationProtocolVersion($defaultApnNotificationProtocolVersion) {
        $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion;
        return $this;
    }

    /**
     * The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
     *
     * @param string $defaultGcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending GCM
     *                                                      notifications
     * @return $this Fluent Builder
     */
    public function setDefaultGcmNotificationProtocolVersion($defaultGcmNotificationProtocolVersion) {
        $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion;
        return $this;
    }

    /**
     * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings.
     *
     * @param string $fcmCredentialSid The SID of the Credential to use for FCM
     *                                 Bindings
     * @return $this Fluent Builder
     */
    public function setFcmCredentialSid($fcmCredentialSid) {
        $this->options['fcmCredentialSid'] = $fcmCredentialSid;
        return $this;
    }

    /**
     * The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
     *
     * @param string $defaultFcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending FCM
     *                                                      notifications
     * @return $this Fluent Builder
     */
    public function setDefaultFcmNotificationProtocolVersion($defaultFcmNotificationProtocolVersion) {
        $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion;
        return $this;
    }

    /**
     * Whether to log notifications. Can be: `true` or `false` and the default is `true`.
     *
     * @param bool $logEnabled Whether to log notifications
     * @return $this Fluent Builder
     */
    public function setLogEnabled($logEnabled) {
        $this->options['logEnabled'] = $logEnabled;
        return $this;
    }

    /**
     * Deprecated.
     *
     * @param string $alexaSkillId Deprecated
     * @return $this Fluent Builder
     */
    public function setAlexaSkillId($alexaSkillId) {
        $this->options['alexaSkillId'] = $alexaSkillId;
        return $this;
    }

    /**
     * Deprecated.
     *
     * @param string $defaultAlexaNotificationProtocolVersion Deprecated
     * @return $this Fluent Builder
     */
    public function setDefaultAlexaNotificationProtocolVersion($defaultAlexaNotificationProtocolVersion) {
        $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion;
        return $this;
    }

    /**
     * Provide a friendly representation
     *
     * @return string Machine friendly representation
     */
    public function __toString() {
        $options = array();
        foreach ($this->options as $key => $value) {
            if ($value != Values::NONE) {
                $options[] = "$key=$value";
            }
        }
        return '[Twilio.Notify.V1.CreateServiceOptions ' . \implode(' ', $options) . ']';
    }
}

class ReadServiceOptions extends Options {
    /**
     * @param string $friendlyName The string that identifies the Service resources
     *                             to read
     */
    public function __construct($friendlyName = Values::NONE) {
        $this->options['friendlyName'] = $friendlyName;
    }

    /**
     * The string that identifies the Service resources to read.
     *
     * @param string $friendlyName The string that identifies the Service resources
     *                             to read
     * @return $this Fluent Builder
     */
    public function setFriendlyName($friendlyName) {
        $this->options['friendlyName'] = $friendlyName;
        return $this;
    }

    /**
     * Provide a friendly representation
     *
     * @return string Machine friendly representation
     */
    public function __toString() {
        $options = array();
        foreach ($this->options as $key => $value) {
            if ($value != Values::NONE) {
                $options[] = "$key=$value";
            }
        }
        return '[Twilio.Notify.V1.ReadServiceOptions ' . \implode(' ', $options) . ']';
    }
}

class UpdateServiceOptions extends Options {
    /**
     * @param string $friendlyName A string to describe the resource
     * @param string $apnCredentialSid The SID of the Credential to use for APN
     *                                 Bindings
     * @param string $gcmCredentialSid The SID of the Credential to use for GCM
     *                                 Bindings
     * @param string $messagingServiceSid The SID of the Messaging Service to use
     *                                    for SMS Bindings
     * @param string $facebookMessengerPageId Deprecated
     * @param string $defaultApnNotificationProtocolVersion The protocol version to
     *                                                      use for sending APNS
     *                                                      notifications
     * @param string $defaultGcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending GCM
     *                                                      notifications
     * @param string $fcmCredentialSid The SID of the Credential to use for FCM
     *                                 Bindings
     * @param string $defaultFcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending FCM
     *                                                      notifications
     * @param bool $logEnabled Whether to log notifications
     * @param string $alexaSkillId Deprecated
     * @param string $defaultAlexaNotificationProtocolVersion Deprecated
     * @param string $deliveryCallbackUrl Webhook URL
     * @param bool $deliveryCallbackEnabled Enable delivery callbacks
     */
    public function __construct($friendlyName = Values::NONE, $apnCredentialSid = Values::NONE, $gcmCredentialSid = Values::NONE, $messagingServiceSid = Values::NONE, $facebookMessengerPageId = Values::NONE, $defaultApnNotificationProtocolVersion = Values::NONE, $defaultGcmNotificationProtocolVersion = Values::NONE, $fcmCredentialSid = Values::NONE, $defaultFcmNotificationProtocolVersion = Values::NONE, $logEnabled = Values::NONE, $alexaSkillId = Values::NONE, $defaultAlexaNotificationProtocolVersion = Values::NONE, $deliveryCallbackUrl = Values::NONE, $deliveryCallbackEnabled = Values::NONE) {
        $this->options['friendlyName'] = $friendlyName;
        $this->options['apnCredentialSid'] = $apnCredentialSid;
        $this->options['gcmCredentialSid'] = $gcmCredentialSid;
        $this->options['messagingServiceSid'] = $messagingServiceSid;
        $this->options['facebookMessengerPageId'] = $facebookMessengerPageId;
        $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion;
        $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion;
        $this->options['fcmCredentialSid'] = $fcmCredentialSid;
        $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion;
        $this->options['logEnabled'] = $logEnabled;
        $this->options['alexaSkillId'] = $alexaSkillId;
        $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion;
        $this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl;
        $this->options['deliveryCallbackEnabled'] = $deliveryCallbackEnabled;
    }

    /**
     * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
     *
     * @param string $friendlyName A string to describe the resource
     * @return $this Fluent Builder
     */
    public function setFriendlyName($friendlyName) {
        $this->options['friendlyName'] = $friendlyName;
        return $this;
    }

    /**
     * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings.
     *
     * @param string $apnCredentialSid The SID of the Credential to use for APN
     *                                 Bindings
     * @return $this Fluent Builder
     */
    public function setApnCredentialSid($apnCredentialSid) {
        $this->options['apnCredentialSid'] = $apnCredentialSid;
        return $this;
    }

    /**
     * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
     *
     * @param string $gcmCredentialSid The SID of the Credential to use for GCM
     *                                 Bindings
     * @return $this Fluent Builder
     */
    public function setGcmCredentialSid($gcmCredentialSid) {
        $this->options['gcmCredentialSid'] = $gcmCredentialSid;
        return $this;
    }

    /**
     * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
     *
     * @param string $messagingServiceSid The SID of the Messaging Service to use
     *                                    for SMS Bindings
     * @return $this Fluent Builder
     */
    public function setMessagingServiceSid($messagingServiceSid) {
        $this->options['messagingServiceSid'] = $messagingServiceSid;
        return $this;
    }

    /**
     * Deprecated.
     *
     * @param string $facebookMessengerPageId Deprecated
     * @return $this Fluent Builder
     */
    public function setFacebookMessengerPageId($facebookMessengerPageId) {
        $this->options['facebookMessengerPageId'] = $facebookMessengerPageId;
        return $this;
    }

    /**
     * The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
     *
     * @param string $defaultApnNotificationProtocolVersion The protocol version to
     *                                                      use for sending APNS
     *                                                      notifications
     * @return $this Fluent Builder
     */
    public function setDefaultApnNotificationProtocolVersion($defaultApnNotificationProtocolVersion) {
        $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion;
        return $this;
    }

    /**
     * The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
     *
     * @param string $defaultGcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending GCM
     *                                                      notifications
     * @return $this Fluent Builder
     */
    public function setDefaultGcmNotificationProtocolVersion($defaultGcmNotificationProtocolVersion) {
        $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion;
        return $this;
    }

    /**
     * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings.
     *
     * @param string $fcmCredentialSid The SID of the Credential to use for FCM
     *                                 Bindings
     * @return $this Fluent Builder
     */
    public function setFcmCredentialSid($fcmCredentialSid) {
        $this->options['fcmCredentialSid'] = $fcmCredentialSid;
        return $this;
    }

    /**
     * The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
     *
     * @param string $defaultFcmNotificationProtocolVersion The protocol version to
     *                                                      use for sending FCM
     *                                                      notifications
     * @return $this Fluent Builder
     */
    public function setDefaultFcmNotificationProtocolVersion($defaultFcmNotificationProtocolVersion) {
        $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion;
        return $this;
    }

    /**
     * Whether to log notifications. Can be: `true` or `false` and the default is `true`.
     *
     * @param bool $logEnabled Whether to log notifications
     * @return $this Fluent Builder
     */
    public function setLogEnabled($logEnabled) {
        $this->options['logEnabled'] = $logEnabled;
        return $this;
    }

    /**
     * Deprecated.
     *
     * @param string $alexaSkillId Deprecated
     * @return $this Fluent Builder
     */
    public function setAlexaSkillId($alexaSkillId) {
        $this->options['alexaSkillId'] = $alexaSkillId;
        return $this;
    }

    /**
     * Deprecated.
     *
     * @param string $defaultAlexaNotificationProtocolVersion Deprecated
     * @return $this Fluent Builder
     */
    public function setDefaultAlexaNotificationProtocolVersion($defaultAlexaNotificationProtocolVersion) {
        $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion;
        return $this;
    }

    /**
     * URL to send delivery status callback.
     *
     * @param string $deliveryCallbackUrl Webhook URL
     * @return $this Fluent Builder
     */
    public function setDeliveryCallbackUrl($deliveryCallbackUrl) {
        $this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl;
        return $this;
    }

    /**
     * Callback configuration that enables delivery callbacks, default false
     *
     * @param bool $deliveryCallbackEnabled Enable delivery callbacks
     * @return $this Fluent Builder
     */
    public function setDeliveryCallbackEnabled($deliveryCallbackEnabled) {
        $this->options['deliveryCallbackEnabled'] = $deliveryCallbackEnabled;
        return $this;
    }

    /**
     * Provide a friendly representation
     *
     * @return string Machine friendly representation
     */
    public function __toString() {
        $options = array();
        foreach ($this->options as $key => $value) {
            if ($value != Values::NONE) {
                $options[] = "$key=$value";
            }
        }
        return '[Twilio.Notify.V1.UpdateServiceOptions ' . \implode(' ', $options) . ']';
    }
}


text:
require 'rest_client'

require 'mumukit/core'

require_relative './bridge/version'
require_relative './bridge/runner'
require_relative './bridge/bibliotheca'
require_relative './bridge/thesaurus'

module Mumukit
  module Bridge
  end
end

redpajama_set_name: RedPajamaGithub


text:
=============
Configuration
=============

This content currently under development. For general configuration, see
the `Configuration Reference
<http://docs.openstack.org/kilo/config-reference/content/>`_.

.. toctree::
   :maxdepth: 2

   config_server.rst
   config_ml2_plug_in.rst


text:
namespace ppapi {

PPAPI_SHARED_EXPORT PP_Time TimeToPPTime(base::Time t);
PPAPI_SHARED_EXPORT base::Time PPTimeToTime(PP_Time t);

PPAPI_SHARED_EXPORT PP_TimeTicks TimeTicksToPPTimeTicks(base::TimeTicks t);

// Converts between WebKit event times and time ticks. WebKit event times are
// currently expressed in terms of wall clock time. This function does the
// proper mapping to time ticks, assuming the wall clock time doesn't change
// (which isn't necessarily the case).
PPAPI_SHARED_EXPORT PP_TimeTicks EventTimeToPPTimeTicks(double event_time);
PPAPI_SHARED_EXPORT double PPTimeTicksToEventTime(PP_TimeTicks t);

// Gets the local time zone offset for a given time. This works in the plugin
// process only on Windows (the sandbox prevents this from working properly on
// other platforms).
PPAPI_SHARED_EXPORT double PPGetLocalTimeZoneOffset(const base::Time& time);

}  // namespace ppapi

#endif  // PPAPI_SHARED_IMPL_TIME_CONVERSION_H_


text:
package org.onetwo.common.utils;

import org.onetwo.common.profiling.TimeProfileStack;

public final class JFishPropertyFactory {

	private static String getActualPropertyName(String propName){
		int arrayIndex = propName.indexOf('[');
		if(arrayIndex!=-1){
			return propName.substring(0, arrayIndex);
		}else{
			return propName;
		}
	}

	public static JFishProperty create(Class<?> beanClass, String exp, boolean isfield){
		String pname = "create JFishProperty";
		TimeProfileStack.push(pname);
		JFishProperty jp = null;
		String[] paths = StringUtils.split(exp, ".");
		Class<?> parentBeanClass = beanClass;
		for(String path : paths){
			path = getActualPropertyName(path);
			if(jp==null){
				if(isfield){
					jp = new JFishFieldInfoImpl(parentBeanClass, path);
				}else{
					jp = new JFishPropertyInfoImpl(parentBeanClass, path);
				}
			}else{
				if(jp.isCollectionType()){
					jp = jp.getFirstParameterTypeClassWrapper().getJFishProperty(path, isfield);
				}else{
					jp = jp.getTypeClassWrapper().getJFishProperty(path, isfield);
				}
			}
		}
		TimeProfileStack.pop(pname);
		return jp;
	}

}


text:
/*
 * Ensures something has been found during the request.  Returns 404 if
 * res.template is unset, res.locals is empty and statusCode has not been set
 * to 204.
 *
 * Should be placed at the very end of the middleware pipeline,
 * after all project specific routes but before the error handler & responder.
 *
 * @module midwest/middleware/ensure-found
 */

'use strict'

function isEmpty (obj) {
  for (const prop in obj) {
    if (prop !== 'scripts' && obj[prop] != null) {
      return false
    }
  }

  return true
}
module.exports = function ensureFound (req, res, next) {
  // it seems most reasonable to check if res.locals is empty before res.statusCode
  // because the former is much more common
  if (res.template || res.master || !isEmpty(res.locals) || res.statusCode === 204) {
    next()
  } else {
    // generates Not Found error if there is no page to render and no truthy
    // values in data
    const err = new Error(`Not found: ${req.method.toUpperCase()} ${req.path}`)
    err.status = 404

    next(err)
  }
}


text:
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <!-- this parameter is used at compile time in RegisterListenersPass -->
        <parameter key="event_dispatcher.event_aliases" type="collection">
            <parameter key="Symfony\Component\Console\Event\ConsoleCommandEvent">console.command</parameter>
            <parameter key="Symfony\Component\Console\Event\ConsoleErrorEvent">console.error</parameter>
            <parameter key="Symfony\Component\Console\Event\ConsoleTerminateEvent">console.terminate</parameter>
            <parameter key="Symfony\Component\Form\Event\PreSubmitEvent">form.pre_submit</parameter>
            <parameter key="Symfony\Component\Form\Event\SubmitEvent">form.submit</parameter>
            <parameter key="Symfony\Component\Form\Event\PostSubmitEvent">form.post_submit</parameter>
            <parameter key="Symfony\Component\Form\Event\PreSetDataEvent">form.pre_set_data</parameter>
            <parameter key="Symfony\Component\Form\Event\PostSetDataEvent">form.post_set_data</parameter>
            <parameter key="Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent">kernel.controller_arguments</parameter>
            <parameter key="Symfony\Component\HttpKernel\Event\ControllerEvent">kernel.controller</parameter>
            <parameter key="Symfony\Component\HttpKernel\Event\ResponseEvent">kernel.response</parameter>
            <parameter key="Symfony\Component\HttpKernel\Event\FinishRequestEvent">kernel.finish_request</parameter>
            <parameter key="Symfony\Component\HttpKernel\Event\RequestEvent">kernel.request</parameter>
            <parameter key="Symfony\Component\HttpKernel\Event\ViewEvent">kernel.view</parameter>
            <parameter key="Symfony\Component\HttpKernel\Event\ExceptionEvent">kernel.exception</parameter>
            <parameter key="Symfony\Component\HttpKernel\Event\TerminateEvent">kernel.terminate</parameter>
            <parameter key="Symfony\Component\Workflow\Event\GuardEvent">workflow.guard</parameter>
            <parameter key="Symfony\Component\Workflow\Event\LeaveEvent">workflow.leave</parameter>
            <parameter key="Symfony\Component\Workflow\Event\TransitionEvent">workflow.transition</parameter>
            <parameter key="Symfony\Component\Workflow\Event\EnterEvent">workflow.enter</parameter>
            <parameter key="Symfony\Component\Workflow\Event\EnteredEvent">workflow.entered</parameter>
            <parameter key="Symfony\Component\Workflow\Event\CompletedEvent">workflow.completed</parameter>
            <parameter key="Symfony\Component\Workflow\Event\AnnounceEvent">workflow.announce</parameter>
        </parameter>
    </parameters>
    <services>
        <defaults public="false" />

        <service id="parameter_bag" class="Symfony\Component\DependencyInjection\ParameterBag\ContainerBag">
            <argument type="service" id="service_container" />
        </service>
        <service id="Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface" alias="parameter_bag" />
        <service id="Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface" alias="parameter_bag" />

        <service id="event_dispatcher" class="Symfony\Component\EventDispatcher\EventDispatcher" public="true">
            <tag name="container.hot_path" />
        </service>
        <service id="Symfony\Component\EventDispatcher\EventDispatcherInterface" alias="event_dispatcher" />
        <service id="Symfony\Contracts\EventDispatcher\EventDispatcherInterface" alias="event_dispatcher" />

        <service id="http_kernel" class="Symfony\Component\HttpKernel\HttpKernel" public="true">
            <argument type="service" id="event_dispatcher" />
            <argument type="service" id="controller_resolver" />
            <argument type="service" id="request_stack" />
            <argument type="service" id="argument_resolver" />
            <tag name="container.hot_path" />
        </service>
        <service id="Symfony\Component\HttpKernel\HttpKernelInterface" alias="http_kernel" />

        <service id="request_stack" class="Symfony\Component\HttpFoundation\RequestStack" public="true" />
        <service id="Symfony\Component\HttpFoundation\RequestStack" alias="request_stack" />

        <service id="url_helper" class="Symfony\Component\HttpFoundation\UrlHelper">
            <argument type="service" id="request_stack" />
            <argument type="service" id="router.request_context" on-invalid="ignore" />
        </service>
        <service id="Symfony\Component\HttpFoundation\UrlHelper" alias="url_helper" />

        <service id="cache_warmer" class="Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate" public="true">
            <tag name="container.no_preload" />
            <argument type="tagged_iterator" tag="kernel.cache_warmer" />
            <argument>%kernel.debug%</argument>
            <argument>%kernel.cache_dir%/%kernel.container_class%Deprecations.log</argument>
        </service>

        <service id="cache_clearer" class="Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer" public="true">
            <argument type="tagged_iterator" tag="kernel.cache_clearer" />
        </service>

        <service id="kernel" synthetic="true" public="true" />
        <service id="Symfony\Component\HttpKernel\KernelInterface" alias="kernel" />

        <service id="filesystem" class="Symfony\Component\Filesystem\Filesystem" public="true" />
        <service id="Symfony\Component\Filesystem\Filesystem" alias="filesystem" />

        <service id="file_locator" class="Symfony\Component\HttpKernel\Config\FileLocator">
            <argument type="service" id="kernel" />
        </service>
        <service id="Symfony\Component\HttpKernel\Config\FileLocator" alias="file_locator" />

        <service id="uri_signer" class="Symfony\Component\HttpKernel\UriSigner">
            <argument>%kernel.secret%</argument>
        </service>
        <service id="Symfony\Component\HttpKernel\UriSigner" alias="uri_signer" />

        <service id="config_cache_factory" class="Symfony\Component\Config\ResourceCheckerConfigCacheFactory">
            <argument type="tagged_iterator" tag="config_cache.resource_checker" />
        </service>

        <service id="dependency_injection.config.container_parameters_resource_checker" class="Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker">
            <argument type="service" id="service_container" />
            <tag name="config_cache.resource_checker" priority="-980" />
        </service>

        <service id="config.resource.self_checking_resource_checker" class="Symfony\Component\Config\Resource\SelfCheckingResourceChecker">
            <tag name="config_cache.resource_checker" priority="-990" />
        </service>

        <service id="services_resetter" class="Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter" public="true" />

        <service id="reverse_container" class="Symfony\Component\DependencyInjection\ReverseContainer">
            <argument type="service" id="service_container" />
            <argument type="service_locator" />
        </service>
        <service id="Symfony\Component\DependencyInjection\ReverseContainer" alias="reverse_container" />

        <service id="locale_aware_listener" class="Symfony\Component\HttpKernel\EventListener\LocaleAwareListener">
            <argument type="collection" /> <!-- locale aware services -->
            <argument type="service" id="request_stack" />
            <tag name="kernel.event_subscriber" />
        </service>

        <service id="container.env_var_processor" class="Symfony\Component\DependencyInjection\EnvVarProcessor">
            <tag name="container.env_var_processor" />
            <argument type="service" id="service_container" />
            <argument type="tagged_iterator" tag="container.env_var_loader" />
        </service>

        <service id="slugger" class="Symfony\Component\String\Slugger\AsciiSlugger">
            <argument>%kernel.default_locale%</argument>
            <tag name="kernel.locale_aware" />
        </service>
        <service id="Symfony\Component\String\Slugger\SluggerInterface" alias="slugger" />

        <service id="container.getenv" class="Closure">
            <factory class="Closure" method="fromCallable" />
            <argument type="collection">
                <argument type="service" id="service_container" />
                <argument>getEnv</argument>
            </argument>
            <tag name="routing.expression_language_function" function="env" />
        </service>

        <!-- inherit from this service to lazily access env vars -->
        <service id="container.env" class="Symfony\Component\String\LazyString" abstract="true">
            <factory class="Symfony\Component\String\LazyString" method="fromCallable" />
            <argument type="service" id="container.getenv" />
        </service>
    </services>
</container>


text:
title: Number Rotations
localeTitle: تناوب رقم
---
## المشكلة 168: تناوب رقم

هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/coding-interview-prep/project-euler/problem-168-number-rotations/index.md) .

[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .


text:
using System;
using System.Linq.Expressions;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Routing;

namespace Ploeh.Hyprlinkr
{
    /// <summary>
    /// A class with extension methods for UrlHelper
    /// </summary>
    public static class UrlHelperExtensions
    {
        /// <summary>
        /// Returns URI matching helper's request and expression using RouteLinker's default route dispatcher
        /// </summary>
        /// <typeparam name="T">A class that derives from ApiController</typeparam>
        /// <typeparam name="TResult">Any result type</typeparam>
        /// <param name="helper">Provides the requested URI via helper.Request</param>
        /// <param name="expression">Method call expression of T</param>
        /// <returns>URI for the request and controller expression. </returns>
        public static Uri GetLink<T, TResult>(this UrlHelper helper, Expression<Func<T, TResult>> expression)
            where T : ApiController
        {
            if (helper == null)
                throw new ArgumentNullException("helper");

            var linker = new RouteLinker(helper.Request);

            return linker.GetUri(expression);
        }

        /// <summary>
        /// Returns URI matching helper's request and expression using RouteLinker's default route dispatcher.
        /// </summary>
        /// <typeparam name="T">A class that derives from ApiController</typeparam>
        /// <param name="helper">Provides the requested URI via helper.Request</param>
        /// <param name="expression">Expression of T</param>
        /// <returns>URI for the request and controller expression. </returns>
        public static Uri GetLink<T>(this UrlHelper helper, Expression<Action<T>> expression)
            where T : ApiController
        {
            if (helper == null)
                throw new ArgumentNullException("helper");

            var linker = new RouteLinker(helper.Request);

            return linker.GetUri(expression);
        }

        /// <summary>
        /// Returns URI matching helper's request and expression using provided route dispatcher
        /// </summary>
        /// <typeparam name="T">A class that derives from ApiController</typeparam>
        /// <typeparam name="TResult">Any result type</typeparam>
        /// <param name="helper">Provides the requested URI via helper.Request</param>
        /// <param name="expression">Expression of T</param>
        /// <param name="dispatcher">Custom route dispatcher to use in place of default dispatcher</param>
        /// <returns>URI for the request and controller expression. </returns>
        public static Uri GetLink<T, TResult>(this UrlHelper helper,
                                           Expression<Func<T, TResult>> expression,
                                           IRouteDispatcher dispatcher)
            where T : ApiController
        {
            if (helper == null)
                throw new ArgumentNullException("helper");

            var linker = new RouteLinker(helper.Request, dispatcher);

            return linker.GetUri(expression);
        }

        /// <summary>
        /// Returns URI matching helper's request and expression using provided route dispatcher.
        /// </summary>
        /// <typeparam name="T">A class that derives from ApiController</typeparam>
        /// <param name="helper">Provides the requested URI via helper.Request</param>
        /// <param name="expression">Expression of T</param>
        /// <param name="dispatcher">Custom route dispatcher to use in place of default dispatcher</param>
        /// <returns>URI for the request and controller expression. </returns>
        public static Uri GetLink<T>(this UrlHelper helper,
                                  Expression<Action<T>> expression,
                                  IRouteDispatcher dispatcher)
           where T : ApiController
        {
            if (helper == null)
                throw new ArgumentNullException("helper");

            var linker = new RouteLinker(helper.Request, dispatcher);

            return linker.GetUri(expression);
        }

        /// <summary>
        /// Returns URI matching helper's request and expression using RouteLinker's default route dispatcher
        /// </summary>
        /// <typeparam name="T">A class that derives from ApiController</typeparam>
        /// <typeparam name="TResult">Any result type</typeparam>
        /// <param name="helper">Provides the requested URI via helper.Request</param>
        /// <param name="method">Method call expression of T</param>
        /// <returns>
        /// A <see cref="Task{Uri}" /> instance which represents the resource
        /// identifed by <paramref name="method" />.
        /// </returns>
        public static Task<Uri> GetLinkAsync<T, TResult>(this UrlHelper helper, Expression<Func<T, Task<TResult>>> method)
        {
            if (helper == null)
                throw new ArgumentNullException("helper");

            var linker = new RouteLinker(helper.Request);

            return linker.GetUriAsync(method);
        }
    }
}


text:
<component name="libraryTable">
  <library name="SBT: org.apache.parquet:parquet-format:2.3.0-incubating:jar">
    <CLASSES>
      <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.parquet/parquet-format/jars/parquet-format-2.3.0-incubating.jar!/" />
    </CLASSES>
    <JAVADOC>
      <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.parquet/parquet-format/docs/parquet-format-2.3.0-incubating-javadoc.jar!/" />
    </JAVADOC>
    <SOURCES>
      <root url="jar://$USER_HOME$/.ivy2/cache/org.apache.parquet/parquet-format/srcs/parquet-format-2.3.0-incubating-sources.jar!/" />
    </SOURCES>
  </library>
</component>


text:
<?php defined('BASEPATH') OR exit('No direct script access allowed');

$lang['permissions:group']				= 'Grupo';
$lang['permissions:roles']				= 'Funções';
$lang['permissions:module']                      = 'Module'; #translate
$lang['permissions:edit']				= 'Editar permissões';

$lang['permissions:introduction'] 		= 'Você pode criar permissões personalidadas para usuários diferentes
	atribuindo-lhes a grupos de usuários - Gerenciar usuários. Então você poderá editar as permissões de cada
	grupo e controlar quais módulos e "funções" um grupo pode ter.';

$lang['permissions:message_group_saved_success'] = 'As permissões para este grupo foram salvas.';
$lang['permissions:message_group_saved_error']    = 'Sorry, the permissions for this group could not be saved.'; #translate
$lang['permissions:message_no_group_id_provided'] = 'The group id provided was not valid.'; #translate
$lang['permissions:admin_has_all_permissions'] = 'The Admin group has access to everything'; #translate
$lang['permissions:checkbox_tooltip_action_to_all'] = 'Check to give access permission to all modules for this group.'; #translate
$lang['permissions:checkbox_tooltip_give_access_to_module'] = 'Check to give access permission to the "%s" module for this group.'; #translate


text:
declare const PlainPlayControlsMixin: Mixin<{}, {}>;

export default PlainPlayControlsMixin;


text:
.class Landroid/view/HardwareRenderer$Gl20Renderer$1;
.super Ljava/lang/Object;
.source "HardwareRenderer.java"

# interfaces
.implements Ljava/lang/Runnable;

# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Landroid/view/HardwareRenderer$Gl20Renderer;->destroyLayers(Landroid/view/View;)V
.end annotation

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

# instance fields
.field final synthetic this$0:Landroid/view/HardwareRenderer$Gl20Renderer;

.field final synthetic val$view:Landroid/view/View;

# direct methods
.method constructor <init>(Landroid/view/HardwareRenderer$Gl20Renderer;Landroid/view/View;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 2024
    iput-object p1, p0, Landroid/view/HardwareRenderer$Gl20Renderer$1;->this$0:Landroid/view/HardwareRenderer$Gl20Renderer;

    iput-object p2, p0, Landroid/view/HardwareRenderer$Gl20Renderer$1;->val$view:Landroid/view/View;

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

    return-void
.end method

# virtual methods
.method public run()V
    .locals 1

    .prologue
    .line 2027
    iget-object v0, p0, Landroid/view/HardwareRenderer$Gl20Renderer$1;->this$0:Landroid/view/HardwareRenderer$Gl20Renderer;

    iget-object v0, v0, Landroid/view/HardwareRenderer$GlRenderer;->mCanvas:Landroid/view/HardwareCanvas;

    if-eqz v0, :cond_0

    .line 2028
    iget-object v0, p0, Landroid/view/HardwareRenderer$Gl20Renderer$1;->this$0:Landroid/view/HardwareRenderer$Gl20Renderer;

    iget-object v0, v0, Landroid/view/HardwareRenderer$GlRenderer;->mCanvas:Landroid/view/HardwareCanvas;

    invoke-virtual {v0}, Landroid/view/HardwareCanvas;->clearLayerUpdates()V

    .line 2030
    :cond_0
    iget-object v0, p0, Landroid/view/HardwareRenderer$Gl20Renderer$1;->val$view:Landroid/view/View;

    #calls: Landroid/view/HardwareRenderer$Gl20Renderer;->destroyHardwareLayer(Landroid/view/View;)V
    invoke-static {v0}, Landroid/view/HardwareRenderer$Gl20Renderer;->access$700(Landroid/view/View;)V

    .line 2031
    const/4 v0, 0x0

    invoke-static {v0}, Landroid/view/GLES20Canvas;->flushCaches(I)V

    .line 2032
    return-void
.end method


text:
package org.wso2.carbon.identity.agent.userstore.security;

import org.wso2.securevault.secret.AbstractSecretCallbackHandler;
import org.wso2.securevault.secret.SecretManager;
import org.wso2.securevault.secret.SingleSecretCallback;

/*
 * SecretManager based secret provider , this can be used by other application
 * to get secret form  SecretManager
 */
class SecretManagerSecretCallbackHandler extends AbstractSecretCallbackHandler {

    private final SecretManager secretManager;

    /**
     * @param secretManager Secret org.wso2.carbon.identity.agent.outbound.manager which the callbacks are being
     * handled of.
     */
    SecretManagerSecretCallbackHandler(SecretManager secretManager) {
        this.secretManager = secretManager;
    }

    /**
     * {@inheritDoc}
     */
    protected void handleSingleSecretCallback(SingleSecretCallback singleSecretCallback) {

        if (!secretManager.isInitialized()) {
            if (log.isDebugEnabled()) {
                log.debug("SecretManager has not been initialized.Cannot collect secrets");
            }
            return;
        }

        String id = singleSecretCallback.getId();
        if (id != null && !"".equals(id)) {
            singleSecretCallback.setSecret(secretManager.getSecret(id));
        }
    }
}


text:
"""
Support for sending data to Logentries webhook endpoint.

For more details about this component, please refer to the documentation at
https://home-assistant.io/components/logentries/
"""
import json
import logging
import requests
import blumate.util as util
from blumate.const import EVENT_STATE_CHANGED
from blumate.helpers import state as state_helper
from blumate.helpers import validate_config

_LOGGER = logging.getLogger(__name__)

DOMAIN = "logentries"
DEPENDENCIES = []

DEFAULT_HOST = 'https://webhook.logentries.com/noformat/logs/'

CONF_TOKEN = 'token'

def setup(hass, config):
    """Setup the Logentries component."""
    if not validate_config(config, {DOMAIN: ['token']}, _LOGGER):
        _LOGGER.error("Logentries token not present")
        return False
    conf = config[DOMAIN]
    token = util.convert(conf.get(CONF_TOKEN), str)
    le_wh = DEFAULT_HOST + token

    def logentries_event_listener(event):
        """Listen for new messages on the bus and sends them to Logentries."""
        state = event.data.get('new_state')
        if state is None:
            return
        try:
            _state = state_helper.state_as_number(state)
        except ValueError:
            _state = state.state
        json_body = [
            {
                'domain': state.domain,
                'entity_id': state.object_id,
                'attributes': dict(state.attributes),
                'time': str(event.time_fired),
                'value': _state,
            }
        ]
        try:
            payload = {"host": le_wh,
                       "event": json_body}
            requests.post(le_wh, data=json.dumps(payload), timeout=10)
        except requests.exceptions.RequestException as error:
            _LOGGER.exception('Error sending to Logentries: %s', error)

    hass.bus.listen(EVENT_STATE_CHANGED, logentries_event_listener)

    return True


text:
<?php

/**
 * @package EduSec.modules.student.model
 */

namespace app\modules\student\models;

use Yii;
use app\models\User;
/**
 * This is the model class for table "stu_category".
 *
 * @property integer $stu_category_id
 * @property string $stu_category_name
 * @property string $created_at
 * @property integer $created_by
 * @property string $updated_at
 * @property integer $updated_by
 * @property integer $is_status
 *
 * @property StuAdmissionMaster[] $stuAdmissionMasters
 * @property Users $createdBy
 * @property Users $updatedBy
 * @property StuMaster[] $stuMasters
 */
class StuCategory extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'stu_category';
    }

    public static function find()
    {
	return parent::find()->andWhere(['<>', 'is_status', 2]);
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['stu_category_name', 'created_at', 'created_by'], 'required', 'message' => ''],
            [['created_at', 'updated_at'], 'safe'],
            [['created_by', 'updated_by', 'is_status'], 'integer'],
            [['stu_category_name'], 'string', 'max' => 50],
	    [['stu_category_name'], 'unique']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'stu_category_id' => 'Stu Category ID',
            'stu_category_name' => 'Category',
            'created_at' => 'Created At',
            'created_by' => 'Created By',
            'updated_at' => 'Updated At',
            'updated_by' => 'Updated By',
            'is_status' => 'Is Status',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getStuAdmissionMasters()
    {
        return $this->hasMany(StuAdmissionMaster::className(), ['stu_master_category' => 'stu_category_id']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getCreatedBy()
    {
        return $this->hasOne(User::className(), ['user_id' => 'created_by']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getUpdatedBy()
    {
        return $this->hasOne(User::className(), ['user_id' => 'updated_by']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getStuMasters()
    {
        return $this->hasMany(StuMaster::className(), ['stu_master_category_id' => 'stu_category_id']);
    }
}


text:
pestimate
=========

personal estimate


text: bundle exec sass --update --sourcemap=none .


text:
import React  from 'react'
import Select from 'react-select'

function DeterminerdSelect(props:Object) {
    return <Select options={props.options} value={props.value} placeholder="Select a noun..." onChange={(e)=>{props.onChange(e.value)}}/>
}

export default DeterminerdSelect


text:
require 'rails_helper'
describe 'subscriptions' do
  let(:position) { create :position }
  context 'subscribing to positions' do
    before :each do
      when_current_user_is :staff
      visit edit_position_path(position)
    end
    it 'displays the email address when subscribe is clicked' do
      fill_in 'Email', with: 'jobapps@transit.com'
      click_button 'Subscribe'
      expect(page).to have_text 'jobapps@transit.com'
    end
  end
  context 'displaying existing subscriptions' do
    let(:user1) { create :user, :staff }
    let(:user2) { create :user, :staff }
    let(:subscription) do
      create :subscription, user: user1, position: position
    end
    let(:other_position) { create :position }
    before :each do
      when_current_user_is user2
      visit edit_position_path(position)
    end
    it 'does not display subscription belonging to another user' do
      expect(page).not_to have_text subscription.email
    end
    it 'only displays emails that have been subscribed to this position' do
      visit edit_position_path(other_position)
      expect(page).not_to have_text subscription.email
    end
  end
  context 'deleting a subscription' do
    let(:user) { create :user, :staff }
    let! :subscription do
      create :subscription, user: user, position: position
    end
    before :each do
      when_current_user_is user
      visit edit_position_path(position)
    end
    it 'removes the email from the page when remove is clicked' do
      form = within('.subscriptions') { find('form.button_to') }
      within(form) { find('button').click }
      expect(page).not_to have_text subscription.email
    end
  end
end


text:
namespace gvisor {
namespace testing {

namespace {

// Amount of time we wait for threads doing futex_wait to start running before
// doing futex_wake.
constexpr auto kWaiterStartupDelay = absl::Seconds(3);

// Default timeout for waiters in tests where we expect a futex_wake to be
// ineffective.
constexpr auto kIneffectiveWakeTimeout = absl::Seconds(6);

static_assert(kWaiterStartupDelay < kIneffectiveWakeTimeout,
              "futex_wait will time out before futex_wake is called");

int futex_wait(bool priv, std::atomic<int>* uaddr, int val,
               absl::Duration timeout = absl::InfiniteDuration()) {
  int op = FUTEX_WAIT;
  if (priv) {
    op |= FUTEX_PRIVATE_FLAG;
  }

  if (timeout == absl::InfiniteDuration()) {
    return RetryEINTR(syscall)(SYS_futex, uaddr, op, val, nullptr);
  }

  // FUTEX_WAIT doesn't adjust the timeout if it returns EINTR, so we have to do
  // so.
  while (true) {
    auto const timeout_ts = absl::ToTimespec(timeout);
    MonotonicTimer timer;
    timer.Start();
    int const ret = syscall(SYS_futex, uaddr, op, val, &timeout_ts);
    if (ret != -1 || errno != EINTR) {
      return ret;
    }
    timeout = std::max(timeout - timer.Duration(), absl::ZeroDuration());
  }
}

int futex_wait_bitset(bool priv, std::atomic<int>* uaddr, int val, int bitset,
                      absl::Time deadline = absl::InfiniteFuture()) {
  int op = FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME;
  if (priv) {
    op |= FUTEX_PRIVATE_FLAG;
  }

  auto const deadline_ts = absl::ToTimespec(deadline);
  return RetryEINTR(syscall)(
      SYS_futex, uaddr, op, val,
      deadline == absl::InfiniteFuture() ? nullptr : &deadline_ts, nullptr,
      bitset);
}

int futex_wake(bool priv, std::atomic<int>* uaddr, int count) {
  int op = FUTEX_WAKE;
  if (priv) {
    op |= FUTEX_PRIVATE_FLAG;
  }
  return syscall(SYS_futex, uaddr, op, count);
}

int futex_wake_bitset(bool priv, std::atomic<int>* uaddr, int count,
                      int bitset) {
  int op = FUTEX_WAKE_BITSET;
  if (priv) {
    op |= FUTEX_PRIVATE_FLAG;
  }
  return syscall(SYS_futex, uaddr, op, count, nullptr, nullptr, bitset);
}

int futex_wake_op(bool priv, std::atomic<int>* uaddr1, std::atomic<int>* uaddr2,
                  int nwake1, int nwake2, uint32_t sub_op) {
  int op = FUTEX_WAKE_OP;
  if (priv) {
    op |= FUTEX_PRIVATE_FLAG;
  }
  return syscall(SYS_futex, uaddr1, op, nwake1, nwake2, uaddr2, sub_op);
}

int futex_lock_pi(bool priv, std::atomic<int>* uaddr) {
  int op = FUTEX_LOCK_PI;
  if (priv) {
    op |= FUTEX_PRIVATE_FLAG;
  }
  int zero = 0;
  if (uaddr->compare_exchange_strong(zero, gettid())) {
    return 0;
  }
  return RetryEINTR(syscall)(SYS_futex, uaddr, op, nullptr, nullptr);
}

int futex_trylock_pi(bool priv, std::atomic<int>* uaddr) {
  int op = FUTEX_TRYLOCK_PI;
  if (priv) {
    op |= FUTEX_PRIVATE_FLAG;
  }
  int zero = 0;
  if (uaddr->compare_exchange_strong(zero, gettid())) {
    return 0;
  }
  return RetryEINTR(syscall)(SYS_futex, uaddr, op, nullptr, nullptr);
}

int futex_unlock_pi(bool priv, std::atomic<int>* uaddr) {
  int op = FUTEX_UNLOCK_PI;
  if (priv) {
    op |= FUTEX_PRIVATE_FLAG;
  }
  int tid = gettid();
  if (uaddr->compare_exchange_strong(tid, 0)) {
    return 0;
  }
  return RetryEINTR(syscall)(SYS_futex, uaddr, op, nullptr, nullptr);
}

// Fixture for futex tests parameterized by whether to use private or shared
// futexes.
class PrivateAndSharedFutexTest : public ::testing::TestWithParam<bool> {
 protected:
  bool IsPrivate() const { return GetParam(); }
  int PrivateFlag() const { return IsPrivate() ? FUTEX_PRIVATE_FLAG : 0; }
};

// FUTEX_WAIT with 0 timeout does not block.
TEST_P(PrivateAndSharedFutexTest, Wait_ZeroTimeout) {
  struct timespec timeout = {};

  // Don't use the futex_wait helper because it adjusts timeout.
  int a = 1;
  EXPECT_THAT(syscall(SYS_futex, &a, FUTEX_WAIT | PrivateFlag(), a, &timeout),
              SyscallFailsWithErrno(ETIMEDOUT));
}

TEST_P(PrivateAndSharedFutexTest, Wait_Timeout) {
  std::atomic<int> a = ATOMIC_VAR_INIT(1);

  MonotonicTimer timer;
  timer.Start();
  constexpr absl::Duration kTimeout = absl::Seconds(1);
  EXPECT_THAT(futex_wait(IsPrivate(), &a, a, kTimeout),
              SyscallFailsWithErrno(ETIMEDOUT));
  EXPECT_GE(timer.Duration(), kTimeout);
}

TEST_P(PrivateAndSharedFutexTest, Wait_BitsetTimeout) {
  std::atomic<int> a = ATOMIC_VAR_INIT(1);

  MonotonicTimer timer;
  timer.Start();
  constexpr absl::Duration kTimeout = absl::Seconds(1);
  EXPECT_THAT(
      futex_wait_bitset(IsPrivate(), &a, a, 0xffffffff, absl::Now() + kTimeout),
      SyscallFailsWithErrno(ETIMEDOUT));
  EXPECT_GE(timer.Duration(), kTimeout);
}

TEST_P(PrivateAndSharedFutexTest, WaitBitset_NegativeTimeout) {
  std::atomic<int> a = ATOMIC_VAR_INIT(1);

  MonotonicTimer timer;
  timer.Start();
  EXPECT_THAT(futex_wait_bitset(IsPrivate(), &a, a, 0xffffffff,
                                absl::Now() - absl::Seconds(1)),
              SyscallFailsWithErrno(ETIMEDOUT));
}

TEST_P(PrivateAndSharedFutexTest, Wait_WrongVal) {
  std::atomic<int> a = ATOMIC_VAR_INIT(1);
  EXPECT_THAT(futex_wait(IsPrivate(), &a, a + 1),
              SyscallFailsWithErrno(EAGAIN));
}

TEST_P(PrivateAndSharedFutexTest, Wait_ZeroBitset) {
  std::atomic<int> a = ATOMIC_VAR_INIT(1);
  EXPECT_THAT(futex_wait_bitset(IsPrivate(), &a, a, 0),
              SyscallFailsWithErrno(EINVAL));
}

TEST_P(PrivateAndSharedFutexTest, Wake1) {
  constexpr int kInitialValue = 1;
  std::atomic<int> a = ATOMIC_VAR_INIT(kInitialValue);

  // Prevent save/restore from interrupting futex_wait, which will cause it to
  // return EAGAIN instead of the expected result if futex_wait is restarted
  // after we change the value of a below.
  DisableSave ds;
  ScopedThread thread([&] {
    EXPECT_THAT(futex_wait(IsPrivate(), &a, kInitialValue),
                SyscallSucceedsWithValue(0));
  });
  absl::SleepFor(kWaiterStartupDelay);

  // Change a so that if futex_wake happens before futex_wait, the latter
  // returns EAGAIN instead of hanging the test.
  a.fetch_add(1);
  EXPECT_THAT(futex_wake(IsPrivate(), &a, 1), SyscallSucceedsWithValue(1));
}

TEST_P(PrivateAndSharedFutexTest, Wake0) {
  constexpr int kInitialValue = 1;
  std::atomic<int> a = ATOMIC_VAR_INIT(kInitialValue);

  // Prevent save/restore from interrupting futex_wait, which will cause it to
  // return EAGAIN instead of the expected result if futex_wait is restarted
  // after we change the value of a below.
  DisableSave ds;
  ScopedThread thread([&] {
    EXPECT_THAT(futex_wait(IsPrivate(), &a, kInitialValue),
                SyscallSucceedsWithValue(0));
  });
  absl::SleepFor(kWaiterStartupDelay);

  // Change a so that if futex_wake happens before futex_wait, the latter
  // returns EAGAIN instead of hanging the test.
  a.fetch_add(1);
  // The Linux kernel wakes one waiter even if val is 0 or negative.
  EXPECT_THAT(futex_wake(IsPrivate(), &a, 0), SyscallSucceedsWithValue(1));
}

TEST_P(PrivateAndSharedFutexTest, WakeAll) {
  constexpr int kInitialValue = 1;
  std::atomic<int> a = ATOMIC_VAR_INIT(kInitialValue);

  DisableSave ds;
  constexpr int kThreads = 5;
  std::vector<std::unique_ptr<ScopedThread>> threads;
  threads.reserve(kThreads);
  for (int i = 0; i < kThreads; i++) {
    threads.push_back(std::make_unique<ScopedThread>([&] {
      EXPECT_THAT(futex_wait(IsPrivate(), &a, kInitialValue),
                  SyscallSucceeds());
    }));
  }
  absl::SleepFor(kWaiterStartupDelay);

  a.fetch_add(1);
  EXPECT_THAT(futex_wake(IsPrivate(), &a, kThreads),
              SyscallSucceedsWithValue(kThreads));
}

TEST_P(PrivateAndSharedFutexTest, WakeSome) {
  constexpr int kInitialValue = 1;
  std::atomic<int> a = ATOMIC_VAR_INIT(kInitialValue);

  DisableSave ds;
  constexpr int kThreads = 5;
  constexpr int kWokenThreads = 3;
  static_assert(kWokenThreads < kThreads,
                "can't wake more threads than are created");
  std::vector<std::unique_ptr<ScopedThread>> threads;
  threads.reserve(kThreads);
  std::vector<int> rets;
  rets.reserve(kThreads);
  std::vector<int> errs;
  errs.reserve(kThreads);
  for (int i = 0; i < kThreads; i++) {
    rets.push_back(-1);
    errs.push_back(0);
  }
  for (int i = 0; i < kThreads; i++) {
    threads.push_back(std::make_unique<ScopedThread>([&, i] {
      rets[i] =
          futex_wait(IsPrivate(), &a, kInitialValue, kIneffectiveWakeTimeout);
      errs[i] = errno;
    }));
  }
  absl::SleepFor(kWaiterStartupDelay);

  a.fetch_add(1);
  EXPECT_THAT(futex_wake(IsPrivate(), &a, kWokenThreads),
              SyscallSucceedsWithValue(kWokenThreads));

  int woken = 0;
  int timedout = 0;
  for (int i = 0; i < kThreads; i++) {
    threads[i]->Join();
    if (rets[i] == 0) {
      woken++;
    } else if (errs[i] == ETIMEDOUT) {
      timedout++;
    } else {
      ADD_FAILURE() << " thread " << i << ": returned " << rets[i] << ", errno "
                    << errs[i];
    }
  }
  EXPECT_EQ(woken, kWokenThreads);
  EXPECT_EQ(timedout, kThreads - kWokenThreads);
}

TEST_P(PrivateAndSharedFutexTest, WaitBitset_Wake) {
  constexpr int kInitialValue = 1;
  std::atomic<int> a = ATOMIC_VAR_INIT(kInitialValue);

  DisableSave ds;
  ScopedThread thread([&] {
    EXPECT_THAT(futex_wait_bitset(IsPrivate(), &a, kInitialValue, 0b01001000),
                SyscallSucceeds());
  });
  absl::SleepFor(kWaiterStartupDelay);

  a.fetch_add(1);
  EXPECT_THAT(futex_wake(IsPrivate(), &a, 1), SyscallSucceedsWithValue(1));
}

TEST_P(PrivateAndSharedFutexTest, Wait_WakeBitset) {
  constexpr int kInitialValue = 1;
  std::atomic<int> a = ATOMIC_VAR_INIT(kInitialValue);

  DisableSave ds;
  ScopedThread thread([&] {
    EXPECT_THAT(futex_wait(IsPrivate(), &a, kInitialValue), SyscallSucceeds());
  });
  absl::SleepFor(kWaiterStartupDelay);

  a.fetch_add(1);
  EXPECT_THAT(futex_wake_bitset(IsPrivate(), &a, 1, 0b01001000),
              SyscallSucceedsWithValue(1));
}

TEST_P(PrivateAndSharedFutexTest, WaitBitset_WakeBitsetMatch) {
  constexpr int kInitialValue = 1;
  std::atomic<int> a = ATOMIC_VAR_INIT(kInitialValue);

  constexpr int kBitset = 0b01001000;

  DisableSave ds;
  ScopedThread thread([&] {
    EXPECT_THAT(futex_wait_bitset(IsPrivate(), &a, kInitialValue, kBitset),
                SyscallSucceeds());
  });
  absl::SleepFor(kWaiterStartupDelay);

  a.fetch_add(1);
  EXPECT_THAT(futex_wake_bitset(IsPrivate(), &a, 1, kBitset),
              SyscallSucceedsWithValue(1));
}

TEST_P(PrivateAndSharedFutexTest, WaitBitset_WakeBitsetNoMatch) {
  constexpr int kInitialValue = 1;
  std::atomic<int> a = ATOMIC_VAR_INIT(kInitialValue);

  constexpr int kWaitBitset = 0b01000001;
  constexpr int kWakeBitset = 0b00101000;
  static_assert((kWaitBitset & kWakeBitset) == 0,
                "futex_wake_bitset will wake waiter");

  DisableSave ds;
  ScopedThread thread([&] {
    EXPECT_THAT(futex_wait_bitset(IsPrivate(), &a, kInitialValue, kWaitBitset,
                                  absl::Now() + kIneffectiveWakeTimeout),
                SyscallFailsWithErrno(ETIMEDOUT));
  });
  absl::SleepFor(kWaiterStartupDelay);

  a.fetch_add(1);
  EXPECT_THAT(futex_wake_bitset(IsPrivate(), &a, 1, kWakeBitset),
              SyscallSucceedsWithValue(0));
}

TEST_P(PrivateAndSharedFutexTest, WakeOpCondSuccess) {
  constexpr int kInitialValue = 1;
  std::atomic<int> a = ATOMIC_VAR_INIT(kInitialValue);
  std::atomic<int> b = ATOMIC_VAR_INIT(kInitialValue);

  DisableSave ds;
  ScopedThread thread_a([&] {
    EXPECT_THAT(futex_wait(IsPrivate(), &a, kInitialValue), SyscallSucceeds());
  });
  ScopedThread thread_b([&] {
    EXPECT_THAT(futex_wait(IsPrivate(), &b, kInitialValue), SyscallSucceeds());
  });
  absl::SleepFor(kWaiterStartupDelay);

  a.fetch_add(1);
  b.fetch_add(1);
  // This futex_wake_op should:
  // - Wake 1 waiter on a unconditionally.
  // - Wake 1 waiter on b if b == kInitialValue + 1, which it is.
  // - Do "b += 1".
  EXPECT_THAT(futex_wake_op(IsPrivate(), &a, &b, 1, 1,
                            FUTEX_OP(FUTEX_OP_ADD, 1, FUTEX_OP_CMP_EQ,
                                     (kInitialValue + 1))),
              SyscallSucceedsWithValue(2));
  EXPECT_EQ(b, kInitialValue + 2);
}

TEST_P(PrivateAndSharedFutexTest, WakeOpCondFailure) {
  constexpr int kInitialValue = 1;
  std::atomic<int> a = ATOMIC_VAR_INIT(kInitialValue);
  std::atomic<int> b = ATOMIC_VAR_INIT(kInitialValue);

  DisableSave ds;
  ScopedThread thread_a([&] {
    EXPECT_THAT(futex_wait(IsPrivate(), &a, kInitialValue), SyscallSucceeds());
  });
  ScopedThread thread_b([&] {
    EXPECT_THAT(
        futex_wait(IsPrivate(), &b, kInitialValue, kIneffectiveWakeTimeout),
        SyscallFailsWithErrno(ETIMEDOUT));
  });
  absl::SleepFor(kWaiterStartupDelay);

  a.fetch_add(1);
  b.fetch_add(1);
  // This futex_wake_op should:
  // - Wake 1 waiter on a unconditionally.
  // - Wake 1 waiter on b if b == kInitialValue - 1, which it isn't.
  // - Do "b += 1".
  EXPECT_THAT(futex_wake_op(IsPrivate(), &a, &b, 1, 1,
                            FUTEX_OP(FUTEX_OP_ADD, 1, FUTEX_OP_CMP_EQ,
                                     (kInitialValue - 1))),
              SyscallSucceedsWithValue(1));
  EXPECT_EQ(b, kInitialValue + 2);
}

TEST_P(PrivateAndSharedFutexTest, NoWakeInterprocessPrivateAnon) {
  auto const mapping = ASSERT_NO_ERRNO_AND_VALUE(
      MmapAnon(kPageSize, PROT_READ | PROT_WRITE, MAP_PRIVATE));
  auto const ptr = static_cast<std::atomic<int>*>(mapping.ptr());
  constexpr int kInitialValue = 1;
  ptr->store(kInitialValue);

  DisableSave ds;
  pid_t const child_pid = fork();
  if (child_pid == 0) {
    TEST_PCHECK(futex_wait(IsPrivate(), ptr, kInitialValue,
                           kIneffectiveWakeTimeout) == -1 &&
                errno == ETIMEDOUT);
    _exit(0);
  }
  ASSERT_THAT(child_pid, SyscallSucceeds());
  absl::SleepFor(kWaiterStartupDelay);

  EXPECT_THAT(futex_wake(IsPrivate(), ptr, 1), SyscallSucceedsWithValue(0));

  int status;
  ASSERT_THAT(RetryEINTR(waitpid)(child_pid, &status, 0),
              SyscallSucceedsWithValue(child_pid));
  EXPECT_TRUE(WIFEXITED(status) && WEXITSTATUS(status) == 0)
      << " status " << status;
}

TEST_P(PrivateAndSharedFutexTest, WakeAfterCOWBreak) {
  // Use a futex on a non-stack mapping so we can be sure that the child process
  // below isn't the one that breaks copy-on-write.
  auto const mapping = ASSERT_NO_ERRNO_AND_VALUE(
      MmapAnon(kPageSize, PROT_READ | PROT_WRITE, MAP_PRIVATE));
  auto const ptr = static_cast<std::atomic<int>*>(mapping.ptr());
  constexpr int kInitialValue = 1;
  ptr->store(kInitialValue);

  DisableSave ds;
  ScopedThread thread([&] {
    EXPECT_THAT(futex_wait(IsPrivate(), ptr, kInitialValue), SyscallSucceeds());
  });
  absl::SleepFor(kWaiterStartupDelay);

  pid_t const child_pid = fork();
  if (child_pid == 0) {
    // Wait to be killed by the parent.
    while (true) pause();
  }
  ASSERT_THAT(child_pid, SyscallSucceeds());
  auto cleanup_child = Cleanup([&] {
    EXPECT_THAT(kill(child_pid, SIGKILL), SyscallSucceeds());
    int status;
    ASSERT_THAT(RetryEINTR(waitpid)(child_pid, &status, 0),
                SyscallSucceedsWithValue(child_pid));
    EXPECT_TRUE(WIFSIGNALED(status) && WTERMSIG(status) == SIGKILL)
        << " status " << status;
  });

  // In addition to preventing a late futex_wait from sleeping, this breaks
  // copy-on-write on the mapped page.
  ptr->fetch_add(1);
  EXPECT_THAT(futex_wake(IsPrivate(), ptr, 1), SyscallSucceedsWithValue(1));
}

TEST_P(PrivateAndSharedFutexTest, WakeWrongKind) {
  constexpr int kInitialValue = 1;
  std::atomic<int> a = ATOMIC_VAR_INIT(kInitialValue);

  DisableSave ds;
  ScopedThread thread([&] {
    EXPECT_THAT(
        futex_wait(IsPrivate(), &a, kInitialValue, kIneffectiveWakeTimeout),
        SyscallFailsWithErrno(ETIMEDOUT));
  });
  absl::SleepFor(kWaiterStartupDelay);

  a.fetch_add(1);
  // The value of priv passed to futex_wake is the opposite of that passed to
  // the futex_waiter; we expect this not to wake the waiter.
  EXPECT_THAT(futex_wake(!IsPrivate(), &a, 1), SyscallSucceedsWithValue(0));
}

INSTANTIATE_TEST_SUITE_P(SharedPrivate, PrivateAndSharedFutexTest,
                         ::testing::Bool());

// Passing null as the address only works for private futexes.

TEST(PrivateFutexTest, WakeOp0Set) {
  std::atomic<int> a = ATOMIC_VAR_INIT(1);

  int futex_op = FUTEX_OP(FUTEX_OP_SET, 2, 0, 0);
  EXPECT_THAT(futex_wake_op(true, nullptr, &a, 0, 0, futex_op),
              SyscallSucceedsWithValue(0));
  EXPECT_EQ(a, 2);
}

TEST(PrivateFutexTest, WakeOp0Add) {
  std::atomic<int> a = ATOMIC_VAR_INIT(1);
  int futex_op = FUTEX_OP(FUTEX_OP_ADD, 1, 0, 0);
  EXPECT_THAT(futex_wake_op(true, nullptr, &a, 0, 0, futex_op),
              SyscallSucceedsWithValue(0));
  EXPECT_EQ(a, 2);
}

TEST(PrivateFutexTest, WakeOp0Or) {
  std::atomic<int> a = ATOMIC_VAR_INIT(0b01);
  int futex_op = FUTEX_OP(FUTEX_OP_OR, 0b10, 0, 0);
  EXPECT_THAT(futex_wake_op(true, nullptr, &a, 0, 0, futex_op),
              SyscallSucceedsWithValue(0));
  EXPECT_EQ(a, 0b11);
}

TEST(PrivateFutexTest, WakeOp0Andn) {
  std::atomic<int> a = ATOMIC_VAR_INIT(0b11);
  int futex_op = FUTEX_OP(FUTEX_OP_ANDN, 0b10, 0, 0);
  EXPECT_THAT(futex_wake_op(true, nullptr, &a, 0, 0, futex_op),
              SyscallSucceedsWithValue(0));
  EXPECT_EQ(a, 0b01);
}

TEST(PrivateFutexTest, WakeOp0Xor) {
  std::atomic<int> a = ATOMIC_VAR_INIT(0b1010);
  int futex_op = FUTEX_OP(FUTEX_OP_XOR, 0b1100, 0, 0);
  EXPECT_THAT(futex_wake_op(true, nullptr, &a, 0, 0, futex_op),
              SyscallSucceedsWithValue(0));
  EXPECT_EQ(a, 0b0110);
}

TEST(SharedFutexTest, WakeInterprocessSharedAnon) {
  auto const mapping = ASSERT_NO_ERRNO_AND_VALUE(
      MmapAnon(kPageSize, PROT_READ | PROT_WRITE, MAP_SHARED));
  auto const ptr = static_cast<std::atomic<int>*>(mapping.ptr());
  constexpr int kInitialValue = 1;
  ptr->store(kInitialValue);

  DisableSave ds;
  pid_t const child_pid = fork();
  if (child_pid == 0) {
    TEST_PCHECK(futex_wait(false, ptr, kInitialValue) == 0);
    _exit(0);
  }
  ASSERT_THAT(child_pid, SyscallSucceeds());
  auto kill_child = Cleanup(
      [&] { EXPECT_THAT(kill(child_pid, SIGKILL), SyscallSucceeds()); });
  absl::SleepFor(kWaiterStartupDelay);

  ptr->fetch_add(1);
  // This is an ASSERT so that if it fails, we immediately abort the test (and
  // kill the subprocess).
  ASSERT_THAT(futex_wake(false, ptr, 1), SyscallSucceedsWithValue(1));

  kill_child.Release();
  int status;
  ASSERT_THAT(RetryEINTR(waitpid)(child_pid, &status, 0),
              SyscallSucceedsWithValue(child_pid));
  EXPECT_TRUE(WIFEXITED(status) && WEXITSTATUS(status) == 0)
      << " status " << status;
}

TEST(SharedFutexTest, WakeInterprocessFile) {
  auto const file = ASSERT_NO_ERRNO_AND_VALUE(TempPath::CreateFile());
  ASSERT_THAT(truncate(file.path().c_str(), kPageSize), SyscallSucceeds());
  auto const fd = ASSERT_NO_ERRNO_AND_VALUE(Open(file.path(), O_RDWR));
  auto const mapping = ASSERT_NO_ERRNO_AND_VALUE(Mmap(
      nullptr, kPageSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd.get(), 0));
  auto const ptr = static_cast<std::atomic<int>*>(mapping.ptr());
  constexpr int kInitialValue = 1;
  ptr->store(kInitialValue);

  DisableSave ds;
  pid_t const child_pid = fork();
  if (child_pid == 0) {
    TEST_PCHECK(futex_wait(false, ptr, kInitialValue) == 0);
    _exit(0);
  }
  ASSERT_THAT(child_pid, SyscallSucceeds());
  auto kill_child = Cleanup(
      [&] { EXPECT_THAT(kill(child_pid, SIGKILL), SyscallSucceeds()); });
  absl::SleepFor(kWaiterStartupDelay);

  ptr->fetch_add(1);
  // This is an ASSERT so that if it fails, we immediately abort the test (and
  // kill the subprocess).
  ASSERT_THAT(futex_wake(false, ptr, 1), SyscallSucceedsWithValue(1));

  kill_child.Release();
  int status;
  ASSERT_THAT(RetryEINTR(waitpid)(child_pid, &status, 0),
              SyscallSucceedsWithValue(child_pid));
  EXPECT_TRUE(WIFEXITED(status) && WEXITSTATUS(status) == 0)
      << " status " << status;
}

TEST_P(PrivateAndSharedFutexTest, PIBasic) {
  std::atomic<int> a = ATOMIC_VAR_INIT(0);

  ASSERT_THAT(futex_lock_pi(IsPrivate(), &a), SyscallSucceeds());
  EXPECT_EQ(a.load(), gettid());
  EXPECT_THAT(futex_lock_pi(IsPrivate(), &a), SyscallFailsWithErrno(EDEADLK));

  ASSERT_THAT(futex_unlock_pi(IsPrivate(), &a), SyscallSucceeds());
  EXPECT_EQ(a.load(), 0);
  EXPECT_THAT(futex_unlock_pi(IsPrivate(), &a), SyscallFailsWithErrno(EPERM));
}

TEST_P(PrivateAndSharedFutexTest, PIConcurrency) {
  DisableSave ds;  // Too many syscalls.

  std::atomic<int> a = ATOMIC_VAR_INIT(0);
  const bool is_priv = IsPrivate();

  std::unique_ptr<ScopedThread> threads[100];
  for (size_t i = 0; i < ABSL_ARRAYSIZE(threads); ++i) {
    threads[i] = std::make_unique<ScopedThread>([is_priv, &a] {
      for (size_t j = 0; j < 10; ++j) {
        ASSERT_THAT(futex_lock_pi(is_priv, &a), SyscallSucceeds());
        EXPECT_EQ(a.load() & FUTEX_TID_MASK, gettid());
        SleepSafe(absl::Milliseconds(5));
        ASSERT_THAT(futex_unlock_pi(is_priv, &a), SyscallSucceeds());
      }
    });
  }
}

TEST_P(PrivateAndSharedFutexTest, PIWaiters) {
  std::atomic<int> a = ATOMIC_VAR_INIT(0);
  const bool is_priv = IsPrivate();

  ASSERT_THAT(futex_lock_pi(is_priv, &a), SyscallSucceeds());
  EXPECT_EQ(a.load(), gettid());

  ScopedThread th([is_priv, &a] {
    ASSERT_THAT(futex_lock_pi(is_priv, &a), SyscallSucceeds());
    ASSERT_THAT(futex_unlock_pi(is_priv, &a), SyscallSucceeds());
  });

  // Wait until the thread blocks on the futex, setting the waiters bit.
  auto start = absl::Now();
  while (a.load() != (FUTEX_WAITERS | gettid())) {
    ASSERT_LT(absl::Now() - start, absl::Seconds(5));
    absl::SleepFor(absl::Milliseconds(100));
  }
  ASSERT_THAT(futex_unlock_pi(is_priv, &a), SyscallSucceeds());
}

TEST_P(PrivateAndSharedFutexTest, PITryLock) {
  std::atomic<int> a = ATOMIC_VAR_INIT(0);
  const bool is_priv = IsPrivate();

  ASSERT_THAT(futex_trylock_pi(IsPrivate(), &a), SyscallSucceeds());
  EXPECT_EQ(a.load(), gettid());

  EXPECT_THAT(futex_trylock_pi(is_priv, &a), SyscallFailsWithErrno(EDEADLK));
  ScopedThread th([is_priv, &a] {
    EXPECT_THAT(futex_trylock_pi(is_priv, &a), SyscallFailsWithErrno(EAGAIN));
  });
  th.Join();

  ASSERT_THAT(futex_unlock_pi(IsPrivate(), &a), SyscallSucceeds());
}

TEST_P(PrivateAndSharedFutexTest, PITryLockConcurrency) {
  DisableSave ds;  // Too many syscalls.

  std::atomic<int> a = ATOMIC_VAR_INIT(0);
  const bool is_priv = IsPrivate();

  std::unique_ptr<ScopedThread> threads[10];
  for (size_t i = 0; i < ABSL_ARRAYSIZE(threads); ++i) {
    threads[i] = std::make_unique<ScopedThread>([is_priv, &a] {
      for (size_t j = 0; j < 10;) {
        if (futex_trylock_pi(is_priv, &a) == 0) {
          ++j;
          EXPECT_EQ(a.load() & FUTEX_TID_MASK, gettid());
          SleepSafe(absl::Milliseconds(5));
          ASSERT_THAT(futex_unlock_pi(is_priv, &a), SyscallSucceeds());
        }
      }
    });
  }
}

int get_robust_list(int pid, struct robust_list_head** head_ptr,
                    size_t* len_ptr) {
  return syscall(__NR_get_robust_list, pid, head_ptr, len_ptr);
}

int set_robust_list(struct robust_list_head* head, size_t len) {
  return syscall(__NR_set_robust_list, head, len);
}

TEST(RobustFutexTest, BasicSetGet) {
  struct robust_list_head hd = {};
  struct robust_list_head* hd_ptr = &hd;

  // Set!
  EXPECT_THAT(set_robust_list(hd_ptr, sizeof(hd)), SyscallSucceedsWithValue(0));

  // Get!
  struct robust_list_head* new_hd_ptr = hd_ptr;
  size_t len;
  EXPECT_THAT(get_robust_list(0, &new_hd_ptr, &len),
              SyscallSucceedsWithValue(0));
  EXPECT_EQ(new_hd_ptr, hd_ptr);
  EXPECT_EQ(len, sizeof(hd));
}

TEST(RobustFutexTest, GetFromOtherTid) {
  // Get the current tid and list head.
  pid_t tid = gettid();
  struct robust_list_head* hd_ptr = {};
  size_t len;
  EXPECT_THAT(get_robust_list(0, &hd_ptr, &len), SyscallSucceedsWithValue(0));

  // Create a new thread.
  ScopedThread t([&] {
    // Current tid list head should be different from parent tid.
    struct robust_list_head* got_hd_ptr = {};
    EXPECT_THAT(get_robust_list(0, &got_hd_ptr, &len),
                SyscallSucceedsWithValue(0));
    EXPECT_NE(hd_ptr, got_hd_ptr);

    // Get the parent list head by passing its tid.
    EXPECT_THAT(get_robust_list(tid, &got_hd_ptr, &len),
                SyscallSucceedsWithValue(0));
    EXPECT_EQ(hd_ptr, got_hd_ptr);
  });

  // Wait for thread.
  t.Join();
}

TEST(RobustFutexTest, InvalidSize) {
  struct robust_list_head* hd = {};
  EXPECT_THAT(set_robust_list(hd, sizeof(*hd) + 1),
              SyscallFailsWithErrno(EINVAL));
}

TEST(RobustFutexTest, PthreadMutexAttr) {
  constexpr int kNumMutexes = 3;

  // Create a bunch of robust mutexes.
  pthread_mutexattr_t attrs[kNumMutexes];
  pthread_mutex_t mtxs[kNumMutexes];
  for (int i = 0; i < kNumMutexes; i++) {
    TEST_PCHECK(pthread_mutexattr_init(&attrs[i]) == 0);
    TEST_PCHECK(pthread_mutexattr_setrobust(&attrs[i], PTHREAD_MUTEX_ROBUST) ==
                0);
    TEST_PCHECK(pthread_mutex_init(&mtxs[i], &attrs[i]) == 0);
  }

  // Start thread to lock the mutexes and then exit.
  ScopedThread t([&] {
    for (int i = 0; i < kNumMutexes; i++) {
      TEST_PCHECK(pthread_mutex_lock(&mtxs[i]) == 0);
    }
    pthread_exit(NULL);
  });

  // Wait for thread.
  t.Join();

  // Now try to take the mutexes.
  for (int i = 0; i < kNumMutexes; i++) {
    // Should get EOWNERDEAD.
    EXPECT_EQ(pthread_mutex_lock(&mtxs[i]), EOWNERDEAD);
    // Make the mutex consistent.
    EXPECT_EQ(pthread_mutex_consistent(&mtxs[i]), 0);
    // Unlock.
    EXPECT_EQ(pthread_mutex_unlock(&mtxs[i]), 0);
  }
}

}  // namespace
}  // namespace testing
}  // namespace gvisor


text:
goog.provide('lf.backstore.FirebaseTx');

goog.require('goog.Promise');
goog.require('lf.backstore.BaseTx');

/**
 * Psuedo transaction object for Firebase.
 *
 * @constructor
 * @struct
 * @final
 * @extends {lf.backstore.BaseTx}
 *
 * @param {!lf.backstore.Firebase} db
 * @param {!lf.TransactionType} type
 * @param {!lf.cache.Journal} journal
 */
lf.backstore.FirebaseTx = function(db, type, journal) {
  lf.backstore.FirebaseTx.base(this, 'constructor', journal, type);

  /** @private {!lf.backstore.Firebase} */
  this.db_ = db;
};
goog.inherits(lf.backstore.FirebaseTx, lf.backstore.BaseTx);

/** @override */
lf.backstore.FirebaseTx.prototype.getTable = function(name, deserializeFn) {
  return this.db_.getTableInternal(name);
};

/** @override */
lf.backstore.FirebaseTx.prototype.commitInternal = function() {
  var diffs = this.getJournal().getDiff();
  var numTableAffected = diffs.getCount();
  if (numTableAffected == 0) {
    this.resolver.resolve();
  } else {
    var rev = this.db_.getRevision() + 1;
    this.db_.setRevision(rev);

    // Prepare the update object.
    var update = { '@rev': { 'R': rev } };
    diffs.forEach(function(diff) {
      var tid = this.db_.getTableId(diff.getName());

      diff.getAdded().forEach(function(row, rowId) {
        update[rowId] = { 'R': rev, 'T': tid, 'P': row.payload() };
      });
      diff.getModified().forEach(function(rowPair, rowId) {
        update[rowId] = { 'R': rev, 'T': tid, 'P': rowPair[1].payload() };
      });
      diff.getDeleted().forEach(function(row, rowId) {
        update[rowId] = null;
      });
    }, this);

    this.db_.getRef().update(update, function(e) {
      if (!goog.isNull(e)) {  // error out
        this.db_.setRevision(rev - 1);
        var promises = diffs.getValues().map(function(diff) {
          return this.db_.reloadTable(diff.getName());
        }, this);
        goog.Promise.all(promises).then(
            this.resolver.reject.bind(this.resolver),
            this.resolver.reject.bind(this.resolver));
        return;
      }

      this.resolver.resolve();
    }.bind(this));
  }
  return this.resolver.promise;
};


text:
<?php
namespace oasis\names\specification\ubl\schema\xsd\CommonBasicComponents_2;

use un\unece\uncefact\data\specification\UnqualifiedDataTypesSchemaModule\_2;
/**
 * @xmlNamespace urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2
 * @xmlType CodeType
 * @xmlName PackageLevelCodeType
 * @var oasis\names\specification\ubl\schema\xsd\CommonBasicComponents_2\PackageLevelCodeType
 */
class PackageLevelCodeType
	extends _2\CodeType
	{

} // end class PackageLevelCodeType


text:
package io.github.tailhq.dynaml.models.lm

import breeze.linalg.{DenseMatrix, DenseVector}
import io.github.tailhq.dynaml.algebra.{PartitionedMatrix, PartitionedPSDMatrix, PartitionedVector, bcholesky}
import io.github.tailhq.dynaml.algebra.PartitionedMatrixOps._
import io.github.tailhq.dynaml.algebra.PartitionedMatrixSolvers._
import io.github.tailhq.dynaml.optimization.{RegularizedLSSolver, RegularizedOptimizer}
import org.apache.log4j.Logger

/**
  * @author tailhq date: 17/02/2017.
  */
class GeneralizedLeastSquaresModel(
  data: Stream[(DenseVector[Double], Double)],
  Omega: PartitionedPSDMatrix,
  map: (DenseVector[Double]) => DenseVector[Double] =
  identity[DenseVector[Double]]) extends
  GenericGLM[
    (Stream[(DenseVector[Double], Double)], PartitionedPSDMatrix),
    (DenseMatrix[Double], DenseVector[Double])](
    (data, Omega), data.length.toLong) {

  private val logger = Logger.getLogger(this.getClass)

  override def prepareData(d: (Stream[(DenseVector[Double], Double)], PartitionedPSDMatrix)) = {
    logger.info("Performing sanity checks")
    //Sanity checks
    require(d._1.length == Omega.rows, "Sizes of data set and covariance matrix of residuals must match!!")

    //Create design matrix from input features
    //Find out the blockSize for the covariance matrix of residuals Omega
    val bS: Int = (Omega.rows/Omega.rowBlocks).toInt

    logger.info("Constructing blocks of X (input matrix) and y (output vector)")

    val (xMatBlocks, yVecBlocks) =
      d._1.grouped(bS).map(blocks => {
        val (localMatBl, localVecBl) = blocks.unzip
        (
          DenseMatrix.vertcat(
            localMatBl.map(features =>
              DenseVector(featureMap(features).toArray ++ Array(1.0)).toDenseMatrix
            ):_*),
          DenseVector(localVecBl.toArray))
      }).toStream.unzip

    val (x, y) = (
      PartitionedMatrix(
        xMatBlocks.zipWithIndex.map(b => ((b._2.toLong, 0L), b._1)),
        numcols = dimensions + 1L, numrows = Omega.rows),
      PartitionedVector(
        yVecBlocks.zipWithIndex.map(d => (d._1, d._2.toLong)).map(_.swap),
        Omega.rows)
    )

    //Perform Cholesky decomposition on Omega
    val lowerT = bcholesky(Omega)

    //Use result of cholesky decomposition to solve linear systems
    //to yield the design matrix and response vector
    val (designMatrix, responseVector): (PartitionedMatrix, PartitionedVector) = (
      x.t * (lowerT.t \\ (lowerT \\ x)),
      x.t * (lowerT.t \\ (lowerT \\ y))
    )

    (designMatrix.toBreezeMatrix, responseVector.toBreezeVector)
  }

  override protected var params: DenseVector[Double] = initParams()

  override protected val optimizer: RegularizedOptimizer[
    DenseVector[Double], DenseVector[Double], Double,
    (DenseMatrix[Double], DenseVector[Double])] =
    new RegularizedLSSolver().setRegParam(0.0)

  def dimensions = featureMap(data.head._1).length

  /**
    * Initialize parameters to a vector of ones.
    * */
  override def initParams(): DenseVector[Double] =
    DenseVector.ones[Double](dimensions + 1)
}


text:
// Copyright (c) 2003 Compaq Corporation.  All rights reserved.
// Portions Copyright (c) 2003 Microsoft Corporation.  All rights reserved.
// Last modified on Mon 30 Apr 2007 at 13:18:27 PST by lamport
//      modified on Tue Feb 22 11:56:59 PST 2000 by yuanyu

package tlc2.util;

import java.io.File;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

import tlc2.output.EC;
import tlc2.output.MP;
import tlc2.tool.TLCState;
import tlc2.value.ValueInputStream;
import util.Assert;

public class StatePoolReader extends Thread {

  public StatePoolReader(int bufSize) {
	  this(bufSize, null);
  }

  public StatePoolReader(int bufSize, File file) {
    this.buf = new TLCState[bufSize];
    this.poolFile = file;
    this.isFull = false;
    this.canRead = false;
  }

  private TLCState[] buf;
  private File poolFile;      // the file to be read
  private boolean isFull;     // true iff the buf is filled
  private boolean canRead;    // true iff the file can be read
  private boolean finished = false;

  public final synchronized void wakeup() {
    this.canRead = true;
    this.notify();
  }

  public final synchronized void restart(File file, boolean canRead) {
    this.poolFile = file;
    this.isFull = false;
    this.canRead = canRead;
    this.notify();
  }

  /*
   * In the most common case, this method expects to see the buffer is
   * full, it returns its buffer and notifies this reader to read the
   * content of the file.
   */
  public final synchronized TLCState[] doWork(TLCState[] deqBuf, File file)
  throws IOException, ClassNotFoundException {
    if (this.isFull) {
      Assert.check(this.poolFile == null, EC.SYSTEM_FILE_NULL);
      TLCState[] res = this.buf;
      this.buf = deqBuf;
      this.poolFile = file;
      this.isFull = false;      // <file, false>
      this.canRead = true;
      this.notify();
      return res;
    }
    else if (this.poolFile != null) {
      ValueInputStream vis = new ValueInputStream(this.poolFile);
      for (int i = 0; i < deqBuf.length; i++) {
	deqBuf[i] = TLCState.Empty.createEmpty();
	deqBuf[i].read(vis);
      }
      vis.close();
      this.poolFile = file;     // <file, false>
      this.canRead = true;
      this.notify();
      return deqBuf;
    }
    else {
      ValueInputStream vis = new ValueInputStream(file);
      for (int i = 0; i < deqBuf.length; i++) {
	deqBuf[i] = TLCState.Empty.createEmpty();
	deqBuf[i].read(vis);
      }
      vis.close();              // <null, false>
      return deqBuf;
    }
  }

  /*
   * Returns the cached buffer if filled. Otherwise, returns null.
   */
  public final synchronized TLCState[] getCache(TLCState[] deqBuf, File file)
  throws IOException, ClassNotFoundException {
    if (this.isFull) {
      Assert.check(this.poolFile == null, EC.SYSTEM_FILE_NULL);
      TLCState[] res = this.buf;
      this.buf = deqBuf;
      this.poolFile = file;
      this.isFull = false;      // <file, false>
      this.canRead = false;
      return res;
    }
    else if (this.poolFile != null && this.canRead) {
      // this should seldom occur.
      ValueInputStream vis = new ValueInputStream(this.poolFile);
      for (int i = 0; i < deqBuf.length; i++) {
	deqBuf[i] = TLCState.Empty.createEmpty();
	deqBuf[i].read(vis);
      }
      vis.close();
      // this.poolFile.delete();
      this.poolFile = file;    // <file, false>
      this.canRead = false;
      return deqBuf;
    }
    return null;
  }

  public final synchronized void beginChkpt(ObjectOutputStream oos)
  throws IOException {
    boolean hasFile = this.poolFile != null;
    oos.writeBoolean(hasFile);
    oos.writeBoolean(this.canRead);
    oos.writeBoolean(this.isFull);
    if (hasFile) {
      oos.writeObject(this.poolFile);
    }
    if (this.isFull) {
      for (int i = 0; i < this.buf.length; i++) {
	oos.writeObject(this.buf[i]);
      }
    }
  }

  /* Note that this method is not synchronized. */
  public final void recover(ObjectInputStream ois) throws IOException {
    boolean hasFile = ois.readBoolean();
    this.canRead = ois.readBoolean();
    this.isFull = ois.readBoolean();
    try {
      if (hasFile) {
	this.poolFile = (File)ois.readObject();
      }
      if (this.isFull) {
	for (int i = 0; i < this.buf.length; i++) {
	  this.buf[i] = (TLCState)ois.readObject();
	}
      }
    }
    catch (ClassNotFoundException e)
    {
      Assert.fail(EC.SYSTEM_CHECKPOINT_RECOVERY_CORRUPT, e);
    }
  }

  /**
   * Read the contents of "poolFile" into "buf". The objects in the
   * file are read using Java's object serialization facilities.
   */
  public void run() {
    try {
      synchronized(this) {
	while (true) {
	  while (this.poolFile == null || this.isFull || !this.canRead) {
	    this.wait();
	    if(this.finished ) {
	    	return;
	    }
	  }
	  ValueInputStream vis = new ValueInputStream(this.poolFile);
	  for (int i = 0; i < this.buf.length; i++) {
	    this.buf[i] = TLCState.Empty.createEmpty();
	    this.buf[i].read(vis);
	  }
	  vis.close();
	  this.poolFile = null;
	  this.isFull = true;       // <null, true>
	}
      }
    }
    catch (Exception e)
    {
      // Assert.printStack(e);
      MP.printError(EC.SYSTEM_ERROR_READING_POOL, e.getMessage(), e);
      System.exit(1);
    }
  }

  public void setFinished() {
	  finished = true;
  }

}


text:
package ru.stqa.pft.addressbook.appmanager;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class NavigationHelper extends BaseHelper {

    public NavigationHelper(WebDriver wd) {
        super(wd);
    }

    public void groupPage() {
        click(By.linkText("groups"));
    }

    public void createContact() {
        click(By.linkText("add new"));
    }

    public void homePage() {
        click(By.linkText("home"));
    }

}


text:
@protocol XPStaticContext;
@protocol XPSequenceEnumeration;

@class XPContext;
@class XPValue;
@class XPSequenceValue;
@class XPFunction;

extern NSString * const XPathErrorDomain;

extern const NSUInteger XPathErrorCodeCompiletime;
extern const NSUInteger XPathErrorCodeRuntime;

typedef NS_ENUM(NSUInteger, XPDataType) {
    XPDataTypeBoolean,
    XPDataTypeNumber,
    XPDataTypeString,
    XPDataTypeSequence,
    XPDataTypeObject,
    XPDataTypeAny
};

typedef NS_ENUM(NSUInteger, XPDependencies) {
    XPDependenciesInvalid = NSNotFound,
    XPDependenciesVariables = 1,
    XPDependenciesCurrentNode = 4,
    XPDependenciesContextNode = 8,
    XPDependenciesContextPosition = 16,
    XPDependenciesLast = 32,
    XPDependenciesController = 64,
    XPDependenciesContextDocument = 128,
    //  containing the context node
    XPDependenciesNone = 0,
    XPDependenciesAll = 255,
    XPDependenciesXSLTContext = 64 | 1 | 4
};

@interface XPExpression : NSObject <NSCopying>

+ (XPExpression *)expressionFromString:(NSString *)exprStr inContext:(id <XPStaticContext>)env error:(NSError **)outErr;
+ (XPExpression *)expressionFromString:(NSString *)exprStr inContext:(id <XPStaticContext>)env simplify:(BOOL)simplify error:(NSError **)outErr;

- (XPValue *)evaluateInContext:(XPContext *)ctx;
- (BOOL)evaluateAsBooleanInContext:(XPContext *)ctx;
- (double)evaluateAsNumberInContext:(XPContext *)ctx;
- (NSString *)evaluateAsStringInContext:(XPContext *)ctx;
- (XPSequenceValue *)evaluateAsSequenceInContext:(XPContext *)ctx;

- (id <XPSequenceEnumeration>)enumerateInContext:(XPContext *)ctx sorted:(BOOL)sorted;

- (BOOL)isValue;
- (BOOL)isContextDocumentNodeSet;
- (BOOL)usesCurrent;
- (BOOL)containsReferences;

- (XPExpression *)simplify;
- (XPDependencies)dependencies;
- (XPExpression *)reduceDependencies:(XPDependencies)dep inContext:(XPContext *)ctx;

- (XPDataType)dataType;

@property (nonatomic, assign) NSRange range;
@property (nonatomic, retain) id <XPStaticContext>staticContext;

- (XPExpression *)addFilter:(XPExpression *)f;
- (void)removeAllFilters;
@property (nonatomic, retain, readonly) NSArray *filters;
@property (nonatomic, assign, readonly) NSUInteger numberOfFilters;
@end


text:
Pan-and-Zoom
============

jQuery plugin that creates a Pan-and-Zoom control on an element and lets you target elements on the page to...pan and zoom.


text:
package net.runelite.client.plugins.blastfurnace;

import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import javax.inject.Inject;
import net.runelite.api.Client;
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import net.runelite.client.game.ItemManager;
import net.runelite.client.ui.overlay.Overlay;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.ImageComponent;
import net.runelite.client.ui.overlay.components.PanelComponent;

class BlastFurnaceOverlay extends Overlay
{
	private final Client client;
	private final BlastFurnacePlugin plugin;
	private final PanelComponent imagePanelComponent = new PanelComponent();

	@Inject
	private ItemManager itemManager;

	@Inject
	BlastFurnaceOverlay(Client client, BlastFurnacePlugin plugin)
	{
		super(plugin);
		this.plugin = plugin;
		this.client = client;
		setPosition(OverlayPosition.TOP_LEFT);
		imagePanelComponent.setOrientation(PanelComponent.Orientation.HORIZONTAL);
		getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY_CONFIG, OPTION_CONFIGURE, "Blast furnace overlay"));
	}

	@Override
	public Dimension render(Graphics2D graphics)
	{
		if (plugin.getConveyorBelt() == null)
		{
			return null;
		}

		imagePanelComponent.getChildren().clear();

		for (BarsOres varbit : BarsOres.values())
		{
			int amount = client.getVar(varbit.getVarbit());

			if (amount == 0)
			{
				continue;
			}

			imagePanelComponent.getChildren().add(new ImageComponent(getImage(varbit.getItemID(), amount)));
		}

		return imagePanelComponent.render(graphics);
	}

	private BufferedImage getImage(int itemID, int amount)
	{
		BufferedImage image = itemManager.getImage(itemID, amount, true);
		return image;
	}
}


text:
@interface PodsDummy_Pods_Forest_GuardianUITests : NSObject
@end
@implementation PodsDummy_Pods_Forest_GuardianUITests
@end