text:
Flux slider is a CSS3 animation based image transition framework, inspired in part by the fantastic [Nivo Slider](nivo.dev7studios.com) jQuery plugin.

Instead of the traditional Javascript timer based animations used by jQuery, Flux utilises the newer, more powerful CSS3 animation technology. Its in a fairly early/rough state at the moment but testing on the iPhone/iPad does appear to produce much smoother animations. Desktop performance (as with Nivo) is very smooth but the use of CSS3 enables us to produce some new effects that Nivo can't, e.g. rotations.

The aim is to use hardware acceleration where possible to improve performance on less powerful devices, such as mobiles & tablets.

## Known to work with
- Safari
- Chrome
- iOS
- Blackberry Playbook
- Firefox 4
- Opera 11

## May/should also work for
- Android (Known to be jerky due to lack of hardware acceleration)

# Requirements
Flux requires a browser which supports CSS3 transformations and has been built to use either jQuery or [Zepto.js](http://zepto.js) as they share the same API. For mobile deployment Zepto is recommended due to its <5k deployment footprint.

# Usage
Create HTML markup with the images you wish to use. You can also wrap images in a link if you need them to be clickable. For example:

Next instantiate Flux Slider:

	$(function(){
		window.myFlux = new flux.slider('#slider');
	});

Or, if you're using the provided jQuery widget then you can also do the following:

	$(function(){
		window.myFlux = $('#slider').flux();
	});

*Note: If you plan to use the Zepto framework then the widget method won't work*

## A note on feature detection
Flux now makes use of [Modernizr](http://www.modernizr.com) when available for feature detection. Flux **does not** require Modernizr but it will use it instead of the inbuilt code if it's loaded.

Note: If you have a need to initialise Flux before the `$.ready()` event (*not recommended!*) then you will need to use Modernizr for feature detection as the inbuilt code does not play well with an uninitialised DOM.

## Configuration options
The <flux.slider> constructor can also take an optional second parameter which is an object of key/value configuration options.

- 	**autoplay** Boolean *(default: true)*

	Whether or not the slider should start to play automatically

- 	**pagination** Boolean *(default: false)*

	Whether or not to show a pagination control for manually selecting the image to show

- 	**controls** Boolean *(default: false)*

	Whether or not to show a next/prev controls

- 	**captions** Boolean *(default: false)*

	Whether or not to show a caption bar. Captions are read from the `title` attribute of loaded `img` elements

- 	**transitions** Array *(default: all available transitions)*

	An array with the names of the transitions to use, available options are:

	+ **2D**
		- `bars`
		- `blinds`
		- `blocks`
		- `blocks2`
		- `concentric`
		- `dissolve` *requires mask support*
		- `slide`
		- `warp`
		- `zip`
	+ **3D**
		- `bars3d`
		- `blinds3d`
		- `cube`
		- `tiles3d`
		- `turn`

- 	**delay** Integer *(default: 4000)*

	The number of milliseconds to wait between image transitions

For example, to prevent autoplay and show a pagination control you would do the following:

	$(function(){
		window.myFlux = new flux.slider('#slider', {
			autoplay: false,
			pagination: true
		});
	});

Or with the jQuery widget:

	$(function(){
		window.myFlux = $('#slider').flux({
			autoplay: false,
			pagination: true
		});
	});

## flux.slider API

The API functions work with both the native Javascript object and the jQuery widget. For example:

	// Show next image using the bars3d transition (native Javascript object)
	window.myFlux.next('bars3d');

or

	// Show next image using the bars3d transition (jQuery widget)
	window.myFlux.flux('next', 'bars3d');

*Note: All the jQuery widget functions are chainable except those that return something specific, such as `isPlaying()` & `getImage()`.*

For more information on using jQuery widgets see the [jQuery Doc's](http://docs.jquery.com/UI_Developer_Guide);

### Play controls
- `start()` Enable autoplay
- `stop()` Disable autoplay
- `isPlaying()` Returns a boolean as to whether autoplay is currently enabled

### Transport controls
- 	`next([transition [, options]])`

	Show the next image.

	`transition` *(optional)* The name of the transition to use, otherwise one picked at random

	`options` *(optional)* Transition specific options for this transition only

- 	`prev([transition [, options]])`

	Show the previous image.

	`transition` *(optional)* The name of the transition to use, otherwise one picked at random

	`options` *(optional)* Transition specific options for this transition only

- 	`showImage(index [, transition [, options]])`

	Show the image at `index`.

	`transition` *(optional)* The name of the transition to use, otherwise one picked at random

	`options` *(optional)* Transition specific options for this transition only

### Misc
- `getImage(index)` Returns the image with the provided index

### Receiving notification when a transition completes

There are occasions where you may wish to know when a transition has completed, or that the currently displayed image has changed.

Flux provides a couple of mechanisms for this:

#### `fluxTransitionEnd` Javascript Event

After each transition, Flux dispatches a `fluxTransitionEnd` event. To listen for these events you can do the following:

	$('#slider').bind('fluxTransitionEnd', function(event) {
		var img = event.data.currentImage;
		// Do something with img...
	});

#### `onTransitionEnd` callback function

You can alternatively pass in a callback function as part of the configuration options when you instantiate Flux, e.g.

	window.myFlux = $('#slider').flux({
		autoplay: false,
		pagination: true,
		onTransitionEnd: function(data) {
			var img = data.currentImage;
			// Do something with img...
		}
	});

# Writing custom transitions
Writing your own custom transitions is easy, you just need to create an instance of a `flux.transition` object and pass in some callback functions to provide the custom behaviour you're looking for.

Lets look at the built in **bars** transition as an example. The barebones definition of the transition looks like:

	flux.transitions.bars = function(fluxslider, opts) {
		return new flux.transition(fluxslider, $.extend({
			barWidth: 60,
			setup: function() {

			},
			execute: function() {

			}
		}, opts));
	}

Here we add a new function to the `flux.transitions` namespace called **bars**. This function takes two parameters, a `flux.slider` object and an options key/value object.

*Note: Its currently not possible to pass options into transitions from the core flux.slider code but as this is on the list of things to add its a good idea to make sure the transitions can handle this when its implemented!*

The function we create should return a new `flux.transition` object, passing in the `flux.slider` parameter along with a set of options.

All transition objects automatically have access to the following:

- 	`this.slider`

	The `flux.slider` object passed into the constructor. From this object you can access the current image `this.slider.image1` and the next image `this.slider.image2`.

- 	`this.options`

	The options passed in as the 2nd parameter to the `flux.transition` constructor call.

## setup()
Two functions are needed for the transition to operate, first is `setup`. This function is responsible for initialising the DOM before the transition runs. In the case of the bars transition this function creates a `div` for each bar and set the background image so that adjacent bars appear as a single image.

The setup function should also initialise the CSS3 properties needed to enable a CSS transition.

	setup: function() {
		var barCount = Math.floor(this.slider.image1.width() / this.options.barWidth) + 1

		var delayBetweenBars = 40;

		for(var i=0; i<barCount; i++) {
			var bar = $('

').attr('class', 'bar bar-'+i).css({
				width: this.options.barWidth+'px',
				height: '100%',
				position: 'absolute',
				top: '0',
				left: (i*this.options.barWidth)+'px',

				'background-image': this.slider.image1.css('background-image'),
				'background-position': '-'+(i*this.options.barWidth)+'px 0px'
			}).css3({
				'transition-duration': '400ms',
				'transition-timing-function': 'ease-in',
				'transition-property': 'all',
				'transition-delay': (i*delayBetweenBars)+'ms'
			});
			this.slider.image1.append(bar);
		}
	}

A helper function called `.css3()` has been created for convenience to automatically add vendor prefixes to CSS3 properties. Any properties that require prefixes should be added via this function rather than `.css()` as this ensures that transitions are cross-browser compatible.

## execute()
The `execute` function is where the CSS changes should be made, as transitions have already been initialised in `setup()` applying the end CSS property state should be all thats required:

	execute: function() {
		var _this = this;

		var height = this.slider.image1.height();

		var bars = this.slider.image1.find('div.bar');

		// Get notified when the last transition has completed
		$(bars[bars.length-1]).transitionEnd(function(){
			_this.finished();
		});

		bars.css({
			'opacity': '0.5'
		}).css3({
			'transform': flux.browser.translate(0, height)
		});
	}

Two further convenience functions have been used in this example. The first `.transitionEnd()` is a cross-browser event function to catch the 'transition end' event. In this example we want to be notified when the final bar as finished animating, this is how we know the transition is complete. We can then perform some custom code but its important to remember to call the transitions `finished()` function to ensure that the DOM is reset for the next transition.

## Transition writing guidelines

Here are some guidelines for writing transitions if you'd like to have them considered for inclusion into the main distribution:

- 	If the transition requires 3D transforms you must set the `requires3d` property to `true`. e.g.

		flux.transitions.bars3d = function(fluxslider, opts) {
			return new flux.transition(fluxslider, $.extend({
				requires3d: true,
				setup: function() {
					...
				}
			}
		};

- 	For delaying animations to specific bars/blocks/tiles use `-[webkit/moz/o]-transition-delay` rather than `setTimeout()`/`setInterval()`. This enables the GPU to handle the timing and makes for smoother transitions.

- 	When using many new bars/blocks/tiles, add them to a container element off DOM and then add the container in one go, e.g.

		var container = $('

');

		for(var i=0; i<10; i++) {
			var elem = $('
</div');
			container.append(elem);
		}

		this.image.slider1.append(container);

# flux.browser

`flux.browser` is an object designed to help determine browser support for CSS3 transitions.

- 	`supportsTransitions` *Boolean*

	Does the current browser support CSS3 transitions?

- 	`supports3d` *Boolean*

	Does the current browser support 3D CSS3 transitions?

- 	`translate(x, y, z)`

	Returns a CSS translate string most suitable for the current browser, for example under iOS where 3D transformations are supported `flux.browser.translate(10, 20)` would return `translate3d(10, 20, 0)` so as to trigger hardware acceleration.

- 	`rotate(axis, deg)`

	Operates the same as the above translate function and returns the most suitable CSS for the current browser.

- 	`rotateX(deg)`

	Returns the result of calling `flux.browser.rotate('x', deg)` *Requires 3D transformation support*

- 	`rotateY(deg)`

	Returns the result of calling `flux.browser.rotate('y', deg)` *Requires 3D transformation support*

- 	`rotateZ(deg)`

	Returns the result of calling `flux.browser.rotate('z', deg)`

# License

Flux is Copyright © 2011 [Joe Lambert](http://www.joelambert.co.uk) and is licensed under the terms of the [MIT License](http://www.opensource.org/licenses/mit-license.php).

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/glix/flux_slider/trend.png)](https://bitdeli.com/free "Bitdeli Badge")


text:
<resources>

  <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"></style>

  <style name="AppTheme" parent="AppBaseTheme"></style>

</resources>

redpajama_set_name: RedPajamaGithub


text:
/* See LICENSE for licensing information */

/**
 * \file dircollate.c
 *
 * \brief Collation code for figuring out which identities to vote for in
 *   the directory voting process.
 *
 * During the consensus calculation, when an authority is looking at the vote
 * documents from all the authorities, it needs to compute the consensus for
 * each relay listed by at least one authority.  But the notion of "each
 * relay" can be tricky: some relays have Ed25519 keys, and others don't.
 *
 * Moreover, older consensus methods did RSA-based ID collation alone, and
 * ignored Ed25519 keys.  We need to support those too until we're completely
 * sure that authorities will never downgrade.
 *
 * This module is invoked exclusively from dirvote.c.
 */

#define DIRCOLLATE_PRIVATE
#include "dircollate.h"
#include "dirvote.h"

static void dircollator_collate_by_rsa(dircollator_t *dc);
static void dircollator_collate_by_ed25519(dircollator_t *dc);

/** Hashtable entry mapping a pair of digests (actually an ed25519 key and an
 * RSA SHA1 digest) to an array of vote_routerstatus_t. */
typedef struct ddmap_entry_s {
  HT_ENTRY(ddmap_entry_s) node;
  /** A SHA1-RSA1024 identity digest and Ed25519 identity key,
   * concatenated.  (If there is no ed25519 identity key, there is no
   * entry in this table.) */
  uint8_t d[DIGEST_LEN + DIGEST256_LEN];
  /* The nth member of this array corresponds to the vote_routerstatus_t (if
   * any) received for this digest pair from the nth voter. */
  vote_routerstatus_t *vrs_lst[FLEXIBLE_ARRAY_MEMBER];
} ddmap_entry_t;

/** Release all storage held by e. */
static void
ddmap_entry_free(ddmap_entry_t *e)
{
  tor_free(e);
}

/** Return a new empty ddmap_entry, with n_votes elements in
 * vrs_list. */
static ddmap_entry_t *
ddmap_entry_new(int n_votes)
{
  return tor_malloc_zero(offsetof(ddmap_entry_t, vrs_lst) +
                         sizeof(vote_routerstatus_t *) * n_votes);
}

/** Helper: compute a hash of a single ddmap_entry_t's identity (or
 * identities) */
static unsigned
ddmap_entry_hash(const ddmap_entry_t *ent)
{
  return (unsigned) siphash24g(ent->d, sizeof(ent->d));
}

/** Helper: return true if a and b have the same
 * identity/identities. */
static unsigned
ddmap_entry_eq(const ddmap_entry_t *a, const ddmap_entry_t *b)
{
  return fast_memeq(a->d, b->d, sizeof(a->d));
}

/** Record the RSA identity of ent as rsa_sha1, and the
 * ed25519 identity as ed25519.  Both must be provided. */
static void
ddmap_entry_set_digests(ddmap_entry_t *ent,
                        const uint8_t *rsa_sha1,
                        const uint8_t *ed25519)
{
  memcpy(ent->d, rsa_sha1, DIGEST_LEN);
  memcpy(ent->d + DIGEST_LEN, ed25519, DIGEST256_LEN);
}

HT_PROTOTYPE(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash,
             ddmap_entry_eq)
HT_GENERATE2(double_digest_map, ddmap_entry_s, node, ddmap_entry_hash,
             ddmap_entry_eq, 0.6, tor_reallocarray, tor_free_)

/** Helper: add a single vote_routerstatus_t vrs to the collator
 * dc, indexing it by its RSA key digest, and by the 2-tuple of its RSA
 * key digest and Ed25519 key.   It must come from the vote_numth
 * vote.
 *
 * Requires that the vote is well-formed -- that is, that it has no duplicate
 * routerstatus entries.  We already checked for that when parsing the vote. */
static void
dircollator_add_routerstatus(dircollator_t *dc,
                             int vote_num,
                             networkstatus_t *vote,
                             vote_routerstatus_t *vrs)
{
  const char *id = vrs->status.identity_digest;

  /* Clear this flag; we might set it later during the voting process */
  vrs->ed25519_reflects_consensus = 0;

  (void) vote; // We don't currently need this.

  /* First, add this item to the appropriate RSA-SHA-Id array. */
  vote_routerstatus_t **vrs_lst = digestmap_get(dc->by_rsa_sha1, id);
  if (NULL == vrs_lst) {
    vrs_lst = tor_calloc(dc->n_votes, sizeof(vote_routerstatus_t *));
    digestmap_set(dc->by_rsa_sha1, id, vrs_lst);
  }
  tor_assert(vrs_lst[vote_num] == NULL);
  vrs_lst[vote_num] = vrs;

  const uint8_t *ed = vrs->ed25519_id;

  if (! vrs->has_ed25519_listing)
    return;

  /* Now add it to the appropriate <Ed,RSA-SHA-Id> array. */
  ddmap_entry_t search, *found;
  memset(&search, 0, sizeof(search));
  ddmap_entry_set_digests(&search, (const uint8_t *)id, ed);
  found = HT_FIND(double_digest_map, &dc->by_both_ids, &search);
  if (NULL == found) {
    found = ddmap_entry_new(dc->n_votes);
    ddmap_entry_set_digests(found, (const uint8_t *)id, ed);
    HT_INSERT(double_digest_map, &dc->by_both_ids, found);
  }
  vrs_lst = found->vrs_lst;
  tor_assert(vrs_lst[vote_num] == NULL);
  vrs_lst[vote_num] = vrs;
}

/** Create and return a new dircollator object to use when collating
 * n_votes out of a total of n_authorities. */
dircollator_t *
dircollator_new(int n_votes, int n_authorities)
{
  dircollator_t *dc = tor_malloc_zero(sizeof(dircollator_t));

  tor_assert(n_votes <= n_authorities);

  dc->n_votes = n_votes;
  dc->n_authorities = n_authorities;

  dc->by_rsa_sha1 = digestmap_new();
  HT_INIT(double_digest_map, &dc->by_both_ids);

  return dc;
}

/** Release all storage held by dc. */
void
dircollator_free(dircollator_t *dc)
{
  if (!dc)
    return;

  if (dc->by_collated_rsa_sha1 != dc->by_rsa_sha1)
    digestmap_free(dc->by_collated_rsa_sha1, NULL);

  digestmap_free(dc->by_rsa_sha1, tor_free_);
  smartlist_free(dc->all_rsa_sha1_lst);

  ddmap_entry_t **e, **next, *this;
  for (e = HT_START(double_digest_map, &dc->by_both_ids);
       e != NULL; e = next) {
    this = *e;
    next = HT_NEXT_RMV(double_digest_map, &dc->by_both_ids, e);
    ddmap_entry_free(this);
  }
  HT_CLEAR(double_digest_map, &dc->by_both_ids);

  tor_free(dc);
}

/** Add a single vote v to a dircollator dc.  This function must
 * be called exactly once for each vote to be used in the consensus. It may
 * only be called before dircollator_collate().
 */
void
dircollator_add_vote(dircollator_t *dc, networkstatus_t *v)
{
  tor_assert(v->type == NS_TYPE_VOTE);
  tor_assert(dc->next_vote_num < dc->n_votes);
  tor_assert(!dc->is_collated);

  const int votenum = dc->next_vote_num++;

  SMARTLIST_FOREACH_BEGIN(v->routerstatus_list, vote_routerstatus_t *, vrs) {
    dircollator_add_routerstatus(dc, votenum, v, vrs);
  } SMARTLIST_FOREACH_END(vrs);
}

/** Sort the entries in dc according to consensus_method, so
 * that the consensus process can iterate over them with
 * dircollator_n_routers() and dircollator_get_votes_for_router(). */
void
dircollator_collate(dircollator_t *dc, int consensus_method)
{
  tor_assert(!dc->is_collated);
  dc->all_rsa_sha1_lst = smartlist_new();

  if (consensus_method < MIN_METHOD_FOR_ED25519_ID_VOTING)
    dircollator_collate_by_rsa(dc);
  else
    dircollator_collate_by_ed25519(dc);

  smartlist_sort_digests(dc->all_rsa_sha1_lst);
  dc->is_collated = 1;
}

/**
 * Collation function for RSA-only consensuses: collate the votes for each
 * entry in dc by their RSA keys.
 *
 * The rule is:
 *    If an RSA identity key is listed by more than half of the authorities,
 *    include that identity, and treat all descriptors with that RSA identity
 *    as describing the same router.
 */
static void
dircollator_collate_by_rsa(dircollator_t *dc)
{
  const int total_authorities = dc->n_authorities;

  DIGESTMAP_FOREACH(dc->by_rsa_sha1, k, vote_routerstatus_t **, vrs_lst) {
    int n = 0, i;
    for (i = 0; i < dc->n_votes; ++i) {
      if (vrs_lst[i] != NULL)
        ++n;
    }

    if (n <= total_authorities / 2)
      continue;

    smartlist_add(dc->all_rsa_sha1_lst, (char *)k);
  } DIGESTMAP_FOREACH_END;

  dc->by_collated_rsa_sha1 = dc->by_rsa_sha1;
}

/**
 * Collation function for ed25519 consensuses: collate the votes for each
 * entry in dc by ed25519 key and by RSA key.
 *
 * The rule is, approximately:
 *    If a (ed,rsa) identity is listed by more than half of authorities,
 *    include it.  And include all (rsa)-only votes about that node as
 *    matching.
 *
 *    Otherwise, if an (*,rsa) or (rsa) identity is listed by more than
 *    half of the authorities, and no (ed,rsa) pair for the same RSA key
 *    has been already been included based on the rule above, include
 *    that RSA identity.
 */
static void
dircollator_collate_by_ed25519(dircollator_t *dc)
{
  const int total_authorities = dc->n_authorities;
  digestmap_t *rsa_digests = digestmap_new();

  ddmap_entry_t **iter;

  /* Go over all <ed,rsa> pairs */
  HT_FOREACH(iter, double_digest_map, &dc->by_both_ids) {
    ddmap_entry_t *ent = *iter;
    int n = 0, i;
    for (i = 0; i < dc->n_votes; ++i) {
      if (ent->vrs_lst[i] != NULL)
        ++n;
    }

    /* If not enough authorties listed this exact <ed,rsa> pair,
     * don't include it. */
    if (n <= total_authorities / 2)
      continue;

    /* Now consider whether there are any other entries with the same
     * RSA key (but with possibly different or missing ed value). */
    vote_routerstatus_t **vrs_lst2 = digestmap_get(dc->by_rsa_sha1,
                                                   (char*)ent->d);
    tor_assert(vrs_lst2);

    for (i = 0; i < dc->n_votes; ++i) {
      if (ent->vrs_lst[i] != NULL) {
        ent->vrs_lst[i]->ed25519_reflects_consensus = 1;
      } else if (vrs_lst2[i] && ! vrs_lst2[i]->has_ed25519_listing) {
        ent->vrs_lst[i] = vrs_lst2[i];
      }
    }

    /* Record that we have seen this RSA digest. */
    digestmap_set(rsa_digests, (char*)ent->d, ent->vrs_lst);
    smartlist_add(dc->all_rsa_sha1_lst, ent->d);
  }

  /* Now look over all entries with an RSA digest, looking for RSA digests
   * we didn't put in yet.
   */
  DIGESTMAP_FOREACH(dc->by_rsa_sha1, k, vote_routerstatus_t **, vrs_lst) {
    if (digestmap_get(rsa_digests, k) != NULL)
      continue; /* We already included this RSA digest */

    int n = 0, i;
    for (i = 0; i < dc->n_votes; ++i) {
      if (vrs_lst[i] != NULL)
        ++n;
    }

    if (n <= total_authorities / 2)
      continue; /* Not enough votes */

    digestmap_set(rsa_digests, k, vrs_lst);
    smartlist_add(dc->all_rsa_sha1_lst, (char *)k);
  } DIGESTMAP_FOREACH_END;

  dc->by_collated_rsa_sha1 = rsa_digests;
}

/** Return the total number of collated router entries.  This function may
 * only be called after dircollator_collate. */
int
dircollator_n_routers(dircollator_t *dc)
{
  tor_assert(dc->is_collated);
  return smartlist_len(dc->all_rsa_sha1_lst);
}

/** Return an array of vote_routerstatus_t entries for the idxth router
 * in the collation order.  Each array contains n_votes elements, where the
 * nth element of the array is the vote_routerstatus_t from the nth voter for
 * this identity (or NULL if there is no such entry).
 *
 * The maximum value for idx is dircollator_n_routers().
 *
 * This function may only be called after dircollator_collate. */
vote_routerstatus_t **
dircollator_get_votes_for_router(dircollator_t *dc, int idx)
{
  tor_assert(dc->is_collated);
  tor_assert(idx < smartlist_len(dc->all_rsa_sha1_lst));
  return digestmap_get(dc->by_collated_rsa_sha1,
                       smartlist_get(dc->all_rsa_sha1_lst, idx));
}


text:
module DisposableMail
  class Railtie < ::Rails::Railtie
    initializer 'disposable_mail-i18n' do |app|
      locales = app.config.i18n.available_locales || []
      yml_pattern = locales.blank? ? '*' : "{#{locales.join(',')}}"
      I18n.load_path.concat(Dir[File.join(File.dirname(__FILE__), 'locales', "#{yml_pattern}.yml")])
    end
  end
end


text:
"""Test simple stdout (and stderr) hookup in spawning a child process."""

import os
import sys
import time
import pprint
import unittest

import process

class RetvalTestCase(unittest.TestCase):
    def _assertRetvalIs(self, expected, actual):
        if sys.platform.startswith("win"):
            self.failUnless(actual == expected)
        else:
            self.failUnless(os.WIFEXITED(actual))
            exitStatus = os.WEXITSTATUS(actual)
            # convert from 8-bit unsigned to signed
            if exitStatus >= 2**7: exitStatus -= 2**8
            self.failUnless(exitStatus == expected)

    def test_ProcessProxy_0(self):
        p = process.ProcessProxy(['quiet'])
        retval = p.wait()
        self._assertRetvalIs(0, retval)

    def test_ProcessProxy_42(self):
        p = process.ProcessProxy(['quiet', '42'])
        retval = p.wait()
        self._assertRetvalIs(42, retval)

    def test_ProcessProxy_minus_42(self):
        p = process.ProcessProxy(['quiet', '-42'])
        retval = p.wait()
        self._assertRetvalIs(-42, retval)

    def test_ProcessOpen_0(self):
        p = process.ProcessOpen(['quiet'])
        retval = p.wait()
        self._assertRetvalIs(0, retval)

    def test_ProcessOpen_42(self):
        p = process.ProcessOpen(['quiet', '42'])
        retval = p.wait()
        self._assertRetvalIs(42, retval)

    def test_ProcessOpen_minus_42(self):
        p = process.ProcessOpen(['quiet', '-42'])
        retval = p.wait()
        self._assertRetvalIs(-42, retval)

def suite():
    """Return a unittest.TestSuite to be used by test.py."""
    return unittest.makeSuite(RetvalTestCase)

if __name__ == "__main__":
    import logging
    logging.basicConfig()
    testsupport.setup()
    sys.argv.insert(1, "-v") # always want verbose output
    unittest.main()


text:
#ifndef DRAGMOVECHARM_H
#define DRAGMOVECHARM_H

#include <QObject>
#include <QtWidgets/QLabel>
#include <QtWidgets/QDialog>
#include <QtWidgets/QtWidgets>
#include <QtWidgets/QTableWidget>
#include <QtWebKitWidgets/QtWebKitWidgets>

class DragMoveCharmPrivate;
class QWidget;

class DragMoveCharm: public QObject
{
    Q_OBJECT
public:
    DragMoveCharm(QObject *parent = 0);
    ~DragMoveCharm();
    void activateOn(QWidget *widget);
    void deactivateFrom(QWidget *widget);
    bool eventFilter(QObject *object, QEvent *event);

private:
    DragMoveCharmPrivate *d;
};

#endif // DRAGMOVECHARM_H


text:
CREATE VIEW [dbo].[vSensorThingsAPIHistoricalLocations]
AS
Select
  *
from
  vSensorThingsAPILocations


text:
using System;
using System.Collections.Generic;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;

namespace Mono.Debugging.Evaluation
{
	public static class NRefactoryExtensions
	{
		#region AstType

		public static object Resolve (this TypeSyntax type, EvaluationContext ctx)
		{
			var args = new List<object> ();
			var name = type.Resolve (ctx, args);

			//if (name.StartsWith ("global::", StringComparison.Ordinal))
			//	name = name.Substring ("global::".Length);

			if (string.IsNullOrEmpty (name))
				return null;

			if (args.Count > 0)
				return ctx.Adapter.GetType (ctx, name, args.ToArray ());

			return ctx.Adapter.GetType (ctx, name);
		}

		static string Resolve (this ExpressionSyntax type, EvaluationContext ctx, List<object> args)
		{
			if (type is PredefinedTypeSyntax)
				return Resolve ((PredefinedTypeSyntax) type, ctx, args);
			else if (type is PointerTypeSyntax)
				return Resolve ((PointerTypeSyntax)type, ctx, args);
			else if (type is NullableTypeSyntax)
				return Resolve ((NullableTypeSyntax)type, ctx, args);
			else if (type is RefTypeSyntax)
				return Resolve ((RefTypeSyntax)type, ctx, args);
			else if (type is QualifiedNameSyntax)
				return Resolve ((QualifiedNameSyntax) type, ctx, args);
			else if (type is IdentifierNameSyntax)
				return Resolve ((IdentifierNameSyntax)type, ctx, args);
			else if (type is GenericNameSyntax)
				return Resolve ((GenericNameSyntax)type, ctx, args);

			return null;
		}

		#endregion AstType

		#region ComposedType

		static string Resolve (this PointerTypeSyntax type, EvaluationContext ctx, List<object> args)
		{
			return type.ElementType.Resolve (ctx, args) + "*";
		}

		static string Resolve (this RefTypeSyntax type, EvaluationContext ctx, List<object> args)
		{
			return type.Type.Resolve (ctx, args);
		}

		static string Resolve (this NullableTypeSyntax type, EvaluationContext ctx, List<object> args)
		{
			args.Insert (0, type.ElementType.Resolve (ctx));
			return "System.Nullable`1";
		}

		#endregion ComposedType

		#region MemberType

		static string Resolve (this QualifiedNameSyntax type, EvaluationContext ctx, List<object> args)
		{
			string name;

			if (!(type.Left is AliasQualifiedNameSyntax)) {
				var parent = type.Left.Resolve (ctx, args);
				name = parent + "." + type.Right.Identifier.ValueText;
			} else {
				name = type.Right.Identifier.ValueText;
			}

			if (type.Right is GenericNameSyntax genericName) {
				name += "`" + genericName.TypeArgumentList.Arguments.Count;
				foreach (var arg in genericName.TypeArgumentList.Arguments) {
					object resolved;

					if ((resolved = arg.Resolve (ctx)) == null)
						return null;

					args.Add (resolved);
				}
			}

			return name;
		}

		#endregion MemberType

		#region PrimitiveType

		public static string Resolve (this PredefinedTypeSyntax type)
		{
			switch (type.Keyword.Kind()) {
			case SyntaxKind.BoolKeyword:    return "System.Boolean";
			case SyntaxKind.SByteKeyword:   return "System.SByte";
			case SyntaxKind.ByteKeyword:    return "System.Byte";
			case SyntaxKind.CharKeyword:    return "System.Char";
			case SyntaxKind.ShortKeyword:   return "System.Int16";
			case SyntaxKind.UShortKeyword:  return "System.UInt16";
			case SyntaxKind.IntKeyword:     return "System.Int32";
			case SyntaxKind.UIntKeyword:    return "System.UInt32";
			case SyntaxKind.LongKeyword:    return "System.Int64";
			case SyntaxKind.ULongKeyword:   return "System.UInt64";
			case SyntaxKind.FloatKeyword:   return "System.Single";
			case SyntaxKind.DoubleKeyword:  return "System.Double";
			case SyntaxKind.DecimalKeyword: return "System.Decimal";
			case SyntaxKind.StringKeyword:  return "System.String";
			case SyntaxKind.ObjectKeyword:  return "System.Object";
			case SyntaxKind.VoidKeyword:    return "System.Void";
			default: return null;
			}
		}

		public static string Resolve(string shortTypeName)
		{
			string longName;
			switch (shortTypeName) {
			case "bool": longName = "System.Boolean"; break;
			case "byte": longName = "System.Byte"; break;
			case "sbyte": longName = "System.SByte"; break;
			case "char": longName = "System.Char"; break;
			case "decimal": longName = "System.Decimal"; break;
			case "double": longName = "System.Double"; break;
			case "float": longName = "System.Single"; break;
			case "int": longName = "System.Int32"; break;
			case "uint": longName = "System.UInt32"; break;
			case "nint": longName = "System.IntPtr"; break;
			case "nuint": longName = "System.UIntPtr"; break;
			case "long": longName = "System.Int64"; break;
			case "ulong": longName = "System.UInt64"; break;
			case "short": longName = "System.Int16"; break;
			case "ushort": longName = "System.UInt16"; break;
			case "object": longName = "System.Object"; break;
			case "string": longName = "System.String"; break;
			case "dynamic": longName = "System.Object"; break;
			default: throw new ArgumentException($"Unknown type {shortTypeName}");
			}
			return longName;
 		}

		static string Resolve (this PredefinedTypeSyntax type, EvaluationContext ctx, List<object> args)
		{
			return Resolve (type);
		}

		#endregion PrimitiveType

		#region SimpleType

		static string Resolve (this GenericNameSyntax type, EvaluationContext ctx, List<object> args)
		{
			string name = type.Identifier.ValueText;

			if (type.TypeArgumentList.Arguments.Count > 0) {
				name += "`" + type.TypeArgumentList.Arguments.Count;
				foreach (var arg in type.TypeArgumentList.Arguments) {
					object resolved;

					if ((resolved = arg.Resolve (ctx)) == null)
						return null;

					args.Add (resolved);
				}
			}

			return type.Identifier.ValueText;
		}

		static string Resolve (this IdentifierNameSyntax type, EvaluationContext ctx, List<object> args)
		{
			return type.Identifier.ValueText;
		}

		#endregion SimpleType
	}
}


text:
<!DOCTYPE html>

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


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
	<title>Hello Angular TypeScript!</title>

	<link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css" />
	<link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.css" />

	<link rel="stylesheet" href="/dist/app.css">

app has been scaffolded, yo!

With layouts and styling by bootstrap

					Plus sweet font-awesome icons

			<demo></demo>


text:
#! /bin/sh -f
#

#     -Xbootclasspath/p:/net/jini/files6/xjiang/ws/davis/build/lib \

set -ex

if [ "$1" = -c ]
then
javac -classpath .:../../../../../unittestlib -d classes TestPerformance.java
fi

java -Djava.security.manager= \
     -Djava.security.policy=config/policy.all \
     -Djava.security.auth.login.config=config/testEndpoints.login \
     -Djava.security.krb5.realm=DAVIS.JINI.SUN.COM \
     -Djava.security.krb5.kdc=jiniautot.east.sun.com \
     -classpath classes TestPerformance 10 20


text:
/*
 * File: rt_nonfinite.h
 *
 * MATLAB Coder version            : 2.6
 * C/C++ source code generated on  : 28-Aug-2015 10:33:25
 */

#ifndef __RT_NONFINITE_H__
#define __RT_NONFINITE_H__

#if defined(_MSC_VER) && (_MSC_VER <= 1200)
#include <float.h>
#endif
#include <stddef.h>
#include "rtwtypes.h"

extern real_T rtInf;
extern real_T rtMinusInf;
extern real_T rtNaN;
extern real32_T rtInfF;
extern real32_T rtMinusInfF;
extern real32_T rtNaNF;
extern void rt_InitInfAndNaN(size_t realSize);
extern boolean_T rtIsInf(real_T value);
extern boolean_T rtIsInfF(real32_T value);
extern boolean_T rtIsNaN(real_T value);
extern boolean_T rtIsNaNF(real32_T value);

typedef struct {
  struct {
    uint32_T wordH;
    uint32_T wordL;
  } words;
} BigEndianIEEEDouble;

typedef struct {
  struct {
    uint32_T wordL;
    uint32_T wordH;
  } words;
} LittleEndianIEEEDouble;

typedef struct {
  union {
    real32_T wordLreal;
    uint32_T wordLuint;
  } wordL;
} IEEESingle;

#endif
/*
 * File trailer for rt_nonfinite.h
 *
 * [EOF]
 */


text:
package str

type Type int

const (
	TypeMatch = iota
	TypeReplace
)

// DiffSection represents a single chunk of a diff.
type DiffSection struct {
	Type             Type
	Actual, Expected []rune
}

// Diff represents a full diff of two values.
type Diff interface {
	// Cost is the calculated cost of changing from one value to another.
	// Basically, if provided with multiple diffs, the Differ will always prefer
	// the lowest cost.
	//
	// Generally, a cost of 0 should represent exactly equal values, so negative
	// numbers shouldn't usually be used. However, if they are used, they will
	// work the same as positive values, being preferred over any value higher
	// than them.
	Cost() float64

	// Sections returns all of the sections of the diff. This will be used to
	// generate output, depending on the diff formats being used.
	Sections() []DiffSection
}


text:
/**
* Day of Week Count Constraint (dc)
* (c) 2013 Bill, BunKat LLC.
*
* Definition for a day of week count constraint type. This constraint is used
* to specify schedules like '2nd Tuesday of every month'.
*
* Later is freely distributable under the MIT license.
* For all details and documentation:
*     http://github.com/bunkat/later
*/
later.dayOfWeekCount = later.dc = {

  /**
  * The name of this constraint.
  */
  name: 'day of week count',

  /**
  * The rough amount of seconds between start and end for this constraint.
  * (doesn't need to be exact)
  */
  range: 604800,

  /**
  * The day of week count value of the specified date.
  *
  * @param {Date} d: The date to calculate the value of
  */
  val: function(d) {
    return d.dc || (d.dc = Math.floor((later.D.val(d)-1)/7)+1);
  },

  /**
  * Returns true if the val is valid for the date specified.
  *
  * @param {Date} d: The date to check the value on
  * @param {Integer} val: The value to validate
  */
  isValid: function(d, val) {
    return (later.dc.val(d) === val) ||
           (val === 0 && later.D.val(d) > later.D.extent(d)[1] - 7);
  },

  /**
  * The minimum and maximum valid day values of the month specified.
  * Zero to specify the last day of week count of the month.
  *
  * @param {Date} d: The date indicating the month to find the extent of
  */
  extent: function(d) {
    return d.dcExtent || (d.dcExtent = [1, Math.ceil(later.D.extent(d)[1] /7)]);
  },

  /**
  * The first day of the month with the same day of week count as the date
  * specified.
  *
  * @param {Date} d: The specified date
  */
  start: function(d) {
    return d.dcStart || (d.dcStart =
      later.date.next(
        later.Y.val(d),
        later.M.val(d),
        Math.max(1, ((later.dc.val(d) - 1) * 7) + 1 || 1)));
  },

  /**
  * The last day of the month with the same day of week count as the date
  * specified.
  *
  * @param {Date} d: The specified date
  */
  end: function(d) {
    return d.dcEnd || (d.dcEnd =
      later.date.prev(
        later.Y.val(d),
        later.M.val(d),
        Math.min(later.dc.val(d) * 7, later.D.extent(d)[1])));
  },

  /**
  * Returns the next earliest date with the day of week count specified.
  *
  * @param {Date} d: The starting date
  * @param {int} val: The desired value, must be within extent
  */
  next: function(d, val) {
    val = val > later.dc.extent(d)[1] ? 1 : val;
    var month = later.date.nextRollover(d, val, later.dc, later.M),
        dcMax = later.dc.extent(month)[1];

    val = val > dcMax ? 1 : val;

    var next = later.date.next(
      later.Y.val(month),
      later.M.val(month),
      val === 0 ? later.D.extent(month)[1] - 6 : 1 + (7 * (val - 1))
    );

    if(next.getTime() <= d.getTime()) {
      month = later.M.next(d, later.M.val(d)+1);

      return later.date.next(
        later.Y.val(month),
        later.M.val(month),
        val === 0 ? later.D.extent(month)[1] - 6 : 1 + (7 * (val - 1))
      );
    }

    return next;
  },

  /**
  * Returns the closest previous date with the day of week count specified.
  *
  * @param {Date} d: The starting date
  * @param {int} val: The desired value, must be within extent
  */
  prev: function(d, val) {
    var month = later.date.prevRollover(d, val, later.dc, later.M),
        dcMax = later.dc.extent(month)[1];

    val = val > dcMax ? dcMax : val || dcMax;

    return later.dc.end(later.date.prev(
      later.Y.val(month),
      later.M.val(month),
      1 + (7 * (val - 1))
    ));
  }

};


text:
namespace System.Dynamic.Utils
{
    /// <summary>
    ///    Strongly-typed and parameterized exception factory.
    /// </summary>
    internal static partial class Error
    {
        /// <summary>
        /// InvalidOperationException with message like "Enumeration has either not started or has already finished."
        /// </summary>
        internal static Exception EnumerationIsDone()
        {
            return new InvalidOperationException(Strings.EnumerationIsDone);
        }

        /// <summary>
        /// InvalidOperationException with message like "Collection was modified; enumeration operation may not execute."
        /// </summary>
        internal static Exception CollectionModifiedWhileEnumerating()
        {
            return new InvalidOperationException(Strings.CollectionModifiedWhileEnumerating);
        }

        /// <summary>
        /// ArgumentException with message like "Type {0} contains generic parameters"
        /// </summary>
        internal static Exception TypeContainsGenericParameters(object p0, string paramName)
        {
            return new ArgumentException(Strings.TypeContainsGenericParameters(p0), paramName);
        }

        /// <summary>
        /// ArgumentException with message like "Type {0} contains generic parameters"
        /// </summary>
        internal static Exception TypeContainsGenericParameters(object p0, string paramName, int index)
        {
            return TypeContainsGenericParameters(p0, GetParamName(paramName, index));
        }

        /// <summary>
        /// ArgumentException with message like "Type {0} is a generic type definition"
        /// </summary>
        internal static Exception TypeIsGeneric(object p0, string paramName)
        {
            return new ArgumentException(Strings.TypeIsGeneric(p0), paramName);
        }

        /// <summary>
        /// ArgumentException with message like "Type {0} is a generic type definition"
        /// </summary>
        internal static Exception TypeIsGeneric(object p0, string paramName, int index)
        {
            return TypeIsGeneric(p0, GetParamName(paramName, index));
        }

        /// <summary>
        /// ArgumentException with message like "Incorrect number of arguments for constructor"
        /// </summary>
        internal static Exception IncorrectNumberOfConstructorArguments()
        {
            return new ArgumentException(Strings.IncorrectNumberOfConstructorArguments);
        }

        /// <summary>
        /// ArgumentException with message like "Expression of type '{0}' cannot be used for parameter of type '{1}' of method '{2}'"
        /// </summary>
        internal static Exception ExpressionTypeDoesNotMatchMethodParameter(object p0, object p1, object p2, string paramName)
        {
            return new ArgumentException(Strings.ExpressionTypeDoesNotMatchMethodParameter(p0, p1, p2), paramName);
        }

        /// <summary>
        /// ArgumentException with message like "Expression of type '{0}' cannot be used for parameter of type '{1}' of method '{2}'"
        /// </summary>
        internal static Exception ExpressionTypeDoesNotMatchMethodParameter(object p0, object p1, object p2, string paramName, int index)
        {
            return ExpressionTypeDoesNotMatchMethodParameter(p0, p1, p2, GetParamName(paramName, index));
        }

        /// <summary>
        /// ArgumentException with message like "Expression of type '{0}' cannot be used for parameter of type '{1}'"
        /// </summary>
        internal static Exception ExpressionTypeDoesNotMatchParameter(object p0, object p1, string paramName)
        {
            return new ArgumentException(Strings.ExpressionTypeDoesNotMatchParameter(p0, p1), paramName);
        }

        /// <summary>
        /// ArgumentException with message like "Expression of type '{0}' cannot be used for parameter of type '{1}'"
        /// </summary>
        internal static Exception ExpressionTypeDoesNotMatchParameter(object p0, object p1, string paramName, int index)
        {
            return ExpressionTypeDoesNotMatchParameter(p0, p1, GetParamName(paramName, index));
        }

        /// <summary>
        /// InvalidOperationException with message like "Incorrect number of arguments supplied for lambda invocation"
        /// </summary>
        internal static Exception IncorrectNumberOfLambdaArguments()
        {
            return new InvalidOperationException(Strings.IncorrectNumberOfLambdaArguments);
        }

        /// <summary>
        /// ArgumentException with message like "Incorrect number of arguments supplied for call to method '{0}'"
        /// </summary>
        internal static Exception IncorrectNumberOfMethodCallArguments(object p0, string paramName)
        {
            return new ArgumentException(Strings.IncorrectNumberOfMethodCallArguments(p0), paramName);
        }

        /// <summary>
        /// ArgumentException with message like "Expression of type '{0}' cannot be used for constructor parameter of type '{1}'"
        /// </summary>
        internal static Exception ExpressionTypeDoesNotMatchConstructorParameter(object p0, object p1, string paramName)
        {
            return new ArgumentException(Strings.ExpressionTypeDoesNotMatchConstructorParameter(p0, p1), paramName);
        }

        /// <summary>
        /// ArgumentException with message like "Expression of type '{0}' cannot be used for constructor parameter of type '{1}'"
        /// </summary>
        internal static Exception ExpressionTypeDoesNotMatchConstructorParameter(object p0, object p1, string paramName, int index)
        {
            return ExpressionTypeDoesNotMatchConstructorParameter(p0, p1, GetParamName(paramName, index));
        }

        /// <summary>
        /// ArgumentException with message like "Expression must be readable"
        /// </summary>
        internal static Exception ExpressionMustBeReadable(string paramName)
        {
            return new ArgumentException(Strings.ExpressionMustBeReadable, paramName);
        }

        /// <summary>
        /// ArgumentException with message like "Expression must be readable"
        /// </summary>
        internal static Exception ExpressionMustBeReadable(string paramName, int index)
        {
            return ExpressionMustBeReadable(GetParamName(paramName, index));
        }

        private static string GetParamName(string paramName, int index)
        {
            if (index >= 0)
            {
                return $"{paramName}[{index}]";
            }

            return paramName;
        }
    }
}


text:
const float GRENADE_COEFFICIENT_OF_RESTITUTION = 0.2f;

ConVar asw_shotgun_pellet_fade_length("asw_shotgun_pellet_fade_length", "100.0f", 0, "Length of the trail on the shotgun pellets");
ConVar asw_shotgun_pellets_pass("asw_shotgun_pellets_pass", "0", FCVAR_CHEAT, "Set to make shotgun pellets pass through aliens (as opposed to stopping on contact)");

#define PELLET_MODEL "models/swarm/Shotgun/ShotgunPellet.mdl"

LINK_ENTITY_TO_CLASS( asw_shotgun_pellet, CASW_Shotgun_Pellet );

BEGIN_DATADESC( CASW_Shotgun_Pellet )
	DEFINE_FUNCTION( PelletTouch ),

	// Fields
	DEFINE_FIELD( m_pMainGlow, FIELD_EHANDLE ),
	DEFINE_FIELD( m_pGlowTrail, FIELD_EHANDLE ),
	DEFINE_FIELD( m_inSolid, FIELD_BOOLEAN ),
	DEFINE_FIELD( m_hLastHit, FIELD_EHANDLE ),
	DEFINE_FIELD( m_flDamage, FIELD_FLOAT ),
END_DATADESC()

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CASW_Shotgun_Pellet::~CASW_Shotgun_Pellet( void )
{
	KillEffects();
}

void CASW_Shotgun_Pellet::Spawn( void )
{
	Precache( );

	SetModel( PELLET_MODEL );
	SetMoveType( MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_CUSTOM );

	m_flDamage		= 7;	// just a default, would get overriden by the skill base damage passed in in the create function
	m_takedamage	= DAMAGE_NO;

	SetSize( -Vector(1,1,1), Vector(1,1,1) );
	SetSolid( SOLID_BBOX );
	SetGravity( 0.05f );
	//SetCollisionGroup( ASW_COLLISION_GROUP_SHOTGUN_PELLET );
	SetCollisionGroup( ASW_COLLISION_GROUP_IGNORE_NPCS );
	//CreateVPhysics();

	SetTouch( &CASW_Shotgun_Pellet::PelletTouch );

	CreateEffects();

	Msg("Created sg pellet\n");

	//AddSolidFlags( FSOLID_NOT_STANDABLE );

	//BaseClass::Spawn();
	// projectile only lasts 1 second
	SetThink( &CASW_Shotgun_Pellet::SUB_Remove );
	SetNextThink( gpGlobals->curtime + 1.0f );

	//AddSolidFlags(FSOLID_TRIGGER);
	m_hLastHit = NULL;
}

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CASW_Shotgun_Pellet::OnRestore( void )
{
	CreateEffects();

	BaseClass::OnRestore();
}

void CASW_Shotgun_Pellet::KillEffects()
{
	if (m_pMainGlow)
		m_pMainGlow->FadeAndDie(0.05f);
	if (m_pGlowTrail)
		m_pGlowTrail->FadeAndDie(0.05f);
}

void CASW_Shotgun_Pellet::CreateEffects( void )
{
	// Start up the eye glow
	m_pMainGlow = CSprite::SpriteCreate( "swarm/sprites/whiteglow1.vmt", GetLocalOrigin(), false );

	//int	nAttachment = LookupAttachment( "fuse" );		// todo: make an attachment on the new model? is that even needed?

	if ( m_pMainGlow != NULL )
	{
		m_pMainGlow->FollowEntity( this );
		//m_pMainGlow->SetAttachment( this, nAttachment );
		m_pMainGlow->SetTransparency( kRenderGlow, 255, 255, 255, 200, kRenderFxNoDissipation );
		m_pMainGlow->SetScale( 0.2f );
		m_pMainGlow->SetGlowProxySize( 4.0f );
	}

	// Start up the eye trail
	m_pGlowTrail	= CSpriteTrail::SpriteTrailCreate( "swarm/sprites/greylaser1.vmt", GetLocalOrigin(), false );

	if ( m_pGlowTrail != NULL )
	{
		m_pGlowTrail->FollowEntity( this );
		//m_pGlowTrail->SetAttachment( this, nAttachment );
		m_pGlowTrail->SetTransparency( kRenderTransAdd, 128, 128, 128, 255, kRenderFxNone );
		m_pGlowTrail->SetStartWidth( 8.0f );
		m_pGlowTrail->SetEndWidth( 1.0f );
		m_pGlowTrail->SetLifeTime( 0.5f );
		m_pGlowTrail->SetMinFadeLength( asw_shotgun_pellet_fade_length.GetFloat() );
	}
}

bool CASW_Shotgun_Pellet::CreateVPhysics()
{
	// Create the object in the physics system
	VPhysicsInitNormal( SOLID_BBOX, FSOLID_NOT_STANDABLE, false );
	return true;
}

unsigned int CASW_Shotgun_Pellet::PhysicsSolidMaskForEntity() const
{
	return ( BaseClass::PhysicsSolidMaskForEntity() | CONTENTS_HITBOX ) & ~CONTENTS_GRATE;
}

void CASW_Shotgun_Pellet::Precache( void )
{
	PrecacheModel( PELLET_MODEL );

	PrecacheModel( "swarm/sprites/whiteglow1.vmt" );
	PrecacheModel( "swarm/sprites/greylaser1.vmt" );
	PrecacheScriptSound("Weapon_Crossbow.BoltHitBody");

	BaseClass::Precache();
}

void CASW_Shotgun_Pellet::PelletHit( CBaseEntity *pOther)
{
	if (!pOther)
		return;

	if (pOther == GetLastHit())		// don't damage the same alien twice
		return;

	if ( !pOther->IsSolid() || pOther->IsSolidFlagSet(FSOLID_VOLUME_CONTENTS) )
		return;

	if ( pOther->m_takedamage != DAMAGE_NO )
	{
		trace_t	tr, tr2;
		tr = BaseClass::GetTouchTrace();
		Vector	vecNormalizedVel = GetAbsVelocity();

		ClearMultiDamage();
		VectorNormalize( vecNormalizedVel );

		if( GetOwnerEntity() && GetOwnerEntity()->IsPlayer() && pOther->IsNPC() )
		{
			CTakeDamageInfo	dmgInfo( this, GetOwnerEntity(), m_flDamage, DMG_NEVERGIB );
			dmgInfo.AdjustPlayerDamageInflictedForSkillLevel();
			CalculateMeleeDamageForce( &dmgInfo, vecNormalizedVel, tr.endpos, 0.7f );
			dmgInfo.SetDamagePosition( tr.endpos );
			pOther->DispatchTraceAttack( dmgInfo, vecNormalizedVel, &tr );
		}
		else
		{
			CTakeDamageInfo	dmgInfo( this, GetOwnerEntity(), m_flDamage, DMG_BULLET | DMG_NEVERGIB );
			CalculateMeleeDamageForce( &dmgInfo, vecNormalizedVel, tr.endpos, 0.7f );
			dmgInfo.SetDamagePosition( tr.endpos );
			pOther->DispatchTraceAttack( dmgInfo, vecNormalizedVel, &tr );
		}

		ApplyMultiDamage();

		//Adrian: keep going through the glass.
		if ( pOther->GetCollisionGroup() == COLLISION_GROUP_BREAKABLE_GLASS )
			 return;

		// pellets should carry on through spawnable enemies?
		IASW_Spawnable_NPC* pSpawnable = dynamic_cast<IASW_Spawnable_NPC*>(pOther);
		if (pSpawnable && asw_shotgun_pellets_pass.GetBool())
		{
			m_hLastHit = pOther;
			return;
		}

		SetAbsVelocity( Vector( 0, 0, 0 ) );

		// play body "thwack" sound
		EmitSound( "Weapon_Crossbow.BoltHitBody" );

		Vector vForward;

		AngleVectors( GetAbsAngles(), &vForward );
		VectorNormalize ( vForward );

		UTIL_TraceLine( GetAbsOrigin(),	GetAbsOrigin() + vForward * 128, MASK_OPAQUE, pOther, COLLISION_GROUP_NONE, &tr2 );

		if ( tr2.fraction != 1.0f )
		{
//			NDebugOverlay::Box( tr2.endpos, Vector( -16, -16, -16 ), Vector( 16, 16, 16 ), 0, 255, 0, 0, 10 );
//			NDebugOverlay::Box( GetAbsOrigin(), Vector( -16, -16, -16 ), Vector( 16, 16, 16 ), 0, 0, 255, 0, 10 );

			if ( tr2.m_pEnt == NULL || ( tr2.m_pEnt && tr2.m_pEnt->GetMoveType() == MOVETYPE_NONE ) )
			{
				CEffectData	data;

				data.m_vOrigin = tr2.endpos;
				data.m_vNormal = vForward;
				data.m_nEntIndex = tr2.fraction != 1.0f;

				//DispatchEffect( "BoltImpact", data );
			}
		}

		SetTouch( NULL );
		SetThink( NULL );

		KillEffects();
		UTIL_Remove( this );
	}
	else
	{
		trace_t	tr;
		tr = BaseClass::GetTouchTrace();

		// See if we struck the world
		if ( pOther->GetMoveType() == MOVETYPE_NONE && !( tr.surface.flags & SURF_SKY ) )
		{
			//EmitSound( "Weapon_Crossbow.BoltHitWorld" );

			// if what we hit is static architecture, can stay around for a while.
			Vector vecDir = GetAbsVelocity();
			VectorNormalize( vecDir );

			SetMoveType( MOVETYPE_NONE );

			Vector vForward;

			AngleVectors( GetAbsAngles(), &vForward );
			VectorNormalize ( vForward );

			CEffectData	data;

			data.m_vOrigin = tr.endpos;
			data.m_vNormal = vForward;
			data.m_nEntIndex = 0;

			//DispatchEffect( "BoltImpact", data );

			UTIL_ImpactTrace( &tr, DMG_BULLET );

			AddEffects( EF_NODRAW );
			SetTouch( NULL );
			KillEffects();
			SetThink( &CASW_Shotgun_Pellet::SUB_Remove );
			SetNextThink( gpGlobals->curtime + 2.0f );

			// Shoot some sparks
			if ( UTIL_PointContents( GetAbsOrigin(), CONTENTS_WATER ) != CONTENTS_WATER )
			{
				g_pEffects->Sparks( GetAbsOrigin() );
			}
		}
		else
		{
			// Put a mark unless we've hit the sky
			if ( ( tr.surface.flags & SURF_SKY ) == false )
			{
				UTIL_ImpactTrace( &tr, DMG_BULLET );
			}
			KillEffects();
			UTIL_Remove( this );
		}
	}
}

void CASW_Shotgun_Pellet::PelletTouch( CBaseEntity *pOther )
{
	if (!pOther)
		return;

	Msg("sg pellet testing colgroup %d vs %d\n", GetCollisionGroup(), pOther->GetCollisionGroup());
	// make sure we don't die on things we shouldn't
	if (!ASWGameRules() || !ASWGameRules()->ShouldCollide(GetCollisionGroup(), pOther->GetCollisionGroup()))
		return;
	Msg(" sg pellet allowed to hit %s\n", pOther->GetClassname());
	PelletHit(pOther);
}

CASW_Shotgun_Pellet* CASW_Shotgun_Pellet::Shotgun_Pellet_Create( const Vector &position, const QAngle &angles, const Vector &velocity, const AngularImpulse &angVelocity, CBaseEntity *pOwner, float damage )
{
	Msg("CASW_Shotgun_Pellet::Shotgun_Pellet_Create\n");
	CASW_Shotgun_Pellet *pPellet = (CASW_Shotgun_Pellet *)CreateEntityByName( "asw_shotgun_pellet" );
	pPellet->SetAbsAngles( angles );
	pPellet->Spawn();
	pPellet->SetPelletDamage( damage );
	pPellet->SetOwnerEntity( pOwner );
	//Msg("making pellet with velocity %f,%f,%f\n", velocity.x, velocity.y, velocity.z);
	UTIL_SetOrigin( pPellet, position );
	pPellet->SetAbsVelocity( velocity );

	return pPellet;
}

CBaseEntity* CASW_Shotgun_Pellet::GetLastHit()
{
	return m_hLastHit.Get();
}


text:
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef CRC32_H
#define CRC32_H

/* Includes ------------------------------------------------------------------*/
#include <stdint.h>

/* Exported types ------------------------------------------------------------*/
typedef uint32_t crc32_t;

/* Exported functions --------------------------------------------------------*/
crc32_t GetCRC32(const crc32_t initial_crc32,
                 const unsigned char *const data,
                 const unsigned int len);

#endif /* CRC32_H */


text:
<?php

include_once APPLICATION_LIBS.'/Controller.php';
/**
 * Description of ErrorController
 *
 * @author Nisho
 */
class ErrorController extends Controller{

    public function E404Action(){
        if(Controller::isAjaxRequest()){
            return $this->template->dispatchPartial('errors/404');
        }
        return $this->template->dispatch('errors/404');
    }

}


text:
'''
Created on Apr 27, 2016

@author: Aaron Ponti
'''

from ch.systemsx.cisd.openbis.dss.etl.dto.api.impl import MaximumIntensityProjectionGenerationAlgorithm

class YouScopeExperimentMaximumIntensityProjectionGenerationAlgorithm(MaximumIntensityProjectionGenerationAlgorithm):
    '''
    Custom MaximumIntensityProjectionGenerationAlgorithm for YouScope Experiment Series
    that makes sure that the first timepoint in a series is registered for
    creation of the representative thumbnail.
    '''

    def __init__(self, datasetTypeCode, width, height, filename):
        """
        Constructor
        """

        # Call the parent base constructor
        MaximumIntensityProjectionGenerationAlgorithm.__init__(self,
            datasetTypeCode, width, height, filename)

    def imageToBeIgnored(self, image):
        """
        Overrides the parent imageToBeIgnored method. The selection of which
        series should be used to create the representative thumbnail is done
        in YouScopeExperimentCompositeDatasetConfig. Here we prevent the base
        MaximumIntensityProjectionGenerationAlgorithm.imageToBeIgnored() method
        to make a decision based on the timepoint (== 0).
        """

        return False


text:
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Text;

namespace SharedFunctionalities.drawing.layers {
    public class TextBaseLayer : BaseDraw {

        #region property displayBrush
        private Brush _displayBrush;

        public Brush DisplayBrush {
            get { return _displayBrush; }
            set {
                if (_displayBrush != null) {
                    _displayBrush.Dispose();
                }
                _displayBrush = value;
                Invalidate();
            }
        }
        #endregion

        #region property stringFormat
        private StringFormat _stringFormat;

        public StringFormat StringFormat {
            get { return _stringFormat; }
            set { _stringFormat = value; }
        }
        #endregion

        #region property Text
        private string _text;

        public string Text {
            get { return _text; }
            set {
                _text = value;
                Invalidate();
            }
        }
        #endregion

        #region property Font
        private Font _font;

        public Font Font {
            get { return _font; }
            set {
                _font = value;
                Invalidate();
            }
        }
        #endregion

        public TextBaseLayer() {
            StringFormat = StringFormat.GenericDefault;
            DisplayBrush = new SolidBrush(Color.Black);
        }

        public override void DoDraw(Graphics g, ref Rectangle wholeComponent, ref Rectangle clippingRect) {
            //the following is NESSARY for transperant backgrounds, which we always want..
            //TextRender is slower (on my machine), this seems odd, but then again, windows 10 <3
            g.SmoothingMode = SmoothingMode.AntiAlias;
            g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;
            g.DrawString(Text, Font, DisplayBrush, wholeComponent, StringFormat);
        }

        public override bool MayDraw() {
            return Text != null && Text.Length > 0 && Font != null;
        }

        public override bool WillFillRectangleOut() {
            return false;
        }

        public override void ModifySize(ref Rectangle newSize) {
            return;
        }
    }
}


text:
Lebowskis Crypto Tokens
=======================

* Based on BottleCaps
* Proof of Work/Proof of Stake Hybrid
* Scrypt
* Linear Difficulty Retarget
* 5 Confirms
* 19.98 Tokens Per Block
* Maximum of 17439163 Coins
* Default P2P Port: 7245
* Default RPC Port: 8245


text:
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../Modelo/Producto.js"></script>
    <script src="../CodigoJS/funcionesObjeto.js"></script>
</head>
<body>
<form>
    <input type="text" id="codigo">
    <input type="button" value="Enviar" onclick = "validarCodigo(document.forms[0].codigo);" >
    <div id="resultado">
   Creando objetos
    </div>
</form>
</body>
</html>


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <title>ActionMailer::DeliveryMethods::ClassMethods</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" />

            Ruby on Rails 4.0.0

            Module
            ActionMailer::DeliveryMethods::ClassMethods

/usr/local/rvm/gems/ruby-2.0.0-p0/gems/actionmailer-4.0.0/lib/action_mailer/delivery_methods.rb

Methods

A

                add_delivery_method

Instance Public methods

              add_delivery_method(symbol, klass, default_options={})

            Link

Adds a new delivery method through the given class using the given symbol
as alias and the default options supplied.

add_delivery_method :sendmail, Mail::Sendmail,
  location:  '/usr/sbin/sendmail',
  arguments: '-i -t'

                Source:
                show

# File /usr/local/rvm/gems/ruby-2.0.0-p0/gems/actionmailer-4.0.0/lib/action_mailer/delivery_methods.rb, line 51
def add_delivery_method(symbol, klass, default_options={})
  class_attribute(:"#{symbol}_settings") unless respond_to?(:"#{symbol}_settings")
  send(:"#{symbol}_settings=", default_options)
  self.delivery_methods = delivery_methods.merge(symbol.to_sym => klass).freeze
end


text:
package org.apache.beam.sdk.io.common;

import java.io.IOException;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import org.apache.beam.sdk.io.FileSystems;
import org.apache.beam.sdk.io.fs.MatchResult;
import org.apache.beam.sdk.io.fs.ResourceId;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables;

/** Contains helper methods for file based IO Integration tests. */
public class FileBasedIOITHelper {

  private FileBasedIOITHelper() {}

  public static FileBasedIOTestPipelineOptions readFileBasedIOITPipelineOptions() {
    return IOITHelper.readIOTestPipelineOptions(FileBasedIOTestPipelineOptions.class);
  }

  public static String appendTimestampSuffix(String text) {
    return String.format("%s_%s", text, new Date().getTime());
  }

  /** Constructs text lines in files used for testing. */
  public static class DeterministicallyConstructTestTextLineFn extends DoFn<Long, String> {

    @ProcessElement
    public void processElement(ProcessContext c) {
      c.output(String.format("IO IT Test line of text. Line seed: %s", c.element()));
    }
  }

  /** Deletes matching files using the FileSystems API. */
  public static class DeleteFileFn extends DoFn<String, Void> {

    @ProcessElement
    public void processElement(ProcessContext c) throws IOException {
      MatchResult match =
          Iterables.getOnlyElement(FileSystems.match(Collections.singletonList(c.element())));

      Set<ResourceId> resourceIds = new HashSet<>();
      for (MatchResult.Metadata metadataElem : match.metadata()) {
        resourceIds.add(metadataElem.resourceId());
      }

      FileSystems.delete(resourceIds);
    }
  }
}


text:
var app = app || {};
app.index = app.index || {};

app.index.DialogueModel = function (data) {
    var self = this;

    self.ad = ko.observable(new app.index.Models.Ad(data.ad));
    self.respondentkey = data.respondentkey;

    self.respondent = ko.observable(new app.index.Models.Respondent({
        adkey: data.ad.adkey,
        respondentkey: data.respondentkey
    }));

    self.validateAdvertiserDialogue = {
        respondentkey: self.respondentkey,
        password: ko.observable(null),
        adkey: data.ad.adkey
    };

    self.dialogue = new app.index.Models.Dialogue();
    self.captcha = new utils.Captcha();
    self.cookieManager = new utils.CookieManager();
    self.loading = ko.observable(true);
    self.validated = ko.observable(false);
    self.validated.subscribe(function (newValue) {
        if (newValue) {
            setInterval(self.updateDialogue, 5000);
        }
    });
    self.isNewRespondent = ko.observable(false);
    self.message = ko.observable(null);

    self.isAdvertiser = ko.observable(false);
    self.isRespondent = ko.observable(false);
    self.alertsToggling = ko.observable(false);
    self.hasIdentity = ko.observable(false);

    self.validateAdCookie = function () {
        var adkey = self.ad().adkey;
        var hash = self.cookieManager.getAdHash(adkey);
        var url = "/api/AdsApi/validateadorrespondentcookie/" + adkey + "/" + self.respondentkey + "/Ad/" + hash;

        ajaxGet(url, function (response) {
            if (!response.success) {
                toastrErrorFromList(response.errors, "Validation Failed");
            } else if (!response.item.valid) {
                self.validated(false);
                self.cookieManager.expireAll();
            } else {
                self.validated(true);
                self.isAdvertiser(true);

                self.cookieManager.extendAd();
                self.ad(new app.index.Models.Ad(response.item.ad));
                self.respondent(new app.index.Models.Respondent(response.item.respondent));
                self.dialogue.initMessages(response.item.dialogue);
            }
            self.loading(false);
        });
    };

    self.validateRespondentCookie = function () {
        var adkey = self.ad().adkey;
        var hash = self.cookieManager.getRespondentHashByRespondentkey(self.respondentkey);
        var url = "/api/AdsApi/validateadorrespondentcookie/" + adkey + "/" + self.respondentkey + "/Respondent/" + hash;

        ajaxGet(url, function (response) {
            if (!response.success) {
                toastrErrorFromList(response.errors, "Validation Failed");
            } else if (!response.item.valid) {
                self.validated(false);
                self.cookieManager.expireAll();
            } else {
                self.validated(true);
                self.isRespondent(true);

                self.cookieManager.extendAd();
                self.ad(new app.index.Models.Ad(response.item.ad));
                self.respondent(new app.index.Models.Respondent(response.item.respondent));
                self.dialogue.initMessages(response.item.dialogue);
            }
            self.loading(false);
        });
    };

    self.validateAdvertiser = function (data, e) {

        if (!self.validateAdvertiserDialogue.password()) {
            toastrError("Password is required");
            return;
        }

        var ladda = Ladda.create(e.currentTarget);
        ladda.start();

        var url = "/api/AdsApi/validateadvertiserdialogue";
        var obj = ko.toJSON(self.validateAdvertiserDialogue);

        ajaxPost(url, obj, function (response) {
            if (!response.success) {
                toastrErrorFromList(response.errors, "Validation Failed");
            } else {
                self.validated(true);
                self.isAdvertiser(true);

                self.ad(new app.index.Models.Ad(response.item.ad));
                self.respondent(new app.index.Models.Respondent(response.item.respondent));
                self.cookieManager.setAd(response.item.ad.adkey, response.item.hash);
                self.dialogue.initMessages(response.item.dialogue);
            }
            ladda.stop();
        });

    };

    self.validateAsAdmin = function () {
        var adkey = self.ad().adkey;
        var url = "/api/AdsApi/validateadmindialogue/" + adkey;
        var obj = ko.toJSON({
            x: self.ad().adkey,
            y: self.respondentkey
        });

        ajaxPost(url, obj, function (response) {
            if (!response.success) {
                toastrErrorFromList(response.errors, "Validation Failed");
            } else if (response.item.valid) {
                self.validated(true);
                self.isAdvertiser(true);
                self.hasIdentity(true);

                self.ad(new app.index.Models.Ad(response.item.ad));
                self.respondent(new app.index.Models.Respondent(response.item.respondent));
                self.dialogue.initMessages(response.item.dialogue);
            }
            self.loading(false);
        });
    };

    self.validateRespondent = function (data, e) {

        if (!self.respondent().password()) {
            toastrError("Password is required");
            return;
        }

        var lad = Ladda.create(e.currentTarget);
        lad.start();

        var url = "/api/AdsApi/validaterespondent";
        var obj = ko.toJSON(self.respondent());

        ajaxPost(url, obj, function (response) {
            if (!response.success) {
                toastrErrorFromList(response.errors, "Validation Failed");
            } else {
                self.validated(true);
                self.isRespondent(true);

                self.ad(new app.index.Models.Ad(response.item.ad));
                self.respondent(new app.index.Models.Respondent(response.item.respondent));
                self.cookieManager.setRespondent(self.ad().adkey, self.respondentkey, response.item.hash);
                self.dialogue.initMessages(response.item.dialogue);
            }
            lad.stop();
        });

    };

    self.resetAdPassword = function (data, e) {
        bootbox.prompt("Please enter your email", function(email) {
            if (email === null) {
                return;
            } else {
                var lad = Ladda.create(e.currentTarget);
                lad.start();

                var url = "/api/AdsApi/sendresetadvertiseremail";
                var obj = ko.toJSON({
                    x: self.ad().adkey,
                    y: email.trim()
                });

                ajaxPost(url, obj, function (response) {
                    if (!response.success) {
                        toastrErrorFromList(response.errors, "Validation Failed");
                    } else {
                        toastrSuccess("An Email has been sent with instructions on how to reset your password");
                    }
                    lad.stop();
                });
            }
        });
    };

    self.resetRespondentPassword = function (data, e) {
        bootbox.prompt("Please enter your email", function(email) {
            if (email === null) {
                return;
            } else {
                var lad = Ladda.create(e.currentTarget);
                lad.start();

                var url = "/api/AdsApi/sendresetrespondentemail";
                var obj = ko.toJSON({
                    x: self.respondentkey,
                    y: email.trim()
                });

                ajaxPost(url, obj, function (response) {
                    if (!response.success) {
                        toastrErrorFromList(response.errors, "Validation Failed");
                    } else {
                        toastrSuccess("An Email has been sent with instructions on how to reset your password");
                    }
                    lad.stop();
                });
            }
        });
    };

    self.logout = function () {
        if (self.isAdvertiser()) {
            self.cookieManager.removeAd(self.ad().adkey);
        } else if (self.isRespondent()) {
            self.cookieManager.removeRespondent(self.respondent().respondentkey);
        }

        location.href = "/Index/viewad/" + self.ad().adkey;
    };

    self.updateDialogue = function () {

        if (!self.isAdvertiser() && !self.isRespondent()) {
            return;
        }

        var url = null;
        var obj = null;

        if (self.isAdvertiser()) {
            url = "/api/AdsApi/updatedialoguebyad";
            obj = ko.toJSON({
                x: self.respondentkey,
                y: self.ad().password()
            });
        } else if (self.isRespondent()) {
            url = "/api/AdsApi/updatedialoguebyrespondent";
            obj = ko.toJSON({
                x: self.respondentkey,
                y: self.respondent().password()
            });
        }

        ajaxPost(url, obj, function (response) {
            if (!response.success) {
                toastrErrorFromList(response.errors, "Failed");
            } else {
                self.dialogue.initMessages(response.item);
            }
        });
    };

    self.toggleAlerts = function () {

        // The checked value is only set after this method is complete.
        // You therefore have to use the not values instead.

        if (!self.isAdvertiser() && !self.isRespondent()) {
            return false;
        }

        self.alertsToggling(true);
        var url = null;
        var obj = null;

        if (self.isAdvertiser()) {
            url = "/api/AdsApi/toggleadvertisersalerts";
            obj = ko.toJSON({
                x: self.ad().adkey,
                y: self.ad().password(),
                z: !self.ad().turnonalerts()
            });
        } else if (self.isRespondent()) {
            url = "/api/AdsApi/togglerespondentssalerts";
            obj = ko.toJSON({
                x: self.respondentkey,
                y: self.respondent().password(),
                z: !self.respondent().turnonalerts()
            });
        }

        ajaxPost(url, obj, function (response) {
            if (!response.success) {
                toastrErrorFromList(response.errors, "Failed");
            } else {
                toastrSuccess("Alerts turned " + (JSON.parse(obj).z ? "On" : "Off"));
            }
            self.alertsToggling(false);
        });

        return true;
    };

    self.validateSave = function() {
        var errors = [];

        if (!self.respondent().password()) {
            errors.push("Password is required");
        }

        if (!self.respondent().publicname()) {
            errors.push("Publicname is required");
        }

        if (!utils.validEmail(self.respondent().email())) {
            errors.push("Invalid Email");
        }

        if (!self.message()) {
            errors.push("Message is required");
        }

        if (errors.length) {
            toastrErrorFromList(errors, "Validation Failed");
        }

        return errors.length === 0;
    };

    self.saveRespondent = function (data, e) {

        if (!self.validateSave()) {
            return;
        }

        var ladda = Ladda.create(e.currentTarget);
        ladda.start();

        var url = "/api/AdsApi/addrespondent";
        var obj = ko.toJSON({
            captcha: self.captcha.data,
            respondent: self.respondent(),
            message: self.message()
        });

        ajaxPost(url, obj, function (response) {
            if (!response.success) {
                self.captcha.resetCaptcha(true);
                toastrErrorFromList(response.errors, "Failed");
            } else {
                self.captcha.resetCaptcha();
                self.validated(true);
                self.isNewRespondent(false);
                self.isRespondent(true);
                self.message(null);
                self.dialogue.addRmsg(response.written_key.respondentsMessage);
                self.cookieManager.setRespondent(self.ad().adkey, response.written_key.respondent.respondentkey, response.written_key.hash);
                self.respondent(new app.index.Models.Respondent(response.written_key.respondent));
                self.respondentkey = self.respondent().respondentkey;
                window.history.pushState('page2', 'Title', '/Index/dialogue/' + self.ad().adkey + '/' + self.respondentkey);
                toastrSuccess("Created Respondent Successfully");
            }
            ladda.stop();
        });
    };

    self.addMsg = function (data, e) {

        if (!self.message()) {
            toastrError("Message is required");
            return;
        }

        var url = null;
        var obj = null;

        if (!self.isAdvertiser() && !self.isRespondent()) {
            return;
        } else if (self.isAdvertiser()) {
            url = "/api/AdsApi/addadvertisersmessage";
            obj = ko.toJSON({
                x: self.respondentkey,
                y: self.ad().password(),
                z: self.message()
            });
        } else if (self.isRespondent()) {
            url = "/api/AdsApi/addrespondentsmessage";
            obj = ko.toJSON({
                x: self.respondentkey,
                y: self.respondent().password(),
                z: self.message()
            });
        }

        var ladda = Ladda.create(e.currentTarget);
        ladda.start();

        ajaxPost(url, obj, function (response) {
            if (!response.success) {
                toastrErrorFromList(response.errors, "Failed");
            } else {
                if (self.isRespondent()) {
                    self.dialogue.addRmsg(response.written_key);
                } else {
                    self.dialogue.addAmsg(response.written_key);
                }
                self.message(null);
            }
            ladda.stop();
        });
    };

    self.deleteMsg = function (msg) {

        if (!self.isAdvertiser() && !self.isRespondent()) {
            return;
        }

        var callback = function () {
            var url = null;
            var obj = null;

            if (self.isAdvertiser()) {
                url = "/api/AdsApi/deleteadvertisersmessage";
                obj = ko.toJSON({
                    x: msg.messagekey,
                    y: self.ad().password()
                });
            } else if (self.isRespondent()) {
                url = "/api/AdsApi/deleterespondentsmessage";
                obj = ko.toJSON({
                    x: msg.messagekey,
                    y: self.respondent().password()
                });
            }

            ajaxPost(url, obj, function (response) {
                if (!response.success) {
                    toastrErrorFromList(response.errors, "Failed");
                } else {
                    if (self.isRespondent()) {
                        self.dialogue.rmsg.remove(msg);
                    } else {
                        self.dialogue.amsg.remove(msg);
                    }
                }
            });
        };

        bootbox.confirm("Are you sure?", function(result) {
            if (result) {
                callback();
            }
        });
    };

    $(function () {
        try {
            var adHash = self.cookieManager.getAdHash(self.ad().adkey);
            var respondentHash = null;

            if (self.respondentkey) {
                respondentHash = self.cookieManager.getRespondentHashByRespondentkey(self.respondentkey);
            }

            if (adHash && respondentHash) {
                self.cookieManager.expireAll();
                location.href = "/Index/ads";
            } else if (adHash) {
                self.validateAdCookie();
            } else if (respondentHash) {
                self.validateRespondentCookie();
            } else if (!self.respondentkey) {
                self.isNewRespondent(true);
                self.loading(false);
            } else {
                self.validateAsAdmin();
            }
       } catch (err) {
            self.cookieManager.expireAll();
            location.href = "/Index/ads";
        }
    });
};


text:
{-# LANGUAGE DeriveAnyClass    #-}
{-# LANGUAGE DeriveGeneric     #-}
{-# LANGUAGE OverloadedStrings #-}

module Shifts.Types
  (
    Eng(..)
  , Shift(..)
  ) where

import Control.Monad (liftM)
import Data.Aeson
import Data.Text
import Data.Time
import GHC.Generics

instance Ord Shift where
  (Shift s1 _ _) `compare` (Shift s2 _ _) = s1 `compare` s2

data Shift = Shift
  { _startDay :: Day
  , _endDay   :: Day
  , _engOwner :: Eng
  }
  deriving (Show, Eq, ToJSON, Generic)

data Eng = Eng { _initials :: Text }
  deriving (Show, Eq, ToJSON, Generic)

parseDate :: String -> Day
parseDate = parseTimeOrError True defaultTimeLocale "%Y-%m-%d"

instance FromJSON Day where
  parseJSON (Object v) = liftM parseDate (v .: "date")
  parseJSON _ = fail "invalid"

instance ToJSON Day where
  toJSON = toJSON . showGregorian


text:
@Echo Off
call %~dp0CreateNew\CreateNew.cmd


text:
cask "prowritingaid" do
  version "2.0.48"
  sha256 "f9bae3c805d9261622b85372af0167579302ea9746d628653154b601dbfc43ef"

  url "https://cdn.prowritingaid.com/prowritingaid-desktop/desktop_#{version.dots_to_underscores}/ProWritingAid.dmg"
  appcast "https://macupdater.net/cgi-bin/check_urls/check_url_sizeandmodified.cgi?url=https://cdn.prowritingaid.com/prowritingaid-desktop/ProWritingAid.dmg"
  name "ProWritingAid"
  desc "Grammar checker, style editor, and writing mentor"
  homepage "https://prowritingaid.com/"

  app "ProWritingAid.app"
end


text:
package com.facebook.buck.apple;

import com.facebook.buck.model.BuildTargets;
import com.facebook.buck.model.Flavor;
import com.facebook.buck.model.ImmutableFlavor;
import com.facebook.buck.rules.AbstractBuildRule;
import com.facebook.buck.rules.AddToRuleKey;
import com.facebook.buck.rules.BuildContext;
import com.facebook.buck.rules.BuildRuleParams;
import com.facebook.buck.rules.BuildableContext;
import com.facebook.buck.rules.SourcePath;
import com.facebook.buck.rules.SourcePathResolver;
import com.facebook.buck.rules.Tool;
import com.facebook.buck.shell.ShellStep;
import com.facebook.buck.step.Step;
import com.facebook.buck.step.ExecutionContext;
import com.facebook.buck.step.fs.CopyStep;
import com.facebook.buck.step.fs.MakeCleanDirectoryStep;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Optional;

public class SceneKitAssets extends AbstractBuildRule {

  public static final Flavor FLAVOR = ImmutableFlavor.of("scenekit-assets");

  @AddToRuleKey
  private final Optional<Tool> copySceneKitAssets;

  @AddToRuleKey
  private final ImmutableSet<SourcePath> sceneKitAssetsPaths;

  @AddToRuleKey
  private final String sdkName;

  @AddToRuleKey
  private final String minOSVersion;

  private final Path outputDir;

  SceneKitAssets(
      BuildRuleParams params,
      final SourcePathResolver resolver,
      AppleCxxPlatform appleCxxPlatform,
      ImmutableSet<SourcePath> sceneKitAssetsPaths) {
    super(params, resolver);
    this.sceneKitAssetsPaths = sceneKitAssetsPaths;
    String outputDirString =
        BuildTargets.getGenPath(getProjectFilesystem(), params.getBuildTarget(), "%s")
            .toString();
    this.outputDir = Paths.get(outputDirString);
    this.sdkName = appleCxxPlatform.getAppleSdk().getName();
    this.minOSVersion = appleCxxPlatform.getMinVersion();
    this.copySceneKitAssets = appleCxxPlatform.getCopySceneKitAssets();
  }

  @Override
  public ImmutableList<Step> getBuildSteps(
      BuildContext context, BuildableContext buildableContext) {
    ImmutableList.Builder<Step> stepsBuilder = ImmutableList.builder();
    stepsBuilder.add(new MakeCleanDirectoryStep(getProjectFilesystem(), outputDir));
    for (SourcePath inputPath : sceneKitAssetsPaths) {
      final Path absoluteInputPath = getResolver().getAbsolutePath(inputPath);

      if (copySceneKitAssets.isPresent()) {
        stepsBuilder.add(
            new ShellStep(getProjectFilesystem().getRootPath()) {
              @Override
              protected ImmutableList<String> getShellCommandInternal(ExecutionContext context) {
                ImmutableList.Builder<String> commandBuilder = ImmutableList.builder();
                commandBuilder.addAll(copySceneKitAssets.get().getCommandPrefix(getResolver()));
                commandBuilder.add(
                    absoluteInputPath.toString(),
                    "-o",
                    getProjectFilesystem()
                        .resolve(outputDir)
                        .resolve(absoluteInputPath.getFileName()).toString(),
                    "--target-platform=" + sdkName,
                    "--target-version=" + minOSVersion);

                return commandBuilder.build();
              }

              @Override
              public ImmutableMap<String, String> getEnvironmentVariables(
                  ExecutionContext context) {
                return copySceneKitAssets.get().getEnvironment();
              }

              @Override
              public String getShortName() {
                return "copy-scenekit-assets";
              }
            });
      } else {
        stepsBuilder.add(
            CopyStep.forDirectory(
                getProjectFilesystem(),
                absoluteInputPath,
                outputDir,
                CopyStep.DirectoryMode.CONTENTS_ONLY));
      }
    }
    buildableContext.recordArtifact(getPathToOutput());
    return stepsBuilder.build();
  }

  @Override
  public Path getPathToOutput() {
    return outputDir;
  }
}


text:
// -----------------------------------------------------------------------
// <copyright file="Error.cs" company="YamNet">
//   Copyright (c) 2013 YamNet contributors
// </copyright>
// -----------------------------------------------------------------------

namespace YamNet.Client.Errors
{
    using System.Collections.Generic;

    using Newtonsoft.Json;

    /// <summary>
    /// The error DTO.
    /// </summary>
    /// <remarks>
    /// For serializing API response, like:
    /// {
    ///     "response": {
    ///         "message": "Token not found.",
    ///         "code": 16,
    ///         "stat": "fail"
    ///     }
    /// }
    /// </remarks>
    public class Error
    {
        /// <summary>
        /// Gets the message.
        /// </summary>
        public string Message
        {
            get { return this.Response["message"].ToString(); }
        }

        /// <summary>
        /// Gets the code.
        /// </summary>
        public int Code
        {
            get
            {
                int code;

                return int.TryParse(this.Response["code"].ToString(), out code)
                    ? code
                    : int.MinValue;
            }
        }

        /// <summary>
        /// Gets or sets the response.
        /// </summary>
        [JsonProperty("response")]
        protected Dictionary<string, object> Response { get; set; }

        /// <summary>
        /// Denotes whether the response is a valid response.
        /// </summary>
        /// <returns>The <see cref="bool"/>.</returns>
        public bool IsValid()
        {
            return this.Response != null;
        }
    }
}


text:
* Change all IO operations to work over any `MonadIO`. Since GHC 8 this is available in `base`, so the dependency on `transformers` is only required for previous versions.

* Support GHC versions back to 7.6.

* Reexport the `Color` and `ColorIntensity` data types from `ansi-terminal` for full use of the range of ANSI colors without importing that package.

## Version 0.2

* Improved method of displaying animations so that successive frames overwrite previous ones instead of generating many pages of output. This requires the addition of the `graphHeight :: Graphable a => a -> Int` type class method.

* Improved matrix graphing. Now there are distinct colors to represent positive and negative values, as well as real versus imaginary components. Examples added.

* The `Coloring` data type representing possible terminal colorings has been changed to take `Maybe AnsiColor`s, where `Nothing` indicates use of the default terminal colors.

* Some names have been changed for greater clarity and consistency.

* Dependency bounds updated for GHC 8.

## Version 0.1

Initial release.


text:
public class TermReminder{

  public static void main(String[] args){
    boolean truth = true;
    while(truth){
      System.out.println(args[0]);
      //wait(700);
    }
  }
}


text:
package com.microsoft.azure.management.network.v2020_03_01.implementation;

import com.microsoft.azure.management.network.v2020_03_01.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.rest.SkipParentValidation;
import com.microsoft.azure.Resource;

/**
 * Network watcher in a resource group.
 */
@JsonFlatten
@SkipParentValidation
public class NetworkWatcherInner extends Resource {
    /**
     * A unique read-only string that changes whenever the resource is updated.
     */
    @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
    private String etag;

    /**
     * The provisioning state of the network watcher resource. Possible values
     * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'.
     */
    @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

    /**
     * Resource ID.
     */
    @JsonProperty(value = "id")
    private String id;

    /**
     * Get a unique read-only string that changes whenever the resource is updated.
     *
     * @return the etag value
     */
    public String etag() {
        return this.etag;
    }

    /**
     * Get the provisioning state of the network watcher resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'.
     *
     * @return the provisioningState value
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get resource ID.
     *
     * @return the id value
     */
    public String id() {
        return this.id;
    }

    /**
     * Set resource ID.
     *
     * @param id the id value to set
     * @return the NetworkWatcherInner object itself.
     */
    public NetworkWatcherInner withId(String id) {
        this.id = id;
        return this;
    }

}


text:
namespace {
const int64 kCheckPeriod = 2000;

void DoNothing() {
}
}

GpuWatchdogThread::GpuWatchdogThread(int timeout)
    : base::Thread("Watchdog"),
      watched_message_loop_(MessageLoop::current()),
      timeout_(timeout),
      armed_(false),
#if defined(OS_WIN)
      watched_thread_handle_(0),
      arm_cpu_time_(0),
#endif
      ALLOW_THIS_IN_INITIALIZER_LIST(task_observer_(this)) {
  DCHECK(timeout >= 0);

#if defined(OS_WIN)
  // GetCurrentThread returns a pseudo-handle that cannot be used by one thread
  // to identify another. DuplicateHandle creates a "real" handle that can be
  // used for this purpose.
  BOOL result = DuplicateHandle(GetCurrentProcess(),
                                GetCurrentThread(),
                                GetCurrentProcess(),
                                &watched_thread_handle_,
                                THREAD_QUERY_INFORMATION,
                                FALSE,
                                0);
  DCHECK(result);
#endif

  watched_message_loop_->AddTaskObserver(&task_observer_);
}

GpuWatchdogThread::~GpuWatchdogThread() {
  // Verify that the thread was explicitly stopped. If the thread is stopped
  // implicitly by the destructor, CleanUp() will not be called.
  DCHECK(!method_factory_.get());

#if defined(OS_WIN)
  CloseHandle(watched_thread_handle_);
#endif

  watched_message_loop_->RemoveTaskObserver(&task_observer_);
}

void GpuWatchdogThread::PostAcknowledge() {
  // Called on the monitored thread. Responds with OnAcknowledge. Cannot use
  // the method factory. Rely on reference counting instead.
  message_loop()->PostTask(
      FROM_HERE,
      NewRunnableMethod(this, &GpuWatchdogThread::OnAcknowledge));
}

void GpuWatchdogThread::Init() {
  // The method factory must be created on the watchdog thread.
  method_factory_.reset(new MethodFactory(this));

  // Schedule the first check.
  OnCheck();
}

void GpuWatchdogThread::CleanUp() {
  // The method factory must be destroyed on the watchdog thread.
  method_factory_->RevokeAll();
  method_factory_.reset();
}

GpuWatchdogThread::GpuWatchdogTaskObserver::GpuWatchdogTaskObserver(
    GpuWatchdogThread* watchdog)
    : watchdog_(watchdog) {
}

GpuWatchdogThread::GpuWatchdogTaskObserver::~GpuWatchdogTaskObserver() {
}

void GpuWatchdogThread::GpuWatchdogTaskObserver::WillProcessTask(
    base::TimeTicks time_posted) {
  watchdog_->CheckArmed();
}

void GpuWatchdogThread::GpuWatchdogTaskObserver::DidProcessTask(
    base::TimeTicks time_posted) {
  watchdog_->CheckArmed();
}

void GpuWatchdogThread::CheckArmed() {
  // Acknowledge the watchdog if it has armed itself. The watchdog will not
  // change its armed state until it is acknowledged.
  if (armed()) {
    PostAcknowledge();
  }
}

void GpuWatchdogThread::OnAcknowledge() {
  // The check has already been acknowledged and another has already been
  // scheduled by a previous call to OnAcknowledge. It is normal for a
  // watched thread to see armed_ being true multiple times before
  // the OnAcknowledge task is run on the watchdog thread.
  if (!armed_)
    return;

  // Revoke any pending hang termination.
  method_factory_->RevokeAll();
  armed_ = false;

  // The monitored thread has responded. Post a task to check it again.
  message_loop()->PostDelayedTask(
      FROM_HERE,
      method_factory_->NewRunnableMethod(&GpuWatchdogThread::OnCheck),
      kCheckPeriod);
}

#if defined(OS_WIN)
int64 GpuWatchdogThread::GetWatchedThreadTime() {
  FILETIME creation_time;
  FILETIME exit_time;
  FILETIME user_time;
  FILETIME kernel_time;
  BOOL result = GetThreadTimes(watched_thread_handle_,
                               &creation_time,
                               &exit_time,
                               &kernel_time,
                               &user_time);
  DCHECK(result);

  ULARGE_INTEGER user_time64;
  user_time64.HighPart = user_time.dwHighDateTime;
  user_time64.LowPart = user_time.dwLowDateTime;

  ULARGE_INTEGER kernel_time64;
  kernel_time64.HighPart = kernel_time.dwHighDateTime;
  kernel_time64.LowPart = kernel_time.dwLowDateTime;

  // Time is reported in units of 100 nanoseconds. Kernel and user time are
  // summed to deal with to kinds of hangs. One is where the GPU process is
  // stuck in user level, never calling into the kernel and kernel time is
  // not increasing. The other is where either the kernel hangs and never
  // returns to user level or where user level code
  // calls into kernel level repeatedly, giving up its quanta before it is
  // tracked, for example a loop that repeatedly Sleeps.
  return static_cast<int64>(
      (user_time64.QuadPart + kernel_time64.QuadPart) / 10000);
}
#endif

void GpuWatchdogThread::OnCheck() {
  if (armed_)
    return;

  // Must set armed before posting the task. This task might be the only task
  // that will activate the TaskObserver on the watched thread and it must not
  // miss the false -> true transition.
  armed_ = true;

#if defined(OS_WIN)
  arm_cpu_time_ = GetWatchedThreadTime();
#endif

  arm_absolute_time_ = base::Time::Now();

  // Post a task to the monitored thread that does nothing but wake up the
  // TaskObserver. Any other tasks that are pending on the watched thread will
  // also wake up the observer. This simply ensures there is at least one.
  watched_message_loop_->PostTask(
      FROM_HERE,
      NewRunnableFunction(DoNothing));

  // Post a task to the watchdog thread to exit if the monitored thread does
  // not respond in time.
  message_loop()->PostDelayedTask(
      FROM_HERE,
      method_factory_->NewRunnableMethod(
          &GpuWatchdogThread::DeliberatelyCrashingToRecoverFromHang),
      timeout_);
}

// Use the --disable-gpu-watchdog command line switch to disable this.
void GpuWatchdogThread::DeliberatelyCrashingToRecoverFromHang() {
#if defined(OS_WIN)
  // Defer termination until a certain amount of CPU time has elapsed on the
  // watched thread.
  int64 time_since_arm = GetWatchedThreadTime() - arm_cpu_time_;
  if (time_since_arm < timeout_) {
    message_loop()->PostDelayedTask(
        FROM_HERE,
        method_factory_->NewRunnableMethod(
            &GpuWatchdogThread::DeliberatelyCrashingToRecoverFromHang),
        timeout_ - time_since_arm);
    return;
  }
#endif

  // If the watchdog woke up significantly behind schedule, disarm and reset
  // the watchdog check. This is to prevent the watchdog thread from terminating
  // when a machine wakes up from sleep or hibernation, which would otherwise
  // appear to be a hang.
  if ((base::Time::Now() - arm_absolute_time_).InMilliseconds() >
      timeout_ * 2) {
    armed_ = false;
    OnCheck();
    return;
  }

  // Make sure the timeout period is on the stack before crashing.
  volatile int timeout = timeout_;

  // For minimal developer annoyance, don't keep crashing.
  static bool crashed = false;
  if (crashed)
    return;

#if defined(OS_WIN)
  if (IsDebuggerPresent())
    return;
#endif

  LOG(ERROR) << "The GPU process hung. Terminating after "
             << timeout_ << " ms.";

  volatile int* null_pointer = NULL;
  *null_pointer = timeout;

  crashed = true;
}


text:
 var Unit = React.createClass({displayName: "Unit",
            getInitialState: function() {
                return {checked: false}
            },
            handleCheck: function() {
                this.setState({checked: true});
            },

            render: function() {
                var color = "black";
                var index = "01";
                return (
                     React.createElement("div", {className: color},
                          		React.createElement("input", {type: "checkbox", id: index, name: "", checked: true, defaultChecked: false}),
                        	  	React.createElement("label", {htmlFor: index, onClick: this.handleCheck})
                     )
                );
            }
        });

React.render(React.createElement(Unit, null), document.getElementById('gomoku-container'));


text:
module.exports = function (blocks) {
    blocks.declare('pre', function (data) {
        return [
            {
                tag: 'pre',
                content: data.contentType && JSON.stringify(data[data.contentType],  null, 2)
            }
        ];
    });
};


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/DemoEasySQLite.iml" filepath="$PROJECT_DIR$/DemoEasySQLite.iml" />
      <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
      <module fileurl="file://$PROJECT_DIR$/easysqlite/easysqlite.iml" filepath="$PROJECT_DIR$/easysqlite/easysqlite.iml" />
    </modules>
  </component>
</project>


text:
{% extends "photologue/root.html" %}
{% load url from future %}

{% block title %}Latest Photos{% endblock %}

{% block content %}

Latest Photos

{% if latest %}
    {% for photo in latest %}

    {% endfor %}
{% else %}

No photos were found.

{% endif %}

View all photographs

{% endblock %}


text:
{{actionLabel}}

  ×

    {{#each comments}}

		    {{user.first_name}} {{user.last_name}}
		     @{{user.screenname}}
		    {{created_at}}

			  {{body}}

    {{/each}}

  <form accept-charset="UTF-8" action="/create_question" method="post">
    <input id="id" name="id" type="hidden" value="649">
    <textarea class="comment-text" id="comment_649" name="content"></textarea>
    <input class="btn comment_submit_button" name="commit" type="submit" value="Comment">
  </form>


text:
import stainless._
import stainless.lang._
import stainless.annotation._

object InnerfunArgAliasing2 {

  case class Box(var value: Int)
  case class BBox(var box: Box)

  def outer(x: BBox, y: BBox, cond: Boolean): Unit = {
    val z = if (cond) y else x

    def inner(innoncentLooking: Box): Unit = {
      val oldX = x.box.value
      innoncentLooking.value = 1234
      assert(innoncentLooking.value == 1234)
      // This must hold because we assume x.box and innoncentLooking are disjoint
      assert(x.box.value == oldX)
    }

    // Illegal aliasing due to z.box aliasing x.box for cond = false
    inner(z.box)
  }
}