text:
import * as React from 'react'
import * as d3 from 'd3'
import { strict as assert } from 'assert'

interface TreeMapProps<T> {
  width: number
  height: number
  hierarchyRoot: d3.HierarchyNode<T>
  getTitle: (datum: T) => string
  getWeight: (datum: T) => number
  getContent: (datum: T) => string
}

export default class TreeMap<Datum> extends React.Component<TreeMapProps<Datum>, {}> {
  ref: SVGSVGElement | undefined
  treeMap: d3.TreemapLayout<Datum>
  rectColorScale: d3.ScaleLinear<string, number>
  textColorScale: d3.ScaleOrdinal<number, string>

  constructor(props: TreeMapProps<Datum>) {
    super(props)
    this.ref = undefined
    this.treeMap = d3
      .treemap<Datum>()
      .size([props.width, props.height])
      .paddingOuter(node => (node.parent == null ? 0 : 5))
      .paddingTop(node => (node.parent == null ? 0 : 22))
      .paddingInner(3)
      .round(true)

    this.rectColorScale = d3
      .scaleLinear<string, number>()
      .domain([0, 2])
      .range(['rgba(0, 0, 0, 0)', 'rgba(0, 99, 90, 1)'])
      .clamp(true)

    this.textColorScale = d3
      .scaleOrdinal<number, string>()
      .domain([0, 1, 2])
      .range(['rgba(0, 0, 0, 0)', 'black', 'white'])
  }

  componentDidMount() {
    assert(this.ref) //reasonable assumption to think that the <SVG> exists in the DOM because the method `componentDidMount` triggers after applying render()
    const sortedTreeRoot = this.props.hierarchyRoot.sum(this.props.getWeight).sort((a, b) => b.height - a.height)

    const treeMapLayout = this.treeMap(sortedTreeRoot)

    const graph = d3.select(this.ref) // <svg.treemap> DOM Node

    const cells = graph.selectAll('.component').data(treeMapLayout.descendants())

    cells.join(
      enter => {
        const component = enter
          .append('g')
          .classed('component', true)
          .attr('transform', d => `translate(${d.x0},${d.y0})`)

        component
          .append('rect')
          .attr('width', d => d.x1 - d.x0)
          .attr('height', d => d.y1 - d.y0)
          .attr('rx', 6)
          .attr('ry', 6)
          .style('fill', d => this.rectColorScale(d.depth))

        component
          .append('text')
          .append('tspan')
          .classed('title', true)
          .attr('x', 6)
          .attr('y', 15)
          .attr('font-weight', 700)
          .style('fill', d => this.textColorScale(d.depth))
          .text(d => this.props.getTitle(d.data))

        component
          .append('text')
          .selectAll('tspan')
          .classed('connected-skills', true)
          .attr('font-style', 'italic')

        return component
      },
      update => update, // Not implemented because the application never updates its data
      exit => exit
    )
  }

  render() {
    const { width, height } = this.props
    return <svg className="treemap" ref={(ref: SVGSVGElement) => (this.ref = ref)} width={width} height={height}></svg>
  }
}


text:
<script type="text/javascript">
$(document).ready(function() {
    $('#navigation_autocomplete').yourlabsAutocomplete({
        url: '{% url 'navigation_autocomplete' %}',
        choiceSelector: 'a',
    }).input.bind('selectChoice', function(e, choice, autocomplete) {
        document.location.href = choice.attr('href');
    });
});
</script>

redpajama_set_name: RedPajamaGithub


text:
package graph;

import java.util.LinkedList;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;

import dataStructures.BinaryMinHeap;
import dataStructures.PriorityQueue;

/******************************************************************************
 *  Compilation:  javac KruskalMST.java
 *  Execution:    java  KruskalMST filename.txt
 *  Dependencies: EdgeWeightedGraph.java Edge.java Queue.java
 *                UF.java In.java StdOut.java
 *  Data files:   http://algs4.cs.princeton.edu/43mst/tinyEWG.txt
 *                http://algs4.cs.princeton.edu/43mst/mediumEWG.txt
 *                http://algs4.cs.princeton.edu/43mst/largeEWG.txt
 *
 *  Compute a minimum spanning forest using Kruskal's algorithm.
 *
 *  %  java KruskalMST tinyEWG.txt
 *  0-7 0.16000
 *  2-3 0.17000
 *  1-7 0.19000
 *  0-2 0.26000
 *  5-7 0.28000
 *  4-5 0.35000
 *  6-2 0.40000
 *  1.81000
 *
 *  % java KruskalMST mediumEWG.txt
 *  168-231 0.00268
 *  151-208 0.00391
 *  7-157   0.00516
 *  122-205 0.00647
 *  8-152   0.00702
 *  156-219 0.00745
 *  28-198  0.00775
 *  38-126  0.00845
 *  10-123  0.00886
 *  ...
 *  10.46351
 *
 ******************************************************************************/

/**
 *  The <tt>KruskalMST</tt> class represents a data type for computing a
 *  minimum spanning tree in an edge-weighted graph.
 *  The edge weights can be positive, zero, or negative and need not
 *  be distinct. If the graph is not connected, it computes a minimum
 *  spanning forest, which is the union of minimum spanning trees
 *  in each connected component. The <tt>weight()</tt> method returns the
 *  weight of a minimum spanning tree and the <tt>edges()</tt> method
 *  returns its edges.
 *

 *  This implementation uses Krusal's algorithm and the
 *  union-find data type.
 *  The constructor takes time proportional to E log E
 *  and extra space (not including the graph) proportional to V,
 *  where V is the number of vertices and E is the number of edges.
 *  Afterwards, the <tt>weight()</tt> method takes constant time
 *  and the <tt>edges()</tt> method takes time proportional to V.
 *

 *  For additional documentation,
 *  see Section 4.3 of
 *  Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
 *  For alternate implementations, see {@link LazyPrimMST}, {@link PrimMST},
 *  and {@link BoruvkaMST}.
 *
 *  @author Robert Sedgewick
 *  @author Kevin Wayne
 */
public class KruskalMST {
    private static final double FLOATING_POINT_EPSILON = 1E-12;

    private double weight;                        // weight of MST
    private Queue<Edge> mst = new LinkedList<Edge>();  // edges in MST

    /**
     * Compute a minimum spanning tree (or forest) of an edge-weighted graph.
     * @param G the edge-weighted graph
     */
    public KruskalMST(MyWeightedGraph G) {
        // more efficient to build heap by passing array of edges
        PriorityQueue<Edge> pq = new BinaryMinHeap<Edge>();
        for (Edge e : G.edges()) {
            pq.insert(e);
        }

        // run greedy algorithm
        UF uf = new UF(G.V());
        while (!pq.isEmpty() && mst.size() < G.V() - 1) {
            Edge e = pq.deleteMin();
            int v = e.either();
            int w = e.other(v);
            if (!uf.connected(v, w)) { // v-w does not create a cycle
                uf.union(v, w);  // merge v and w components
                mst.add(e);  // add edge e to mst
                weight += e.weight();
            }
        }

        // check optimality conditions
        assert check(G);
    }

    /**
     * Returns the edges in a minimum spanning tree (or forest).
     * @return the edges in a minimum spanning tree (or forest) as
     *    an iterable of edges
     */
    public Iterable<Edge> edges() {
        return mst;
    }

    /**
     * Returns the sum of the edge weights in a minimum spanning tree (or forest).
     * @return the sum of the edge weights in a minimum spanning tree (or forest)
     */
    public double weight() {
        return weight;
    }

    // check optimality conditions (takes time proportional to E V lg* V)
    private boolean check(MyWeightedGraph G) {

        // check total weight
        double total = 0.0;
        for (Edge e : edges()) {
            total += e.weight();
        }
        if (Math.abs(total - weight()) > FLOATING_POINT_EPSILON) {
            System.err.printf("Weight of edges does not equal weight(): %f vs. %f\n", total, weight());
            return false;
        }

        // check that it is acyclic
        UF uf = new UF(G.V());
        for (Edge e : edges()) {
            int v = e.either(), w = e.other(v);
            if (uf.connected(v, w)) {
                System.err.println("Not a forest");
                return false;
            }
            uf.union(v, w);
        }

        // check that it is a spanning forest
        for (Edge e : G.edges()) {
            int v = e.either(), w = e.other(v);
            if (!uf.connected(v, w)) {
                System.err.println("Not a spanning forest");
                return false;
            }
        }

        // check that it is a minimal spanning forest (cut optimality conditions)
        for (Edge e : edges()) {

            // all edges in MST except e
            uf = new UF(G.V());
            for (Edge f : mst) {
                int x = f.either(), y = f.other(x);
                if (f != e) uf.union(x, y);
            }

            // check that e is min weight edge in crossing cut
            for (Edge f : G.edges()) {
                int x = f.either(), y = f.other(x);
                if (!uf.connected(x, y)) {
                    if (f.weight() < e.weight()) {
                        System.err.println("Edge " + f + " violates cut optimality conditions");
                        return false;
                    }
                }
            }

        }

        return true;
    }

    /**
     * Unit tests the KruskalMST data type.
     * @throws Exception
     */
    public static void main(String[] args) throws Exception {

    	Scanner in = new Scanner(Download_File.downloadFile(args[0]));
        MyWeightedGraph G = new MyWeightedGraph(in);
        KruskalMST mst = new KruskalMST(G);
        for (Edge e : mst.edges()) {
            System.out.println(e);
        }
        System.out.printf("%.5f\n", mst.weight());
    }

}


text:
<html>
  <meta http-equiv='Content-type' content='text/html; charset=utf-8' />
  <script src="javascripts/jquery.js"></script>
  <script src="javascripts/webtoolkit.base64.js"></script>
  <script src="javascripts/simplenote.js"></script>
  <script src="javascripts/background.js"></script>
</html>


text:
package org.springframework.social.directline.api;

import org.springframework.social.ApiBinding;
import org.springframework.social.directline.api.conversation.ConversationOperations;
import org.springframework.social.directline.api.token.TokenOperations;
import org.springframework.web.util.UriComponentsBuilder;

/**
 * @author Anton Leliuk
 */
public interface DirectLine extends ApiBinding {

    String BASE_URL = "https://directline.botframework.com";
    String VERSION = "v3";

    TokenOperations getTokenOperations();

    ConversationOperations getConversationOperations();

    static UriComponentsBuilder getBaseUrl(){
        return UriComponentsBuilder.fromHttpUrl(BASE_URL).pathSegment(VERSION).pathSegment("directline");
    }
}


text:
import React from 'react';
import { connect } from 'react-redux';

import { ciAppSelector } from '../selectors/ciAppSelector';

import {fetchPosts, fetchResults, fetchOverall} from '../actions/actions';

import NewsFeed from '../news/NewsFeed';
import WeekMatches from '../weekmatches/WeekMatches';
import OverallTable from '../overallTable/OverallTable';

class Home extends React.Component {
  constructor(props) {
    super(props)
  }

  componentWillMount() {
    this.props.dispatch(fetchPosts());
    this.props.dispatch(fetchResults());
    this.props.dispatch(fetchOverall());
  }

  render() {
    return(

          <NewsFeed news={this.props.news} />

          <WeekMatches name="Week 2" results={this.props.results} />

          <OverallTable result={this.props.overall} />

    );
  }
}

export default connect(ciAppSelector)(Home);


text:
use crate::nameserver::NameServerConfig;

use serde::Serializer;
use std::sync::Arc;

pub fn ser_arc_nameserver_config<S>(data: &Arc<NameServerConfig>, serializer: S) -> Result<S::Ok, S::Error>
where
    S: Serializer,
{
    serializer.serialize_str(&data.to_string())
}

pub fn ser_to_string<S, T: ToString>(data: &T, serializer: S) -> Result<S::Ok, S::Error>
where
    S: Serializer,
{
    serializer.serialize_str(&data.to_string())
}


text:
package org.ralasafe.db;

/**
 * WARN!!!!
 * We will deprecate it later.
 */
public class SingleValueComparator extends AbstractComparator {
	private SingleValueComparator( String type ) {
		setType( type );
	}

	public static final SingleValueComparator EQUAL =
		new SingleValueComparator( "=" );
	public static final SingleValueComparator GREATER =
		new SingleValueComparator( ">" );
	public static final SingleValueComparator LESS =
		new SingleValueComparator( "<" );
	public static final SingleValueComparator NOT_EQUAL =
		new SingleValueComparator( "!=" );
	public static final SingleValueComparator NOT_GREATER =
		new SingleValueComparator( "<=" );
	public static final SingleValueComparator NOT_LESS =
		new SingleValueComparator( ">=" );
	public static final SingleValueComparator LIKE =
		new SingleValueComparator( "LIKE" );
	public static final SingleValueComparator NOT_LIKE =
		new SingleValueComparator( "NOT LIKE" );
	public static final SingleValueComparator LEFT_LIKE =
		new SingleValueComparator( "LEFT LIKE" );
	//public static final SingleValueComparator NOT_LEFT_LIKE =
	//	new SingleValueComparator( "NOT LEFT LIKE" );
	public static final SingleValueComparator RIGHT_LIKE =
		new SingleValueComparator( "RIGHT LIKE" );
	//public static final SingleValueComparator NOT_RIGHT_LIKE =
	//	new SingleValueComparator( "NOT RIGHT LIKE" );
}


text:
package validator

import (
	"errors"
	"fmt"
	"reflect"
	"strings"
	"unicode"
)

// TextErr is an error that also implements the TextMarshaller interface for
// serializing out to various plain text encodings. Packages creating their
// own custom errors should use TextErr if they're intending to use serializing
// formats like json, msgpack etc.
type TextErr struct {
	Err error
}

// Error implements the error interface.
func (t TextErr) Error() string {
	return t.Err.Error()
}

// MarshalText implements the TextMarshaller
func (t TextErr) MarshalText() ([]byte, error) {
	return []byte(t.Err.Error()), nil
}

var (
	// ErrZeroValue is the error returned when variable has zero valud
	// and nonzero was specified
	ErrZeroValue = TextErr{errors.New("zero value")}
	// ErrMin is the error returned when variable is less than mininum
	// value specified
	ErrMin = TextErr{errors.New("less than min")}
	// ErrMax is the error returned when variable is more than
	// maximum specified
	ErrMax = TextErr{errors.New("greater than max")}
	// ErrLen is the error returned when length is not equal to
	// param specified
	ErrLen = TextErr{errors.New("invalid length")}
	// ErrRegexp is the error returned when the value does not
	// match the provided regular expression parameter
	ErrRegexp = TextErr{errors.New("regular expression mismatch")}
	// ErrUnsupported is the error error returned when a validation rule
	// is used with an unsupported variable type
	ErrUnsupported = TextErr{errors.New("unsupported type")}
	// ErrBadParameter is the error returned when an invalid parameter
	// is provided to a validation rule (e.g. a string where an int was
	// expected (max=foo,len=bar) or missing a parameter when one is required (len=))
	ErrBadParameter = TextErr{errors.New("bad parameter")}
	// ErrUnknownTag is the error returned when an unknown tag is found
	ErrUnknownTag = TextErr{errors.New("unknown tag")}
	// ErrInvalid is the error returned when variable is invalid
	// (normally a nil pointer)
	ErrInvalid = TextErr{errors.New("invalid value")}
)

// ErrorMap is a map which contains all errors from validating a struct.
type ErrorMap map[string]ErrorArray

// ErrorMap implements the Error interface so we can check error against nil.
// The returned error is if existent the first error which was added to the map.
func (err ErrorMap) Error() string {
	for k, errs := range err {
		if len(errs) > 0 {
			return fmt.Sprintf("%s: %s", k, errs.Error())
		}
	}

	return ""
}

// ErrorArray is a slice of errors returned by the Validate function.
type ErrorArray []error

// ErrorArray implements the Error interface and returns the first error as
// string if existent.
func (err ErrorArray) Error() string {
	if len(err) > 0 {
		return err[0].Error()
	}
	return ""
}

// ValidationFunc is a function that receives the value of a
// field and a parameter used for the respective validation tag.
type ValidationFunc func(v interface{}, param string) error

// Validator implements a validator
type Validator struct {
	// Tag name being used.
	tagName string
	// validationFuncs is a map of ValidationFuncs indexed
	// by their name.
	validationFuncs map[string]ValidationFunc
}

// Helper validator so users can use the
// functions directly from the package
var defaultValidator = NewValidator()

// NewValidator creates a new Validator
func NewValidator() *Validator {
	return &Validator{
		tagName: "validate",
		validationFuncs: map[string]ValidationFunc{
			"nonzero": nonzero,
			"len":     length,
			"min":     min,
			"max":     max,
			"regexp":  regex,
		},
	}
}

// SetTag allows you to change the tag name used in structs
func SetTag(tag string) {
	defaultValidator.SetTag(tag)
}

// SetTag allows you to change the tag name used in structs
func (mv *Validator) SetTag(tag string) {
	mv.tagName = tag
}

// WithTag creates a new Validator with the new tag name. It is
// useful to chain-call with Validate so we don't change the tag
// name permanently: validator.WithTag("foo").Validate(t)
func WithTag(tag string) *Validator {
	return defaultValidator.WithTag(tag)
}

// WithTag creates a new Validator with the new tag name. It is
// useful to chain-call with Validate so we don't change the tag
// name permanently: validator.WithTag("foo").Validate(t)
func (mv *Validator) WithTag(tag string) *Validator {
	v := mv.copy()
	v.SetTag(tag)
	return v
}

// Copy a validator
func (mv *Validator) copy() *Validator {
	newFuncs := map[string]ValidationFunc{}
	for k, f := range mv.validationFuncs {
		newFuncs[k] = f
	}
	return &Validator{
		tagName:         mv.tagName,
		validationFuncs: newFuncs,
	}
}

// SetValidationFunc sets the function to be used for a given
// validation constraint. Calling this function with nil vf
// is the same as removing the constraint function from the list.
func SetValidationFunc(name string, vf ValidationFunc) error {
	return defaultValidator.SetValidationFunc(name, vf)
}

// SetValidationFunc sets the function to be used for a given
// validation constraint. Calling this function with nil vf
// is the same as removing the constraint function from the list.
func (mv *Validator) SetValidationFunc(name string, vf ValidationFunc) error {
	if name == "" {
		return errors.New("name cannot be empty")
	}
	if vf == nil {
		delete(mv.validationFuncs, name)
		return nil
	}
	mv.validationFuncs[name] = vf
	return nil
}

// Validate validates the fields of a struct based
// on 'validator' tags and returns errors found indexed
// by the field name.
func Validate(v interface{}) error {
	return defaultValidator.Validate(v)
}

// Validate validates the fields of a struct based
// on 'validator' tags and returns errors found indexed
// by the field name.
func (mv *Validator) Validate(v interface{}) error {
	sv := reflect.ValueOf(v)
	st := reflect.TypeOf(v)
	if sv.Kind() == reflect.Ptr && !sv.IsNil() {
		return mv.Validate(sv.Elem().Interface())
	}
	if sv.Kind() != reflect.Struct && sv.Kind() != reflect.Interface {
		return ErrUnsupported
	}

	nfields := sv.NumField()
	m := make(ErrorMap)
	for i := 0; i < nfields; i++ {
		f := sv.Field(i)
		// deal with pointers
		for f.Kind() == reflect.Ptr && !f.IsNil() {
			f = f.Elem()
		}
		tag := st.Field(i).Tag.Get(mv.tagName)
		if tag == "-" {
			continue
		}
		fname := st.Field(i).Name
		var errs ErrorArray

		if tag != "" {
			err := mv.Valid(f.Interface(), tag)
			if errors, ok := err.(ErrorArray); ok {
				errs = errors
			} else {
				if err != nil {
					errs = ErrorArray{err}
				}
			}
		}
		if f.Kind() == reflect.Struct || f.Kind() == reflect.Interface {
			if !unicode.IsUpper(rune(fname[0])) {
				continue
			}
			e := mv.Validate(f.Interface())
			if e, ok := e.(ErrorMap); ok && len(e) > 0 {
				for j, k := range e {
					m[fname+"."+j] = k
				}
			}
		}
		if len(errs) > 0 {
			m[st.Field(i).Name] = errs
		}
	}
	if len(m) > 0 {
		return m
	}
	return nil
}

// Valid validates a value based on the provided
// tags and returns errors found or nil.
func Valid(val interface{}, tags string) error {
	return defaultValidator.Valid(val, tags)
}

// Valid validates a value based on the provided
// tags and returns errors found or nil.
func (mv *Validator) Valid(val interface{}, tags string) error {
	if tags == "-" {
		return nil
	}
	v := reflect.ValueOf(val)
	if v.Kind() == reflect.Ptr && !v.IsNil() {
		return mv.Valid(v.Elem().Interface(), tags)
	}
	var err error
	switch v.Kind() {
	case reflect.Invalid:
		err = mv.validateVar(nil, tags)
	default:
		err = mv.validateVar(val, tags)
	}
	return err
}

// validateVar validates one single variable
func (mv *Validator) validateVar(v interface{}, tag string) error {
	tags, err := mv.parseTags(tag)
	if err != nil {
		// unknown tag found, give up.
		return err
	}
	errs := make(ErrorArray, 0, len(tags))
	for _, t := range tags {
		if err := t.Fn(v, t.Param); err != nil {
			errs = append(errs, err)
		}
	}
	if len(errs) > 0 {
		return errs
	}
	return nil
}

// tag represents one of the tag items
type tag struct {
	Name  string         // name of the tag
	Fn    ValidationFunc // validation function to call
	Param string         // parameter to send to the validation function
}

// parseTags parses all individual tags found within a struct tag.
func (mv *Validator) parseTags(t string) ([]tag, error) {
	tl := strings.Split(t, ",")
	tags := make([]tag, 0, len(tl))
	for _, i := range tl {
		tg := tag{}
		v := strings.SplitN(i, "=", 2)
		tg.Name = strings.Trim(v[0], " ")
		if tg.Name == "" {
			return []tag{}, ErrUnknownTag
		}
		if len(v) > 1 {
			tg.Param = strings.Trim(v[1], " ")
		}
		var found bool
		if tg.Fn, found = mv.validationFuncs[tg.Name]; !found {
			return []tag{}, ErrUnknownTag
		}
		tags = append(tags, tg)

	}
	return tags, nil
}


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W29263_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans28.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans4.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">gang resources

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Meters Manufacturer, Size and Type

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Oil 2" Coriolis Meters, Micromotion Series F for allocation Water 2" Vortex Shedding, Emerson for allocation
Gas 2" & 3" Orifice Plate meter tubes, commodity item (no particular manufacturer) using Fisher ROC Electronic Flow Measurement (EFM) computer and AGA 3

    <p class="styleSans1.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans12000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans12000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans12000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans23.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">


text:
using base::mac::ScopedCFTypeRef;

namespace net {

namespace {

bool GetClientCertsImpl(const scoped_refptr<X509Certificate>& preferred_cert,
                        const CertificateList& regular_certs,
                        const SSLCertRequestInfo& request,
                        CertificateList* selected_certs) {
  CertificateList preliminary_list;
  if (preferred_cert)
    preliminary_list.push_back(preferred_cert);
  preliminary_list.insert(preliminary_list.end(), regular_certs.begin(),
                          regular_certs.end());

  selected_certs->clear();
  for (size_t i = 0; i < preliminary_list.size(); ++i) {
    scoped_refptr<X509Certificate>& cert = preliminary_list[i];
    if (cert->HasExpired() || !cert->SupportsSSLClientAuth())
      continue;

    // Skip duplicates (a cert may be in multiple keychains).
    const SHA1HashValue& fingerprint = cert->fingerprint();
    size_t pos;
    for (pos = 0; pos < selected_certs->size(); ++pos) {
      if ((*selected_certs)[pos]->fingerprint().Equals(fingerprint))
        break;
    }
    if (pos < selected_certs->size())
      continue;

    // Check if the certificate issuer is allowed by the server.
    if (!request.cert_authorities.empty() &&
        !cert->IsIssuedByEncoded(request.cert_authorities)) {
      continue;
    }
    selected_certs->push_back(cert);
  }

  // Preferred cert should appear first in the ui, so exclude it from the
  // sorting.
  CertificateList::iterator sort_begin = selected_certs->begin();
  CertificateList::iterator sort_end = selected_certs->end();
  if (preferred_cert &&
      sort_begin != sort_end &&
      *sort_begin == preferred_cert) {
    ++sort_begin;
  }
  sort(sort_begin, sort_end, x509_util::ClientCertSorter());
  return true;
}

}  // namespace

bool ClientCertStoreImpl::GetClientCerts(const SSLCertRequestInfo& request,
                                         CertificateList* selected_certs) {
  std::string server_domain =
      HostPortPair::FromString(request.host_and_port).host();

  ScopedCFTypeRef<SecIdentityRef> preferred_identity;
  if (!server_domain.empty()) {
    // See if there's an identity preference for this domain:
    ScopedCFTypeRef<CFStringRef> domain_str(
        base::SysUTF8ToCFStringRef("https://" + server_domain));
    SecIdentityRef identity = NULL;
    // While SecIdentityCopyPreferences appears to take a list of CA issuers
    // to restrict the identity search to, within Security.framework the
    // argument is ignored and filtering unimplemented. See
    // SecIdentity.cpp in libsecurity_keychain, specifically
    // _SecIdentityCopyPreferenceMatchingName().
    {
      base::AutoLock lock(crypto::GetMacSecurityServicesLock());
      if (SecIdentityCopyPreference(domain_str, 0, NULL, &identity) == noErr)
        preferred_identity.reset(identity);
    }
  }

  // Now enumerate the identities in the available keychains.
  scoped_refptr<X509Certificate> preferred_cert = NULL;
  CertificateList regular_certs;

  SecIdentitySearchRef search = NULL;
  OSStatus err;
  {
    base::AutoLock lock(crypto::GetMacSecurityServicesLock());
    err = SecIdentitySearchCreate(NULL, CSSM_KEYUSE_SIGN, &search);
  }
  if (err)
    return false;
  ScopedCFTypeRef<SecIdentitySearchRef> scoped_search(search);
  while (!err) {
    SecIdentityRef identity = NULL;
    {
      base::AutoLock lock(crypto::GetMacSecurityServicesLock());
      err = SecIdentitySearchCopyNext(search, &identity);
    }
    if (err)
      break;
    ScopedCFTypeRef<SecIdentityRef> scoped_identity(identity);

    SecCertificateRef cert_handle;
    err = SecIdentityCopyCertificate(identity, &cert_handle);
    if (err != noErr)
      continue;
    ScopedCFTypeRef<SecCertificateRef> scoped_cert_handle(cert_handle);

    scoped_refptr<X509Certificate> cert(
        X509Certificate::CreateFromHandle(cert_handle,
                                          X509Certificate::OSCertHandles()));

    if (preferred_identity && CFEqual(preferred_identity, identity)) {
      // Only one certificate should match.
      DCHECK(!preferred_cert);
      preferred_cert = cert;
    } else {
      regular_certs.push_back(cert);
    }
  }

  if (err != errSecItemNotFound) {
    OSSTATUS_LOG(ERROR, err) << "SecIdentitySearch error";
    return false;
  }

  return GetClientCertsImpl(preferred_cert, regular_certs, request,
                            selected_certs);
}

bool ClientCertStoreImpl::SelectClientCerts(const CertificateList& input_certs,
                                            const SSLCertRequestInfo& request,
                                            CertificateList* selected_certs) {
  return GetClientCertsImpl(NULL, input_certs, request,
                            selected_certs);
}

#if defined(OS_MACOSX) && !defined(OS_IOS)
bool ClientCertStoreImpl::SelectClientCertsGivenPreferred(
      const scoped_refptr<X509Certificate>& preferred_cert,
      const CertificateList& regular_certs,
      const SSLCertRequestInfo& request,
      CertificateList* selected_certs) {
  return GetClientCertsImpl(preferred_cert, regular_certs, request,
                            selected_certs);
}
#endif

}  // namespace net


text:
<?php

namespace Telegram\Bot\Objects\InlineQuery;

/**
 * Class InlineQueryResultCachedDocument.
 *
 * Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with
 * an optional caption. Alternatively, you can use input_message_content to send a message with the specified content
 * instead of the file.
 *
 * <code>
 * [
 *   'id'                     => '',  //  string                - Required. Unique identifier for this result, 1-64 bytes
 *   'title'                  => '',  //  string                - Required. Title for the result
 *   'document_file_id'       => '',  //  string                - Required. A valid file identifier for the file
 *   'description'            => '',  //  string                - (Optional). Short description of the result
 *   'caption'                => '',  //  string                - (Optional). Caption of the document to be sent, 0-200 characters
 *   'parse_mode'             => '',  //  string                - (Optional). Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
 *   'caption_entities'       => '',  //  array                 - (Optional). List of special entities that appear in the caption, which can be specified instead of parse_mode
 *   'reply_markup'           => '',  //  InlineKeyboardMarkup  - (Optional). Inline keyboard attached to the message
 *   'input_message_content'  => '',  //  InputMessageContent   - (Optional). Content of the message to be sent instead of the file
 * ]
 * </code>
 *
 * @link https://core.telegram.org/bots/api#inlinequeryresultcacheddocument
 *
 * @method $this setId(string)                     Unique identifier for this result, 1-64 bytes
 * @method $this setTitle(string)                  Title for the result
 * @method $this setDocumentFileId(string)         A valid file identifier for the file
 * @method $this setDescription(string)            (Optional). Short description of the result
 * @method $this setCaption(string)                (Optional). Caption of the document to be sent, 0-200 characters
 * @method $this setParseMode(string)              (Optional). Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
 * @method $this setReplyMarkup(object)            (Optional). Inline keyboard attached to the message
 * @method $this setInputMessageContent(object)    (Optional). Content of the message to be sent instead of the file
 */
class InlineQueryResultCachedDocument extends InlineBaseObject
{
    protected $type = 'document';
}


text:
module Magnum
  class Error < StandardError
  end
  class PersistenceError < Error
  end
  class InvalidType < Error
  end
end


text:
import {Component, Input} from "@angular/core";
import {Spell} from "../../models/spell-model";

@Component({
    selector: "page-spell",
    templateUrl: "./spell.html"
})
export class SpellPage {
    @Input()
    spell: Spell;

    constructor() {
    }

    ionViewDidLoad() {
    }

}


text:
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;

/**
 Created by ${Ruslan} on 04.01.17.
 */
public class Sort3GRandomAccessFile implements SortFile {

    public void sort(File source, File destination) throws IOException {
        RandomAccessFile rafw = new RandomAccessFile(destination, "rw");
        int quantityRows = 0;
        try (RandomAccessFile rafr = new RandomAccessFile(source, "r")){
            while (rafr.readLine() != null){
                quantityRows++;
            }
        }
        catch (IOException ex){
            System.out.println(ex.getMessage());
        }
        System.out.println("Rows : " + quantityRows);

        RandomAccessFile rafr = new RandomAccessFile(source, "r");
        int count = 1;
        String name = "temp1.txt";
        String line, fileNames;
        fileNames = name;
        int []rowsLength = new int[quantityRows];
        int i = 0;
        while ((line = rafr.readLine()) != null){
            RandomAccessFile rafTmp1 = new RandomAccessFile(name, "rw");
            rafTmp1.writeBytes(String.format("%s", line));
                rowsLength[i] = line.length();
                i++;
            if (count > 1) {
                fileNames = fileNames.concat(" ").concat(name);
            }
            count++;
            name = "temp".concat(String.valueOf(count).concat(".txt"));
        }
        rafr.close();
        String []files = fileNames.split(" ");
/*
        //пробуємо вивести імена файлів з відповідною довжиною рядків кожного з них

        for (int n = 0; n < quantityRows; n++){
            System.out.println("_____________________");
            System.out.println("File name: " + files[n] + "Length: " + rowsLength[n]);
            System.out.println("_____________________");
        }
*/
        //сортування массивів методом бульбашки

        int mov = 0;
        int temp;
        String tempS;
        boolean flagRemoved = true;
        while (flagRemoved){
            flagRemoved = false;
            for (int k = 0; k < rowsLength.length - 1 - mov; k++){
                if (rowsLength[k] > rowsLength[k + 1]){
                    temp = rowsLength[k + 1];
                    tempS = files[k + 1];
                    rowsLength[k + 1] = rowsLength[k];
                    files[k + 1] = files[k];
                    rowsLength[k] = temp;
                    files[k] = tempS;
                    flagRemoved = true;
                }
            }
            mov++;
        }
/*
        //пробуємо вивести відсортовані назви файлів

        System.out.println("Sorted files: ");
        for (int n = 0; n < quantityRows; n++){
            System.out.println("_____________________");
            System.out.println("File name: " + files[n] + "Length: " + rowsLength[n]);
            System.out.println("_____________________");
        }
*/
        //пробуємо записати в вихідний файл

        for (int i1 = 0; i1 < files.length; i1++) {
            String file = files[i1];
            RandomAccessFile rafMulti = new RandomAccessFile(file, "r");
            if (i1 !=  0) {
                rafw.writeBytes(System.lineSeparator());
            }
            rafw.writeBytes(rafMulti.readLine());

            //видаляємо тимчасові файли

            File f = new File(file);
            if (f.delete())
                System.out.println(" - " + file + " was deleted!");
        }
            rafw.close();
    }
}


text:
package dk.brics.tajs.analysis.dom.html;

import dk.brics.tajs.analysis.InitialStateBuilder;
import dk.brics.tajs.analysis.State;
import dk.brics.tajs.analysis.dom.DOMObjects;
import dk.brics.tajs.analysis.dom.DOMSpec;
import dk.brics.tajs.analysis.dom.DOMWindow;
import dk.brics.tajs.analysis.dom.core.DOMDocument;
import dk.brics.tajs.flowgraph.ObjectLabel;
import dk.brics.tajs.lattice.Value;

import dk.brics.tajs.dependency.Dependency;
import dk.brics.tajs.dependency.graph.DependencyGraphReference;

import static dk.brics.tajs.analysis.dom.DOMFunctions.createDOMProperty;
import static dk.brics.tajs.analysis.dom.DOMFunctions.createDOMInternalPrototype;
import static dk.brics.tajs.analysis.dom.DOMFunctions.createDOMSpecialProperty;

/**
 * Generic embedded object.
 * <p/>
 * Note: In principle, all properties on the object element are read-write but
 * in some environments some properties may be read-only once the underlying
 * object is instantiated. See the OBJECT element definition in [HTML 4.01].
 */
public class HTMLObjectElement {

	public static ObjectLabel CONSTRUCTOR;
	public static ObjectLabel PROTOTYPE;
	public static ObjectLabel INSTANCES;

	public static void build(State s) {
		CONSTRUCTOR = new ObjectLabel(DOMObjects.HTMLOBJECTELEMENT_CONSTRUCTOR, ObjectLabel.Kind.FUNCTION);
		PROTOTYPE = new ObjectLabel(DOMObjects.HTMLOBJECTELEMENT_PROTOTYPE, ObjectLabel.Kind.OBJECT);
		INSTANCES = new ObjectLabel(DOMObjects.HTMLOBJECTELEMENT_INSTANCES, ObjectLabel.Kind.OBJECT);

		// Constructor Object
		s.newObject(CONSTRUCTOR);
		createDOMSpecialProperty(s, CONSTRUCTOR, "length", Value.makeNum(0, new Dependency(), new DependencyGraphReference()).setAttributes(true, true, true));
		createDOMSpecialProperty(s, CONSTRUCTOR, "prototype",
				Value.makeObject(PROTOTYPE, new Dependency(), new DependencyGraphReference()).setAttributes(true, true, true));
		createDOMInternalPrototype(s, CONSTRUCTOR, Value.makeObject(InitialStateBuilder.OBJECT_PROTOTYPE, new Dependency(), new DependencyGraphReference()));
		createDOMProperty(s, DOMWindow.WINDOW, "HTMLObjectElement", Value.makeObject(CONSTRUCTOR, new Dependency(), new DependencyGraphReference()));

		// Prototype Object
		s.newObject(PROTOTYPE);
		createDOMInternalPrototype(s, PROTOTYPE, Value.makeObject(HTMLElement.ELEMENT_PROTOTYPE, new Dependency(), new DependencyGraphReference()));

		// Multiplied Object
		s.newObject(INSTANCES);
		createDOMInternalPrototype(s, INSTANCES, Value.makeObject(PROTOTYPE, new Dependency(), new DependencyGraphReference()));

		/*
		 * Properties.
		 */
		// DOM Level 1
		createDOMProperty(s, INSTANCES, "form", Value.makeObject(HTMLFormElement.INSTANCES, new Dependency(), new DependencyGraphReference()).setReadOnly(),
				DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "code", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "align", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "archive", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "border", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "codeBase", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "codeType", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "data", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "declare", Value.makeAnyBool(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "height", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "hspace", Value.makeAnyNum(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "name", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "standby", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "tabIndex", Value.makeAnyNum(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "type", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "useMap", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "vspace", Value.makeAnyNum(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);
		createDOMProperty(s, INSTANCES, "width", Value.makeAnyStr(new Dependency(), new DependencyGraphReference()), DOMSpec.LEVEL_1);

		// DOM Level 2
		createDOMProperty(s, INSTANCES, "contentDocument", Value.makeObject(DOMDocument.INSTANCES, new Dependency(), new DependencyGraphReference())
				.setReadOnly(), DOMSpec.LEVEL_2);

		s.multiplyObject(INSTANCES);
		INSTANCES = INSTANCES.makeSingleton().makeSummary();

		/*
		 * Functions.
		 */
		// No functions.
	}

}


text:
#pragma once

#include "cinder/Vector.h"
#include <vector>

namespace cinder {

template<typename T>
class PolyLine {
  public:
	PolyLine() : mClosed( false ) {}
	PolyLine( const std::vector<T> &aPoints ) : mPoints( aPoints ), mClosed( false ) {}

	const std::vector<T>&	getPoints() const { return mPoints; }
	std::vector<T>&			getPoints() { return mPoints; }

	// STL-like convenience functions for iterating points
	typedef typename std::vector<T>::const_iterator	const_iterator;
	typedef typename std::vector<T>::iterator		iterator;

	size_t				size() const { return mPoints.size(); }

	void				push_back( const T &v ) { mPoints.push_back( v ); }
	iterator			begin() { return mPoints.begin(); }
	const_iterator		begin() const { return mPoints.begin(); }
	iterator			end() { return mPoints.end(); }
	const_iterator		end() const { return mPoints.end(); }

	void				setClosed( bool aClosed = true ) { mClosed = aClosed; }
	bool				isClosed() const { return mClosed; }

	T			getPosition( float t ) const;
	T			getDerivative( float t ) const;

	void		scale( const T &scaleFactor, T scaleCenter = T::zero() );
	void		offset( const T &offsetBy );

	//! Returns whether the point \a pt is contained within the boundaries of the PolyLine
	bool	contains( const Vec2f &pt ) const;

	//! Calculates the boolean union of \a a and \a b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes.
	static std::vector<PolyLine> 	calcUnion( const std::vector<PolyLine> &a, std::vector<PolyLine> &b );
	//! Calculates the boolean intersection of \a a and \a b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes.
	static std::vector<PolyLine> 	calcIntersection( const std::vector<PolyLine> &a, std::vector<PolyLine> &b );
	//! Calculates the boolean XOR (symmetric difference) of \a a and \a b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes.
	static std::vector<PolyLine> 	calcXor( const std::vector<PolyLine> &a, std::vector<PolyLine> &b );
	//! Calculates the boolean difference of \a a and \a b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes.
	static std::vector<PolyLine> 	calcDifference( const std::vector<PolyLine> &a, std::vector<PolyLine> &b );

  private:
	std::vector<T>			mPoints;
	bool					mClosed;
};

typedef PolyLine<Vec2f> PolyLine2f;
typedef PolyLine<Vec2d> PolyLine2d;

} // namespace cinder


text:
require 'spec_helper'

describe Vote do
  it { should belong_to(:suggestion) }
  it { should validate_presence_of(:suggestion_id) }
  it { should belong_to(:voter) }
  it { should validate_presence_of(:voter_id) }
  it { should validate_presence_of(:voter_type) }

  it 'is valid if the user has not already voted for the suggestion' do
    vote = build(:vote)

    vote.should be_valid
  end

  it 'is not valid if the user has already voted for the suggestion' do
    vote = create(:vote)
    duplicated_vote = build(
        :vote,
        suggestion: vote.suggestion,
        voter: vote.voter
    )

    duplicated_vote.should be_invalid
  end
end

describe Vote, '#no_votes_witin_delay_window?' do
  include DelayedJobSpecHelper

  it 'is false if a second email is sent within the delay window' do
    first_vote = create(:vote)
    voter = first_vote.voter
    event = first_vote.suggestion.event
    second_suggestion = create(:suggestion, event: event)
    second_vote = create(:vote, voter: voter, suggestion: second_suggestion)

    first_vote_check = first_vote.has_no_other_votes_within_delay_window?
    second_vote_check = second_vote.has_no_other_votes_within_delay_window?

    first_vote_check.should be_false
    second_vote_check.should be_true
  end

  it 'is true if two emails are sent outside the delay window' do
    first_vote = create(:vote)
    voter = first_vote.voter
    event = first_vote.suggestion.event
    second_suggestion = create(:suggestion, event: event)

    Timecop.freeze(VoteConfirmationEmailJob::DELAY.from_now)
    second_vote = create(:vote, voter: voter, suggestion: second_suggestion)
    Timecop.return
    first_vote_check = first_vote.has_no_other_votes_within_delay_window?
    second_vote_check = second_vote.has_no_other_votes_within_delay_window?

    first_vote_check.should be_true
    second_vote_check.should be_true
  end
end

describe Vote, '#event' do
  it 'returns the vote\'s event' do
    vote = create(:vote)
    vote.event.should == vote.suggestion.event
  end
end

describe Vote, '#create' do
  it 'creates a delayed job' do
    VoteCreatedJob.stubs(:enqueue)

    vote = create(:vote)

    VoteCreatedJob.should have_received(:enqueue).with(vote)
  end
end


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.12.20 at 12:48:21 PM GMT
//

package weka.core.pmml.jaxbbindings;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for Aggregate element declaration.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <element name="Aggregate">
 *   <complexType>
 *     <complexContent>
 *       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *         <sequence>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Extension" maxOccurs="unbounded" minOccurs="0"/>
 *         </sequence>
 *         <attribute name="field" use="required" type="{http://www.dmg.org/PMML-4_1}FIELD-NAME" />
 *         <attribute name="function" use="required">
 *           <simpleType>
 *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *               <enumeration value="count"/>
 *               <enumeration value="sum"/>
 *               <enumeration value="average"/>
 *               <enumeration value="min"/>
 *               <enumeration value="max"/>
 *               <enumeration value="multiset"/>
 *             </restriction>
 *           </simpleType>
 *         </attribute>
 *         <attribute name="groupField" type="{http://www.dmg.org/PMML-4_1}FIELD-NAME" />
 *         <attribute name="sqlWhere" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       </restriction>
 *     </complexContent>
 *   </complexType>
 * </element>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "extension"
})
@XmlRootElement(name = "Aggregate")
public class Aggregate {

    @XmlElement(name = "Extension", namespace = "http://www.dmg.org/PMML-4_1", required = true)
    protected List<Extension> extension;
    @XmlAttribute(required = true)
    protected String field;
    @XmlAttribute(required = true)
    protected String function;
    @XmlAttribute
    protected String groupField;
    @XmlAttribute
    protected String sqlWhere;

    /**
     * Gets the value of the extension property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the extension property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getExtension().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Extension }
     *
     *
     */
    public List<Extension> getExtension() {
        if (extension == null) {
            extension = new ArrayList<Extension>();
        }
        return this.extension;
    }

    /**
     * Gets the value of the field property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getField() {
        return field;
    }

    /**
     * Sets the value of the field property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setField(String value) {
        this.field = value;
    }

    /**
     * Gets the value of the function property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getFunction() {
        return function;
    }

    /**
     * Sets the value of the function property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setFunction(String value) {
        this.function = value;
    }

    /**
     * Gets the value of the groupField property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getGroupField() {
        return groupField;
    }

    /**
     * Sets the value of the groupField property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setGroupField(String value) {
        this.groupField = value;
    }

    /**
     * Gets the value of the sqlWhere property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getSqlWhere() {
        return sqlWhere;
    }

    /**
     * Sets the value of the sqlWhere property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setSqlWhere(String value) {
        this.sqlWhere = value;
    }

}


text:
Directives are classes which get instantiated as a response to a particular DOM structure. By controlling the DOM structure, what directives are imported, and their selectors, the developer can use the [composition pattern](http://en.wikipedia.org/wiki/Object_composition) to get a desirable application behavior.

Directives are the cornerstone of an Angular application. We use Directives to break complex problems into smaller more reusable components. Directives allow the developer to turn HTML into a DSL and then control the application assembly process.

Angular applications do not have a main method. Instead they have a root Component. Dependency Injection then assembles the directives into a working Angular application.

Directives with an encapsulated view and an optional injector are called *Components*.

## CSS Selectors

Directives are instantiated whenever the CSS selector matches the DOM structure.

Angular supports these CSS selector constructs:
* Element name: `name`
* Attribute: `[attribute]`
* Attribute has value: `[attribute=value]`
* Attribute contains value: `[attribute*=value]`
* Class: `.class`
* AND operation: `name[attribute]`
* OR operation: `name,.class`
* NOT operation: `:not(.class)`

Angular does not support these (and any CSS selector which crosses element boundaries):
* Descendant: `body div`
* Direct descendant: `body > div`
* Adjacent: `div + table`
* Sibling: `div ~ table`
* Wildcard: `*`
* ID: `#id`
* Pseudo selectors: `:pseudo` other than `:not`

Given this DOM:

```<input type="text" required class="primary">```

These CSS selectors will match:
* `input`: Triggers whenever element name is `input`.
* `[required]`: Triggers whenever element contains a required attribute.
* `[type=text]`: Triggers whenever element contains attribute `type` whose value is `text`.
* `.primary`: Triggers whenever element class contains `primary`.

CSS Selectors can be combined:
* `input[type=text]`: Triggers on element name `input` which is of `type` `text`.
* `input[type=text], textarea`: triggers on element name `input` which is of `type` `text` or element name `textarea`.

## Directives

The simplest kind of directive is a decorator. Directives are useful for encapsulating behavior.

* Multiple decorators can be placed on a single element.
* Directives do not introduce new evaluation context.
* Directives are registered through the `@Directive` meta-data annotation.

Here is a trivial example of a tooltip decorator. The directive will log a tooltip into the console on every time mouse enters a region:

```
@Directive({
  selector: '[tooltip]',     | CSS Selector which triggers the decorator
  properties: [              | List which properties need to be bound
    'text: tooltip'          |  - DOM element tooltip property should be
  ],                         |    mapped to the directive text property.
  host: {                    | List which events need to be mapped.
    (mouseover): 'show()'    |  - Invoke the show() method every time
  }                          |    the mouseover event is fired.
})                           |
class Form {                 | Directive controller class, instantiated
                             | when CSS matches.
  text:string;               | text property on the Directive Controller.
                             |
  show(event) {              | Show method which implements the show action.
    console.log(this.text);  |
  }
}
```

Example of usage:

```<span tooltip="Tooltip text goes here.">Some text here.</span>```

The developer of an application can now freely use the `tooltip` attribute wherever the behavior is needed. The code above has taught the browser a new reusable and declarative behavior.

Notice that data binding will work with this decorator with no further effort as shown below.

```<span tooltip="Greetings {{user}}!">Some text here.</span>```

## Components

Component is a directive which uses shadow DOM to create encapsulate visual behavior. Components are typically used to create UI widgets or to break up the application into smaller components.

* Only one component can be present per DOM element.
* Component's CSS selectors usually trigger on element names. (Best practice)
* Component has its own shadow view which is attached to the element as a Shadow DOM.
* Shadow view context is the component instance. (i.e. template expressions are evaluated against the component instance.)

>> TODO(misko): Configuring the injector

Example of a component:

```
@Component({                      | Component annotation
  selector: 'pane',               | CSS selector on <pane> element
  properties: [                   | List which property need to be bound
    'title',                      |  - title mapped to component title
    'open'                        |  - open attribute mapped to component's open property
  ],                              |
})                                |
@View({                           | View annotation
  templateUrl: 'pane.html'        |  - URL of template HTML
})                                |
class Pane {                      | Component controller class
  title:string;                   |  - title property
  open:boolean;

  constructor() {
    this.title = '';
    this.open = true;
  }

  // Public API
  toggle() => this.open = !this.open;
  open() => this.open = true;
  close() => this.open = false;
}
```

`pane.html`:
```
<div class="outer">
  <h1>{{title}}</h1>
  <div class="inner" [hidden]="!open">
    <ng-content></ng-content>
  </div>
</div>
```

`pane.css`:
```
.outer, .inner { border: 1px solid blue;}
.h1 {background-color: blue;}
```

Example of usage:
```
<pane #pane title="Example Title" open="true">
  Some text to wrap.
</pane>
<button (click)="pane.toggle()">toggle</button>

```

## Directives that use a ViewContainer

Directives that use a ViewContainer can control instantiation of child views which are then inserted into the DOM. (Examples are `ng-if` and `ng-for`.)

* Every `template` element creates a `ProtoView` which can be used to create Views via the ViewContainer.
* The child views show up as siblings of the directive in the DOM.

>> TODO(misko): Relationship with Injection
>> TODO(misko): Instantiator can not be injected into child Views

```
@Directive({
  selector: '[if]',
  properties: [
    'condition: if'
  ]
})
export class If {
  viewContainer: ViewContainerRef;
  protoViewRef: ProtoViewRef;
  view: View;

  constructor(viewContainer: ViewContainerRef, protoViewRef: ProtoViewRef) {
    this.viewContainer = viewContainer;
    this.protoViewRef = protoViewRef;
    this.view = null;
  }

  set condition(value) {
    if (value) {
      if (this.view === null) {
        this.view = this.viewContainer.create(protoViewRef);
      }
    } else {
      if (this.view !== null) {
        this.viewContainer.remove(this.view);
        this.view = null;
      }
    }
  }
}
```

## Dependency Injection

Dependency Injection (DI) is a key aspect of directives. DI allows directives to be assembled into different [compositional](http://en.wikipedia.org/wiki/Object_composition) hierarchies. Angular encourages [composition over inheritance](http://en.wikipedia.org/wiki/Composition_over_inheritance) in the application design (but inheritance based approaches are still supported).

When Angular directives are instantiated, the directive can ask for other related directives to be injected into it. By assembling the directives in different order and subtypes the application behavior can be controlled. A good mental model is that the DOM structure controls the directive instantiation graph.

Directive instantiation is triggered by the directive CSS selector matching the DOM structure. In a directive's constructor, it can ask for other directives or application services. When asking for directives, the dependency is attempted to be located by its DOM hierarchy first, then if not found, by using the application level injector.

To better understand the kinds of injections which are supported in Angular we have broken them down into use case examples.

### Injecting Services

Service injection is the most straight forward kind of injection which Angular supports. It involves a component configuring the `viewInjector` or `hostInjector` and then letting the directive ask for the configured service.

This example illustrates how to inject `MyService` into `House` directive.

```
class MyService {}                   | Assume a service which needs to be injected
                                     | into a directive.
                                     |
@Component({                         | Assume a top level application component which
  selector: 'my-app',                | configures the services to be injected.
  viewInjector: [MyService]           |
})                                   |
@View({                              | Assume we have a template that needs to be
  templateUrl: 'my_app.html',        | configured with directives to be injected.
  directives: [House]                |
})                                   |
class MyApp {}                       |
                                     |
@Directive({                         | This is the directive into which we would like
  selector: '[house]'                | to inject the MyService.
})                                   |
class House {                        |
  constructor(myService:MyService) { | Notice that in the constructor we can simply
  }                                  | ask for MyService.
}                                    |

```

Assume the following DOM structure for `my_app.html`:
```
<div house>     | The house attribute triggers the creation of the House directive.
</div>          | This is equivalent to:
                |   new House(injector.get(MyService));
```

### Injecting other Directives

Injecting other directives into directives follows a similar mechanism as injecting services into directives, but with added constraint of visibility governed by DOM structure.

There are five kinds of visibilities:

* (no annotation): Inject dependent directives only if they are on the current element.
* `@ancestor`: Inject a directive if it is at any element above the current element.
* `@parent`: Inject a directive which is a direct parent of the current element.
* `@child`: Inject a list of direct children which match a given type. (Used with `Query`)
* `@descendant`: Inject a list of any children which match a given type. (Used with `Query`)

NOTE: if the injection constraint can not be satisfied by the current visibility constraint, then it is forwarded to the normal injector which either provides a default value for the directive or throws an error.

Here is an example of the kinds of injections which can be achieved:

```
@Component({                         |
  selector: 'my-app'                 |
})                                   |
@View({                              |
  templateUrl: 'my_app.html',        |
  directives: [Form, FieldSet,       |
    Field, Primary]                  |
})                                   |
class MyApp {}                       |
                                     |
@Directive({ selector: 'form' })     |
class Form {                         |
  constructor(                       |
    @descendant sets:Query<FieldSet> |
  ) {                                |
  }                                  |
}                                    |
                                     |
@Directive({ selector: 'fieldset' }) |
class FieldSet {                     |
  constructor(                       |
    @child sets:Query<Field>         |
  ) { ... }                          |
}                                    |
                                     |
@Directive({ selector: 'field' })    |
class Field {                        |
  constructor(                       |
    @ancestor field:Form,            |
    @parent field:FieldSet,          |
  ) { ... }                          |
}                                    |
                                     |
@Directive({ selector: '[primary]'}) |
class Primary {                      |
  constructor(field:Field ) { ... }  |
}                                    |
```

Assume the following DOM structure for `my_app.html`:
```
<form>                         |
  <div>                        |
    <fieldset>                 |
       <field primary></field> |
       <field></field>         |
    </fieldset>                |
  </div>                       |
</form>                        |
```

#### Shadow DOM effects on Directive DI

Shadow DOM provides an encapsulation for components, so as a general rule it does not allow directive injections to cross the shadow DOM boundaries. To remedy this, declaratively specify the required component as an injectable.

```
@Component({
  selector: '[kid]'
})
@View({
  templateUrl: 'kid.html',
  directives: []
})
class Kid {
  constructor(
    @Parent() dad:Dad,
    @Optional() grandpa:Grandpa
  ) {
    this.name = 'Billy';
    this.dad = dad.name;
    this.grandpa = grandpa.name;
  }
}

@Component({
  selector: '[dad]'
})
@View({
  templateUrl: 'dad.html',
  directives: [Kid]
})
class Dad {
  constructor(@Parent() dad:Grandpa) {
    this.name = 'Joe Jr';
    this.dad = dad.name;
  }
}

@Component({
  selector: '[grandpa]',
  viewInjector: []
})
@View({
  templateUrl: 'grandpa.html',
  directives: [Dad]
})
class Grandpa {
  constructor() {
    this.name = 'Joe';
  }
}
```

Assume the following DOM structure for `grandpa.html`: The Dad has access to the Grandpa.
```
Name: {{name}}: <br> Children: <div dad></div>
```

Assume the following DOM structure for `dad.html`: Here the rendered Kid will also have access to Grandpa.
```
Name: {{name}}: <br> Dad: {{dad}} <br> Children: <div kid></div>
```

## Further Reading

* [Composition](http://en.wikipedia.org/wiki/Object_composition)
* [Composition over Inheritance](http://en.wikipedia.org/wiki/Composition_over_inheritance)


text:
[ -s "${HOME}"/.bashrc ] || cp ./.bashrc_template "${HOME}"/.bashrc

# Standard .bash_profile
[ -s ${HOME}/.bash_profile ] && mv ./.bashrc_profile ./.bash_profile_backup
cp ./.bash_profile_template ${HOME}/.bash_profile

# Check for PYTHONSTARTUP
grep "export PYTHONSTARTUP" "${HOME}"/.bashrc > /dev/null 2>&1
if [ "$?" -ne 0 ] ; then
    {
        echo ""
        echo "# Set Python startup file in PYTHONSTARTUP environment variable"
        echo "export PYTHONSTARTUP=\"/home/x7df/.pythonrc.py\""
    } >> "${HOME}"/.bashrc
fi

# Put the .pythonrc.py file in the right place
[ -s "${HOME}"/.pythonrc.py ] || cp ./.pythonrc.py_template "${HOME}"/.pythonrc.py

# Put the .gitconfig file in the right place and open it up for editing
[ -s "${HOME}"/.gitconfig ] && mv "${HOME}"/.gitconfig ./.gitconfig_backup
cp ./.gitconfig_template "${HOME}"/.gitconfig

[ -s "${HOME}"/.gitignore_global ] && mv "${HOME}"/.gitignore_global ./.gitignore_global_backup
cp ./.gitignore_global "${HOME}"/.gitignore_global

# Put the .vimrc file in the right place
[ -s "${HOME}"/.vimrc ] || cp ./.vimrc_template "${HOME}"/.vimrc

# Add the Nest theme for Pelican
cd /usr/local/lib/python2.7/dist-packages/pelican/themes/ && \
git clone https://github.com/molivier/nest.git

cd ~ && \
git clone https://github.com/barrysteyn/pelican_plugin-render_math.git

# Set up a few things
mkdir -p "${HOME}"/bin
mkdir -p /mnt/Programming
mkdir -p ${HOME}/.aws


text:
Simple HTTP server framework, written in C#. Inspired by [Express](https://github.com/strongloop/express).

*Espresso con panna* is also Italian for coffee with cream.

**NOTE**: it is a project built for learning and fun, not with intention to use in production (yet).
## Example

To you can create a simple server with Conpanna in just a few lines of code:

```csharp
public class Program {
    static void Main(string[] args) {
        using (var app = new Conpanna()) {
            app.Get("/hello", (req, res) => res.Send("Hello World!"));
            app.Listen("localhost", 8080, () => Console.WriteLine("Listening on http://localhost:8080"));
            System.Console.ReadLine();
        }
    }
}
```

This server would respond to GET request on http://localhost:8000/ with 'Hello World!' string.

## Dependencies

Project depends on [Moq](https://github.com/Moq/moq) for mocking, [SimpleInjector](https://simpleinjector.org/index.html) for dependency injection and [Xunit](http://xunit.github.io/) for unit testing.

## TODO

There are a few more things I would like to add:
* Middleware support, e.g. ```app.use(...)```
* A few built in middlewares
* JSON support
* Implement missing feature from Request and Response classes, e.g. JSON support
* Test on Linux and MacOs with CoreCLR

## Contributing
Issues, PRs, suggestions always welcome.


text:
===============================
tome
===============================

tome

* Free software: Apache license

Features
--------

* TODO


text:
package reader

import (
	"github.com/mantzas/incata/marshal"
	"github.com/mantzas/incata/model"
	"github.com/mantzas/incata/storage"
	"github.com/satori/go.uuid"
)

// SQLReader for reading events
type SQLReader struct {
	Storage    *storage.Storage
	Serializer marshal.Serializer
}

// NewSQLReader creates a new sql reader
func NewSQLReader(storage *storage.Storage, ser marshal.Serializer) *SQLReader {

	return &SQLReader{Storage: storage, Serializer: ser}
}

// Read from db with source id
func (r *SQLReader) Read(sourceID uuid.UUID) ([]model.Event, error) {

	rows, err := r.Storage.Query(r.Storage.SelectBySourceIDStatement, sourceID.String())
	if err != nil {
		return nil, err
	}
	defer rows.Close()

	var events = make([]model.Event, 0)

	for rows.Next() {
		var event = new(model.Event)

		if err := rows.Scan(&event.ID, &event.SourceID, &event.Created, &event.EventType, &event.Version, &event.Payload); err != nil {
			return nil, err
		}

		events = append(events, *event)
	}

	if err := rows.Err(); err != nil {
		return nil, err
	}

	return events, nil
}


text:
<?php

final class AlmanacInterfaceTransactionQuery
  extends PhabricatorApplicationTransactionQuery {

  public function getTemplateApplicationTransaction() {
    return new AlmanacInterfaceTransaction();
  }

}


text:
using System.Collections.ObjectModel;
using SFML.Graphics;
using ShellUtil;

namespace EnergyShell.GameObjects.Weapons.Bullets
{
    /// <summary>
    /// Renders bullets stored in a batched list.
    /// </summary>
    public sealed class BulletRenderBatch
    {
        /// <summary>
        /// The render target.
        /// </summary>
        private readonly IRenderTarget renderTarget;

        /// <summary>
        /// The bullet world.
        /// </summary>
        private readonly ReadOnlyCollection<Bullet> bulletWorld;

        /// <summary>
        /// The bullet radius.
        /// </summary>
        private readonly int bulletRadius;

        /// <summary>
        /// The shape used to render bullets.
        /// </summary>
        private readonly CircleShape bulletShape;

        /// <summary>
        /// Initializes a new instance of the <see cref="BulletRenderBatch"/> class.
        /// </summary>
        /// <param name="renderTarget">The render target.</param>
        /// <param name="bulletWorld">The bullet world.</param>
        /// <param name="bulletRadius">The bullet radius.</param>
        public BulletRenderBatch(IRenderTarget renderTarget, ReadOnlyCollection<Bullet> bulletWorld, int bulletRadius)
        {
            this.renderTarget = renderTarget;
            this.bulletWorld = bulletWorld;
            this.bulletRadius = bulletRadius;

            this.bulletShape = new CircleShape(this.bulletRadius);
            this.bulletShape.Origin = new Vector2(this.bulletRadius);
        }

        /// <summary>
        /// Batch draws al the
        /// </summary>
        /// <param name="interpolation">The interpolation.</param>
        public void Draw(double interpolation)
        {
            for (int i = 0; i < this.bulletWorld.Count; ++i)
            {
                Bullet bullet = this.bulletWorld[i];
                this.bulletShape.Position = bullet.Position;

                this.renderTarget.Draw(this.bulletShape);
            }
        }
    }
}


text:
namespace MomWorld.DataContexts.Migrations.IdentityMigrations
{
    using Microsoft.AspNet.Identity;
    using Microsoft.AspNet.Identity.EntityFramework;
    using MomWorld.Models;
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;

    internal sealed class Configuration : DbMigrationsConfiguration<MomWorld.DataContexts.IdentityDb>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
            MigrationsDirectory = @"DataContexts\Migrations\IdentityMigrations";
        }

        protected override void Seed(MomWorld.DataContexts.IdentityDb context)
        {
            //  This method will be called after migrating to the latest version.

            //  You can use the DbSet<T>.AddOrUpdate() helper extension method
            //  to avoid creating duplicate seed data. E.g.
            //
            //    context.People.AddOrUpdate(
            //      p => p.FullName,
            //      new Person { FullName = "Andrew Peters" },
            //      new Person { FullName = "Brice Lambson" },
            //      new Person { FullName = "Rowan Miller" }
            //    );
            //

            var UserManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(context));
            var RoleManager = new RoleManager<IdentityRole>(new RoleStore<IdentityRole>(context));

            // Create Admin Role
            string roleName = "Admins";
            IdentityResult roleResult;

            // Check to see if Role Exists, if not create it
            if (!RoleManager.RoleExists(roleName))
            {
                roleResult = RoleManager.Create(new IdentityRole(roleName));
            }

            // Create Users Role
            roleName = "Users";

            // Check to see if Role Exists, if not create it
            if (!RoleManager.RoleExists(roleName))
            {
                roleResult = RoleManager.Create(new IdentityRole(roleName));
            }

            // Create user Admin
            if (UserManager.FindByName("admin") == null)
            {
                var adminUser = new ApplicationUser { Email = "admin@momworld.com", UserName = "admin", ProfilePicture = "~/App/uploads/avatar/default.png", Status = 2, EmailConfirmed = true };
                UserManager.Create(adminUser, "12345678");
                UserManager.AddToRole(adminUser.Id, "Admins");
            }

            // Create normal user
            if (UserManager.FindByName("phoht") == null)
            {
                var user1 = new ApplicationUser { Email = "phohtse90083@fpt.edu.vn", UserName = "phoht", ProfilePicture = "~/App/uploads/avatar/default.png", Status = 2, EmailConfirmed = true };
                UserManager.Create(user1, "12345678");
                UserManager.AddToRole(user1.Id, "Users");
            }

            // Create normal user
            if (UserManager.FindByName("khoapc") == null)
            {
                var user2 = new ApplicationUser { Email = "khoapcse90038@fpt.edu.vn", UserName = "khoapc", ProfilePicture = "~/App/uploads/avatar/default.png", Status = 2, EmailConfirmed = true };
                UserManager.Create(user2, "12345678");
                UserManager.AddToRole(user2.Id, "Users");
            }

            // Create normal user
            if (UserManager.FindByName("khoahn") == null)
            {
                var user3 = new ApplicationUser { Email = "khoahnse56@fpt.edu.vn", UserName = "khoahn", ProfilePicture = "~/App/uploads/avatar/default.png", Status = 2, EmailConfirmed = true };
                UserManager.Create(user3, "12345678");
                UserManager.AddToRole(user3.Id, "Users");
            }

            // Create normal user
            if (UserManager.FindByName("datnt") == null)
            {
                var user4 = new ApplicationUser { Email = "datntse90012@fpt.edu.vn", UserName = "datnt", ProfilePicture = "~/App/uploads/avatar/default.png", Status = 2, EmailConfirmed = true };
                UserManager.Create(user4, "12345678");
                UserManager.AddToRole(user4.Id, "Users");
            }

            // Create normal user
            if (UserManager.FindByName("trungnm") == null)
            {
                var user5 = new ApplicationUser { Email = "trungnmse90088@fpt.edu.vn", UserName = "trungnm", ProfilePicture = "~/App/uploads/avatar/default.png", Status = 2, EmailConfirmed = true };
                UserManager.Create(user5, "12345678");
                UserManager.AddToRole(user5.Id, "Users");
            }
        }
    }
}


text:
<?php

class ActionOxygenDeleteErr extends Action {

	public function GetDefaultMode(){ return Action::MODE_AJAX_DIALOG; }
	public function GetTitle(){ return 'Delete error report '.$this->err; }

	private $err;
	public function __construct($err){ parent::__construct(); $this->err = $err; }
	public function GetUrlArgs(){ return array('err'=>$this->err) + parent::GetUrlArgs(); }
	public static function Make(){ return new static(Http::$GET['err']->AsString()); }

	public function IsPermitted(){
		return true;
	}

	public function Render(){

		$f = Oxygen::GetLogFolder(true);
		$ff = $f . '/' . $this->err . '.err';

		unlink($ff);
		Oxygen::Refresh();

	}

}


text:
@interface AppDelegate ()

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    self.window.rootViewController = ({
        UITabBarController *tabController = [[UITabBarController alloc] init];

        NSMutableArray *controllers = [NSMutableArray new];

        {
            ViewControllerSimple *c = [[ViewControllerSimple alloc] init];
            c.title = @"Simple";
            [controllers addObject: c];
        }

        {
            ViewControllerMultiple *c = [[ViewControllerMultiple alloc] init];
            c.title = @"Multiple";
            [controllers addObject: c];
        }

        {
            ViewControllerFancy *c = [[ViewControllerFancy alloc] init];
            c.title = @"Fancy";
            [controllers addObject: c];
        }

        tabController.viewControllers = controllers;

        tabController;
    });

    [self.window makeKeyAndVisible];

    return YES;
}

@end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Abaqus;

namespace UnitTest.ParserTests
{
    class NodeTheory : ParserTestBase
    {

        [Datapoints]
        public IEnumerable<Input> node_definition
        {
            get
            {
                yield return new Input("*NODE\n1\n");
                yield return new Input("*node,nset=all\n2\n");
                yield return new Input("*node\n1,2,3\n,4,5,6\n");
                yield return new Input("*node\n**\n1,6.0, 4.5, 1.3");
            }
        }

        [Theory]
        public void 有効な文字列をパースしたあとはGlobalNodeにItemが存在する(Input inp)
        {
            Assume.That(inp, Is.Not.Null);
            Assume.That(inp.valid);
            //Assert.Fail();
            Assert.That(parser.model.global_nodes, Is.Not.Null.Or.Empty);
        }
    }
}


text:
package org.jboss.aerogear.android.offline;

import org.jboss.aerogear.android.core.ConfigurationProvider;
import org.jboss.aerogear.android.offline.internal.InternalStorageConfiguration;
import org.jboss.aerogear.android.offline.internal.InternalStorageConfigurationProvider;

import java.util.HashMap;
import java.util.Map;

/**
 * A Manager which handles the registration of configurations and references to
 * created storages.
 */
public class StorageManager {

    private static Map<String, Storage> storages = new HashMap<String, Storage>();

    private static Map<Class<? extends StorageConfiguration<?>>, ConfigurationProvider<?>> configurationProviderMap =
            new HashMap<Class<? extends StorageConfiguration<?>>, ConfigurationProvider<?>>();

    private static OnStorageCreatedListener onStorageCreatedListener = new OnStorageCreatedListener() {
        @Override
        public void onStorageCreated(StorageConfiguration<?> configuration, Storage storage) {
            storages.put(configuration.getName(), storage);
        }
    };

    static {
        StorageManager.registerConfigurationProvider(InternalStorageConfiguration.class,
                new InternalStorageConfigurationProvider());
    }

    private StorageManager() {
    }

    public static <CONFIGURATION extends StorageConfiguration<CONFIGURATION>> void registerConfigurationProvider
            (Class<CONFIGURATION> configurationClass, ConfigurationProvider<CONFIGURATION> provider) {
        configurationProviderMap.put(configurationClass, provider);
    }

    public static <CFG extends StorageConfiguration<CFG>> CFG config(String name, Class<CFG> storageImplementationClass) {

        @SuppressWarnings("unchecked")
        ConfigurationProvider<? extends StorageConfiguration<CFG>> provider =
                (ConfigurationProvider<? extends StorageConfiguration<CFG>>)
                configurationProviderMap.get(storageImplementationClass);

        if (provider == null) {
            throw new IllegalArgumentException("Configuration not registered!");
        }

        return provider.newConfiguration()
                .setName(name)
                .addOnStorageCreatedListener(onStorageCreatedListener);

    }

    public static Storage getStorage(String name) {
        return storages.get(name);
    }

}


text:
package integration

import (
	"database/sql"
	. "github.com/qb0C80aE/clay/integration"
	"github.com/qb0C80aE/loam/models"
	"net/http"
	"strconv"
	"testing"
)

func TestGetNodeAttributes_Empty(t *testing.T) {
	server := SetupServer()
	defer server.Close()

	responseText, code := Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attributes", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, EmptyArrayString, []*models.Node{})
}

func TestCreateNodeAttribute(t *testing.T) {
	server := SetupServer()
	defer server.Close()

	parameters := map[string]string{
		"preloads": "NodeAttributeField,ValueNodeAttributeOption,ParentNodeAttribute,ChildNodeAttributes",
	}

	node1 := &models.Node{
		Name: "test1",
	}
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "nodes", nil), node1)

	nodeAttributeField1 := &models.NodeAttributeField{
		ID:   1,
		Name: "attr1",
	}
	nodeAttributeField2 := &models.NodeAttributeField{
		ID:   2,
		Name: "attr1a",
	}
	nodeAttributeField3 := &models.NodeAttributeField{
		ID:   3,
		Name: "attr1b",
	}
	responseText, code := Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nodeAttributeField1)
	CheckResponseJSON(t, code, http.StatusCreated, responseText, LoadExpectation(t, "node_attribute/TestCreateNodeAttribute_1.json"), &models.NodeAttributeField{})

	responseText, code = Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nodeAttributeField2)
	CheckResponseJSON(t, code, http.StatusCreated, responseText, LoadExpectation(t, "node_attribute/TestCreateNodeAttribute_2.json"), &models.NodeAttributeField{})

	responseText, code = Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nodeAttributeField3)
	CheckResponseJSON(t, code, http.StatusCreated, responseText, LoadExpectation(t, "node_attribute/TestCreateNodeAttribute_3.json"), &models.NodeAttributeField{})

	nodeAttributeOption1 := &models.NodeAttributeOption{
		ID:                   1,
		NodeAttributeFieldID: nodeAttributeField3.ID,
		Name:                 "attr1b_Option1",
		ValueInt: sql.NullInt64{
			Valid: true,
			Int64: 1,
		},
	}
	responseText, code = Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_options", nil), nodeAttributeOption1)
	CheckResponseJSON(t, code, http.StatusCreated, responseText, LoadExpectation(t, "node_attribute/TestCreateNodeAttribute_4.json"), &models.NodeAttributeOption{})

	nodeAttribute1 := &models.NodeAttribute{
		NodeID:               1,
		NodeAttributeFieldID: nodeAttributeField1.ID,
		ValueInt: sql.NullInt64{
			Valid: true,
			Int64: 100,
		},
		ValueFloat: sql.NullFloat64{
			Valid:   true,
			Float64: 99.9,
		},
		ValueBool: sql.NullBool{
			Valid: true,
			Bool:  true,
		},
		ValueString: sql.NullString{
			Valid:  true,
			String: "valueString1",
		},
	}

	responseText, code = Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attributes", nil), nodeAttribute1)
	CheckResponseJSON(t, code, http.StatusCreated, responseText, LoadExpectation(t, "node_attribute/TestCreateNodeAttribute_5.json"), &models.NodeAttribute{})

	nodeAttribute1a := &models.NodeAttribute{
		NodeID:               1,
		NodeAttributeFieldID: nodeAttributeField2.ID,
		ValueString: sql.NullString{
			Valid:  true,
			String: "valueString1a",
		},
	}

	responseText, code = Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attributes", nil), nodeAttribute1a)

	nodeAttribute1b := &models.NodeAttribute{
		NodeID:               1,
		NodeAttributeFieldID: nodeAttributeField3.ID,
		ValueNodeAttributeOptionID: sql.NullInt64{
			Valid: true,
			Int64: (int64)(nodeAttributeOption1.ID),
		},
	}

	responseText, code = Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attributes", nil), nodeAttribute1b)
	CheckResponseJSON(t, code, http.StatusCreated, responseText, LoadExpectation(t, "node_attribute/TestCreateNodeAttribute_6.json"), &models.NodeAttribute{})

	nodeAttribute1c := &models.NodeAttribute{
		NodeID: 1,
		ParentNodeAttributeID: sql.NullInt64{
			Int64: 2,
			Valid: true,
		},
		NodeAttributeFieldID: nodeAttributeField3.ID,
		ValueInt: sql.NullInt64{
			Valid: true,
			Int64: 300,
		},
	}

	responseText, code = Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attributes", nil), nodeAttribute1c)
	CheckResponseJSON(t, code, http.StatusCreated, responseText, LoadExpectation(t, "node_attribute/TestCreateNodeAttribute_7.json"), &models.NodeAttribute{})

	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attributes", parameters), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestCreateNodeAttribute_8.json"), []*models.NodeAttribute{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestCreateNodeAttribute_9.json"), []*models.NodeAttributeField{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_options", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestCreateNodeAttribute_10.json"), []*models.NodeAttributeOption{})

}

func TestUpdateNodeAttribute(t *testing.T) {
	server := SetupServer()
	defer server.Close()

	parameters := map[string]string{
		"preloads": "NodeAttributeField,ValueNodeAttributeOption,ParentNodeAttribute,ChildNodeAttributes",
	}

	node1 := &models.Node{
		Name: "test1",
	}
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "nodes", nil), node1)

	nodeAttributeField1 := &models.NodeAttributeField{
		ID:   1,
		Name: "attr1",
	}
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nodeAttributeField1)

	id1 := 1
	nodeAttribute1 := &models.NodeAttribute{
		ID:                   id1,
		NodeID:               1,
		NodeAttributeFieldID: nodeAttributeField1.ID,
		ValueInt: sql.NullInt64{
			Valid: true,
			Int64: 100,
		},
		ValueFloat: sql.NullFloat64{
			Valid:   true,
			Float64: 99.9,
		},
		ValueBool: sql.NullBool{
			Valid: true,
			Bool:  true,
		},
		ValueString: sql.NullString{
			Valid:  true,
			String: "valueString1",
		},
	}

	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attributes", nil), nodeAttribute1)

	nodeAttribute1.ValueInt = sql.NullInt64{
		Valid: true,
		Int64: 1000,
	}
	nodeAttribute1.ValueFloat = sql.NullFloat64{
		Valid:   true,
		Float64: 999.9,
	}
	nodeAttribute1.ValueBool = sql.NullBool{
		Valid: true,
		Bool:  false,
	}
	nodeAttribute1.ValueString = sql.NullString{
		Valid:  true,
		String: "valueString1x",
	}
	nodeAttribute1.ChildNodeAttributes = []*models.NodeAttribute{
		{
			NodeID:               1,
			NodeAttributeFieldID: nodeAttributeField1.ID,
			ValueInt: sql.NullInt64{
				Valid: true,
				Int64: 2000,
			},
			ValueFloat: sql.NullFloat64{
				Valid:   true,
				Float64: 1999.9,
			},
			ValueBool: sql.NullBool{
				Valid: true,
				Bool:  true,
			},
			ValueString: sql.NullString{
				Valid:  true,
				String: "valueString1xchild1",
			},
		},
		{
			NodeID:               1,
			NodeAttributeFieldID: nodeAttributeField1.ID,
			ValueInt: sql.NullInt64{
				Valid: true,
				Int64: 3000,
			},
			ValueFloat: sql.NullFloat64{
				Valid:   true,
				Float64: 2999.9,
			},
			ValueBool: sql.NullBool{
				Valid: true,
				Bool:  true,
			},
			ValueString: sql.NullString{
				Valid:  true,
				String: "valueString1xchild2",
			},
		},
	}

	responseText, code := Execute(t, http.MethodPut, GenerateSingleResourceURL(server, "node_attributes", strconv.Itoa(id1), nil), nodeAttribute1)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestUpdateNodeAttribute_1.json"), &models.NodeAttribute{})

	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attributes", nil), parameters)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestUpdateNodeAttribute_2.json"), []*models.NodeAttribute{})

}

func TestDeleteNodeAttribute(t *testing.T) {
	server := SetupServer()
	defer server.Close()

	parameters := map[string]string{
		"preloads": "NodeAttributeField,ValueNodeAttributeOption,ParentNodeAttribute,ChildNodeAttributes",
	}

	node1 := &models.Node{
		Name: "test1",
	}
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "nodes", nil), node1)

	nodeAttributeField1 := &models.NodeAttributeField{
		ID:   1,
		Name: "attr1",
	}
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nodeAttributeField1)

	id1 := 1
	nodeAttribute1 := &models.NodeAttribute{
		ID:                   id1,
		NodeID:               1,
		NodeAttributeFieldID: nodeAttributeField1.ID,
		ValueInt: sql.NullInt64{
			Valid: true,
			Int64: 100,
		},
		ValueFloat: sql.NullFloat64{
			Valid:   true,
			Float64: 99.9,
		},
		ValueBool: sql.NullBool{
			Valid: true,
			Bool:  true,
		},
		ValueString: sql.NullString{
			Valid:  true,
			String: "valueString1",
		},
	}

	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attributes", nil), nodeAttribute1)

	responseText, code := Execute(t, http.MethodDelete, GenerateSingleResourceURL(server, "node_attributes", strconv.Itoa(id1), nil), nil)
	CheckResponseText(t, code, http.StatusNoContent, responseText, []byte{})

	responseText, code = Execute(t, http.MethodGet, GenerateSingleResourceURL(server, "node_attributes", strconv.Itoa(id1), nil), parameters)
	CheckResponseJSON(t, code, http.StatusNotFound, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_1.json"), &ErrorResponseText{})
}

func TestDeleteNodeAttribute_Cascade(t *testing.T) {
	server := SetupServer()
	defer server.Close()

	parameters := map[string]string{
		"preloads": "NodeAttributeField,ValueNodeAttributeOption,ParentNodeAttribute,ChildNodeAttributes",
	}

	node1 := &models.Node{
		Name: "test1",
	}
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "nodes", nil), node1)

	nodeAttributeField1 := &models.NodeAttributeField{
		ID:   1,
		Name: "attr1",
	}
	nodeAttributeField2 := &models.NodeAttributeField{
		ID:   2,
		Name: "attr2",
	}
	nodeAttributeField3 := &models.NodeAttributeField{
		ID:   3,
		Name: "attr3",
	}
	nodeAttributeField4 := &models.NodeAttributeField{
		ID:   4,
		Name: "attr4",
	}
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nodeAttributeField1)
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nodeAttributeField2)
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nodeAttributeField3)
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nodeAttributeField4)

	nodeAttributeOption1 := &models.NodeAttributeOption{
		ID:                   1,
		NodeAttributeFieldID: nodeAttributeField2.ID,
		Name:                 "attr2_Option1",
		ValueInt: sql.NullInt64{
			Valid: true,
			Int64: 1,
		},
	}
	nodeAttributeOption2 := &models.NodeAttributeOption{
		ID:                   2,
		NodeAttributeFieldID: nodeAttributeField3.ID,
		Name:                 "attr3_Option1",
		ValueInt: sql.NullInt64{
			Valid: true,
			Int64: 2,
		},
	}
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_options", nil), nodeAttributeOption1)
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attribute_options", nil), nodeAttributeOption2)

	nodeAttribute1 := &models.NodeAttribute{
		NodeID:               1,
		NodeAttributeFieldID: nodeAttributeField1.ID,
	}
	nodeAttribute2 := &models.NodeAttribute{
		NodeID:               1,
		NodeAttributeFieldID: nodeAttributeField2.ID,
		ValueNodeAttributeOptionID: sql.NullInt64{
			Valid: true,
			Int64: (int64)(nodeAttributeOption1.ID),
		},
	}
	nodeAttribute3 := &models.NodeAttribute{
		NodeID:               1,
		NodeAttributeFieldID: nodeAttributeField3.ID,
		ValueNodeAttributeOptionID: sql.NullInt64{
			Valid: true,
			Int64: (int64)(nodeAttributeOption2.ID),
		},
	}
	nodeAttribute4 := &models.NodeAttribute{
		ID:                   4,
		NodeID:               1,
		NodeAttributeFieldID: nodeAttributeField4.ID,
		ChildNodeAttributes: []*models.NodeAttribute{
			{
				NodeID:               1,
				NodeAttributeFieldID: nodeAttributeField4.ID,
			},
			{
				NodeID:               1,
				NodeAttributeFieldID: nodeAttributeField4.ID,
			},
		},
	}
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attributes", nil), nodeAttribute1)
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attributes", nil), nodeAttribute2)
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attributes", nil), nodeAttribute3)
	Execute(t, http.MethodPost, GenerateMultiResourceURL(server, "node_attributes", nil), nodeAttribute4)

	responseText, code := Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attributes", parameters), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_1.json"), []*models.NodeAttribute{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_2.json"), []*models.NodeAttributeField{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_options", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_3.json"), []*models.NodeAttributeOption{})

	responseText, code = Execute(t, http.MethodDelete, GenerateSingleResourceURL(server, "node_attribute_options", strconv.Itoa(nodeAttributeOption1.ID), nil), nil)
	CheckResponseText(t, code, http.StatusNoContent, responseText, []byte{})

	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attributes", parameters), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_4.json"), []*models.NodeAttribute{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_5.json"), []*models.NodeAttributeField{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_options", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_6.json"), []*models.NodeAttributeOption{})

	responseText, code = Execute(t, http.MethodDelete, GenerateSingleResourceURL(server, "node_attribute_fields", strconv.Itoa(nodeAttributeField3.ID), nil), nil)
	CheckResponseText(t, code, http.StatusNoContent, responseText, []byte{})

	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attributes", parameters), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_7.json"), []*models.NodeAttribute{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_8.json"), []*models.NodeAttributeField{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_options", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_9.json"), []*models.NodeAttributeOption{})

	responseText, code = Execute(t, http.MethodDelete, GenerateSingleResourceURL(server, "node_attributes", strconv.Itoa(nodeAttribute4.ID), nil), nil)
	CheckResponseText(t, code, http.StatusNoContent, responseText, []byte{})

	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attributes", parameters), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_10.json"), []*models.NodeAttribute{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_11.json"), []*models.NodeAttributeField{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_options", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_12.json"), []*models.NodeAttributeOption{})

	responseText, code = Execute(t, http.MethodDelete, GenerateSingleResourceURL(server, "nodes", strconv.Itoa(1), nil), nil)
	CheckResponseText(t, code, http.StatusNoContent, responseText, []byte{})

	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attributes", parameters), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_13.json"), []*models.NodeAttribute{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_fields", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_14.json"), []*models.NodeAttributeField{})
	responseText, code = Execute(t, http.MethodGet, GenerateMultiResourceURL(server, "node_attribute_options", nil), nil)
	CheckResponseJSON(t, code, http.StatusOK, responseText, LoadExpectation(t, "node_attribute/TestDeleteNodeAttribute_Cascade_15.json"), []*models.NodeAttributeOption{})

}