text:
package org.jetbrains.plugins.scala.highlighter.lexer

import com.intellij.psi.tree.IElementType

// NOTE: I would better make it a mixing, but I can't due to this bug https://github.com/scala/bug/issues/3564
abstract class ScalaStringLiteralRawAwareLexer(
  quoteChar: Char,
  originalLiteralToken: IElementType
) extends ScalaStringLiteralLexer(quoteChar, originalLiteralToken) {

  /**
   * NOTE: since 2.13.0 octal escape sequences are dropped, and we don't handle them for < 2.13.0
   *
   * @todo we might try handling different versions
   */
  protected def getTokenTypeForRawString: IElementType = {
    if (myStart >= myEnd) return null

    val isEscapeStart = myBuffer.charAt(myStart) == '\\'
    if (!isEscapeStart)
      return myOriginalLiteralToken

    val isEof = myStart + 1 >= myBuffer.length()
    if (isEof)
      return null

    // handle unicode escape sequences: \u0025
    val nextChar = myBuffer.charAt(myStart + 1)
    if (nextChar == 'u')
      getUnicodeEscapeSequenceType
    else
      myOriginalLiteralToken
  }
}


text:
package set

import "sort"

//String is a set of strings. Remember to initialize with make or String{}
type String map[string]signal

//Contains returns true if the given key is in the set.
func (s String) Contains(key string) bool {
	_, ok := s[key]
	return ok
}

//Copy copies the set of strings.
func (s String) Copy() String {
	copy := make(String)
	for k := range s {
		copy[k] = yes
	}
	return copy
}

//Intersection returns a new set containing the intersection of the strings;
func (s String) Intersection(strings ...String) (intersection String) {
	intersection = s.Copy()
	for key := range s {
		for _, set := range append(strings, s) {
			if !set.Contains(key) {
				delete(intersection, key)
			}
		}
	}
	return intersection
}

//XOR returns the keys in one set but not the other.
func (s String) XOR(other String) String {
	union := s.Union(other)
	xor := make(String)
	for k := range union {
		if (s.Contains(k) && !other.Contains(k)) || (other.Contains(k) && !s.Contains(k)) {
			xor[k] = yes
		}
	}
	return xor
}

//Equal shows whether two Strings are equal; i.e, they contain the same items.
func (s String) Equal(other String) bool {
	if len(s) != len(other) {
		return false
	}
	for key := range s {
		if !other.Contains(key) {
			return false
		}
	}
	return true
}

//Union returns a new set containing the union of the string sets.
func (s String) Union(strings ...String) (union String) {
	union = s.Copy()
	for _, set := range strings {
		for key := range set {
			union[key] = yes
		}
	}
	return union
}

//IUnion modifies the StringSet in place rather than returning a copy.
func (s String) IUnion(strings ...String) {
	for _, set := range strings {
		for key := range set {
			s[key] = yes
		}
	}
}

//Difference returns the items in the reciever but not any other arguments
func (s String) Difference(strings ...String) (difference String) {
	difference = s.Copy()
	for _, set := range strings {
		for key := range set {
			delete(difference, key)
		}
	}
	return difference
}

//FromStrings creates a set from strings
func FromStrings(strings ...string) String {
	s := make(String)
	for _, key := range strings {
		s[key] = yes
	}
	return s
}

//Add a key or key(s) to the set, in-place. Don't call on a nil set.
func (s String) Add(keys ...string) {
	for _, key := range keys {
		s[key] = yes
	}
}

//ToSlice returns a slice containing the keys of a set. No order is guaranteed.
func (s String) ToSlice() []string {
	slice := make([]string, len(s))
	var i = 0
	for k := range s {
		slice[i] = k
		i++
	}
	return slice
}

//Sorted returns a slice containing the keys of the set in lexigraphic order.
func (s String) Sorted() []string {
	slice := s.ToSlice()
	sort.Strings(slice)
	return slice
}

//Map a function f(x) across the set, returning a new set containing f(x) for all x in the set.
func (s String) Map(f func(string) string) String {
	mapped := make(String)
	for k := range s {
		mapped[f(k)] = yes
	}
	return mapped

}

//Reduce applies a reducing function across the set. It will return (0, false) for a set with zero entries.
func (s String) Reduce(f func(string, string) string) (string, bool) {
	if len(s) == 0 {
		return "", false
	}
	first := true
	var reduced string
	for k := range s {
		if first {
			reduced = k
			first = false

		} else {
			reduced = f(reduced, k)
		}
	}
	return reduced, true
}

//Filter applies a filtering function across the set, returning a set containing x where f(x) is true.
func (s String) Filter(f func(string) bool) String {
	filtered := make(String)
	for k := range s {
		if f(k) {
			filtered.Add(k)
		}
	}
	return filtered
}

//IsSubset returns true if every key in s is also in other
func (s String) IsSubset(other String) bool {
	if len(s) > len(other) {
		return false
	}

	for k := range s {
		if _, ok := other[k]; !ok {
			return false
		}

	}
	return true
}

//Remove removes a key from the set, returning the presence of the key.
func (s String) Remove(key string) bool {
	_, ok := s[key]
	delete(s, key)
	return ok
}

//Pop an arbitrary element from the set. Returns "", false if no more elements remain. No order, or lack of order, is guaranteed.
func (s String) Pop() (k string, more bool) {
	for k := range s {
		//iterate
		delete(s, k)
		return k, true
	}
	return "", false
}

//IsDisjoint returns true if s shared no elements with other. Note that the empty set is disjoint with everything.
func (s String) IsDisjoint(other String) bool {
	for k := range s {
		if _, ok := other[k]; ok {
			return false
		}
	}
	return true
}

//IsProperSubset returns true if every key in s is also in other and s != other
func (s String) IsProperSubset(other String) bool {
	return len(s) < len(other) && s.IsSubset(other)
}

//IsSuperset returns true if every key in other is also in s
func (s String) IsSuperset(other String) bool {
	return other.IsSubset(s)
}

//IsProperSuperset returns true if every key in other is also in s and s != other
func (s String) IsProperSuperset(other String) bool {
	return len(s) > len(other) && other.IsSuperset(s)
}

redpajama_set_name: RedPajamaGithub


text:
#!/usr/bin/env node
/*jslint node: true */
var amulet = require('amulet');
var fs = require('fs');
var http = require('http-enhanced');
var logger = require('loge');
var mime = require('mime');
var path = require('path');
var sv = require('sv');
var socketio = require('socket.io');
var util = require('util');

var Cookies = require('cookies');
var Router = require('regex-router');
var TwitterPool = require('./twitter-pool');

var argv = require('optimist').default({
  port: 3600,
  hostname: '127.0.0.1',
  static_port: 3601,
  accounts: '~/.twitter',
}).argv;

// minify: true,
amulet.set({root: path.join(__dirname, 'templates')});
mime.default_type = 'text/plain';

var static_buffers = [];

// set up some local static file handling.
var R = new Router();
R.get(/^\/favicon.ico/, function(m, req, res) { res.die(404, '404, chromebuddy.'); });
R.get(/^\/static\/(.+)/, function(m, req, res) {
  var filepath = m[1].replace(/\.{2,}/g, '');
  var content_type = mime.lookup(filepath);
  res.writeHead(200, {'Content-Type': content_type});

  if (static_buffers[filepath]) {
    res.end(static_buffers[filepath]);
  }
  else {
    fs.readFile(path.join('static', filepath), function (err, data) {
      if (err) throw err;
      static_buffers[filepath] = data;
      res.end(data);
    });
  }
});
R.get(/^\/kill/, function(m, req, res) {
  logger.error('Killed via /kill');
  res.end('dying');
  process.exit(1);
});

// and render basic static page
R.default = function(m, req, res) {
  var ctx = {
    hostname: argv.hostname,
    static_port: argv.static_port
  };
  amulet.stream(['layout.mu', 'show.mu'], ctx).pipe(res);
};

// quickstart the simple server
var server = http.createServer(function(req, res) {
  // req.cookies = new Cookies(req, res);
  var started = Date.now();
  res.on('finish', function() {
    logger.info('duration', {url: req.url, method: req.method, ms: Date.now() - started});
  });

  R.route(req, res);
}).listen(argv.port, argv.hostname, function() {
  logger.info('GeoTwitter ready at ' + argv.hostname + ':' + argv.port);
});

// this is the bit that pulls in Twitter
var twitter_pool = new TwitterPool();
sv.Parser.readToEnd(argv.accounts, {encoding: 'utf8'}, function(err, accounts) {
  if (err) throw err;
  twitter_pool.accounts = accounts;
  logger.info('Read ' + accounts.length + ' accounts');
});

var BOUNDS = {
  // sw.lon,sw.lat,ne.lon,ne.lat
  global: '-180,-90,180,90',
  usa: '-126.3867,24.7668,-65.8301,49.4967',
  illinois: '-91.5131,36.9703,-87.4952,42.5083'
};

// mostly pull things from the twitter pipe and push them over into all sockets
var io = socketio.listen(server);
// it will log every emitted payload at the default log level (crazy!)
io.set('log level', 1);
io.sockets.on('connection', function (socket) {
  logger.info('New socket connection established');

  socket.emit('greeting', {text: 'Hello.', connected: Object.keys(io.connected).length});

  logger.info('twitter_pool.responses', {responses: twitter_pool.responses.length});

  function ready() {
    var current_req = twitter_pool.responses[0].request;
    logger.info('current request', current_req.form);
    socket.emit('filter', current_req.form);
  }

  // if anybody is listening and we aren't already streaming tweets, start a default one
  if (twitter_pool.responses.length === 0) {
    var form = {locations: BOUNDS.illinois, stall_warnings: true};
    logger.debug('Starting default filter.', form);
    twitter_pool.addPersistent(form, 1, ready);
  }
  else {
    ready();
  }

  socket.on('filter', function (form) {
    logger.info('removing all responses');
    twitter_pool.removeAll();

    // var form = {stall_warnings: true};
    // data.type should be either 'locations' or 'track'
    // form[data.type] = data.query;
    logger.info('filtering', form);
    twitter_pool.addPersistent(form, 1);
    io.sockets.emit('filter', form);
  });

  socket.on('chat', function (data) {
    logger.info('Socket emitted "chat" message:', data);
    // "broadcast." just means emit only to the others with connections
    // socket.broadcast.emit('chat', data);
    io.sockets.emit('chat', data);
  });
});

twitter_pool.on('data', function(data) {
  io.sockets.emit('tweet', data);
});


text:
[fork]: https://github.com/adieuadieu/serverless-chrome/fork
[pr]: https://github.com/adieuadieu/serverless-chrome/compare
[code-of-conduct]: CODE_OF_CONDUCT.md

Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.

Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.

## Contribution Agreement

As a contributor, you represent that the code you submit is your original work or that of your employer (in which case you represent you have the right to bind your employer). By submitting code, you (and, if applicable, your employer) are licensing the submitted code to the open source community subject to the MIT license.

## Submitting a pull request

Please branch from and raise PRs against the `develop` branch.

0. [Fork][fork] and clone the repository
0. Create a new branch: `git checkout -b feature/my-new-feature-name develop`
0. Make your change
0. Run the unit tests and make sure they pass and have 100% coverage.
0. Push to your fork and [submit a pull request][pr] to merge your changes.
0. Pat your self on the back and wait for your pull request to be reviewed and merged.

Here are a few things you can do that will increase the likelihood of your pull request being accepted:

- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, please submit them as separate pull requests.
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
- In your pull request description, provide as much detail as possible. This context helps the reviewer to understand the motivation for and impact of the change.
- Make sure that all the unit tests still pass. PRs with failing tests won't be merged.

## Resources

- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
- [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
- [GitHub Help](https://help.github.com)


text:
module CronoTrigger
  module Models
    class Execution < ActiveRecord::Base
      self.table_name = "crono_trigger_executions"

      belongs_to :schedule, polymorphic: true, inverse_of: :crono_trigger_executions

      scope :recently, ->(schedule_type:) { where(schedule_type: schedule_type).order(executed_at: :desc) }

      enum status: {
        executing: "executing",
        completed: "completed",
        failed: "failed",
        retrying: "retrying",
        aborted: "aborted",
      }

      def self.create_with_timestamp!
        create!(executed_at: Time.current, status: :executing, worker_id: CronoTrigger.config.worker_id)
      end

      def complete!
        update!(status: :completed, completed_at: Time.current)
      end

      def error!(exception)
        update!(status: :failed, completed_at: Time.current, error_name: exception.class.to_s, error_reason: exception.message)
      end

      def retry!
        return false if schedule.locking?

        schedule.retry!
      end
    end
  end
end


text:
package com.lee.main.view.textview;

import android.os.Bundle;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;

import com.lee.base.activity.BaseActivity;
import com.lee.main.R;

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

/**
 * Text Size Activity
 * </p>
 * Created by LiYang on 2017/2/23.
 */

public class TextSizeActivity extends BaseActivity {

    private class TextSizeEntity {
        public int textSize;
        public TextSizeEntity(int textSize) {
            this.textSize = textSize;
        }
    }

    private List<TextSizeEntity> textSizeEntities;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_text_size);

        initTextSize();

        ListView listView = (ListView)findViewById(R.id.lv_text_size);
        listView.setAdapter(textSizeAdapter);
    }

    private void initTextSize() {
        textSizeEntities = new ArrayList<>();
        for (int i=1; i<=45; i++) {
            textSizeEntities.add(new TextSizeEntity(i));
        }
    }

    private BaseAdapter textSizeAdapter = new BaseAdapter() {
        @Override
        public int getCount() {
            if (textSizeEntities != null) {
                return textSizeEntities.size();
            }
            return 0;
        }

        @Override
        public Object getItem(int i) {
            if (textSizeEntities != null) {
                return textSizeEntities.get(i);
            }
            return null;
        }

        @Override
        public long getItemId(int i) {
            return i;
        }

        @Override
        public View getView(int i, View view, ViewGroup viewGroup) {
            ViewHolder viewHolder;
            if (view == null) {
                viewHolder = new ViewHolder();
                view = LayoutInflater.from(TextSizeActivity.this).inflate(R.layout.item_text_size, null);
                viewHolder.tvTextSize = (TextView)view.findViewById(R.id.tv_text_size);
                viewHolder.tvTextSizeContent = (TextView)view.findViewById(R.id.tv_text_size_content);
            } else {
                viewHolder = (ViewHolder)view.getTag();
            }
            viewHolder.tvTextSize.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSizeEntities.get(i).textSize);
            viewHolder.tvTextSizeContent.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSizeEntities.get(i).textSize);

            viewHolder.tvTextSize.setText(textSizeEntities.get(i).textSize + "SP");

            view.setTag(viewHolder);
            return view;
        }

        class ViewHolder {
            TextView tvTextSize;
            TextView tvTextSizeContent;
        }
    };
}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/datastream/v1/datastream_resources.proto

package com.google.cloud.datastream.v1;

public interface SourceConfigOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.datastream.v1.SourceConfig)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Required. Source connection profile resoource.
   * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}`
   *

   *
   *
   * string source_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   *
   *
   * @return The sourceConnectionProfile.
   */
  java.lang.String getSourceConnectionProfile();
  /**
   *
   *
   *

   * Required. Source connection profile resoource.
   * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}`
   *

   *
   *
   * string source_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   *
   *
   * @return The bytes for sourceConnectionProfile.
   */
  com.google.protobuf.ByteString getSourceConnectionProfileBytes();

  /**
   *
   *
   *

   * Oracle data source configuration.
   *

   *
   * .google.cloud.datastream.v1.OracleSourceConfig oracle_source_config = 100;
   *
   * @return Whether the oracleSourceConfig field is set.
   */
  boolean hasOracleSourceConfig();
  /**
   *
   *
   *

   * Oracle data source configuration.
   *

   *
   * .google.cloud.datastream.v1.OracleSourceConfig oracle_source_config = 100;
   *
   * @return The oracleSourceConfig.
   */
  com.google.cloud.datastream.v1.OracleSourceConfig getOracleSourceConfig();
  /**
   *
   *
   *

   * Oracle data source configuration.
   *

   *
   * .google.cloud.datastream.v1.OracleSourceConfig oracle_source_config = 100;
   */
  com.google.cloud.datastream.v1.OracleSourceConfigOrBuilder getOracleSourceConfigOrBuilder();

  /**
   *
   *
   *

   * MySQL data source configuration.
   *

   *
   * .google.cloud.datastream.v1.MysqlSourceConfig mysql_source_config = 101;
   *
   * @return Whether the mysqlSourceConfig field is set.
   */
  boolean hasMysqlSourceConfig();
  /**
   *
   *
   *

   * MySQL data source configuration.
   *

   *
   * .google.cloud.datastream.v1.MysqlSourceConfig mysql_source_config = 101;
   *
   * @return The mysqlSourceConfig.
   */
  com.google.cloud.datastream.v1.MysqlSourceConfig getMysqlSourceConfig();
  /**
   *
   *
   *

   * MySQL data source configuration.
   *

   *
   * .google.cloud.datastream.v1.MysqlSourceConfig mysql_source_config = 101;
   */
  com.google.cloud.datastream.v1.MysqlSourceConfigOrBuilder getMysqlSourceConfigOrBuilder();

  /**
   *
   *
   *

   * PostgreSQL data source configuration.
   *

   *
   * .google.cloud.datastream.v1.PostgresqlSourceConfig postgresql_source_config = 102;
   *
   * @return Whether the postgresqlSourceConfig field is set.
   */
  boolean hasPostgresqlSourceConfig();
  /**
   *
   *
   *

   * PostgreSQL data source configuration.
   *

   *
   * .google.cloud.datastream.v1.PostgresqlSourceConfig postgresql_source_config = 102;
   *
   * @return The postgresqlSourceConfig.
   */
  com.google.cloud.datastream.v1.PostgresqlSourceConfig getPostgresqlSourceConfig();
  /**
   *
   *
   *

   * PostgreSQL data source configuration.
   *

   *
   * .google.cloud.datastream.v1.PostgresqlSourceConfig postgresql_source_config = 102;
   */
  com.google.cloud.datastream.v1.PostgresqlSourceConfigOrBuilder
      getPostgresqlSourceConfigOrBuilder();

  public com.google.cloud.datastream.v1.SourceConfig.SourceStreamConfigCase
      getSourceStreamConfigCase();
}


text:
package admin

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"sort"
	"strconv"
	"strings"

	"github.com/ajg/form"
	"github.com/pkg/errors"
	"github.com/tsuru/gnuflag"
	"github.com/tsuru/tsuru/cmd"
	"github.com/tsuru/tsuru/provision/cluster"
)

type ClusterUpdate struct {
	fs         *gnuflag.FlagSet
	cacert     string
	clientcert string
	clientkey  string
	addresses  cmd.StringSliceFlag
	pools      cmd.StringSliceFlag
	customData cmd.MapFlag
	isDefault  bool
}

func (c *ClusterUpdate) Flags() *gnuflag.FlagSet {
	if c.fs == nil {
		c.fs = gnuflag.NewFlagSet("", gnuflag.ContinueOnError)
		desc := "Path to CA cert file."
		c.fs.StringVar(&c.cacert, "cacert", "", desc)
		desc = "Path to client cert file."
		c.fs.StringVar(&c.clientcert, "clientcert", "", desc)
		desc = "Path to client key file."
		c.fs.StringVar(&c.clientkey, "clientkey", "", desc)
		desc = "Whether this is the default cluster."
		c.fs.BoolVar(&c.isDefault, "default", false, desc)
		desc = "Address to be used in cluster."
		c.fs.Var(&c.addresses, "addr", desc)
		desc = "Pool which will use this cluster."
		c.fs.Var(&c.pools, "pool", desc)
		desc = "Custom provisioner specific data."
		c.fs.Var(&c.customData, "custom", desc)
	}
	return c.fs
}

func (c *ClusterUpdate) Info() *cmd.Info {
	return &cmd.Info{
		Name:    "cluster-update",
		Usage:   "cluster-update <name> <provisioner> --addr address... [--pool poolname]... [--cacert cacertfile] [--clientcert clientcertfile] [--clientkey clientkeyfile] [--custom key=value]... [--default]",
		Desc:    `Creates or updates a provisioner cluster definition.`,
		MinArgs: 2,
		MaxArgs: 2,
	}
}

func (c *ClusterUpdate) Run(context *cmd.Context, client *cmd.Client) error {
	u, err := cmd.GetURLVersion("1.3", "/provisioner/clusters")
	if err != nil {
		return err
	}
	name := context.Args[0]
	provisioner := context.Args[1]
	clus := cluster.Cluster{
		Name:        name,
		Addresses:   c.addresses,
		Pools:       c.pools,
		CustomData:  c.customData,
		Default:     c.isDefault,
		Provisioner: provisioner,
	}
	var data []byte
	if c.cacert != "" {
		data, err = ioutil.ReadFile(c.cacert)
		if err != nil {
			return err
		}
		clus.CaCert = data
	}
	if c.clientcert != "" {
		data, err = ioutil.ReadFile(c.clientcert)
		if err != nil {
			return err
		}
		clus.ClientCert = data
	}
	if c.clientkey != "" {
		data, err = ioutil.ReadFile(c.clientkey)
		if err != nil {
			return err
		}
		clus.ClientKey = data
	}
	values, err := form.EncodeToValues(clus)
	if err != nil {
		return err
	}
	reader := strings.NewReader(values.Encode())
	request, err := http.NewRequest("POST", u, reader)
	if err != nil {
		return err
	}
	request.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	response, err := client.Do(request)
	if err != nil {
		return err
	}
	defer response.Body.Close()
	fmt.Fprintln(context.Stdout, "Cluster successfully updated.")
	return nil
}

type ClusterList struct{}

func (c *ClusterList) Info() *cmd.Info {
	return &cmd.Info{
		Name:  "cluster-list",
		Usage: "cluster-list",
		Desc:  `List registered provisioner cluster definitions.`,
	}
}

func (c *ClusterList) Run(context *cmd.Context, client *cmd.Client) error {
	u, err := cmd.GetURLVersion("1.3", "/provisioner/clusters")
	if err != nil {
		return err
	}
	request, err := http.NewRequest("GET", u, nil)
	if err != nil {
		return err
	}
	response, err := client.Do(request)
	if err != nil {
		return err
	}
	defer response.Body.Close()
	if response.StatusCode == http.StatusNoContent {
		fmt.Fprintln(context.Stdout, "No clusters registered.")
		return nil
	}
	data, err := ioutil.ReadAll(response.Body)
	if err != nil {
		return err
	}
	var clusters []cluster.Cluster
	err = json.Unmarshal(data, &clusters)
	if err != nil {
		return errors.Wrapf(err, "unable to parse data %q", string(data))
	}
	tbl := cmd.NewTable()
	tbl.LineSeparator = true
	tbl.Headers = cmd.Row{"Name", "Provisioner", "Addresses", "Custom Data", "Default", "Pools"}
	sort.Slice(clusters, func(i, j int) bool { return clusters[i].Name < clusters[j].Name })
	for _, c := range clusters {
		var custom []string
		for k, v := range c.CustomData {
			custom = append(custom, fmt.Sprintf("%s=%s", k, v))
		}
		tbl.AddRow(cmd.Row{c.Name, c.Provisioner, strings.Join(c.Addresses, "\n"), strings.Join(custom, "\n"), strconv.FormatBool(c.Default), strings.Join(c.Pools, "\n")})
	}
	fmt.Fprint(context.Stdout, tbl.String())
	return nil
}

type ClusterRemove struct {
	cmd.ConfirmationCommand
}

func (c *ClusterRemove) Info() *cmd.Info {
	return &cmd.Info{
		Name:    "cluster-remove",
		Usage:   "cluster-remove <name>",
		Desc:    `Removes a provisioner cluster definition.`,
		MinArgs: 1,
		MaxArgs: 1,
	}
}

func (c *ClusterRemove) Run(context *cmd.Context, client *cmd.Client) error {
	name := context.Args[0]
	u, err := cmd.GetURLVersion("1.3", "/provisioner/clusters/"+name)
	if err != nil {
		return err
	}
	request, err := http.NewRequest("DELETE", u, nil)
	if err != nil {
		return err
	}
	response, err := client.Do(request)
	if err != nil {
		return err
	}
	defer response.Body.Close()
	fmt.Fprintln(context.Stdout, "Cluster successfully removed.")
	return nil
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Phytopath. Z. 63: 342 (1968)

#### Original name
Didymosphaeria pelvetiana G.K. Sutherl., 1915

### Remarks
null


text:
// This file is part of YamlDotNet - A .NET library for YAML.
// Copyright (c) Antoine Aubry and contributors
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do
// so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using YamlDotNet.Core;
using YamlDotNet.Core.Events;

namespace YamlDotNet.RepresentationModel
{
    /// <summary>
    /// Represents an YAML document.
    /// </summary>
    public class YamlDocument
    {
        /// <summary>
        /// Gets or sets the root node.
        /// </summary>
        /// <value>The root node.</value>
        public YamlNode RootNode { get; private set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="YamlDocument"/> class.
        /// </summary>
        public YamlDocument(YamlNode rootNode)
        {
            RootNode = rootNode;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="YamlDocument"/> class with a single scalar node.
        /// </summary>
        public YamlDocument(string rootNode)
        {
            RootNode = new YamlScalarNode(rootNode);
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="YamlDocument"/> class.
        /// </summary>
        internal YamlDocument(IParser parser)
        {
            var state = new DocumentLoadingState();

            parser.Consume<DocumentStart>();

            while (!parser.TryConsume<DocumentEnd>(out var _))
            {
                Debug.Assert(RootNode == null);
                RootNode = YamlNode.ParseNode(parser, state);

                if (RootNode is YamlAliasNode)
                {
                    throw new YamlException("A document cannot contain only an alias");
                }
            }

            state.ResolveAliases();

            if (RootNode == null)
            {
                // This should not happen unless the parser has a bug
                throw new ArgumentException("Atempted to parse an empty document");
            }
        }

        /// <summary>
        /// Visitor that assigns anchors to nodes that are referenced more than once.
        /// Existing anchors are preserved as much as possible.
        /// </summary>
        private class AnchorAssigningVisitor : YamlVisitorBase
        {
            private readonly HashSet<AnchorName> existingAnchors = new HashSet<AnchorName>();
            /// <summary>
            /// Key: Node, Value: IsDuplicate
            /// </summary>
            private readonly Dictionary<YamlNode, bool> visitedNodes = new Dictionary<YamlNode, bool>();

            public void AssignAnchors(YamlDocument document)
            {
                existingAnchors.Clear();
                visitedNodes.Clear();

                document.Accept(this);

                var random = new Random();
                foreach (var visitedNode in visitedNodes)
                {
                    if (visitedNode.Value)
                    {
                        AnchorName anchor;
                        // If the existing anchor is not already used, we can have it
                        if (!visitedNode.Key.Anchor.IsEmpty && !existingAnchors.Contains(visitedNode.Key.Anchor))
                        {
                            anchor = visitedNode.Key.Anchor;
                        }
                        else
                        {
                            do
                            {
                                anchor = new AnchorName(random.Next().ToString(CultureInfo.InvariantCulture));
                            } while (existingAnchors.Contains(anchor));
                        }

                        existingAnchors.Add(anchor);
                        visitedNode.Key.Anchor = anchor;
                    }
                }
            }

            /// <summary>
            /// Returns whether the visited node is a duplicate.
            /// </summary>
            private bool VisitNodeAndFindDuplicates(YamlNode node)
            {
                if (visitedNodes.TryGetValue(node, out var isDuplicate))
                {
                    if (!isDuplicate)
                    {
                        visitedNodes[node] = true;
                    }
                    return !isDuplicate;
                }
                else
                {
                    visitedNodes.Add(node, false);
                    return false;
                }
            }

            public override void Visit(YamlScalarNode scalar)
            {
                VisitNodeAndFindDuplicates(scalar);
            }

            public override void Visit(YamlMappingNode mapping)
            {
                if (!VisitNodeAndFindDuplicates(mapping))
                {
                    base.Visit(mapping);
                }
            }

            public override void Visit(YamlSequenceNode sequence)
            {
                if (!VisitNodeAndFindDuplicates(sequence))
                {
                    base.Visit(sequence);
                }
            }
        }

        private void AssignAnchors()
        {
            var visitor = new AnchorAssigningVisitor();
            visitor.AssignAnchors(this);
        }

        internal void Save(IEmitter emitter, bool assignAnchors = true)
        {
            if (assignAnchors)
            {
                AssignAnchors();
            }

            emitter.Emit(new DocumentStart());
            RootNode.Save(emitter, new EmitterState());
            emitter.Emit(new DocumentEnd(false));
        }

        /// <summary>
        /// Accepts the specified visitor by calling the appropriate Visit method on it.
        /// </summary>
        /// <param name="visitor">
        /// A <see cref="IYamlVisitor"/>.
        /// </param>
        public void Accept(IYamlVisitor visitor)
        {
            visitor.Visit(this);
        }

        /// <summary>
        /// Gets all nodes from the document.
        /// <see cref="MaximumRecursionLevelReachedException"/> is thrown if an infinite recursion is detected.
        /// </summary>
        public IEnumerable<YamlNode> AllNodes
        {
            get
            {
                return RootNode.AllNodes;
            }
        }
    }
}


text:
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var core_1 = require('@angular/core');
var default_editor_1 = require('./default-editor');
var InputEditorComponent = (function (_super) {
    __extends(InputEditorComponent, _super);
    function InputEditorComponent() {
        _super.call(this);
    }
    InputEditorComponent.decorators = [
        { type: core_1.Component, args: [{
                    selector: 'input-editor',
                    styleUrls: ['./editor.component.scss'],
                    template: "\n    <input [ngClass]=\"inputClass\"\n           class=\"form-control\"\n           [(ngModel)]=\"cell.newValue\"\n           [name]=\"cell.getId()\"\n           [placeholder]=\"cell.getTitle()\"\n           [disabled]=\"!cell.isEditable()\"\n           (click)=\"onClick.emit($event)\"\n           (keydown.enter)=\"onEdited.emit($event)\"\n           (keydown.esc)=\"onStopEditing.emit()\">\n    ",
                },] },
    ];
    /** @nocollapse */
    InputEditorComponent.ctorParameters = function () { return []; };
    return InputEditorComponent;
}(default_editor_1.DefaultEditor));
exports.InputEditorComponent = InputEditorComponent;
//# sourceMappingURL=input-editor.component.js.map


text:
set -ex

$FACEREC_DIR/docker/base/entry.sh

if ! diff -q /tmp/requirements.txt $FACEREC_DIR/requirements.txt; then
    echo "Pip installing $FACEREC_DIR"
    pip install -r --ignore-installed $FACEREC_DIR/requirements.txt
    pip install -e $FACEREC_DIR
fi

set +x
echo "Will exec: $@"
exec "$@"


text:
/* eslint new-cap: 0 */

'use strict'

const express  = require('express')
const router   = express.Router()

const Users    = require('../models/users')
const Rooms    = require('../models/rooms')
const Messages = require('../models/messages')

/*
 * Validate user. Check if current request has a session that contains a valid userId
 */

const validateUser = (req, res, next) => {
  /*
   * If a non-user tries to do stuff like create a room, etc, 401 out
   */

  if (req.session.userId && Users.isValid(req.session.userId)) return next()
  else {
    let err401 = new Error('Unauthorized. Visit / once to setup user.')

    err401.status = 401
    return next(err401)
  }
}

/*
 * GET home page
 * It shows the list of rooms and no.,of people in 'em
 */

router.get('/', (req, res, next) => {
  try {
    // get user from session or create new if one doesn't exist
    const userId       = req.session.userId ? req.session.userId : Users.create(Date.now())
    const userNick     = Users.getNickname(userId)

    // get an array of all rooms and user count in 'em
    const allRoomsObjs = Rooms.getAll().map(room => {
      const temp = Object.create(null)

      temp.id           = room.id
      temp.name         = room.name
      temp.userCount    = room.users.length
      temp.createdBy    = Users.getNickname(room.createdBy)
      temp.createdByYou = room.createdBy === userId

      return temp
    })

    // set userId and nickname in session
    req.session.userId   = userId
    req.session.nickname = userNick

    if (req.xhr) res.json(allRoomsObjs)
    else {
      res.render('index', {
        userNick: userNick,
        rooms: allRoomsObjs
      })
    }
  }
  catch(e) {
    next(e)
  }
})

/*
 * PUT/POST change user nickname
 */

const updateUserNickname = (req, res, next) => {
  try {
    const newNickname = req.body.nickname

    Users.setNickname(req.session.userId, newNickname)

    req.session.nickname = newNickname

    if (req.xhr) res.sendStatus(200)
    else res.redirect('/')
  }
  catch(e) {
    next(e)
  }
}

router.route('/user/nickname')
  .all(validateUser)
  .put(updateUserNickname)
  .post(updateUserNickname)

/*
 * POST create a new room with given name
 */

router.post('/room/create', validateUser, (req, res, next) => {
  try {
    const name      = req.body.roomname
    const userId    = req.session.userId
    const newRoomId = Rooms.create(name, userId)
    const newRoomUrl = '/room/' + newRoomId

    if (req.xhr) {
      res.location(newRoomUrl)
      res.sendStatus(201)
    }
    else res.redirect(newRoomUrl)
  }
  catch(e) {
    next(e)
  }
})

/*
 * GET join a room given by room id
 */

router.get('/room/:id', validateUser, (req, res, next) => {
  try {
    const roomId     = req.params.id
    const roomName   = Rooms.getName(roomId)

    // add user to room
    Rooms.addUser(roomId, req.session.userId)

    // get nickname of users in room
    const userIds    = Rooms.getUsers(roomId) || []
    const users      = userIds.map(Users.getNickname)

    // get messages in room sorted by created at date
    const messageIds = Rooms.getMessages(roomId) || []
    const messages   = messageIds
          .map(msgId => {
            const msg      = Messages.get(msgId)
            let temp       = Object.create(null)

            temp.from      = Users.getNickname(msg.from)
            temp.content   = msg.content
            temp.createdAt = msg.createdAt

            return temp
          })
          .sort((a, b) => a.createdAt - b.createdAt)

    const result = {
      users,
      messages,
      roomId,
      roomName,
      currentUser: req.session.nickname
    }

    if (req.xhr) res.json(result)
    else res.render('chat', result)
  }
  catch(e) {
    next(e)
  }
})

/*
 * POST a new message in a room
 */

router.post('/room/:id', validateUser, (req, res, next) => {
  try {
    const roomId       = req.params.id
    const msgContent   = req.body.message
    const from         = req.session.userId

    // create message
    const createdAt    = Date.now()
    const msgId        = Messages.create(msgContent, roomId, createdAt, from)

    const fromNickname = req.session.nickname || Users.getNickname(from)

    // add message to room
    Rooms.addMessage(roomId, msgId)

    // if xhr, send json otherwise redirect back to chat room
    if (req.xhr) {
      res.json({
        from: fromNickname,
        content: msgContent,
        createdAt
      })
    }
    else res.redirect('/room/' + roomId)
  }
  catch(e) {
    next(e)
  }
})

/*
 * GET Make user leave a room
 */

router.get('/room/:id/leave', validateUser, (req, res, next) => {
  try {
    const roomId = req.params.id
    const userId = req.session.userId

    // remove user from room
    Rooms.removeUser(roomId, userId)

    if (req.xhr) res.sendStatus(200)
    // redirect back to home
    else res.redirect('/')
  }
  catch(e) {
    next(e)
  }
})

/*
 * GET/DELETE Delete a room
 */

const deleteRoom = (req, res, next) => {
  try {
    const roomId    = req.params.id
    const createdBy = Rooms.getCreatedBy(roomId)

    // delete only if user trying to delete had created the room
    if (req.session.userId === createdBy) {
      Rooms.deleteRoom(roomId)

      if (req.xhr) res.sendStatus(200)
      else res.redirect('/')
    }
    else {
      let err403 = new Error('Forbidden. You did not create the room.')

      err403.status = 403

      throw err403
    }
  }
  catch(e) {
    next(e)
  }
}

router.route('/room/:id/delete')
  .all(validateUser)
  .delete(deleteRoom)
  .get(deleteRoom)

module.exports = router


text:
import { generateUtilityClass, generateUtilityClasses } from '@material-ui/unstyled';

export interface StepContentClasses {
  /** Styles applied to the root element. */
  root: string;
  /** Styles applied to the root element if `last={true}` (controlled by `Step`). */
  last: string;
  /** Styles applied to the Transition component. */
  transition: string;
}

export type StepContentClassKey = keyof StepContentClasses;

export function getStepContentUtilityClass(slot: string): string {
  return generateUtilityClass('MuiStepContent', slot);
}

const stepContentClasses: StepContentClasses = generateUtilityClasses('MuiStepContent', [
  'root',
  'last',
  'transition',
]);

export default stepContentClasses;


text:
@implementation RankDetailModel

@end


text:
package org.hsqldb.types;

import org.hsqldb.error.Error;
import org.hsqldb.error.ErrorCode;
import org.hsqldb.lib.HashSet;
import org.hsqldb.lib.IntValueHashMap;
import org.hsqldb.persist.HsqlDatabaseProperties;

// boucherb@users 20051207 - patch 1.8.x initial JDBC 4.0 support work

/**
 * Defines the constants that are used to identify SQL types for HSQLDB JDBC
 * inteface type reporting. The actual type constant values are equivalent
 * to those defined in the latest java.sql.Types, where available,
 * or those defined by ansi/iso SQL 2003 otherwise. A type sub-identifer
 * has been added to differentiate HSQLDB-specific type specializations.
 *
 * @author  boucherb@users
 * @version 2.0.0
 * @since 1.7.2
 */
public class Types {

    /**
     * Names of types returned by JDBC methods and accepted as
     * library and user function arguments
     */
    public static final String DecimalClassName   = "java.math.BigDecimal";
    public static final String DateClassName      = "java.sql.Date";
    public static final String TimeClassName      = "java.sql.Time";
    public static final String TimestampClassName = "java.sql.Timestamp";
    public static final String BlobClassName      = "java.sql.Blob";
    public static final String ClobClassName      = "java.sql.Clob";
    /*
     SQL specifies predefined data types named by the following <key word>s:
     CHARACTER, CHARACTER VARYING, CHARACTER LARGE OBJECT, BINARY LARGE OBJECT,
     NUMERIC, DECIMAL, SMALLINT, INTEGER, BIGINT, FLOAT, REAL, DOUBLE PRECISION,
     BOOLEAN, DATE, TIME, TIMESTAMP, and INTERVAL. Also BINARY and VARBINARY
     in SQL post-2003
     SQL 2003 adds DATALINK in Part 9: Management of External Data (SQL/MED)
     and adds XML in Part 14: XML-Related Specifications (SQL/XML)
     */

    // CLI type list from Table 37
    public static final int SQL_CHAR              = 1;
    public static final int SQL_NUMERIC           = 2;
    public static final int SQL_DECIMAL           = 3;
    public static final int SQL_INTEGER           = 4;
    public static final int SQL_SMALLINT          = 5;
    public static final int SQL_FLOAT             = 6;
    public static final int SQL_REAL              = 7;
    public static final int SQL_DOUBLE            = 8;
    public static final int SQL_VARCHAR           = 12;
    public static final int SQL_BOOLEAN           = 16;
    public static final int SQL_USER_DEFINED_TYPE = 17;
    public static final int SQL_ROW               = 19;
    public static final int SQL_REF               = 20;
    public static final int SQL_BIGINT            = 25;             // different in JDBC
    public static final int SQL_BLOB              = 30;             // different in JDBC
    public static final int SQL_CLOB              = 40;             // different in JDBC
    public static final int SQL_ARRAY             = 50;             // different in JDBC - not predefined
    public static final int SQL_MULTISET = 55;                      //
    public static final int SQL_BINARY   = 60;                      // different in JDBC -in SQL post-2003
    public static final int SQL_VARBINARY = 61;                     // different in JDBC - in SQL post-2003
    public static final int SQL_DATE                      = 91;
    public static final int SQL_TIME                      = 92;
    public static final int SQL_TIMESTAMP                 = 93;     //
    public static final int SQL_TIME_WITH_TIME_ZONE       = 94;
    public static final int SQL_TIMESTAMP_WITH_TIME_ZONE  = 95;     //
    public static final int SQL_INTERVAL_YEAR             = 101;    //
    public static final int SQL_INTERVAL_MONTH            = 102;
    public static final int SQL_INTERVAL_DAY              = 103;
    public static final int SQL_INTERVAL_HOUR             = 104;
    public static final int SQL_INTERVAL_MINUTE           = 105;
    public static final int SQL_INTERVAL_SECOND           = 106;
    public static final int SQL_INTERVAL_YEAR_TO_MONTH    = 107;
    public static final int SQL_INTERVAL_DAY_TO_HOUR      = 108;
    public static final int SQL_INTERVAL_DAY_TO_MINUTE    = 109;
    public static final int SQL_INTERVAL_DAY_TO_SECOND    = 110;
    public static final int SQL_INTERVAL_HOUR_TO_MINUTE   = 111;
    public static final int SQL_INTERVAL_HOUR_TO_SECOND   = 112;
    public static final int SQL_INTERVAL_MINUTE_TO_SECOND = 113;

    // used where local defines are used in the same range as SQL type numbers
    public static final int SQL_TYPE_NUMBER_LIMIT = 256;

    // These values are not in table 37 of the SQL CLI 2003 FCD, but some
    // are found in tables 6-9 and some are found in Annex A1:
    // c Header File SQLCLI.H and/or addendums in other documents,
    // such as:
    // SQL 2003 Part 9: Management of External Data (SQL/MED) : DATALINK
    // SQL 2003 Part 14: XML-Related Specifications (SQL/XML) : XML
    public static final int SQL_BIT         = 14;                   // is in SQL99 but removed from 2003
    public static final int SQL_BIT_VARYING = 15;                   // is in SQL99 but removed from 2003
    public static final int SQL_DATALINK         = 70;
    public static final int SQL_UDT              = 17;
    public static final int SQL_UDT_LOCATOR      = 18;
    public static final int SQL_BLOB_LOCATOR     = 31;
    public static final int SQL_CLOB_LOCATOR     = 41;
    public static final int SQL_ARRAY_LOCATOR    = 51;
    public static final int SQL_MULTISET_LOCATOR = 56;
    public static final int SQL_ALL_TYPES        = 0;
    public static final int SQL_DATETIME         = 9;               // collective name
    public static final int SQL_INTERVAL         = 10;              // collective name
    public static final int SQL_XML              = 137;

    // These values are taken from various SQL CLI header files
    public static final int SQL_NCHAR         = (-8);
    public static final int SQL_WCHAR         = (-8);
    public static final int SQL_WVARCHAR      = (-9);
    public static final int SQL_NVARCHAR      = (-9);
    public static final int SQL_WLONGVARCHAR  = (-10);
    public static final int SQL_NTEXT         = (-10);
    public static final int SQL_LONGVARBINARY = (-4);
    public static final int SQL_IMAGE         = (-4);
    public static final int SQL_GUID          = (-11);
    public static final int SQL_VARIANT       = (-150);

    // SQL_UDT subcodes
    public static final int SQL_SUB_DISTINCT   = 1;
    public static final int SQL_SUB_STRUCTURED = 2;

    // non-standard type not in JDBC or SQL CLI
    public static final int VARCHAR_IGNORECASE = 100;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type
     * ARRAY.
     *
     * @since JDK 1.2
     */
    public static final int ARRAY = 2003;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * BIGINT.
     */
    public static final int BIGINT = -5;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * BINARY.
     */
    public static final int BINARY = -2;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * BIT.
     */
    public static final int BIT = -7;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type
     * BLOB.
     *
     * @since JDK 1.2
     */
    public static final int BLOB = 2004;

    /**
     * The constant in the Java programming language, somtimes referred to
     * as a type code, that identifies the generic SQL type
     * BOOLEAN.
     *
     * @since JDK 1.4
     */
    public static final int BOOLEAN = SQL_BOOLEAN;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * CHAR.
     */
    public static final int CHAR = SQL_CHAR;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type
     * CLOB
     *
     * @since JDK 1.2
     */
    public static final int CLOB = 2005;

    /**
     * The constant in the Java programming language, somtimes referred to
     * as a type code, that identifies the generic SQL type DATALINK.
     *
     * @since JDK 1.4
     */
    public static final int DATALINK = 70;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * DATE.
     */
    public static final int DATE = SQL_DATE;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * DECIMAL.
     */
    public static final int DECIMAL = SQL_DECIMAL;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type
     * DISTINCT.
     *
     * @since JDK 1.2
     */
    public static final int DISTINCT = 2001;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * DOUBLE.
     */
    public static final int DOUBLE = SQL_DOUBLE;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * FLOAT.
     */
    public static final int FLOAT = SQL_FLOAT;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * INTEGER.
     */
    public static final int INTEGER = SQL_INTEGER;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type
     * JAVA_OBJECT.
     *
     * @since JDK 1.2
     */
    public static final int JAVA_OBJECT = 2000;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * LONGVARBINARY.
     */
    public static final int LONGVARBINARY = -4;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * LONGVARCHAR.
     */
    public static final int LONGVARCHAR = -1;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * MULTISET.
     */
    public static final int MULTISET = 0;                           // no java.sql.Types definition

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * NULL.
     */
    public static final int NULL = 0;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * NUMERIC.
     */
    public static final int NUMERIC = SQL_NUMERIC;

    /**
     * The constant in the Java programming language that indicates
     * that the SQL type is database-specific and
     * gets mapped to a Java object that can be accessed via
     * the methods getObject and setObject.
     */
    public static final int OTHER = 1111;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * REAL.
     */
    public static final int REAL = SQL_REAL;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type
     * REF.
     *
     * @since JDK 1.2
     */
    public static final int REF = 2006;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * SMALLINT.
     */
    public static final int SMALLINT = SQL_SMALLINT;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type
     * STRUCT.
     *
     * @since JDK 1.2
     */
    public static final int STRUCT = 2002;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * TIME.
     */
    public static final int TIME = SQL_TIME;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * TIMESTAMP.
     */
    public static final int TIMESTAMP = SQL_TIMESTAMP;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * TINYINT.
     */
    public static final int TINYINT = -6;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * VARBINARY.
     */
    public static final int VARBINARY = -3;

    /**
     *
The constant in the Java programming language, sometimes referred
     * to as a type code, that identifies the generic SQL type
     * VARCHAR.
     */
    public static final int VARCHAR = SQL_VARCHAR;

//    /**
//     *
The constant in the Java programming language, sometimes referred
//     * to as a type code, that identifies the recent SQL 2003 SQL type
//     * XML.
//     *
//     * @since SQL 2003
//     * @deprectated
//     * @see #SQLXML
//     */
//    public static final int XML = 137;
    //------------------------- JDBC 4.0 -----------------------------------

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type ROWID
     *
     * @since JDK 1.6, HSQLDB 1.8.x
     *
     */
    public final static int ROWID = 2008;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type NCHAR
     *
     * @since JDK 1.6, HSQLDB 1.8.x
     */
    public static final int NCHAR = -8;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type NVARCHAR.
     *
     * @since JDK 1.6, HSQLDB 1.8.x
     */
    public static final int NVARCHAR = -9;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type LONGNVARCHAR.
     *
     * @since JDK 1.6, HSQLDB 1.8.x
     */
    public static final int LONGNVARCHAR = -10;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type NCLOB.
     *
     * @since JDK 1.6, HSQLDB 1.8.x
     */
    public static final int NCLOB = 2007;

    /**
     * The constant in the Java programming language, sometimes referred to
     * as a type code, that identifies the generic SQL type XML.
     *
     * @since JDK 1.6, HSQLDB 1.8.x
     */
    public static final int SQLXML = 2009;

    //----------------------------- End JDBC 4.0 -------------------------------

    /**
     * The default HSQLODB type sub-identifier. This indicates that an
     * HSQLDB type with this sub-type, if supported, is the very closest
     * thing HSQLDB offerers to the JDBC/SQL2003 type
     */
    public static final int TYPE_SUB_DEFAULT = 1;

    /**
     * The IGNORECASE type sub-identifier. This indicates that an HSQLDB type
     * with this sub-type, if supported,  is the closest thing HSQLDB offerers
     * to the JDBC/SQL2003 type, except that case is ignored in comparisons
     */
    public static final int TYPE_SUB_IGNORECASE = TYPE_SUB_DEFAULT << 2;

    /**
     * Every (type,type-sub) combination known in the HSQLDB context.
     * Not every combination need be supported as a table or procedure
     * column type -- such determinations are handled in DITypeInfo.
     */
    public static final int[][] ALL_TYPES = {
        {
            SQL_ARRAY, TYPE_SUB_DEFAULT
        }, {
            SQL_BIGINT, TYPE_SUB_DEFAULT
        }, {
            SQL_BINARY, TYPE_SUB_DEFAULT
        }, {
            SQL_VARBINARY, TYPE_SUB_DEFAULT
        }, {
            SQL_BLOB, TYPE_SUB_DEFAULT
        }, {
            SQL_BOOLEAN, TYPE_SUB_DEFAULT
        }, {
            SQL_CHAR, TYPE_SUB_DEFAULT
        }, {
            SQL_CLOB, TYPE_SUB_DEFAULT
        }, {
            DATALINK, TYPE_SUB_DEFAULT
        }, {
            SQL_DATE, TYPE_SUB_DEFAULT
        }, {
            SQL_DECIMAL, TYPE_SUB_DEFAULT
        }, {
            DISTINCT, TYPE_SUB_DEFAULT
        }, {
            SQL_DOUBLE, TYPE_SUB_DEFAULT
        }, {
            SQL_FLOAT, TYPE_SUB_DEFAULT
        }, {
            SQL_INTEGER, TYPE_SUB_DEFAULT
        }, {
            JAVA_OBJECT, TYPE_SUB_DEFAULT
        }, {
            SQL_NCHAR, TYPE_SUB_DEFAULT
        }, {
            NCLOB, TYPE_SUB_DEFAULT
        }, {
            SQL_ALL_TYPES, TYPE_SUB_DEFAULT
        }, {
            SQL_NUMERIC, TYPE_SUB_DEFAULT
        }, {
            SQL_NVARCHAR, TYPE_SUB_DEFAULT
        }, {
            OTHER, TYPE_SUB_DEFAULT
        }, {
            SQL_REAL, TYPE_SUB_DEFAULT
        }, {
            SQL_REF, TYPE_SUB_DEFAULT
        }, {
            ROWID, TYPE_SUB_DEFAULT
        }, {
            SQL_SMALLINT, TYPE_SUB_DEFAULT
        }, {
            STRUCT, TYPE_SUB_DEFAULT
        }, {
            SQL_TIME, TYPE_SUB_DEFAULT
        }, {
            SQL_TIMESTAMP, TYPE_SUB_DEFAULT
        }, {
            TINYINT, TYPE_SUB_DEFAULT
        }, {
            SQL_VARCHAR, TYPE_SUB_DEFAULT
        }, {
            SQL_VARCHAR, TYPE_SUB_IGNORECASE
        }, {
            SQL_XML, TYPE_SUB_DEFAULT
        }
    };

// lookup for types
    final static IntValueHashMap javaTypeNumbers;

//  boucherb@users - We can't handle method invocations in
//                   Function.java whose number class is
//                   narrower than the corresponding internal
//                   wrapper
    private final static HashSet illegalParameterClasses;

    static {
        javaTypeNumbers = new IntValueHashMap(32);

        javaTypeNumbers.put("int", Types.SQL_INTEGER);
        javaTypeNumbers.put("java.lang.Integer", Types.SQL_INTEGER);
        javaTypeNumbers.put("double", Types.SQL_DOUBLE);
        javaTypeNumbers.put("java.lang.Double", Types.SQL_DOUBLE);
        javaTypeNumbers.put("java.lang.String", Types.SQL_VARCHAR);
        javaTypeNumbers.put(DateClassName, Types.SQL_DATE);
        javaTypeNumbers.put(TimeClassName, Types.SQL_TIME);
        javaTypeNumbers.put(TimestampClassName, Types.SQL_TIMESTAMP);
        javaTypeNumbers.put("java.util.Date", Types.SQL_DATE);
        javaTypeNumbers.put(DecimalClassName, Types.SQL_DECIMAL);
        javaTypeNumbers.put("boolean", Types.SQL_BOOLEAN);
        javaTypeNumbers.put("java.lang.Boolean", Types.SQL_BOOLEAN);
        javaTypeNumbers.put("byte", Types.TINYINT);
        javaTypeNumbers.put("java.lang.Byte", Types.TINYINT);
        javaTypeNumbers.put("short", Types.SQL_SMALLINT);
        javaTypeNumbers.put("java.lang.Short", Types.SQL_SMALLINT);
        javaTypeNumbers.put("long", Types.SQL_BIGINT);
        javaTypeNumbers.put("java.lang.Long", Types.SQL_BIGINT);
        javaTypeNumbers.put("[B", Types.SQL_BINARY);
        javaTypeNumbers.put("java.lang.Object", Types.OTHER);
        javaTypeNumbers.put("java.lang.Void", Types.SQL_ALL_TYPES);

        //
        illegalParameterClasses = new org.hsqldb.lib.HashSet();

        illegalParameterClasses.add(Byte.TYPE);
        illegalParameterClasses.add(Short.TYPE);
        illegalParameterClasses.add(Float.TYPE);
        illegalParameterClasses.add(Byte.class);
        illegalParameterClasses.add(Short.class);
        illegalParameterClasses.add(Float.class);

        //
    }

    /**
     * Retieves the type number corresponding to the class
     * of an IN, IN OUT or OUT parameter.

     *
     * This method extends getTypeNr to return OTHER for
     * primitive arrays, classes that directly implement
     * java.io.Serializable and non-primitive arrays whose
     * base component implements java.io.Serializable,
     * allowing, for instance, arguments and return types of
     * primitive arrays, Serializable objects and arrays,
     * of Serializable objects.  Direct primitive types
     * other than those mapping directly to the internal
     * wrapper form are not yet handled.  That is, HSQLDB
     * cannot yet properly deal with CALLs involving methods
     * with primitive byte, short, float or their
     * corresponding wrappers, due to the way internal
     * conversion works and lack of detection and narrowing
     * code in Function to allow this.  In other words,
     * passing in or retrieving any of the mentioned types
     * always causes conversion to a wider internal wrapper
     * which is genrally incompatible under reflective
     * invocation, resulting in an IllegalArgumentException.
     *
     * @param  c a Class instance
     * @return java.sql.Types int value
     * @throws  HsqlException
     */
    public static Type getParameterSQLType(Class c) {

        String  name;
        int     typeCode;
        boolean isArray;

        if (c == null) {
            throw Error.runtimeError(ErrorCode.U_S0500, "Types");
        }

        if (Void.TYPE.equals(c)) {
            return Type.SQL_ALL_TYPES;
        }

        name     = c.getName();
        typeCode = javaTypeNumbers.get(name, Integer.MIN_VALUE);

        if (typeCode != Integer.MIN_VALUE) {
            return Type.getDefaultTypeWithSize(typeCode);
        }

        if (c.isArray()) {
            Class c1 = c.getComponentType();

            name     = c1.getName();
            typeCode = javaTypeNumbers.get(name, Integer.MIN_VALUE);

            if (typeCode != Integer.MIN_VALUE) {
                return Type.getDefaultTypeWithSize(typeCode);
            }

            if (typeCode == Types.SQL_ALL_TYPES) {
                return null;
            }

            return Type.getDefaultTypeWithSize(typeCode);
        }

        return null;
    }

    public static boolean acceptsZeroPrecision(int type) {

        switch (type) {

            case Types.SQL_TIME :
            case Types.SQL_TIMESTAMP :
                return true;

            default :
                return false;
        }
    }

    public static boolean requiresPrecision(int type) {

        switch (type) {

            case Types.SQL_BIT_VARYING :
            case Types.SQL_VARBINARY :
            case Types.SQL_VARCHAR :
            case Types.SQL_NVARCHAR :
            case Types.VARCHAR_IGNORECASE :
                return true;

            default :
                return false;
        }
    }

    /**
     * Types that accept precision params in column definition or casts.
     * CHAR, VARCHAR and VARCHAR_IGNORECASE params
     * are ignored when the sql.enforce_strict_types is false.
     *
     */
    public static boolean acceptsPrecision(int type) {

        switch (type) {

            case Types.LONGVARCHAR :
            case Types.LONGVARBINARY :
            case Types.SQL_ARRAY :
            case Types.SQL_BINARY :
            case Types.SQL_BIT :
            case Types.SQL_BIT_VARYING :
            case Types.SQL_BLOB :
            case Types.SQL_CHAR :
            case Types.SQL_NCHAR :
            case Types.SQL_CLOB :
            case Types.NCLOB :
            case Types.SQL_VARBINARY :
            case Types.SQL_VARCHAR :
            case Types.SQL_NVARCHAR :
            case Types.VARCHAR_IGNORECASE :
            case Types.SQL_DECIMAL :
            case Types.SQL_NUMERIC :
            case Types.SQL_FLOAT :
            case Types.SQL_TIME :
            case Types.SQL_TIMESTAMP :
            case Types.SQL_INTERVAL_YEAR :
            case Types.SQL_INTERVAL_YEAR_TO_MONTH :
            case Types.SQL_INTERVAL_MONTH :
            case Types.SQL_INTERVAL_DAY :
            case Types.SQL_INTERVAL_DAY_TO_HOUR :
            case Types.SQL_INTERVAL_DAY_TO_MINUTE :
            case Types.SQL_INTERVAL_DAY_TO_SECOND :
            case Types.SQL_INTERVAL_HOUR :
            case Types.SQL_INTERVAL_HOUR_TO_MINUTE :
            case Types.SQL_INTERVAL_HOUR_TO_SECOND :
            case Types.SQL_INTERVAL_MINUTE :
            case Types.SQL_INTERVAL_MINUTE_TO_SECOND :
            case Types.SQL_INTERVAL_SECOND :
                return true;

            default :
                return false;
        }
    }

    public static boolean acceptsScaleCreateParam(int type) {

        switch (type) {

            case Types.SQL_INTERVAL_SECOND :
                return true;

            case Types.SQL_DECIMAL :
            case Types.SQL_NUMERIC :
                return true;

            default :
                return false;
        }
    }

    /**
     * A reasonable/customizable number to avoid the shortcomings/defects
     * associated with doing a dynamic scan of results to determine
     * the value.  In practice, it turns out that single query yielding
     * widely varying values for display size of CHAR and VARCHAR columns
     * on repeated execution results in patently poor usability, as some fairly
     * high-profile, otherwise "enterprise-quality" RAD tools depend on
     * on the first value returned to lay out forms and limit the size of
     * single line edit controls, set corresponding local datastore storage
     * sizes, etc. In practice, It also turns out that many tools (due to
     * the original lack of PreparedStatement.getMetaData() in JDK 1.1) emulate
     * a SQL_DESCRIBE by executing a query hopefully guaranteed to return no
     * or very few rows for example: select ... from ... where 1=0.
     * Using the dynamic scan of 1.7.2 RC5 and previous, therefore, the
     * minimum display size value (1) was often being generated during
     * a tool's describe phase.  Upon subsequent "real" retrievals, some
     * tools complain that CHAR and VARCHAR result values exceeded the
     * originally reported display size and refused to fetch further values.
     */
    public static final int MAX_CHAR_OR_VARCHAR_DISPLAY_SIZE =
        MAX_CHAR_OR_VARCHAR_DISPLAY_SIZE();

    // So that the variable can be both public static final and
    // customizable through system properties if required.
    //
    // 32766 (0x7ffe) seems to be a magic number over which several
    // rather high-profile RAD tools start to have problems
    // regarding layout and allocation stress.  It is gently
    // recommended that LONGVARCHAR be used for larger values in RAD
    // tool layout & presentation use cases until such time as we provide
    // true BLOB support (at which point, LONGVARCHAR will most likely become
    // an alias for CLOB).
    //
    // Most GUI tools seem to handle LONGVARCHAR gracefully by:
    //
    // 1.) refusing to directly display such columns in graphical query results
    // 2.) providing other means to retrieve and display such values
    private static int MAX_CHAR_OR_VARCHAR_DISPLAY_SIZE() {

        try {
            return Integer.getInteger(
                HsqlDatabaseProperties.system_max_char_or_varchar_display_size,
                32766).intValue();
        } catch (SecurityException e) {
            return 32766;
        }
    }

    public static boolean isSearchable(int type) {

        switch (type) {

            case Types.SQL_BLOB :
            case Types.SQL_CLOB :
            case Types.NCLOB :
            case Types.JAVA_OBJECT :
            case Types.STRUCT :
            case Types.OTHER :
            case Types.ROWID :
                return false;

            case Types.SQL_ARRAY :
            default :
                return true;
        }
    }
}


text:
(function($){
	if( !$.cookie ){
		console.error("activecookie needs jQuery Cookie Plugin(https://github.com/carhartl/jquery-cookie)");
		return;
	}

	$.fn.activecookie=function(options){
		var settings=$.extend({
			'className': "active",
			'cookieName': "data-cookie",
			'attr': "data-when",
			'callback': null
		},options);

		this.each(function(){
			var ori=$.cookie($(this).attr(settings.cookieName));
			var cmp=$(this).attr(settings.attr);
			var grep=ori.match(new RegExp(cmp));
			if( grep ){
				$(this).addClass(settings.className);
			}
		});

		if( settings.callback ){
			settings.callback;
		}
	}
}(jQuery));


text:
package test.builder;

import hu.interconnect.hr.backend.api.enumeration.Locale;
import hu.interconnect.hr.backend.api.enumeration.Szerep;
import hu.interconnect.hr.domain.Felhasznalo;
import hu.interconnect.hr.domain.Szemelyitorzs;

public class FelhasznaloBuilder extends Builder<Felhasznalo>  {

	private String nev;

	private String jelszo;

	private Szerep szerep;

	private Szemelyitorzs szemelyitorzs;

	private boolean enabled;

	private Locale locale;

	public FelhasznaloBuilder nev(String nev) {
		this.nev = nev;
		return this;
	}

	public FelhasznaloBuilder jelszo(String jelszo) {
		this.jelszo = jelszo;
		return this;
	}

	public FelhasznaloBuilder szerep(Szerep szerep) {
		this.szerep = szerep;
		return this;
	}

	public FelhasznaloBuilder szemelyitorzs(Szemelyitorzs szemelyitorzs) {
		this.szemelyitorzs = szemelyitorzs;
		return this;
	}

	public FelhasznaloBuilder enabled(boolean enabled) {
		this.enabled = enabled;
		return this;
	}

	public FelhasznaloBuilder locale(Locale locale) {
		this.locale = locale;
		return this;
	}

	@Override
	public Felhasznalo letrehoz() {
		return new Felhasznalo(nev, szerep, jelszo, szemelyitorzs, enabled, locale);
	}
}


text:
require 'warden'

module Monban
  module Test
    # These are test helpers for controller specs
    # @note these have only been tested with rspec controller specs
    # @since 0.0.15
    module ControllerHelpers
      def self.included(base)
        base.class_eval do
          setup :store_controller_for_warden, :warden if respond_to?(:setup)
        end
      end

      # Signs a user in for tests
      # @param user [User] the user to sign in
      def sign_in(user)
        @controller.sign_in(user)
      end

      # Signs the user out in tests
      def sign_out
        @controller.sign_out
      end

      # A mock of warden for tests
      def warden
        @warden ||= begin
          manager = Warden::Manager.new(nil) do |config|
            config.merge! Monban.warden_config
          end
          @request.env['warden'] = Warden::Proxy.new(@request.env, manager)
        end
      end

      private
      def store_controller_for_warden
        @request.env['action_controller.instance'] = @controller
      end

    end
  end
end


text:
package com.intellij.util.xml.impl;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.NullableFactory;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.XmlElementFactory;
import com.intellij.psi.xml.XmlDocument;
import com.intellij.psi.xml.XmlFile;
import com.intellij.psi.xml.XmlTag;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.xml.DomElement;
import com.intellij.util.xml.DomFileElement;
import com.intellij.util.xml.DomNameStrategy;
import com.intellij.util.xml.EvaluatedXmlName;
import com.intellij.util.xml.stubs.ElementStub;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class DomRootInvocationHandler extends DomInvocationHandler {
  private static final Logger LOG = Logger.getInstance(DomRootInvocationHandler.class);
  private final DomFileElementImpl<?> myParent;

  public DomRootInvocationHandler(final Class aClass,
                                  final RootDomParentStrategy strategy,
                                  @NotNull DomFileElementImpl<?> fileElement,
                                  @NotNull final EvaluatedXmlName tagName,
                                  @Nullable ElementStub stub
  ) {
    super(aClass, strategy, tagName, new AbstractDomChildDescriptionImpl(aClass) {
      @Override
      @NotNull
      public List<? extends DomElement> getValues(@NotNull final DomElement parent) {
        throw new UnsupportedOperationException();
      }

      @Override
      public int compareTo(final AbstractDomChildDescriptionImpl o) {
        throw new UnsupportedOperationException();
      }
    }, fileElement.getManager(), true, stub);
    myParent = fileElement;
  }

  @Override
  public void undefineInternal() {
    try {
      final XmlTag tag = getXmlTag();
      if (tag != null) {
        deleteTag(tag);
        detach();
        fireUndefinedEvent();
      }
    }
    catch (Exception e) {
      LOG.error(e);
    }
  }

  public boolean equals(final Object obj) {
    if (!(obj instanceof DomRootInvocationHandler)) return false;

    final DomRootInvocationHandler handler = (DomRootInvocationHandler)obj;
    return myParent.equals(handler.myParent);
  }

  public int hashCode() {
    return myParent.hashCode();
  }

  @Override
  public boolean exists() {
    return getStub() != null ||
           getXmlElement() != null;
  }

  @Override
  @NotNull
  public String getXmlElementNamespace() {
    return getXmlName().getNamespace(getFile(), getFile());
  }

  @Override
  protected String checkValidity() {
    final XmlTag tag = (XmlTag)getXmlElement();
    if (tag != null && !tag.isValid()) {
      return "invalid root tag";
    }

    final String s = myParent.checkValidity();
    if (s != null) {
      return "root: " + s;
    }

    return null;
  }

  @Override
  @NotNull
  public DomFileElementImpl<?> getParent() {
    return myParent;
  }

  @Override
  public DomElement createPathStableCopy() {
    final DomFileElement<?> stableCopy = myParent.createStableCopy();
    return getManager().createStableValue((NullableFactory<DomElement>)() -> stableCopy.isValid() ? stableCopy.getRootElement() : null);
  }

  @Override
  protected XmlTag setEmptyXmlTag() {
    final XmlTag[] result = new XmlTag[]{null};
    getManager().runChange(() -> {
      try {
        final String namespace = getXmlElementNamespace();
        @NonNls final String nsDecl = StringUtil.isEmpty(namespace) ? "" : " xmlns=\"" + namespace + "\"";
        final XmlFile xmlFile = getFile();
        final XmlTag tag = XmlElementFactory.getInstance(xmlFile.getProject()).createTagFromText("<" + getXmlElementName() + nsDecl + "/>");
        result[0] = ((XmlDocument)xmlFile.getDocument().replace(((XmlFile)tag.getContainingFile()).getDocument())).getRootTag();
      }
      catch (IncorrectOperationException e) {
        LOG.error(e);
      }
    });
    return result[0];
  }

  @Override
  @NotNull
  public final DomNameStrategy getNameStrategy() {
    final Class<?> rawType = getRawType();
    final DomNameStrategy strategy = DomImplUtil.getDomNameStrategy(rawType, isAttribute());
    if (strategy != null) {
      return strategy;
    }
    return DomNameStrategy.HYPHEN_STRATEGY;
  }

}


text:
package io.fabric8.openshift.client.server.mock;

import io.fabric8.openshift.api.model.ClusterRole;
import io.fabric8.openshift.api.model.ClusterRoleBuilder;
import io.fabric8.openshift.api.model.ClusterRoleList;
import io.fabric8.openshift.api.model.ClusterRoleListBuilder;
import io.fabric8.openshift.client.OpenShiftClient;
import org.junit.jupiter.api.Test;

import java.net.HttpURLConnection;

import static org.assertj.core.api.Assertions.assertThat;

@EnableOpenShiftMockClient
class ClusterRoleTest {
  private OpenShiftClient client;
  private OpenShiftMockServer server;

  @Test
  void get() {
    // Given
    server.expect().get().withPath("/apis/authorization.openshift.io/v1/clusterroles/test-get")
        .andReturn(HttpURLConnection.HTTP_OK, createNewClusterRole("test-get"))
        .once();

    // When
    ClusterRole clusterRole = client.clusterRoles().withName("test-get").get();

    // Then
    assertThat(clusterRole)
        .isNotNull()
        .hasFieldOrPropertyWithValue("metadata.name", "test-get");
  }

  @Test
  void list() {
    // Given
    server.expect().get().withPath("/apis/authorization.openshift.io/v1/clusterroles")
        .andReturn(HttpURLConnection.HTTP_OK, new ClusterRoleListBuilder()
            .addToItems(createNewClusterRole("test-list"))
            .build())
        .once();

    // When
    ClusterRoleList clusterRoleList = client.clusterRoles().list();

    // Then
    assertThat(clusterRoleList).isNotNull();
    assertThat(clusterRoleList.getItems()).hasSize(1);
    assertThat(clusterRoleList.getItems().get(0))
        .hasFieldOrPropertyWithValue("metadata.name", "test-list");
  }

  @Test
  void delete() {
    // Given
    server.expect().delete().withPath("/apis/authorization.openshift.io/v1/clusterroles/cluster")
        .andReturn(HttpURLConnection.HTTP_OK, createNewClusterRole("cluster"))
        .once();

    // When
    boolean isDeleted = client.clusterRoles().withName("cluster").delete().size() == 1;

    // Then
    assertThat(isDeleted).isTrue();
  }

  private ClusterRole createNewClusterRole(String name) {
    return new ClusterRoleBuilder()
        .withNewMetadata().withName(name).endMetadata()
        .addNewRule()
        .addToApiGroups("template.openshift.io")
        .addToResources("templates", "processedtemplates", "templateauthorizations", "templateinstances")
        .withVerbs("*")
        .endRule()
        .build();
  }

}


text:
rootpath = File.dirname(File.dirname(__FILE__))
$: << File.join(rootpath,'lib')

require 'bio-blastxmlparser'
fn = 'test/data/nt_example_blastn.m7'
n = Bio::BlastXMLParser::XmlIterator.new(fn).to_enum
n.each do | iter |
  puts "Hits for " + iter.query_id
  iter.each do | hit |
    hit.each do | hsp |
      print hit.hit_id, "\t", hsp.evalue, "\n" if hsp.evalue < 0.001
    end
  end
end


text:
scriptcs-webapi-owin
====================

# ASP.Net Webapi Owin Script Pack

## What is it?
Allows ASP.Net WebApi to be included as a Owin component with scriptcs

## Highlights:

* Based on pre-release ASP.Net 2.0 daily build.
* Includes dependancies for new ASP.Net 2.0 features (e.g. Routes, CORS, OData)

## Getting started with ASP.Net Web Api using the pack

```csharp
[Route("api/test")]
public class TestController : ApiController {
	public string Get {
		return "Hello World";
	}
}

var webApi =  Require<WebApiOwin>();
webApi.Configuration.MapHttpAttributeRoutes();

var owin = Require<OwinSelfHost>();
using ( webApi.CreateServer("http://localhost:8080", webApi) ) {
	Console.WriteLine("Listening...");
	Console.ReadLine();
}

```
* Install the dependant packages ```scriptcs -install -pre```.
* Running as admin type ```scriptcs start.csx``` to launch the app.
* Open a browser to "http://localhost:8080/api/test";
* That's it, your ASP.Net controller is runnning with a OWIN self host server

## What's next
TBD


text:
/*globals define*/
/*eslint-env node, browser*/

/**
 * Plugin mainly used for testing.
 * @author lattmann / https://github.com/lattmann
 * @module CorePlugins:MinimalWorkingExample
 */

(function (factory) {
    if (typeof define === 'function' && define.amd) {
        define([
            'plugin/PluginConfig',
            'plugin/PluginBase',
            'text!./metadata.json'
        ], factory);
    } else if (typeof module === 'object' && module.exports) {
        module.exports = factory(
            require('../../PluginConfig'),
            require('../../PluginBase'),
            require('./metadata.json')
        );
    }
}(function (PluginConfig, PluginBase, pluginMetadata) {
    'use strict';

    pluginMetadata = typeof pluginMetadata === 'string' ? JSON.parse(pluginMetadata) : pluginMetadata;

    /**
     * Initializes a new instance of MinimalWorkingExample.
     * @class
     * @augments {PluginBase}
     * @classdesc This class represents the plugin MinimalWorkingExample.
     * @constructor
     */
    function MinimalWorkingExample() {
        // Call base class' constructor.
        PluginBase.call(this);
        this.pluginMetadata = pluginMetadata;
    }

    MinimalWorkingExample.metadata = pluginMetadata;

    // Prototypical inheritance from PluginBase.
    MinimalWorkingExample.prototype = Object.create(PluginBase.prototype);
    MinimalWorkingExample.prototype.constructor = MinimalWorkingExample;

    /**
     * Main function for the plugin to execute. This will perform the execution.
     * Notes:
     * - Always log with the provided logger.[error,warn,info,debug].
     * - Do NOT put any user interaction logic UI, etc. inside this method.
     * - callback always has to be called even if error happened.
     *
     * @param {function(Error, plugin.PluginResult)} callback - the result callback
     */
    MinimalWorkingExample.prototype.main = function (callback) {
        // Use self to access core, project, result, logger etc from PluginBase.
        // These are all instantiated at this point.
        var self = this,
            currentConfiguration = self.getCurrentConfig();
        // Using the logger.
        self.logger.debug('This is a debug message.');
        self.logger.info('This is an info message.');
        self.logger.warn('This is a warning message.');
        self.logger.error('This is an error message.');

        // Using the coreAPI to create an object.
        var newNode = self.core.createNode({parent: self.rootNode, base: self.core.getFCO(self.rootNode)});
        self.core.setAttribute(newNode, 'name', 'My new obj');
        self.core.setRegistry(newNode, 'position', {x: 70, y: 70});

        var newNodeMetaType = self.getMetaType(newNode);
        self.logger.info('The new node is a(n) ' + self.core.getAttribute(newNodeMetaType, 'name'));

        if (self.baseIsMeta(newNode)) {
            self.logger.info('The new node\'s base type is on the meta sheet.');
        }

        self.sendNotification('A plugin notification');

        // This will save the changes. If you don't want to save;
        // exclude self.save and call callback directly from this scope.
        if (currentConfiguration.save === true) {
            self.save('added obj', function (err, status) {
                if (err) {
                    callback(err, self.result);
                    return;
                }
                self.logger.info('saved returned with status', status);

                if (currentConfiguration.shouldFail) {
                    //self.result.setError('Failed on purpose.');
                    callback(new Error('Failed on purpose.'), self.result);
                } else {
                    self.result.setSuccess(true);
                    callback(null, self.result);
                }
            });
        } else {
            if (currentConfiguration.shouldFail) {
                self.result.setError('Failed on purpose.');
                callback(new Error('Failed on purpose.'), self.result);
            } else {
                self.result.setSuccess(true);
                callback(null, self.result);
            }
        }

    };

    return MinimalWorkingExample;
}));