text:
class Vector3;
class Matrix4;
class Matrix3;
class QuaternionF;

class Quaternion
{

public:

	union
	{
		double quaternion[4];
		struct{ double x, y, z, w; };
	};

	Quaternion();
	/// Constructor to set up a quaternion
	Quaternion(double angle, const Vector3 &axis);
	Quaternion(double pitch, double yaw, double roll);
	Quaternion(const double x, const double y, const double z, const double w);
	~Quaternion(void);
	Quaternion& operator= (const QuaternionF& right);
	/// Set a value of a component of a vector
	void InsertAt(unsigned int index, double value);

	Quaternion operator*(const Quaternion& v) const;
	void operator*=(const Quaternion& v);
	Quaternion operator*(const double& number)const;

	double Magnitude();
	/// Normalize this vector
	void Normalize();
	Quaternion Normalized() const;
	Matrix4 ConvertToMatrix() const;
	Matrix3 ConvertToMatrix3() const;

	Vector3 getUp() const;
	Vector3 getInvUp() const;
	Vector3 getLeft() const;
	Vector3 getInvLeft() const;
	Vector3 getBack() const;
	Vector3 getInvBack() const;
	Vector3 getForward() const;
	Vector3 getInvForward() const;
	QuaternionF toFloat() const;
	Vector3 toEulerAngles() const;

	/// Overloaded access operator for Vector
	double& operator[](unsigned int index);
};

redpajama_set_name: RedPajamaGithub


text:
namespace blink {

PasswordCredential* PasswordCredential::create(
    WebPasswordCredential* webPasswordCredential) {
  return new PasswordCredential(webPasswordCredential);
}

PasswordCredential* PasswordCredential::create(
    const PasswordCredentialData& data,
    ExceptionState& exceptionState) {
  if (data.id().isEmpty()) {
    exceptionState.throwTypeError("'id' must not be empty.");
    return nullptr;
  }
  if (data.password().isEmpty()) {
    exceptionState.throwTypeError("'password' must not be empty.");
    return nullptr;
  }

  KURL iconURL = parseStringAsURL(data.iconURL(), exceptionState);
  if (exceptionState.hadException())
    return nullptr;

  return new PasswordCredential(data.id(), data.password(), data.name(),
                                iconURL);
}

// https://w3c.github.io/webappsec-credential-management/#passwordcredential-form-constructor
PasswordCredential* PasswordCredential::create(HTMLFormElement* form,
                                               ExceptionState& exceptionState) {
  // Extract data from the form, then use the extracted |formData| object's
  // value to populate |data|.
  FormData* formData = FormData::create(form);
  PasswordCredentialData data;

  AtomicString idName;
  AtomicString passwordName;
  for (FormAssociatedElement* element : form->associatedElements()) {
    // If |element| isn't a "submittable element" with string data, then it
    // won't have a matching value in |formData|, and we can safely skip it.
    FileOrUSVString result;
    formData->get(element->name(), result);
    if (!result.isUSVString())
      continue;

    Vector<String> autofillTokens;
    toHTMLElement(element)
        ->fastGetAttribute(HTMLNames::autocompleteAttr)
        .getString()
        .lower()  // Lowercase here once to avoid the case-folding logic below.
        .split(' ', autofillTokens);
    for (const auto& token : autofillTokens) {
      if (token == "current-password" || token == "new-password") {
        data.setPassword(result.getAsUSVString());
        passwordName = element->name();
      } else if (token == "photo") {
        data.setIconURL(result.getAsUSVString());
      } else if (token == "name" || token == "nickname") {
        data.setName(result.getAsUSVString());
      } else if (token == "username") {
        data.setId(result.getAsUSVString());
        idName = element->name();
      }
    }
  }

  // Create a PasswordCredential using the data gathered above.
  PasswordCredential* credential =
      PasswordCredential::create(data, exceptionState);
  if (exceptionState.hadException())
    return nullptr;
  ASSERT(credential);

  // After creating the Credential, populate its 'additionalData', 'idName', and
  // 'passwordName' attributes.  If the form's 'enctype' is anything other than
  // multipart, generate a URLSearchParams using the
  // data in |formData|.
  credential->setIdName(idName);
  credential->setPasswordName(passwordName);

  FormDataOrURLSearchParams additionalData;
  if (form->enctype() == "multipart/form-data") {
    additionalData.setFormData(formData);
  } else {
    URLSearchParams* params = URLSearchParams::create(URLSearchParamsInit());
    for (const FormData::Entry* entry : formData->entries()) {
      if (entry->isString())
        params->append(entry->name().data(), entry->value().data());
    }
    additionalData.setURLSearchParams(params);
  }

  credential->setAdditionalData(additionalData);
  return credential;
}

PasswordCredential::PasswordCredential(
    WebPasswordCredential* webPasswordCredential)
    : SiteBoundCredential(webPasswordCredential->getPlatformCredential()),
      m_idName("username"),
      m_passwordName("password") {}

PasswordCredential::PasswordCredential(const String& id,
                                       const String& password,
                                       const String& name,
                                       const KURL& icon)
    : SiteBoundCredential(
          PlatformPasswordCredential::create(id, password, name, icon)),
      m_idName("username"),
      m_passwordName("password") {}

PassRefPtr<EncodedFormData> PasswordCredential::encodeFormData(
    String& contentType) const {
  if (m_additionalData.isURLSearchParams()) {
    // If |additionalData| is a 'URLSearchParams' object, build a urlencoded
    // response.
    URLSearchParams* params = URLSearchParams::create(URLSearchParamsInit());
    URLSearchParams* additionalData = m_additionalData.getAsURLSearchParams();
    for (const auto& param : additionalData->params()) {
      const String& name = param.first;
      if (name != idName() && name != passwordName())
        params->append(name, param.second);
    }
    params->append(idName(), id());
    params->append(passwordName(), password());

    contentType =
        AtomicString("application/x-www-form-urlencoded;charset=UTF-8");

    return params->toEncodedFormData();
  }

  // Otherwise, we'll build a multipart response.
  FormData* formData = FormData::create(nullptr);
  if (m_additionalData.isFormData()) {
    FormData* additionalData = m_additionalData.getAsFormData();
    for (const FormData::Entry* entry : additionalData->entries()) {
      const String& name = formData->decode(entry->name());
      if (name == idName() || name == passwordName())
        continue;

      if (entry->blob())
        formData->append(name, entry->blob(), entry->filename());
      else
        formData->append(name, formData->decode(entry->value()));
    }
  }
  formData->append(idName(), id());
  formData->append(passwordName(), password());

  RefPtr<EncodedFormData> encodedData = formData->encodeMultiPartFormData();
  contentType = AtomicString("multipart/form-data; boundary=") +
                encodedData->boundary().data();
  return encodedData.release();
}

const String& PasswordCredential::password() const {
  return static_cast<PlatformPasswordCredential*>(m_platformCredential.get())
      ->password();
}

DEFINE_TRACE(PasswordCredential) {
  SiteBoundCredential::trace(visitor);
  visitor->trace(m_additionalData);
}

}  // namespace blink


text:
package com.bkromhout.minerva.events;

/**
 * Fired to let listener know that a preference has changed.
 */
public class PrefChangeEvent {
    /**
     * Name of the changed preference.
     */
    private final String prefName;

    /**
     * Create a new {@link PrefChangeEvent}.
     * @param prefName Name of the changed preference.
     */
    public PrefChangeEvent(String prefName) {
        this.prefName = prefName;
    }

    /**
     * Get the name of the changed preference.
     * @return Changed preference name.
     */
    public String getPrefName() {
        return prefName;
    }
}


text:
namespace Tccc {
    export class ApiService {
        resultsInProgress = 0;
        isShowingApiError = false;
        apiBaseUrl = "/api";

        static $inject = ["loadingProgress", "$http", "$q"];

        constructor(
            private loadingProgress: LoadingProgressService,
            private $http: ng.IHttpService,
            private $q: ng.IQService) {
        }

        /**
         * Performs an AJAX GET request.
         * @params
         */
        query<T>(relativeUrl: string, args: any = null, selector?: (rawResult: any) => T, showProgress = true): ng.IPromise<T> {
            var progress: ng.IDeferred<T>;
            if (showProgress) {
                progress = this.loadingProgress.start<T>();
            } else {
                progress = this.$q.defer<T>();
            }

            var config: ng.IRequestConfig = {
                url: this.apiBaseUrl + relativeUrl,
                method: "GET",
                params: args
            };

            this.$http(config)
                .then(result => {
                    var preppedResult: T = selector ? selector(result.data) : <T>result.data;
                    progress.resolve(preppedResult);
                }, failed => {
                    progress.reject(failed);
                    this.onAjaxError(failed, `Error loading ${relativeUrl}.`);
                });

            return progress.promise;
        }

        post<T>(relativeUrl: string, args: any, selector?: (rawResult: any) => T, showProgress = true): ng.IPromise<T> {
            var deferred: ng.IDeferred<T>;
            if (showProgress) {
                deferred = this.loadingProgress.start<T>();
            } else {
                deferred = this.$q.defer<T>();
            }

            var absoluteUrl = `${this.apiBaseUrl}${relativeUrl}`;
            var postTask = this.$http.post(absoluteUrl, args);
            postTask.then((result: any) => {
                var preppedResult = selector ? selector(result.data) : result.data;
                deferred.resolve(preppedResult);
            });
            postTask.catch(error => {
                this.showApiError(`Error saving ${relativeUrl}.`);
                deferred.reject(error);
            });

            return deferred.promise;
        }

        private onAjaxError(errorDetails: any, errorMessage: string) {
            this.showApiError(errorMessage);
        }

        private showApiError(errorMessage: string) {
            //if (!this.isShowingApiError) {
            //    this.isShowingApiError = true;
            //    this.appNav.messageBox("Error", errorMessage, ["Dismiss"], "Dismiss")
            //        .result.finally(() => this.isShowingApiError = false);
            //}
        }
    }

    App.service("apiService", ApiService);
}


text:
layout: base
title:  'Statistics of PUNCT in UD_Livvi-KKPP'
udver: '2'
---

## Treebank Statistics: UD_Livvi-KKPP: POS Tags: `PUNCT`

There are 11 `PUNCT` lemmas (2%), 11 `PUNCT` types (1%) and 351 `PUNCT` tokens (22%).
Out of 14 observed tags, the rank of `PUNCT` is: 7 in number of lemmas, 10 in number of types and 2 in number of tokens.

The 10 most frequent `PUNCT` lemmas: ,, ., ", :, –, ?, ", ", ;, !

The 10 most frequent `PUNCT` types:  ,, ., ", :, –, ?, ", ", ;, !

The 10 most frequent ambiguous lemmas:

The 10 most frequent ambiguous types:

## Morphology

The form / lemma ratio of `PUNCT` is 1.000000 (the average of all parts of speech is 1.333901).

The 1st highest number of forms (1) was observed with the lemma "!": !.

The 2nd highest number of forms (1) was observed with the lemma """: ".

The 3rd highest number of forms (1) was observed with the lemma ",": ,.

`PUNCT` does not occur with any features.

## Relations

`PUNCT` nodes are attached to their parents using 1 different relations: <tt>punct</tt> (351; 100% instances)

Parents of `PUNCT` nodes belong to 10 different parts of speech: <tt>VERB</tt> (244; 70% instances), <tt>NOUN</tt> (68; 19% instances), <tt>ADJ</tt> (17; 5% instances), <tt>PROPN</tt> (9; 3% instances), <tt>PRON</tt> (5; 1% instances), <tt>AUX</tt> (3; 1% instances), <tt>NUM</tt> (2; 1% instances), <tt>ADV</tt> (1; 0% instances), <tt>SCONJ</tt> (1; 0% instances), <tt>X</tt> (1; 0% instances)

351 (100%) `PUNCT` nodes are leaves.

The highest child degree of a `PUNCT` node is 0.


text:
module Rack
  module Client
    module Cache
      class Storage
        def initialize
          @metastores = {}
          @entitystores = {}
        end

        def resolve_metastore_uri(uri)
          @metastores[uri.to_s] ||= create_store(MetaStore, uri)
        end

        def resolve_entitystore_uri(uri)
          @entitystores[uri.to_s] ||= create_store(EntityStore, uri)
        end

        def create_store(type, uri)
          if uri.respond_to?(:scheme) || uri.respond_to?(:to_str)
            uri = URI.parse(uri) unless uri.respond_to?(:scheme)
            if type.const_defined?(uri.scheme.upcase)
              klass = type.const_get(uri.scheme.upcase)
              klass.resolve(uri)
            else
              fail "Unknown storage provider: #{uri.to_s}"
            end
          end
        end

        def clear
          @metastores.clear
          @entitystores.clear
          nil
        end

        @@singleton_instance = new
        def self.instance
          @@singleton_instance
        end
      end
    end
  end
end


text:
"""
Query 7, 'Highest Bid'. Select the bids with the highest bid price in the
last minute. In CQL syntax::

  SELECT Rstream(B.auction, B.price, B.bidder)
  FROM Bid [RANGE 1 MINUTE SLIDE 1 MINUTE] B
  WHERE B.price = (SELECT MAX(B1.price)
                   FROM BID [RANGE 1 MINUTE SLIDE 1 MINUTE] B1);

We will use a shorter window to help make testing easier. We'll also
implement this using a side-input in order to exercise that functionality.
(A combiner, as used in Query 5, is a more efficient approach.).
"""

import apache_beam as beam
from apache_beam.testing.benchmarks.nexmark.queries import nexmark_query_util
from apache_beam.transforms import window

def load(events, metadata=None, pipeline_options=None):
  # window bids into fixed window
  sliding_bids = (
      events
      | nexmark_query_util.JustBids()
      | beam.WindowInto(window.FixedWindows(metadata.get('window_size_sec'))))
  # find the largest price in all bids per window
  max_prices = (
      sliding_bids
      | beam.Map(lambda bid: bid.price)
      | beam.CombineGlobally(max).without_defaults())
  return (
      sliding_bids
      | 'select_bids' >> beam.ParDo(
          SelectMaxBidFn(), beam.pvalue.AsSingleton(max_prices)))

class SelectMaxBidFn(beam.DoFn):
  def process(self, element, max_bid_price):
    if element.price == max_bid_price:
      yield element


text:
#ifndef __APP_HPP__
#define __APP_HPP__

#include <string>
#include <iscene.hpp>

namespace AndySmiles4Games
{
    namespace Framework
    {
        class App final
        {
            public:
                explicit App(const unsigned int width, const unsigned int height, const std::string title);
                ~App(void);

                int run(IScene* scene);

            private:
                unsigned int width;
                unsigned int height;
                std::string title;
        };
    }
}

#endif


text:
/**
 * "First, solve the problem. Then, write the code. -John Johnson"
 * "Or use Vangav M"
 * www.vangav.com
 * */

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

/**
 * Community
 * Facebook Group: Vangav Open Source - Backend
 *   fb.com/groups/575834775932682/
 * Facebook Page: Vangav
 *   fb.com/vangav.f
 *
 * Third party communities for Vangav Backend
 *   - play framework
 *   - cassandra
 *   - datastax
 *
 * Tag your question online (e.g.: stack overflow, etc ...) with
 *   #vangav_backend
 *   to easier find questions/answers online
 * */

package com.vangav.backend.math.geometry;

import java.util.ArrayList;
import java.util.List;

/**
 * @author mustapha
 * fb.com/mustapha.abdallah
 */
/**
 * Motion2DInl: is static inline methods relation to 2D motion
 * */
public class Motion2DInl {

  private enum LinearMotionType {

    SAME_POINT,
    HORIZONTAL,
    VERTICAL,
    OTHER
  }
  private static LinearMotionType getLinearMotionType (
    Point start,
    Point end) throws Exception {

    if (start.getX() == end.getX() && start.getY() == end.getY() ) {

      return LinearMotionType.SAME_POINT;
    } else if (start.getX() == end.getX() ) {

      return LinearMotionType.HORIZONTAL;
    } else if (start.getY() == end.getY() ) {

      return LinearMotionType.VERTICAL;
    }

    return LinearMotionType.OTHER;
  }
  private enum MotionDirection {

    INCREMENTAL,
    DECREMENTAL
  }
  private static MotionDirection getMotionDicrection (
    double start,
    double end) throws Exception {

    if (start <= end) {

      return MotionDirection.INCREMENTAL;
    }

    return MotionDirection.DECREMENTAL;
  }
  /**
   * getLinearMotionPath
   * finds a list of points that linearly starts with start point and ends with
   *   end point
   * @param start
   * @param end
   * @param step: distance between each two points on the path
   * @return list of points representing the path from start to end
   * @throws Exception
   */
  public static List<Point> getLinearMotionPath (
    Point start,
    Point end,
    double step) throws Exception {

    List<Point> motionPath = new ArrayList<>();

    LinearMotionType motionType = getLinearMotionType(start, end);

    Point currPoint;

    currPoint = start;

    motionPath.add(currPoint);

    if (motionType == LinearMotionType.SAME_POINT) {

      return motionPath;
    } else if (motionType == LinearMotionType.HORIZONTAL) {

      if (getMotionDicrection(start.getX(), end.getX() ) ==
          MotionDirection.INCREMENTAL) {

        while (currPoint.getX() < end.getX() ) {

          if ((currPoint.getX() + step) <= end.getX() ) {

            currPoint =
              (Point)new Point.Double(
                (currPoint.getX() ) + step, currPoint.getY() );
          } else {

            currPoint =
              (Point)new Point.Double(end.getX(), currPoint.getY() );
          }

          motionPath.add(currPoint);
        }
      } else {

        if ((currPoint.getX() + step) >= end.getX() ) {

          currPoint =
            (Point)new Point.Double(
              (currPoint.getX() ) - step, currPoint.getY() );
        } else {

          currPoint =
            (Point)new Point.Double(end.getX(), currPoint.getY() );
        }

        motionPath.add(currPoint);
      }
    } else if (motionType == LinearMotionType.VERTICAL) {

      if (getMotionDicrection(start.getY(), end.getY() ) ==
          MotionDirection.INCREMENTAL) {

        while (currPoint.getY() < end.getY() ) {

          if ((currPoint.getY() + step) <= end.getY() ) {

            currPoint =
              (Point)new Point.Double(
                currPoint.getX(), (currPoint.getY() ) + step);
          } else {

            currPoint =
              (Point)new Point.Double(currPoint.getX(), end.getY() );
          }

          motionPath.add(currPoint);
        }
      } else {

        if ((currPoint.getY() + step) >= end.getY() ) {

          currPoint =
            (Point)new Point.Double(
              currPoint.getX(), (currPoint.getY() ) - step);
        } else {

          currPoint =
            (Point)new Point.Double(currPoint.getX(), end.getY() );
        }

        motionPath.add(currPoint);
      }
    } else if (motionType == LinearMotionType.OTHER) {

      double slope =
        (((double)(start.getY() ) ) -
        ((double)(end.getY() ) ) ) /
        (((double)(start.getX() ) ) -
        ((double)(end.getX() ) ) );

      double c =
        (((double)start.getY() ) - ((double)start.getX() ) ) * slope;

      if (Math.abs(Math.abs(end.getX() ) -
                   Math.abs(end.getX() ) ) >
          Math.abs(Math.abs(end.getY() ) -
                   Math.abs(start.getY() ) ) ) {

        if (getMotionDicrection(start.getX(), end.getX() ) ==
            MotionDirection.INCREMENTAL) {

          while (end.getX() > currPoint.getX() ) {

            currPoint =
              (Point)new Point.Double(
                currPoint.getX() + step,
                (slope * (currPoint.getX() + step) ) + c);

            if (currPoint.getX() > end.getX() ) {

              currPoint =
                (Point)new Point.Double(
                  end.getX(),
                  (slope * end.getX() ) + c);
            }

            motionPath.add(currPoint);
          }
        } else {

          while (end.getX() < currPoint.getX() ) {

            currPoint =
              (Point)new Point.Double(
                currPoint.getX() - step,
                (slope * (currPoint.getX() - step) ) + c);

            if (currPoint.getX() < end.getX() ) {

              currPoint =
                (Point)new Point.Double(
                  end.getX(),
                  (slope * end.getX() ) + c);
            }

            motionPath.add(currPoint);
          }
        }
      } else {

        if (getMotionDicrection(start.getY(), end.getY() ) ==
            MotionDirection.INCREMENTAL) {

          while (end.getY() > currPoint.getY() ) {

            currPoint =
              (Point)new Point.Double(
                  (currPoint.getY() + step - c) / slope,
                  currPoint.getY() + step);

            if (currPoint.getY() > end.getY() ) {

              currPoint =
                (Point)new Point.Double(
                  (end.getY() - c) / slope,
                  end.getY() );
            }

            motionPath.add(currPoint);
          }
        } else {

          while (end.getY() < currPoint.getY() ) {

            currPoint =
              (Point)new Point.Double(
                (currPoint.getY() - step - c) / slope,
                currPoint.getY() - step);

            if (currPoint.getY() < end.getY() ) {

              currPoint =
                (Point)new Point.Double(
                  (end.getY() - c) / slope,
                  end.getY() );
            }

            motionPath.add(currPoint);
          }
        }
      }
    }

    return motionPath;
  }
}


text:
<?php

namespace Config;

Interface Adaptor
{
    public static function init($data);
    public static function get($data);
    public static function set($data);
    public static function save($data);
    public static function merge($data);

}


text:
'use strict'

var Readable = require('readable-stream').Readable
var streamsOpts = { objectMode: true }

/**
 * In-memory implementation of the message store
 * This can actually be saved into files.
 *
 */
function Store () {
  if (!(this instanceof Store)) {
    return new Store()
  }

  this._inflights = {}
}

/**
 * Adds a packet to the store, a packet is
 * anything that has a messageId property.
 *
 */
Store.prototype.put = function (packet, cb) {
  this._inflights[packet.messageId] = packet

  if (cb) {
    cb()
  }

  return this
}

/**
 * Creates a stream with all the packets in the store
 *
 */
Store.prototype.createStream = function () {
  var stream = new Readable(streamsOpts)
  var inflights = this._inflights
  var ids = Object.keys(this._inflights)
  var destroyed = false
  var i = 0

  stream._read = function () {
    if (!destroyed && i < ids.length) {
      this.push(inflights[ids[i++]])
    } else {
      this.push(null)
    }
  }

  stream.destroy = function () {
    if (destroyed) {
      return
    }

    var self = this

    destroyed = true

    process.nextTick(function () {
      self.emit('close')
    })
  }

  return stream
}

/**
 * deletes a packet from the store.
 */
Store.prototype.del = function (packet, cb) {
  packet = this._inflights[packet.messageId]
  if (packet) {
    delete this._inflights[packet.messageId]
    cb(null, packet)
  } else if (cb) {
    cb(new Error('missing packet'))
  }

  return this
}

/**
 * get a packet from the store.
 */
Store.prototype.get = function (packet, cb) {
  packet = this._inflights[packet.messageId]
  if (packet) {
    cb(null, packet)
  } else if (cb) {
    cb(new Error('missing packet'))
  }

  return this
}

/**
 * Close the store
 */
Store.prototype.close = function (cb) {
  this._inflights = null
  if (cb) {
    cb()
  }
}

module.exports = Store


text:
namespace YoloCrawler.Factories
{
    using Configuration;

    public interface HealingShrineFactory
    {
        HealingShrine GetShrine(HealingShrinesConfiguration configuration);
    }
}


text:
<?php

class EW_NativePasswords_Model_Observer
{
    const ADMIN_NOTIFICATIONS_BLOCK_NAME = 'notifications';

    /**
     * Validate environment and throw exception if not compatible
     *
     * @throws EW_NativePasswords_Exception_IncompatibleEnvironmentException
     */
    protected function _validateEnvironment() {
        /* @var $helper EW_NativePasswords_Helper_Data */
        $helper = Mage::helper('ew_nativepasswords');

        if(!$helper->isEnvironmentCompatible()) {
            throw new EW_NativePasswords_Exception_IncompatibleEnvironmentException(
                $helper->__(
                    'Native passwords are enabled in system configuration, but PHP version is incompatible. ' .
                    'Reminder: %s <= PHP version < %s can use compatibility library. ' .
                    'PHP version >= %s use native functionality. ' .
                    'Found version: %s.',
                    EW_NativePasswords_Helper_Data::MINIMUM_REQUIRED_PHP_VERSION,
                    EW_NativePasswords_Helper_Data::NATIVE_PHP_VERSION,
                    EW_NativePasswords_Helper_Data::NATIVE_PHP_VERSION,
                    phpversion()
                )
            );
        }
    }

    /**
     * Validate cost and throw exception if invalid
     *
     * @param $cost
     * @throws EW_NativePasswords_Exception_InvalidCostException
     */
    protected function _validateCost($cost) {
        /* @var $helper EW_NativePasswords_Helper_Data */
        $helper = Mage::helper('ew_nativepasswords');

        if(!$helper->validateCost($cost)) {
            throw new EW_NativePasswords_Exception_InvalidCostException(
                $helper->__(
                    'Invalid cost %d. Cost must be in interval [%d,%d].',
                    $cost,
                    EW_NativePasswords_Helper_Data::COST_MIN,
                    EW_NativePasswords_Helper_Data::COST_MAX
                )
            );
        }

        $optimalCost = $helper->getOptimalCost();

        if($optimalCost != $cost) {
            Mage::getSingleton('adminhtml/session')->addNotice(
                $helper->__(
                    'Native passwords cost updated to %d, but optimal cost computed to be %d.',
                    $cost,
                    $optimalCost
                )
            );
        }
    }

    /**
     * Ensure environment can handle native password hashing
     * when enabling via system config.
     * Observes: model_config_data_save_before
     *
     * @param Varien_Event_Observer $observer
     */
    public function validateEnvironment(Varien_Event_Observer $observer) {
        $groups = $observer->getObject()->getGroups();

        $enabled = false;

        if(isset($groups['password'])
            && isset($groups['password']['fields'])
            && isset($groups['password']['fields']['native_passwords_enabled'])
            && isset($groups['password']['fields']['native_passwords_enabled']['value'])) {
            $enabled = (bool)$groups['password']['fields']['native_passwords_enabled']['value'];
        }

        if(!$enabled) {
            return; //nothing to do here
        }

        /* @var $helper EW_NativePasswords_Helper_Data */
        $helper = Mage::helper('ew_nativepasswords');

        $oldCost = $helper->getConfiguredCost();
        $cost = intval($groups['password']['fields']['native_passwords_cost']['value']);

        $this->_validateEnvironment();

        if($oldCost != $cost) {
            $this->_validateCost($cost);
        }
    }

    /**
     * If template symlinks are disabled and this module is installed but not enabled
     * then add session notification in addition to template notification,
     * as template notification may not be seen if module installed via modman.
     * Observes: core_block_abstract_to_html_after
     *
     * @param Varien_Event_Observer $observer
     */
    public function addNotEnabledWarning(Varien_Event_Observer $observer) {
        /* @var $block Mage_Core_Block_Abstract */
        $block = $observer->getBlock();
        /* @var $helper EW_NativePasswords_Helper_Data */
        $helper = Mage::helper('ew_nativepasswords');

        if($block->getNameInLayout() != self::ADMIN_NOTIFICATIONS_BLOCK_NAME) {
            return; //not interested in this block
        }

        if($helper->isEnabled()) {
            return; //module functionality enabled -- no concerns.
        }

        if(Mage::registry(EW_NativePasswords_Block_Adminhtml_Notification_Enabled::MESSAGE_SHOWN_CANARY_REGISTRY_KEY)) {
            return; //message successfully shown via template notification
        }

        //module is installed (or this method wouldn't exist), but functionality is disabled,
        //and template symlinks are disabled.
        //fall back to session notification.

        $message = $helper->getNotEnabledMessage();

        if(!Mage::getStoreConfig(Mage_Core_Block_Template::XML_PATH_TEMPLATE_ALLOW_SYMLINK)) {
            //add message about template symlinks
            $message .= "

" . //line break
                $helper->__(
                'Additionally, template symlinks are disabled. It is required to enable these for modules installed via modman. ' .
                'Please visit the Developer -> Template Settings section of '.
                'system configuration and set Allow Symlinks to Yes.',
                    Mage::getUrl('adminhtml/system_config/edit', array('section'=>'dev'))
            );
        }

        Mage::getSingleton('adminhtml/session')->addWarning($message);
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Berkeley, Grevillea 3(no. 27): 111 (1875)

#### Original name
Botrytis prasina Berk. & M.A. Curtis

### Remarks
null


text:
/*!
  jQuery BitMonetForm Plugin 0.1

  BitMonet configuration form to manage/generate settings.
*/

;(function($)
{
  function BitMonetForm(el, options)
  {
    this.el = el;

    // default settings for form
    this.default_settings = {
      homepage_url: '',
      bitpay_apikey: '',
      paypal_email: '',
      company_name: '',
      company_logo: '',
      article_pass: 0.1,
      hour_pass: 0.15,
      day_pass: 0.2,
      paypal_orders_above: 0.27,
      free_content_count: 0,
      button_color: '#f7931a',
      button_text_color: '#ffffff',
      offer_paypal: 0,
      enable_tweet: 0,
      tweet_text: '',
      show_delay: 0
    }

    this.options = $.extend(true, {}, {

      // settings definition for controls on the form
      settings: this.default_settings,

      // text definition in the form
      texts: {
        connect: 'Connect',
        your_homepage: 'Your Homepage',
        bitpay_apikey: 'BitPay API Key',
        paypal_email: 'PayPal Email',
        find_yours: 'Find yours',
        here: 'here',
        optional: 'Optional',
        customize: 'Customize',
        monetize: 'Monetize',
        company: 'Company',
        company_logo: 'Company Logo',
        please_select: 'Please select',
        article_pass: 'Article pass',
        hour_pass: 'Hour pass',
        day_pass: 'Day pass',
        free_content_count: 'Free Content Count',
        free_content_count_desc: 'Number of articles user has to click before the BitMonet dialog box is shown.',
        button_color: 'Button Color',
        button_text_color: 'Button Text Color',
        sign: '$',
        offer_paypal: 'Offer PayPal checkout for orders above',
        paypal_merchant_rates: 'See PayPal merchant rates',
        enable_tweet: 'Enable tweet to read for Article pass',
        tweet_text: 'Custom tweet text',
        tweet_text_desc: 'Leave blank if you want to use a page title.',
        show_delay: 'Paywall show delay',
        show_delay_desc: 'Delay showing the paywall by a specified amount of time. By default the paywall is shown immediately.',
        seconds: 'second(s)'
      },

      // called when form is initialized
      onInit: $.noop
    }, options);

    this.makeTemplate();

    this.options.onInit.call(this);
  }

  // methods
  var proto = BitMonetForm.prototype;

  // create template and insert it into DOM
  proto.makeTemplate = function()
  {
    var texts = this.options.texts,
      template = '\
      <form class="bmf-form">\
        <input type="hidden" name="bitmonetform" value="1" />\

' + texts.customize + '
\

\

\
            ' + texts.company + '	\
            \
              <input type="text" class="bmf-website" name="bmf_company_name" id="bmf_company_name" value="" />\
            	\

\

\
            ' + texts.company_logo + '	\
            \
              <input type="text" class="bmf-api-key" name="bmf_company_logo" placeholder="http://" id="bmf_company_logo" value="" />\
            	\

\

\
            ' + texts.button_color + '	\
            \
              <input type="text" name="bmf_button_color" id="bmf_button_color" class="bmf-color-picker" value="" />\
            	\

\

\
            ' + texts.button_text_color + '	\
            \
              <input type="text" name="bmf_button_text_color" id="bmf_button_text_color" class="bmf-color-picker" value="" />\
            	\

\

\

' + texts.monetize + '
\

\

\
            ' + texts.free_content_count + '	\
            \
              <input type="number" title="' + texts.free_content_count_desc + '" class="bmf-pass" name="bmf_free_content_count" id="bmf_free_content_count" value="" min="0" step="1" />\
            	\

\

\
            ' + texts.article_pass + '	\
            \
              ' + texts.sign + '\
              <input type="number" class="bmf-pass" name="bmf_article_pass" id="bmf_article_pass" value="" min="0.01" step="0.01" />\
            	\

\

\
            ' + texts.hour_pass + '	\
            \
              ' + texts.sign + '\
              <input type="number" class="bmf-pass" name="bmf_hour_pass" id="bmf_hour_pass" value="" min="0.01" step="0.01" />\
            	\

\

\
            ' + texts.day_pass + '	\
            \
              ' + texts.sign + '\
              <input type="number" class="bmf-pass" name="bmf_day_pass" id="bmf_day_pass" value="" min="0.01" step="0.01" />\
            	\

\

\
            \
              \
                <input type="checkbox" name="bmf_offer_paypal" id="bmf_offer_paypal" value="1" />\
                ' + texts.offer_paypal + '\
              \
              ' + texts.sign + '\
               <input type="number" class="bmf-pass" name="bmf_paypal_orders_above" id="bmf_paypal_orders_above" value="" min="0.01" step="0.01" />\

\
                ' + texts.paypal_merchant_rates + '\
                ' + texts.here + '\
              \
            	\

\

\
            \
              \
                <input type="checkbox" name="bmf_enable_tweet" id="bmf_enable_tweet" value="1" />\
                ' + texts.enable_tweet + '\
              \
            	\

\

\
            ' + texts.tweet_text + '	\
            \
              <input type="text" title="' + texts.tweet_text_desc + '" class="bmf-api-key" name="bmf_tweet_text" id="bmf_tweet_text" value="" />\
            	\

\

\
            ' + texts.show_delay + '	\
            \
              <input type="number" title="' + texts.show_delay_desc + '" class="bmf-pass" name="bmf_show_delay" id="bmf_show_delay" value="" min="0" step="1" /> ' + texts.seconds + '\
            	\

\

\

' + texts.connect + '
\

\

\
            ' + texts.your_homepage + '	\
            \
              <input type="text" class="bmf-website" name="bmf_homepage_url" id="bmf_homepage_url" value="" placeholder="www.yourwebsite.com" />\
            	\

\

\
            \
              \
                ' + texts.bitpay_apikey + '\
                \
                  ' + texts.find_yours + '\
                  ' + texts.here + '\
                \
              \
            	\
            \
              <input type="text" class="bmf-api-key" name="bmf_bitpay_apikey" id="bmf_bitpay_apikey" value="" />\
            	\

\

\
            \
              \
                ' + texts.paypal_email + '\
                \
                  ' + texts.optional + '\
                \
              \
            	\
            \
              <input type="text" class="bmf-api-key" name="bmf_paypal_email" id="bmf_paypal_email" value="" />\
            	\

\

\
      </form>';

    this.el.html(template);

    // get controls from template
    var $form = $('form', this.el);

    this.form = { this: $form }

    for(var i in this.default_settings)
      this.form[i] = $('#bmf_' + i, $form);

    this.setSettings();

    // bind controls
    $.minicolors.defaults.control = 'wheel';

    this.form.button_color.minicolors();
    this.form.button_text_color.minicolors();
  }

  // set settings for controls on the form
  proto.setSettings = function(settings)
  {
    if (typeof settings !== 'object')
      settings = this.options.settings;

    for(var i in settings)
      if (this.form.hasOwnProperty(i))
      {
        if (this.form[i][0].type == 'checkbox')
          this.form[i].prop('checked', parseInt(settings[i]));
        else
          this.form[i].val(settings[i]);
      }
  }

  // get settings
  proto.getSettings = function()
  {
    var settings = {};

    for(var i in this.default_settings)
    {
      if (this.form[i][0].type == 'checkbox')
        settings[i] = this.form[i].prop('checked')?1:0;
      else
        settings[i] = this.form[i].val();
    }

    return settings;
  }

  // generate bitmonet init script
  proto.getCode = function(extend)
  {
    var settings = this.getSettings(),
      sign = this.options.texts.sign,
      bitmonet_settings = $.extend(true, {
        company: settings.company_name,
        logo: settings.company_logo,
        homeLink: settings.homepage_url,
        numberClickedNeedBuy: settings.free_content_count,
        buttonColor: settings.button_color,
        buttonTextColor: settings.button_text_color,
        bitpayAPIKey: settings.bitpay_apikey,
        paypalEmail: settings.paypal_email,
        paypalOrderAbove: settings.paypal_orders_above,
        enableTweet: settings.enable_tweet,
        tweetText: settings.tweet_text,
        enablePaypal: settings.offer_paypal,
        showDelay: settings.show_delay,
        optionData: [
          {
            value: settings.article_pass * 100
          },
          {
            value: settings.hour_pass * 100
          },
          {
            value: settings.day_pass * 100
          }
        ]
      }, extend),
      code = '$.BitMonet(#settings);';

    return code.replace('#settings', JSON.stringify(bitmonet_settings, null, 2));
  }

  // do validation of controls on the form
  proto.doValidation = function()
  {
    var errors = [];

    $('input[type=text], input[type=number]', this.el).removeClass('bmf-error');

    if (this.form.homepage_url.val().length == 0)
      errors.push('homepage_url');

    if (this.form.bitpay_apikey.val().length == 0)
      errors.push('bitpay_apikey');

    if (this.form.company_name.val().length == 0)
      errors.push('company_name');

    var free_content_count = this.form.free_content_count.val();
    if (free_content_count < 0 || isNaN(free_content_count))
      errors.push('free_content_count');

    if (this.checkPriceInput(this.form.article_pass.val()))
      errors.push('article_pass');

    if (this.checkPriceInput(this.form.hour_pass.val()))
      errors.push('hour_pass');

    if (this.checkPriceInput(this.form.day_pass.val()))
      errors.push('day_pass');

    if (this.checkPriceInput(this.form.paypal_orders_above.val()))
      errors.push('paypal_orders_above');

    var show_delay = this.form.show_delay.val();
    if (show_delay < 0 || isNaN(show_delay))
      errors.push('show_delay');

    for(var i in errors)
      this.form[errors[i]].addClass('bmf-error');

    if (errors.length > 0)
    {
      $('html, body').animate({ scrollTop: this.el.offset().top });
      return false;
    }

    return true;
  }

  proto.checkPriceInput = function(value)
  {
    return isNaN(value) || value < 0.01?true:false;
  }

  // extend jquery
  $.fn.extend({
    BitMonetForm: function(options)
    {
      // minicolors plugin is required
      if (!$.minicolors)
      {
        throw 'jQuery MiniColors is required!';
        return this;
      }

      var inst = this.data('BitMonetForm');

      // if valid instance then perform calls on the class
      if (inst && options)
      {
        if (inst[options])
          return inst[options].apply(inst, Array.prototype.slice.call(arguments, 1));

        return inst;
      }
      else
      {
        inst = new BitMonetForm(this, options);
        this.data('BitMonetForm', inst);
      }

      // keep chain
      return this;
    }
  });

})(jQuery);


text:
#import "AdFlakeCustomAdView.h"
#import "AdFlakeView.h"
#import "AdFlakeCommon.h"

@implementation AdFlakeCustomAdView

@synthesize delegate;
@synthesize image;
@synthesize textLabel;
@synthesize redirectURL;
@synthesize clickMetricsURL;
@synthesize adType;
@synthesize launchType;
@synthesize animType;
@synthesize backgroundColor;
@synthesize textColor;

- (id)initWithDelegate:(id<AdFlakeCustomAdViewDelegate>)d
                  text:(NSString *)txt
           redirectURL:(NSURL *)rURL
       clickMetricsURL:(NSURL *)cURL
                adType:(AFCustomAdType)aType
            launchType:(AFCustomAdLaunchType)launch
              animType:(AFCustomAdWebViewAnimType)anim
       backgroundColor:(UIColor *)bgColor
             textColor:(UIColor *)fgColor {

	self = [super initWithFrame:kAdFlakeViewDefaultFrame];
	if (self != nil) {
		delegate = d;
		redirectURL = [rURL retain];
		clickMetricsURL = [cURL retain];
		adType = aType;
		launchType = launch;
		animType = anim;
		backgroundColor = [bgColor retain];
		textColor = [fgColor retain];

		if (adType == AFCustomAdTypeText) {
			textLabel = [[UILabel alloc] initWithFrame:CGRectMake(50, 0, 270, CGRectGetHeight(self.bounds))];
			textLabel.text = txt;
			textLabel.textColor = fgColor;
			textLabel.numberOfLines = 3;
			textLabel.backgroundColor = [UIColor clearColor];
			textLabel.font = [UIFont fontWithName:@"TrebuchetMS-Bold" size:13.0];
			[self addSubview:textLabel];
		}

		UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
		button.frame = self.bounds;
		button.showsTouchWhenHighlighted = YES;
		[button addTarget:self action:@selector(buttonTapUp:) forControlEvents:UIControlEventTouchUpInside];
		[self addSubview:button];
	}
	return self;
}

#define kNumBgColors	3
#define kImageLeft		4
#define kCornerRadius	7.0
#define kImageDim		39 // assume square, so this is length of each side
#define kChamferLight	[UIColor colorWithWhite:0.9 alpha:1].CGColor
#define kChamferDark	[UIColor colorWithWhite:0.4 alpha:1].CGColor

- (void)drawRect:(CGRect)rect {

	CGContextRef ctx = UIGraphicsGetCurrentContext();
	if (adType == AFCustomAdTypeText) {

		// draw background
		CGFloat locations[kNumBgColors] = {0.0, 0.7, 1.0};
		CGColorRef colorArray[kNumBgColors] =
		{[backgroundColor colorWithAlphaComponent:0.6].CGColor,
			backgroundColor.CGColor,
			backgroundColor.CGColor};
		CFArrayRef colors = CFArrayCreate(kCFAllocatorDefault,
										  (const void **)colorArray,
										  kNumBgColors,
										  &kCFTypeArrayCallBacks);
		CGGradientRef gradient = CGGradientCreateWithColors(NULL, colors, locations);
		CFRelease(colors);
		CGContextSetFillColorWithColor(ctx, [UIColor whiteColor].CGColor);
		CGContextFillRect(ctx, CGRectMake(0, 0, CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds)));
		CGPoint midY = CGPointMake(0.0, CGRectGetHeight(self.bounds)/2);
		CGPoint lowY = CGPointMake(0.0, CGRectGetHeight(self.bounds));
		CGContextDrawLinearGradient(ctx, gradient, CGPointZero, midY, 0);
		CGContextDrawLinearGradient(ctx, gradient, lowY, midY, 0);
		CGGradientRelease(gradient);

		// draw image and chamfer
		CGFloat imageTop = (CGRectGetHeight(self.bounds) - kImageDim)/2.0;
		CGPoint tl = CGPointMake(kImageLeft+kCornerRadius, imageTop+kCornerRadius);
		CGPoint tr = CGPointMake(kImageLeft+kImageDim-kCornerRadius, imageTop+kCornerRadius);
		CGPoint br = CGPointMake(kImageLeft+kImageDim-kCornerRadius, imageTop+kImageDim-kCornerRadius);
		CGPoint bl = CGPointMake(kImageLeft+kCornerRadius, imageTop+kImageDim-kCornerRadius);
		CGContextSaveGState(ctx);
		CGContextMoveToPoint(ctx, kImageLeft, imageTop+kCornerRadius);
		CGContextAddArc(ctx, tl.x, tl.y, kCornerRadius, M_PI, 3*M_PI/2, 0);
		CGContextAddArc(ctx, tr.x, tr.y, kCornerRadius, 3*M_PI/2, 0, 0);
		CGContextAddArc(ctx, br.x, br.y, kCornerRadius, 0, M_PI/2, 0);
		CGContextAddArc(ctx, bl.x, bl.y, kCornerRadius, M_PI/2, M_PI, 0);
		CGContextClosePath(ctx);
		CGContextClip(ctx);
		[image drawAtPoint:CGPointMake(kImageLeft, imageTop)];
		CGContextSetLineWidth(ctx, 0.5);
		CGContextMoveToPoint(ctx, kImageLeft, imageTop+kImageDim-kCornerRadius);
		CGContextSetStrokeColorWithColor(ctx, kChamferDark);
		CGContextAddArc(ctx, tl.x, tl.y, kCornerRadius, M_PI, 5*M_PI/4, 0);
		CGContextStrokePath(ctx);
		CGContextSetStrokeColorWithColor(ctx, kChamferLight);
		CGContextAddArc(ctx, tl.x, tl.y, kCornerRadius, 5*M_PI/4, 3*M_PI/2, 0);
		CGContextAddArc(ctx, tr.x, tr.y, kCornerRadius, 3*M_PI/2, 0, 0);
		CGContextAddArc(ctx, br.x, br.y, kCornerRadius, 0, M_PI/4, 0);
		CGContextStrokePath(ctx);
		CGContextSetStrokeColorWithColor(ctx, kChamferDark);
		CGContextAddArc(ctx, br.x, br.y, kCornerRadius, M_PI/4, M_PI/2, 0);
		CGContextAddArc(ctx, bl.x, bl.y, kCornerRadius, M_PI/2, M_PI, 0);
		CGContextStrokePath(ctx);
		CGContextRestoreGState(ctx);

	} // text ad
	else if (adType == AFCustomAdTypeBanner) {
		// draw image, place image in center of frame
		[image drawAtPoint:CGPointMake((self.frame.size.width-image.size.width)/2,
									   (self.frame.size.height-image.size.height)/2)];
	} // banner ad
}

- (void)dealloc {
	[image release], image = nil;
	[textLabel release], textLabel = nil;
	[redirectURL release], redirectURL = nil;
	[clickMetricsURL release], clickMetricsURL = nil;
	[backgroundColor release], backgroundColor = nil;
	[textColor release], textColor = nil;
	[super dealloc];
}

#pragma mark UIButton control events

- (void)buttonTapUp:(id)sender {
	if (delegate != nil) {
		[delegate adTapped:self];
	}
}

@end


text: services I can offer include


text:
package net.tridentsdk.entity.meta.living.golem;

import net.tridentsdk.base.BlockDirection;
import net.tridentsdk.base.Vector;

/**
 * @author TridentSDK
 * @since 0.5-alpha
 */
// TODO - documentation
public interface ShulkerMeta extends GolemMeta {

    BlockDirection getFacingDirection();

    void setFacingDirection(BlockDirection direction);

    Vector getAttachmentPosition();

    void setAttachmentPosition(Vector position);

    byte getShieldHeight();

    void setShieldHeight(byte height);

}


text:
package com.smashdown.android.common.util;

import android.util.Log;

import com.google.firebase.crash.FirebaseCrash;

import timber.log.Timber;

public class CrashReportingTree extends Timber.Tree {
    private static final String CRASHLYTICS_KEY_PRIORITY = "priority";
    private static final String CRASHLYTICS_KEY_TAG      = "tag";
    private static final String CRASHLYTICS_KEY_MESSAGE  = "message";

    @Override
    protected void log(int priority, String tag, String message, Throwable throwable) {
        if (priority < Log.ERROR) {
            return;
        }

        Throwable t = throwable != null ? throwable : new Exception(message);

        // Firebase Crash Reporting
        FirebaseCrash.logcat(priority, tag, message);
        FirebaseCrash.report(t);
    }
}


text:
package org.sisioh.aws4s.eb.model

import java.util.Date

import com.amazonaws.services.elasticbeanstalk.model.{ ApplicationVersionDescription, S3Location }
import org.sisioh.aws4s.PimpedType

object ApplicationVersionDescriptionFactory {

  def create() = new ApplicationVersionDescription()

}

class RichApplicationVersionDescription(val underlying: ApplicationVersionDescription)
    extends AnyVal with PimpedType[ApplicationVersionDescription] {

  def applicationNameOpt: Option[String] = Option(underlying.getApplicationName)

  def applicationNameOpt_=(value: Option[String]): Unit =
    underlying.setApplicationName(value.orNull)

  def withApplicationNameOpt(value: Option[String]): ApplicationVersionDescription =
    underlying.withApplicationName(value.orNull)

  // ---

  def descriptionOpt: Option[String] = Option(underlying.getDescription)

  def descriptionOpt_=(value: Option[String]): Unit =
    underlying.setDescription(value.orNull)

  def withDescriptionOpt(value: Option[String]): ApplicationVersionDescription =
    underlying.withDescription(value.orNull)

  // ---

  def versionLabelOpt: Option[String] = Option(underlying.getVersionLabel)

  def versionLabelOpt_=(value: Option[String]): Unit =
    underlying.setVersionLabel(value.orNull)

  def withVersionLabelOpt(value: Option[String]): ApplicationVersionDescription =
    underlying.withVersionLabel(value.orNull)

  // ---

  def sourceBundleOpt: Option[S3Location] = Option(underlying.getSourceBundle)

  def sourceBundleOpt_=(value: Option[S3Location]): Unit =
    underlying.setSourceBundle(value.orNull)

  def withSourceBundleOpt(value: Option[S3Location]): ApplicationVersionDescription =
    underlying.withSourceBundle(value.orNull)

  // ---

  def dateCreatedOpt: Option[Date] = Option(underlying.getDateCreated)

  def dateCreatedOpt_=(value: Option[Date]): Unit =
    underlying.setDateCreated(value.orNull)

  def withDateCreateOpt(value: Option[Date]): ApplicationVersionDescription =
    underlying.withDateCreated(value.orNull)

  // ---

  def dateUpdatedOpt: Option[Date] = Option(underlying.getDateUpdated)

  def dateUpdatedOpt_=(value: Option[Date]): Unit =
    underlying.setDateUpdated(value.orNull)

  def withDateUpdatedOpt(value: Option[Date]): ApplicationVersionDescription =
    underlying.withDateUpdated(value.orNull)

}


text:
fixmystreet-maintenance
=======================

Maintenance scripts for managing fixmystreet installation


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.maps.search.implementation.models;

import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpRequest;
import com.azure.core.http.rest.ResponseBase;

/** Contains all response data for the fuzzySearchBatch operation. */
public final class SearchesFuzzySearchBatchResponse
        extends ResponseBase<SearchesFuzzySearchBatchHeaders, SearchAddressBatchResult> {
    /**
     * Creates an instance of SearchesFuzzySearchBatchResponse.
     *
     * @param request the request which resulted in this SearchesFuzzySearchBatchResponse.
     * @param statusCode the status code of the HTTP response.
     * @param rawHeaders the raw headers of the HTTP response.
     * @param value the deserialized value of the HTTP response.
     * @param headers the deserialized headers of the HTTP response.
     */
    public SearchesFuzzySearchBatchResponse(
            HttpRequest request,
            int statusCode,
            HttpHeaders rawHeaders,
            SearchAddressBatchResult value,
            SearchesFuzzySearchBatchHeaders headers) {
        super(request, statusCode, rawHeaders, value, headers);
    }

    /**
     * Gets the deserialized response body.
     *
     * @return the deserialized response body.
     */
    @Override
    public SearchAddressBatchResult getValue() {
        return super.getValue();
    }
}


text:
<?php
/**
* Controller of Provider_Requester
*
* @author Surya
* @version 1.0
*/

class Provider_requester extends MY_Controller {

	function __construct() {
		parent::__construct();
		$this->load->helper(array('form','url'));           //check this
		$this->load->library('pagination');
	}

	/**
	* loads the provider page.
	* session value status set.
	* @param void
	* @return void
	*/
	public function index() {
		if($this->session->has_userdata('role','hybrid')) {
			$dataz['name'] = $this->session->userdata('name');
			$this->session->set_userdata('hybrid',true);
			$this->load->view('project/layout/header');
			redirect(base_url().'project/provider');
			$this->load->view('project/layout/footer');
		}
		else {
		$this->middle = 'project/home';
		$this->layout();

		}
	}

}


text: Sandbox for network science related stuff.


text:
#ifndef CHOICEARR_H
#define CHOICEARR_H

/*
----------------------------------------------------------------------
              I n c l u d e s
----------------------------------------------------------------------
*/

#include "tessarray.h"
#include "choices.h"

/*
----------------------------------------------------------------------
              T y p e s
----------------------------------------------------------------------
*/

typedef ARRAY CHOICES_LIST;

#define CHOICES_PER_LIST 40

/*
----------------------------------------------------------------------
              M a c r o s
----------------------------------------------------------------------
*/

/**********************************************************************
 * free_choice_list
 *
 * Free a list of choices. Free the array structure but not each of the
 * sublists of choices.
 **********************************************************************/

#define free_choice_list(choice_list)  \
array_free (choice_list)

/**********************************************************************
 * for_each_choice
 *
 * Iterate through each of the possible choices.
 **********************************************************************/

#define for_each_choice(array,index)  \
array_loop (array, index)

/**********************************************************************
 * free_all_choices
 *
 * Free an array of choices (deep free).
 **********************************************************************/

#define free_all_choices(choices,index)                      \
for_each_choice (choices, index) {                         \
	free_choices ((CHOICES) array_value (choices, index));  \
}                                                          \
array_free (choices)                                       \

/**********************************************************************
 * new_choice_list
 *
 * Return a new array structure that is a list of choices. Each set of
 * choices will be of type CHOICES.
 **********************************************************************/

#define new_choice_list()  \
array_new (CHOICES_PER_LIST)
#endif


text:
int main()
  {

  // Member function is const

  BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AnotherConstFunction)<AnotherType,int,boost::mpl::vector<AType *, short> >));

  return 0;

  }


text:
package java.lang;

public class IllegalAccessException extends Exception {
  public IllegalAccessException(String message) {
    super(message);
  }

  public IllegalAccessException() {
    super();
  }
}


text:
require_relative '../wssh'

module EventMachine::Wssh
module Client

  Title='Connect to WSSH server'

  Need=%w(faye/websocket)

  def self.help
    require_relative 'exe'
    puts <<-EOT
WSSH client

#{Exe.usage} ws[s]://host[:port]/uri
    EOT
    exit 1
  end

  def self.getopt
    help if ARGV.length!=1
    @uri=ARGV[0]
  end

  class Ws
    def initialize uri
      @buf=[]

      @ws=Faye::WebSocket::Client.new uri

      @ws.on :open do |event| onopen end
      @ws.on :message do |event| onmessage event.data end
      @ws.on :close do |event| onclose end
      @ws.on :error do |error| onerror error end
    end

    def queue data
      if @buf
        @buf << data
      else
        @ws.send data
      end
    end

    def onopen
      @buf.each{|data| @ws.send data}
      @buf=nil
    end

    def onmessage data
      print data.pack 'C*'
    end

    def onclose
      bye
    end

    def onerror error
      bye
    end

    def bye
      @ws.close if @ws
      @ws=nil
      @buf=nil
      EM.stop_event_loop
    end
  end

  module Stdio
    def initialize ws
      @ws = ws
    end

    def receive_data data
      @ws.queue data.unpack 'C*'
    end

    def unbind
      @ws.bye
    end
  end

  def self.listen!
    EM.attach $stdin, Stdio, Ws.new(@uri)
  end

  def self.loop!
    self::Need.each{|f| require f}
    EM.run{ listen! }
  end

  def self.go!
    getopt
    STDOUT.sync=true
    loop!
  end
end
end


text:
sample-diff
====================================
[![Build Status](https://img.shields.io/travis/17zuoye/sample-diff/master.svg?style=flat)](https://travis-ci.org/17zuoye/sample-diff)

"Sample diff" diffs two big files with a few of them, and require only one IO per file.
The sample algorithm is called [Reservoir sampling](http://en.wikipedia.org/wiki/Reservoir_sampling).

Example
------------------------------------
```javascript
var SampleDiff = require('sample-diff');

var opts = {
  'fetch_item_id_func' : function(line1) {
       return parseInt(line1.match(/uid\": ?([0-9]+)[,\}]/)[1]);
  },
  'diff_items_func'   : function(a, b) {
       console.log(difflet.compare(a, b), "\n")
       return _.isEqual(a, b);
   },
   'data_normalization_func'  : function(line1) {
       item1 = process(line1);
       return item1;
   },
   'filter_func' : function(line1) {
       return false;
   }
};

var checker = SampleDiff(fileA, fileB, sample_count, opts);

checker.run(function(result) {
  // process result
});
```

INSTALL
------------------------------------
```bash
npm install sample-diff -g --verbose
```

Development & Test
------------------------------------
```bash
# install node and npm
npm install --global --verbose grunt-cli
npm install --global --verbose grunt-contrib-coffee
npm install --verbose # install deps
grunt --verbose # compile coffee scripts

npm test
```

License
------------------------------------
MIT. David Chen @ 17zuoye.


text:
package org.auraframework.impl.java.model;

import org.auraframework.system.Annotations.AuraEnabled;
import org.auraframework.system.Annotations.Model;

@Model
public class TestModel2 {
    private String thirdThing = "thirdThingDefault";

    @AuraEnabled
    public String getThirdThing() {
        return thirdThing;
    }

    public void setThirdThing(String thirdThing) {
        this.thirdThing = thirdThing;
    }

    @AuraEnabled
    public String getReadOnlyThing() {
        return "readonlyFromTestController2";
    }
}