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

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

    <title>Statistics module — statstuff 0.1 documentation</title>

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

    <link rel="top" title="statstuff 0.1 documentation" href="index.html" />

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

  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

Statistics module¶

statstuff.statistics.average(values)[source]¶

Calculates the average value from a list of numbers

Args:

values (list)

Returns:

float: The average value

statstuff.statistics.correlation(a, b)[source]¶

Calculates the Pearson’s correlation between two sets of values

Args:

a Set of values

b Set of values

Returns:

float: The Pearson’s correlation value

statstuff.statistics.median(values)[source]¶

Returns the central (median) value of a list.
If the list has an even amount of numbers,
then the average of the two
central numbers shall be returned.

Args:

values (list)

Returns:

float: The central value

statstuff.statistics.range(values)[source]¶

Returns the range from the minimum to the maximum value
contained within a given list.

Args:

values (list)

Returns:

float: The range of values

statstuff.statistics.range_limits(values)[source]¶

Returns the smallest and the greatest values
contained within a given list.

Args:

values (list)

Returns:

tuple: the smallest and the greatest values

statstuff.statistics.stdev(values)[source]¶

Returns the standard deviation from a list of numbers.

Args:

values (list)

Returns:

float: The standart deviation

statstuff.statistics.sum(values)[source]¶

Returns the sum of all values in a list.

Args:

values (list)

Returns:

float: The sum of all values

statstuff.statistics.variance(values)[source]¶

Returns the variance of the values in a list.

Args:

values (list)

Returns:

float: The variance of the values

Related Topics

Documentation overview

This Page

Show Source

Quick search

    <form class="search" action="search.html" method="get">

<input type="text" name="q" />

<input type="submit" value="Go" />

      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

      ©2016, Lucas Mauro.

      |
      Powered by Sphinx 1.4.6
      & Alabaster 0.7.9

      |
      Page source


text:
class PolymorphicNoun(object):
    # TODO: Doc
    def __init__(self, singular, plural):
        self.singular = singular
        self.plural = plural

    def decline(self, quantity=1):
        # TODO: Doc
        if quantity == 1:
            return self.singular
        elif (quantity > 1) or (quantity == 0):
            return self.plural
        else:
            raise ValueError('Cannot decline negative quantity.')

    def identify(self, definite=False, quantity=1, specific=False):
        # TODO: Doc
        if quantity < 0:
            raise ValueError('Quantity must not be negative')

        if definite:
            if quantity == 1:
                return 'the ' + self.singular
            else:
                if specific:
                    return 'the ' + str(quantity) + ' ' + self.plural
                else:
                    return 'the ' + self.plural
        else:
            if quantity == 1:
                article = 'an' if self.singular[0] in 'aeiou' else 'a'
                return article + ' ' + self.singular
            else:
                if specific:
                    return str(quantity) + ' ' + self.plural
                else:
                    return 'some ' + self.plural

thing = PolymorphicNoun('thing', 'things')
assert thing.decline(1) == 'thing'
assert thing.decline(0) == 'things'
assert thing.decline(60) == 'things'
assert thing.identify() == 'a thing'
assert thing.identify(definite=False, quantity=1) == 'a thing'
assert thing.identify(definite=False, quantity=2, specific=False) == 'some things'
assert thing.identify(definite=False, quantity=2, specific=True) == '2 things'

'''
thing
- thing[s|...] (decline)
- a(n) thing (d=F, q=1, s=X)
- some things (d=F, q=+, s=F)
- {count} things (d=F, q=+, s=T)
- the thing (d=T, q=1, s=X)
- the thing[s|...] (d=T, q=+, s=F)
- the {count} thing[s|...] (d=T, q=+, s=T)
'''

redpajama_set_name: RedPajamaGithub


text:
import numpy as np
from keras.layers import Layer, InputSpec
from keras import initializers, regularizers, constraints
import keras.backend as K
from .bn import ComplexBN as complex_normalization
from .bn import sqrt_init

def layernorm(x, axis, epsilon, gamma, beta):
    # assert self.built, 'Layer must be built before being called'
    input_shape = K.shape(x)
    reduction_axes = list(range(K.ndim(x)))
    del reduction_axes[axis]
    del reduction_axes[0]
    broadcast_shape = [1] * K.ndim(x)
    broadcast_shape[axis] = input_shape[axis]
    broadcast_shape[0] = K.shape(x)[0]

    # Perform normalization: centering and reduction

    mean = K.mean(x, axis=reduction_axes)
    broadcast_mean = K.reshape(mean, broadcast_shape)
    x_centred = x - broadcast_mean
    variance  = K.mean(x_centred ** 2, axis=reduction_axes) + epsilon
    broadcast_variance = K.reshape(variance, broadcast_shape)

    x_normed = x_centred / K.sqrt(broadcast_variance)

    # Perform scaling and shifting

    broadcast_shape_params = [1] * K.ndim(x)
    broadcast_shape_params[axis] = K.shape(x)[axis]
    broadcast_gamma  = K.reshape(gamma, broadcast_shape_params)
    broadcast_beta  = K.reshape(beta,  broadcast_shape_params)

    x_LN = broadcast_gamma * x_normed + broadcast_beta

    return x_LN

class LayerNormalization(Layer):

    def __init__(self,
                 epsilon=1e-4,
                 axis=-1,
                 beta_init='zeros',
                 gamma_init='ones',
                 gamma_regularizer=None,
                 beta_regularizer=None,
                 **kwargs):

        self.supports_masking = True
        self.beta_init = initializers.get(beta_init)
        self.gamma_init = initializers.get(gamma_init)
        self.epsilon = epsilon
        self.axis = axis
        self.gamma_regularizer = regularizers.get(gamma_regularizer)
        self.beta_regularizer = regularizers.get(beta_regularizer)

        super(LayerNormalization, self).__init__(**kwargs)

    def build(self, input_shape):
        self.input_spec = InputSpec(ndim=len(input_shape),
                                    axes={self.axis: input_shape[self.axis]})
        shape = (input_shape[self.axis],)

        self.gamma = self.add_weight(shape,
                                     initializer=self.gamma_init,
                                     regularizer=self.gamma_regularizer,
                                     name='{}_gamma'.format(self.name))
        self.beta = self.add_weight(shape,
                                    initializer=self.beta_init,
                                    regularizer=self.beta_regularizer,
                                    name='{}_beta'.format(self.name))

        self.built = True

    def call(self, x, mask=None):
        assert self.built, 'Layer must be built before being called'
        return layernorm(x, self.axis, self.epsilon, self.gamma, self.beta)

    def get_config(self):
        config = {'epsilon':           self.epsilon,
                  'axis':              self.axis,
                  'gamma_regularizer': self.gamma_regularizer.get_config() if self.gamma_regularizer else None,
                  'beta_regularizer':  self.beta_regularizer.get_config()  if self.beta_regularizer  else None
                  }
        base_config = super(LayerNormalization, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))

class ComplexLayerNorm(Layer):
    def __init__(self,
                 epsilon=1e-4,
                 axis=-1,
                 center=True,
                 scale=True,
                 beta_initializer='zeros',
                 gamma_diag_initializer=sqrt_init,
                 gamma_off_initializer='zeros',
                 beta_regularizer=None,
                 gamma_diag_regularizer=None,
                 gamma_off_regularizer=None,
                 beta_constraint=None,
                 gamma_diag_constraint=None,
                 gamma_off_constraint=None,
                 **kwargs):

        self.supports_masking = True
        self.epsilon = epsilon
        self.axis = axis
        self.center = center
        self.scale = scale
        self.beta_initializer = initializers.get(beta_initializer)
        self.gamma_diag_initializer = initializers.get(gamma_diag_initializer)
        self.gamma_off_initializer = initializers.get(gamma_off_initializer)
        self.beta_regularizer = regularizers.get(beta_regularizer)
        self.gamma_diag_regularizer = regularizers.get(gamma_diag_regularizer)
        self.gamma_off_regularizer = regularizers.get(gamma_off_regularizer)
        self.beta_constraint = constraints.get(beta_constraint)
        self.gamma_diag_constraint = constraints.get(gamma_diag_constraint)
        self.gamma_off_constraint = constraints.get(gamma_off_constraint)
        super(ComplexLayerNorm, self).__init__(**kwargs)

    def build(self, input_shape):

        ndim = len(input_shape)
        dim = input_shape[self.axis]
        if dim is None:
            raise ValueError('Axis ' + str(self.axis) + ' of '
                             'input tensor should have a defined dimension '
                             'but the layer received an input with shape ' +
                             str(input_shape) + '.')
        self.input_spec = InputSpec(ndim=len(input_shape),
                                    axes={self.axis: dim})

        gamma_shape = (input_shape[self.axis] // 2,)
        if self.scale:
            self.gamma_rr = self.add_weight(
                shape=gamma_shape,
                name='gamma_rr',
                initializer=self.gamma_diag_initializer,
                regularizer=self.gamma_diag_regularizer,
                constraint=self.gamma_diag_constraint
            )
            self.gamma_ii = self.add_weight(
                shape=gamma_shape,
                name='gamma_ii',
                initializer=self.gamma_diag_initializer,
                regularizer=self.gamma_diag_regularizer,
                constraint=self.gamma_diag_constraint
            )
            self.gamma_ri = self.add_weight(
                shape=gamma_shape,
                name='gamma_ri',
                initializer=self.gamma_off_initializer,
                regularizer=self.gamma_off_regularizer,
                constraint=self.gamma_off_constraint
            )
        else:
            self.gamma_rr = None
            self.gamma_ii = None
            self.gamma_ri = None

        if self.center:
            self.beta = self.add_weight(shape=(input_shape[self.axis],),
                                        name='beta',
                                        initializer=self.beta_initializer,
                                        regularizer=self.beta_regularizer,
                                        constraint=self.beta_constraint)
        else:
            self.beta = None

        self.built = True

    def call(self, inputs):
        input_shape = K.shape(inputs)
        ndim = K.ndim(inputs)
        reduction_axes = list(range(ndim))
        del reduction_axes[self.axis]
        del reduction_axes[0]
        input_dim = input_shape[self.axis] // 2
        mu = K.mean(inputs, axis=reduction_axes)
        broadcast_mu_shape = [1] * ndim
        broadcast_mu_shape[self.axis] = input_shape[self.axis]
        broadcast_mu_shape[0] = K.shape(inputs)[0]
        broadcast_mu = K.reshape(mu, broadcast_mu_shape)
        if self.center:
            input_centred = inputs - broadcast_mu
        else:
            input_centred = inputs
        centred_squared = input_centred ** 2
        if (self.axis == 1 and ndim != 3) or ndim == 2:
            centred_squared_real = centred_squared[:, :input_dim]
            centred_squared_imag = centred_squared[:, input_dim:]
            centred_real = input_centred[:, :input_dim]
            centred_imag = input_centred[:, input_dim:]
        elif ndim == 3:
            centred_squared_real = centred_squared[:, :, :input_dim]
            centred_squared_imag = centred_squared[:, :, input_dim:]
            centred_real = input_centred[:, :, :input_dim]
            centred_imag = input_centred[:, :, input_dim:]
        elif self.axis == -1 and ndim == 4:
            centred_squared_real = centred_squared[:, :, :, :input_dim]
            centred_squared_imag = centred_squared[:, :, :, input_dim:]
            centred_real = input_centred[:, :, :, :input_dim]
            centred_imag = input_centred[:, :, :, input_dim:]
        elif self.axis == -1 and ndim == 5:
            centred_squared_real = centred_squared[:, :, :, :, :input_dim]
            centred_squared_imag = centred_squared[:, :, :, :, input_dim:]
            centred_real = input_centred[:, :, :, :, :input_dim]
            centred_imag = input_centred[:, :, :, :, input_dim:]
        else:
            raise ValueError(
                'Incorrect Layernorm combination of axis and dimensions. axis should be either 1 or -1. '
                'axis: ' + str(self.axis) + '; ndim: ' + str(ndim) + '.'
            )
        if self.scale:
            Vrr = K.mean(
                centred_squared_real,
                axis=reduction_axes
            ) + self.epsilon
            Vii = K.mean(
                centred_squared_imag,
                axis=reduction_axes
            ) + self.epsilon
            # Vri contains the real and imaginary covariance for each feature map.
            Vri = K.mean(
                centred_real * centred_imag,
                axis=reduction_axes,
            )
        elif self.center:
            Vrr = None
            Vii = None
            Vri = None
        else:
            raise ValueError('Error. Both scale and center in batchnorm are set to False.')

        return complex_normalization(
            input_centred, Vrr, Vii, Vri,
            self.beta, self.gamma_rr, self.gamma_ri,
            self.gamma_ii, self.scale, self.center,
            layernorm=True, axis=self.axis
        )

    def get_config(self):
        config = {
            'axis': self.axis,
            'epsilon': self.epsilon,
            'center': self.center,
            'scale': self.scale,
            'beta_initializer': initializers.serialize(self.beta_initializer),
            'gamma_diag_initializer': initializers.serialize(self.gamma_diag_initializer),
            'gamma_off_initializer': initializers.serialize(self.gamma_off_initializer),
            'beta_regularizer': regularizers.serialize(self.beta_regularizer),
            'gamma_diag_regularizer': regularizers.serialize(self.gamma_diag_regularizer),
            'gamma_off_regularizer': regularizers.serialize(self.gamma_off_regularizer),
            'beta_constraint': constraints.serialize(self.beta_constraint),
            'gamma_diag_constraint': constraints.serialize(self.gamma_diag_constraint),
            'gamma_off_constraint': constraints.serialize(self.gamma_off_constraint),
        }
        base_config = super(ComplexLayerNorm, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))


text:
package com.kotcrab.vis.ui.widget;

import com.badlogic.gdx.scenes.scene2d.ui.ButtonGroup;
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
import com.kotcrab.vis.ui.VisUI;

/**
 * Similar to {@link VisCheckBox} however uses round (instead of square) button {@link Drawable}. Note that if you
 * want to achieve 'select only one option' behaviour you need to use {@link ButtonGroup}.
 * @author Kotcrab
 * @see VisCheckBox
 */
public class VisRadioButton extends VisCheckBox {
	public VisRadioButton (String text) {
		this(text, VisUI.getSkin().get("radio", VisCheckBoxStyle.class));
	}

	public VisRadioButton (String text, VisCheckBoxStyle style) {
		super(text, style);
	}
}


text:
package com.android.google.gcm;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.AsyncTask;
import android.support.annotation.NonNull;
import android.util.Log;

import com.google.android.gms.gcm.GoogleCloudMessaging;

import java.io.IOException;

/**
 * Utility class that allows to simplify the procedures of registration, checking and storing of the
 * registration id for the GCM service.
 */
public class GCMRegister {

    static final String TAG = GCMRegister.class.getSimpleName();

    public static final String EXTRA_MESSAGE = "message";
    public static final String PROPERTY_REG_ID = "registration_id";
    private static final String PROPERTY_APP_VERSION = "appVersion";
    private static final int PLAY_SERVICES_RESOLUTION_REQUEST = 9000;

    /**
     * @return Application's {@code SharedPreferences}.
     */
    private static SharedPreferences getGcmPreferences(Context context) {
        // This sample app persists the registration ID in shared preferences, but
        // how you store the regID in your app is up to you.
        return context.getSharedPreferences(GCMRegister.class.getSimpleName(), Context.MODE_PRIVATE);
    }

    /**
     * Gets the current registration ID for application on GCM service, if there is one.
     *

     * If result is empty, the app needs to register.
     *
     * @return registration ID, or empty string if there is no existing registration ID.
     */
    public static String getRegistrationId(Context context) {
        final SharedPreferences prefs = getGcmPreferences(context);
        String registrationId = prefs.getString(PROPERTY_REG_ID, "");
        if (registrationId.isEmpty()) {
            Log.i(TAG, "Registration not found.");
            return "";
        }
        // Check if app was updated; if so, it must clear the registration ID
        // since the existing regID is not guaranteed to work with the new
        // app version.
        int registeredVersion = prefs.getInt(PROPERTY_APP_VERSION, Integer.MIN_VALUE);
        int currentVersion = getAppVersion(context);
        if (registeredVersion != currentVersion) {
            Log.i(TAG, "App version changed.");
            return "";
        }
        return registrationId;
    }

    /**
     * Registers the application with GCM servers asynchronously.
     *

     * Stores the registration ID and the app versionCode in the application's
     * shared preferences.
     */
    public static void register(@NonNull final Context context, @NonNull final String senderID, final OnRegisterCallback onRegisterCallback) {
        new AsyncTask<Void, Void, Void>() {
            @Override
            protected Void doInBackground(Void... params) {
                try {
                    GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context.getApplicationContext());
                    String regid = gcm.register(senderID);
                    Log.d(TAG, "Device registered, registration ID=" + regid);
                    storeRegistrationId(context, regid);
                    if(onRegisterCallback != null) {
                        onRegisterCallback.onRegister(regid);
                    }
                } catch (IOException ex) {
                    Log.d(TAG, "Error :" + ex.getMessage());
                }
                return null;
            }
        }.execute(null, null, null);
    }

    /**
     * Unregisters the application from GCM servers asynchronously.
     *

     * Delete the stored registration ID and the app versionCode from
     * the application's shared preferences.
     */
    public static void unregister(@NonNull final Context context, final OnUnregisterCallback onUnregisterCallback) {
        new AsyncTask<Void, Void, Void>() {
            @Override
            protected Void doInBackground(Void... params) {
                try {
                    GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context.getApplicationContext());
                    gcm.unregister();
                    removeRegistrationId(context);
                    Log.d(TAG, "Device unregistered");
                    if(onUnregisterCallback != null) {
                        onUnregisterCallback.onUnregister();
                    }
                } catch (IOException ex) {
                    Log.d(TAG, "Error :" + ex.getMessage());
                }
                return null;
            }
        }.execute(null, null, null);
    }

    /**
     * Stores the registration ID and the app versionCode in the application's
     * {@code SharedPreferences}.
     *
     * @param context application's context.
     * @param regId   registration ID
     */
    private static void storeRegistrationId(Context context, String regId) {
        final SharedPreferences prefs = getGcmPreferences(context);
        int appVersion = getAppVersion(context);
        Log.i(TAG, "Saving regId on app version " + appVersion);
        SharedPreferences.Editor editor = prefs.edit();
        editor.putString(PROPERTY_REG_ID, regId);
        editor.putInt(PROPERTY_APP_VERSION, appVersion);
        editor.commit();
    }

    /**
     * Remove the stored registration ID and the app versionCode from the application's
     * {@code SharedPreferences}.
     *
     * @param context application's context.
     */
    private static void removeRegistrationId(Context context) {
        final SharedPreferences prefs = getGcmPreferences(context);
        SharedPreferences.Editor editor = prefs.edit();
        editor.remove(PROPERTY_REG_ID);
        editor.remove(PROPERTY_APP_VERSION);
        editor.commit();
    }

    /**
     * @return Application's version code from the {@code PackageManager}.
     */
    private static int getAppVersion(Context context) {
        try {
            PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
            return packageInfo.versionCode;
        } catch (PackageManager.NameNotFoundException e) {
            throw new RuntimeException("Could not get package name: " + e); // should never happen
        }
    }

    /**
     * Callback for the registration phase
     */
    public interface OnRegisterCallback {
        /**
         * Perform any kind of operation after the successful registration.
         * Do not care about the permanent storing of the information, it is already performed
         *
         * @param registrationID registration identifier assigned from the Google Platform
         */
        public void onRegister(String registrationID);
    }

    /**
     * Callback for the registration phase
     */
    public interface OnUnregisterCallback {
        /**
         * Perform any kind of operation after the successful unregistration.
         * Do not care about the permanent storing of the information, it is already performed
         */
        public void onUnregister();
    }
}


text:
ActiveRecord::Schema.define(version: 20170711212824) do

  # These are extensions that must be enabled in order to support this database
  enable_extension "plpgsql"
  enable_extension "uuid-ossp"

  create_table "acts_as_having_has_as", force: :cascade do |t|
    t.string   "haser_type"
    t.integer  "haser_id"
    t.string   "hased_type"
    t.integer  "hased_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "acts_as_relating_to_relationship_invitations", force: :cascade do |t|
    t.integer  "sender_id"
    t.string   "sender_type"
    t.integer  "recipient_id"
    t.string   "recipient_type"
    t.integer  "status",         default: 0
    t.integer  "role_id"
    t.datetime "created_at",                 null: false
    t.datetime "updated_at",                 null: false
  end

  create_table "acts_as_relating_to_relationships", force: :cascade do |t|
    t.integer  "owner_id"
    t.string   "owner_type"
    t.integer  "in_relation_to_id"
    t.string   "in_relation_to_type"
    t.datetime "created_at",          null: false
    t.datetime "updated_at",          null: false
  end

  create_table "acts_as_relating_to_roles", force: :cascade do |t|
    t.string   "name"
    t.string   "display_name"
    t.datetime "created_at",   null: false
    t.datetime "updated_at",   null: false
    t.string   "reciprocal"
  end

  create_table "app_collaborators_access_grants", force: :cascade do |t|
    t.integer  "app_client_id"
    t.string   "code"
    t.datetime "created_at",        null: false
    t.datetime "updated_at",        null: false
    t.integer  "resource_owner_id"
    t.integer  "access_token_id"
  end

  create_table "app_collaborators_access_tokens", force: :cascade do |t|
    t.integer  "application_id"
    t.string   "application_type"
    t.integer  "resource_owner_id"
    t.string   "token"
    t.string   "refresh_token"
    t.integer  "expires_in"
    t.datetime "revoked_at"
    t.datetime "created_at",        null: false
    t.datetime "updated_at",        null: false
    t.uuid     "uuid"
    t.uuid     "application_uuid"
  end

  create_table "app_collaborators_api_service_transactions", force: :cascade do |t|
    t.integer  "api_service_id"
    t.integer  "app_client_id"
    t.string   "result_status"
    t.string   "result"
    t.datetime "created_at",     null: false
    t.datetime "updated_at",     null: false
  end

  create_table "app_collaborators_app_clients", force: :cascade do |t|
    t.string   "name"
    t.string   "secret"
    t.text     "redirect_uri"
    t.datetime "created_at",   null: false
    t.datetime "updated_at",   null: false
    t.string   "display_name"
    t.string   "api_key"
    t.uuid     "uuid"
  end

  create_table "app_collaborators_app_providers", force: :cascade do |t|
    t.string   "name"
    t.string   "uri"
    t.string   "base_path"
    t.string   "uuid"
    t.string   "secret"
    t.datetime "created_at",      null: false
    t.datetime "updated_at",      null: false
    t.string   "app_client_type"
    t.integer  "app_client_id"
  end

  create_table "app_collaborators_scopes", force: :cascade do |t|
    t.string   "code"
    t.string   "display_text"
    t.datetime "created_at",   null: false
    t.datetime "updated_at",   null: false
  end

  create_table "bars", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "foos", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "haz_as", force: :cascade do |t|
    t.string   "hazer_type"
    t.integer  "hazer_id"
    t.string   "hazed_type"
    t.integer  "hazed_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "taggings", force: :cascade do |t|
    t.integer  "tag_id"
    t.integer  "taggable_id"
    t.string   "taggable_type"
    t.integer  "tagger_id"
    t.string   "tagger_type"
    t.string   "context",       limit: 128
    t.datetime "created_at"
  end

  add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true, using: :btree
  add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree

  create_table "tags", force: :cascade do |t|
    t.string  "name"
    t.integer "taggings_count", default: 0
  end

  add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree

end


text:
title: "My opinion on Netlify's service"
date: 2017-10-28T16:06:23+02:00
draft: false
author: Hamid Rahimi
---

>What did you think of our service during the time you used it?  Be honest!  "it sucked" isn't a wrong answer unless you don't elaborate and provide some constructive criticism ;)

Fucking A! I didn't expect the auto-publishing function. It's amazing that all I have to do on my computer is push to git and it get's published instantly.
<!--more-->

I honestly fell in love with the automated platform. The incredible super optimized servers and the super fast loading of sites have definitely made me a customer regardless of my job application. Ease of use of the development tools was an enjoyement as well.

I thoroughly enjoyed the simple, yet easily navigable UI. As well as the splendid documentation pages with videos.


text:
#include "qxlibcursor.h"

#include "qxlibintegration.h"
#include "qxlibscreen.h"
#include "qxlibwindow.h"
#include "qxlibdisplay.h"

#include <QtGui/QBitmap>

#include <X11/cursorfont.h>

QT_BEGIN_NAMESPACE

QXlibCursor::QXlibCursor(QXlibScreen *screen)
    : QPlatformCursor(screen)
{
}

void QXlibCursor::changeCursor(QCursor *cursor, QWidget *widget)
{
    QXlibWindow *w = 0;
    if (widget) {
        QWidget *window = widget->window();
        w = static_cast<QXlibWindow*>(window->platformWindow());
    } else {
        // No X11 cursor control when there is no widget under the cursor
        return;
    }

    if (!w)
        return;

    int id = cursor->handle();

    Cursor c;
    if (!cursorMap.contains(id)) {
        if (cursor->shape() == Qt::BitmapCursor)
            c = createCursorBitmap(cursor);
        else
            c = createCursorShape(cursor->shape());
        if (!c) {
            return;
        }
        cursorMap.insert(id, c);
    } else {
        c = cursorMap.value(id);
    }

    w->setCursor(c);
}

Cursor QXlibCursor::createCursorBitmap(QCursor * cursor)
{
    XColor bg, fg;
    bg.red   = 255 << 8;
    bg.green = 255 << 8;
    bg.blue  = 255 << 8;
    fg.red   = 0;
    fg.green = 0;
    fg.blue  = 0;
    QPoint spot = cursor->hotSpot();
    Window rootwin = testLiteScreen()->rootWindow();

    QImage mapImage = cursor->bitmap()->toImage().convertToFormat(QImage::Format_MonoLSB);
    QImage maskImage = cursor->mask()->toImage().convertToFormat(QImage::Format_MonoLSB);

    int width = cursor->bitmap()->width();
    int height = cursor->bitmap()->height();
    int bytesPerLine = mapImage.bytesPerLine();
    int destLineSize = width / 8;
    if (width % 8)
        destLineSize++;

    const uchar * map = mapImage.bits();
    const uchar * mask = maskImage.bits();

    char * mapBits = new char[height * destLineSize];
    char * maskBits = new char[height * destLineSize];
    for (int i = 0; i < height; i++) {
        memcpy(mapBits + (destLineSize * i),map + (bytesPerLine * i), destLineSize);
        memcpy(maskBits + (destLineSize * i),mask + (bytesPerLine * i), destLineSize);
    }

    Pixmap cp = XCreateBitmapFromData(testLiteScreen()->display()->nativeDisplay(), rootwin, mapBits, width, height);
    Pixmap mp = XCreateBitmapFromData(testLiteScreen()->display()->nativeDisplay(), rootwin, maskBits, width, height);
    Cursor c = XCreatePixmapCursor(testLiteScreen()->display()->nativeDisplay(), cp, mp, &fg, &bg, spot.x(), spot.y());
    XFreePixmap(testLiteScreen()->display()->nativeDisplay(), cp);
    XFreePixmap(testLiteScreen()->display()->nativeDisplay(), mp);
    delete[] mapBits;
    delete[] maskBits;

    return c;
}

Cursor QXlibCursor::createCursorShape(int cshape)
{
    Cursor cursor = 0;

    if (cshape < 0 || cshape > Qt::LastCursor)
        return 0;

    switch (cshape) {
    case Qt::ArrowCursor:
        cursor =  XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_left_ptr);
        break;
    case Qt::UpArrowCursor:
        cursor =  XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_center_ptr);
        break;
    case Qt::CrossCursor:
        cursor =  XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_crosshair);
        break;
    case Qt::WaitCursor:
        cursor =  XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_watch);
        break;
    case Qt::IBeamCursor:
        cursor =  XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_xterm);
        break;
    case Qt::SizeAllCursor:
        cursor =  XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_fleur);
        break;
    case Qt::PointingHandCursor:
        cursor =  XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_hand2);
        break;
    case Qt::SizeBDiagCursor:
        cursor =  XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_top_right_corner);
        break;
    case Qt::SizeFDiagCursor:
        cursor =  XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_bottom_right_corner);
        break;
    case Qt::SizeVerCursor:
    case Qt::SplitVCursor:
        cursor = XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_sb_v_double_arrow);
        break;
    case Qt::SizeHorCursor:
    case Qt::SplitHCursor:
        cursor = XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_sb_h_double_arrow);
        break;
    case Qt::WhatsThisCursor:
        cursor = XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_question_arrow);
        break;
    case Qt::ForbiddenCursor:
        cursor = XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_circle);
        break;
    case Qt::BusyCursor:
        cursor = XCreateFontCursor(testLiteScreen()->display()->nativeDisplay(), XC_watch);
        break;

    default: //default cursor for all the rest
        break;
    }
    return cursor;
}

QXlibScreen * QXlibCursor::testLiteScreen() const
{
    return static_cast<QXlibScreen *>(screen);
}

QT_END_NAMESPACE


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

package com.google.cloud.compute.v1;

public interface GetGlobalAddressRequestOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.compute.v1.GetGlobalAddressRequest)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Name of the address resource to return.
   *

   *
   * string address = 462920692 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The address.
   */
  java.lang.String getAddress();
  /**
   *
   *
   *

   * Name of the address resource to return.
   *

   *
   * string address = 462920692 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The bytes for address.
   */
  com.google.protobuf.ByteString getAddressBytes();

  /**
   *
   *
   *

   * Project ID for this request.
   *

   *
   * string project = 227560217 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The project.
   */
  java.lang.String getProject();
  /**
   *
   *
   *

   * Project ID for this request.
   *

   *
   * string project = 227560217 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The bytes for project.
   */
  com.google.protobuf.ByteString getProjectBytes();
}


text:
angular.module('app.home')
	.controller('SideNavController', SideNavController)

function SideNavController($mdSidenav, $rootScope){
	var self = this;
	self.$mdSidenav = $mdSidenav;

	self.openNav = function(){
		self.$mdSidenav('left').open();
	}

	self.closeNav = function(){
		self.$mdSidenav('left').close();
	}

}
SideNavController.$inject = ['$mdSidenav', '$rootScope'];


text:
package backend

import "github.com/coreos/etcd/Godeps/_workspace/src/github.com/boltdb/bolt"

// TODO: support syscall.MAP_POPULATE in windows.
// Need upstream patch from boltdb/bolt.
var boltOpenOptions *bolt.Options = nil


text:
class AddIsReadyToInstances < ActiveRecord::Migration
  def self.up
    add_column :instances, :is_ready, :boolean, :default => false
  end

  def self.down
    remove_column :instances, :is_ready
  end
end


text:
from sanic import Sanic
from sanic.response import json

app = Sanic(__name__)

q = [] #Global queue will hold incoming messages until they're fetched

@app.route("/") #Twilio requests here to send a new message
async def index(request):
    msg = {"message": request.args.get("Body"), "number": request.args.get("From")}
    q.append(msg)
    print(q) #debug
    response = json({"response": "ok"})
    return response

@app.route("/pop") #Browser requests here to get any new messages
async def pop(request):
    response = json(q)
    response.headers["Access-Control-Allow-Origin"] = "*" #allow demo from local file
    q.clear()
    return response

app.run(host="0.0.0.0", port=8000)


text:
@import url(/css/default/common.css);
@import url(/css/default/layout.css);

@import url(/css/default/main.css);


text:
<?php

namespace pho\Expectation\Matcher;

interface MatcherInterface
{
    /**
     * The method should return true if the match succeeds.
     *
     * @param  mixed      $actual The actual value to match against
     * @return boolean    Returns true if the desired match succeeds, else false
     * @throws \Exception If $actual isn't of an expected type
     */
    public function match($actual);

    /**
     * The method should return an error message indicating why the match would
     * have failed. If the optional parameter $negated is true, it should
     * return a message corresponding to the negative match.
     *
     * @param  boolean $negated Whether to print a message corresponding
     *                          to the positive match or its negated
     * @return string  The error message
     */
    public function getFailureMessage($negated = false);
}


text:
namespace EIDSS.Reports.Parameterized.Uni.EventLog
{
    partial class EventLogReport
    {

        #region Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EventLogReport));
            this.tableHeader = new DevExpress.XtraReports.UI.XRTable();
            this.rowHeader1 = new DevExpress.XtraReports.UI.XRTableRow();
            this.cellDateTime = new DevExpress.XtraReports.UI.XRTableCell();
            this.cellType = new DevExpress.XtraReports.UI.XRTableCell();
            this.cellPerson = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
            this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
            this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
            this.tableData = new DevExpress.XtraReports.UI.XRTable();
            this.RowData = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
            this.sp_rep_UNI_EventLogTableAdapter1 = new EIDSS.Reports.Parameterized.Uni.EventLog.EventLogDataSetTableAdapters.sp_rep_UNI_EventLogTableAdapter();
            this.eventLogDataSet1 = new EIDSS.Reports.Parameterized.Uni.EventLog.EventLogDataSet();
            ((System.ComponentModel.ISupportInitialize)(this.tableInterval)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.m_BaseDataSet)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tableBaseHeader)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tableHeader)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tableData)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.eventLogDataSet1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            //
            // tableInterval
            //
            resources.ApplyResources(this.tableInterval, "tableInterval");
            this.tableInterval.StylePriority.UseBorders = false;
            this.tableInterval.StylePriority.UseFont = false;
            this.tableInterval.StylePriority.UsePadding = false;
            //
            // cellLanguage
            //
            this.cellLanguage.StylePriority.UseTextAlignment = false;
            //
            // lblReportName
            //
            resources.ApplyResources(this.lblReportName, "lblReportName");
            this.lblReportName.StylePriority.UseBorders = false;
            this.lblReportName.StylePriority.UseBorderWidth = false;
            this.lblReportName.StylePriority.UseFont = false;
            this.lblReportName.StylePriority.UseTextAlignment = false;
            //
            // Detail
            //
            resources.ApplyResources(this.Detail, "Detail");
            this.Detail.StylePriority.UseFont = false;
            this.Detail.StylePriority.UsePadding = false;
            //
            // PageHeader
            //
            this.PageHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.tableHeader});
            this.PageHeader.StylePriority.UseFont = false;
            this.PageHeader.StylePriority.UsePadding = false;
            //
            // PageFooter
            //
            this.PageFooter.StylePriority.UseBorders = false;
            //
            // ReportHeader
            //
            resources.ApplyResources(this.ReportHeader, "ReportHeader");
            //
            // xrPageInfo1
            //
            resources.ApplyResources(this.xrPageInfo1, "xrPageInfo1");
            this.xrPageInfo1.StylePriority.UseBorders = false;
            //
            // cellReportHeader
            //
            this.cellReportHeader.StylePriority.UseBorders = false;
            this.cellReportHeader.StylePriority.UseFont = false;
            this.cellReportHeader.StylePriority.UseTextAlignment = false;
            this.cellReportHeader.Weight = 2.2994485515985108D;
            //
            // cellBaseSite
            //
            this.cellBaseSite.StylePriority.UseBorders = false;
            this.cellBaseSite.StylePriority.UseFont = false;
            this.cellBaseSite.StylePriority.UseTextAlignment = false;
            this.cellBaseSite.Weight = 2.2994485515985108D;
            //
            // cellBaseCountry
            //
            this.cellBaseCountry.StylePriority.UseFont = false;
            this.cellBaseCountry.Weight = 1.6891816919536407D;
            //
            // cellBaseLeftHeader
            //
            this.cellBaseLeftHeader.Weight = 1.6891816919536407D;
            //
            // tableBaseHeader
            //
            resources.ApplyResources(this.tableBaseHeader, "tableBaseHeader");
            this.tableBaseHeader.StylePriority.UseBorders = false;
            this.tableBaseHeader.StylePriority.UseBorderWidth = false;
            this.tableBaseHeader.StylePriority.UseFont = false;
            this.tableBaseHeader.StylePriority.UsePadding = false;
            this.tableBaseHeader.StylePriority.UseTextAlignment = false;
            //
            // tableHeader
            //
            this.tableHeader.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
            | DevExpress.XtraPrinting.BorderSide.Right)
            | DevExpress.XtraPrinting.BorderSide.Bottom)));
            resources.ApplyResources(this.tableHeader, "tableHeader");
            this.tableHeader.Name = "tableHeader";
            this.tableHeader.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.rowHeader1,
            this.xrTableRow3});
            this.tableHeader.StylePriority.UseBorders = false;
            this.tableHeader.StylePriority.UseFont = false;
            this.tableHeader.StylePriority.UseTextAlignment = false;
            //
            // rowHeader1
            //
            this.rowHeader1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.cellDateTime,
            this.cellType,
            this.cellPerson});
            resources.ApplyResources(this.rowHeader1, "rowHeader1");
            this.rowHeader1.Name = "rowHeader1";
            this.rowHeader1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            this.rowHeader1.StylePriority.UseFont = false;
            this.rowHeader1.StylePriority.UsePadding = false;
            this.rowHeader1.StylePriority.UseTextAlignment = false;
            this.rowHeader1.Weight = 0.4329004329004329D;
            //
            // cellDateTime
            //
            resources.ApplyResources(this.cellDateTime, "cellDateTime");
            this.cellDateTime.Name = "cellDateTime";
            this.cellDateTime.StylePriority.UseFont = false;
            this.cellDateTime.Weight = 0.68740112079440219D;
            //
            // cellType
            //
            resources.ApplyResources(this.cellType, "cellType");
            this.cellType.Name = "cellType";
            this.cellType.StylePriority.UseFont = false;
            this.cellType.StylePriority.UseTextAlignment = false;
            this.cellType.Weight = 0.68740112079440219D;
            //
            // cellPerson
            //
            resources.ApplyResources(this.cellPerson, "cellPerson");
            this.cellPerson.Name = "cellPerson";
            this.cellPerson.StylePriority.UseFont = false;
            this.cellPerson.StylePriority.UseTextAlignment = false;
            this.cellPerson.Weight = 0.69030245026717763D;
            //
            // xrTableRow3
            //
            this.xrTableRow3.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
            | DevExpress.XtraPrinting.BorderSide.Right)
            | DevExpress.XtraPrinting.BorderSide.Bottom)));
            this.xrTableRow3.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell3,
            this.xrTableCell4,
            this.xrTableCell5});
            this.xrTableRow3.Name = "xrTableRow3";
            this.xrTableRow3.StylePriority.UseBorders = false;
            this.xrTableRow3.Weight = 0.28860028860028863D;
            //
            // xrTableCell3
            //
            resources.ApplyResources(this.xrTableCell3, "xrTableCell3");
            this.xrTableCell3.Name = "xrTableCell3";
            this.xrTableCell3.StylePriority.UseFont = false;
            this.xrTableCell3.Weight = 0.68740112079440219D;
            //
            // xrTableCell4
            //
            resources.ApplyResources(this.xrTableCell4, "xrTableCell4");
            this.xrTableCell4.Name = "xrTableCell4";
            this.xrTableCell4.StylePriority.UseFont = false;
            this.xrTableCell4.Weight = 0.68740112079440219D;
            //
            // xrTableCell5
            //
            resources.ApplyResources(this.xrTableCell5, "xrTableCell5");
            this.xrTableCell5.Name = "xrTableCell5";
            this.xrTableCell5.StylePriority.UseFont = false;
            this.xrTableCell5.Weight = 0.69030245026717763D;
            //
            // DetailReport
            //
            this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
            this.Detail1});
            this.DetailReport.DataAdapter = this.sp_rep_UNI_EventLogTableAdapter1;
            this.DetailReport.DataMember = "spRepUniEventLog";
            this.DetailReport.DataSource = this.eventLogDataSet1;
            this.DetailReport.Level = 0;
            this.DetailReport.Name = "DetailReport";
            //
            // Detail1
            //
            this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.tableData});
            resources.ApplyResources(this.Detail1, "Detail1");
            this.Detail1.Name = "Detail1";
            //
            // tableData
            //
            this.tableData.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
            | DevExpress.XtraPrinting.BorderSide.Bottom)));
            resources.ApplyResources(this.tableData, "tableData");
            this.tableData.Name = "tableData";
            this.tableData.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.RowData});
            this.tableData.StylePriority.UseBorders = false;
            this.tableData.StylePriority.UseFont = false;
            this.tableData.StylePriority.UseTextAlignment = false;
            //
            // RowData
            //
            this.RowData.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell1,
            this.xrTableCell2,
            this.xrTableCell6});
            resources.ApplyResources(this.RowData, "RowData");
            this.RowData.Name = "RowData";
            this.RowData.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            this.RowData.StylePriority.UseFont = false;
            this.RowData.StylePriority.UsePadding = false;
            this.RowData.StylePriority.UseTextAlignment = false;
            this.RowData.Weight = 0.4329004329004329D;
            //
            // xrTableCell1
            //
            this.xrTableCell1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepUniEventLog.datEventDatatime", "{0:dd/MM/yyyy}")});
            resources.ApplyResources(this.xrTableCell1, "xrTableCell1");
            this.xrTableCell1.Name = "xrTableCell1";
            this.xrTableCell1.StylePriority.UseFont = false;
            this.xrTableCell1.Weight = 0.68740112079440219D;
            //
            // xrTableCell2
            //
            this.xrTableCell2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepUniEventLog.strEventTypeName")});
            resources.ApplyResources(this.xrTableCell2, "xrTableCell2");
            this.xrTableCell2.Name = "xrTableCell2";
            this.xrTableCell2.StylePriority.UseFont = false;
            this.xrTableCell2.StylePriority.UseTextAlignment = false;
            this.xrTableCell2.Weight = 0.68740112079440219D;
            //
            // xrTableCell6
            //
            this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "spRepUniEventLog.strPersonName")});
            resources.ApplyResources(this.xrTableCell6, "xrTableCell6");
            this.xrTableCell6.Name = "xrTableCell6";
            this.xrTableCell6.StylePriority.UseFont = false;
            this.xrTableCell6.StylePriority.UseTextAlignment = false;
            this.xrTableCell6.Weight = 0.69030245026717763D;
            //
            // sp_rep_UNI_EventLogTableAdapter1
            //
            this.sp_rep_UNI_EventLogTableAdapter1.ClearBeforeFill = true;
            //
            // eventLogDataSet1
            //
            this.eventLogDataSet1.DataSetName = "EventLogDataSet";
            this.eventLogDataSet1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
            //
            // EventLogReport
            //
            this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
            this.Detail,
            this.PageHeader,
            this.PageFooter,
            this.DetailReport,
            this.ReportHeader});

            this.Landscape = false;
            this.PageHeight = 1169;
            this.PageWidth = 827;
            this.Version = "11.1";
            this.Controls.SetChildIndex(this.ReportHeader, 0);
            this.Controls.SetChildIndex(this.DetailReport, 0);
            this.Controls.SetChildIndex(this.PageFooter, 0);
            this.Controls.SetChildIndex(this.PageHeader, 0);
            this.Controls.SetChildIndex(this.Detail, 0);
            ((System.ComponentModel.ISupportInitialize)(this.tableInterval)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.m_BaseDataSet)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tableBaseHeader)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tableHeader)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tableData)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.eventLogDataSet1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();

        }

        #endregion

        private DevExpress.XtraReports.UI.XRTable tableHeader;
        private DevExpress.XtraReports.UI.XRTableRow rowHeader1;
        private DevExpress.XtraReports.UI.XRTableCell cellType;
        private DevExpress.XtraReports.UI.XRTableCell cellPerson;
        private DevExpress.XtraReports.UI.DetailReportBand DetailReport;
        private DevExpress.XtraReports.UI.DetailBand Detail1;
        private DevExpress.XtraReports.UI.XRTableCell cellDateTime;
        private DevExpress.XtraReports.UI.XRTableRow xrTableRow3;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
        private DevExpress.XtraReports.UI.XRTable tableData;
        private DevExpress.XtraReports.UI.XRTableRow RowData;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell6;
        private EventLogDataSet eventLogDataSet1;
        private EventLogDataSetTableAdapters.sp_rep_UNI_EventLogTableAdapter sp_rep_UNI_EventLogTableAdapter1;

    }
}


text:
Ext.namespace('Gemma');

/**
 * need to set geneId as config
 */
Gemma.GeneDetails = Ext.extend(Ext.Panel, {

    padding: 10,
    defaults: {
        border: false,
        flex: 0
    },
    layoutConfig: {
        align: 'stretch'
    },
    layout: 'vbox',

    /**
     * @private
     * @param homologues
     * @param mainGeneSymbol
     * @returns {String}
     */
    renderHomologues: function (homologues, mainGeneSymbol) {
        var homologueStr = '';
        if (homologues && homologues.length > 0) {
            homologues.sort(function (a, b) {
                var A = a.taxonCommonName.toLowerCase();
                var B = b.taxonCommonName.toLowerCase();
                if (A  B)
                    return 1;
                return 0;
            });

            var j, homologue;
            for (j = 0; j < homologues.length; j++) {
                homologue = homologues[j];
                homologueStr += ""
                    + homologue.officialSymbol
                    + " ["
                    + homologue.taxonCommonName
                    + "]   ";
            }
        } else {
            homologueStr = "None defined"; // or if not available...
        }
        return homologueStr;
    },

    /**
     * @private
     * @param geneSets
     * @returns {Array}
     */
    renderGeneSets: function (geneSets) {
        var geneSetLinks = [];
        if (geneSets != null && geneSets.length > 0) {
            geneSets.sort(function (a, b) {
                var A = a.name.toLowerCase();
                var B = b.name.toLowerCase();
                if (A  B)
                    return 1;
                return 0;
            });

            for (var i = 0; i < geneSets.length; i++) {
                if (geneSets[i] && geneSets[i].name && geneSets[i].id) {
                    geneSetLinks.push('' + geneSets[i].name + '');
                }
            }
        } else {
            geneSetLinks.push('Not currently a member of any gene group');
        }
        return geneSetLinks;
    },

    /**
     * @private
     * @param geneDetails
     * @returns {String}
     */
    renderMultifunctionality: function (geneDetails) {

        var text;
        if (geneDetails.multifunctionalityRank) {
            text = geneDetails.numGoTerms + " GO Terms; Overall multifunctionality "
                + geneDetails.multifunctionalityRank.toFixed(2);
            text += " ";
        } else {
            text = "[ Not available ]";
        }

        return new Ext.Panel({
            border: false,
            html: text,
            listeners: {
                'afterrender': function (c) {
                    jQuery('#multifuncHelp').qtip({
                        content: Gemma.HelpText.WidgetDefaults.GeneDetails.multifuncTT,
                        style: {
                            name: 'cream'
                        }
                    });
                }
            }
        });
    },

    /**
     * @memberOf Gemma.GeneDetailsTab
     * @private
     * @param geneDetails
     * @returns {String}
     */
    renderPhenotypes: function (geneDetails) {
        var text;
        if (geneDetails.phenotypes && geneDetails.phenotypes.length > 0) {
            var phenotypes = geneDetails.phenotypes;
            phenotypes.sort(function (a, b) {
                var A = a.value.toLowerCase();
                var B = b.value.toLowerCase();
                if (A  B)
                    return 1;
                return 0;
            });
            var i = 0;
            var text = '';
            var limit = Math.min(3, phenotypes.length);
            for (i = 0; i < limit; i++) {
                text += '' + phenotypes[i].value + '';
                if ((i + 1) !== limit) {
                    text += ', ';
                }
            }
            if (limit < phenotypes.length) {
                text += ', ' + (phenotypes.length - limit) + ' more';
            }
            text += " ";

        } else {
            text = "[ None ]";
        }

        return new Ext.Panel({
            border: false,
            html: text,
            listeners: {
                'afterrender': function (c) {
                    jQuery('#phenotypeHelp').qtip({
                        content: Gemma.HelpText.WidgetDefaults.GeneDetails.phenotypeTT,
                        style: {
                            name: 'cream'
                        }
                    });
                }
            }
        });

    },

    changeTab: function (tabName) {
        this.fireEvent('changeTab', tabName);
    },

    /**
     * @private
     * @param geneDetails
     * @returns {Ext.Panel}
     */
    renderNodeDegree: function (geneDetails) {

        if (geneDetails.nodeDegreesPos && geneDetails.nodeDegreesPos.length > 1) {
            // Note: we need a panel here so we can pick up the rendering event so jquery can do its work.
            return new Ext.Panel(
                {
                    border: false,
                    html: '... Max support '
                    + (geneDetails.nodeDegreesPos.length - 1)
                    + " ",
                    listeners: {
                        'afterrender': function (c) {
                            /*
                             * Compute cumulative counts
                             */
                            var cumul = [];
                            cumul[geneDetails.nodeDegreesPos.length - 1] = 0;
                            for (var j = geneDetails.nodeDegreesPos.length - 1; j >= 0; j--) {
                                cumul[j - 1] = geneDetails.nodeDegreesPos[j] + cumul[j];
                            }
                            cumul.pop();

                            var cumulNeg = [];
                            if (geneDetails.nodeDegreesNeg.length > 0) {
                                cumulNeg[geneDetails.nodeDegreesNeg.length - 1] = 0;
                                for (var j = geneDetails.nodeDegreesNeg.length - 1; j >= 0; j--) {
                                    cumulNeg[j - 1] = geneDetails.nodeDegreesNeg[j] + cumulNeg[j];
                                }
                                cumulNeg.pop();
                            }

                            /*
                             * Build array of arrays for plot
                             */
                            var nd = []; // support values
                            var ndr = []; // relative ranks

                            var max = -1;
                            for (var i = 0; i < cumul.length; i++) {
                                var v = Math.log(cumul[i] + 0.01) / Math.log(10.0);
                                nd.push([i + 1, v]);
                                ndr.push([i + 1, , geneDetails.nodeDegreePosRanks[i]]);
                                if (v > max) {
                                    max = v;
                                }
                            }

                            var ndneg = [];
                            var ndrneg = [];
                            for (var i = 0; i < cumulNeg.length; i++) {
                                var v = Math.log(cumulNeg[i] + 0.01) / Math.log(10.0);
                                ndneg.push([i + 1,]);
                                ndrneg.push([i + 1, geneDetails.nodeDegreeNegRanks[i]]);
                                if (v > max) {
                                    max = v;
                                }
                            }

                            jQuery('#nodeDegreeSpark').sparkline(
                                nd,
                                {
                                    height: 40,
                                    chartRangeMin: -1,
                                    chartRangeMax: max,
                                    width: 150,
                                    tooltipFormatter: function (spl, ops, fields) {
                                        if (fields.y) {
                                            return "Positive correlation links at support level " + fields.x
                                                + " or higher = " + Math.pow(10, fields.y).toFixed(0)
                                                + "  (Plot is log10 scaled)";
                                        } else {
                                            return "";
                                        }
                                    }
                                });

                            // plot negative links on same axis
                            if (cumulNeg.length > 0) {
                                jQuery('#nodeDegreeSpark').sparkline(
                                    ndneg,
                                    {
                                        composite: true,
                                        height: 40,
                                        chartRangeMin: -1,
                                        chartRangeMax: max,
                                        width: 150,
                                        tooltipFormatter: function (spl, ops, fields) {
                                            if (fields.y) {
                                                return " Negative correlation links at support level " + fields.x
                                                    + " or higher = " + Math.pow(10, fields.y).toFixed(0)
                                                    + "  (Plot is log10 scaled)";
                                            } else {
                                                return "";
                                            }
                                        }
                                    });
                            }
                            jQuery("#nodeDegreeHelp").qtip({
                                content: Gemma.HelpText.WidgetDefaults.GeneDetails.nodeDegreeTT,
                                style: {
                                    name: 'cream'
                                }
                            });

                        }
                    }
                });
        } else {
            // unavailable; show help anyway.
            return new Ext.Panel({
                border: false,
                html: "[ Not available ]",
                listeners: {
                    'afterrender': function (c) {
                        jQuery("#nodeDegreeHelp").qtip({
                            content: Gemma.HelpText.WidgetDefaults.GeneDetails.nodeDegreeTT,
                            style: {
                                name: 'cream'
                            }
                        });
                    }
                }
            });
        }
    },

    /**
     * @private
     * @param aliases
     * @returns
     */
    renderAliases: function (aliases) {
        if (aliases != null && aliases.length > 0) {
            aliases.sort();
            return aliases.join(', ');
        }
        return 'None available';
    },

    initComponent: function () {
        Gemma.GeneDetails.superclass.initComponent.call(this);

        // need to do this on render so we can show a load mask
        this.on('afterrender', function () {
            if (!this.loadMask && this.getEl()) {
                this.loadMask = new Ext.LoadMask(this.getEl(), {
                    msg: Gemma.StatusText.Loading.generic,
                    msgCls: 'absolute-position-loading-mask ext-el-mask-msg x-mask-loading'
                });
            }
            this.loadMask.show();

            GeneController.loadGeneDetails(this.geneId, function (geneDetails) {
                this.loadMask.hide();
                this.add([
                    {
                        html: '
'
                        + geneDetails.name
                        + '
'
                        + geneDetails.officialName
                        + '  '
                        + '

'

                    },
                    {
                        layout: 'form',
                        labelWidth: 105,
                        labelAlign: 'right',
                        labelSeparator: ':',
                        labelStyle: 'font-weight:bold;',
                        flex: 1,
                        defaults: {
                            border: false
                        },

                        items: [
                            {
                                fieldLabel: 'Taxon',
                                html: geneDetails.taxonCommonName
                            },
                            {
                                fieldLabel: 'Aliases',
                                html: this.renderAliases(geneDetails.aliases)
                            },

                            {
                                fieldLabel: 'Homologues',
                                html: this.renderHomologues(geneDetails.homologues,
                                    geneDetails.name)
                            },
                            {
                                fieldLabel: 'Gene Groups',
                                html: this.renderGeneSets(geneDetails.geneSets).join(', ')
                            },
                            {
                                fieldLabel: 'Functions'
                                + ' ',
                                items: this.renderMultifunctionality(geneDetails)
                            },
                            {
                                fieldLabel: 'Coexpression'
                                + ' ',
                                items: this.renderNodeDegree(geneDetails)
                            },
                            {
                                fieldLabel: 'Phenotypes  ',
                                items: this.renderPhenotypes(geneDetails),
                                hidden: !(geneDetails.taxonId == 1 || geneDetails.taxonId == 2
                                    || geneDetails.taxonId == 3 || geneDetails.taxonId == 13 || geneDetails.taxonId == 14)
                            },

                            {
                                fieldLabel: 'Elements'
                                + '  ',
                                items: new Ext.Panel(
                                    {
                                        border: false,
                                        html: geneDetails.compositeSequenceCount
                                        + " on "
                                        + geneDetails.platformCount
                                        + " different platforms "
                                        + " ",
                                        listeners: {
                                            'afterrender': function (c) {
                                                jQuery('#elementsHelp')
                                                    .qtip(
                                                        {
                                                            content: Gemma.HelpText.WidgetDefaults.GeneDetails.probesTT,
                                                            style: {
                                                                name: 'cream'
                                                            }
                                                        });
                                            }
                                        }
                                    })
                            }
                        ]
                    }]);
                this.syncSize();
            }.createDelegate(this));
        });
    }
});


text:
<?php  $errors = $this->session->flashdata('errors');?>
<!DOCTYPE html>

		<meta charset="utf-8"/>
		<title></title>
		<link rel="stylesheet" type="text/css" href="/assets/stylesheets/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="/assets/stylesheets/signin.css">
		<link rel="stylesheet" type="text/css" href="/assets/stylesheets/index.css">
		<meta name="description" content="insert description"/>

<?php   if($this->session->userdata('id'))
		{ ?>

				        Cart
				        Sign Out
				        My Account
				        Home

<?php	}?>
<?php 	if(!$this->session->userdata('id'))
		{ ?>

						Cart
				        Sign In

<?php  	} ?>

          	<form class="form-signin" action="/Users/login" method="post">

Login

<?php 		if(isset($errors['email']))
			{ ?>
			 	<?php echo $errors['email'];?>
<?php		} ?>
<?php 		if(isset($errors['errors']))
			{ ?>
			 	<?php echo $errors['errors'];?>
<?php		} ?>
            <input type="text" name="email" class="form-control" placeholder="Email" required autofocus>
<?php 		if(isset($errors['password']))
			{ ?>
			 	<?php echo $errors['password'];?>
<?php		} ?>
            <input type="password" name="password" class="form-control" placeholder="Password" required>
            <button class="btn btn-lg btn-primary btn-block" type="submit">Login</button>

Don't have an account? Register here

          </form>

      				About Us
      				Contact Us

© 2016 HealthyNinja


text:
"""gallery URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.staticfiles.urls import static

from .settings import MEDIA_URL, MEDIA_ROOT

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^', include('showcase.urls', namespace='showcase'))
]

urlpatterns += static(MEDIA_URL, document_root=MEDIA_ROOT)


text:
"""
    Talon.One API

    Use the Talon.One API to integrate with your application and to manage applications and campaigns:  - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns.  ## Determining the base URL of the endpoints  The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}`   # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""

from __future__ import absolute_import

import unittest
import datetime

import talon_one
from talon_one.models.new_referral import NewReferral  # noqa: E501
from talon_one.rest import ApiException

class TestNewReferral(unittest.TestCase):
    """NewReferral unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional):
        """Test NewReferral
            include_option is a boolean, when False only required
            params are included, when True both required and
            optional params are included """
        # model = talon_one.models.new_referral.NewReferral()  # noqa: E501
        if include_optional :
            return NewReferral(
                start_date = '2020-11-10T23:00Z',
                expiry_date = '2021-11-10T23:00Z',
                usage_limit = 1,
                campaign_id = 78,
                advocate_profile_integration_id = 'URNGV8294NV',
                friend_profile_integration_id = 'BZGGC2454PA',
                attributes = None
            )
        else :
            return NewReferral(
                campaign_id = 78,
                advocate_profile_integration_id = 'URNGV8294NV',
        )

    def testNewReferral(self):
        """Test NewReferral"""
        inst_req_only = self.make_instance(include_optional=False)
        inst_req_and_optional = self.make_instance(include_optional=True)

if __name__ == '__main__':
    unittest.main()


text:
package main.swapship.components.player;

import com.artemis.Component;

/**
 * Component holding onto the names of the sprites that make up this Entity
 * @author Brandon
 *
 */
public class ShipSpritesComp implements Component {

	public String topName;
	public String midName;
	public String botName;

	/**
	 *
	 * @param topName
	 * @param midName
	 * @param botName
	 */
	public void setValues(String topName, String midName, String botName) {
		this.topName = topName;
		this.midName = midName;
		this.botName = botName;
	}

	public void setTop(String topName) {
		this.topName = topName;
	}

	public void setMid(String midName) {
		this.midName = midName;
	}

	public void setBot(String botName) {
		this.botName = botName;
	}

	@Override
	public void reset() {
		this.topName = this.botName = this.midName = "";
	}

}


text:
namespace LionFire.Vos.Mounts
{
    public class VobMountOptions
    {
        // UNUSED - REVIEW
        public bool AllowMultiMounts { get; set; }

        // UNUSED - REVIEW
        /// <summary>
        /// False if mounts are sealed
        /// </summary>
        public bool AllowMounts { get; set; }

        public bool IsFrozen { get; set; } // TODO Implement - how?
    }
}


text:
namespace ash {

class EasyUnlockClient;

namespace multidevice {

// Concrete SecureMessageDelegate implementation.
// Note: Callbacks are guaranteed to *not* be invoked after
// SecureMessageDelegateImpl is destroyed.
class SecureMessageDelegateImpl : public SecureMessageDelegate {
 public:
  class Factory {
   public:
    static std::unique_ptr<SecureMessageDelegate> Create();
    static void SetFactoryForTesting(Factory* test_factory);

   protected:
    virtual ~Factory();
    virtual std::unique_ptr<SecureMessageDelegate> CreateInstance() = 0;

   private:
    static Factory* test_factory_instance_;
  };

  SecureMessageDelegateImpl(const SecureMessageDelegateImpl&) = delete;
  SecureMessageDelegateImpl& operator=(const SecureMessageDelegateImpl&) =
      delete;

  ~SecureMessageDelegateImpl() override;

  // SecureMessageDelegate:
  void GenerateKeyPair(GenerateKeyPairCallback callback) override;
  void DeriveKey(const std::string& private_key,
                 const std::string& public_key,
                 DeriveKeyCallback callback) override;
  void CreateSecureMessage(const std::string& payload,
                           const std::string& key,
                           const CreateOptions& create_options,
                           CreateSecureMessageCallback callback) override;
  void UnwrapSecureMessage(const std::string& serialized_message,
                           const std::string& key,
                           const UnwrapOptions& unwrap_options,
                           UnwrapSecureMessageCallback callback) override;

 private:
  SecureMessageDelegateImpl();

  // Processes results returned from the dbus client, if necessary, and invokes
  // the SecureMessageDelegate callbacks with the processed results. Note: When
  // invoking dbus client methods, we bind these functions to a weak pointer to
  // ensure that these functions are not called after the
  // SecureMessageDelegateImpl object is destroyed.
  void OnGenerateKeyPairResult(GenerateKeyPairCallback callback,
                               const std::string& private_key,
                               const std::string& public_key);
  void OnDeriveKeyResult(DeriveKeyCallback callback,
                         const std::string& derived_key);
  void OnCreateSecureMessageResult(CreateSecureMessageCallback callback,
                                   const std::string& secure_message);
  void OnUnwrapSecureMessageResult(UnwrapSecureMessageCallback callback,
                                   const std::string& unwrap_result);

  // Not owned by this instance.
  EasyUnlockClient* dbus_client_;

  base::WeakPtrFactory<SecureMessageDelegateImpl> weak_ptr_factory_{this};
};

}  // namespace multidevice
}  // namespace ash

#endif  // CHROMEOS_ASH_COMPONENTS_MULTIDEVICE_SECURE_MESSAGE_DELEGATE_IMPL_H_