text:
import { $currentDate, $inc, $max, $min, $mul, $rename, $set, $timestamp, $unset } from './field';
import { create } from './operator';

const positional = (field?: number | string) => {
  if (typeof field === 'undefined') {
    return '$';
  }

  const isIndex = typeof field === 'number' || /^\d+/.test(field);
  if (isIndex) {
    return field.toString();
  }

  const isAll = field.startsWith('[');
  if (isAll) {
    return `$${field}`;
  }

  if (field === '') {
    return '$';
  }

  return `$.${field}`;
};

type Union<A, B> = {
  [k in keyof A | keyof B]: k extends keyof A ? A[k] : k extends keyof B ? B[k] : never;
};

const combine = <T, U, V>(value: T, chain1?: (v: T) => U, chain2?: (v: T) => V) =>
  create('$push', value, {
    ...chain1?.(value),
    ...chain2?.(value),
  } as Union<U, V>);

const position =
  <T, U, V>(chain1?: (v: T) => U, chain2?: (v: T) => V) =>
  (value: T) =>
    create('$push', value, {
      /**
       * Specifies the location in the array at which the `$push` operator inserts elements.
       * @see https://www.mongodb.com/docs/manual/reference/operator/update/position/
       * @param index zero-based index
       *
       * @example
       * ```ts
       * // insert element `10` at position 1 in the array
       * flatten({ scores: $push(10).$each().$position(1) });
       * ```
       */
      $position: (index: number) => combine({ ...value, $position: index }, chain1, chain2),
    });

const slice =
  <T, U, V>(chain1?: (v: T) => U, chain2?: (v: T) => V) =>
  (value: T) =>
    create('$push', value, {
      /**
       * Limits the number of array elements.
       * @see https://www.mongodb.com/docs/manual/reference/operator/update/slice/
       *
       * @example
       * ```ts
       * // leave only the first 3 elements
       * flatten({ grades: $push().$each().$slice(3) });
       *
       * // leave only the last element
       * flatten({ grades: $push().$each().$slice(-1) });
       *
       * // empty the array
       * flatten({ grades: $push().$each().$slice(0) });
       * ```
       */
      $slice: (count: number) => combine({ ...value, $slice: count }, chain1, chain2),
    });

const sort =
  <T, U, V>(chain1?: (v: T) => U, chain2?: (v: T) => V) =>
  (value: T) =>
    create('$push', value, {
      /**
       * Orders the elements of an array.
       * @param value sort specification (default `1`)
       * @see https://www.mongodb.com/docs/manual/reference/operator/update/sort/
       *
       * @example
       * ```ts
       * // sort ascending an array of numbers
       * flatten({ scores: $push().$each().$sort(1) });
       *
       * // sort descending an array of numbers
       * flatten({ scores: $push().$each().$sort(-1) });
       *
       * // sort ascending an array of documents with `name` field
       * flatten({ users: $push().$each().$sort({ name: 1 }) });
       * ```
       */
      $sort: <S>(specification?: S) =>
        combine({ ...value, $sort: specification ?? 1 }, chain1, chain2),
    });

/**
 * The positional operator identifies **an element** or **multiple elements** matching a
 * given query condition to be updated in an array.
 * @param field _(optional)_ field of the array document to update.
 *
 * @see https://www.mongodb.com/docs/manual/reference/operator/update/positional/
 * @see https://www.mongodb.com/docs/manual/reference/operator/update/positional-all/
 *
 * @example
 * ```ts
 * // Increment by one the first element that matches the update query
 * $().$inc(1);
 *
 * // Increment by one the first element's `score` field that matches the update query
 * $('score').$inc(1);
 *
 * // Increment all elements by one
 * $('[]').$inc(1);
 *
 * // Increment all elements' `score` field by one
 * $('[].score').$inc(1);
 *
 * // Find all `grades` documents that have the `std` lower than seven
 * // and increment their `grade` by ten.
 * collection.updateOne(
 *   criteria,
 *   flatten({ grades: $('[element].grade').$inc(10) }),
 *   { arrayFilters: [{ 'element.std': { $lt: 7 } }] }
 * );
 * ```
 */
export const $ = (field?: number | string) => {
  const key = positional(field);
  return create(key, undefined, {
    /**
     * Merges the array element(s) identified by the current positional operator
     * with the given object.
     * @see https://www.mongodb.com/docs/manual/reference/operator/update/positional-all/#nested-arrays
     * @param value object to merge
     *
     * @example
     * ```ts
     * flatten({ points: $('[]').merge({ x: 0, y: 1 }) });
     *
     * // {
     * //   $set: {
     * //     'points.$[].x': 1,
     * //     'points.$[].y': 2,
     * //   }
     * // }
     * ```
     */
    merge: <T extends Record<string, any>>(value: T) => create(key, create('merge', value)),

    /**
     * @see {@link $inc}
     */
    $inc: <T>(value?: T) => create(key, $inc(value)),

    /**
     * @see {@link $mul}
     */
    $mul: <T>(value?: T) => create(key, $mul(value)),

    /**
     * @see {@link $set}
     */
    $set: <T>(value: T) => create(key, $set(value)),

    /**
     * @see {@link $unset}
     */
    $unset: () => create(key, $unset()),

    /**
     * @see {@link $rename}
     */
    $rename: (field: string) => create(key, $rename(field)),

    /**
     * @see {@link $min}
     */
    $min: <T>(value: T) => create(key, $min(value)),

    /**
     * @see {@link $max}
     */
    $max: <T>(value: T) => create(key, $max(value)),

    /**
     * @see {@link $currentDate}
     */
    $currentDate: (type?: Parameters<typeof $currentDate>[0]) => create(key, $currentDate(type)),

    /**
     * @see {@link $timestamp}
     */
    $timestamp: () => create(key, $timestamp()),
  });
};

/**
 * Adds a value to an array unless the value is already present.
 * To add multiple values, chain with `$each` operator.
 * @param value the value to add
 * @see https://www.mongodb.com/docs/manual/reference/operator/update/addToSet/
 *
 * @example
 * ```ts
 * // add just one element
 * flatten({ permissions: $addToSet('admin') });
 *
 * // add multiple elements
 * flatten({ permissions: $addToSet(['read', 'write']).$each() });
 * ```
 */
export const $addToSet = <T>(value: T) =>
  create('$addToSet', value, {
    /**
     * Specifies that value to add is an array and that each element should be added.
     * @see https://www.mongodb.com/docs/manual/reference/operator/update/each/
     */
    $each: () => create('$addToSet', { $each: Array.isArray(value) ? value : [value] }),
  });

/**
 * Removes the first or last element of an array.
 * @param value specify `-1` to remove the first element, `1` to remove the last element
 * @see https://www.mongodb.com/docs/manual/reference/operator/update/pop/
 *
 * @example
 * ```ts
 * // remove the first element from the array
 * flatten({ grades: $pop(-1) });
 * // same as:
 * flatten({ grades: $pop().first() });
 * ```
 */
export const $pop = (value: 1 | -1 = 1) =>
  create('$pop', value, {
    /**
     * Removes the first element from the array.
     */
    first: () => create('$pop', -1),

    /**
     * Removes the last element from the array.
     */
    last: () => create('$pop', 1),
  });

/**
 * Removes all instances of the specified values from an existing array.
 * @param value the value(s) to remove from the array
 * @see https://www.mongodb.com/docs/manual/reference/operator/update/pullAll/
 *
 * @example
 * ```ts
 * // remove all instances of the value `1` and `2` from the array
 * flatten({ score: $pullAll([1, 2]) });
 * ```
 */
export const $pullAll = <T>(value: T | T[]) =>
  create('$pullAll', Array.isArray(value) ? value : [value]);

/**
 * Removes from an existing array all instances of a value or values that match a specified condition.
 * Unlike the {@link $pullAll} operator, this operator can be used to remove all instances that match a query.
 * @param value the value(s) or condition to match to remove from the array
 * @see https://www.mongodb.com/docs/manual/reference/operator/update/pull/
 *
 * @example
 * ```ts
 * // remove all instances of the value `0` and `1` from the array;
 * // same as using $pullAll
 * flatten({ scores: $pull([0, 1]) });
 *
 * // remove all instances lower than or equal to `3`
 * flatten({ scores: $pull({ $lte: 3 }) })
 *
 * // remove all documents with the field `name` equal to `Test`
 * flatten({ users: $pull({ name: { $eq: 'Test' } }) })
 * ```
 */
export const $pull = <T>(value: T | T[]) =>
  create('$pull', Array.isArray(value) ? { $in: value } : value);

/**
 * Appends a specified value to an array.
 * @param value the value(s) to append to the array
 * @see https://www.mongodb.com/docs/manual/reference/operator/update/push/
 *
 * @example
 * ```ts
 * // append one element
 * flatten({ scores: $push(1) });
 *
 * // append multiple elements
 * flatten({ scores: $push([1, 2, 3]).$each() });
 *
 * // append an element and update to leave only the last ten
 * flatten({ scores: $push(7).$each().$slice(-10) });
 *
 * // append an element and update to leave only the last ten sorted by value
 * flatten({ scores: $push(7).$each().$sort(1).$slice(-10) });
 *
 * // append an element at position three in the array
 * flatten({ scores: $push(7).$each().$position(2) });
 * ```
 */
export const $push = <T>(value?: T | T[]) =>
  create('$push', value, {
    /**
     * Specifies that value to add is an array and that each element should be added.
     * @see https://www.mongodb.com/docs/manual/reference/operator/update/each/
     */
    $each: () => {
      const arr = typeof value === 'undefined' ? [] : Array.isArray(value) ? value : [value];
      const eachValue = { $each: arr };

      return create('$push', eachValue, {
        ...position(sort(slice()), slice(sort()))(eachValue),
        ...slice(position(sort()), sort(position()))(eachValue),
        ...sort(slice(position()), position(slice()))(eachValue),
      });
    },
  });

/**
 * Limits the number of array elements.
 * Alias for `$push().$each().$slice()`.
 * @see https://www.mongodb.com/docs/manual/reference/operator/update/slice/
 *
 * @example
 * ```ts
 * // leave only the first 3 elements
 * flatten({ grades: $slice(3) });
 *
 * // leave only the last element
 * flatten({ grades: $slice(-1) });
 *
 * // empty the array
 * flatten({ grades: $slice(0) });
 * ```
 */
export const $slice = (count: number) => $push().$each().$slice(count);

/**
 * Orders the elements of an array.
 * Alias for `$push().$each().$sort()`.
 * @param value sort specification (default `1`)
 * @see https://www.mongodb.com/docs/manual/reference/operator/update/sort/
 *
 * @example
 * ```ts
 * // sort ascending an array of numbers
 * flatten({ scores: $sort(1) });
 *
 * // sort descending an array of numbers
 * flatten({ scores: $sort(-1) });
 *
 * // sort ascending an array of documents with `name` field
 * flatten({ users: $sort({ name: 1 }) });
 * ```
 */
export const $sort = <S>(specification?: S) => $push().$each().$sort(specification);


text:
package com.uberverse.arkcraft.common.item.tools;

import net.minecraft.client.resources.I18n;
import net.minecraft.util.MathHelper;

import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public enum ToolLevel {//TODO: Fill the enum up with the appropriate values.
	PRIMITIVE("primitive", 0.8D),
	RAMSCHACKLE("ramshackle", 1),
	APPRENTICE("apprentice", 1.3),
	JOURNEYMAN("journeyman", 1.5),
	MASTERCRAFT("astercraft", 1.7),
	ASCENDANT("ascendant", 2.0);

	private final double durrabilityModifier;
	public static final ToolLevel[] VALUES = values();
	public final String name;
	private ToolLevel(String name, double durrabilityModifier) {
		this.durrabilityModifier = durrabilityModifier;
		this.name = name;
	}
	public int getDurrability(int normal){
		return MathHelper.ceiling_double_int(normal * durrabilityModifier);
	}
	public String getName() {
		return name;
	}
	@SideOnly(Side.CLIENT)
	public String getTranslatedName(){//TODO: Setup the localization entries.
		return I18n.format("arkCraft.toolLevel." + name);
	}
}

redpajama_set_name: RedPajamaGithub


text:
import * as React from "react";
import Radium from "radium";
import Slide from "../../components/slide";
import SlideTitleComic from "../../components/slide-title-comic";
import {
  List,
  ListItem,
  Appear
} from "spectacle";
import styles from "../../styles";

@Radium
class BulletsSlide extends React.Component {
  render() {
    return (

        <List textSize="24px" textColor="white" style={styles.list}>
          <Appear>
            <ListItem>

                Shell history

            </ListItem>
          </Appear>
          <Appear>
            <ListItem>

                Aliases

            </ListItem>
          </Appear>
          <Appear>
            <ListItem>

                Line editing

            </ListItem>
          </Appear>
          <Appear>
            <ListItem>

                Tab completion

            </ListItem>
          </Appear>
        </List>

    );
  }
}

export default (
  <Slide key="intro-cli-productivity-list">
    <SlideTitleComic>CLI Productivity</SlideTitleComic>
    <BulletsSlide/>
  </Slide>
);


text:
package com.opengamma.analytics.financial.forex.method;

import static org.testng.AssertJUnit.assertEquals;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.testng.annotations.Test;

import com.opengamma.analytics.financial.interestrate.InterestRateCurveSensitivity;
import com.opengamma.analytics.financial.util.AssertSensitivityObjects;
import com.opengamma.util.money.Currency;
import com.opengamma.util.test.TestGroup;
import com.opengamma.util.tuple.DoublesPair;

/**
 * Tests related to the construction of multiple currency interest rate sensitivity.
 */
@Test(groups = TestGroup.UNIT)
public class MultipleCurrencyInterestRateCurveSensitivityTest {

  private static final Currency USD = Currency.USD;
  private static final Currency EUR = Currency.EUR;
  private static final String DSC_USD = "USD Discounting";
  private static final InterestRateCurveSensitivity IRCS_EMPTY = new InterestRateCurveSensitivity();
  private static final Map<String, List<DoublesPair>> SENSI_MAP = new HashMap<>();
  private static final List<DoublesPair> SENSI_LIST_1 = new ArrayList<>();
  static {
    SENSI_LIST_1.add(DoublesPair.of(1.0, 10000.0));
    SENSI_LIST_1.add(DoublesPair.of(2.0, -20000.0));
    SENSI_MAP.put(DSC_USD, SENSI_LIST_1);
  }
  private static final InterestRateCurveSensitivity IRCS = new InterestRateCurveSensitivity(SENSI_MAP);

  /**
   * Tests that the currency cannot be null.
   */
  @Test(expectedExceptions = IllegalArgumentException.class)
  public void nullCurrency() {
    MultipleCurrencyInterestRateCurveSensitivity.of(null, IRCS);
  }

  /**
   * Tests that the sensitivity cannot be null.
   */
  @Test(expectedExceptions = IllegalArgumentException.class)
  public void nullIRCS() {
    MultipleCurrencyInterestRateCurveSensitivity.of(USD, null);
  }

  /**
   * Tests construction.
   */
  @Test
  public void of() {
    final MultipleCurrencyInterestRateCurveSensitivity mcIRCS = MultipleCurrencyInterestRateCurveSensitivity.of(USD, IRCS);
    assertEquals("MultipleCurrencyInterestRateCurveSensitivity", IRCS, mcIRCS.getSensitivity(USD));
    assertEquals("MultipleCurrencyInterestRateCurveSensitivity", IRCS_EMPTY, mcIRCS.getSensitivity(EUR));
  }

  /**
   * Tests the addition of two sets of sensitivities.
   */
  @Test
  public void plus() {
    final double tolerance = 1.0E-2;
    MultipleCurrencyInterestRateCurveSensitivity mcIRCS = MultipleCurrencyInterestRateCurveSensitivity.of(USD, IRCS);
    assertEquals("MultipleCurrencyInterestRateCurveSensitivity", IRCS, mcIRCS.getSensitivity(USD));
    mcIRCS = mcIRCS.plus(EUR, IRCS_EMPTY);
    assertEquals("MultipleCurrencyInterestRateCurveSensitivity", IRCS, mcIRCS.getSensitivity(USD));
    assertEquals("MultipleCurrencyInterestRateCurveSensitivity", IRCS_EMPTY, mcIRCS.getSensitivity(EUR));
    mcIRCS = mcIRCS.plus(USD, IRCS);
    AssertSensitivityObjects.assertEquals("MultipleCurrencyInterestRateCurveSensitivity", IRCS.multipliedBy(2.0),
        mcIRCS.getSensitivity(USD).cleaned(), tolerance);
    assertEquals("MultipleCurrencyInterestRateCurveSensitivity", IRCS_EMPTY, mcIRCS.getSensitivity(EUR));
  }

}


text:
require 'spec_helper'

describe Roo::CSV do
  let(:path) { 'test/files/csvtypes.csv' }
  let(:csv) { Roo::CSV.new(path) }

  describe '.new' do
    it 'creates an instance' do
      expect(csv).to be_a(Roo::CSV)
    end
  end

  describe '#parse' do
    subject {
      csv.parse(options)
    }
    context 'with headers: true' do
      let(:options) { {headers: true} }

      it "doesn't blow up" do
        expect { subject }.to_not raise_error
      end
    end
  end

  describe '#csv_options' do
    context 'when created with the csv_options option' do
      let(:options) {
        {
          col_sep: '\t',
          quote_char: "'"
        }
      }

      it 'returns the csv options' do
        csv = Roo::CSV.new(path, csv_options: options)
        csv.csv_options.should == options
      end
    end

    context 'when created without the csv_options option' do
      it 'returns a hash' do
        csv = Roo::CSV.new(path)
        csv.csv_options.should == {}
      end
    end
  end
end

describe Roo::Csv do
  it 'is an alias of LibreOffice' do
    expect(Roo::Csv).to eq(Roo::CSV)
  end
end


text:
> Modify the values of an object

## Install

```
$ npm install modify-values
```

## Usage

```js
import modifyValues from 'modify-values';

modifyValues({foo: 'UNICORN'}, (value, key) => value.toLowerCase());
//=> {foo: 'unicorn'}
```

## API

### modifyValues(object, transformer)

Modifies the values and returns a new object.

#### object

Type: `object`

#### transformer(value, key)

Type: `Function`

Gets the value and key for each item and is expected to return the new value.

## Related

See [`modify-keys`](https://github.com/sindresorhus/modify-keys) for modifying the keys of an object.

---

		Get professional support for this package with a Tidelift subscription

		Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.


text:
'use strict';

/**
 * @ngdoc service
 * @name descentCampaignTrackerApp.desModel
 * @description
 * # desModel
 * Factory with the model services.
 */
angular.module('descentCampaignTrackerApp')
  .factory('desModel',
    [ '$log', '$translate', 'localStorageService',
      'desCamaignCons', 'desCore', 'desModelControl',
      'desOverlord', 'desLieutenant', 'desMonster', 'desHero', 'desLocation',
    function ( $log, $translate, localStorageService,
               desCamaignCons, desCore, desModelControl,
               desOverlord, desLieutenant, desMonster, desHero, desLocation) {

    var model = loadModel() || _newModel();

    // Public API
    return {
      getModel:     getModel,
      loadModel:    loadModel,
      saveModel:    saveModel,

      getOverlord:      getOverlord,
      getLieutenants:   getLieutenants,
      getMonsterLevels: getMonsterLevels,
      getHeroParty:     getHeroParty,
      getLocations:     getLocations,

      toJSON:       toJSON,
      fromJSON:     fromJSON
    };

    function getModel() {
      return model;
    }

    function loadModel(){
      var localModel = localStorageService.get(desCamaignCons.LOCAL_STORAGE_NAME);

      try{
        _updateModel(localModel);
      }catch(e){
        $log.error('Error loading model from local storage: ' + e);
        $log.error(localModel);
        $log.error('Loading new model instance instead');
        localModel = _newModel();
      }

      return localModel;
    }

    function saveModel(){
      localStorageService.set(desCamaignCons.LOCAL_STORAGE_NAME, model);
    }

    function getOverlord(){
      return model.overlord;
    }

    function getLieutenants(){
      return model.lieutenants;
    }

    function getMonsterLevels(){
      return model.monsterLevels;
    }

    function getHeroParty(){
      return model.heroParty;
    }

    function getLocations(){
      return model.locations;
    }

    function toJSON(){
      return angular.toJson(model, 2);
    }

    /**
     * Try to load JSON input into campaign model
     */
    function fromJSON(inputText){
      var result={success:false, text:null};
      var newModel = _newModel();
      var inputModel;
      try{
        inputModel = angular.fromJson(inputText);

        if(angular.isObject(inputModel)){

          if(angular.isUndefined(inputModel.control)){
            var control = desModelControl.newControl(0,0);
            inputModel.control=control;
          }

          _updateModel(inputModel);

          // Overlord copy
          angular.extend(newModel,inputModel);

          model=newModel;
          result.success=true;
          result.text=$translate.instant('CAMPAIGN_IMPORT_OK');
        }else if(angular.isUndefined(result.text)){
          result.text=$translate.instant('INPUT_TEXT_IS_NOT_JSON');
        }

      }catch(err){
        $log.error('Error convirtiendo entrada en JSON: ' + err);
        result.success=false;
        result.text=$translate.instant('CONVERSION_ERROR') + ': '+err.message;
      }
      //$log.debug(result);
      return result;
    }

    function _updateModel(modelToUpdate){
      var initVersion;
      if(angular.isUndefined(modelToUpdate.control) || angular.isUndefined(modelToUpdate.control.version)){
        initVersion=0;
      }else{
        initVersion=modelToUpdate.control.version;
      }

      if(!desModelControl.isValidModelVersion(initVersion)){
        throw $translate.instant('INVALID_MODEL_VERSION');

      }else if(!desModelControl.isCurrentVersion(initVersion)){
        $log.debug('Old model version detected. ' +
          'Init version: ' + initVersion +
          ', currentVersion: ' + desCamaignCons.CURRENT_MODEL_VERSION);
        var updateFunctions= [_updateFrom0To1];
        for (var i = initVersion; i < updateFunctions.length; i++) {
          updateFunctions[i](modelToUpdate);
        }
      }

    }

    function _updateFrom0To1(modelToUpdate){
      // Changes from model version 0 to 1:
      //   + New version control in the model
      //   + Monster Levels attribute: type added, name removed
      $log.debug('Updating model from version 0 to 1');

      modelToUpdate.control=desModelControl.newControl(0,1);

      if(angular.isDefined(modelToUpdate.monsterLevels)){
        var monsterLevelsChangedAttr=[
          {name:'Humanoides', type:desCamaignCons.MONSTER_TYPE_HUMANOID},
          {name:'Bestias', type:desCamaignCons.MONSTER_TYPE_BEASTS},
          {name:'Arcanos',type:desCamaignCons.MONSTER_TYPE_ELDRITCH}
        ];

        angular.forEach(monsterLevelsChangedAttr, function(change,index) {
          var monsterLevelToChange=_findMonsterLevelByName(change.name,modelToUpdate.monsterLevels);
          // If monsterLevel exists it is upgrades else it is added
          if(angular.isDefined(monsterLevelToChange)&&angular.isObject(monsterLevelToChange)){
            var newLevelversion = desMonster.newMonsterLevel(change.type, monsterLevelToChange.level ||1);
            modelToUpdate.monsterLevels[index]=newLevelversion;
          }else{
            modelToUpdate.monsterLevels.push(desMonster.newMonsterLevel(change.type));
          }
        });

      }

      $log.debug('successfully updated to version 1');

      function _findMonsterLevelByName(name,monsterLevels){
        var res=monsterLevels.filter(function(monsterLevel){
          return name===monsterLevel.name;
        });
        if(angular.isDefined(res)&&angular.isArray(res)){
          return res[0];
        }else{
          return undefined;
        }
      }
    }

    function _newModel(){
      return {
        control: desModelControl.newControlLatestVersion(),
        overlord: desOverlord.newOverlord(),
                    /*{
                      name: '',
                      plot: '',
                      plotUpgrades: [{ name: '' }],
                      commonUpgrades: [{name: '' }],
                      conquestTockens:0,
                      spentTockens:0,
                      treachery:{
                        traps:    {current:0, max:0},
                        events:   {current:0, max:0},
                        monsters: {current:0, max:0}
                      }
                    }*/
        lieutenants: desLieutenant.newLieutenants(), //{list:[{name: '', location:'' }]}
        monsterLevels: desMonster.newMonsterLevels(),
                        /*[
                          {name: 'Humanoides', level: 1},
                          {name: 'Bestias', level:1},
                          {name: 'Arcanos', level:1}
                        ]*/
        heroParty: desHero.newHeroParty(),
                    /*{
                      location: '',
                      homePort: '',
                      rumor:{name:'',location:''},
                      heroes:[{name: '', xpSpent: 0}],
                      conquestTockens:0
                    }*/
        locations: desLocation.newLocations(),
                    /*
                    {
                      cities:[],
                      dungeons:[],
                      islands:[]
                    }
                    */
        };
    }

  }]);


text:
title: The HMRC tax platform
layout: post
category: The HMRC Tax Platform
---

This site provides service managers and other teams members with an explanation of what the Tax Platfrom can offer their service.

##So you're buying some space on a platform eh?

If you are building and running a digital service it's useful to think of a the tax platform like something that you might buy to make your life a bit easier. Rather than building a lot of infrastructure, tooling and services yourself you can buy some space on a shared platform that gives you a lot of what you need – that way you don't have to build it yourself and you can focus on building an excellent service for your users, rather than what server configuration needs to be applied.

There is a range of things that the tax platform offers a digital service that runs on it. The aim is for the tax platform to offer all services that run on it roughly the same things – what we might call the baseline offering.

As a Digital Service Team you should be thinking about whether the tax platform meets your users needs and your own needs. If the baseline offering is not what you need then have two options;

**a)** think about changing the tax platform to meet those needs or...

**b)** Think about using a different platform altogether. (Heroku is often used for prototyping in addition to the Tax Platfrom)

Only you, as a digital service team, can know if the tax platform meets your and your users needs. On the tax platform team we've tried to make a service that meets the most common needs we've seen from our users (the digital service teams).

As you consider the baseline, you need to think to yourself whether it offers what your team and your users need. If it doesn't then you need to get in touch and see what we can do about it.

This is a work in progress so please take the time to feedback.


text:
interface JQuery {
    roundSlider(): JQuery;
}

($ => {
    $.fn.roundSlider = function () {
        $(this).each(function () {
            var slider = $(this);

            slider.hide();
            slider.after(
                '
  \

                 \

            \

  \

                                \

                                    \

         \

');

            var sliderRegion = slider.next('.roundSlider');
            var sliderHandle = sliderRegion.find('.sliderHandle');
            var sliderOuterCircle = sliderRegion.find('.outerCircle');
            var sliderDisplay = sliderRegion.find('.valueDisplay');
            var mouseDown = false;

            var outerCircleHeight = sliderOuterCircle.height();
            var outerCircleWidth = sliderOuterCircle.width();
            var sliderHandleHeight = sliderHandle.height();
            var sliderHandleWidth = sliderHandle.width();
            var offset = sliderOuterCircle.offset();

            function setValue(angle: number, notify: boolean) {
                slider.val(angle);

                if (notify) {
                    slider.change();
                }

                sliderDisplay.html(angle + '°');

                var angleInRadians = angle * (Math.PI / 180);

                sliderHandle.css({
                    top: Math.sin(angleInRadians) * (outerCircleHeight / 2 - 4) + (outerCircleHeight / 2) - (sliderHandleHeight / 2) + 4,
                    left: -Math.cos(angleInRadians) * (outerCircleWidth / 2 - 4) + (outerCircleWidth / 2) - (sliderHandleWidth / 2) + 4
                });
            }

            slider.change(() => {
                setValue(slider.val(), false);
            });

            setValue(0, true);

            sliderHandle.mousedown(event => {
                event.preventDefault();
                mouseDown = true;
            });

            $(document).mouseup(() => {
                mouseDown = false;
            });

            $(document).mousemove(event => {
                if (mouseDown) {
                    event.preventDefault();

                    var newPosition = {
                        left: event.pageX - offset.left - (outerCircleWidth / 2),
                        top: event.pageY - offset.top - (outerCircleHeight / 2)
                    };

                    var angle = Math.floor(Math.atan2(newPosition.top, -newPosition.left) * 180 / Math.PI);
                    angle = angle < 0 ? 360 + (angle % 360) : (angle % 360);

                    setValue(angle, true);
                }
            });

        });
    }
})(jQuery);


text:
Randomwords
===========

A very useful and simple creative tool. Shows a random word in spanish every
6 seconds.

Can be accesed via its [Github Page](https://words.inkatze.com/).

LICENSE
======

[BSD](LICENSE)


text:
* add package name in nested package.json ([53d8fca](https://github.com/socketio/socket.io-client/commit/53d8fcafabbfddb5834012c9c98743bfe6e13347)), closes [socketio/socket.io-client#1513](https://github.com/socketio/socket.io-client/issues/1513)
* fix `socket.disconnect().connect()` usage ([99c2cb8](https://github.com/socketio/socket.io-client/commit/99c2cb8421361487ed7c876edd8670bb69a5c5b5))
* prevent socket from reconnecting after middleware failure ([d54d12c](https://github.com/socketio/socket.io-client/commit/d54d12ce634193d14b71894496ed57d35d922378))

### Features

* add timeout feature ([ccf7998](https://github.com/socketio/socket.io-client/commit/ccf7998cc5049d02022567aedfb263de875a06a5))

## [4.3.2](https://github.com/socketio/socket.io-client/compare/4.3.1...4.3.2) (2021-10-16)

### Bug Fixes

* restore the default export (bis) ([6780f29](https://github.com/socketio/socket.io-client/commit/6780f29624372a76aafb0bbd6975864280239f26))

## [4.3.1](https://github.com/socketio/socket.io-client/compare/4.3.0...4.3.1) (2021-10-15)

### Bug Fixes

* restore the default export ([f0aae84](https://github.com/socketio/socket.io-client/commit/f0aae8457a8bdf7e2f2286b4b7d34d2798419456))
* restore the namespace export ([8737d0a](https://github.com/socketio/socket.io-client/commit/8737d0ae6fb362455015e6dd435010c36d023663))

# [4.3.0](https://github.com/socketio/socket.io-client/compare/4.2.0...4.3.0) (2021-10-14)

An ESM bundle is now provided:

```html
<script type="module">
  import { io } from "https://cdn.socket.io/4.3.0/socket.io.esm.min.js";

  const socket = io();

  socket.emit("hello", "world");
</script>
```

### Features

* **typings:** add missing types for some emitter methods ([#1502](https://github.com/socketio/socket.io-client/issues/1502)) ([a9e5b85](https://github.com/socketio/socket.io-client/commit/a9e5b85580e8edca0b0fd2850c3741d3d86a96e2))
* provide an ESM build with and without debug ([16b6569](https://github.com/socketio/socket.io-client/commit/16b65698aed766e1e645c78847f2e91bfc5b6f56))
* migrate to rollup ([0661564](https://github.com/socketio/socket.io-client/commit/0661564dc2005b95843ddb65621b7e89af702bc0))

# [4.2.0](https://github.com/socketio/socket.io-client/compare/4.1.3...4.2.0) (2021-08-30)

### Bug Fixes

* **typings:** allow async listener in typed events ([66e00b7](https://github.com/socketio/socket.io-client/commit/66e00b7dd7c4a09072cfd84c78e6e15ec52039f5))
* allow to set randomizationFactor to 0 ([#1447](https://github.com/socketio/socket.io-client/issues/1447)) ([dfb46b5](https://github.com/socketio/socket.io-client/commit/dfb46b55a55d9c5b0397f4bc0fab9cec99ff430e))

### Features

* add an option to use native timer functions ([#1479](https://github.com/socketio/socket.io-client/issues/1479)) ([4e1b656](https://github.com/socketio/socket.io-client/commit/4e1b65699d9967a7bb409bdc89c894c62562771b))

## [4.1.3](https://github.com/socketio/socket.io-client/compare/4.1.2...4.1.3) (2021-07-10)

## [4.1.2](https://github.com/socketio/socket.io-client/compare/4.1.1...4.1.2) (2021-05-17)

### Bug Fixes

* **typings:** add missing closeOnBeforeunload option ([#1469](https://github.com/socketio/socket.io-client/issues/1469)) ([35d27df](https://github.com/socketio/socket.io-client/commit/35d27df2ae48046bfe3ae2e11f82004200095aae))
* **typings:** add missing requestTimeout option ([#1467](https://github.com/socketio/socket.io-client/issues/1467)) ([c8dfbb1](https://github.com/socketio/socket.io-client/commit/c8dfbb1c1d10aff16bc19cc1f1bab6b3a9240d81))

## [4.1.1](https://github.com/socketio/socket.io-client/compare/4.1.0...4.1.1) (2021-05-11)

There were some minor bug fixes on the server side, which mandate a client bump.

# [4.1.0](https://github.com/socketio/socket.io-client/compare/4.0.2...4.1.0) (2021-05-11)

### Features

* add the "closeOnBeforeunload" option ([dcb85e9](https://github.com/socketio/engine.io-client/commit/dcb85e902d129b2d1a94943b4f6d471532f70dc9), from `engine.io-client`)

## [4.0.2](https://github.com/socketio/socket.io-client/compare/4.0.1...4.0.2) (2021-05-06)

### Bug Fixes

* **typings:** add fallback to untyped event listener ([5394669](https://github.com/socketio/socket.io-client/commit/53946694882114957ef2187c532eb798fa811b60))
* ensure buffered events are sent in order ([34f822f](https://github.com/socketio/socket.io-client/commit/34f822f783c6985039c0733a96d1fab8f01b1edf))
* ensure connections are properly multiplexed ([dd2a8fc](https://github.com/socketio/socket.io-client/commit/dd2a8fce000a9b5b5d741489fc44eafd4ff6c75b))
* properly export the Socket class ([e20d487](https://github.com/socketio/socket.io-client/commit/e20d487ac080910c90e7b766f8509f5e40c9ecfe))

## [4.0.1](https://github.com/socketio/socket.io-client/compare/4.0.0...4.0.1) (2021-03-31)

### Bug Fixes

* **typings:** make `auth` property public ([#1455](https://github.com/socketio/socket.io-client/issues/1455)) ([c150223](https://github.com/socketio/socket.io-client/commit/c15022347c662dc31ee0a3d89cde23641f029783))
* **typings:** update definition to match wrapper.mjs ([#1456](https://github.com/socketio/socket.io-client/issues/1456)) ([48f573f](https://github.com/socketio/socket.io-client/commit/48f573f6f6c4d542e6a098e7f4ae472b888b5664))

# [4.0.0](https://github.com/socketio/socket.io-client/compare/3.1.2...4.0.0) (2021-03-10)

The major bump is due to some breaking changes on the server side.

### Bug Fixes

* **bundle:** restore support for JS modules ([43613d1](https://github.com/socketio/socket.io-client/commit/43613d1b2c3c04e89d572750656012f54d44467c))

### Features

* add autoUnref option ([6abfa1f](https://github.com/socketio/socket.io-client/commit/6abfa1fa4c7fea0d69c69b254d2e1ca18f19c4bc))
* add support for typed events ([5902365](https://github.com/socketio/socket.io-client/commit/59023657a02cf78f90522e0d7797749707ed5ed2))

## [3.1.2](https://github.com/socketio/socket.io-client/compare/3.1.1...3.1.2) (2021-02-26)

### Bug Fixes

* restore support for web workers ([13b32b3](https://github.com/socketio/socket.io-client/commit/13b32b39a4c1cf4829144fb0a95c4d0506000fb3))
* silently close the transport in the beforeunload hook ([ed48b5d](https://github.com/socketio/engine.io-client/commit/ed48b5dc3407e5ded45072606b3bb0eafa49c01f), from `engine.io-client`)

## [3.1.1](https://github.com/socketio/socket.io-client/compare/3.1.0...3.1.1) (2021-02-03)

### Bug Fixes

* include the path in the manager ID ([7a0c2b5](https://github.com/socketio/socket.io-client/commit/7a0c2b504f5f3bac64d423684fb1bb44229c7a70))
* remove polyfill for process in the bundle ([61afc5d](https://github.com/socketio/socket.io-client/commit/61afc5d8cb9f10985930b2f01758089c49f84686))
* **typings:** add return types and general-case overload signatures ([#1440](https://github.com/socketio/socket.io-client/issues/1440)) ([47f917a](https://github.com/socketio/socket.io-client/commit/47f917afdd1821079723542f081c726596f2aaf3))
* **typings:** fix the type of the "query" option ([#1439](https://github.com/socketio/socket.io-client/issues/1439)) ([f02ab3b](https://github.com/socketio/socket.io-client/commit/f02ab3bc9626133dd35aad0916325f0c7fc4da5d))

# [3.1.0](https://github.com/socketio/socket.io-client/compare/3.0.5...3.1.0) (2021-01-15)

### Bug Fixes

* **typings:** make Manager#opts public ([#1437](https://github.com/socketio/socket.io-client/issues/1437)) ([fe97243](https://github.com/socketio/socket.io-client/commit/fe97243fab02cd80fc1116e8f4aeca02951dac75))
* allow integers as event names ([1c220dd](https://github.com/socketio/socket.io-parser/commit/1c220ddbf45ea4b44bc8dbf6f9ae245f672ba1b9))

## [3.0.5](https://github.com/socketio/socket.io-client/compare/3.0.4...3.0.5) (2021-01-05)

### Bug Fixes

* emit a connect_error event upon connection failure ([53c7374](https://github.com/socketio/socket.io-client/commit/53c73749a829b2c98d9a5e45c48f0ae5a22c056c))
* **typings:** make sendBuffer and receiveBuffer public ([b83f89c](https://github.com/socketio/socket.io-client/commit/b83f89c901e82e06f66cbda4124cf739d2bb01c3))

## [3.0.4](https://github.com/socketio/socket.io-client/compare/3.0.3...3.0.4) (2020-12-07)

### Bug Fixes

* emit an error when reaching a v2.x server ([ec1f8c3](https://github.com/socketio/socket.io-client/commit/ec1f8c3474b54600420487a0554cb195cc78f2bc)), closes [/github.com/socketio/engine.io-protocol#difference-between-v3-and-v4](https://github.com//github.com/socketio/engine.io-protocol/issues/difference-between-v3-and-v4) [/github.com/socketio/socket.io-protocol#difference-between-v5-and-v4](https://github.com//github.com/socketio/socket.io-protocol/issues/difference-between-v5-and-v4)
* keep track of active sockets ([f8f60fc](https://github.com/socketio/socket.io-client/commit/f8f60fc860f51aa6465fc32dd9275a8e1d22f05d))
* **typings:** export extraHeaders option ([#1410](https://github.com/socketio/socket.io-client/issues/1410)) ([b3de861](https://github.com/socketio/socket.io-client/commit/b3de861a928c0eb5f0b2f37956c671e72432715d))

## [3.0.3](https://github.com/socketio/socket.io-client/compare/3.0.2...3.0.3) (2020-11-19)

### Bug Fixes

* properly export io in ES modules wrapper ([bec1524](https://github.com/socketio/socket.io-client/commit/bec15240ea67e9d296ac94093974d7d831239e8d))

## [3.0.2](https://github.com/socketio/socket.io-client/compare/3.0.1...3.0.2) (2020-11-17)

### Bug Fixes

* **typings:** export withCredentials option ([7193078](https://github.com/socketio/socket.io-client/commit/719307801a2170f02d3a16ab52752ac219ca4b6e))
* **typings:** export ManagerOptions ([#1398](https://github.com/socketio/socket.io-client/issues/1398)) ([96cd2c9](https://github.com/socketio/socket.io-client/commit/96cd2c9ae4c48f9d2e6638ab26074277a3a6cf6b))
* add io as named exports ([7b3ec9f](https://github.com/socketio/socket.io-client/commit/7b3ec9fad9df9d2f030f644a26fcd642bf2a91ab))

## [3.0.1](https://github.com/socketio/socket.io-client/compare/3.0.0...3.0.1) (2020-11-09)

### Bug Fixes

* **typings:** export Socket and SocketOptions types ([#1394](https://github.com/socketio/socket.io-client/issues/1394)) ([19ab1e9](https://github.com/socketio/socket.io-client/commit/19ab1e9e4e1373d4ef4dad5381c8ae24167f5d89))

# [3.0.0](https://github.com/socketio/socket.io-client/compare/2.3.1...3.0.0) (2020-11-05)

### Code Refactoring

* rename ERROR to CONNECT_ERROR ([13e1db7](https://github.com/socketio/socket.io-client/commit/13e1db7c94291c583d843beaa9e06ee041ae4f26))

### Features

* emit an Error object upon middleware error ([0939395](https://github.com/socketio/socket.io-client/commit/09393952e3397a0c71f239ea983f8ec1623b7c21))
* add bundle with msgpack parser ([71d6048](https://github.com/socketio/socket.io-client/commit/71d60480af9ea06d22792540dafb18a76e9362e7))
* add support for catch-all listeners ([55f464f](https://github.com/socketio/socket.io-client/commit/55f464f59ed523fa1c1948ec10752bfdf808262d))
* add volatile events ([7ddad2c](https://github.com/socketio/socket.io-client/commit/7ddad2c09dea0391b20378ef03b40040f0230d3e))
* move binary detection back to the parser ([1789094](https://github.com/socketio/socket.io-client/commit/178909471a3dd232e71cba83b729b4cc66f1412f))
* add ES6 module export ([cbabb03](https://github.com/socketio/socket.io-client/commit/cbabb0308ef4f7d302654755e08fe2103b9f22c8))
* do not reuse the Engine.IO id ([bbe94ad](https://github.com/socketio/socket.io-client/commit/bbe94adb822a306c6272e977d394e3e203cae25d))
* remove the implicit connection to the default namespace ([249e0be](https://github.com/socketio/socket.io-client/commit/249e0bef9071e7afd785485961c4eef0094254e8))
* split the events of the Manager and Socket ([132f8ec](https://github.com/socketio/socket.io-client/commit/132f8ec918a596eec872aee0c61d4ce63714c400))
* throw upon reserved event names ([6494f61](https://github.com/socketio/socket.io-client/commit/6494f61be0d38d267d77c30ea4f43941f97b1bc0))

### BREAKING CHANGES

* the Socket instance will now emit a "connect_error" event instead of "error" (which is not a reserved event anymore)

```js
// before
socket.on("error", () => {});

// after
socket.on("connect_error", () => {});
```

* the Socket#binary() method is removed, as this use case is now covered by the ability to provide your own parser.

* the Socket instance will no longer forward the events of its Manager

Those events can still be accessed on the Manager instance though:

```js
socket.io.on("reconnect", () => {
  // ...
});
```

# [3.0.0-rc4](https://github.com/socketio/socket.io-client/compare/3.0.0-rc3...3.0.0-rc4) (2020-10-30)

### Features

* emit an Error object upon middleware error ([0939395](https://github.com/socketio/socket.io-client/commit/09393952e3397a0c71f239ea983f8ec1623b7c21))

# [3.0.0-rc3](https://github.com/socketio/socket.io-client/compare/3.0.0-rc2...3.0.0-rc3) (2020-10-26)

### Code Refactoring

* rename ERROR to CONNECT_ERROR ([13e1db7](https://github.com/socketio/socket.io-client/commit/13e1db7c94291c583d843beaa9e06ee041ae4f26))

### Features

* add bundle with msgpack parser ([71d6048](https://github.com/socketio/socket.io-client/commit/71d60480af9ea06d22792540dafb18a76e9362e7))
* add support for catch-all listeners ([55f464f](https://github.com/socketio/socket.io-client/commit/55f464f59ed523fa1c1948ec10752bfdf808262d))
* add volatile events ([7ddad2c](https://github.com/socketio/socket.io-client/commit/7ddad2c09dea0391b20378ef03b40040f0230d3e))

### BREAKING CHANGES

* the Socket instance will now emit a "connect_error" event instead of "error" (which is not a reserved event anymore)

```js
// before
socket.on("error", () => {});

// after
socket.on("connect_error", () => {});
```

# [3.0.0-rc2](https://github.com/socketio/socket.io-client/compare/3.0.0-rc1...3.0.0-rc2) (2020-10-15)

### Features

* move binary detection back to the parser ([1789094](https://github.com/socketio/socket.io-client/commit/178909471a3dd232e71cba83b729b4cc66f1412f))

### BREAKING CHANGES

* the Socket#binary() method is removed, as this use case is now covered by the ability to provide your own parser.

# [3.0.0-rc1](https://github.com/socketio/socket.io-client/compare/2.3.1...3.0.0-rc1) (2020-10-13)

### Features

* add ES6 module export ([cbabb03](https://github.com/socketio/socket.io-client/commit/cbabb0308ef4f7d302654755e08fe2103b9f22c8))
* do not reuse the Engine.IO id ([bbe94ad](https://github.com/socketio/socket.io-client/commit/bbe94adb822a306c6272e977d394e3e203cae25d))
* remove the implicit connection to the default namespace ([249e0be](https://github.com/socketio/socket.io-client/commit/249e0bef9071e7afd785485961c4eef0094254e8))
* split the events of the Manager and Socket ([132f8ec](https://github.com/socketio/socket.io-client/commit/132f8ec918a596eec872aee0c61d4ce63714c400))
* throw upon reserved event names ([6494f61](https://github.com/socketio/socket.io-client/commit/6494f61be0d38d267d77c30ea4f43941f97b1bc0))

### BREAKING CHANGES

* the Socket instance will no longer forward the events of its Manager

Those events can still be accessed on the Manager instance though:

```js
socket.io.on("reconnect", () => {
  // ...
});
```

## [2.3.1](https://github.com/socketio/socket.io-client/compare/2.3.0...2.3.1) (2020-09-30)

The `debug` dependency has been reverted to `~3.1.0`, as the newer versions contains ES6 syntax which breaks in IE
browsers.

Please note that this only applied to users that bundle the Socket.IO client in their application, with webpack for
example, as the "official" bundles (in the dist/ folder) were already transpiled with babel.

For webpack users, you can also take a look at the [webpack-remove-debug](https://github.com/johngodley/webpack-remove-debug)
plugin.

### Bug Fixes

* fix reconnection after opening socket asynchronously ([#1253](https://github.com/socketio/socket.io-client/issues/1253)) ([050108b](https://github.com/socketio/socket.io-client/commit/050108b2281effda086b197cf174ee2e8e1aad79))


text:
<title>GrADS Command: collect</title>

collect

This command provides a way for station data profiles and time series
to be saved in memory as a set. The command format is:

collect cnum expr

where cnum is the collection number, a value from
0 to 31, and expr is any GrADS expression that
gives a station data result. If "free" is given for
expr, the collection is emptied and all storage is
freed.

Usage Notes

The collect command will only work when one dimension is
varying, either Z or T. Each time collect is issued for a
particular collection number, the station data is added to the
collection of stations.  The order in which stations are added is
important.

After a group of station profiles or time series have been saved as a
collection, use the coll2gr
function to convert the collection into a grid.

See the section of the User's Guide on Arbitrary Cross Sections for more
information.


text:
package com.egojit.android.app;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Rey on 3/2/2015.
 */
public class Recipient implements Parcelable{
    String name;
    String number;
    String lookupKey;

    public Recipient() {
    }

    private Recipient(Parcel in) {
        this.name = in.readString();
        this.number = in.readString();
        this.lookupKey = in.readString();
    }

    @Override
    public String toString(){
        return Recipient.class.getSimpleName() + "[name = " + name + ", number = " + number + ", key = " + lookupKey + "]";
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeString(this.number);
        dest.writeString(this.lookupKey);
    }

    public static final Creator<Recipient> CREATOR = new Creator<Recipient>() {
        public Recipient createFromParcel(Parcel source) {
            return new Recipient(source);
        }

        public Recipient[] newArray(int size) {
            return new Recipient[size];
        }
    };
}


text:
category: gdesign
layout: post
date: 2016-03-21
title: CWRU Geofilters
thumbnail: /images/snapchat/ksl-1.jpg
summary: The first filter to hit campus.
---
Snapchat geofilters are activated when you're in a specified range. At a notable destination? Turn on location services and find a cute overlay! The sad thing is though, our campus didn't have any.

Don't worry, I fixed that.

I learned about creating your own Snapchat filters when my high school friends would send me snaps with an IMSA filter. I didn't have the opportunity to try making one until someone asked me how to for one of their events almost at the same time as one of my other friends had made a filter for his frat house.

Feeling ambitious, I decided to make one, but of what? Starting with all of campus would be a little much -  my friend Vandana sent me snaps from her library with a filter.

I figured if any place would appreciate a library filter, it would be Case.

A running joke on campus is that the Kelvin Smith Library is a place to pretend to study and humblebrag about how late you're staying. I gave myself a 5 minute time limit since I didn't want to get caught up in something that would get rejected.

A few days later, though, I got an email saying my filter was approved! Erin and I raced over to see if it had happened. It was pretty goofy to see us running around the library trying to get it to work. Throughout the week, I got tons of ironic snaps, and I wouldn't have wanted it any other way.

Since then, the filter has been featured in multiple  The Odyssey  articles, and my tour guide friends have incorporated it into their tours! It's been exciting to see the filter become a part of campus life. However, CWRU still is lacking in filters. We have a one for the nursing school that spans an overly-large part of campus, and one for the general campus displaying our wind turbine and university center in school colors. I can't say I see those used frequently.

 So I made a new filter for the spring semester.

I had previously created this filter for a campus organization, but it was never used. I kept the springy gradient and threw in some Cleveland pride, submitted it, and hoped it was selected. Well, I wouldn't be writing about it if it was never published.

So far, I've been able to contribute a filter once every year and I'm hoping to keep doing so!


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Anemone liangshanica W.T.Wang

### Remarks
null


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nucleus.Game.Components
{
    /// <summary>
    /// Interface for things which act as containers for other items/resources
    /// in an inventory
    /// </summary>
    public interface IInventoryContainer
    {
    }
}


text:
/* cranberry-server
 * https://github.com/jahnf/cranberry-server
 * For licensing see LICENSE file or
 * https://github.com/jahnf/cranberry-server/blob/master/LICENSE
 */

#ifndef LUASP_COMMON_H_
#define LUASP_COMMON_H_

#include "config.h"

#if LUA_SUPPORT

#include <lua.h>

/** Helper function for setting a table string value
 * for the current top stack value */
void lua_set_tablefield_string( lua_State *L, const char* key, const char *value );

/** Helper function for setting a table integer value
 * for the current top stack value */
void lua_set_tablefield_integer( lua_State *L, const char* key, const int value );

/** Helper function for setting a table boolean value
 * for the current top stack value */
void lua_set_tablefield_boolean( lua_State *L, const char* key, const int value );

#endif /* LUA_SUPPORT */
#endif /* LUASP_COMMON_H_ */


text:
echo "python manage.py inspectdb --database=salesforce >tests/inspectdb/models.py"
if python manage.py inspectdb --database=salesforce --traceback >tests/inspectdb/models.py; then

	# Run both tests even if the first test fails. With old Django versions can
	# the read/write test pass (useful information) though validation failed.

	echo "*** check"
	python manage.py check --settings=tests.inspectdb.settings --traceback
	RESULT_1=$?

	echo "*** slow_test"
	python tests/inspectdb/slow_test.py
	RESULT_2=$?

	echo "*** parse test ***"
	# parse tests don't import tthe models.py
	DJANGO_SETTINGS_MODULE=salesforce.testrunner.settings python -m unittest tests.inspectdb.tests
	#python manage.py test --settings=tests.inspectdb.settings tests.inspectdb
	RESULT_3=$?

	echo "*** dependent dynamic model test ***"
	DJANGO_SETTINGS_MODULE=tests.inspectdb.dependent_model.settings python -m unittest tests.inspectdb.dependent_model.test
	#python manage.py test --settings=tests.inspectdb.settings tests.inspectdb
	RESULT_4=$?

	if [ $RESULT_1 == 0 -a $RESULT_2 == 0 -a $RESULT_3 == 0 -a $RESULT_4 == 0 ]; then
		echo OK
	else
		echo ERROR
		false
	fi
fi


text:
'use strict';

( function() {
	CKEDITOR.dialog.add( 'link', function( editor ) {
		var plugin = CKEDITOR.plugins.link;

		// Handles the event when the "Target" selection box is changed.
		var targetChanged = function() {
				var dialog = this.getDialog(),
					popupFeatures = dialog.getContentElement( 'target', 'popupFeatures' ),
					targetName = dialog.getContentElement( 'target', 'linkTargetName' ),
					value = this.getValue();

				if ( !popupFeatures || !targetName )
					return;

				popupFeatures = popupFeatures.getElement();
				popupFeatures.hide();
				targetName.setValue( '' );

				switch ( value ) {
					case 'frame':
						targetName.setLabel( editor.lang.link.targetFrameName );
						targetName.getElement().show();
						break;
					case 'popup':
						popupFeatures.show();
						targetName.setLabel( editor.lang.link.targetPopupName );
						targetName.getElement().show();
						break;
					default:
						targetName.setValue( value );
						targetName.getElement().hide();
						break;
				}

			};

		// Handles the event when the "Type" selection box is changed.
		var linkTypeChanged = function() {
				var dialog = this.getDialog(),
					partIds = [ 'urlOptions', 'anchorOptions', 'emailOptions' ],
					typeValue = this.getValue(),
					uploadTab = dialog.definition.getContents( 'upload' ),
					uploadInitiallyHidden = uploadTab && uploadTab.hidden;

				if ( typeValue == 'url' ) {
					if ( editor.config.linkShowTargetTab )
						dialog.showPage( 'target' );
					if ( !uploadInitiallyHidden )
						dialog.showPage( 'upload' );
				} else {
					dialog.hidePage( 'target' );
					if ( !uploadInitiallyHidden )
						dialog.hidePage( 'upload' );
				}

				for ( var i = 0; i < partIds.length; i++ ) {
					var element = dialog.getContentElement( 'info', partIds[ i ] );
					if ( !element )
						continue;

					element = element.getElement().getParent().getParent();
					if ( partIds[ i ] == typeValue + 'Options' )
						element.show();
					else
						element.hide();
				}

				dialog.layout();
			};

		var setupParams = function( page, data ) {
				if ( data[ page ] )
					this.setValue( data[ page ][ this.id ] || '' );
			};

		var setupPopupParams = function( data ) {
				return setupParams.call( this, 'target', data );
			};

		var setupAdvParams = function( data ) {
				return setupParams.call( this, 'advanced', data );
			};

		var commitParams = function( page, data ) {
				if ( !data[ page ] )
					data[ page ] = {};

				data[ page ][ this.id ] = this.getValue() || '';
			};

		var commitPopupParams = function( data ) {
				return commitParams.call( this, 'target', data );
			};

		var commitAdvParams = function( data ) {
				return commitParams.call( this, 'advanced', data );
			};

		var commonLang = editor.lang.common,
			linkLang = editor.lang.link,
			anchors;

		return {
			title: linkLang.title,
			minWidth: 350,
			minHeight: 230,
			contents: [
				{
				id: 'info',
				label: linkLang.info,
				title: linkLang.info,
				elements: [
					{
					id: 'linkType',
					type: 'select',
					label: linkLang.type,
					'default': 'url',
					items: [
						[ linkLang.toUrl, 'url' ],
						[ linkLang.toAnchor, 'anchor' ],
						[ linkLang.toEmail, 'email' ]
						],
					onChange: linkTypeChanged,
					setup: function( data ) {
						this.setValue( data.type || 'url' );
					},
					commit: function( data ) {
						data.type = this.getValue();
					}
				},
					{
					type: 'vbox',
					id: 'urlOptions',
					children: [
						{
						type: 'hbox',
						widths: [ '25%', '75%' ],
						children: [
							{
							id: 'protocol',
							type: 'select',
							label: commonLang.protocol,
							'default': 'http://',
							items: [
								// Force 'ltr' for protocol names in BIDI. (#5433)
								[ 'http://\u200E', 'http://' ],
								[ 'https://\u200E', 'https://' ],
								[ 'ftp://\u200E', 'ftp://' ],
								[ 'news://\u200E', 'news://' ],
								[ linkLang.other, '' ]
								],
							setup: function( data ) {
								if ( data.url )
									this.setValue( data.url.protocol || '' );
							},
							commit: function( data ) {
								if ( !data.url )
									data.url = {};

								data.url.protocol = this.getValue();
							}
						},
							{
							type: 'text',
							id: 'url',
							label: commonLang.url,
							required: true,
							onLoad: function() {
								this.allowOnChange = true;
							},
							onKeyUp: function() {
								this.allowOnChange = false;
								var protocolCmb = this.getDialog().getContentElement( 'info', 'protocol' ),
									url = this.getValue(),
									urlOnChangeProtocol = /^(http|https|ftp|news):\/\/(?=.)/i,
									urlOnChangeTestOther = /^((javascript:)|[#\/\.\?])/i;

								var protocol = urlOnChangeProtocol.exec( url );
								if ( protocol ) {
									this.setValue( url.substr( protocol[ 0 ].length ) );
									protocolCmb.setValue( protocol[ 0 ].toLowerCase() );
								} else if ( urlOnChangeTestOther.test( url ) )
									protocolCmb.setValue( '' );

								this.allowOnChange = true;
							},
							onChange: function() {
								if ( this.allowOnChange ) // Dont't call on dialog load.
								this.onKeyUp();
							},
							validate: function() {
								var dialog = this.getDialog();

								if ( dialog.getContentElement( 'info', 'linkType' ) && dialog.getValueOf( 'info', 'linkType' ) != 'url' )
									return true;

								if ( !editor.config.linkJavaScriptLinksAllowed && ( /javascript\:/ ).test( this.getValue() ) ) {
									alert( commonLang.invalidValue );
									return false;
								}

								if ( this.getDialog().fakeObj ) // Edit Anchor.
								return true;

								var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noUrl );
								return func.apply( this );
							},
							setup: function( data ) {
								this.allowOnChange = false;
								if ( data.url )
									this.setValue( data.url.url );
								this.allowOnChange = true;

							},
							commit: function( data ) {
								// IE will not trigger the onChange event if the mouse has been used
								// to carry all the operations #4724
								this.onChange();

								if ( !data.url )
									data.url = {};

								data.url.url = this.getValue();
								this.allowOnChange = false;
							}
						}
						],
						setup: function( data ) {
							if ( !this.getDialog().getContentElement( 'info', 'linkType' ) )
								this.getElement().show();
						}
					},
						{
						type: 'button',
						id: 'browse',
						hidden: 'true',
						filebrowser: 'info:url',
						label: commonLang.browseServer
					}
					]
				},
					{
					type: 'vbox',
					id: 'anchorOptions',
					width: 260,
					align: 'center',
					padding: 0,
					children: [
						{
						type: 'fieldset',
						id: 'selectAnchorText',
						label: linkLang.selectAnchor,
						setup: function( data ) {
							anchors = plugin.getEditorAnchors( editor );

							this.getElement()[ anchors && anchors.length ? 'show' : 'hide' ]();
						},
						children: [
							{
							type: 'hbox',
							id: 'selectAnchor',
							children: [
								{
								type: 'select',
								id: 'anchorName',
								'default': '',
								label: linkLang.anchorName,
								style: 'width: 100%;',
								items: [
									[ '' ]
									],
								setup: function( data ) {
									this.clear();
									this.add( '' );

									if ( anchors ) {
										for ( var i = 0; i < anchors.length; i++ ) {
											if ( anchors[ i ].name )
												this.add( anchors[ i ].name );
										}
									}

									if ( data.anchor )
										this.setValue( data.anchor.name );

									var linkType = this.getDialog().getContentElement( 'info', 'linkType' );
									if ( linkType && linkType.getValue() == 'email' )
										this.focus();
								},
								commit: function( data ) {
									if ( !data.anchor )
										data.anchor = {};

									data.anchor.name = this.getValue();
								}
							},
								{
								type: 'select',
								id: 'anchorId',
								'default': '',
								label: linkLang.anchorId,
								style: 'width: 100%;',
								items: [
									[ '' ]
									],
								setup: function( data ) {
									this.clear();
									this.add( '' );

									if ( anchors ) {
										for ( var i = 0; i < anchors.length; i++ ) {
											if ( anchors[ i ].id )
												this.add( anchors[ i ].id );
										}
									}

									if ( data.anchor )
										this.setValue( data.anchor.id );
								},
								commit: function( data ) {
									if ( !data.anchor )
										data.anchor = {};

									data.anchor.id = this.getValue();
								}
							}
							],
							setup: function( data ) {
								this.getElement()[ anchors && anchors.length ? 'show' : 'hide' ]();
							}
						}
						]
					},
						{
						type: 'html',
						id: 'noAnchors',
						style: 'text-align: center;',
						html: '
' + CKEDITOR.tools.htmlEncode( linkLang.noAnchors ) + '
',
						// Focus the first element defined in above html.
						focus: true,
						setup: function( data ) {
							this.getElement()[ anchors && anchors.length ? 'hide' : 'show' ]();
						}
					}
					],
					setup: function( data ) {
						if ( !this.getDialog().getContentElement( 'info', 'linkType' ) )
							this.getElement().hide();
					}
				},
					{
					type: 'vbox',
					id: 'emailOptions',
					padding: 1,
					children: [
						{
						type: 'text',
						id: 'emailAddress',
						label: linkLang.emailAddress,
						required: true,
						validate: function() {
							var dialog = this.getDialog();

							if ( !dialog.getContentElement( 'info', 'linkType' ) || dialog.getValueOf( 'info', 'linkType' ) != 'email' )
								return true;

							var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noEmail );
							return func.apply( this );
						},
						setup: function( data ) {
							if ( data.email )
								this.setValue( data.email.address );

							var linkType = this.getDialog().getContentElement( 'info', 'linkType' );
							if ( linkType && linkType.getValue() == 'email' )
								this.select();
						},
						commit: function( data ) {
							if ( !data.email )
								data.email = {};

							data.email.address = this.getValue();
						}
					},
						{
						type: 'text',
						id: 'emailSubject',
						label: linkLang.emailSubject,
						setup: function( data ) {
							if ( data.email )
								this.setValue( data.email.subject );
						},
						commit: function( data ) {
							if ( !data.email )
								data.email = {};

							data.email.subject = this.getValue();
						}
					},
						{
						type: 'textarea',
						id: 'emailBody',
						label: linkLang.emailBody,
						rows: 3,
						'default': '',
						setup: function( data ) {
							if ( data.email )
								this.setValue( data.email.body );
						},
						commit: function( data ) {
							if ( !data.email )
								data.email = {};

							data.email.body = this.getValue();
						}
					}
					],
					setup: function( data ) {
						if ( !this.getDialog().getContentElement( 'info', 'linkType' ) )
							this.getElement().hide();
					}
				}
				]
			},
				{
				id: 'target',
				requiredContent: 'a[target]', // This is not fully correct, because some target option requires JS.
				label: linkLang.target,
				title: linkLang.target,
				elements: [
					{
					type: 'hbox',
					widths: [ '50%', '50%' ],
					children: [
						{
						type: 'select',
						id: 'linkTargetType',
						label: commonLang.target,
						'default': 'notSet',
						style: 'width : 100%;',
						'items': [
							[ commonLang.notSet, 'notSet' ],
							[ linkLang.targetFrame, 'frame' ],
							[ linkLang.targetPopup, 'popup' ],
							[ commonLang.targetNew, '_blank' ],
							[ commonLang.targetTop, '_top' ],
							[ commonLang.targetSelf, '_self' ],
							[ commonLang.targetParent, '_parent' ]
							],
						onChange: targetChanged,
						setup: function( data ) {
							if ( data.target )
								this.setValue( data.target.type || 'notSet' );
							targetChanged.call( this );
						},
						commit: function( data ) {
							if ( !data.target )
								data.target = {};

							data.target.type = this.getValue();
						}
					},
						{
						type: 'text',
						id: 'linkTargetName',
						label: linkLang.targetFrameName,
						'default': '',
						setup: function( data ) {
							if ( data.target )
								this.setValue( data.target.name );
						},
						commit: function( data ) {
							if ( !data.target )
								data.target = {};

							data.target.name = this.getValue().replace( /\W/gi, '' );
						}
					}
					]
				},
					{
					type: 'vbox',
					width: '100%',
					align: 'center',
					padding: 2,
					id: 'popupFeatures',
					children: [
						{
						type: 'fieldset',
						label: linkLang.popupFeatures,
						children: [
							{
							type: 'hbox',
							children: [
								{
								type: 'checkbox',
								id: 'resizable',
								label: linkLang.popupResizable,
								setup: setupPopupParams,
								commit: commitPopupParams
							},
								{
								type: 'checkbox',
								id: 'status',
								label: linkLang.popupStatusBar,
								setup: setupPopupParams,
								commit: commitPopupParams

							}
							]
						},
							{
							type: 'hbox',
							children: [
								{
								type: 'checkbox',
								id: 'location',
								label: linkLang.popupLocationBar,
								setup: setupPopupParams,
								commit: commitPopupParams

							},
								{
								type: 'checkbox',
								id: 'toolbar',
								label: linkLang.popupToolbar,
								setup: setupPopupParams,
								commit: commitPopupParams

							}
							]
						},
							{
							type: 'hbox',
							children: [
								{
								type: 'checkbox',
								id: 'menubar',
								label: linkLang.popupMenuBar,
								setup: setupPopupParams,
								commit: commitPopupParams

							},
								{
								type: 'checkbox',
								id: 'fullscreen',
								label: linkLang.popupFullScreen,
								setup: setupPopupParams,
								commit: commitPopupParams

							}
							]
						},
							{
							type: 'hbox',
							children: [
								{
								type: 'checkbox',
								id: 'scrollbars',
								label: linkLang.popupScrollBars,
								setup: setupPopupParams,
								commit: commitPopupParams

							},
								{
								type: 'checkbox',
								id: 'dependent',
								label: linkLang.popupDependent,
								setup: setupPopupParams,
								commit: commitPopupParams

							}
							]
						},
							{
							type: 'hbox',
							children: [
								{
								type: 'text',
								widths: [ '50%', '50%' ],
								labelLayout: 'horizontal',
								label: commonLang.width,
								id: 'width',
								setup: setupPopupParams,
								commit: commitPopupParams

							},
								{
								type: 'text',
								labelLayout: 'horizontal',
								widths: [ '50%', '50%' ],
								label: linkLang.popupLeft,
								id: 'left',
								setup: setupPopupParams,
								commit: commitPopupParams

							}
							]
						},
							{
							type: 'hbox',
							children: [
								{
								type: 'text',
								labelLayout: 'horizontal',
								widths: [ '50%', '50%' ],
								label: commonLang.height,
								id: 'height',
								setup: setupPopupParams,
								commit: commitPopupParams

							},
								{
								type: 'text',
								labelLayout: 'horizontal',
								label: linkLang.popupTop,
								widths: [ '50%', '50%' ],
								id: 'top',
								setup: setupPopupParams,
								commit: commitPopupParams

							}
							]
						}
						]
					}
					]
				}
				]
			},
				{
				id: 'upload',
				label: linkLang.upload,
				title: linkLang.upload,
				hidden: true,
				filebrowser: 'uploadButton',
				elements: [
					{
					type: 'file',
					id: 'upload',
					label: commonLang.upload,
					style: 'height:40px',
					size: 29
				},
					{
					type: 'fileButton',
					id: 'uploadButton',
					label: commonLang.uploadSubmit,
					filebrowser: 'info:url',
					'for': [ 'upload', 'upload' ]
				}
				]
			},
				{
				id: 'advanced',
				label: linkLang.advanced,
				title: linkLang.advanced,
				elements: [
					{
					type: 'vbox',
					padding: 1,
					children: [
						{
						type: 'hbox',
						widths: [ '45%', '35%', '20%' ],
						children: [
							{
							type: 'text',
							id: 'advId',
							requiredContent: 'a[id]',
							label: linkLang.id,
							setup: setupAdvParams,
							commit: commitAdvParams
						},
							{
							type: 'select',
							id: 'advLangDir',
							requiredContent: 'a[dir]',
							label: linkLang.langDir,
							'default': '',
							style: 'width:110px',
							items: [
								[ commonLang.notSet, '' ],
								[ linkLang.langDirLTR, 'ltr' ],
								[ linkLang.langDirRTL, 'rtl' ]
								],
							setup: setupAdvParams,
							commit: commitAdvParams
						},
							{
							type: 'text',
							id: 'advAccessKey',
							requiredContent: 'a[accesskey]',
							width: '80px',
							label: linkLang.acccessKey,
							maxLength: 1,
							setup: setupAdvParams,
							commit: commitAdvParams

						}
						]
					},
						{
						type: 'hbox',
						widths: [ '45%', '35%', '20%' ],
						children: [
							{
							type: 'text',
							label: linkLang.name,
							id: 'advName',
							requiredContent: 'a[name]',
							setup: setupAdvParams,
							commit: commitAdvParams

						},
							{
							type: 'text',
							label: linkLang.langCode,
							id: 'advLangCode',
							requiredContent: 'a[lang]',
							width: '110px',
							'default': '',
							setup: setupAdvParams,
							commit: commitAdvParams

						},
							{
							type: 'text',
							label: linkLang.tabIndex,
							id: 'advTabIndex',
							requiredContent: 'a[tabindex]',
							width: '80px',
							maxLength: 5,
							setup: setupAdvParams,
							commit: commitAdvParams

						}
						]
					}
					]
				},
					{
					type: 'vbox',
					padding: 1,
					children: [
						{
						type: 'hbox',
						widths: [ '45%', '55%' ],
						children: [
							{
							type: 'text',
							label: linkLang.advisoryTitle,
							requiredContent: 'a[title]',
							'default': '',
							id: 'advTitle',
							setup: setupAdvParams,
							commit: commitAdvParams

						},
							{
							type: 'text',
							label: linkLang.advisoryContentType,
							requiredContent: 'a[type]',
							'default': '',
							id: 'advContentType',
							setup: setupAdvParams,
							commit: commitAdvParams

						}
						]
					},
						{
						type: 'hbox',
						widths: [ '45%', '55%' ],
						children: [
							{
							type: 'text',
							label: linkLang.cssClasses,
							requiredContent: 'a(cke-xyz)', // Random text like 'xyz' will check if all are allowed.
							'default': '',
							id: 'advCSSClasses',
							setup: setupAdvParams,
							commit: commitAdvParams

						},
							{
							type: 'text',
							label: linkLang.charset,
							requiredContent: 'a[charset]',
							'default': '',
							id: 'advCharset',
							setup: setupAdvParams,
							commit: commitAdvParams

						}
						]
					},
						{
						type: 'hbox',
						widths: [ '45%', '55%' ],
						children: [
							{
							type: 'text',
							label: linkLang.rel,
							requiredContent: 'a[rel]',
							'default': '',
							id: 'advRel',
							setup: setupAdvParams,
							commit: commitAdvParams
						},
							{
							type: 'text',
							label: linkLang.styles,
							requiredContent: 'a{cke-xyz}', // Random text like 'xyz' will check if all are allowed.
							'default': '',
							id: 'advStyles',
							validate: CKEDITOR.dialog.validate.inlineStyle( editor.lang.common.invalidInlineStyle ),
							setup: setupAdvParams,
							commit: commitAdvParams
						}
						]
					}
					]
				}
				]
			}
			],
			onShow: function() {
				var editor = this.getParentEditor(),
					selection = editor.getSelection(),
					element = null;

				// Fill in all the relevant fields if there's already one link selected.
				if ( ( element = plugin.getSelectedLink( editor ) ) && element.hasAttribute( 'href' ) ) {
					// Don't change selection if some element is already selected.
					// For example - don't destroy fake selection.
					if ( !selection.getSelectedElement() )
						selection.selectElement( element );
				} else
					element = null;

				var data = plugin.parseLinkAttributes( editor, element );

				// Record down the selected element in the dialog.
				this._.selectedElement = element;

				this.setupContent( data );
			},
			onOk: function() {
				var data = {};

				// Collect data from fields.
				this.commitContent( data );

				var selection = editor.getSelection(),
					attributes = plugin.getLinkAttributes( editor, data );

				if ( !this._.selectedElement ) {
					var range = selection.getRanges()[ 0 ];

					// Use link URL as text with a collapsed cursor.
					if ( range.collapsed ) {
						// Short mailto link text view (#5736).
						var text = new CKEDITOR.dom.text( data.type == 'email' ?
							data.email.address : attributes.set[ 'data-cke-saved-href' ], editor.document );
						range.insertNode( text );
						range.selectNodeContents( text );
					}

					// Apply style.
					var style = new CKEDITOR.style( {
						element: 'a',
						attributes: attributes.set
					} );

					style.type = CKEDITOR.STYLE_INLINE; // need to override... dunno why.
					style.applyToRange( range, editor );
					range.select();
				} else {
					// We're only editing an existing link, so just overwrite the attributes.
					var element = this._.selectedElement,
						href = element.data( 'cke-saved-href' ),
						textView = element.getHtml();

					element.setAttributes( attributes.set );
					element.removeAttributes( attributes.removed );

					// Update text view when user changes protocol (#4612).
					if ( href == textView || data.type == 'email' && textView.indexOf( '@' ) != -1 ) {
						// Short mailto link text view (#5736).
						element.setHtml( data.type == 'email' ?
							data.email.address : attributes.set[ 'data-cke-saved-href' ] );

						// We changed the content, so need to select it again.
						selection.selectElement( element );
					}

					delete this._.selectedElement;
				}
			},
			onLoad: function() {
				if ( !editor.config.linkShowAdvancedTab )
					this.hidePage( 'advanced' ); //Hide Advanded tab.

				if ( !editor.config.linkShowTargetTab )
					this.hidePage( 'target' ); //Hide Target tab.
			},
			// Inital focus on 'url' field if link is of type URL.
			onFocus: function() {
				var linkType = this.getContentElement( 'info', 'linkType' ),
					urlField;

				if ( linkType && linkType.getValue() == 'url' ) {
					urlField = this.getContentElement( 'info', 'url' );
					urlField.select();
				}
			}
		};
	} );
} )();

/**
 * The e-mail address anti-spam protection option. The protection will be
 * applied when creating or modifying e-mail links through the editor interface.
 *
 * Two methods of protection can be chosen:
 *
 * 1. The e-mail parts (name, domain, and any other query string) are
 *     assembled into a function call pattern. Such function must be
 *     provided by the developer in the pages that will use the contents.
 * 2. Only the e-mail address is obfuscated into a special string that
 *     has no meaning for humans or spam bots, but which is properly
 *     rendered and accepted by the browser.
 *
 * Both approaches require JavaScript to be enabled.
 *
 *		// href="mailto:tester@ckeditor.com?subject=subject&body=body"
 *		config.emailProtection = '';
 *
 *		// href="e-mail"
 *		config.emailProtection = 'encode';
 *
 *		// href="javascript:mt('tester','ckeditor.com','subject','body')"
 *		config.emailProtection = 'mt(NAME,DOMAIN,SUBJECT,BODY)';
 *
 * @since 3.1
 * @cfg {String} [emailProtection='' (empty string = disabled)]
 * @member CKEDITOR.config
 */


text:
'use strict';

exports.up = async function (knex) {
  await knex.table('test_transactions').update({ value: 1 });
  throw new Error('Up failed');
};

exports.down = async function () {};

exports.config = {
  transaction: false,
};


text:
.. java:import:: java.util Locale

CrossPlatformCommand
====================

.. java:package:: com.nikolavp.approval.utils
   :noindex:

.. java:type:: public abstract class CrossPlatformCommand<T>

   A command that when run will execute the proper method for the specified operating system. This is especially useful when you are trying to create for handling different platforms. Here is an example usage of the class:

   .. parsed-literal::

      final Boolean result = new CrossPlatformCommand<Boolean>() {
          @Override protected Boolean onWindows() {
          //do your logic for windows
          }

          @Override protected Boolean onUnix() {
          //do your logic for unix
          }

          @Override protected Boolean onMac() {
          //do your logic for mac
          }

          @Override protected Boolean onSolaris() {
          //do your logic for solaris
          }
      }.execute();

   :param <T>: the result from the command.

Methods
-------
execute
^^^^^^^

.. java:method:: public T execute()
   :outertype: CrossPlatformCommand

   Main method that should be executed. This will return the proper result depending on your platform.

   :return: the result

isMac
^^^^^

.. java:method:: public static boolean isMac()
   :outertype: CrossPlatformCommand

   Check if the current OS is MacOS.

   :return: true if macOS and false otherwise

isSolaris
^^^^^^^^^

.. java:method:: public static boolean isSolaris()
   :outertype: CrossPlatformCommand

   Check if the current OS is Solaris.

   :return: true if solaris and false otherwise

isUnix
^^^^^^

.. java:method:: public static boolean isUnix()
   :outertype: CrossPlatformCommand

   Check if the current OS is some sort of unix.

   :return: true if unix and false otherwise

isWindows
^^^^^^^^^

.. java:method:: public static boolean isWindows()
   :outertype: CrossPlatformCommand

   Check if the current OS is windows.

   :return: true if windows and false otherwise

onMac
^^^^^

.. java:method:: protected T onMac()
   :outertype: CrossPlatformCommand

   What to execute on macOS.

   :return: the result

onSolaris
^^^^^^^^^

.. java:method:: protected T onSolaris()
   :outertype: CrossPlatformCommand

   What to execute on solaris.

   :return: the result

onUnix
^^^^^^

.. java:method:: protected abstract T onUnix()
   :outertype: CrossPlatformCommand

   What to execute on windows.

   :return: the result

onWindows
^^^^^^^^^

.. java:method:: protected abstract T onWindows()
   :outertype: CrossPlatformCommand

   What to execute on windows.

   :return: the result

setOS
^^^^^

.. java:method:: static void setOS(String newOs)
   :outertype: CrossPlatformCommand


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@color/bg_dark_card" android:state_pressed="true" />
</selector>


text: CONSTANTS = dict()


text:
<?php

namespace MVNerds\CoreBundle\Model;

use MVNerds\CoreBundle\Model\om\BaseFeedQuery;

class FeedQuery extends BaseFeedQuery
{
}


text:
import Generator from './base';

export default class ControlGenerator extends Generator {
    options: generator.IControlOptions;
    protected noLessOrHtml: boolean;

    constructor(options: any, config: generator.IControlConfig) {
        super(options, config);
        this.noLessOrHtml = !!config.noLessOrHtml;
    }

    defineOptions(): void {
        super.defineOptions();

        if (!this.noLessOrHtml) {
            this.option('less', {
                description: `Do not generate a less file`,
                defaults: true,
            });

            this.option('html', {
                description: `Do not generate an html file`,
                defaults: true,
            });
        }
    }

    protected _render(src: string, dest: string, config: any): Promise<any> {
        let options = this.options;
        config.html = options.html;

        let promises = [this._renderFile('.ts', src, dest, config)];

        if (!this.noLessOrHtml) {
            if (options.less) {
                promises.push(
                    this._renderFile('.less', this.ext, dest, config)
                );
            }

            if (options.html) {
                promises.push(
                    this._renderFile('.html', this.ext, dest, config)
                );
            }
        }

        return Promise.all(promises);
    }

    protected _renderFile(
        ext: string,
        src: string,
        dest: string,
        config: any
    ): Promise<any> {
        return this.render(src + ext, dest + ext, config);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<ua.in.badparking.ui.adapters.CheckableLinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical"
    android:orientation="horizontal">

    <TextView
        android:id="@+id/list_item"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_weight="1"
        android:ellipsize="marquee"
        android:padding="12dp"
        android:textColor="@android:color/black"
        android:textSize="18sp"/>

    <ImageView android:src="?android:attr/listChoiceIndicatorMultiple"
        android:duplicateParentState="true"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="8dp"/>

</ua.in.badparking.ui.adapters.CheckableLinearLayout>


text:
<?php

declare(strict_types=1);

namespace Test\LitGroup\Transaction;

use LitGroup\Transaction\TransactionHandler;

class SpyHandler implements TransactionHandler
{
    const BEGIN = 'begin';
    const COMMIT = 'commit';
    const ROLLBACK = 'rollBack';

    /** @var string[] */
    private $calls = [];

    public function begin(): void
    {
        $this->addCall(self::BEGIN);
    }

    public function commit(): void
    {
        $this->addCall(self::COMMIT);
    }

    public function rollBack(): void
    {
        $this->addCall(self::ROLLBACK);
    }

    /**
     * @return string[]
     */
    public function getCalls(): array
    {
        return $this->calls;
    }

    private function addCall(string $call): void
    {
        assert(in_array($call, [self::BEGIN, self::COMMIT, self::ROLLBACK]));

        $this->calls[] = $call;
    }
}


text:
#ifndef _ASM_PARISC_ATOMIC_H_
#define _ASM_PARISC_ATOMIC_H_

#include <linux/types.h>
#include <asm/system.h>

/*
 * Atomic operations that C can't guarantee us.  Useful for
 * resource counting etc..
 *
 * And probably incredibly slow on parisc.  OTOH, we don't
 * have to write any serious assembly.   prumpf
 */

#ifdef CONFIG_SMP
#include <asm/spinlock.h>
#include <asm/cache.h>		/* we use L1_CACHE_BYTES */

/* Use an array of spinlocks for our atomic_ts.
 * Hash function to index into a different SPINLOCK.
 * Since "a" is usually an address, use one spinlock per cacheline.
 */
#  define ATOMIC_HASH_SIZE 4
#  define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) a)/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ]))

extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned;

/* Can't use raw_spin_lock_irq because of #include problems, so
 * this is the substitute */
#define _atomic_spin_lock_irqsave(l,f) do {	\
	raw_spinlock_t *s = ATOMIC_HASH(l);		\
	local_irq_save(f);			\
	__raw_spin_lock(s);			\
} while(0)

#define _atomic_spin_unlock_irqrestore(l,f) do {	\
	raw_spinlock_t *s = ATOMIC_HASH(l);			\
	__raw_spin_unlock(s);				\
	local_irq_restore(f);				\
} while(0)

#else
#  define _atomic_spin_lock_irqsave(l,f) do { local_irq_save(f); } while (0)
#  define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0)
#endif

/* This should get optimized out since it's never called.
** Or get a link error if xchg is used "wrong".
*/
extern void __xchg_called_with_bad_pointer(void);

/* __xchg32/64 defined in arch/parisc/lib/bitops.c */
extern unsigned long __xchg8(char, char *);
extern unsigned long __xchg32(int, int *);
#ifdef CONFIG_64BIT
extern unsigned long __xchg64(unsigned long, unsigned long *);
#endif

/* optimizer better get rid of switch since size is a constant */
static __inline__ unsigned long
__xchg(unsigned long x, __volatile__ void * ptr, int size)
{
	switch(size) {
#ifdef CONFIG_64BIT
	case 8: return __xchg64(x,(unsigned long *) ptr);
#endif
	case 4: return __xchg32((int) x, (int *) ptr);
	case 1: return __xchg8((char) x, (char *) ptr);
	}
	__xchg_called_with_bad_pointer();
	return x;
}

/*
** REVISIT - Abandoned use of LDCW in xchg() for now:
** o need to test sizeof(*ptr) to avoid clearing adjacent bytes
** o and while we are at it, could CONFIG_64BIT code use LDCD too?
**
**	if (__builtin_constant_p(x) && (x == NULL))
**		if (((unsigned long)p & 0xf) == 0)
**			return __ldcw(p);
*/
#define xchg(ptr,x) \
	((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))

#define __HAVE_ARCH_CMPXCHG	1

/* bug catcher for when unsupported size is used - won't link */
extern void __cmpxchg_called_with_bad_pointer(void);

/* __cmpxchg_u32/u64 defined in arch/parisc/lib/bitops.c */
extern unsigned long __cmpxchg_u32(volatile unsigned int *m, unsigned int old, unsigned int new_);
extern unsigned long __cmpxchg_u64(volatile unsigned long *ptr, unsigned long old, unsigned long new_);

/* don't worry...optimizer will get rid of most of this */
static __inline__ unsigned long
__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
{
	switch(size) {
#ifdef CONFIG_64BIT
	case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
#endif
	case 4: return __cmpxchg_u32((unsigned int *)ptr, (unsigned int) old, (unsigned int) new_);
	}
	__cmpxchg_called_with_bad_pointer();
	return old;
}

#define cmpxchg(ptr,o,n)						 \
  ({									 \
     __typeof__(*(ptr)) _o_ = (o);					 \
     __typeof__(*(ptr)) _n_ = (n);					 \
     (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,		 \
				    (unsigned long)_n_, sizeof(*(ptr))); \
  })

/* Note that we need not lock read accesses - aligned word writes/reads
 * are atomic, so a reader never sees unconsistent values.
 *
 * Cache-line alignment would conflict with, for example, linux/module.h
 */

typedef struct { volatile int counter; } atomic_t;

/* It's possible to reduce all atomic operations to either
 * __atomic_add_return, atomic_set and atomic_read (the latter
 * is there only for consistency).
 */

static __inline__ int __atomic_add_return(int i, atomic_t *v)
{
	int ret;
	unsigned long flags;
	_atomic_spin_lock_irqsave(v, flags);

	ret = (v->counter += i);

	_atomic_spin_unlock_irqrestore(v, flags);
	return ret;
}

static __inline__ void atomic_set(atomic_t *v, int i)
{
	unsigned long flags;
	_atomic_spin_lock_irqsave(v, flags);

	v->counter = i;

	_atomic_spin_unlock_irqrestore(v, flags);
}

static __inline__ int atomic_read(const atomic_t *v)
{
	return v->counter;
}

/* exported interface */
#define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))

/**
 * atomic_add_unless - add unless the number is a given value
 * @v: pointer of type atomic_t
 * @a: the amount to add to v...
 * @u: ...unless v is equal to u.
 *
 * Atomically adds @a to @v, so long as it was not @u.
 * Returns non-zero if @v was not @u, and zero otherwise.
 */
#define atomic_add_unless(v, a, u)				\
({								\
	int c, old;						\
	c = atomic_read(v);					\
	while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \
		c = old;					\
	c != (u);						\
})
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)

#define atomic_add(i,v)	((void)(__atomic_add_return( ((int)i),(v))))
#define atomic_sub(i,v)	((void)(__atomic_add_return(-((int)i),(v))))
#define atomic_inc(v)	((void)(__atomic_add_return(   1,(v))))
#define atomic_dec(v)	((void)(__atomic_add_return(  -1,(v))))

#define atomic_add_return(i,v)	(__atomic_add_return( ((int)i),(v)))
#define atomic_sub_return(i,v)	(__atomic_add_return(-((int)i),(v)))
#define atomic_inc_return(v)	(__atomic_add_return(   1,(v)))
#define atomic_dec_return(v)	(__atomic_add_return(  -1,(v)))

#define atomic_add_negative(a, v)	(atomic_add_return((a), (v)) < 0)

/*
 * atomic_inc_and_test - increment and test
 * @v: pointer of type atomic_t
 *
 * Atomically increments @v by 1
 * and returns true if the result is zero, or false for all
 * other cases.
 */
#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)

#define atomic_dec_and_test(v)	(atomic_dec_return(v) == 0)

#define atomic_sub_and_test(i,v)	(atomic_sub_return((i),(v)) == 0)

#define ATOMIC_INIT(i)	((atomic_t) { (i) })

#define smp_mb__before_atomic_dec()	smp_mb()
#define smp_mb__after_atomic_dec()	smp_mb()
#define smp_mb__before_atomic_inc()	smp_mb()
#define smp_mb__after_atomic_inc()	smp_mb()

#ifdef CONFIG_64BIT

typedef struct { volatile s64 counter; } atomic64_t;

#define ATOMIC64_INIT(i) ((atomic64_t) { (i) })

static __inline__ int
__atomic64_add_return(s64 i, atomic64_t *v)
{
	int ret;
	unsigned long flags;
	_atomic_spin_lock_irqsave(v, flags);

	ret = (v->counter += i);

	_atomic_spin_unlock_irqrestore(v, flags);
	return ret;
}

static __inline__ void
atomic64_set(atomic64_t *v, s64 i)
{
	unsigned long flags;
	_atomic_spin_lock_irqsave(v, flags);

	v->counter = i;

	_atomic_spin_unlock_irqrestore(v, flags);
}

static __inline__ s64
atomic64_read(const atomic64_t *v)
{
	return v->counter;
}

#define atomic64_add(i,v)	((void)(__atomic64_add_return( ((s64)i),(v))))
#define atomic64_sub(i,v)	((void)(__atomic64_add_return(-((s64)i),(v))))
#define atomic64_inc(v)		((void)(__atomic64_add_return(   1,(v))))
#define atomic64_dec(v)		((void)(__atomic64_add_return(  -1,(v))))

#define atomic64_add_return(i,v)	(__atomic64_add_return( ((s64)i),(v)))
#define atomic64_sub_return(i,v)	(__atomic64_add_return(-((s64)i),(v)))
#define atomic64_inc_return(v)		(__atomic64_add_return(   1,(v)))
#define atomic64_dec_return(v)		(__atomic64_add_return(  -1,(v)))

#define atomic64_add_negative(a, v)	(atomic64_add_return((a), (v)) < 0)

#define atomic64_inc_and_test(v) 	(atomic64_inc_return(v) == 0)
#define atomic64_dec_and_test(v)	(atomic64_dec_return(v) == 0)
#define atomic64_sub_and_test(i,v)	(atomic64_sub_return((i),(v)) == 0)

#endif /* CONFIG_64BIT */

#include <asm-generic/atomic.h>

#endif /* _ASM_PARISC_ATOMIC_H_ */


text:
<?hh // strict

namespace Titon\Intl\Exception;

/**
 * Exception thrown when a locale has not been detected.
 *
 * @package Titon\Intl\Exception
 */
class UndetectedLocaleException extends \RuntimeException {

}


text:
/** @file tim_app_msgids.h
 *  Defines TIM app message IDs. These IDs are used in tim_app.c to direct
 *  commands to the appropriate pipes for the CFE.
*/
#ifndef _tim_app_msgids_h_
#define _tim_app_msgids_h_

/*
** not in this version of the cFS
#include "mission_msgids.h"
#include "platform_base_msgids.h"
*/

// Message IDs for commands. Used to direct commands to pipes in CFE
/** Indicates a command message */
#define TIM_APP_CMD_MID 0x188A /* CFE_CMD_MID_BASE + TIM_APP_CMD_MID_OFFSET */
/** Indicates a send housekeeping command message */
#define TIM_APP_SEND_HK_MID                                                    \
  0x188B /* CFE_CMD_MID_BASE + TIM_APP_SEND_HK_MID_OFFSET */
/** Indicates a housekeeping telemetry message */
#define TIM_APP_HK_TLM_MID                                                     \
  0x088B /* CFE_TLM_MID_BASE + TIM_APP_HK_TLM_MID_OFFSET */

#endif