text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
com.amazonaws.services.simpleworkflow.flow.interceptors (AWS SDK for Java - 1.4.7)
</TITLE>

<META NAME="date" CONTENT="2013-06-18">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../JavaDoc.css" TITLE="Style">

      Overview
    Package
      Class
      Index
      Help

Did this page help you?
   Yes   No   Tell us about it...

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Package com.amazonaws.services.simpleworkflow.flow.interceptors

Interface Summary

AsyncExecutor
Serves the same purpose as Executor, but in asynchronous world.

AsyncRunnable
Serves the same purpose as Runnable, but avoids special handling of checked exceptions.

Decorator

InvocationSchedule
Encapsulates an invocation schedule.

RetryCallable<T>

RetryPolicy
Defines retry policy in case of failures.

Class Summary

AsyncCancelAndRetryExecutor
Cancels and reexecutes a command when AsyncCancelAndRetryExecutor.cancelCurrentAndReexecute() is
 called.

AsyncRetryingExecutor

AsyncScheduledExecutor
AsyncExecutor implementation that executes command according to provided schedule.

ExponentialRetryPolicy

FixedIntervalInvocationSchedule
Schedule that represents invocations with a fixed delay up to a specified expiration interval or count.

RetryDecorator
In case of failures repeats every call to a wrapped object method according
 the provided RetryPolicy.

RetryPolicyBase

ScheduleDecorator
Repeats every call to a wrapped object method according to provided schedule.

      Overview
    Package
      Class
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

                Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.


text:
/*
 * $Id$
 *
 * Caches of pointers to user structs in which the least-recently-used
 * element is replaced in the event of a cache miss after the cache has
 * reached a given size.
 *
 * John Ellson  (ellson@lucent.com)  Oct 31, 1997
 *
 * Test this with:
 *		 gcc -o gdcache -g -Wall -DTEST gdcache.c
 *
 * The cache is implemented by a singly-linked list of elements
 * each containing a pointer to a user struct that is being managed by
 * the cache.
 *
 * The head structure has a pointer to the most-recently-used
 * element, and elements are moved to this position in the list each
 * time they are used.  The head also contains pointers to three
 * user defined functions:
 *		- a function to test if a cached userdata matches some keydata
 *		- a function to provide a new userdata struct to the cache
 *          if there has been a cache miss.
 *		- a function to release a userdata struct when it is
 *          no longer being managed by the cache
 *
 * In the event of a cache miss the cache is allowed to grow up to
 * a specified maximum size.  After the maximum size is reached then
 * the least-recently-used element is discarded to make room for the
 * new.  The most-recently-returned value is always left at the
 * beginning of the list after retrieval.
 *
 * In the current implementation the cache is traversed by a linear
 * search from most-recent to least-recent.  This linear search
 * probably limits the usefulness of this implementation to cache
 * sizes of a few tens of elements.
 */

/*********************************************************/
/* header                                                */
/*********************************************************/

#if (!defined(_OSD_POSIX) && !defined(__FreeBSD__)) && HAVE_MALLOC_H
#include <malloc.h>
#else
#include <stdlib.h> /* BS2000/OSD defines malloc() & friends in stdlib.h */
#endif
#ifndef NULL
#define NULL (void *)0
#endif

/* user defined function templates */
typedef int (*gdCacheTestFn_t)(void *userdata, void *keydata);
typedef void *(*gdCacheFetchFn_t)(char **error, void *keydata);
typedef void (*gdCacheReleaseFn_t)(void *userdata);

/* element structure */
typedef struct gdCache_element_s gdCache_element_t;
struct gdCache_element_s {
	gdCache_element_t	*next;
	void			*userdata;
};

/* head structure */
typedef struct gdCache_head_s gdCache_head_t;
struct gdCache_head_s {
	gdCache_element_t	*mru;
	int					size;
	char				*error;
	gdCacheTestFn_t		gdCacheTest;
	gdCacheFetchFn_t	gdCacheFetch;
	gdCacheReleaseFn_t	gdCacheRelease;
};

/* function templates */
gdCache_head_t *
gdCacheCreate(
	int					size,
	gdCacheTestFn_t		gdCacheTest,
	gdCacheFetchFn_t	gdCacheFetch,
	gdCacheReleaseFn_t	gdCacheRelease );

void
gdCacheDelete( gdCache_head_t *head );

void *
gdCacheGet( gdCache_head_t *head, void *keydata );

redpajama_set_name: RedPajamaGithub


text:
#ifndef SILK_RESAMPLER_STRUCTS_H
#define SILK_RESAMPLER_STRUCTS_H

#ifdef __cplusplus
extern "C" {
#endif

#define SILK_RESAMPLER_MAX_FIR_ORDER                 36
#define SILK_RESAMPLER_MAX_IIR_ORDER                 6

typedef struct _silk_resampler_state_struct {
    opus_int32 sIIR[SILK_RESAMPLER_MAX_IIR_ORDER];
    /* this must be the first element of this struct */
    union {
        opus_int32 i32[SILK_RESAMPLER_MAX_FIR_ORDER];
        opus_int16 i16[SILK_RESAMPLER_MAX_FIR_ORDER];
    } sFIR;
    opus_int16 delayBuf[48];
    opus_int resampler_function;
    opus_int batchSize;
    opus_int32 invRatio_Q16;
    opus_int FIR_Order;
    opus_int FIR_Fracs;
    opus_int Fs_in_kHz;
    opus_int Fs_out_kHz;
    opus_int inputDelay;
    const opus_int16 *Coefs;
} silk_resampler_state_struct;

#ifdef __cplusplus
}
#endif
#endif /* SILK_RESAMPLER_STRUCTS_H */


text:
import React from 'react';
import {
  print,
  graphql as execute,
  GraphQLSchema,
  GraphQLObjectType,
  GraphQLList,
  GraphQLString,
  GraphQLID
} from 'graphql';
import gql from 'graphql-tag';

import { ApolloClient } from '../../../../core';
import { InMemoryCache as Cache } from '../../../../cache';
import { ApolloProvider } from '../../../context';
import { ApolloLink } from '../../../../link/core';
import { Observable } from '../../../../utilities';
import { renderToStringWithData } from '../../../ssr';
import { Query } from '../../Query';

const planetMap = new Map([['Planet:1', { id: 'Planet:1', name: 'Tatooine' }]]);

const shipMap = new Map([
  [
    'Ship:2',
    {
      id: 'Ship:2',
      name: 'CR90 corvette',
      films: ['Film:4', 'Film:6', 'Film:3']
    }
  ],
  [
    'Ship:3',
    {
      id: 'Ship:3',
      name: 'Star Destroyer',
      films: ['Film:4', 'Film:5', 'Film:6']
    }
  ]
]);

const filmMap = new Map([
  ['Film:3', { id: 'Film:3', title: 'Revenge of the Sith' }],
  ['Film:4', { id: 'Film:4', title: 'A New Hope' }],
  ['Film:5', { id: 'Film:5', title: 'the Empire Strikes Back' }],
  ['Film:6', { id: 'Film:6', title: 'Return of the Jedi' }]
]);

const PlanetType = new GraphQLObjectType({
  name: 'Planet',
  fields: {
    id: { type: GraphQLID },
    name: { type: GraphQLString }
  }
});

const FilmType = new GraphQLObjectType({
  name: 'Film',
  fields: {
    id: { type: GraphQLID },
    title: { type: GraphQLString }
  }
});

const ShipType = new GraphQLObjectType({
  name: 'Ship',
  fields: {
    id: { type: GraphQLID },
    name: { type: GraphQLString },
    films: {
      type: new GraphQLList(FilmType),
      resolve: ({ films }) => films.map((id: string) => filmMap.get(id))
    }
  }
});

const QueryType = new GraphQLObjectType({
  name: 'Query',
  fields: {
    allPlanets: {
      type: new GraphQLList(PlanetType),
      resolve: () => Array.from(planetMap.values())
    },
    allShips: {
      type: new GraphQLList(ShipType),
      resolve: () => Array.from(shipMap.values())
    },
    ship: {
      type: ShipType,
      args: { id: { type: GraphQLID } },
      resolve: (_, { id }) => shipMap.get(id)
    },
    film: {
      type: FilmType,
      args: { id: { type: GraphQLID } },
      resolve: (_, { id }) => filmMap.get(id)
    }
  }
});

const Schema = new GraphQLSchema({ query: QueryType });

describe('SSR', () => {
  it('should work with React.createContext', async () => {
    let defaultValue = 'default';
    let Context = React.createContext(defaultValue);
    let providerValue = 'provider';
    expect(
      await renderToStringWithData(
        <React.Fragment>
          <Context.Provider value={providerValue} />
          <Context.Consumer>
            {val => {
              expect(val).toBe(defaultValue);
              return val;
            }}
          </Context.Consumer>
        </React.Fragment>
      )
    ).toBe(defaultValue);
    expect(
      await renderToStringWithData(
        <Context.Provider value={providerValue}>
          <Context.Consumer>
            {val => {
              expect(val).toBe(providerValue);
              return val;
            }}
          </Context.Consumer>
        </Context.Provider>
      )
    ).toBe(providerValue);
    expect(
      await renderToStringWithData(
        <Context.Consumer>
          {val => {
            expect(val).toBe(defaultValue);
            return val;
          }}
        </Context.Consumer>
      )
    ).toBe(defaultValue);
    let ContextForUndefined = React.createContext<void | string>(defaultValue);

    expect(
      await renderToStringWithData(
        <ContextForUndefined.Provider value={undefined}>
          <ContextForUndefined.Consumer>
            {val => {
              expect(val).toBeUndefined();
              return val === undefined ? 'works' : 'broken';
            }}
          </ContextForUndefined.Consumer>
        </ContextForUndefined.Provider>
      )
    ).toBe('works');

    const apolloClient = new ApolloClient({
      link: new ApolloLink(config => {
        return new Observable(observer => {
          execute(
            Schema,
            print(config.query),
            null,
            null,
            config.variables,
            config.operationName
          )
            .then(result => {
              observer.next(result);
              observer.complete();
            })
            .catch(e => {
              observer.error(e);
            });
        });
      }),
      cache: new Cache()
    });

    expect(
      await renderToStringWithData(
        <ApolloProvider client={apolloClient}>
          <Context.Provider value={providerValue}>
            <Query
              query={gql`
                query ShipIds {
                  allShips {
                    id
                  }
                }
              `}
            >
              {() => (
                <Context.Consumer>
                  {val => {
                    expect(val).toBe(providerValue);
                    return val;
                  }}
                </Context.Consumer>
              )}
            </Query>
          </Context.Provider>
        </ApolloProvider>
      )
    ).toBe(providerValue);
  });
});


text:
package com.github.nightawk.mq.kafka;

public class ByteArrayTracingSerializer extends AbstractTracingSerializer<byte[]> {

    @Override
    protected byte[] doSerialize(byte[] data) {
        return data;
    }
}


text:
layout: default
class: Macro
title: indexof ';' STRING (';' LIST )*
summary: The index of the given string in the list, or -1 if not found
---

	static String	_indexof	= "${indexof;<value>;<list>[;<list>...]}";

	public int _indexof(String args[]) throws Exception {
		verifyCommand(args, _indexof, null, 3, Integer.MAX_VALUE);

		String value = args[1];
		ExtList<String> list = toList(args, 2, args.length);
		return list.indexOf(value);
	}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace Open_School_Library.Models.SettingViewModel
{
    public class SettingIndexViewModel
    {
        public int SettingID { get; set; }
        [Display(Name = "Enable Fines?")]
        public bool AreFinesEnabled { get; set; }
        [Display(Name ="Fine Ammount Per Day")]
        public decimal? FineAmountPerDay { get; set; }
        [Display(Name = "Checkout Duration in Days")]
        public int CheckoutDurationInDays { get; set; }
    }
}


text:
<archimate:BusinessObject
    xmlns:archimate="http://www.archimatetool.com/archimate"
    name="Using UML to Develop Verifiable Reactive Systems."
    id="id-8bd76f9c34c6455797b5b10f61c8c85a"
    documentation="https://rebeca-lang.org/assets/papers/2006/Using-UML-to-Develop-Verifiable-Reactive-Systems.pdf"/>


text:
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is Mozilla code.
 *
 * The Initial Developer of the Original Code is the Mozilla Corporation.
 * Portions created by the Initial Developer are Copyright (C) 2010
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *    Vladimir Vukicevic <vladimir@pobox.com>
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */
#if !defined(nsHTMLCanvasElement_h__)
#define nsHTMLCanvasElement_h__

#include "nsIDOMHTMLCanvasElement.h"
#include "nsGenericHTMLElement.h"
#include "nsGkAtoms.h"
#include "nsSize.h"
#include "nsIFrame.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsDOMError.h"
#include "nsNodeInfoManager.h"

#include "nsICanvasRenderingContextInternal.h"
#include "nsICanvasElementExternal.h"
#include "nsIDOMCanvasRenderingContext2D.h"
#include "nsLayoutUtils.h"

#include "Layers.h"

class nsIDOMFile;

class nsHTMLCanvasElement : public nsGenericHTMLElement,
                            public nsICanvasElementExternal,
                            public nsIDOMHTMLCanvasElement
{
  typedef mozilla::layers::CanvasLayer CanvasLayer;
  typedef mozilla::layers::LayerManager LayerManager;

public:
  nsHTMLCanvasElement(already_AddRefed<nsINodeInfo> aNodeInfo);
  virtual ~nsHTMLCanvasElement();

  static nsHTMLCanvasElement* FromContent(nsIContent* aPossibleCanvas)
  {
    if (!aPossibleCanvas || !aPossibleCanvas->IsHTML(nsGkAtoms::canvas)) {
      return nsnull;
    }
    return static_cast<nsHTMLCanvasElement*>(aPossibleCanvas);
  }
  // nsISupports
  NS_DECL_ISUPPORTS_INHERITED

  // nsIDOMNode
  NS_FORWARD_NSIDOMNODE(nsGenericHTMLElement::)

  // nsIDOMElement
  NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLElement::)

  // nsIDOMHTMLElement
  NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLElement::)

  // nsIDOMHTMLCanvasElement
  NS_DECL_NSIDOMHTMLCANVASELEMENT

  // CC
  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsHTMLCanvasElement,
                                           nsGenericHTMLElement)

  /**
   * Ask the canvas Element to return the primary frame, if any
   */
  nsIFrame *GetPrimaryCanvasFrame();

  /**
   * Get the size in pixels of this canvas element
   */
  nsIntSize GetSize();

  /**
   * Determine whether the canvas is write-only.
   */
  bool IsWriteOnly();

  /**
   * Force the canvas to be write-only.
   */
  void SetWriteOnly();

  /**
   * Notify that some canvas content has changed and the window may
   * need to be updated. aDamageRect is in canvas coordinates.
   */
  void InvalidateCanvasContent(const gfxRect* aDamageRect);
  /*
   * Notify that we need to repaint the entire canvas, including updating of
   * the layer tree.
   */
  void InvalidateCanvas();

  /*
   * Get the number of contexts in this canvas, and request a context at
   * an index.
   */
  PRInt32 CountContexts ();
  nsICanvasRenderingContextInternal *GetContextAtIndex (PRInt32 index);

  /*
   * Returns true if the canvas context content is guaranteed to be opaque
   * across its entire area.
   */
  bool GetIsOpaque();

  /*
   * nsICanvasElementExternal -- for use outside of content/layout
   */
  NS_IMETHOD_(nsIntSize) GetSizeExternal();
  NS_IMETHOD RenderContextsExternal(gfxContext *aContext, gfxPattern::GraphicsFilter aFilter);

  virtual bool ParseAttribute(PRInt32 aNamespaceID,
                                nsIAtom* aAttribute,
                                const nsAString& aValue,
                                nsAttrValue& aResult);
  nsChangeHint GetAttributeChangeHint(const nsIAtom* aAttribute, PRInt32 aModType) const;

  // SetAttr override.  C++ is stupid, so have to override both
  // overloaded methods.
  nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
                   const nsAString& aValue, bool aNotify)
  {
    return SetAttr(aNameSpaceID, aName, nsnull, aValue, aNotify);
  }
  virtual nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
                           nsIAtom* aPrefix, const nsAString& aValue,
                           bool aNotify);
  virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
  nsresult CopyInnerTo(nsGenericElement* aDest) const;

  /*
   * Helpers called by various users of Canvas
   */

  already_AddRefed<CanvasLayer> GetCanvasLayer(nsDisplayListBuilder* aBuilder,
                                               CanvasLayer *aOldLayer,
                                               LayerManager *aManager);
  // Should return true if the canvas layer should always be marked inactive.
  // We should return true here if we can't do accelerated compositing with
  // a non-BasicCanvasLayer.
  bool ShouldForceInactiveLayer(LayerManager *aManager);

  // Call this whenever we need future changes to the canvas
  // to trigger fresh invalidation requests. This needs to be called
  // whenever we render the canvas contents to the screen, or whenever we
  // take a snapshot of the canvas that needs to be "live" (e.g. -moz-element).
  void MarkContextClean();

  virtual nsXPCClassInfo* GetClassInfo();
protected:
  nsIntSize GetWidthHeight();

  nsresult UpdateContext(nsIPropertyBag *aNewContextOptions = nsnull);
  nsresult ExtractData(const nsAString& aType,
                       const nsAString& aOptions,
                       nsIInputStream** aStream,
                       bool& aFellBackToPNG);
  nsresult ToDataURLImpl(const nsAString& aMimeType,
                         nsIVariant* aEncoderOptions,
                         nsAString& aDataURL);
  nsresult MozGetAsFileImpl(const nsAString& aName,
                            const nsAString& aType,
                            nsIDOMFile** aResult);
  nsresult GetContextHelper(const nsAString& aContextId,
                            bool aForceThebes,
                            nsICanvasRenderingContextInternal **aContext);

  nsString mCurrentContextId;
  nsCOMPtr<nsICanvasRenderingContextInternal> mCurrentContext;

public:
  // Record whether this canvas should be write-only or not.
  // We set this when script paints an image from a different origin.
  // We also transitively set it when script paints a canvas which
  // is itself write-only.
  bool                     mWriteOnly;
};

#endif /* nsHTMLCanvasElement_h__ */


text:
<?php
$text=file_get_contents('php://input');
if ($text!="") {
  file_put_contents('allnotes.json', $text);
  header("Cache-Control: no-cache, must-revalidate");
  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
  header("Content-Type: application/json; charset=utf-8");
  echo($text);
}
?>


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Class Hierarchy (realm 0.79.1 API)</title>
<meta name="date" content="2015-02-20">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Hierarchy For All Packages

Package Hierarchies:

io.realm,

io.realm.annotations,

io.realm.exceptions

Class Hierarchy

java.lang.Object

java.util.AbstractCollection<E> (implements java.util.Collection<E>)

java.util.AbstractList<E> (implements java.util.List<E>)

io.realm.RealmList<E>

io.realm.RealmResults<E>

android.widget.BaseAdapter (implements android.widget.ListAdapter, android.widget.SpinnerAdapter)

io.realm.RealmBaseAdapter<T>

io.realm.Realm (implements java.io.Closeable)

io.realm.RealmObject

io.realm.RealmQuery<E>

java.lang.Throwable (implements java.io.Serializable)

java.lang.Exception

java.lang.RuntimeException

io.realm.exceptions.RealmException

io.realm.exceptions.RealmIOException

io.realm.exceptions.RealmMigrationNeededException

Interface Hierarchy

io.realm.Realm.Transaction

io.realm.RealmChangeListener

io.realm.RealmMigration

Annotation Type Hierarchy

io.realm.annotations.Ignore (implements java.lang.annotation.Annotation)

io.realm.annotations.Index (implements java.lang.annotation.Annotation)

io.realm.annotations.PrimaryKey (implements java.lang.annotation.Annotation)

io.realm.annotations.RealmClass (implements java.lang.annotation.Annotation)

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
{% extends "base.html" %}

{% block navbar-items %}

Environments

Groups

Builds

{% endblock %}

{% block navbar-search %}
<form class="navbar-form navbar-left" role="search">

            <input id="groupSearchInputId" type="text" class="form-control" placeholder="Search groups...">

</form>

{% endblock %}

{% block side-panel %}

Groups

{% endblock %}


text:
/*!
 * Buttons helper for fancyBox
 * version: 1.0.2
 * @requires fancyBox v2.0 or later
 *
 * Usage:
 *     $(".fancybox").fancybox({
 *         buttons: {
 *             position : 'top'
 *         }
 *     });
 *
 * Options:
 *     tpl - HTML template
 *     position - 'top' or 'bottom'
 *
 */
(function ($) {
	//Shortcut for fancyBox object
	var F = $.fancybox;

	//Add helper object
	F.helpers.buttons = {
		tpl: '

',
		list: null,
		buttons: {},

		update: function () {
			var toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');

			//Size toggle button
			if (F.current.canShrink) {
				toggle.addClass('btnToggleOn');

			} else if (!F.current.canExpand) {
				toggle.addClass('btnDisabled');
			}
		},

		beforeLoad: function (opts) {
			//Remove self if gallery do not have at least two items
			if (F.group.length < 2) {
				F.coming.helpers.buttons = false;
				F.coming.closeBtn = true;

				return;
			}

			//Increase top margin to give space for buttons
			F.coming.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
		},

		onPlayStart: function () {
			if (this.list) {
				this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
			}
		},

		onPlayEnd: function () {
			if (this.list) {
				this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
			}
		},

		afterShow: function (opts) {
			var buttons;

			if (!this.list) {
				this.list = $(opts.tpl || this.tpl).addClass(opts.position || 'top').appendTo('body');

				this.buttons = {
					prev : this.list.find('.btnPrev').click( F.prev ),
					next : this.list.find('.btnNext').click( F.next ),
					play : this.list.find('.btnPlay').click( F.play ),
					toggle : this.list.find('.btnToggle').click( F.toggle )
				}
			}

			buttons = this.buttons;

			//Prev
			if (F.current.index > 0 || F.current.loop) {
				buttons.prev.removeClass('btnDisabled');
			} else {
				buttons.prev.addClass('btnDisabled');
			}

			//Next / Play
			if (F.current.loop || F.current.index < F.group.length - 1) {
				buttons.next.removeClass('btnDisabled');
				buttons.play.removeClass('btnDisabled');

			} else {
				buttons.next.addClass('btnDisabled');
				buttons.play.addClass('btnDisabled');
			}

			this.update();
		},

		onUpdate: function () {
			this.update();
		},

		beforeClose: function () {
			if (this.list) {
				this.list.remove();
			}

			this.list = null;
			this.buttons = {};
		}
	};

}(jQuery));


text:
<?php

namespace app\models;

use Yii;

//state is boolean value witch define book status (true = hire)
/**
 * This is the model class for table "piece".
 *
 * @property integer $id
 * @property string $date_release
 * @property integer $book_id
 * @property boolean $state
 *
 * @property Book $book
 */
class Piece extends \yii\db\ActiveRecord
{
     /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'piece';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['date_release'], 'safe'],

            [['book_id'], 'integer'],
            [['book_id'], 'exist', 'skipOnError' => true, 'targetClass' => Book::className(), 'targetAttribute' => ['book_id' => 'id']],
            [['user_ids'], 'each', 'rule' => ['integer']],
            [['state'], 'boolean'],

        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'date_release' => Yii::t('app', 'Date Release'),
            'book_id' => Yii::t('app', 'Book'),
            'user_ids' => Yii::t('app', 'User'),

        ];
    }

    public function behaviors()
    {
        return [
        [
            'class' => \voskobovich\behaviors\ManyToManyBehavior::className(),
            'relations' => [
                'user_ids' => 'users',

            ],
        ],
        ];
    }

    public function beforeSave($insert)
     {
        $this->date_release = Yii::$app->formatter->asDate($this->date_release, 'yyyy-MM-dd');
        parent::beforeSave($insert);
        return true;
     }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getBook()
    {
        return $this->hasOne(Book::className(), ['id' => 'book_id']);
    }

    public function getReservations()
    {
        return $this->hasMany(Reservation::className(), ['piece_id' => 'id']);
    }

    public function getUsers()
    {
        return $this->hasMany(User::className(), ['id' => 'user_id'])->viaTable('reservation', ['piece_id' => 'id']);

    }

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Aspicilia calcarea var. microspora Arnold

### Remarks
null


text:
{% if article.share_post and article.status != 'draft' %}

	Share on:
	Twitter
	❄
	Facebook
	❄
	Google+
	❄
	Email

{% endif %}


text:
import * as _ from 'lodash'
import {Component} from 'angular2/core'
import {RouteParams} from 'angular2/router'
import {Observable} from 'rxjs/Observable'

import {BackButton} from 'shared/directives/BackButton'
import {SprintDocuments} from 'shared/services/SprintDocuments'
import {Sprints} from 'shared/services/Sprints'
import {ISprintData} from 'shared/reducers/sprint'
import {isSprintStartDate, getCards} from 'shared/helpers/sprint'
import {isToday} from 'shared/helpers/dates'
import {MomentPipe} from 'shared/pipes/MomentPipe'

import {SprintCardList} from './components/SprintCardList'

@Component({
  selector: 'sprint',
  template: require('./Sprint.jade')(),
  styles: [require('./Sprint.scss')],
  directives: [BackButton, SprintCardList],
  providers: [Sprints, SprintDocuments],
  pipes: [MomentPipe]
})
export class SprintComponent {
  public sprint: any = {}
  public lists: any = {}
  public completeCards: any[] = []
  public devCompleteCards: any[] = []
  public inProgressCards: any[] = []
  public unstartedCards: any[] = []
  public isCalculating: boolean = false
  public devCompletePoints: number = 0
  public completePoints: number = 0
  public inProgressPoints: number = 0
  public unstartedPoints: number = 0
  public sprintEstimates: Observable<string>
  public shouldShowEstimates: Observable<boolean>
  private _sprintId: number

  constructor(public sprints: Sprints, private _params: RouteParams, private _sprintDocuments: SprintDocuments) {
    this._sprintId = +_params.get('id')

    let sprint = sprints.items
      .map((items) => this._filterCurrentSprint(items))
      .map(_.first)
      .filter(item => !!item)
      .distinctUntilChanged()

    this.shouldShowEstimates = sprint
      .map((iSprint: ISprintData) => this._shouldShowEstimate(iSprint))

    this.sprintEstimates = sprint
      .filter((iSprint: ISprintData) => this._shouldShowEstimate(iSprint))
      .map((data: ISprintData) => this._createEstimatesBlob(data))

      sprint.subscribe((data: ISprintData) => {
        Object.assign(this, data)

        if (data.sprint.board)
          this._splitListIntoCards(data.sprint.board.lists)
      })

    this.sprints.find(this._sprintId)
  }

  private _splitListIntoCards(lists: any): void {
    if (!lists)
      return

    this.completeCards = getCards(lists.complete)
    this.unstartedCards = getCards(lists.unstarted)
    this.devCompleteCards = getCards(lists.devComplete)
    this.inProgressCards = getCards(lists.inProgress)
  }

  private _createEstimatesBlob(data: ISprintData): string {
    const {sprint} = data,
          sprintCSV = this._sprintDocuments.createEstimatesForBoard(sprint.board)

    return window.URL.createObjectURL(new File([sprintCSV], sprint.name, {type: 'text/csv'}))
  }

  private _shouldShowEstimate(data: ISprintData): boolean {
    const {sprint} = data

    if (sprint.board)
      return isToday(sprint.created)   ||
             isSprintStartDate(sprint) ||
             !this.inProgressPoints    &&
             !this.devCompletePoints   &&
             !!this.unstartedPoints
    else
      return false
  }

  private _filterCurrentSprint(items: ISprintData[]): ISprintData[] {
    return items
      .filter(({sprint}: ISprintData) => sprint && sprint.id === this._sprintId)
  }
}


text:
<link rel="import" href="../../bower_components/polymer/polymer-element.html">
<link rel="import" href="../../bower_components/vaadin-material-theme/vaadin-combo-box.html">
<link rel="import" href="../view-app.html">
<link rel="import" href="../style/shared-styles.html">
<link rel="import" href="redux-mixin.html">

<dom-module id="view-setup-station">
    <template>

        <firebase-auth app-name="smart-mes" id="auth" user="{{user}}"></firebase-auth>
        <firebase-document app-name="smart-mes" id="userData" path="/user/[[user.uid]]" data="{{k}}"></firebase-document>
        <firebase-query app-name="smart-mes" id="stationQuery" path="/data/[[k.key]]/factoryData/station" data="{{stationItems}}"
            order-by-child="st_number"></firebase-query>
        <firebase-query app-name="smart-mes" id="machineQuery" path="/data/[[k.key]]/factoryData/machine" data="{{machineItems}}"
            order-by-child="name"></firebase-query>
        <firebase-document app-name="smart-mes" id="editStationQuery" path="/data/[[k.key]]/factoryData/station/[[editKey]]" data="{{editStationItems}}"></firebase-document>
        <app-localstorage-document key="app-lang" data="{{language}}"></app-localstorage-document>

{{localize('add-station')}}

            <paper-input type="number" id="stationNumber" name="station-number" label="{{localize('station-number')}}" value="[[getStationNumber(stationItems.length)]]"
                min="1" max="999" readonly required always-float-label></paper-input>
            <paper-input type="text" id="stationName" name="station-name" label="{{localize('station-name')}}" required error-message="Invalid Input"
                always-float-label></paper-input>
            <vaadin-combo-box label="Machine" id="machineSelector" items="[[machineItems]]" name="stationName" item-label-path="name"
                item-value-path="name" loading="[[!machineItems]]" required always-float-label>
                <template>
                    <paper-item>
                        <paper-item-body two-line style="min-height: 0">

[[item.name]]

Type [[item.type]] / No. [[item.number]]

                        </paper-item-body>
                    </paper-item>
                </template>
            </vaadin-combo-box>

You added [[stationMachineCount]] / [[stationMaxMachine]] {{localize('machine')}}

            <flat-button class="add-btn" on-click="addMachine">
                <button>{{localize('add-machine')}}</button>
            </flat-button>

                    <template is="dom-repeat" items="{{machines}}" as="machineItem">

[[machineItem.name]]

                    </template>

                <flat-button class="btn" on-click="openStationMainCard">
                    <button>{{localize('dismiss')}}</button>
                </flat-button>
                <flat-button class="btn shamrock" on-click="addStation">
                    <button>{{localize('add')}}</button>
                </flat-button>

{{localize('edit-station')}}

            <paper-input type="number" id="edit_stationNumber" name="station number" label="{{localize('station-number')}}" value="{{editStationItems.st_number}}"
                min="1" max="999" readonly required always-float-label></paper-input>
            <paper-input type="text" id="edit_stationName" name="station name" label="{{localize('station-name')}}" value="[[editStationItems.st_name]]"
                required error-message="Invalid Input" always-float-label></paper-input>
            <vaadin-combo-box label="Machine" id="edit_machineSelector" items="[[machineItems]]" name="machine station" item-label-path="name"
                item-value-path="name" loading="[[!machineItems]]" required always-float-label>
                <template>
                    <paper-item>
                        <paper-item-body>

[[item.name]]

                        </paper-item-body>
                    </paper-item>
                </template>
            </vaadin-combo-box>

You added [[stationEditMachineCount]] / [[stationMaxMachine]] {{localize('machine')}}

            <flat-button class="add-btn" on-click="editAddMachine">
                <button>{{localize('add-machine')}}</button>
            </flat-button>

                    <template is="dom-repeat" items="{{editMachines}}" as="machineItem">

[[machineItem.name]]

                    </template>

                <flat-button class="btn" on-click="dismissEditStation">
                    <button>{{localize('dismiss')}}</button>
                </flat-button>
                <flat-button class="btn shamrock" on-click="saveStation">
                    <button>{{localize('save')}}</button>
                </flat-button>

{{localize('station-management')}}

{{localize('please-add-machine-before-adding-station')}}

                <template is="dom-repeat" index-as="number" items="{{stationItems}}"
                    as="stationItem">

[[stationItem.st_name]]

{{localize('station-number')}}: [[stationItem.st_number]]

{{localize('station-machine')}}: [[stationItem.st_machine.length]] / [[stationMaxMachine]]

                                        <iron-list items="[[stationItem.st_machine]]" as="machineItem">
                                            <template>

[[machineItem.name]]

{{localize('type')}}: [[machineItem.code]]

                                            </template>
                                        </iron-list>

                            <flat-button class="btn btn-block" on-click="openEditStationCard" station="[[stationItem]]">
                                <button>{{localize('edit')}}</button>
                            </flat-button>
                            <flat-button class="btn btn-block thunderbird" on-click="removeStation" station="[[stationItem]]">
                                <button>{{localize('remove')}}</button>
                            </flat-button>

                </template>

                <paper-button class="btn" on-click="openAddStationCard">{{localize('add-station')}}</paper-button>

        <paper-toast id="toastAlert" always-on-top horizontal-align="right">{{localize(toastText)}}</paper-toast>
    </template>

</dom-module>


text:
<tdm-markdown-view [markdown]="code | async | tdmCode:[{file: 'README.md', section: 'part1'}]:true"></tdm-markdown-view>

<form-wrapper title="Local Custom Template"
              [code]="code | async | tdmCode:[{title: 'Component', section: 'tdmModel'}, {title: 'Template', section: 'tdmModel'}, {title: 'Model'}]">

  <dynamic-form #dynFormMaster [model]="model">

    <ng-container *dynamicFormOverride="'*'; let ctx; vType: ['boolean', 'slideToggle']">
      <dynamic-form-row [fromContext]="ctx" custom>
        <mat-button-toggle-group [formControl]="ctx.fControl">
          <mat-button-toggle [value]="true">YES</mat-button-toggle>
          <mat-button-toggle [value]="false">NO</mat-button-toggle>
        </mat-button-toggle-group>
      </dynamic-form-row>
    </ng-container>

    <ng-container *dynamicFormOverride="'name'; let ctx">
      <dynamic-form-row [fromContext]="ctx" custom>
        <mat-form-field>
          <input type="text" matInput [formControl]="ctx.fControl" [matAutocomplete]="auto">
        </mat-form-field>

        <mat-autocomplete #auto="matAutocomplete">
          <mat-option value="batman">Bat Man</mat-option>
          <mat-option value="superman">Super Man</mat-option>
          <mat-option value="spiderman">Spider Man</mat-option>
          <mat-option value="thor">Thor</mat-option>
          <mat-option value="wonderwomen">Wonder Women</mat-option>
          <mat-option value="captainamerica">Captain America</mat-option>
        </mat-autocomplete>
      </dynamic-form-row>
    </ng-container>

  </dynamic-form>

</form-wrapper>

<tdm-markdown-view [markdown]="code | async | tdmCode:[{file: 'README.md', section: 'part2'}]:true"></tdm-markdown-view>

<form-wrapper title="Programmatic Override"
              [code]="code | async | tdmCode:[{title: 'Component', section: 'tdmModel2'}, {title: 'Template', section: 'tdmModel2'}, {title: 'Model'}]">

  <dynamic-form #dynFormCustomOverride [slaveOf]="dynFormMaster"></dynamic-form>
  <ng-template #defaultFieldOverrideTpl let-ctx>

      {{ctx.item.label}}
      {{ctx.tdmForm.getValue(ctx.item.getRuntimePath(ctx.fControl)) || 'Not Set'}}

  </ng-template>

</form-wrapper>

<tdm-markdown-view [markdown]="code | async | tdmCode:[{file: 'README.md', section: 'part3'}]:true"></tdm-markdown-view>


text:
<?php

namespace RealEstate;

/**
 * Class OverigOGObject
 *
 * @package RealEstate
 * @author Jordi Jolink <mail@jordijolink.nl>
 */
class OverigOGObject
{
    /**
     * @var array of strings
     */
    public $Voorzieningen = [];

    /**
     * @var int|null
     */
    public $Capaciteit;

    /**
     * @var int|null
     */
    public $Afmetingen;

    /**
     * @var array of strings
     */
    public $Isolatievormen = [];

    /**
     * @var string (max 2.000 characters)
     */
    public $Toelichting;

    /**
     * @var string Not in the XML but added manually by the parser
     */
    public $Type;
}


text:
using BDSA2017.Lecture09.MVVM.ViewModels;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238

namespace BDSA2017.Lecture09.MVVM.Views
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class ContactsPage : Page
    {
        private readonly ContactsPageViewModel _vm;

        public ContactsPage()
        {
            InitializeComponent();

            _vm = new ContactsPageViewModel
            {
                NewCommand = new RelayCommand(o => Frame.Navigate(typeof(CreateContactPage)))
            };

            DataContext = _vm;
        }

        private void GridView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var grid = sender as GridView;

            _vm.Contacts.Remove(grid.SelectedItem as ContactPageViewModel);
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var rootFrame = Window.Current.Content as Frame;

            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = rootFrame.CanGoBack
                ? AppViewBackButtonVisibility.Visible
                : AppViewBackButtonVisibility.Collapsed;
        }
    }
}


text:
package de.appplant.cordova.plugin.badge;

import android.content.Context;

import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.json.JSONArray;
import org.json.JSONException;

public class Badge extends CordovaPlugin {

    /**
     * Implementation of the badge interface methods.
     */
    private final BadgeImpl badgeImpl = new BadgeImpl();

    /**
     * Executes the request.
     *
     * @param action   The action to execute.
     * @param args     The exec() arguments.
     * @param callback The callback context used when
     *                 calling back into JavaScript.
     *
     * @return
     *      Returning false results in a "MethodNotFound" error.
     *
     * @throws JSONException
     */
    @Override
    public boolean execute (String action, JSONArray args, CallbackContext callback)
            throws JSONException {

        if (action.equalsIgnoreCase("clearBadge")) {
            clearBadge(callback);
            return true;
        }

        if (action.equalsIgnoreCase("getBadge")) {
            getBadge(callback);
            return true;
        }

        if (action.equalsIgnoreCase("hasPermission")) {
            hasPermission(callback);
            return true;
        }

        if (action.equalsIgnoreCase("registerPermission")) {
            hasPermission(callback);
            return true;
        }

        if (action.equalsIgnoreCase("setBadge")) {
            setBadge(args, callback);
            return true;
        }

        return false;
    }

    /**
     * Clears the badge of the app icon.
     *
     * @param callback
     *      The function to be exec as the callback
     */
    private void clearBadge (final CallbackContext callback) {
        cordova.getThreadPool().execute(new Runnable() {
            @Override
            public void run() {
                badgeImpl.clearBadge(getContext());
                badgeImpl.getBadge(callback, getContext());
            }
        });
    }

    /**
     * Retrieves the badge of the app icon.
     *
     * @param callback
     *      The function to be exec as the callback
     */
    private void getBadge (final CallbackContext callback) {
        cordova.getThreadPool().execute(new Runnable() {
            @Override
            public void run() {
                badgeImpl.getBadge(callback, getContext());
            }
        });
    }

    /**
     * Informs if the app has the permission to show badges.
     *
     * @param callback
     *      The function to be exec as the callback
     */
    private void hasPermission (final CallbackContext callback) {
        cordova.getThreadPool().execute(new Runnable() {
            @Override
            public void run() {
                badgeImpl.hasPermission(callback);
            }
        });
    }

    /**
     * Sets the badge of the app icon.
     *
     * @param args
     *      The new badge number
     * @param callback
     *      The function to be exec as the callback
     */
    private void setBadge (final JSONArray args,
                           final CallbackContext callback) {

        cordova.getThreadPool().execute(new Runnable() {
            @Override
            public void run() {
                badgeImpl.clearBadge(getContext());
                badgeImpl.setBadge(args, getContext());
                badgeImpl.getBadge(callback, getContext());
            }
        });
    }

    /**
     * Returns the context of the activity.
     */
    private Context getContext () {
        return cordova.getActivity();
    }

}


text:
package com.github.mlk.queue.codex;

import com.github.mlk.queue.CodexException;
import com.github.mlk.queue.Decoder;

import java.io.UnsupportedEncodingException;
import java.lang.reflect.Type;

/** Can only handle strings in UTF-8. */
public class StringDecoder implements Decoder {
    @Override
    public Object decode(byte[] array, Type type) throws CodexException {
        try {
            return new String(array, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new CodexException("UTF-8 does not exist!", e, array);
        }
    }

    @Override
    public boolean canHandle(Class<?> clazz) {
        return clazz.equals(String.class);
    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>SAS Table Editor</title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="stylesheet" href="bower_components/angular-material/angular-material.css">
  <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.css">
  <link rel="stylesheet" media="screen" href="bower_components/handsontable/dist/handsontable.full.css">
  <link rel="stylesheet" href="bootstrap_alerts.css">
  <link rel="stylesheet" href="bower_components/ngToast/dist/ngToast.min.css">
  <link rel="stylesheet" href="bower_components/ngToast/dist/ngToast-animations.min.css">
  <link rel="stylesheet" href="tour/style.css">
  <link rel="stylesheet" href="style.css">

  <toast></toast>

    <ng-include src="'navbar/navbar.html'"></ng-include>

  <ng-include src="'debugWindow/debugWindow.html'"></ng-include>


text:
from email.Utils import make_msgid, formatdate, formataddr, parseaddr, getaddresses
from email.MIMEText import MIMEText
from email.MIMEMessage import MIMEMessage
from email.MIMEMultipart import MIMEMultipart
from email.header import Header
from email import message_from_string
from email import charset as Charset

import smtplib
from django.conf import settings
from django.contrib import messages
from django.core.exceptions import ImproperlyConfigured
from django.template.loader import render_to_string
from django.template import Context,RequestContext
import ietf
from ietf.utils.log import log
import sys
import time
import copy
import textwrap
import traceback
import datetime

# Testing mode:
# import ietf.utils.mail
# ietf.utils.mail.test_mode = True
# ... send some mail ...
# ... inspect ietf.utils.mail.outbox ...
# ... call ietf.utils.mail.empty_outbox() ...
test_mode = False
outbox = []

SMTP_ADDR = { 'ip4':settings.EMAIL_HOST, 'port':settings.EMAIL_PORT}

# Don't BASE64-encode UTF-8 messages so that we avoid unwanted attention from
# some spam filters.
Charset.add_charset('utf-8', Charset.SHORTEST, None, 'utf-8')

def empty_outbox():
    outbox[:] = []

def add_headers(msg):
    if not(msg.has_key('Message-ID')):
	msg['Message-ID'] = make_msgid('idtracker')
    if not(msg.has_key('Date')):
	msg['Date'] = formatdate(time.time(), True)
    if not(msg.has_key('From')):
	msg['From'] = settings.DEFAULT_FROM_EMAIL
    return msg

class SMTPSomeRefusedRecipients(smtplib.SMTPException):

    def __init__(self, message, original_msg, refusals):
        smtplib.SMTPException.__init__(self, message)
        self.original_msg = original_msg
        self.refusals = refusals

    def detailed_refusals(self):
        details = "The following recipients were refused:\n"
        for recipient in self.refusals:
             details += "\n%s: %s" % (recipient,self.refusals[recipient])
        return details

    def summary_refusals(self):
        return ", ".join(["%s (%s)"%(x,self.refusals[x][0]) for x in self.refusals])

def send_smtp(msg, bcc=None):
    '''
    Send a Message via SMTP, based on the django email server settings.
    The destination list will be taken from the To:/Cc: headers in the
    Message.  The From address will be used if present or will default
    to the django setting DEFAULT_FROM_EMAIL

    If someone has set test_mode=True, then append the msg to
    the outbox.
    '''
    add_headers(msg)
    (fname, frm) = parseaddr(msg.get('From'))
    addrlist = msg.get_all('To') + msg.get_all('Cc', [])
    if bcc:
        addrlist += [bcc]
    to = [addr for name, addr in getaddresses(addrlist) if ( addr != '' and not addr.startswith('unknown-email-') )]
    if not to:
        log("No addressees for email from '%s', subject '%s'.  Nothing sent." % (frm, msg.get('Subject', '[no subject]')))
    else:
        if test_mode:
            outbox.append(msg)
        server = None
        try:
            server = smtplib.SMTP()
            #log("SMTP server: %s" % repr(server))
            #if settings.DEBUG:
            #    server.set_debuglevel(1)
            conn_code, conn_msg = server.connect(SMTP_ADDR['ip4'], SMTP_ADDR['port'])
            #log("SMTP connect: code: %s; msg: %s" % (conn_code, conn_msg))
            if settings.EMAIL_HOST_USER and settings.EMAIL_HOST_PASSWORD:
                server.ehlo()
                if 'starttls' not in server.esmtp_features:
                    raise ImproperlyConfigured('password configured but starttls not supported')
                (retval, retmsg) = server.starttls()
                if retval != 220:
                    raise ImproperlyConfigured('password configured but tls failed: %d %s' % ( retval, retmsg ))
                # Send a new EHLO, since without TLS the server might not
                # advertise the AUTH capability.
                server.ehlo()
                server.login(settings.EMAIL_HOST_USER, settings.EMAIL_HOST_PASSWORD)
            unhandled = server.sendmail(frm, to, msg.as_string())
            if unhandled != {}:
                raise SMTPSomeRefusedRecipients(message="%d addresses were refused"%len(unhandled),original_msg=msg,refusals=unhandled)
        except Exception as e:
            # need to improve log message
            log("Exception while trying to send email from '%s' to %s subject '%s'" % (frm, to, msg.get('Subject', '[no subject]')))
            if isinstance(e, smtplib.SMTPException):
                e.original_msg=msg
                raise
            else:
                raise smtplib.SMTPException({'really': sys.exc_info()[0], 'value': sys.exc_info()[1], 'tb': traceback.format_tb(sys.exc_info()[2])})
        finally:
            try:
                server.quit()
            except smtplib.SMTPServerDisconnected:
                pass
        log("sent email from '%s' to %s subject '%s'" % (frm, to, msg.get('Subject', '[no subject]')))

def copy_email(msg, to, toUser=False, originalBcc=None):
    '''
    Send a copy of the given email message to the given recipient.
    '''
    add_headers(msg)
    new = MIMEMultipart()
    # get info for first part.
    # Mode: if it's production, then "copy of a message", otherwise
    #  "this is a message that would have been sent from"
    # hostname?
    # django settings if debugging?
    # Should this be a template?
    if settings.SERVER_MODE == 'production':
	explanation = "This is a copy of a message sent from the I-D tracker."
    elif settings.SERVER_MODE == 'test' and toUser:
	explanation = "The attached message was generated by an instance of the tracker\nin test mode.  It is being sent to you because you, or someone acting\non your behalf, is testing the system.  If you do not recognize\nthis action, please accept our apologies and do not be concerned as\nthe action is being taken in a test context."
    else:
	explanation = "The attached message would have been sent, but the tracker is in %s mode.\nIt was not sent to anybody." % settings.SERVER_MODE
        if originalBcc:
          explanation += ("\nIn addition to the destinations derived from the header below, the message would have been sent Bcc to %s" % originalBcc)
    new.attach(MIMEText(explanation + "\n\n"))
    new.attach(MIMEMessage(msg))
    # Overwrite the From: header, so that the copy from a development or
    # test server doesn't look like spam.
    new['From'] = settings.DEFAULT_FROM_EMAIL
    new['Subject'] = '[Django %s] %s' % (settings.SERVER_MODE, msg.get('Subject', '[no subject]'))
    new['To'] = to
    send_smtp(new)

def mail_context(request):
    if request:
        return RequestContext(request)
    else:
        return Context()

def send_mail_subj(request, to, frm, stemplate, template, context, *args, **kwargs):
    '''
    Send an email message, exactly as send_mail(), but the
    subject field is a template.
    '''
    subject = render_to_string(stemplate, context, context_instance=mail_context(request)).replace("\n"," ").strip()
    return send_mail(request, to, frm, subject, template, context, *args, **kwargs)

def send_mail(request, to, frm, subject, template, context, *args, **kwargs):
    '''
    Send an email to the destination [list], with the given return
    address (or "None" to use the default in settings.py).
    The body is a text/plain rendering of the template with the context.
    extra is a dict of extra headers to add.
    '''
    txt = render_to_string(template, context, context_instance=mail_context(request))
    return send_mail_text(request, to, frm, subject, txt, *args, **kwargs)

def encode_message(txt):
    if isinstance(txt, unicode):
        msg = MIMEText(txt.encode('utf-8'), 'plain', 'UTF-8')
    else:
        msg = MIMEText(txt)
    return msg

def send_mail_text(request, to, frm, subject, txt, cc=None, extra=None, toUser=False, bcc=None):
    """Send plain text message."""
    msg = encode_message(txt)
    send_mail_mime(request, to, frm, subject, msg, cc, extra, toUser, bcc)

def condition_message(to, frm, subject, msg, cc, extra):
    if isinstance(frm, tuple):
	frm = formataddr(frm)
    if isinstance(to, list) or isinstance(to, tuple):
        to = ", ".join([isinstance(addr, tuple) and formataddr(addr) or addr for addr in to if addr])
    if isinstance(cc, list) or isinstance(cc, tuple):
        cc = ", ".join([isinstance(addr, tuple) and formataddr(addr) or addr for addr in cc if addr])
    if frm:
	msg['From'] = frm

    # The following is a hack to avoid an issue with how the email module (as of version 4.0.3)
    # breaks lines when encoding header fields with anything other than the us-ascii codec.
    # This allows the Header implementation to encode each display name as a separate chunk.
    # The resulting encode produces a string that is us-ascii and has a good density of
    # "higher-level syntactic breaks"
    to_hdr = Header(header_name='To')
    for name, addr in getaddresses([to]):
        if addr != '' and not addr.startswith('unknown-email-'):
            if name:
                to_hdr.append('"%s"' % name)
            to_hdr.append("<%s>," % addr)
    to_str = to_hdr.encode()
    if to_str and to_str[-1] == ',':
        to_str=to_str[:-1]
    # It's important to use this string, and not assign the Header object.
    # Code downstream from this assumes that the msg['To'] will return a string, not an instance
    msg['To'] = to_str

    if cc:
	msg['Cc'] = cc
    msg['Subject'] = subject
    msg['X-Test-IDTracker'] = (settings.SERVER_MODE == 'production') and 'no' or 'yes'
    msg['X-IETF-IDTracker'] = ietf.__version__
    msg['Auto-Submitted'] = "auto-generated"
    msg['Precedence'] = "bulk"
    if extra:
	for k, v in extra.items():
            if v:
                msg[k] = v

def show_that_mail_was_sent(request,leadline,msg,bcc):
        if request and request.user:
            from ietf.ietfauth.utils import has_role
            if has_role(request.user,['Area Director','Secretariat','IANA','RFC Editor','ISE','IAD','IRTF Chair','WG Chair','RG Chair','WG Secretary','RG Secretary']):
                info =  "%s at %s %s\n" % (leadline,datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),settings.TIME_ZONE)
                info += "Subject: %s\n" % msg.get('Subject','[no subject]')
                info += "To: %s\n" % msg.get('To','[no to]')
                if msg.get('Cc'):
                    info += "Cc: %s\n" % msg.get('Cc')
                if bcc:
                    info += "Bcc: %s\n" % bcc
                messages.info(request,info,extra_tags='preformatted',fail_silently=True)

def send_mail_mime(request, to, frm, subject, msg, cc=None, extra=None, toUser=False, bcc=None):
    """Send MIME message with content already filled in."""

    condition_message(to, frm, subject, msg, cc, extra)

    # start debug server with python -m smtpd -n -c DebuggingServer localhost:2025
    # then put USING_DEBUG_EMAIL_SERVER=True and EMAIL_HOST='localhost'
    # and EMAIL_PORT=2025 in settings_local.py
    debugging = getattr(settings, "USING_DEBUG_EMAIL_SERVER", False) and settings.EMAIL_HOST == 'localhost' and settings.EMAIL_PORT == 2025

    if settings.SERVER_MODE == 'development':
        show_that_mail_was_sent(request,'In production, email would have been sent',msg,bcc)

    if test_mode or debugging or settings.SERVER_MODE == 'production':
        try:
            send_smtp(msg,bcc)
        except smtplib.SMTPException as e:
            log_smtp_exception(e)
            build_warning_message(request, e)
            send_error_email(e)

        show_that_mail_was_sent(request,'Email was sent',msg,bcc)

    elif settings.SERVER_MODE == 'test':
	if toUser:
	    copy_email(msg, to, toUser=True, originalBcc=bcc)
	elif request and request.COOKIES.has_key( 'testmailcc' ):
	    copy_email(msg, request.COOKIES[ 'testmailcc' ],originalBcc=bcc)
    try:
	copy_to = settings.EMAIL_COPY_TO
    except AttributeError:
        copy_to = "ietf.tracker.archive+%s@gmail.com" % settings.SERVER_MODE
    if copy_to and not test_mode and not debugging: # if we're running automated tests, this copy is just annoying
        if bcc:
            msg['X-Tracker-Bcc']=bcc
        try:
            copy_email(msg, copy_to, originalBcc=bcc)
        except smtplib.SMTPException as e:
            log_smtp_exception(e)
            build_warning_message(request, e)
            send_error_email(e)

def parse_preformatted(preformatted, extra={}, override={}):
    """Parse preformatted string containing mail with From:, To:, ...,"""
    msg = message_from_string(preformatted.encode("utf-8"))

    for k, v in override.iteritems():
         if k in msg:
              del msg[k]
         msg[k] = v

    headers = copy.copy(msg)
    for key in ['To', 'From', 'Subject', 'Bcc']:
        del headers[key]
    for k, v in extra.iteritems():
         if k in headers:
              del headers[k]
         headers[k] = v

    bcc = msg['Bcc']
    del msg['Bcc']

    return (msg, headers, bcc)

def send_mail_preformatted(request, preformatted, extra={}, override={}):
    """Parse preformatted string containing mail with From:, To:, ...,
    and send it through the standard IETF mail interface (inserting
    extra headers as needed)."""

    (msg,headers,bcc) = parse_preformatted(preformatted, extra, override)
    send_mail_text(request, msg['To'], msg["From"], msg["Subject"], msg.get_payload(), extra=headers, bcc=bcc)
    return msg

def send_mail_message(request, message, extra={}):
    """Send a Message object."""
    # note that this doesn't handle MIME messages at the moment

    e = extra.copy()
    if message.reply_to:
        e['Reply-to'] = message.reply_to

    send_mail_text(request, message.to, message.frm, message.subject,
                   message.body, cc=message.cc, bcc=message.bcc, extra=e)

def exception_components(e):
    # See if it's a non-smtplib exception that we faked
    if len(e.args)==1 and isinstance(e.args[0],dict) and e.args[0].has_key('really'):
        orig = e.args[0]
        extype = orig['really']
        tb = orig['tb']
        value = orig['value']
    else:
        extype = sys.exc_info()[0]
        value = sys.exc_info()[1]
        tb = traceback.format_tb(sys.exc_info()[2])
    return (extype, value, tb)

def log_smtp_exception(e):
    (extype, value, tb) = exception_components(e)
    log("SMTP Exception: %s : %s" % (extype,value))
    if isinstance(e,SMTPSomeRefusedRecipients):
        log("     SomeRefused: %s"%(e.summary_refusals()))
    log("     Traceback: %s" % tb)

def build_warning_message(request, e):
    (extype, value, tb) = exception_components(e)
    if request:
        warning =  "An error occured while sending email:\n"
        if getattr(e,'original_msg',None):
            warning += "Subject: %s\n" % e.original_msg.get('Subject','[no subject]')
            warning += "To: %s\n" % e.original_msg.get('To','[no to]')
            warning += "Cc: %s\n" % e.original_msg.get('Cc','[no cc]')
        if isinstance(e,SMTPSomeRefusedRecipients):
            warning += e.detailed_refusals()
        else:
            warning += "SMTP Exception: %s\n"%extype
            warning += "Error Message: %s\n\n"%value
            warning += "The message was not delivered to anyone."
        messages.warning(request,warning,extra_tags='preformatted',fail_silently=True)

def send_error_email(e):
    (extype, value, tb) = exception_components(e)
    msg = MIMEMultipart()
    msg['To'] = '<action@ietf.org>'
    msg['From'] = settings.SERVER_EMAIL
    if isinstance(e,SMTPSomeRefusedRecipients):
        msg['Subject'] = 'Subject: Some recipients were refused while sending mail with Subject: %s' % e.original_msg.get('Subject','[no subject]')
        textpart = textwrap.dedent("""\
            This is a message from the datatracker to IETF-Action about an email
            delivery failure, when sending email from the datatracker.

            %s

            """) % e.detailed_refusals()
    else:
        msg['Subject'] = 'Datatracker error while sending email'
        textpart = textwrap.dedent("""\
            This is a message from the datatracker to IETF-Action about an email
            delivery failure, when sending email from the datatracker.

            The original message was not delivered to anyone.

            SMTP Exception: %s

            Error Message: %s

            """) % (extype,value)
    if hasattr(e,'original_msg'):
        textpart += "The original message follows:\n"
    msg.attach(MIMEText(textpart,_charset='utf-8'))
    if hasattr(e,'original_msg'):
        msg.attach(MIMEMessage(e.original_msg))

    send_error_to_secretariat(msg)

def send_error_to_secretariat(msg):

    debugging = getattr(settings, "USING_DEBUG_EMAIL_SERVER", False) and settings.EMAIL_HOST == 'localhost' and settings.EMAIL_PORT == 2025

    try:
        if test_mode or debugging or settings.SERVER_MODE == 'production':
            send_smtp(msg, bcc=None)
        try:
            copy_to = settings.EMAIL_COPY_TO
        except AttributeError:
            copy_to = "ietf.tracker.archive+%s@gmail.com" % settings.SERVER_MODE
        if copy_to and not test_mode and not debugging: # if we're running automated tests, this copy is just annoying
            copy_email(msg, copy_to,originalBcc=None)
    except smtplib.SMTPException:
        log("Exception encountered while sending a ticket to the secretariat")
        (extype,value) = sys.exc_info()[:2]
        log("SMTP Exception: %s : %s" % (extype,value))


text:
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 15 (filtered)">

Previous

Errors

If content in the file makes it very
difficult or impossible for someone with a disability to use, the Accessibility
Checker will classify it as an error.

Rule

Accessibility Checker verifies

Why fix this?

All non-text content has alternative
  text (alt text).

All objects have alt text and the text does not contain
  images or file extensions.

Screen readers speak the alternative text to describe
  images and other non-text content that users can't see. Based on the alt text
  of non-text content, users should understand the purpose and meaning.

Tables specify column header information.

Tables and/or blocks of cells have the header box
  selected, or a header row indicated.

Users rely on the table headings to understand the
  content that is subsequently read by the screen reader. Also, assistive
  technology often uses the table header row to help convey to users the
  current cursor location in the table and to provide information that enables
  the user to navigate the table.

Documents use heading styles

Content is organized with headings and/or a Table of
  Contents (TOC).

Headings and TOCs provide structural context to users and
  enable navigation and easier searching in the document.

Next


text:
<!DOCTYPE animal [
<!ELEMENT animal ANY>
<?ᇱ an only legal per 5th edition char #x11f1
 in PITarget ?>
]>
<animal/>


text:
<?php

use Enqueue\AmqpTools\RabbitMqDlxDelayStrategy;

return [

    /*
    |--------------------------------------------------------------------------
    | RabbitEvents Connection Configuration
    |--------------------------------------------------------------------------
    |
    | Here you may define the RabbitMQ connection settings that should be used
    | by RabbitEvents. Note that `vhost` should be created by you manually.
    | @see https://www.rabbitmq.com/vhosts.html for more info
    |
    */

    'default' => env('RABBITEVENTS_CONNECTION', 'rabbitmq'),
    'connections' => [
        'rabbitmq' => [
            'driver' => 'rabbitmq',
            'exchange' => env('RABBITEVENTS_EXCHANGE', 'events'),
            'host' => env('RABBITEVENTS_HOST', 'localhost'),
            'port' => env('RABBITEVENTS_PORT', 5672),
            'user' => env('RABBITEVENTS_USER', 'guest'),
            'pass' => env('RABBITEVENTS_PASSWORD', 'guest'),
            'vhost' => env('RABBITEVENTS_VHOST', 'events'),
            'delay_strategy' => env('RABBITEVENTS_DELAY_STRATEGY', RabbitMqDlxDelayStrategy::class),
            'ssl' => [
                'is_enabled' => env('RABBITEVENTS_SSL_ENABLED', false),
                'verify_peer' => env('RABBITEVENTS_SSL_VERIFY_PEER', true),
                'cafile' => env('RABBITEVENTS_SSL_CAFILE'),
                'local_cert' => env('RABBITEVENTS_SSL_LOCAL_CERT'),
                'local_key' => env('RABBITEVENTS_SSL_LOCAL_KEY'),
                'passphrase' => env('RABBITEVENTS_SSL_PASSPHRASE', ''),
            ],
            'read_timeout' => env('RABBITEVENTS_READ_TIMEOUT', 3.),
            'write_timeout' => env('RABBITEVENTS_WRITE_TIMEOUT', 3.),
            'connection_timeout' => env('RABBITEVENTS_CONNECTION_TIMEOUT', 3.),
            'heartbeat' => env('RABBITEVENTS_HEARTBEAT', 0),
            'persisted' => env('RABBITEVENTS_PERSISTED', false),
            'lazy' => env('RABBITEVENTS_LAZY', true),
            'qos' => [
                'global' => env('RABBITEVENTS_QOS_GLOBAL', false),
                'prefetch_size' => env('RABBITEVENTS_QOS_PREFETCH_SIZE', 0),
                'prefetch_count' => env('RABBITEVENTS_QOS_PREFETCH_COUNT', 1),
            ]
        ],
    ],
    'logging' => [
        'enabled' => env('RABBITEVENTS_LOG_ENABLED', false),
        'level' => env('RABBITEVENTS_LOG_LEVEL', 'info'),
        'channel' => env('RABBITEVENTS_LOG_CHANNEL')
    ],
];


text:
@interface ViewController : RogueViewController

@end


text:
var Observable_1 = require('../../Observable');
var bindCallback_1 = require('../../observable/bindCallback');
Observable_1.Observable.bindCallback = bindCallback_1.BoundCallbackObservable.create;
//# sourceMappingURL=bindCallback.js.map


text:
#ifndef WebContextMenuData_h
#define WebContextMenuData_h

#include "WebHistoryItem.h"
#include "WebMenuItemInfo.h"
#include "WebNode.h"
#include "WebPoint.h"
#include "WebString.h"
#include "WebURL.h"
#include "WebVector.h"

#define WEBCONTEXT_MEDIATYPEFILE_DEFINED

namespace WebKit {

// This struct is passed to WebViewClient::ShowContextMenu.
struct WebContextMenuData {
    enum MediaType {
        // No special node is in context.
        MediaTypeNone,
        // An image node is selected.
        MediaTypeImage,
        // A video node is selected.
        MediaTypeVideo,
        // An audio node is selected.
        MediaTypeAudio,
        // A file node is selected.
        MediaTypeFile,
        // A plugin node is selected.
        MediaTypePlugin,
    };
    // The type of media the context menu is being invoked on.
    MediaType mediaType;

    // The x and y position of the mouse pointer (relative to the webview).
    WebPoint mousePosition;

    // The absolute URL of the link that is in context.
    WebURL linkURL;

    // The absolute URL of the image/video/audio that is in context.
    WebURL srcURL;

    // Whether the image in context has been blocked.
    bool isImageBlocked;

    // The absolute URL of the page in context.
    WebURL pageURL;

    // The absolute URL of the subframe in context.
    WebURL frameURL;

    // The encoding for the frame in context.
    WebString frameEncoding;

    // History state of the subframe in context.
    WebHistoryItem frameHistoryItem;

    enum MediaFlags {
        MediaNone = 0x0,
        MediaInError = 0x1,
        MediaPaused = 0x2,
        MediaMuted = 0x4,
        MediaLoop = 0x8,
        MediaCanSave = 0x10,
        MediaHasAudio = 0x20,
        MediaHasVideo = 0x40,
        MediaControlRootElement = 0x80,
        MediaCanPrint = 0x100,
    };

    // Extra attributes describing media elements.
    int mediaFlags;

    // The raw text of the selection in context.
    WebString selectedText;

    // Whether spell checking is enabled.
    bool isSpellCheckingEnabled;

    // The editable (possibily) misspelled word.
    WebString misspelledWord;

    // If misspelledWord is not empty, holds suggestions from the dictionary.
    WebVector<WebString> dictionarySuggestions;

    // Whether context is editable.
    bool isEditable;

    enum CheckableMenuItemFlags {
        CheckableMenuItemDisabled = 0x0,
        CheckableMenuItemEnabled = 0x1,
        CheckableMenuItemChecked = 0x2,
    };

    // Writing direction menu items - values are unions of
    // CheckableMenuItemFlags.
    // Currently only used on OS X.
    int writingDirectionDefault;
    int writingDirectionLeftToRight;
    int writingDirectionRightToLeft;

    enum EditFlags {
        CanDoNone = 0x0,
        CanUndo = 0x1,
        CanRedo = 0x2,
        CanCut = 0x4,
        CanCopy = 0x8,
        CanPaste = 0x10,
        CanDelete = 0x20,
        CanSelectAll = 0x40,
        CanTranslate = 0x80,
    };

    // Which edit operations are available in the context.
    int editFlags;

    // Security information for the context.
    WebCString securityInfo;

    // Custom context menu items provided by the WebCore internals.
    WebVector<WebMenuItemInfo> customItems;

    // The node that was clicked.
    WebNode node;

    WebContextMenuData()
        : mediaType(MediaTypeNone)
        , isImageBlocked(false)
        , mediaFlags(MediaNone)
        , isSpellCheckingEnabled(false)
        , isEditable(false)
        , writingDirectionDefault(CheckableMenuItemDisabled)
        , writingDirectionLeftToRight(CheckableMenuItemEnabled)
        , writingDirectionRightToLeft(CheckableMenuItemEnabled)
        , editFlags(0) { }
};

} // namespace WebKit

#endif


text:
package com.ginger_walnut.sqsmoothcraft.gui.options;

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

import net.md_5.bungee.api.ChatColor;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;

import com.ginger_walnut.sqsmoothcraft.PlayerOptions;
import com.ginger_walnut.sqsmoothcraft.SQSmoothCraft;
import com.ginger_walnut.sqsmoothcraft.gui.Gui;
import com.ginger_walnut.sqsmoothcraft.gui.MainGui;
import com.ginger_walnut.sqsmoothcraft.utils.ShipUtils;

public class OptionGui extends Gui{

	List<Option> options = new ArrayList<Option>();
	List<String> optionNames = new ArrayList<String>();

	public OptionGui(Player player) {

		super(player);

		if (!SQSmoothCraft.currentOptions.containsKey(owner.getUniqueId())) {

			SQSmoothCraft.currentOptions.put(owner.getUniqueId(), new PlayerOptions(owner.getUniqueId()));

		}

		List<String> lore = new ArrayList<String>();
		lore.add("If this is enabled, the direction lock");
		lore.add("is on by default");
		lore.add(ChatColor.RED + "" + ChatColor.MAGIC + "Contraband");

		if (SQSmoothCraft.currentOptions.get(owner.getUniqueId()).lockedDirection) {

			options.add(new Option(OptionType.BOOLEANTRUE, "Direction Lock", lore));

		} else {

			options.add(new Option(OptionType.BOOLEANFALSE, "Direction Lock", lore));

		}

		optionNames.add("Direction Lock");

	}

	@Override
	public void open() {

		Inventory gui = Bukkit.createInventory(owner, 27, ChatColor.BLUE + "SQSmoothCraft - Options");

		ItemStack exit = new ItemStack(Material.STAINED_GLASS_PANE);
		exit.setDurability((short) 14);

		List<String> exitLore = new ArrayList<String>();
		exitLore.add(ChatColor.RED + "" + ChatColor.MAGIC + "Contraband");

		exit = ShipUtils.createSpecialItem(exit, exitLore, "Back");

		gui.setItem(22, exit);

		ItemStack bars = new ItemStack(Material.IRON_FENCE);

		List<String> barLore = new ArrayList<String>();
		barLore.add(ChatColor.RED + "" + ChatColor.MAGIC + "Contraband");

		bars = ShipUtils.createSpecialItem(bars, barLore, " ");

		gui.setItem(18, bars);
		gui.setItem(19, bars);
		gui.setItem(20, bars);
		gui.setItem(21, bars);
		gui.setItem(23, bars);
		gui.setItem(24, bars);
		gui.setItem(25, bars);

		if (options.size() > 10) {

			//gui.setItem(26, exit);

		} else {

			for (int i = 0; i < options.size(); i ++) {

				gui.setItem(i, options.get(i).getItem());
				gui.setItem(i + 9, options.get(i).getOption());

			}

			gui.setItem(26, bars);

		}

		owner.openInventory(gui);

		if (SQSmoothCraft.currentGui.containsKey(owner)) {

			SQSmoothCraft.currentGui.remove(owner);
			SQSmoothCraft.currentGui.put(owner,  this);

		} else {

			SQSmoothCraft.currentGui.put(owner,  this);

		}

	}

	@Override
	public void clicked(String itemName, int slot) {

		if (itemName.equals("Back")) {

			MainGui gui = new MainGui(owner);
			gui.open();

		} else if (!(itemName.equals(" ") || optionNames.contains(itemName))) {

			if (options.get(slot - 9).type.equals(OptionType.BOOLEANFALSE)) {

				options.get(slot - 9).type = OptionType.BOOLEANTRUE;

				if (slot == 9) {

					SQSmoothCraft.currentOptions.get(owner.getUniqueId()).lockedDirection = true;

				}

			} else if (options.get(slot - 9).type.equals(OptionType.BOOLEANTRUE)) {

				options.get(slot - 9).type = OptionType.BOOLEANFALSE;

				if (slot == 9) {

					SQSmoothCraft.currentOptions.get(owner.getUniqueId()).lockedDirection = false;

				}

			}

			this.open();

		}

	}

}


text:
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BlogSystem.Web.Api.IntegrationTests
{
    using Data.Repositories;
    using Data;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using MyTested.WebApi;
    using Ninject;
    using System;
    using System.Net;
    using System.Net.Http;
    using Infrastructure.IdentityProviders.Contracts;
    using MyTested.WebApi.Builders.Contracts.Servers;

    [TestClass]
    public class ArticlesTests
    {
        static IServerBuilder server;

        [TestInitialize]
        public void TestInit()
        {
            server = MyWebApi.Server().Starts<Startup>();
        }

        [TestMethod]
        public void GetAllArticlesWithoutAuthenticationShouldReturnCorrectResponse()
        {
            server
                .WithHttpRequestMessage(m => m
                    .WithMethod(HttpMethod.Get)
                    .WithRequestUri("api/articles"))
                .ShouldReturnHttpResponseMessage()
                .WithStatusCode(HttpStatusCode.OK)
                .WithStringContent("\"You are not authenticated\"");
        }

        [TestMethod]
        public void GetAllArticlesWithAuthenticationShouldReturnCorrectResponse()
        {
            IIdentityProvider identityProvider = FakesFactory.GetFakeIdentityProvider();
            Action<IKernel> dependenciesRegistration = kernel =>
            {
                kernel
                    .Bind<IBlogSystemDbContext>()
                    .To<BlogSystemDbContext>();
                kernel
                    .Bind(typeof(IRepository<>))
                    .To(typeof(GenericRepository<>));
                kernel
                    .Bind<IIdentityProvider>()
                    .ToConstant(identityProvider);
            };

            NinjectConfig.DependenciesRegistration = dependenciesRegistration;

            server
                .WithHttpRequestMessage(m => m
                    .WithMethod(HttpMethod.Get)
                    .WithRequestUri("api/articles"))
                .ShouldReturnHttpResponseMessage()
                .WithStatusCode(HttpStatusCode.OK)
                .WithStringContent("\"Authenticated\"");
        }

        [TestCleanup]
        public void Clean()
        {
            MyWebApi.Server().Stops();
        }
    }
}


text:
package Nov2020Leetcode;

import java.util.HashMap;

public class _0146LRUCache {

	static class ListNode {
		ListNode prev = null;
		ListNode next = null;
		int key;
		int val;

		public ListNode(int key, int val) {
			this.key = key;
			this.val = val;
		}

	}

	static public class LRUCache {
		HashMap<Integer, ListNode> map;
		ListNode fakeHead, fakeTail;
		int capacity;

		public LRUCache(int capacity) {
			this.capacity = capacity;
			map = new HashMap<Integer, ListNode>(capacity);
			fakeHead = new ListNode(-1, -1);
			fakeTail = new ListNode(-1, -1);
			fakeHead.next = fakeTail;
			fakeTail.prev = fakeHead;
		}

		private void addNode(int key, int value) {
			ListNode nextNode = fakeHead.next;
			ListNode newNode = new ListNode(key, value);
			fakeHead.next = newNode;
			newNode.next = nextNode;
			nextNode.prev = newNode;
			newNode.prev = fakeHead;
			map.put(key, newNode);
		}

		private void deleteNode(ListNode node) {
			node.next.prev = node.prev;
			node.prev.next = node.next;
			map.remove(node.key);
		}

		private void moveNodeToHead(int key, int value) {
			deleteNode(map.get(key));
			addNode(key, value);
		}

		public int get(int key) {
			if (map.containsKey(key)) {
				ListNode node = map.get(key);
				deleteNode(node);
				addNode(key, node.val);
				return node.val;
			}
			return -1;
		}

		public void put(int key, int value) {
			if (map.size() < capacity && !map.containsKey(key)) {
				addNode(key, value);
			} else {
				if (map.size() == capacity) {
					if (map.containsKey(key)) {
						moveNodeToHead(key, value);
					} else {
						deleteNode(map.get(fakeTail.prev.key));
						addNode(key, value);
					}
				} else {
					moveNodeToHead(key, value);
				}
			}
		}
	}

	public static void main(String[] args) {
		LRUCache lRUCache = new LRUCache(2);
		lRUCache.put(1, 1); // cache is {1=1}
		lRUCache.put(2, 2); // cache is {1=1, 2=2}
		System.out.println(lRUCache.get(1)); // return 1
		lRUCache.put(3, 3); // LRU key was 2, evicts key 2, cache is {1=1, 3=3}
		System.out.println(lRUCache.get(2)); // returns -1 (not found)
		lRUCache.put(4, 4); // LRU key was 1, evicts key 1, cache is {4=4, 3=3}
		System.out.println(lRUCache.get(1)); // return -1 (not found)
		System.out.println(lRUCache.get(3)); // return 3
		System.out.println(lRUCache.get(4)); // return 4

		lRUCache = new LRUCache(1);
		lRUCache.put(2, 1); // cache is {1=1}
		System.out.println(lRUCache.get(2)); // return -1 (not found)
	}

}


text:
package org.anddev.andengine.opengl.texture.region;

import javax.microedition.khronos.opengles.GL10;
import javax.microedition.khronos.opengles.GL11;

import org.anddev.andengine.opengl.buffer.BufferObjectManager;
import org.anddev.andengine.opengl.texture.Texture;
import org.anddev.andengine.opengl.texture.region.buffer.BaseTextureRegionBuffer;
import org.anddev.andengine.opengl.util.GLHelper;

/**
 * @author Nicolas Gramlich
 * @since 14:29:59 - 08.03.2010
 */
public abstract class BaseTextureRegion {
	// ===========================================================
	// Constants
	// ===========================================================

	// ===========================================================
	// Fields
	// ===========================================================

	protected final Texture mTexture;

	protected final BaseTextureRegionBuffer mTextureRegionBuffer;

	protected int mWidth;
	protected int mHeight;

	protected int mTexturePositionX;
	protected int mTexturePositionY;

	// ===========================================================
	// Constructors
	// ===========================================================

	public BaseTextureRegion(final Texture pTexture, final int pTexturePositionX, final int pTexturePositionY, final int pWidth, final int pHeight) {
		this.mTexture = pTexture;
		this.mTexturePositionX = pTexturePositionX;
		this.mTexturePositionY = pTexturePositionY;
		this.mWidth = pWidth;
		this.mHeight = pHeight;

		this.mTextureRegionBuffer = this.onCreateTextureRegionBuffer();

		BufferObjectManager.getActiveInstance().loadBufferObject(this.mTextureRegionBuffer);

		this.initTextureBuffer();
	}

	protected void initTextureBuffer() {
		this.updateTextureRegionBuffer();
	}

	// ===========================================================
	// Getter & Setter
	// ===========================================================

	public int getWidth() {
		return this.mWidth;
	}

	public int getHeight() {
		return this.mHeight;
	}

	public void setWidth(final int pWidth) {
		this.mWidth = pWidth;
		this.updateTextureRegionBuffer();
	}

	public void setHeight(final int pHeight) {
		this.mHeight = pHeight;
		this.updateTextureRegionBuffer();
	}

	public void setTexturePosition(final int pX, final int pY) {
		this.mTexturePositionX = pX;
		this.mTexturePositionY = pY;
		this.updateTextureRegionBuffer();
	}

	public int getTexturePositionX() {
		return this.mTexturePositionX;
	}

	public int getTexturePositionY() {
		return this.mTexturePositionY;
	}

	public Texture getTexture() {
		return this.mTexture;
	}

	public BaseTextureRegionBuffer getTextureBuffer() {
		return this.mTextureRegionBuffer;
	}

	public boolean isFlippedHorizontal() {
		return this.mTextureRegionBuffer.isFlippedHorizontal();
	}

	public void setFlippedHorizontal(final boolean pFlippedHorizontal) {
		this.mTextureRegionBuffer.setFlippedHorizontal(pFlippedHorizontal);
	}

	public boolean isFlippedVertical() {
		return this.mTextureRegionBuffer.isFlippedVertical();
	}

	public void setFlippedVertical(final boolean pFlippedVertical) {
		this.mTextureRegionBuffer.setFlippedVertical(pFlippedVertical);
	}

	// ===========================================================
	// Methods for/from SuperClass/Interfaces
	// ===========================================================

	protected abstract BaseTextureRegionBuffer onCreateTextureRegionBuffer();

	// ===========================================================
	// Methods
	// ===========================================================

	protected void updateTextureRegionBuffer() {
		this.mTextureRegionBuffer.update();
	}

	public void onApply(final GL10 pGL) {
		if(GLHelper.EXTENSIONS_VERTEXBUFFEROBJECTS) {
			final GL11 gl11 = (GL11)pGL;

			this.mTextureRegionBuffer.selectOnHardware(gl11);

			GLHelper.bindTexture(pGL, this.mTexture.getHardwareTextureID());
			GLHelper.texCoordZeroPointer(gl11);
		} else {
			GLHelper.bindTexture(pGL, this.mTexture.getHardwareTextureID());
			GLHelper.texCoordPointer(pGL, this.mTextureRegionBuffer.getFloatBuffer());
		}
	}

	// ===========================================================
	// Inner and Anonymous Classes
	// ===========================================================
}


text:
layout: post
date: 2017-04-11
title: "Jovani Print Sleeveless Chiffon Prom Dress 35285 Sleeveless Sweep/Brush Train Aline/Princess"
category: Jovani
tags: [Jovani ,Jovani,Aline/Princess ,Jewel,Sweep/Brush Train,Sleeveless]
---
### Jovani Print Sleeveless Chiffon Prom Dress 35285
Just **$479.98**
###   Sleeveless Sweep/Brush Train Aline/Princess

BRANDS	Jovani

Silhouette	Aline/Princess

Neckline	Jewel

Hemline/Train	Sweep/Brush Train

Sleeve	Sleeveless

Buy it: [https://www.readybrides.com/en/jovani-/39200-jovani-print-sleeveless-chiffon-prom-dress-35285.html](https://www.readybrides.com/en/jovani-/39200-jovani-print-sleeveless-chiffon-prom-dress-35285.html)


text:
module Fog
  module Network
    class Softlayer < Fog::Service

      requires :softlayer_username, :softlayer_api_key

      ## MODELS
      #
      model_path 'fog/softlayer/models/network'
      model       :datacenter
      collection  :datacenters
      model       :network
      collection  :networks
      #model       :port
      #collection  :ports
      model       :subnet
      collection  :subnets
      model       :ip
      collection  :ips
      model       :tag
      collection  :tags
      #model       :router
      #collection  :routers

      ## REQUESTS
      #
      request_path 'fog/softlayer/requests/network'

      request :list_networks
      request :create_network
      request :create_subnet
      request :delete_network
      request :get_network

      request :get_private_vlan_price_code
      request :get_public_vlan_price_code
      request :get_subnet_package_id
      request :get_subnet_price_code
      request :get_portable_subnet_package_id
      request :get_portable_subnet_price_code
      request :get_datacenters
      request :get_datacenter_routers
      request :get_references_by_tag_name

      request :create_network_tags
      request :delete_network_tags
      request :get_network_tags

      request :list_subnets
      request :get_subnet

      request :get_ip_address
      request :get_global_ip_address
      request :get_ip_addresses
      request :get_global_ip_records
      request :route_global_ip
      request :unroute_global_ip
      request :delete_global_ip_address

      class Mock
        #Fog::Mock.random_ip,

        def self.reset
          @data = nil
        end

        def initialize(options={})
          @softlayer_api_key = options[:softlayer_api_key]
          @softlayer_username = options[:softlayer_username]

          @networks = []
          @datacenters = [
              {"id"=>265592, "longName"=>"Amsterdam 1", "name"=>"ams01"},
              {"id"=>358698, "longName"=>"Ashburn, VA 3", "name"=>"wdc03"},
              {"id"=>3, "longName"=>"Dallas 1", "name"=>"dal01"},
              {"id"=>154770, "longName"=>"Dallas 2", "name"=>"dal02"},
              {"id"=>167092, "longName"=>"Dallas 4", "name"=>"dal04"},
              {"id"=>138124, "longName"=>"Dallas 5", "name"=>"dal05"},
              {"id"=>154820, "longName"=>"Dallas 6", "name"=>"dal06"},
              {"id"=>142776, "longName"=>"Dallas 7", "name"=>"dal07"},
              {"id"=>352494, "longName"=>"Hong Kong 2", "name"=>"hkg02"},
              {"id"=>142775, "longName"=>"Houston 2", "name"=>"hou02"},
              {"id"=>358694, "longName"=>"London 2", "name"=>"lon02"},
              {"id"=>168642, "longName"=>"San Jose 1", "name"=>"sjc01"},
              {"id"=>18171, "longName"=>"Seattle", "name"=>"sea01"},
              {"id"=>224092, "longName"=>"Singapore 1", "name"=>"sng01"},
              {"id"=>448994, "longName"=>"Toronto 1", "name"=>"tor01"},
              {"id"=>37473, "longName"=>"Washington, DC 1", "name"=>"wdc01"}
          ]
          @tags = []
        end

        def credentials
          { :provider           => 'softlayer',
            :softlayer_username => @softlayer_username,
            :softlayer_api_key  => @softlayer_api_key
          }
        end
      end

      class Real
        include Fog::Softlayer::Slapi

        def initialize(options={})
          @softlayer_api_key = options[:softlayer_api_key]
          @softlayer_username = options[:softlayer_username]
        end

        def request(service, path, options = {})
          options = {:username => @softlayer_username, :api_key => @softlayer_api_key}.merge(options)
          Fog::Softlayer::Slapi.slapi_request(service, path, options)
        end

        def create_new_global_ipv4
          order = {
              "complexType" => 'SoftLayer_Container_Product_Order_Network_Subnet',
              "packageId" => 0, # everything that's not a Server is package 0 when using placeOrder
              "prices" => [{"id"=>global_ipv4_price_code}],
              "quantity" => 1
          }
          request(:product_order, :place_order, :body => order, :http_method => :POST).status == 200
        end

        def create_new_global_ipv6
          order = {
              "complexType" => 'SoftLayer_Container_Product_Order_Network_Subnet',
              "packageId" => 0, # everything that's not a Server is package 0 when using placeOrder
              "prices" => [{"id"=>global_ipv6_price_code}],
              "quantity" => 1
          }
          request(:product_order, :place_order, :body => order, :http_method => :POST).status == 200
        end

        def list_networks
          self.list_networks
        end

        private

        ##
        # Queries the SoftLayer API and returns the "category code" required for ordering a Global IPv4 address.
        # @return [Integer]
        def global_ipv4_cat_code
          request(:product_package, '0/get_configuration', :query => 'objectMask=mask[isRequired,itemCategory]').body.map do |item|
            item['itemCategory']['id'] if item['itemCategory']['categoryCode'] == 'global_ipv4'
          end.compact.first
        end

        ##
        # Queries the SoftLayer API and returns the "category code" required for ordering a Global IPv4 address.
        # @return [Integer]
        def global_ipv6_cat_code
          request(:product_package, '0/get_configuration', :query => 'objectMask=mask[isRequired,itemCategory]').body.map do |item|
            item['itemCategory']['id'] if item['itemCategory']['categoryCode'] == 'global_ipv6'
          end.compact.first
        end

        ##
        # Queries the SoftLayer API and returns the "price code" required for ordering a Global IPv4 address.
        # @return [Integer]
        def global_ipv4_price_code
          request(:product_package, '0/get_item_prices', :query => 'objectMask=mask[id,item.description,categories.id]').body.map do |item|
            item['id'] if item['categories'][0]['id'] == global_ipv4_cat_code
          end.compact.first
        end

        ##
        # Queries the SoftLayer API and returns the "price code" required for ordering a Global IPv4 address.
        # @return [Integer]
        def global_ipv6_price_code
          request(:product_package, '0/get_item_prices', :query => 'objectMask=mask[id,item.description,categories.id]').body.map do |item|
            item['id'] if item['categories'][0]['id'] == global_ipv6_cat_code
          end.compact.first
        end

      end
    end
  end
end