text:
/**
 * modified version of eric meyer's reset 2.0
 * http://meyerweb.com/eric/tools/css/reset/
 */
/**
 * basic reset
 */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, main,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline; }

/**
 * HTML5 display-role reset for older browsers
 */
article, aside, details, figcaption, figure,
footer, header, menu, nav, section,
main, summary {
  display: block; }

body {
  line-height: 1; }

ol, ul {
  list-style: none; }

blockquote, q {
  quotes: none; }

blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none; }

table {
  border-collapse: collapse;
  border-spacing: 0; }

/**
 * modified version of normalize.css 3.0.2
 * http://necolas.github.io/normalize.css/
 */
/**
 * 1. Set default font family to sans-serif.
 * 2. Prevent iOS text size adjust after orientation change, without disabling
 *    user zoom.
 */
html {
  font-family: sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%; }

/**
 * HTML5 display definitions
 * =============================================================================
 */
/**
 * 1. Correct `inline-block` display not defined in IE 8/9.
 * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
 */
audio,
canvas,
progress,
video {
  display: inline-block;
  vertical-align: baseline; }

/**
 * Prevent modern browsers from displaying `audio` without controls.
 * Remove excess height in iOS 5 devices.
 */
audio:not([controls]) {
  display: none;
  height: 0; }

/**
 * Address `[hidden]` styling not present in IE 8/9/10.
 * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
 */
[hidden],
template {
  display: none; }

/**
 * Links
 * =============================================================================
 */
/**
 * Remove the gray background color from active links in IE 10.
 */
a {
  background-color: transparent; }

/**
 * Improve readability when focused and also mouse hovered in all browsers.
 */
a:active,
a:hover {
  outline: 0; }

/**
 * Text-level semantics
 * =============================================================================
 */
/**
 * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
 */
abbr[title] {
  border-bottom: 1px dotted; }

/**
 * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
 */
b,
strong {
  font-weight: bold; }

/**
 * 1. Address styling not present in Safari and Chrome.
 * 2. Set previously resetted italic font-style
 */
dfn,
i, em {
  font-style: italic; }

/**
 * Address styling not present in IE 8/9.
 */
mark {
  background: #ff0;
  color: #000; }

/**
 * Address inconsistent and variable font size in all browsers.
 */
small {
  font-size: 80%; }

/**
 * Prevent `sub` and `sup` affecting `line-height` in all browsers.
 */
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative; }

sup {
  top: -0.5em; }

sub {
  bottom: -0.25em; }

/**
 * Embedded content
 * =============================================================================
 */
/**
 * Remove border when inside `a` element in IE 8/9/10.
 */
img {
  border: 0; }

/**
 * Correct overflow not hidden in IE 9/10/11.
 */
svg:not(:root) {
  overflow: hidden; }

/**
 * Grouping content
 * =============================================================================
 */
/**
 * Address differences between Firefox and other browsers.
 */
hr {
  box-sizing: content-box;
  height: 0; }

/**
 * Contain overflow in all browsers.
 */
pre {
  overflow: auto; }

/**
 * Address odd `em`-unit font size rendering in all browsers.
 */
code,
kbd,
pre,
samp {
  font-family: monospace, monospace; }

/**
 * Forms
 * =============================================================================
 */
/**
 * Known limitation: by default, Chrome and Safari on OS X allow very limited
 * styling of `select`, unless a `border` property is set.
 */
/**
 * 1. Correct color not being inherited.
 *    Known issue: affects color of disabled elements.
 * 2. Correct font properties not being inherited.
 * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
 */
button,
input,
optgroup,
select,
textarea {
  color: inherit;
  font: inherit;
  margin: 0; }

/**
 * Address `overflow` set to `hidden` in IE 8/9/10/11.
 */
button {
  overflow: visible; }

/**
 * Address inconsistent `text-transform` inheritance for `button` and `select`.
 * All other form control elements do not inherit `text-transform` values.
 * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
 * Correct `select` style inheritance in Firefox.
 */
button,
select {
  text-transform: none; }

/**
 * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
 *    and `video` controls.
 * 2. Correct inability to style clickable `input` types in iOS.
 * 3. Improve usability and consistency of cursor style between image-type
 *    `input` and others.
 */
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer; }

/**
 * Re-set default cursor for disabled elements.
 */
button[disabled],
html input[disabled] {
  cursor: default; }

/**
 * Remove inner padding and border in Firefox 4+.
 */
button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0; }

/**
 * Address Firefox 4+ setting `line-height` on `input` using `!important` in
 * the UA stylesheet.
 */
input {
  line-height: normal; }

/**
 * It's recommended that you don't attempt to style these elements.
 * Firefox's implementation doesn't respect box-sizing, padding, or width.
 *
 * 1. Address box sizing set to `content-box` in IE 8/9/10.
 * 2. Remove excess padding in IE 8/9/10.
 */
input[type="checkbox"],
input[type="radio"] {
  padding: 0; }

/**
 * Fix the cursor style for Chrome's increment/decrement buttons. For certain
 * `font-size` values of the `input`, it causes the cursor style of the
 * decrement button to change from `default` to `text`.
 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  height: auto; }

/**
 * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
 * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
 *    (include `-moz` to future-proof).
 */
input[type="search"] {
  -webkit-appearance: textfield;
  box-sizing: content-box; }

/**
 * Remove inner padding and search cancel button in Safari and Chrome on OS X.
 * Safari (but not Chrome) clips the cancel button when the search input has
 * padding (and `textfield` appearance).
 */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none; }

/**
 * Remove default vertical scrollbar in IE 8/9/10/11.
 */
textarea {
  overflow: auto; }

/**
 * Don't inherit the `font-weight` (applied by a rule above).
 * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
 */
optgroup {
  font-weight: bold; }

@font-face {
  font-family: proxima-nova;
  src: url(../../fonts/ProximaNova/ProximaNovaRegular.otf) format("opentype"); }
@font-face {
  font-family: proxima-nova-light;
  font-weight: light;
  src: url(../../fonts/ProximaNova/ProximaNovaLight.otf) format("opentype"); }
@font-face {
  font-family: proxima-nova-bold;
  font-weight: bold;
  src: url(../../fonts/ProximaNova/ProximaNovaBold.otf) format("opentype"); }
@font-face {
  font-family: proxima-nova-thin;
  src: url(../../fonts/ProximaNova/ProximaNovaThin.otf) format("opentype"); }
@font-face {
  font-family: proxima-nova-extra-bold;
  src: url(../../fonts/ProximaNova/ProximaNovaExtrabold.otf) format("opentype"); }
body {
  -webkit-font-smoothing: antialiased;
  font-family: proxima-nova;
  background-color: white; }

#worldwide {
  min-height: 750px;
  background-color: #ab84e4;
  padding: 100px 0; }

.ballride_style_title {
  font-size: 35px;
  font-family: proxima-nova-thin;
  text-align: center;
  margin: 30px 0 100px; }

.ballriders_style_about {
  width: 65%;
  margin: 0 auto;
  line-height: 40px;
  text-indent: 0px;
  font-size: 17px;
  font-family: proxima-nova-light; }

.people {
  font-family: proxima-nova-bold;
  font-weight: 900;
  color: #1b1b1b;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  margin-top: 50px;
  display: inline-block; }
  .people:hover {
    color: #1b1b1b; }

#how_you_can_help {
  min-height: 500px;
  padding: 60px 20px; }

.step {
  margin-bottom: 70px; }

.step_number {
  border-radius: 150px;
  border: dotted 2px #1b1b1b;
  background-color: #ab84e4;
  padding: 20px 25px;
  font-size: 18px;
  display: inline-block; }

.step_text {
  font-size: 18px;
  margin-left: 20px;
  display: inline-block;
  width: 70%;
  vertical-align: middle; }

.fingers_tutorial {
  text-align: left;
  margin-bottom: 70px; }
  .fingers_tutorial img {
    width: 80%; }

.fingers_tutorial_mobile {
  text-align: center; }
  .fingers_tutorial_mobile img {
    width: 100%; }

#subscribe {
  height: 500px;
  position: relative;
  background-color: black; }

.form_wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 450px;
  margin-left: -225px;
  height: 80px;
  margin-top: -40px; }
  .form_wrapper:hover .mail_input {
    padding-bottom: 10px; }

.mail_input {
  background-color: transparent;
  border: none;
  border-bottom: solid 3px #999;
  width: 100%;
  font-size: 25px;
  transition: 0.3s;
  color: white; }
  .mail_input:focus {
    outline: none;
    padding-bottom: 10px; }

.mail_send {
  opacity: 0;
  position: absolute;
  right: 0;
  top: -1px;
  font-size: 18px;
  transition: 0.3s;
  pointer-events: none;
  border: solid 3px #999;
  height: 50px;
  background-color: transparent;
  padding: 0 10px;
  font-family: proxima-nova-bold;
  color: #999; }
  .mail_send:hover {
    color: white; }

.subscription_complete {
  opacity: 0;
  transition: 0.3s;
  position: absolute;
  bottom: 150px;
  width: 100%;
  text-align: center;
  color: white; }

.email_emphasized {
  font-family: proxima-nova-bold;
  display: inline; }

.mail_send_show {
  opacity: 1;
  pointer-events: all; }

@media(max-width: 500px) {
  .form_wrapper {
    width: 280px;
    margin-left: -140px;
    top: 60%; }

  .mail_input {
    font-size: 15px; }

  .mail_send {
    font-size: 15px;
    top: -15px; }

  .step_text {
    font-size: 15px; }

  #how_you_can_help {
    padding: 60px 0px 0px; }

  .ballriders_style_about {
    width: 90%;
    text-align: justify; }

  .people {
    display: block;
    text-align: center; }

  #worldwide {
    padding: 60px 0; }

  .subscription_complete {
    padding: 0 15px;
    bottom: 50px; }

  #subscribe {
    height: 300px; }

  .steps {
    padding-left: 20px; } }

/*# sourceMappingURL=worldwide.css.map */


text:
package io.cisa.taxiiserver.domain.stix.types;

import org.springframework.data.mongodb.core.mapping.Field;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.cisa.taxiiserver.domain.stix.StixObject;

public class Relationship extends StixObject{
	/**
	 *
	 */
	private static final long serialVersionUID = 7673611325088916305L;

	@Field("relationship_type")
	@JsonProperty("relationship_type")
	private String relationshipType;

	@Field("description")
	private String description;

	@Field("source_ref")
	@JsonProperty("source_ref")
	private String sourceRef;

	@Field("target_ref")
	@JsonProperty("target_ref")
	private String targetRef;

	public String getRelationshipType() {
		return relationshipType;
	}

	public void setRelationshipType(String relationshipType) {
		this.relationshipType = relationshipType;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getSourceRef() {
		return sourceRef;
	}

	public void setSourceRef(String sourceRef) {
		this.sourceRef = sourceRef;
	}

	public String getTargetRef() {
		return targetRef;
	}

	public void setTargetRef(String targetRef) {
		this.targetRef = targetRef;
	}

}

redpajama_set_name: RedPajamaGithub


text:
package com.yanzhenjie.coolhttp.http;

import java.io.OutputStream;

/**
 * Created by Yan Zhenjie on 2017/1/8.
 */
public interface Binary {

    String mimeType();

    String fileName();

    long contentLength() throws Exception;

    void writeBinary(OutputStream outputStream) throws Exception;

}


text:
/*
 * Created on 04-Mar-2004
 * Author is Michael Camacho
 */
package pipe.views;

import pipe.constants.GUIConstants;
import pipe.controllers.PetriNetController;
import uk.ac.imperial.pipe.models.petrinet.Annotation;
import uk.ac.imperial.pipe.models.petrinet.AnnotationImpl;

import javax.swing.event.MouseInputAdapter;

import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.geom.AffineTransform;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.ArrayList;
import java.util.List;

/**
 * View representation of the annotation Petri net component
 */
@SuppressWarnings("serial")
public final class AnnotationView extends Note {

    /**
     * The number of points defined that can be dragged on the annotation to increase
     * its size
     */
    public static final int NO_DRAG_POINTS = 8;

    /**
     * Drag point locations on the annotation
     */
    private final List<ResizePoint> dragPoints = new ArrayList<>(NO_DRAG_POINTS);

    /**
     * Affine transform for drawing purposes. This transform is applied
     * to the rectange and can be used to rotate, stretch etc the annotation
     */
    private AffineTransform prova = new AffineTransform();

    /**
     * Constructor
     * @param annotation underlying annotation model
     * @param controller Petri net controller for the Petri net the annotation belongs to
     * @param parent parent container of this view
     * @param handler how the annotation will handle mouse events
     */
    public AnnotationView(Annotation annotation, PetriNetController controller, Container parent, MouseInputAdapter handler) {
        super(annotation, controller, parent);
        addChangeListener(annotation);
        setDragPoints();
        setMouseHandler(handler);
        updateBounds();
    }

    /**
     * Registers the handler to this view
     * @param handler how the annotation will handle mouse events
     */
    private void setMouseHandler(MouseInputAdapter handler) {
        addMouseListener(handler);
        addMouseMotionListener(handler);
        noteText.addMouseListener(handler);
        noteText.addMouseMotionListener(handler);
    }

    /**
     * Update the (x,y) and width height boundary of this view
     *
     * Implemented because the canvas has no layout manager
     */
    @Override
    public void updateBounds() {
        super.updateBounds();
        // TOP-LEFT
        dragPoints.get(0).setLocation(noteRect.getMinX(), noteRect.getMinY());
        // TOP-MIDDLE
        dragPoints.get(1).setLocation(noteRect.getCenterX(), noteRect.getMinY());
        // TOP-RIGHT
        dragPoints.get(2).setLocation(noteRect.getMaxX(), noteRect.getMinY());
        // MIDDLE-RIGHT
        dragPoints.get(3).setLocation(noteRect.getMaxX(), noteRect.getCenterY());
        // BOTTOM-RIGHT
        dragPoints.get(4).setLocation(noteRect.getMaxX(), noteRect.getMaxY());
        // BOTTOM-MIDDLE
        dragPoints.get(5).setLocation(noteRect.getCenterX(), noteRect.getMaxY());
        // BOTTOM-LEFT
        dragPoints.get(6).setLocation(noteRect.getMinX(), noteRect.getMaxY());
        // MIDDLE-LEFT
        dragPoints.get(7).setLocation(noteRect.getMinX(), noteRect.getCenterY());
    }

    /**
     * @param x coordinate
     * @param y coordinate
     * @return true if (x, y) intersect annotation location
     */
    @Override
    public boolean contains(int x, int y) {
        boolean pointContains = false;

        for (ResizePoint dragPoint : dragPoints) {
            pointContains |= dragPoint.contains(x - dragPoint.getX(), y - dragPoint.getY());
        }

        return super.contains(x, y) || pointContains;
    }

    /**
     * Listens for changes to the annotation model
     *
     * @param annotation model to register changes to
     */
    private void addChangeListener(Annotation annotation) {
        annotation.addPropertyChangeListener(new PropertyChangeListener() {
            @Override
            public void propertyChange(PropertyChangeEvent propertyChangeEvent) {
                String name = propertyChangeEvent.getPropertyName();
                if (name.equals(AnnotationImpl.TEXT_CHANGE_MESSAGE)) {
                    String text = (String) propertyChangeEvent.getNewValue();
                    setText(text);
                } else if (name.equals(Annotation.X_CHANGE_MESSAGE) || name.equals(Annotation.Y_CHANGE_MESSAGE)) {
                    updateBounds();
                }
            }
        });
    }

    /**
     * Creates drag points for all the corners and half way along
     * each edge
     */
    private void setDragPoints() {
        dragPoints.add(new ResizePoint(ResizePoint.TOP | ResizePoint.LEFT));
        dragPoints.add(new ResizePoint(ResizePoint.TOP));
        dragPoints.add(new ResizePoint(ResizePoint.TOP | ResizePoint.RIGHT));
        dragPoints.add(new ResizePoint(ResizePoint.RIGHT));
        dragPoints.add(new ResizePoint(ResizePoint.BOTTOM | ResizePoint.RIGHT));
        dragPoints.add(new ResizePoint(ResizePoint.BOTTOM));
        dragPoints.add(new ResizePoint(ResizePoint.BOTTOM | ResizePoint.LEFT));
        dragPoints.add(new ResizePoint(ResizePoint.LEFT));

        for (ResizePoint dragPoint : dragPoints) {
            ResizePointHandler handler = new ResizePointHandler(dragPoint);
            dragPoint.addMouseListener(handler);
            dragPoint.addMouseMotionListener(handler);
            add(dragPoint);
        }
    }

    /**
     * Paints the annotation and its text using the graphics
     * @param g graphics
     */
    @Override
    public void paintComponent(Graphics g) {
        super.paintComponent(g);

        Graphics2D g2 = (Graphics2D) g;
        prova = g2.getTransform();

        g2.setStroke(new BasicStroke(1.0f));
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);

        if (isSelected() && !ignoreSelection) {
            g2.setPaint(GUIConstants.SELECTION_FILL_COLOUR);
            g2.fill(noteRect);
            if (drawBorder) {
                g2.setPaint(GUIConstants.SELECTION_LINE_COLOUR);
                g2.draw(noteRect);
            }
        } else {
            g2.setPaint(GUIConstants.ELEMENT_FILL_COLOUR);
            /*

     */
            boolean fillNote = true;
            if (fillNote) {
                g2.fill(noteRect);
            }
            if (drawBorder) {
                g2.setPaint(GUIConstants.ELEMENT_LINE_COLOUR);
                g2.draw(noteRect);
            }
        }
        for (ResizePoint dragPoint : dragPoints) {
            dragPoint.paintOnCanvas(g);
        }
    }

    /**
     * Noop
     * @param container to add itself to
     */
    @Override
    public void addToContainer(Container container) {
        //Noop
    }

    /**
     * Noop
     */
    @Override
    public void componentSpecificDelete() {
        //Noop
    }

    /**
     * Deals with resizing of the annotation by handling mouse events
     */
    private class ResizePointHandler extends javax.swing.event.MouseInputAdapter {

        /**
         * Point to perform actions to
         */
        private final ResizePoint point;

        /**
         * Start point of resizing
         */
        private Point start;

        /**
         * Constructor
         * @param point the point to perform the resize to
         */
        public ResizePointHandler(ResizePoint point) {
            this.point = point;
        }

        /**
         * When the mouse is pressed on the point repaint it and set the start location
         * @param e mouse event
         */
        @Override
        public void mousePressed(MouseEvent e) {
            point.isPressed = true;
            point.repaint();
            start = e.getPoint();
        }

        /**
         * When the mouse is pressed on the point repaint it
         * @param e mouse event
         */
        @Override
        public void mouseReleased(MouseEvent e) {
            point.isPressed = false;
            updateBounds();
            point.repaint();
        }

        /**
         * When the mouse is dragged, drag the point using the set start point when the mouse was pressed
         * @param e mouse event
         */
        @Override
        public void mouseDragged(MouseEvent e) {
            point.drag(e.getX() - start.x, e.getY() - start.y);
            updateBounds();
            point.repaint();
        }

    }

    /**
     * Resizable point for changing the size of the annotation
     * These appear on the boarder of the annotation
     */
    public class ResizePoint extends javax.swing.JComponent {

        /**
         * Top horizontal of the annotation box
         */
        private static final int TOP = 1;

        /**
         * Bottom horizontal of the annotation box
         */
        private static final int BOTTOM = 2;

        /**
         * Left vertical of the annotation box
         */
        private static final int LEFT = 4;

        /**
         * Right vertical of the annotation box
         */
        private static final int RIGHT = 8;

        public final int typeMask;

        /**
         * Size of the point
         */
        private static final int SIZE = 3;

        /**
         * Graphical representation of each point
         */
        private Rectangle shape;

        /**
         * True if the point has been pressed
         */
        private boolean isPressed = false;

        /**
         * Constructor
         * @param type of point
         */
        public ResizePoint(int type) {
            setOpaque(false);
            setBounds(-SIZE - 1, -SIZE - 1, 2 * SIZE + GUIConstants.ANNOTATION_SIZE_OFFSET + 1,
                    2 * SIZE + GUIConstants.ANNOTATION_SIZE_OFFSET + 1);
            typeMask = type;
        }

        /**
         * Set the x,y location of the point
         * @param x coordinate
         * @param y coordinate
         */
        public void setLocation(double x, double y) {
            super.setLocation((int) (x - SIZE), (int) (y - SIZE));
        }

        /**
         * Drag the point by x, y
         * @param x coordinate
         * @param y coordinate
         */
        private void drag(int x, int y) {
            if ((typeMask & TOP) == TOP) {
                adjustTop(y);
            }
            if ((typeMask & BOTTOM) == BOTTOM) {
                adjustBottom(y);
            }
            if ((typeMask & LEFT) == LEFT) {
                adjustLeft(x);
            }
            if ((typeMask & RIGHT) == RIGHT) {
                adjustRight(x);
            }
        }

        /**
         * Paint the point on the canvas
         * @param g graphics
         */
        public void paintOnCanvas(Graphics g) {
            Graphics2D g2 = (Graphics2D) g;
            g2.setTransform(prova);
            if (isSelected() && !AbstractPetriNetViewComponent.ignoreSelection) {
                g2.translate(this.getLocation().x, this.getLocation().y);
                shape = new Rectangle(0, 0, 2 * SIZE, 2 * SIZE);
                g2.fill(shape);

                g2.setStroke(new BasicStroke(1.0f));
                g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                if (isPressed) {
                    g2.setPaint(GUIConstants.RESIZE_POINT_DOWN_COLOUR);
                } else {
                    g2.setPaint(GUIConstants.ELEMENT_FILL_COLOUR);
                }
                g2.fill(shape);
                g2.setPaint(GUIConstants.ELEMENT_LINE_COLOUR);
                g2.draw(shape);
                g2.setTransform(prova);
            }
        }
    }

}


text:
var allStates = 'Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware,\
              Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana,\
              Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana,\
              Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina,\
              North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina,\
              South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia,\
              Wisconsin, Wyoming';

var customPrimary = {
        '50': '#42b7fd',
        '100': '#28adfd',
        '200': '#0fa4fc',
        '300': '#0397ef',
        '400': '#0287d6',
        '500': '#0277bd',
        '600': '#0267a4',
        '700': '#01578b',
        '800': '#014771',
        '900': '#013758',
        'A100': '#5bc0fd',
        'A200': '#74cafe',
        'A400': '#8dd4fe',
        'A700': '#01283f'
    };


text:
import * as actions from './deviceActions';
import {Record} from 'immutable';
import {LOAD} from 'redux-storage';

const InitialState = Record({
  isMobile: false,
  platform: '',
  storageLoaded: false
});

const initialState = new InitialState;

export default function deviceReducer(state = initialState, action) {
  if (!(state instanceof InitialState)) return initialState.merge(state);

  switch (action.type) {

    case actions.SET_PLATFORM: {
      const {platform} = action.payload;
      return state.set('platform', platform);
    }

    case actions.STORAGE_ERROR:
    case LOAD: {
      return state.set('storageLoaded', true);
    }

  }

  return state;
}


text:
package compiler.syntax.nonTerminal;

public class SWriteInt extends NonTerminal {

	private Expresion expresion;

	public SWriteInt(Expresion expresion) {
		super();
		this.expresion = expresion;
	}

	public Expresion getExpresion() {
		return expresion;
	}
}


text:
namespace Microsoft.Azure.Management.WebSites.Models
{
    using System;
    using System.Linq;
    using System.Collections.Generic;
    using Newtonsoft.Json;
    using Microsoft.Rest;
    using Microsoft.Rest.Serialization;
    using Microsoft.Rest.Azure;

    /// <summary>
    /// Description of a Sku Capability
    /// </summary>
    public partial class Capability
    {
        /// <summary>
        /// Initializes a new instance of the Capability class.
        /// </summary>
        public Capability() { }

        /// <summary>
        /// Initializes a new instance of the Capability class.
        /// </summary>
        public Capability(string name = default(string), string value = default(string), string reason = default(string))
        {
            Name = name;
            Value = value;
            Reason = reason;
        }

        /// <summary>
        /// Name of the sku capability
        /// </summary>
        [JsonProperty(PropertyName = "name")]
        public string Name { get; set; }

        /// <summary>
        /// Value of the sku capability
        /// </summary>
        [JsonProperty(PropertyName = "value")]
        public string Value { get; set; }

        /// <summary>
        /// Reason of the sku capability
        /// </summary>
        [JsonProperty(PropertyName = "reason")]
        public string Reason { get; set; }

    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_launcher"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.whiteelephant.gifplayersample.LauncherActivity">

    <Button
        android:id="@+id/listners"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="listners" />

    <Button
        android:id="@+id/ice"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Ice Cream Delivery" />

    <Button
        android:id="@+id/skate"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Skating" />

    <Button
        android:id="@+id/join_us"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Join Us" />

    <Button
        android:id="@+id/order_confirm"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Order Confirm" />

    <Button
        android:id="@+id/dialog"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Dialog" />

</LinearLayout>


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Bifusella wallichi Rehill & B.M. Misra

### Remarks
null


text:
package day03;

import common.BaseSolution;
import common.InputReader;
import common.Solution;

public class Solution03 extends BaseSolution implements Solution {

    protected FrontPanel panel;

    public Solution03() throws FrontPanel.UnknownDirectionException {
        super();
        panel = new FrontPanel();
        System.out.println(panel);
        InputReader reader = getInputReader();
        // 'r' for red
        panel.handleInstructions('r', reader.next().split(","));
        // 'b' for blue
        panel.handleInstructions('b', reader.next().split(","));
    }

    public static void main(String[] args) throws Exception {
        new Solution03().run();
    }

    @Override
    public String part1() {
        return String.valueOf(panel.findClosestIntersectionDistanceManhattan());
    }

    @Override
    public String part2() {
        return String.valueOf(panel.findClosestIntersectionDistanceSteps());
    }
}


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.ComponentModel;

namespace Synology.Utilities
{
    public sealed class QueryStringParameter : GenericParameter
    {
        public QueryStringParameter(string name, string value, bool surroundBrackets = false) : base(name, value, surroundBrackets)
        {
        }

        public static string GetEnumDescription(Enum value)
        {
            if (value == null) return null;

            var type = value.GetType();
            var res = value.ToString();

            if (type.CustomAttributes.Any(t => t.AttributeType == typeof(FlagsAttribute)))
            {
                var members = type.GetMembers();
                var conversion = members.SelectMany(t => t.GetCustomAttributes(typeof(DescriptionAttribute), false).Select(a => new KeyValuePair<string, string>(t.Name, ((DescriptionAttribute)a).Description))).ToDictionary(t => t.Key, t => t.Value);

                res = string.Join(",", res.Split(',').Select(t => t.Trim()).Select(t => conversion.ContainsKey(t) ? conversion[t] : t));
            }
            else
            {
                var memInfo = type.GetMember(value.ToString());

                if (memInfo.Length > 0)
                {
                    var attrs = memInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false);

                    if (attrs.Length > 0)
                        res = ((DescriptionAttribute)attrs[0]).Description;
                }
            }

            return res;
        }

        public static string GetSortDirectionDescription(ListSortDirection? value)
        {
            if (value == null)
                return null;

            if (value == ListSortDirection.Ascending)
                return "asc";

            if (value == ListSortDirection.Descending)
                return "desc";

            return null;
        }

        public QueryStringParameter(string name, ListSortDirection? value) : this(name, GetSortDirectionDescription(value))
        {
        }

        public QueryStringParameter(string name, Enum value) : this(name, GetEnumDescription(value))
        {
        }

        public QueryStringParameter(string name, Enum value, bool surroundBrackets) : this(name, GetEnumDescription(value), surroundBrackets)
        {
        }

        public QueryStringParameter(string name, int? value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, double? value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, float? value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, decimal? value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, long? value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, short? value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, bool value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, char value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, uint? value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, ulong? value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, ushort? value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, IEnumerable value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, IEnumerable value, string separator) : base(name, value, separator)
        {
        }

        public QueryStringParameter(string name, IEnumerable<string> value) : base(name, value)
        {
        }

        public QueryStringParameter(string name, IEnumerable<string> value, bool surroundBrackets) : base(name, value, surroundBrackets)
        {
        }

        public QueryStringParameter(string name, IEnumerable<string> value, string separator) : base(name, value, separator)
        {
        }

        public QueryStringParameter(string name, object value) : base(name, value)
        {
        }

        public override string ToString()
        {
            return Empty ? string.Empty : $"{Name}={Value}";
        }
    }
}


text:
#include <string.h>

#include <cntr2/iobject.h>
#include <cntr2/iset.h>
#include <cntr2/iitr.h>
#include <cntr2/ifactory.h>
#include <cntr2/osplay.h>
#include <cntr2/oallocator.h>

#include <util/splay_link.h>
#include <memheap/heap_global.h>

/* this module defines a left-lean red black tree container, which implements iset interface. */

enum splay_interfaces {
	e_object,
	e_set,
	e_mset,
	e_l_count
};

struct osplay_node {
	struct splaylink             link;

	unknown*                     reference;
};

struct osplay_itr {
	address                       __offset;
	pf_cast                       __cast;

	/* there is always one interface to implement, since the interface is inherited */
	struct base_interface         __iftable[itr_interface_count];

	/* the iterator will never alloc memory, when acquire an iterator, the container will
	 * alloc the memory, but we should know how to delete this memory */
	allocator                     allocator;
	struct osplay*                container;

	struct splaylink*             current;
};

/* binary search tree */
struct osplay {
	address                       __offset;
	pf_cast                       __cast;

	struct base_interface         __iftable[e_l_count];

	/* just a sentinel to represent the end of the tree, the maximum element of the tree */
	struct splaylink              sentinel;
	/* __root == __sentinel.left */
	struct splaylink*             root;

	int                           size;

	unknown_traits                content_traits;

	/* methods to manage the inner memory use by the container */
	allocator                     allocator;
	bool                          allocator_join_ondispose;

	struct osplay_itr             itr_begin;
	struct osplay_itr             itr_end;
};

static struct iobject_vtable __osplay_iobject_vtable = {
	splayset_destroy,          /* __destroy */
	splayset_clone,            /* __clone */
	splayset_equals,           /* __equals */
	splayset_compare_to,       /* __compare_to */
	splayset_hashcode,         /* __hashcode */
};

static struct iset_vtable __osplay_iset_vtable = {
	splayset_clear,            /* __clear */
	splayset_size,             /* __size */
	splayset_empty,            /* __empty */
	splayset_insert_s,         /* __insert */
	splayset_replace_s,        /* __replace */
	splayset_contains,         /* __contains */
	splayset_remove_s,         /* __remove */

	splayset_itr_create,       /* __itr_create */
	splayset_itr_assign,       /* __itr_assign */
	splayset_itr_find_s,       /* __itr_find */
	splayset_itr_remove,       /* __itr_remove */
	splayset_itr_begin,        /* __itr_begin */
	splayset_itr_end           /* __itr_end */
};

static struct imset_vtable __osplay_imset_vtable = {
	splayset_clear,            /* __clear */
	splayset_size,             /* __size */
	splayset_empty,            /* __empty */
	splayset_insert_m,         /* __insert */
	splayset_contains,         /* __contains */
	splayset_count_m,          /* __count */
	splayset_remove_m,         /* __remove */

	splayset_itr_create,       /* __itr_create */
	splayset_itr_assign,       /* __itr_assign */
	splayset_itr_find_lower_m, /* __itr_find_lower */
	splayset_itr_find_upper_m, /* __itr_find_upper */
	splayset_itr_remove,       /* __itr_remove */
	splayset_itr_begin,        /* __itr_begin */
	splayset_itr_end           /* __itr_end */
};

static unknown* osplay_itr_cast(unknown* x, unique_id inf_id);
static unknown* osplay_cast(unknown* x, unique_id intf_id);

static void osplay_itr_destroy(iterator citr);
static iterator osplay_itr_clone(const_iterator citr);
static bool osplay_itr_equals(const_iterator a, const_iterator b);
static int osplay_itr_compare_to(const_iterator itr, const_iterator other);
static hashcode osplay_itr_hashcode(const_iterator itr);
static unknown* osplay_itr_get_obj(const_iterator citr);
static void osplay_itr_set_obj(iterator citr, const unknown* n_ref);
static const unknown* osplay_itr_get_ref(const_iterator citr);
static void osplay_itr_swap_ref(iterator citr, iterator other);
static void osplay_itr_to_next(iterator citr);
static void osplay_itr_to_prev(iterator citr);

static struct iobject_vtable __osplay_itr_iobject_vtable = {
	osplay_itr_destroy,      /* __destroy */
	osplay_itr_clone,        /* __clone   */
	osplay_itr_equals,       /* __equals  */
	osplay_itr_compare_to,   /* __compare_to */
	osplay_itr_hashcode
};

static struct itr_bidirectional_vtable __osplay_itr_vtable = {
	osplay_itr_get_obj,      /* __get_obj */
	osplay_itr_get_ref,      /* __get_ref */
	osplay_itr_set_obj,      /* __set_obj */
	osplay_itr_swap_ref,     /* __swap_ref */
	osplay_itr_to_next,      /* __to_next */
	osplay_itr_to_prev       /* __to_prev */
};

static void osplay_itr_destroy(_object* citr) {
	struct osplay_itr* itr = (struct osplay_itr*)citr;

	dbg_assert(__is_object(citr));
	dbg_assert(itr->__cast == osplay_itr_cast);

	/* destroy itself */
	allocator_dealloc(itr->allocator, itr);
}

static iterator osplay_itr_clone(const_iterator citr) {
	struct osplay_itr* itr = (struct osplay_itr*)citr;
	struct osplay_itr* n_itr = NULL;

	dbg_assert(__is_object(citr));
	dbg_assert(itr->__cast == osplay_itr_cast);

	/* destroy itself */
	n_itr = (struct osplay_itr*)allocator_alloc(itr->allocator, sizeof(struct osplay_itr));

	memcpy (n_itr, itr, sizeof(struct osplay_itr));
	/* this is error prone */
	n_itr->__offset = n_itr;

	return (iterator)n_itr;
}

static bool osplay_itr_equals(const_iterator a, const_iterator b) {
	const struct osplay_itr* itr_a = (const struct osplay_itr*)a;
	const struct osplay_itr* itr_b = (const struct osplay_itr*)b;

	dbg_assert(__is_object((unknown*)a));
	dbg_assert(__is_object((unknown*)b));
	dbg_assert(itr_a->__cast == osplay_itr_cast);
	dbg_assert(itr_b->__cast == osplay_itr_cast);

	return itr_a->current == itr_b->current;
}

static int osplay_itr_compare_to(const_iterator itr, const_iterator other) {
	// TODO
	return 0;
}
static hashcode osplay_itr_hashcode(const_iterator itr) {
	// TODO
	return 0;
}

static unknown* osplay_itr_get_obj(const_iterator citr) {
	const struct osplay_itr* itr   = (const struct osplay_itr*)citr;
	const struct osplay_node* node = NULL;
	struct osplay* container = itr->container;

	dbg_assert(itr->__cast == osplay_itr_cast);
	dbg_assert(itr->current != NULL);

	node = container_of(itr->current, struct osplay_node, link);

	//return node->reference;
	return container->content_traits.__clone(node->reference, (pf_alloc)__global_default_alloc, __global_default_heap);
}

static void osplay_itr_set_obj(iterator citr, const unknown* n_ref) {
	/* splay does not permit to set ref, which would destroy the inner data structure. */
	unused(citr);
	unused(n_ref);

	rt_error("osplay iterator is not accessible");

	return;
}

static const unknown* osplay_itr_get_ref(const_iterator citr) {
	const struct osplay_itr* itr   = (const struct osplay_itr*)citr;
	const struct osplay_node* node = NULL;
	//struct osplay* container = itr->container;

	dbg_assert(itr->__cast == osplay_itr_cast);
	dbg_assert(itr->current != NULL);

	node = container_of(itr->current, struct osplay_node, link);

	return node->reference;
}

static void osplay_itr_swap_ref(iterator citr, iterator other) {
	/* splay does not permit to set ref, which would destroy the inner data structure. */
	unused(citr);
	unused(other);

	rt_error("osplay iterator is not accessible");

	return;
}

static void osplay_itr_to_next(_object* citr) {
	struct osplay_itr* itr = (struct osplay_itr*)citr;

	dbg_assert(itr->__cast == osplay_itr_cast);
	dbg_assert(itr->current != NULL);

	itr->current = splay_successor(itr->current, false);
}

static void osplay_itr_to_prev(_object* citr) {
	struct osplay_itr* itr = (struct osplay_itr*)citr;

	dbg_assert(itr->__cast == osplay_itr_cast);
	dbg_assert(itr->current != NULL);

	itr->current = splay_predesessor(itr->current, false);
}

static unknown* osplay_cast(unknown* x, unique_id intf_id) {
	struct osplay* o = (struct osplay*)x;

	dbg_assert(__is_object(x));

	switch (intf_id) {
	case IOBJECT_ID:
		return (unknown*)&o->__iftable[e_object];
		break;
	case ISET_ID:
		return (unknown*)&o->__iftable[e_set];
		break;
	case IMSET_ID:
		return (unknown*)&o->__iftable[e_mset];
		break;
	default:
		break;
	}

	return NULL;
}

static unknown* osplay_itr_cast(unknown* x, unique_id inf_id) {
	struct osplay_itr* itr = (struct osplay_itr*)x;

	dbg_assert(__is_object(itr));

	switch (inf_id) {
	case IOBJECT_ID:
		return (unknown*)&itr->__iftable[itr_interface_iobject];
	case ITR_REF_ID:
	case ITR_FWD_ID:
	case ITR_BID_ID:
		return (unknown*)&itr->__iftable[itr_interface_iterator];
	case ITR_ACC_ID:
		return NULL;
	case ITR_RAC_ID:
		return NULL;
	default:
		return NULL;
	}

	return NULL;
}

static compres osplay_splaylink_compare(const struct splaylink* a, const struct splaylink* b, void* param) {
	pf_ibridge_compare ref_comp = (pf_ibridge_compare)param;

	struct osplay_node* node_a = container_of(a, struct osplay_node, link);
	struct osplay_node* node_b = container_of(b, struct osplay_node, link);

	return ref_comp(node_a->reference, node_b->reference);
}

static void osplay_itr_com_init(struct osplay_itr* itr, struct osplay* list);
static _object* splayset_create_internal(unknown_traits* traits, allocator alc) {
	struct osplay* osplay = NULL;
	bool managed_allocator = false;

	if (alc == NULL) {
		alc = allocator_mpool_spawn(__global_default_allocator, 10);
		managed_allocator = true;
	}

	osplay = (struct osplay*)allocator_alloc(alc, sizeof(struct osplay));

	osplay->__offset = osplay;
	osplay->__cast   = osplay_cast;

	osplay->__iftable[e_object].__offset = (address)e_object;
	osplay->__iftable[e_object].__vtable = &__osplay_iobject_vtable;
	osplay->__iftable[e_set].__offset = (address)e_set;
	osplay->__iftable[e_set].__vtable = &__osplay_iset_vtable;
	osplay->__iftable[e_mset].__offset = (address)e_mset;
	osplay->__iftable[e_mset].__vtable = &__osplay_imset_vtable;

	osplay->size      = 0;

	// make sure the content is comparable.
	dbg_assert(traits->__compare_to != NULL);
	osplay->content_traits.__destroy    = traits->__destroy;
	osplay->content_traits.__clone      = traits->__clone;
	osplay->content_traits.__compare_to = traits->__compare_to;
	osplay->content_traits.__equals     = traits->__equals;
	osplay->content_traits.__hashcode   = traits->__hashcode;

	osplay->root      = NULL;
	osplay->sentinel.left   = NULL;
	osplay->sentinel.right  = NULL;
	osplay->sentinel.parent = NULL;

	osplay->allocator = alc;
	osplay->allocator_join_ondispose = managed_allocator;

	/* initialize begin/end iterators, the position is reassigned when each query */
	osplay_itr_com_init(&osplay->itr_begin, osplay);
	osplay_itr_com_init(&osplay->itr_end, osplay);

	return (_object*)osplay;
}

_object* splayset_create(unknown_traits* content_traits, allocator alc) {
	return splayset_create_internal(content_traits, alc);
}

/* from ifactory.h  */
_object* cntr_create_osplay(unknown_traits* content_traits) {
	return splayset_create_internal(content_traits, __global_default_allocator);
}
_object* cntr_create_osplay_a(unknown_traits* content_traits, allocator alc) {
	return splayset_create_internal(content_traits, alc);
}

void splayset_destroy(_object* o) {
	struct osplay* osplay = (struct osplay*)o;
	allocator alc = osplay->allocator;
	bool join_alc = osplay->allocator_join_ondispose;

	splayset_clear(o);

	allocator_dealloc(alc, osplay);

	if (join_alc) {
		allocator_join(alc);
	}
}

_object* splayset_clone(const _object* o) {
	// TODO
	return NULL;
}
bool splayset_equals(const _object* o, const _object* other) {
	// TODO
	return false;
}
int splayset_compare_to(const _object* o, const _object* other) {
	// TODO
	return 1;
}
hashcode splayset_hashcode(const _object* o) {
	// TODO
	return (hashcode)NULL;
}

typedef void (*pf_per_link_operation)(struct splaylink* link, void* param);
static void splay_traverse(struct splaylink* cur, pf_per_link_operation cb, void* param) {
	if (cur == NULL) return;

	splay_traverse(cur->left, cb, param);
	splay_traverse(cur->right, cb, param);
	cb(cur, param);
}

static inline void osplay_detach_sentinel(struct osplay* osplay) {
	if (osplay->root != NULL)
		osplay->root->parent = NULL;

	osplay->sentinel.left = NULL;
}

/* we have to re-associate the sentinel and the root node after we change the tree */
static inline void osplay_attach_sentinel(struct osplay* osplay) {
	osplay->sentinel.left = osplay->root;

	if (osplay->root != NULL)
		osplay->root->parent = &osplay->sentinel;
}

static void splaylink_dispose(struct splaylink* link, void* param) {
	struct osplay_node* node = container_of(link, struct osplay_node, link);
	struct osplay* osplay = (struct osplay*)param;

	osplay->content_traits.__destroy(node->reference, (pf_dealloc)allocator_release, osplay->allocator);

	/* delete the node it self */
	allocator_dealloc(osplay->allocator, node);
}
void splayset_clear(_object* o) {
	struct osplay* osplay = (struct osplay*)o;

	splay_traverse(osplay->root, splaylink_dispose, (void*)osplay);

	osplay->root = NULL;
	osplay_attach_sentinel(osplay);
	osplay->size = 0;
}

int splayset_size(const _object* o) {
	struct osplay* osplay = (struct osplay*)o;

	return osplay->size;
}

bool splayset_empty(const _object* o) {
	struct osplay* osplay = (struct osplay*)o;
	return osplay->size == 0;
}

/* initialize all part of an iterator except the __current position */
static void osplay_itr_com_init(struct osplay_itr* itr, struct osplay* list) {
	itr->__offset = itr;
	itr->__cast   = osplay_itr_cast;

	itr->__iftable[itr_interface_iobject].__offset = (address)itr_interface_iobject;
	itr->__iftable[itr_interface_iobject].__vtable = (unknown*)&__osplay_itr_iobject_vtable;
	itr->__iftable[itr_interface_iterator].__offset = (address)itr_interface_iterator;
	itr->__iftable[itr_interface_iterator].__vtable = (unknown*)&__osplay_itr_vtable;

	itr->allocator = list->allocator;
	itr->container = list;
	/* itr->__current = NULL; */
}

const_iterator splayset_itr_begin(const _object* o) {
	struct osplay* osplay = (struct osplay*)o;

	osplay->itr_begin.current = splay_min(osplay->root);

	return (iterator)&osplay->itr_begin;
}

const_iterator splayset_itr_end(const _object* o) {
	struct osplay* osplay = (struct osplay*)o;

	osplay->itr_end.current = &osplay->sentinel;

	return (iterator)&osplay->itr_end;
}

iterator splayset_itr_create(const _object* o, itr_pos pos) {
	struct osplay* osplay = (struct osplay*)o;
	struct osplay_itr* n_itr = (struct osplay_itr*)
		allocator_alloc(osplay->allocator, sizeof(struct osplay_itr));

	osplay_itr_com_init(n_itr, osplay);

	if (pos == itr_begin) {
		if (osplay->root == NULL) {
			n_itr->current = &osplay->sentinel;
		} else {
			n_itr->current = splay_min(osplay->root);
		}
	}
	else if (pos == itr_end) {
		n_itr->current = &osplay->sentinel;
	}
	else {
		dbg_assert(false);
	}

	return (_object*)n_itr;
}

void splayset_itr_assign(const _object* o, iterator itr, itr_pos pos) {
	struct osplay* osplay = (struct osplay*)o;
	struct osplay_itr* n_itr = (struct osplay_itr*)itr;

	osplay_itr_com_init(n_itr, osplay);

	if (pos == itr_begin) {
		if (osplay->root == NULL) {
			n_itr->current = &osplay->sentinel;
		} else {
			n_itr->current = splay_min(osplay->root);
		}
	}
	else if (pos == itr_end){
		/* __sentinel will be the maximum element in the tree */
		n_itr->current = &osplay->sentinel;
	}
	else {
		dbg_assert(false);
	}
}

struct direct_s {
	pf_ibridge_compare  comp;
	const unknown*   target;
	const struct splaylink* candidate; /* only useful for multiple instances */
};

static int osplay_direct(const struct splaylink* link, void* param) {
	struct osplay_node* node = container_of(link, struct osplay_node, link);
	struct direct_s* dir    = (struct direct_s*)param;
	int    compr            = 0;

	compr = dir->comp(node->reference, dir->target);

	if (compr == 0)
		return 0;
	else if (compr < 0) /* we should expose right side */
		return 1;
	else
		return -1;
}

static int osplay_direct_lower(const struct splaylink* link, void* param) {
	struct osplay_node* node = container_of(link, struct osplay_node, link);
	struct direct_s* dir    = (struct direct_s*)param;
	int    compr            = 0;

	compr = dir->comp(node->reference, dir->target);

	if (compr == 0) {
		dir->candidate = link; /* update the candidate */
		return -1; /* explore the left side */
	}
	else if (compr < 0) /* we should explore right side */
		return 1;
	else {
		dir->candidate = link;
		return -1;
	}

	/* never been here */
	return 0;
}

static int osplay_direct_upper(const struct splaylink* link, void* param) {
	struct osplay_node* node = container_of(link, struct osplay_node, link);
	struct direct_s* dir    = (struct direct_s*)param;
	int    compr            = 0;

	compr = dir->comp(node->reference, dir->target);

	if (compr == 0) {
		return 1; /* explore the right side */
	}
	else if (compr < 0) /* we should explore right side */
		return 1;
	else {
		dir->candidate = link; /* update the candidate */
		return -1;
	}

	/* never been here */
	return 0;
}

void splayset_itr_find_s(const _object* o, iterator itr, const unknown* __ref) {
	struct osplay* osplay    = (struct osplay*)o;
	struct osplay_itr* oitr  = (struct osplay_itr*)itr;
	struct direct_s   dir    = { osplay->content_traits.__compare_to, __ref, NULL };
	struct splaylink* find_res = NULL;

	osplay_detach_sentinel(osplay);
	find_res = splay_dynamic_search(&osplay->root, osplay_direct, &dir);
	osplay_attach_sentinel(osplay);

	dbg_assert(dir.candidate == NULL);

	/* make sure the iterator type is right */
	dbg_assert(itr->__iftable[itr_interface_iterator].__offset == (address)itr_interface_iterator);
	dbg_assert(itr->__iftable[itr_interface_iterator].__vtable == (unknown*)&__osplay_itr_vtable);

	if (find_res != NULL) {
		oitr->current = find_res;
	}
	else {
		oitr->current = &osplay->sentinel;
	}
}

void splayset_itr_find_lower_m(const _object* o, iterator itr, const unknown* __ref) {
	struct osplay* osplay    = (struct osplay*)o;
	struct osplay_itr* oitr  = (struct osplay_itr*)itr;
	struct direct_s   dir    = { osplay->content_traits.__compare_to, __ref, NULL };
	struct splaylink* link  = NULL;

	osplay_detach_sentinel(osplay);
	link = splay_dynamic_search(&osplay->root, osplay_direct_lower, &dir);
	osplay_attach_sentinel(osplay);

	dbg_assert(link == NULL); /* we will always direct down */
	link = (struct splaylink*)dir.candidate;    /* the last candidate, the most closed to leaf one, is what we want */

	/* make sure the iterator type is right */
	dbg_assert(itr->__iftable[itr_interface_iterator].__offset == (address)itr_interface_iterator);
	dbg_assert(itr->__iftable[itr_interface_iterator].__vtable == (unknown*)&__osplay_itr_vtable);

	if (link != NULL) {
		oitr->current = link;
	}
	else {
		oitr->current = &osplay->sentinel;
	}
}

void splayset_itr_find_upper_m(const _object* o, iterator itr, const unknown* __ref) {
	struct osplay* osplay    = (struct osplay*)o;
	struct osplay_itr* oitr  = (struct osplay_itr*)itr;
	struct direct_s   dir    = { osplay->content_traits.__compare_to, __ref, NULL };
	struct splaylink* link  = NULL;

	osplay_detach_sentinel(osplay);
	link = splay_dynamic_search(&osplay->root, osplay_direct_upper, &dir);
	osplay_attach_sentinel(osplay);

	dbg_assert(link == NULL); /* we will always direct down */
	link = (struct splaylink*)dir.candidate;

	/* make sure the iterator type is right */
	dbg_assert(itr->__iftable[itr_interface_iterator].__offset == (address)itr_interface_iterator);
	dbg_assert(itr->__iftable[itr_interface_iterator].__vtable == (unknown*)&__osplay_itr_vtable);

	if (link != NULL) {
		oitr->current = link;
	}
	else {
		oitr->current = &osplay->sentinel;
	}
}

void splayset_insert_s(_object* o, const unknown* __ref) {
	struct osplay* osplay    = (struct osplay*)o;
	struct osplay_node* node = (struct osplay_node*)
		allocator_alloc(osplay->allocator, sizeof(struct osplay_node));
	struct splaylink* duplicated = NULL;

	/* just assign the reference, delay the clone operation if there is no duplicates */
	node->reference = (unknown*)__ref;

	osplay_detach_sentinel(osplay);
	osplay->root = splay_insert_sv(osplay->root, &node->link, osplay_splaylink_compare, osplay->content_traits.__compare_to, &duplicated);
	osplay_attach_sentinel(osplay);

	if (duplicated != NULL) {
		dbg_assert(osplay_splaylink_compare(&node->link, duplicated, osplay->content_traits.__compare_to) == 0);

		allocator_dealloc(osplay->allocator, node);
	} else {
		osplay->size ++;
		node->reference = osplay->content_traits.__clone(__ref, (pf_alloc)allocator_acquire, osplay->allocator);
	}
}

void splayset_replace_s(_object* o, const unknown* __ref) {
	struct osplay* osplay    = (struct osplay*)o;
	struct osplay_node* node = (struct osplay_node*)
		allocator_alloc(osplay->allocator, sizeof(struct osplay_node));
	struct splaylink* duplicated = NULL;

	node->reference = osplay->content_traits.__clone(__ref, (pf_alloc)allocator_acquire, osplay->allocator);

	osplay_detach_sentinel(osplay);
	osplay->root = splay_insert_sv(osplay->root, &node->link, osplay_splaylink_compare, osplay->content_traits.__compare_to, &duplicated);
	osplay_attach_sentinel(osplay);

	if (duplicated != NULL) {
		struct osplay_node* dup_node = container_of(duplicated, struct osplay_node, link);
		unknown* old_ref = dup_node->reference;

		dbg_assert(osplay_splaylink_compare(&node->link, duplicated, osplay->content_traits.__compare_to) == 0);

		/* assign the duplicate node a new reference */
		dup_node->reference = node->reference;

		allocator_dealloc(osplay->allocator, node);

		osplay->content_traits.__destroy(old_ref, (pf_dealloc)allocator_release, osplay->allocator);;
	} else {
		osplay->size ++;
	}
}

void splayset_insert_m(_object* o, const unknown* __ref) {
	struct osplay* osplay     = (struct osplay*)o;
	struct osplay_node* node = (struct osplay_node*)
		allocator_alloc(osplay->allocator, sizeof(struct osplay_node));

	node->reference = osplay->content_traits.__clone(__ref, (pf_alloc)allocator_acquire, osplay->allocator);

	osplay_detach_sentinel(osplay);
	osplay->root = splay_insert_v(osplay->root, &node->link, osplay_splaylink_compare, osplay->content_traits.__compare_to);
	osplay_attach_sentinel(osplay);

	osplay->size ++;
	return;
}

bool splayset_contains(const _object* o, const unknown* __ref) {
	struct osplay* osplay   = (struct osplay*)o;
	struct direct_s   dir   = { osplay->content_traits.__compare_to, __ref, NULL };
	struct splaylink* link = NULL;

	osplay_detach_sentinel(osplay);
	link = splay_dynamic_search(&osplay->root, osplay_direct, &dir);
	osplay_attach_sentinel(osplay);

	if (link != NULL) {
		return true;
	}

	return false;
}

int splayset_count_m(const _object* o, const unknown* __ref) {
	struct osplay*     osplay   = (struct osplay*)o;
	struct direct_s   dir       = { osplay->content_traits.__compare_to, __ref, NULL };
	const struct splaylink* lb = NULL;

	osplay_detach_sentinel(osplay);
	lb = splay_dynamic_search(&osplay->root, osplay_direct_lower, &dir);
	dbg_assert(lb == NULL);
	osplay_attach_sentinel(osplay);

	lb = (dir.candidate);
	dir.candidate = NULL;
	if (lb != NULL) {
		const struct splaylink* ub = splay_search(osplay->root, osplay_direct_upper, &dir);
		int count = 0;

		dbg_assert(ub == NULL);
		ub = (dir.candidate);

		if (ub == NULL)
			ub = &osplay->sentinel;

		while (lb != ub) {
			count ++;
			lb = splay_successor(lb, false);
		}

		return count;
	}

	return 0;
}

bool splayset_remove_s(_object* o, const unknown* __ref) {
	struct osplay* osplay   = (struct osplay*)o;
	struct direct_s   dir   = { osplay->content_traits.__compare_to, __ref, NULL };
	struct splaylink* link = NULL;

	osplay_detach_sentinel(osplay);
	link = splay_dynamic_search(&osplay->root, osplay_direct, &dir);
	osplay_attach_sentinel(osplay);

	if (link != NULL) {
		struct osplay_node* node = container_of(link, struct osplay_node, link);

		osplay_detach_sentinel(osplay);
		osplay->root = splay_remove_v(osplay->root, link, osplay_splaylink_compare, osplay->content_traits.__compare_to);
		osplay_attach_sentinel(osplay);

		osplay->content_traits.__destroy(node->reference, (pf_dealloc)allocator_release, osplay->allocator);

		allocator_dealloc(osplay->allocator, node);

		osplay->size --;

		return true;
	}

	return false;
}

int splayset_remove_m(_object* o, const unknown* __ref) {
	struct osplay* osplay   = (struct osplay*)o;
	struct direct_s   dir   = { osplay->content_traits.__compare_to, __ref, NULL };
	struct splaylink* link = NULL;
	int count = 0;

	osplay_detach_sentinel(osplay);
	link = splay_dynamic_search(&osplay->root, osplay_direct, &dir);
	osplay_attach_sentinel(osplay);

	while (link != NULL) {
		struct osplay_node* node = container_of(link, struct osplay_node, link);

		osplay_detach_sentinel(osplay);
		osplay->root = splay_remove_v(osplay->root, link, osplay_splaylink_compare, osplay->content_traits.__compare_to);
		osplay_attach_sentinel(osplay);

		osplay->content_traits.__destroy(node->reference, (pf_dealloc)allocator_release, osplay->allocator);

		allocator_dealloc(osplay->allocator, node);

		osplay->size --;
		count ++;

		osplay_detach_sentinel(osplay);
		link = splay_dynamic_search(&osplay->root, osplay_direct, &dir);
		osplay_attach_sentinel(osplay);
	}

	return count;
}

void splayset_itr_remove(_object* o, iterator itr) {
	struct osplay* osplay    = (struct osplay*)o;
	struct osplay_itr* oitr  = (struct osplay_itr*)itr;
	struct osplay_node* node = container_of(oitr->current, struct osplay_node, link);

	dbg_assert(oitr->__cast == osplay_itr_cast);
	dbg_assert(oitr->current != NULL);

	osplay_detach_sentinel(osplay);
	osplay->root = splay_remove_v(osplay->root, &node->link, osplay_splaylink_compare, osplay->content_traits.__compare_to);
	osplay_attach_sentinel(osplay);

	osplay->content_traits.__destroy(node->reference, (pf_dealloc)allocator_release, osplay->allocator);
	allocator_dealloc(osplay->allocator, node);

	/* invalidate the iterator */
	oitr->current = NULL;

	osplay->size --;
}


text:
'use strict';

var directivesModule = require('./_index');

function modalDialog() {
  return {
    restrict: 'E',
    scope: {
      show: '='
    },
    replace: true,
    transclude: true,
    link: function (scope, element) {
      // Gambis para não mostrar modal ao carregar a tela
      setTimeout(function () {
        element.removeAttr('style');
      }, 1000);

      scope.hideModal = function () {
        scope.show = false;
      };
    },
    templateUrl: 'partials/template-modal'
  };
}

directivesModule.directive('modalDialog', modalDialog);


text:
Swiftmailer
===========

The *SwiftmailerServiceProvider* provides a service for sending email through
the `Swift Mailer <http://swiftmailer.org>`_ library.

You can use the ``mailer`` service to send messages easily. By default, it
will attempt to send emails through SMTP.

Parameters
----------

* **swiftmailer.use_spool**: A boolean to specify whether or not to use the
  memory spool, defaults to true.

* **swiftmailer.options**: An array of options for the default SMTP-based
  configuration.

  The following options can be set:

  * **host**: SMTP hostname, defaults to 'localhost'.
  * **port**: SMTP port, defaults to 25.
  * **username**: SMTP username, defaults to an empty string.
  * **password**: SMTP password, defaults to an empty string.
  * **encryption**: SMTP encryption, defaults to null. Valid values are 'tls', 'ssl', or null (indicating no encryption).
  * **auth_mode**: SMTP authentication mode, defaults to null. Valid values are 'plain', 'login', 'cram-md5', or null.

  Example usage::

    $app['swiftmailer.options'] = array(
        'host' => 'host',
        'port' => '25',
        'username' => 'username',
        'password' => 'password',
        'encryption' => null,
        'auth_mode' => null
    );

* **swiftmailer.sender_address**: If set, all messages will be delivered with
  this address as the "return path" address.

* **swiftmailer.delivery_addresses**: If not empty, all email messages will be
  sent to those addresses instead of being sent to their actual recipients. This
  is often useful when developing.

* **swiftmailer.delivery_whitelist**: Used in combination with
  ``delivery_addresses``. If set, emails matching any of these patterns will be
  delivered like normal, as well as being sent to ``delivery_addresses``.

* **swiftmailer.plugins**: Array of SwiftMailer plugins.

  Example usage::

    $app['swiftmailer.plugins'] = function ($app) {
        return array(
            new \Swift_Plugins_PopBeforeSmtpPlugin('pop3.example.com'),
        );
    };

Services
--------

* **mailer**: The mailer instance.

  Example usage::

    $message = \Swift_Message::newInstance();

    // ...

    $app['mailer']->send($message);

* **swiftmailer.transport**: The transport used for e-mail
  delivery. Defaults to a ``Swift_Transport_EsmtpTransport``.

* **swiftmailer.transport.buffer**: StreamBuffer used by
  the transport.

* **swiftmailer.transport.authhandler**: Authentication
  handler used by the transport. Will try the following
  by default: CRAM-MD5, login, plaintext.

* **swiftmailer.transport.eventdispatcher**: Internal event
  dispatcher used by Swiftmailer.

Registering
-----------

.. code-block:: php

    $app->register(new Silex\Provider\SwiftmailerServiceProvider());

.. note::

    Add SwiftMailer as a dependency:

    .. code-block:: bash

        composer require swiftmailer/swiftmailer

Usage
-----

The Swiftmailer provider provides a ``mailer`` service::

    use Symfony\Component\HttpFoundation\Request;

    $app->post('/feedback', function (Request $request) use ($app) {
        $message = \Swift_Message::newInstance()
            ->setSubject('[YourSite] Feedback')
            ->setFrom(array('noreply@yoursite.com'))
            ->setTo(array('feedback@yoursite.com'))
            ->setBody($request->get('message'));

        $app['mailer']->send($message);

        return new Response('Thank you for your feedback!', 201);
    });

Usage in commands
~~~~~~~~~~~~~~~~~

By default, the Swiftmailer provider sends the emails using the ``KernelEvents::TERMINATE``
event, which is fired after the response has been sent. However, as this event
isn't fired for console commands, your emails won't be sent.

For that reason, if you send emails using a command console, it is recommended
that you disable the use of the memory spool (before accessing ``$app['mailer']``)::

    $app['swiftmailer.use_spool'] = false;

Alternatively, you can just make sure to flush the message spool by hand before
ending the command execution. To do so, use the following code::

    $app['swiftmailer.spooltransport']
        ->getSpool()
        ->flushQueue($app['swiftmailer.transport'])
    ;

Traits
------

``Silex\Application\SwiftmailerTrait`` adds the following shortcuts:

* **mail**: Sends an email.

.. code-block:: php

    $app->mail(\Swift_Message::newInstance()
        ->setSubject('[YourSite] Feedback')
        ->setFrom(array('noreply@yoursite.com'))
        ->setTo(array('feedback@yoursite.com'))
        ->setBody($request->get('message')));

For more information, check out the `Swift Mailer documentation
<http://swiftmailer.org>`_.


text:
using UnityEngine;
using System.Collections;

public class TipEndTutorial : ToolTip {
    // Use this for initialization
    void Awake()
    {
        isActivatedElsewhere = true;
        title = "Fin du tutoriel.";
        description = "Félicitation ! Tu as fini le tutoriel d'Alpha !\n\nTu peux maintenant essayer de faire survivre ta meute par toi même !\nPense à lire les informations qui te seront fournies, elles te seront utiles lorsque tu découvriras de nouvelles espèces.\n\nBon courage !\n\n~L'équipe d'Alpha.";
    }

    // Update is called once per frame
    void Update()
    {
        checkTrigger();
    }

    protected override void checkTrigger()
    {
        display();
    }
}


text:
package xworker.game.cocos2d.actions;

import org.xmeta.ActionContext;
import org.xmeta.Thing;

public class JavaScript {
	public static String toJavaScript(ActionContext actionContext){
		Thing self = (Thing) actionContext.get("self");

		String js = null;
		if(!self.getBoolean("useChildsAsCode")){
			String code = self.getString("code");
			if(code != null){
				js = code;
			}
		}else{
			for(Thing child : self.getChilds()){
				String code = (String) child.doAction("toJavaScript", actionContext);
				if(code != null){
					if(code != null){
						if(js == null){
							js = code;
						}else{
							js = js + "\r\n" + code;
						}
					}
				}
			}
		}

		if("".equals(js)){
			return null;
		}else{
			return js;
		}
	}
}


text:
package org.springframework.security.web.csrf;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;

/**
 * @author Rob Winch
 */
@RunWith(MockitoJUnitRunner.class)
public class LazyCsrfTokenRepositoryTests {

	@Mock
	CsrfTokenRepository delegate;

	@Mock
	HttpServletRequest request;

	@Mock
	HttpServletResponse response;

	@InjectMocks
	LazyCsrfTokenRepository repository;

	DefaultCsrfToken token;

	@Before
	public void setup() {
		this.token = new DefaultCsrfToken("header", "param", "token");
		given(this.delegate.generateToken(this.request)).willReturn(this.token);
		given(this.request.getAttribute(HttpServletResponse.class.getName())).willReturn(this.response);
	}

	@Test
	public void constructNullDelegateThrowsIllegalArgumentException() {
		assertThatIllegalArgumentException().isThrownBy(() -> new LazyCsrfTokenRepository(null));
	}

	@Test
	public void generateTokenNullResponseAttribute() {
		assertThatIllegalArgumentException()
				.isThrownBy(() -> this.repository.generateToken(mock(HttpServletRequest.class)));
	}

	@Test
	public void generateTokenGetTokenSavesToken() {
		CsrfToken newToken = this.repository.generateToken(this.request);
		newToken.getToken();
		verify(this.delegate).saveToken(this.token, this.request, this.response);
	}

	@Test
	public void saveNonNullDoesNothing() {
		this.repository.saveToken(this.token, this.request, this.response);
		verifyZeroInteractions(this.delegate);
	}

	@Test
	public void saveNullDelegates() {
		this.repository.saveToken(null, this.request, this.response);
		verify(this.delegate).saveToken(null, this.request, this.response);
	}

	@Test
	public void loadTokenDelegates() {
		given(this.delegate.loadToken(this.request)).willReturn(this.token);
		CsrfToken loadToken = this.repository.loadToken(this.request);
		assertThat(loadToken).isSameAs(this.token);
		verify(this.delegate).loadToken(this.request);
	}

}


text:
.class public interface abstract Lcom/google/android/gms/identity/intents/AddressConstants$ErrorCodes;
.super Ljava/lang/Object;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/google/android/gms/identity/intents/AddressConstants;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x609
    name = "ErrorCodes"
.end annotation

# static fields
.field public static final ERROR_CODE_NO_APPLICABLE_ADDRESSES:I = 0x22b


text:
package us.codecraft.webmagic.model;

import us.codecraft.webmagic.selector.Selector;

/**
 * @author code4crafter@gmail.com

 * Date: 13-8-1

 * Time: 下午9:48

 */
class Extractor {

    protected Selector selector;

    protected final Source source;

    protected final boolean notNull;

    protected final boolean multi;

    static enum Source {Html, Url, RawHtml}

    public Extractor(Selector selector, Source source, boolean notNull, boolean multi) {
        this.selector = selector;
        this.source = source;
        this.notNull = notNull;
        this.multi = multi;
    }

    Selector getSelector() {
        return selector;
    }

    Source getSource() {
        return source;
    }

    boolean isNotNull() {
        return notNull;
    }

    boolean isMulti() {
        return multi;
    }

    void setSelector(Selector selector) {
        this.selector = selector;
    }
}


text:
<?php
namespace Scalr\Service\Aws\Ec2\DataType;

use Scalr\Service\Aws\Ec2\AbstractEc2DataType;

/**
 * AddressData
 *
 * @author   Vitaliy Demidov   <vitaliy@scalr.com>
 * @since    29.01.2013
 */
class AddressData extends AbstractEc2DataType
{

    const DOMAIN_STANDARD = 'standard';

    const DOMAIN_VPC = 'vpc';

    /**
     * The ID of the instance the address is associated with (if any).
     *
     * @var string
     */
    public $instanceId;

    /**
     * The public IP address
     *
     * @var string
     */
    public $publicIp;

    /**
     * The ID representing the association of a VPC Elastic IP address with
     * an instance in a VPC.
     *
     * @var string
     */
    public $associationId;

    /**
     * The ID representing the allocation of the address for use with Amazon VPC.
     *
     * @var string
     */
    public $allocationId;

    /**
     * Whether this Elastic IP address is for EC2 instances (i.e., standard) or VPC instances
     * Valid values: standard | vpc
     *
     * @var string
     */
    public $domain;

    /**
     * The ID of the network interface.
     *
     * @var string
     */
    public $networkInterfaceId;

    /**
     * The ID of the AWS account that owns the network interface
     *
     * @var string
     */
    public $networkInterfaceOwnerId;

    /**
     * Private IP Address
     *
     * @var string
     */
    public $privateIpAddress;
}


text:
#pragma once
#include "util/sexpr/options.h"
#include "kernel/context.h"
#include "library/formatter.h"

namespace lean {
class frontend;
formatter mk_pp_formatter(frontend const & fe);
std::ostream & operator<<(std::ostream & out, frontend const & fe);
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Overview - Slim Framework v2</title>

  <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>

  <link rel="stylesheet" href="../../css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../css/theme_extra.css" type="text/css" />
  <link rel="stylesheet" href="../../css/highlight.css">

         Slim Framework v2

        Get Started

                    Get started

        Configuration

                    Overview

                    Settings

                    Names and Scopes

                    Modes

        Routing

                    Overview

                    GET Routes

                    POST Routes

                    PUT Routes

                    DELETE Routes

                    OPTIONS Routes

                    PATCH Routes

                    Custom Routes

                    Parameters

                    Names

                    Conditions

                    Middleware

                    Groups

                    Helpers

                    URL Rewriting

        Environment

                    Overview

What is the Environment?

Environment Variables

        Request

                    Overview

                    Method

                    Headers

                    Body

                    Variables

                    Cookies

                    Paths

                    XHR

                    Helpers

                    Content-Types

        Response

                    Overview

                    Status

                    Headers

                    Body

                    Cookies

                    Helpers

        View

                    Overview

                    Rendering

                    Custom

                    Data

        HTTP Cache

                    Overview

                    ETag

                    Last Modified

                    Expires

        Middleware

                    Overview

                    How to Use

                    How to Write

        Hooks

                    Overview

                    How to Use

                    Defaults

                    Custom

        Flash Messages

                    Overview

                    Next

                    Now

                    Keep

        Sessions

                    Native

                    Cookies

        Logging

                    Activate

                    Levels

                    Writers

        Error Handling

                    Overview

                    500 System Error

                    404 Not Found

                    Debug Mode

                    Output

        Dependency Injection

                    Overview

Docs »

Overview

The Slim Framework implements a derivation of the Rack protocol. When
you instantiate a Slim application, it immediately inspects the $_SERVER superglobal and derives a set of environment
variables that dictate application behavior.

What is the Environment?

A Slim application's "environment" is an associative array of settings that are parsed once and made accessible to
the Slim application and its middleware. You are free to modify the environment variables during runtime; changes
will propagate immediately throughout the application.

When you instantiate a Slim application, the environment variables are derived from the $_SERVER superglobal; you do
not need to set these yourself. However, you are free to modify or supplement these variables in Slim middleware.

These variables are fundamental to determining how your Slim application runs: the resource URI, the HTTP method,
the HTTP request body, the URL query parameters, error output, and more. Middleware, described later, gives you
the power to - among other things - manipulate environment variables before and/or after the Slim application is run.

Environment Variables

The following text respectfully borrows the same information originally available at
http://rack.rubyforge.org/doc/files/SPEC.html. The environment array must include these variables:

REQUEST_METHOD

The HTTP request method. This is required and may never be an empty string.

SCRIPT_NAME

The initial portion of the request URI's "path" that corresponds to the physical directory in which the Slim
application is installed — so that the application knows its virtual "location". This may be an empty string if the
application is installed in the top-level of the public document root directory. This will never have a trailing slash.

PATH_INFO

The remaining portion of the request URI's "path" that determines the "virtual" location of the HTTP request's target resource within the Slim application context. This will always have a leading slash; it may or may not have a trailing slash.

QUERY_STRING

The part of the HTTP request's URI after, but not including, the "?". This is required but may be an empty string.

SERVER_NAME

When combined with SCRIPT_NAME and PATH_INFO, this can be used to create a fully qualified URL to an application resource. However, if HTTP_HOST is present, that should be used instead of this. This is required and may never be an empty string.

SERVER_PORT

When combined with SCRIPT_NAME and PATH_INFO, this can be used to create a fully qualified URL to any application resource. This is required and may never be an empty string.

HTTP_*

Variables matching the HTTP request headers sent by the client. The existence of these variables correspond with those sent in the current HTTP request.

slim.url_scheme

Will be "http" or "https" depending on the HTTP request URL.

slim.input

Will be a string representing the raw HTTP request body. If the HTTP request body is empty (e.g. with a GET request), this will be an empty string.

slim.errors

Must always be a writable resource; by default, this is a write-only resource handle to php://stderr.

The Slim application can store its own data in the environment, too. The environment array's keys must contain at least
one dot, and should be prefixed uniquely (e.g. "prefix.foo"). The prefix slim. is reserved for use by Slim itself
and must not be used otherwise. The environment must not contain the keys HTTP_CONTENT_TYPE or HTTP_CONTENT_LENGTH
(use the versions without HTTP_). The CGI keys (named without a period) must have String values. There are the
following restrictions:

slim.url_scheme must either be "http" or "https".

slim.input must be a string.

There must be a valid, writable resource in slim.errors.

The REQUEST_METHOD must be a valid token.

The SCRIPT_NAME, if non-empty, must start with "/"

The PATH_INFO, if non-empty, must start with "/"

The CONTENT_LENGTH, if given, must consist of digits only.

One of SCRIPT_NAME or PATH_INFO must be set. PATH_INFO should be "/" if SCRIPT_NAME is empty. SCRIPT_NAME
  never should be "/", but instead be an empty string.

        Next

         Previous

  Built with MkDocs using a theme provided by Read the Docs.

      « Previous
      Next »


text:
#region MIT License

#endregion

#if UseDouble
using Scalar = System.Double;
#else
using Scalar = System.Single;
#endif
using System;
using System.Collections.Generic;

using AdvanceMath.Geometry2D;

namespace Physics2DDotNet.Detectors
{
    [Serializable]
    public sealed class BruteForceDetector : BroadPhaseCollisionDetector
    {
        public override void Detect(TimeStep step)
        {
            for (int index1 = 0; index1 < this.Bodies.Count; index1++)
            {
                Body body1 = this.Bodies[index1];
                for (int index2 = index1 + 1; index2 < this.Bodies.Count; index2++)
                {
                    Body body2 = this.Bodies[index2];
                    if ((body1.Mass.MassInv != 0 || body2.Mass.MassInv != 0) &&
                            Body.CanCollide(body1, body2) &&
                            body1.Rectangle.Intersects(body2.Rectangle))
                    {
                        OnCollision(step, body1, body2);
                    }
                }
            }
        }
    }

}


text:
layout: post
title: "Why I Use SaltStack"
date: 2013-08-16 08:00
comments: true
author: Allen Oster
published: true
categories:
- SaltStack
---
{% img right 2013-07-12-join-the-great-salt-sprint/saltstack_logo.jpg 200 %}

I am part of a team (along with Bruce Stringer and Jason Swindle) working on an internal application called Graffiti, which provides an easy way for front-line Rackers to record interactions with customers and provide valuable data with each interaction. It also creates a much simpler way for leads to be passed from the front line to the IB sales team here in SMB cloud.

We knew from the start that we wanted this to be an agile cloud application that utilizes all the things a cloud should be. We had some limitations which meant we had to home grow a few solutions. Since this is an internal application, we could not rely on third-party solutions for off loading workloads. We also had to be careful with our security practices, of course. We ended up going with a configuration that utilizes our internal nova solution for hosting in Cloud Servers. The downside to this is no automated backups, no load balancers and no Cloud Files; much to my dismay.<!-- more -->

The configuration we are building out consists of an Nginx load balancer, two web servers running Nginx and a master-master pair of PostgreSQL database servers using pgbouncer for replication. We also utilize a Redis server for some caching and as a sort of rate limiting feature for our API.

##So, why SaltStack?

We use SaltStack for many reasons, but the most important are ease of configuration style, open source (no "pay for the pro features;" it's all free) and a vibrant developer community that has been easy to reach and quick to patch any bugs we found.

We use SaltStack in combination with saltcloud to automagically deploy our infrastructure. We have a single server setup as a Salt Master, with saltcloud configured on it. We configured the states that each server should be in and what each server's roles should be. With saltcloud, all we have to do is configure a map file that shows what servers should be online and anything else specific about the servers that we need them to have. Here is an example of a map file for saltcloud:

```
openstack_2GB:
  - stagredisn001graffiti:
    grains:
      env: stag
      newrelic_env: staging
      datacenter: dfw
      node_type: redis
```

That example would tell saltcloud that there should be a 2GB server called stagredisn001graffiti with the listed salt "grains" configured. With saltcloud all new servers will get kicked with the Salt minion agent already installed and configured to talk to the Salt Master.

If we keep adding servers to that map file, we can have a map of how our entire infrastructure should look, and when we need another node spun up we just add it to that file and run saltcloud again.

##The Power of Grains

Another reason we use SaltStack is that it is incredibly powerful for how simple the configuration can be. We use grains heavily because we need nodes to be able to configure their services based on the way other nodes are configured. For example, we need our load balancer to automatically fetch the IP of any web server and add that IP to its pool. We accomplish this with grains.

When a new server comes online we set four main grains:

```
env
newrelic_env
datacenter
node_type
```

With these grains set, the load balancer is configured through SaltStack to look for any servers with the web server node_type and that has the SAME env type. This means that we can spin up dev, staging and production servers without having to specifically tell the correct load balancer to add or remove that node. If a new staging node comes online only the other staging nodes look for it and add it to their configuration. That means we can redeploy all three of our environments from nothing to fully functional in minutes. We also have SaltStack configured to load everything from our GitHub repository using release tags, so it is easy to push new changes as well. With this type of setup, any and all changes can be version controlled through git and properly QC'd before running a simple command from the master servers and bringing all of our environments up to date.

That's the power of a DevOps mentality, and the power of properly using version control with infrastructure automation. SaltStack for the win!

###About the Author

Allen Oster is a DevOps Engineer at Rackspace. You can put him in a circle [on Google+][3] or follow him on twitter [@OsterCloud][4].

[3]: https://plus.google.com/116303852061385832110/
[4]: https://twitter.com/OsterCloud


text:
#include <aws/glue/model/ListRegistriesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Glue::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;

ListRegistriesRequest::ListRegistriesRequest() :
    m_maxResults(0),
    m_maxResultsHasBeenSet(false),
    m_nextTokenHasBeenSet(false)
{
}

Aws::String ListRegistriesRequest::SerializePayload() const
{
  JsonValue payload;

  if(m_maxResultsHasBeenSet)
  {
   payload.WithInteger("MaxResults", m_maxResults);

  }

  if(m_nextTokenHasBeenSet)
  {
   payload.WithString("NextToken", m_nextToken);

  }

  return payload.View().WriteReadable();
}

Aws::Http::HeaderValueCollection ListRegistriesRequest::GetRequestSpecificHeaders() const
{
  Aws::Http::HeaderValueCollection headers;
  headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSGlue.ListRegistries"));
  return headers;

}


text:
layout: category
title: "Programming"
slug: programming
permalink: /category/programming/
---