text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _reactAddonsUpdate = require('react-addons-update');

var _reactAddonsUpdate2 = _interopRequireDefault(_reactAddonsUpdate);

var _extend = require('../utils/extend');

var _extend2 = _interopRequireDefault(_extend);

var _getMuiTheme = require('./getMuiTheme');

var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// import deprecatedExport from '../utils/deprecatedExport';

exports.default = // deprecatedExport(
{
  getMuiTheme: _getMuiTheme2.default,
  modifyRawThemeSpacing: function modifyRawThemeSpacing(muiTheme, spacing) {
    return (0, _getMuiTheme2.default)((0, _reactAddonsUpdate2.default)(muiTheme.baseTheme, { spacing: { $set: spacing } }));
  },
  modifyRawThemePalette: function modifyRawThemePalette(muiTheme, palette) {
    var newPalette = (0, _extend2.default)(muiTheme.baseTheme.palette, palette);
    return (0, _getMuiTheme2.default)((0, _reactAddonsUpdate2.default)(muiTheme.baseTheme, { palette: { $set: newPalette } }));
  },
  modifyRawThemeFontFamily: function modifyRawThemeFontFamily(muiTheme, fontFamily) {
    return (0, _getMuiTheme2.default)((0, _reactAddonsUpdate2.default)(muiTheme.baseTheme, { fontFamily: { $set: fontFamily } }));
  }
}; // ,
//  'material-ui/lib/styles/theme-manager',
//  'material-ui/lib/styles/themeManager'
//);

module.exports = exports['default'];


text:
<?php

use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model app\models\ConcreteCompany */

$this->title = 'Create Concrete Company';
$this->params['breadcrumbs'][] = ['label' => 'Concrete Companies', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?= Html::encode($this->title) ?>

    <?= $this->render('_form', [
        'model' => $model,
    ]) ?>

redpajama_set_name: RedPajamaGithub


text:
package DB;

# "private" globals

my ($running, $ready, $deep, $usrctxt, $evalarg,
    @stack, @saved, @skippkg, @clients);
my $preeval = {};
my $posteval = {};
my $ineval = {};

####
#
# Globals - must be defined at startup so that clients can refer to
# them right after a C<require DB;>
#
####

BEGIN {

  # these are hardcoded in perl source (some are magical)

  $DB::sub = '';        # name of current subroutine
  %DB::sub = ();        # "filename:fromline-toline" for every known sub
  $DB::single = 0;      # single-step flag (set it to 1 to enable stops in BEGIN/use)
  $DB::signal = 0;      # signal flag (will cause a stop at the next line)
  $DB::trace = 0;       # are we tracing through subroutine calls?
  @DB::args = ();       # arguments of current subroutine or @ARGV array
  @DB::dbline = ();     # list of lines in currently loaded file
  %DB::dbline = ();     # actions in current file (keyed by line number)
  @DB::ret = ();        # return value of last sub executed in list context
  $DB::ret = '';        # return value of last sub executed in scalar context

  # other "public" globals

  $DB::package = '';    # current package space
  $DB::filename = '';   # current filename
  $DB::subname = '';    # currently executing sub (fullly qualified name)
  $DB::lineno = '';     # current line number

  $DB::VERSION = $DB::VERSION = '1.02';

  # initialize private globals to avoid warnings

  $running = 1;         # are we running, or are we stopped?
  @stack = (0);
  @clients = ();
  $deep = 100;
  $ready = 0;
  @saved = ();
  @skippkg = ();
  $usrctxt = '';
  $evalarg = '';
}

####
# entry point for all subroutine calls
#
sub sub {
  push(@stack, $DB::single);
  $DB::single &= 1;
  $DB::single |= 4 if $#stack == $deep;
  if ($DB::sub eq 'DESTROY' or substr($DB::sub, -9) eq '::DESTROY' or not defined wantarray) {
    &$DB::sub;
    $DB::single |= pop(@stack);
    $DB::ret = undef;
  }
  elsif (wantarray) {
    @DB::ret = &$DB::sub;
    $DB::single |= pop(@stack);
    @DB::ret;
  }
  else {
    $DB::ret = &$DB::sub;
    $DB::single |= pop(@stack);
    $DB::ret;
  }
}

####
# this is called by perl for every statement
#
sub DB {
  return unless $ready;
  &save;
  ($DB::package, $DB::filename, $DB::lineno) = caller;

  return if @skippkg and grep { $_ eq $DB::package } @skippkg;

  $usrctxt = "package $DB::package;";		# this won't let them modify, alas
  local(*DB::dbline) = "::_<$DB::filename";

  # we need to check for pseudofiles on Mac OS (these are files
  # not attached to a filename, but instead stored in Dev:Pseudo)
  # since this is done late, $DB::filename will be "wrong" after
  # skippkg
  if ($^O eq 'MacOS' && $#DB::dbline < 0) {
    $DB::filename = 'Dev:Pseudo';
    *DB::dbline = "::_<$DB::filename";
  }

  my ($stop, $action);
  if (($stop,$action) = split(/\0/,$DB::dbline{$DB::lineno})) {
    if ($stop eq '1') {
      $DB::signal |= 1;
    }
    else {
      $stop = 0 unless $stop;			# avoid un_init warning
      $evalarg = "\$DB::signal |= do { $stop; }"; &eval;
      $DB::dbline{$DB::lineno} =~ s/;9($|\0)/$1/;    # clear any temp breakpt
    }
  }
  if ($DB::single || $DB::trace || $DB::signal) {
    $DB::subname = ($DB::sub =~ /\'|::/) ? $DB::sub : "${DB::package}::$DB::sub"; #';
    DB->loadfile($DB::filename, $DB::lineno);
  }
  $evalarg = $action, &eval if $action;
  if ($DB::single || $DB::signal) {
    _outputall($#stack . " levels deep in subroutine calls.\n") if $DB::single & 4;
    $DB::single = 0;
    $DB::signal = 0;
    $running = 0;

    &eval if ($evalarg = DB->prestop);
    my $c;
    for $c (@clients) {
      # perform any client-specific prestop actions
      &eval if ($evalarg = $c->cprestop);

      # Now sit in an event loop until something sets $running
      do {
	$c->idle;                     # call client event loop; must not block
	if ($running == 2) {          # client wants something eval-ed
	  &eval if ($evalarg = $c->evalcode);
	  $running = 0;
	}
      } until $running;

      # perform any client-specific poststop actions
      &eval if ($evalarg = $c->cpoststop);
    }
    &eval if ($evalarg = DB->poststop);
  }
  ($@, $!, $,, $/, $\, $^W) = @saved;
  ();
}

####
# this takes its argument via $evalarg to preserve current @_
#
sub eval {
  ($@, $!, $,, $/, $\, $^W) = @saved;
  eval "$usrctxt $evalarg; &DB::save";
  _outputall($@) if $@;
}

###############################################################################
#         no compile-time subroutine call allowed before this point           #
###############################################################################

use strict;                # this can run only after DB() and sub() are defined

sub save {
  @saved = ($@, $!, $,, $/, $\, $^W);
  $, = ""; $/ = "\n"; $\ = ""; $^W = 0;
}

sub catch {
  for (@clients) { $_->awaken; }
  $DB::signal = 1;
  $ready = 1;
}

####
#
# Client callable (read inheritable) methods defined after this point
#
####

sub register {
  my $s = shift;
  $s = _clientname($s) if ref($s);
  push @clients, $s;
}

sub done {
  my $s = shift;
  $s = _clientname($s) if ref($s);
  @clients = grep {$_ ne $s} @clients;
  $s->cleanup;
#  $running = 3 unless @clients;
  exit(0) unless @clients;
}

sub _clientname {
  my $name = shift;
  "$name" =~ /^(.+)=[A-Z]+\(.+\)$/;
  return $1;
}

sub next {
  my $s = shift;
  $DB::single = 2;
  $running = 1;
}

sub step {
  my $s = shift;
  $DB::single = 1;
  $running = 1;
}

sub cont {
  my $s = shift;
  my $i = shift;
  $s->set_tbreak($i) if $i;
  for ($i = 0; $i <= $#stack;) {
	$stack[$i++] &= ~1;
  }
  $DB::single = 0;
  $running = 1;
}

####
# XXX caller must experimentally determine $i (since it depends
# on how many client call frames are between this call and the DB call).
# Such is life.
#
sub ret {
  my $s = shift;
  my $i = shift;      # how many levels to get to DB sub
  $i = 0 unless defined $i;
  $stack[$#stack-$i] |= 1;
  $DB::single = 0;
  $running = 1;
}

####
# XXX caller must experimentally determine $start (since it depends
# on how many client call frames are between this call and the DB call).
# Such is life.
#
sub backtrace {
  my $self = shift;
  my $start = shift;
  my($p,$f,$l,$s,$h,$w,$e,$r,$a, @a, @ret,$i);
  $start = 1 unless $start;
  for ($i = $start; ($p,$f,$l,$s,$h,$w,$e,$r) = caller($i); $i++) {
    @a = @DB::args;
    for (@a) {
      s/'/\\'/g;
      s/([^\0]*)/'$1'/ unless /^-?[\d.]+$/;
      s/([\200-\377])/sprintf("M-%c",ord($1)&0177)/eg;
      s/([\0-\37\177])/sprintf("^%c",ord($1)^64)/eg;
    }
    $w = $w ? '@ = ' : '$ = ';
    $a = $h ? '(' . join(', ', @a) . ')' : '';
    $e =~ s/\n\s*\;\s*\Z// if $e;
    $e =~ s/[\\\']/\\$1/g if $e;
    if ($r) {
      $s = "require '$e'";
    } elsif (defined $r) {
      $s = "eval '$e'";
    } elsif ($s eq '(eval)') {
      $s = "eval {...}";
    }
    $f = "file `$f'" unless $f eq '-e';
    push @ret, "$w&$s$a from $f line $l";
    last if $DB::signal;
  }
  return @ret;
}

sub _outputall {
  my $c;
  for $c (@clients) {
    $c->output(@_);
  }
}

sub trace_toggle {
  my $s = shift;
  $DB::trace = !$DB::trace;
}

####
# without args: returns all defined subroutine names
# with subname args: returns a listref [file, start, end]
#
sub subs {
  my $s = shift;
  if (@_) {
    my(@ret) = ();
    while (@_) {
      my $name = shift;
      push @ret, [$DB::sub{$name} =~ /^(.*)\:(\d+)-(\d+)$/]
	if exists $DB::sub{$name};
    }
    return @ret;
  }
  return keys %DB::sub;
}

####
# first argument is a filename whose subs will be returned
# if a filename is not supplied, all subs in the current
# filename are returned.
#
sub filesubs {
  my $s = shift;
  my $fname = shift;
  $fname = $DB::filename unless $fname;
  return grep { $DB::sub{$_} =~ /^$fname/ } keys %DB::sub;
}

####
# returns a list of all filenames that DB knows about
#
sub files {
  my $s = shift;
  my(@f) = grep(m|^_<|, keys %main::);
  return map { substr($_,2) } @f;
}

####
# returns reference to an array holding the lines in currently
# loaded file
#
sub lines {
  my $s = shift;
  return \@DB::dbline;
}

####
# loadfile($file, $line)
#
sub loadfile {
  my $s = shift;
  my($file, $line) = @_;
  if (!defined $main::{'_<' . $file}) {
    my $try;
    if (($try) = grep(m|^_<.*$file|, keys %main::)) {
      $file = substr($try,2);
    }
  }
  if (defined($main::{'_<' . $file})) {
    my $c;
#    _outputall("Loading file $file..");
    *DB::dbline = "::_<$file";
    $DB::filename = $file;
    for $c (@clients) {
#      print "2 ", $file, '|', $line, "\n";
      $c->showfile($file, $line);
    }
    return $file;
  }
  return undef;
}

sub lineevents {
  my $s = shift;
  my $fname = shift;
  my(%ret) = ();
  my $i;
  $fname = $DB::filename unless $fname;
  local(*DB::dbline) = "::_<$fname";
  for ($i = 1; $i <= $#DB::dbline; $i++) {
    $ret{$i} = [$DB::dbline[$i], split(/\0/, $DB::dbline{$i})]
      if defined $DB::dbline{$i};
  }
  return %ret;
}

sub set_break {
  my $s = shift;
  my $i = shift;
  my $cond = shift;
  $i ||= $DB::lineno;
  $cond ||= '1';
  $i = _find_subline($i) if ($i =~ /\D/);
  $s->output("Subroutine not found.\n") unless $i;
  if ($i) {
    if ($DB::dbline[$i] == 0) {
      $s->output("Line $i not breakable.\n");
    }
    else {
      $DB::dbline{$i} =~ s/^[^\0]*/$cond/;
    }
  }
}

sub set_tbreak {
  my $s = shift;
  my $i = shift;
  $i = _find_subline($i) if ($i =~ /\D/);
  $s->output("Subroutine not found.\n") unless $i;
  if ($i) {
    if ($DB::dbline[$i] == 0) {
      $s->output("Line $i not breakable.\n");
    }
    else {
      $DB::dbline{$i} =~ s/($|\0)/;9$1/; # add one-time-only b.p.
    }
  }
}

sub _find_subline {
  my $name = shift;
  $name =~ s/\'/::/;
  $name = "${DB::package}\:\:" . $name if $name !~ /::/;
  $name = "main" . $name if substr($name,0,2) eq "::";
  my($fname, $from, $to) = ($DB::sub{$name} =~ /^(.*):(\d+)-(\d+)$/);
  if ($from) {
    local *DB::dbline = "::_<$fname";
    ++$from while $DB::dbline[$from] == 0 && $from < $to;
    return $from;
  }
  return undef;
}

sub clr_breaks {
  my $s = shift;
  my $i;
  if (@_) {
    while (@_) {
      $i = shift;
      $i = _find_subline($i) if ($i =~ /\D/);
      $s->output("Subroutine not found.\n") unless $i;
      if (defined $DB::dbline{$i}) {
        $DB::dbline{$i} =~ s/^[^\0]+//;
        if ($DB::dbline{$i} =~ s/^\0?$//) {
          delete $DB::dbline{$i};
        }
      }
    }
  }
  else {
    for ($i = 1; $i <= $#DB::dbline ; $i++) {
      if (defined $DB::dbline{$i}) {
        $DB::dbline{$i} =~ s/^[^\0]+//;
        if ($DB::dbline{$i} =~ s/^\0?$//) {
          delete $DB::dbline{$i};
        }
      }
    }
  }
}

sub set_action {
  my $s = shift;
  my $i = shift;
  my $act = shift;
  $i = _find_subline($i) if ($i =~ /\D/);
  $s->output("Subroutine not found.\n") unless $i;
  if ($i) {
    if ($DB::dbline[$i] == 0) {
      $s->output("Line $i not actionable.\n");
    }
    else {
      $DB::dbline{$i} =~ s/\0[^\0]*//;
      $DB::dbline{$i} .= "\0" . $act;
    }
  }
}

sub clr_actions {
  my $s = shift;
  my $i;
  if (@_) {
    while (@_) {
      my $i = shift;
      $i = _find_subline($i) if ($i =~ /\D/);
      $s->output("Subroutine not found.\n") unless $i;
      if ($i && $DB::dbline[$i] != 0) {
	$DB::dbline{$i} =~ s/\0[^\0]*//;
	delete $DB::dbline{$i} if $DB::dbline{$i} =~ s/^\0?$//;
      }
    }
  }
  else {
    for ($i = 1; $i <= $#DB::dbline ; $i++) {
      if (defined $DB::dbline{$i}) {
	$DB::dbline{$i} =~ s/\0[^\0]*//;
	delete $DB::dbline{$i} if $DB::dbline{$i} =~ s/^\0?$//;
      }
    }
  }
}

sub prestop {
  my ($client, $val) = @_;
  return defined($val) ? $preeval->{$client} = $val : $preeval->{$client};
}

sub poststop {
  my ($client, $val) = @_;
  return defined($val) ? $posteval->{$client} = $val : $posteval->{$client};
}

#
# "pure virtual" methods
#

# client-specific pre/post-stop actions.
sub cprestop {}
sub cpoststop {}

# client complete startup
sub awaken {}

sub skippkg {
  my $s = shift;
  push @skippkg, @_ if @_;
}

sub evalcode {
  my ($client, $val) = @_;
  if (defined $val) {
    $running = 2;    # hand over to DB() to evaluate in its context
    $ineval->{$client} = $val;
  }
  return $ineval->{$client};
}

sub ready {
  my $s = shift;
  return $ready = 1;
}

# stubs

sub init {}
sub stop {}
sub idle {}
sub cleanup {}
sub output {}

#
# client init
#
for (@clients) { $_->init }

$SIG{'INT'} = \&DB::catch;

# disable this if stepping through END blocks is desired
# (looks scary and deconstructivist with Swat)
END { $ready = 0 }

1;
__END__

=head1 NAME

DB - programmatic interface to the Perl debugging API

=head1 SYNOPSIS

    package CLIENT;
    use DB;
    @ISA = qw(DB);

    # these (inherited) methods can be called by the client

    CLIENT->register()      # register a client package name
    CLIENT->done()          # de-register from the debugging API
    CLIENT->skippkg('hide::hide')  # ask DB not to stop in this package
    CLIENT->cont([WHERE])       # run some more (until BREAK or another breakpt)
    CLIENT->step()              # single step
    CLIENT->next()              # step over
    CLIENT->ret()               # return from current subroutine
    CLIENT->backtrace()         # return the call stack description
    CLIENT->ready()             # call when client setup is done
    CLIENT->trace_toggle()      # toggle subroutine call trace mode
    CLIENT->subs([SUBS])        # return subroutine information
    CLIENT->files()             # return list of all files known to DB
    CLIENT->lines()             # return lines in currently loaded file
    CLIENT->loadfile(FILE,LINE) # load a file and let other clients know
    CLIENT->lineevents()        # return info on lines with actions
    CLIENT->set_break([WHERE],[COND])
    CLIENT->set_tbreak([WHERE])
    CLIENT->clr_breaks([LIST])
    CLIENT->set_action(WHERE,ACTION)
    CLIENT->clr_actions([LIST])
    CLIENT->evalcode(STRING)  # eval STRING in executing code's context
    CLIENT->prestop([STRING]) # execute in code context before stopping
    CLIENT->poststop([STRING])# execute in code context before resuming

    # These methods will be called at the appropriate times.
    # Stub versions provided do nothing.
    # None of these can block.

    CLIENT->init()          # called when debug API inits itself
    CLIENT->stop(FILE,LINE) # when execution stops
    CLIENT->idle()          # while stopped (can be a client event loop)
    CLIENT->cleanup()       # just before exit
    CLIENT->output(LIST)    # called to print any output that API must show

=head1 DESCRIPTION

Perl debug information is frequently required not just by debuggers,
but also by modules that need some "special" information to do their
job properly, like profilers.

This module abstracts and provides all of the hooks into Perl internal
debugging functionality, so that various implementations of Perl debuggers
(or packages that want to simply get at the "privileged" debugging data)
can all benefit from the development of this common code.  Currently used
by Swat, the perl/Tk GUI debugger.

Note that multiple "front-ends" can latch into this debugging API
simultaneously.  This is intended to facilitate things like
debugging with a command line and GUI at the same time, debugging
debuggers etc.  [Sounds nice, but this needs some serious support -- GSAR]

In particular, this API does B<not> provide the following functions:

=over 4

=item *

data display

=item *

command processing

=item *

command alias management

=item *

user interface (tty or graphical)

=back

These are intended to be services performed by the clients of this API.

This module attempts to be squeaky clean w.r.t C<use strict;> and when
warnings are enabled.

=head2 Global Variables

The following "public" global names can be read by clients of this API.
Beware that these should be considered "readonly".

=over 8

=item  $DB::sub

Name of current executing subroutine.

=item  %DB::sub

The keys of this hash are the names of all the known subroutines.  Each value
is an encoded string that has the sprintf(3) format
C<("%s:%d-%d", filename, fromline, toline)>.

=item  $DB::single

Single-step flag.  Will be true if the API will stop at the next statement.

=item  $DB::signal

Signal flag. Will be set to a true value if a signal was caught.  Clients may
check for this flag to abort time-consuming operations.

=item  $DB::trace

This flag is set to true if the API is tracing through subroutine calls.

=item  @DB::args

Contains the arguments of current subroutine, or the C<@ARGV> array if in the
toplevel context.

=item  @DB::dbline

List of lines in currently loaded file.

=item  %DB::dbline

Actions in current file (keys are line numbers).  The values are strings that
have the sprintf(3) format C<("%s\000%s", breakcondition, actioncode)>.

=item  $DB::package

Package namespace of currently executing code.

=item  $DB::filename

Currently loaded filename.

=item  $DB::subname

Fully qualified name of currently executing subroutine.

=item  $DB::lineno

Line number that will be executed next.

=back

=head2 API Methods

The following are methods in the DB base class.  A client must
access these methods by inheritance (*not* by calling them directly),
since the API keeps track of clients through the inheritance
mechanism.

=over 8

=item CLIENT->register()

register a client object/package

=item CLIENT->evalcode(STRING)

eval STRING in executing code context

=item CLIENT->skippkg('D::hide')

ask DB not to stop in these packages

=item CLIENT->run()

run some more (until a breakpt is reached)

=item CLIENT->step()

single step

=item CLIENT->next()

step over

=item CLIENT->done()

de-register from the debugging API

=back

=head2 Client Callback Methods

The following "virtual" methods can be defined by the client.  They will
be called by the API at appropriate points.  Note that unless specified
otherwise, the debug API only defines empty, non-functional default versions
of these methods.

=over 8

=item CLIENT->init()

Called after debug API inits itself.

=item CLIENT->prestop([STRING])

Usually inherited from DB package.  If no arguments are passed,
returns the prestop action string.

=item CLIENT->stop()

Called when execution stops (w/ args file, line).

=item CLIENT->idle()

Called while stopped (can be a client event loop).

=item CLIENT->poststop([STRING])

Usually inherited from DB package.  If no arguments are passed,
returns the poststop action string.

=item CLIENT->evalcode(STRING)

Usually inherited from DB package.  Ask for a STRING to be C<eval>-ed
in executing code context.

=item CLIENT->cleanup()

Called just before exit.

=item CLIENT->output(LIST)

Called when API must show a message (warnings, errors etc.).

=back

=head1 BUGS

The interface defined by this module is missing some of the later additions
to perl's debugging functionality.  As such, this interface should be considered
highly experimental and subject to change.

=head1 AUTHOR

Gurusamy Sarathy	gsar@activestate.com

This code heavily adapted from an early version of perl5db.pl attributable
to Larry Wall and the Perl Porters.

=cut


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
  ~ and other contributors as indicated by the @author tags.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

    <!-- USing jetty bean just for the compatibility with other fuse services -->
    <bean id="servletConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
        <property name="constraint">
            <bean class="org.eclipse.jetty.util.security.Constraint">
                <property name="name" value="cst1"/>
                <property name="roles">
                    <list>
                        <value>user</value>
                    </list>
                </property>
                <property name="authenticate" value="true"/>
                <property name="dataConstraint" value="0"/>
            </bean>
        </property>
        <property name="pathSpec" value="/product-portal/*"/>
    </bean>

    <bean id="keycloakPaxWebIntegration" class="org.keycloak.adapters.osgi.PaxWebIntegrationService"
          init-method="start" destroy-method="stop">
        <property name="jettyWebXmlLocation" value="/WEB-INF/jetty-web.xml" />
        <property name="bundleContext" ref="blueprintBundleContext" />
        <property name="constraintMappings">
            <list>
                <ref component-id="servletConstraintMapping" />
            </list>
        </property>
    </bean>

    <bean id="productServlet" class="org.keycloak.example.ProductPortalServlet" depends-on="keycloakPaxWebIntegration">
    </bean>

    <service ref="productServlet" interface="javax.servlet.Servlet">
        <service-properties>
            <entry key="alias" value="/product-portal" />
            <entry key="servlet-name" value="ProductServlet" />
            <entry key="keycloak.config.file" value="/keycloak.json" />
        </service-properties>
    </service>

</blueprint>


text:
// Copyright (c) 2013 lailongwei<lailongwei@126.com>
//
// 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 llbc;

class TestCase_Com_LibConfig : ITestCase
{
    public void Run(string[] args)
    {
        Console.WriteLine("Common/LibConfig testcase:");

        Console.WriteLine("Common about configs:");
        Console.WriteLine("  Default backlog size: {0}", LibConfig.defaultBacklogSize);
        Console.WriteLine();

        Console.WriteLine("Log about configs:");
        Console.WriteLine("  Log root logger name: {0}", LibConfig.logRootLoggerName);
        Console.WriteLine("  Log default not config option use: {0}", LibConfig.logDefaultNotConfigOptionUse);
        Console.WriteLine("  Log default level: {0}", LibConfig.logDefaultLevel);
        Console.WriteLine("  Log direct flush to console: {0}", LibConfig.logDirectFlushToConsole);
        Console.WriteLine("  Log default is async-mode: {0}", LibConfig.logDefaultIsAsyncMode);
        Console.WriteLine("  Log default console log pattern: {0}", LibConfig.logDefaultConsoleLogPattern);
        Console.WriteLine("  Log default colourful output: {0}", LibConfig.logDefaultEnabledColourfulOutput);
        Console.WriteLine("  Log default log to file: {0}", LibConfig.logDefaultLogToFile);
        Console.WriteLine("  Log default file log pattern: {0}", LibConfig.logDefaultFileLogPattern);
        Console.WriteLine("  Log default lazy create log file: {0}", LibConfig.lazyCreateLogFile);
        Console.WriteLine("  Log default enabled daily-rolling mode: {0}", LibConfig.logDefaultEnabledDailyMode);
        Console.WriteLine("  Log default max log file size(in bytes): {0}", LibConfig.logDefaultMaxFileSize);
        Console.WriteLine("  Log default max backup index: {0}", LibConfig.logDefaultMaxBackupIndex);
        Console.WriteLine("  Log default log file buffer size(in bytes): {0}", LibConfig.logDefaultLogFileBufferSize);
        Console.WriteLine("  Log default log flush interval(milli-seconds): {0}", LibConfig.logDefaultLogFlushInterval);
        Console.WriteLine("  Log max log flush interval(milli-seconds): {0}", LibConfig.logMaxLogFlushInterval);
        Console.WriteLine("  Log take over unknown logger message: {0}", LibConfig.takeOverUnknownLoggerMsg);
        Console.WriteLine();

        Console.WriteLine("Thread about configs:");
        Console.WriteLine("  Enable guard debug option?: {0}", LibConfig.debugGuard);
        Console.WriteLine();

        Console.WriteLine("Timer about configs:");
        Console.WriteLine("  Used strict scuedule: {0}", LibConfig.timerStrictSchedule);
        Console.WriteLine();

        Console.WriteLine("Communication about configs:");
        Console.WriteLine("  Comm default connect timeout(seconds): {0}", LibConfig.commDefaultConnectTimeout);
        Console.WriteLine("  Comm max event count: {0}", LibConfig.commMaxEventCount);
        Console.WriteLine("  Comm default service FPS: {0}", LibConfig.commDefaultServiceFPS);
        Console.WriteLine("  Comm max service FPS: {0}", LibConfig.commMaxServiceFPS);
        Console.WriteLine("  Comm per-thread max drive service count: {0}", LibConfig.commPerThreadMaxDriveServiceCount);
        Console.WriteLine("  Comm enabled sampler support: {0}", LibConfig.commIsEnabledSamplerSupport);
        Console.WriteLine("  Comm enabled status handler: {0}", LibConfig.commIsEnabledStatusHandler);
        Console.WriteLine("  Comm enabled status desc: {0}", LibConfig.commIsEnabledStatusDesc);
        Console.WriteLine("  Comm enabled unify pre-subscribe: {0}", LibConfig.commIsEnabledUnifyPreSubscribe);
        Console.WriteLine("  Comm poller model: {0}", LibConfig.commPollerModel);
        Console.WriteLine();

        Console.WriteLine("Press any key ton continue...");
        Console.ReadKey();
    }
}


text:
package com.amazonaws.services.mediaconvert.model.transform;

import java.util.List;
import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.services.mediaconvert.model.*;

import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;

/**
 * AudioSelectorGroupMarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class AudioSelectorGroupMarshaller {

    private static final MarshallingInfo<List> AUDIOSELECTORNAMES_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("audioSelectorNames").build();

    private static final AudioSelectorGroupMarshaller instance = new AudioSelectorGroupMarshaller();

    public static AudioSelectorGroupMarshaller getInstance() {
        return instance;
    }

    /**
     * Marshall the given parameter object.
     */
    public void marshall(AudioSelectorGroup audioSelectorGroup, ProtocolMarshaller protocolMarshaller) {

        if (audioSelectorGroup == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        try {
            protocolMarshaller.marshall(audioSelectorGroup.getAudioSelectorNames(), AUDIOSELECTORNAMES_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}


text:
namespace EPiServer.Reference.Commerce.Shared.Services
{
    public interface IHtmlDownloader
    {
        string Download(string baseUrl, string relativeUrl);
    }
}


text: <meta http-equiv="refresh" content="0; url=General-Query-Packets.html#QPassSignals">


text:
<!DOCTYPE HTML>

		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>AutoScalingAutoScalingInstanceDetails Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.2 (build 963)" />

AWS SDK for iOS v1.7.1

				Amazon Web Services, Inc.

AutoScalingAutoScalingInstanceDetails Class Reference

					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents">Table of Contents</button>

					<select id="jumpTo">
	<option value="top">Jump To…</option>

	<option value="overview">Overview</option>

	<option value="tasks">Tasks</option>

	<option value="properties">Properties</option>

	<option value="//api/name/autoScalingGroupName">    autoScalingGroupName</option>

	<option value="//api/name/availabilityZone">    availabilityZone</option>

	<option value="//api/name/healthStatus">    healthStatus</option>

	<option value="//api/name/instanceId">    instanceId</option>

	<option value="//api/name/launchConfigurationName">    launchConfigurationName</option>

	<option value="//api/name/lifecycleState">    lifecycleState</option>

	<option value="instance_methods">Instance Methods</option>

	<option value="//api/name/description">    - description</option>

	<option value="//api/name/init">    - init</option>

</select>

Overview

Tasks

Properties

autoScalingGroupName

availabilityZone

healthStatus

instanceId

launchConfigurationName

lifecycleState

Instance Methods

description

init

Index

Hierarchy

AutoScalingAutoScalingInstanceDetails Class Reference

	Inherits from
	NSObject

	Declared in
	AutoScalingAutoScalingInstanceDetails.h

Overview

Auto Scaling Instance Details

Tasks

		– init

		  instanceId

	property

		  autoScalingGroupName

	property

		  availabilityZone

	property

		  lifecycleState

	property

		  healthStatus

	property

		  launchConfigurationName

	property

		– description

Properties

autoScalingGroupName

The name of the Auto Scaling group associated with this instance.

Constraints:

Length: 1 - 255

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

@property (nonatomic, retain) NSString *autoScalingGroupName

Discussion

The name of the Auto Scaling group associated with this instance.

Constraints:

Length: 1 - 255

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Declared In

		AutoScalingAutoScalingInstanceDetails.h

availabilityZone

The Availability Zone in which this instance resides.

Constraints:

Length: 1 - 255

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

@property (nonatomic, retain) NSString *availabilityZone

Discussion

The Availability Zone in which this instance resides.

Constraints:

Length: 1 - 255

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Declared In

		AutoScalingAutoScalingInstanceDetails.h

healthStatus

The health status of this instance. “Healthy” means that the instance
is healthy and should remain in service. “Unhealthy” means that the
instance is unhealthy. Auto Scaling should terminate and replace it.

Constraints:

Length: 1 - 32

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

@property (nonatomic, retain) NSString *healthStatus

Discussion

The health status of this instance. “Healthy” means that the instance
is healthy and should remain in service. “Unhealthy” means that the
instance is unhealthy. Auto Scaling should terminate and replace it.

Constraints:

Length: 1 - 32

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Declared In

		AutoScalingAutoScalingInstanceDetails.h

instanceId

The instance ID of the Amazon EC2 instance.

Constraints:

Length: 1 - 16

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

@property (nonatomic, retain) NSString *instanceId

Discussion

The instance ID of the Amazon EC2 instance.

Constraints:

Length: 1 - 16

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Declared In

		AutoScalingAutoScalingInstanceDetails.h

launchConfigurationName

The launch configuration associated with this instance.

Constraints:

Length: 1 - 255

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

@property (nonatomic, retain) NSString *launchConfigurationName

Discussion

The launch configuration associated with this instance.

Constraints:

Length: 1 - 255

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Declared In

		AutoScalingAutoScalingInstanceDetails.h

lifecycleState

The life cycle state of this instance. for more information, see Instance
Lifecycle State in the Auto Scaling Developer Guide.

Constraints:

Length: 1 - 32

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

@property (nonatomic, retain) NSString *lifecycleState

Discussion

The life cycle state of this instance. for more information, see Instance
Lifecycle State in the Auto Scaling Developer Guide.

Constraints:

Length: 1 - 32

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Declared In

		AutoScalingAutoScalingInstanceDetails.h

Instance Methods

description

Returns a string representation of this object; useful for testing and
debugging.

- (NSString *)description

Return Value

A string representation of this object.

Discussion

Returns a string representation of this object; useful for testing and
debugging.

Declared In

		AutoScalingAutoScalingInstanceDetails.h

init

Default constructor for a new  object.  Callers should use the
property methods to initialize this object after creating it.

- (id)init

Discussion

Default constructor for a new  object.  Callers should use the
property methods to initialize this object after creating it.

Declared In

		AutoScalingAutoScalingInstanceDetails.h

Index

Hierarchy

© 2013 Amazon Web Services, Inc.. All rights reserved. (Last updated: 2013-12-12)

						Generated by appledoc 2.2 (build 963).


text:
package com.microsoft.azure.management.appservice.v2018_02_01;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.appservice.v2018_02_01.implementation.AppServiceManager;
import com.microsoft.azure.management.appservice.v2018_02_01.implementation.DetectorDefinitionInner;

/**
 * Type representing DetectorDefinition.
 */
public interface DetectorDefinition extends HasInner<DetectorDefinitionInner>, HasManager<AppServiceManager> {
    /**
     * @return the description value.
     */
    String description();

    /**
     * @return the displayName value.
     */
    String displayName();

    /**
     * @return the id value.
     */
    String id();

    /**
     * @return the isEnabled value.
     */
    Boolean isEnabled();

    /**
     * @return the kind value.
     */
    String kind();

    /**
     * @return the name value.
     */
    String name();

    /**
     * @return the rank value.
     */
    Double rank();

    /**
     * @return the type value.
     */
    String type();

}


text:
module StdoutCapture
  # Captures stdout within the block
  # Usage:
  #
  #   out = capture_stdout do
  #     puts "this will not be shown"
  #   end
  #   out.should == "this will not be shown"
  def capture_stdout(&block)
    out = StringIO.new
    $stdout = out
    yield
    return out
  ensure
    $stdout = STDOUT
  end
end


text:
<?php

namespace josegonzalez\Dotenv;

use InvalidArgumentException;
use josegonzalez\Dotenv\Expect;
use josegonzalez\Dotenv\Filter\CallableFilter;
use LogicException;
use M1\Env\Parser;

class Loader
{

    protected $environment = null;

    protected $filepaths = null;

    protected $filters = array();

    protected $prefix = null;

    protected $raise = true;

    protected $skip = array(
        'define' => false,
        'putenv' => false,
        'toEnv' => false,
        'toServer' => false,
    );

    public function __construct($filepaths = null)
    {
        $this->setFilepaths($filepaths);
        return $this;
    }

    public static function load($options = null)
    {
        $filepaths = null;
        if (is_string($options)) {
            $filepaths = $options;
            $options = array();
        } elseif (isset($options['filepath'])) {
            $filepaths = (array)$options['filepath'];
            unset($options['filepath']);
        } elseif (isset($options['filepaths'])) {
            $filepaths = $options['filepaths'];
            unset($options['filepaths']);
        }

        $dotenv = new \josegonzalez\Dotenv\Loader($filepaths);

        if (array_key_exists('raiseExceptions', $options)) {
            $dotenv->raiseExceptions($options['raiseExceptions']);
        }

        $dotenv->parse();

        if (array_key_exists('filters', $options)) {
            $dotenv->setFilters($options['filters']);
            $dotenv->filter();
        }

        $methods = array(
            'skipExisting',
            'prefix',
            'expect',
            'define',
            'putenv',
            'toEnv',
            'toServer',
        );
        foreach ($methods as $method) {
            if (array_key_exists($method, $options)) {
                $dotenv->$method($options[$method]);
            }
        }

        return $dotenv;
    }

    public function filepath()
    {
        return current($this->filepaths);
    }

    public function filepaths()
    {
        return $this->filepaths;
    }

    public function setFilepath($filepath = null)
    {
        return $this->setFilepaths($filepath);
    }

    public function setFilepaths($filepaths = null)
    {
        if ($filepaths == null) {
            $filepaths = array(__DIR__ . DIRECTORY_SEPARATOR . '.env');
        }

        if (is_string($filepaths)) {
            $filepaths = array($filepaths);
        }

        $this->filepaths = $filepaths;
        return $this;
    }

    public function filters()
    {
        return $this->filters;
    }

    public function setFilters(array $filters)
    {
        $newList = array();
        $keys = array_keys($filters);
        $count = count($keys);
        for ($i = 0; $i < $count; $i++) {
            if (is_int($keys[$i])) {
                $filter = $filters[$keys[$i]];
                if (is_string($filter)) {
                    $newList[$filter] = null;
                } else {
                    $newList['__callable__' . $i] = array(
                        'callable' => $filter
                    );
                }
            } else {
                $newList[$keys[$i]] = $filters[$keys[$i]];
            }
        }

        $this->filters = $newList;

        foreach ($this->filters as $filterClass => $config) {
            if (substr($filterClass, 0, 12) === '__callable__') {
                if (is_callable($config['callable'])) {
                    continue;
                }
                return $this->raise(
                    'LogicException',
                    sprintf('Invalid filter class')
                );
            }
            if (is_callable($filterClass)) {
                continue;
            }
            if (!class_exists($filterClass)) {
                return $this->raise(
                    'LogicException',
                    sprintf('Invalid filter class %s', $filterClass)
                );
            }
            continue;
        }
        return $this;
    }

    public function filter()
    {
        $this->requireParse('filter');

        $environment = $this->environment;
        foreach ($this->filters as $filterClass => $config) {
            $filter = $filterClass;
            if (is_string($filterClass)) {
                if (substr($filterClass, 0, 12) === '__callable__') {
                    $filter = new CallableFilter;
                }
                if (class_exists($filterClass)) {
                    $filter = new $filterClass;
                }
            }
            $environment = $filter($environment, $config);
        }

        $this->environment = $environment;
        return $this;
    }

    public function parse()
    {
        $contents = false;
        $filepaths = $this->filepaths();

        foreach ($filepaths as $i => $filepath) {
            $isLast = count($filepaths) - 1 === $i;
            if (!file_exists($filepath) && $isLast) {
                return $this->raise(
                    'InvalidArgumentException',
                    sprintf("Environment file '%s' is not found", $filepath)
                );
            }

            if (is_dir($filepath) && $isLast) {
                return $this->raise(
                    'InvalidArgumentException',
                    sprintf("Environment file '%s' is a directory. Should be a file", $filepath)
                );
            }

            if ((!is_readable($filepath) || ($contents = file_get_contents($filepath)) === false) && $isLast) {
                return $this->raise(
                    'InvalidArgumentException',
                    sprintf("Environment file '%s' is not readable", $filepath)
                );
            }

            if ($contents !== false) {
                break;
            }
        }

        $parser = new Parser($contents);
        $this->environment = $parser->getContent();

        return $this;
    }

    public function expect()
    {
        $this->requireParse('expect');

        $expect = new Expect($this->environment, $this->raise);
        call_user_func_array($expect, func_get_args());

        return $this;
    }

    public function define()
    {
        $this->requireParse('define');
        foreach ($this->environment as $key => $value) {
            $prefixedKey = $this->prefixed($key);
            if (defined($prefixedKey)) {
                if ($this->skip['define']) {
                    continue;
                }

                return $this->raise(
                    'LogicException',
                    sprintf('Key "%s" has already been defined', $prefixedKey)
                );
            }

            define($prefixedKey, $value);
        }

        return $this;
    }

    public function putenv($overwrite = false)
    {
        $this->requireParse('putenv');
        foreach ($this->environment as $key => $value) {
            $prefixedKey = $this->prefixed($key);
            if (getenv($prefixedKey) && !$overwrite) {
                if ($this->skip['putenv']) {
                    continue;
                }

                return $this->raise(
                    'LogicException',
                    sprintf('Key "%s" has already been defined in getenv()', $prefixedKey)
                );
            }

            putenv($prefixedKey . '=' . $value);
        }

        return $this;
    }

    public function toEnv($overwrite = false)
    {
        $this->requireParse('toEnv');
        foreach ($this->environment as $key => $value) {
            $prefixedKey = $this->prefixed($key);
            if (isset($_ENV[$prefixedKey]) && !$overwrite) {
                if ($this->skip['toEnv']) {
                    continue;
                }

                return $this->raise(
                    'LogicException',
                    sprintf('Key "%s" has already been defined in $_ENV', $prefixedKey)
                );
            }

            $_ENV[$prefixedKey] = $value;
        }

        return $this;
    }

    public function toServer($overwrite = false)
    {
        $this->requireParse('toServer');
        foreach ($this->environment as $key => $value) {
            $prefixedKey = $this->prefixed($key);
            if (isset($_SERVER[$prefixedKey]) && !$overwrite) {
                if ($this->skip['toServer']) {
                    continue;
                }

                return $this->raise(
                    'LogicException',
                    sprintf('Key "%s" has already been defined in $_SERVER', $prefixedKey)
                );
            }

            $_SERVER[$prefixedKey] = $value;
        }

        return $this;
    }

    public function skipExisting($types = null)
    {
        $args = func_get_args();
        if (isset($args[0]) && is_array($args[0])) {
            $args = $args[0];
        }

        $types = (array)$args;
        if (empty($types)) {
            $types = array_keys($this->skip);
        }

        foreach ((array)$types as $type) {
            $this->skip[$type] = true;
        }

        return $this;
    }

    public function skipped()
    {
        $skipped = array();
        foreach ($this->skip as $key => $value) {
            if ($value == true) {
                $skipped[] = $key;
            }
        }
        return $skipped;
    }

    public function prefix($prefix = null)
    {
        $this->prefix = $prefix;
        return $this;
    }

    public function prefixed($key)
    {
        if (!!$this->prefix) {
            $key = $this->prefix . $key;
        }

        return $key;
    }

    public function raiseExceptions($raise = true)
    {
        $this->raise = $raise;
        return $this;
    }

    public function toArray()
    {
        $this->requireParse('toArray');
        if ($this->environment === null) {
            return null;
        }

        $environment = array();
        foreach ($this->environment as $key => $value) {
            $environment[$this->prefixed($key)] = $value;
        }
        return $environment;
    }

    public function __toString()
    {
        try {
            $data = $this->toArray();
        } catch (LogicException $e) {
            $data = array();
        }

        return json_encode($data);
    }

    protected function requireParse($method)
    {
        if (!is_array($this->environment)) {
            return $this->raise(
                'LogicException',
                sprintf('Environment must be parsed before calling %s()', $method)
            );
        }
    }

    protected function raise($exception, $message)
    {
        if ($this->raise) {
            throw new $exception($message);
        }

        $this->exceptions[] = new $exception($message);
        return false;
    }
}


text:
CsString is a standalone library which provides unicode aware string support.

The CsBasicString class is a templated class which provides unicode aware string support. The encoding, such
as UTF-8 or UTF-16, is passed to the CsBasicString template. The following typedefs are provided for convenience.

    using CsString       = CsBasicString<utf8>;
    using CsString_utf8  = CsBasicString<utf8>;
    using CsString_utf16 = CsBasicString<utf16>;

### System Requirements

To use CsString you will need a C++11 compiler and a C++11 standard library.

Currently uses the Autotools build system for building and running the unit test suite.
The library has been tested with clang sanitizer and a major code review.

#### Building on (modern) OSX

If you want to build on OSX, you have probably already figured out that
there is no home brew available. But that's ok, use home brew to install
autotools. Once autotools is installed:

    $ glibtoolize
    $ autoreconf
    $ ./configure --prefix=$HOME/lib
    $ make && make install

Once it's finished compiling, you should find

    $ ls bin/lib/
    libCsString.0.dylib  libCsString.dylib  libCsString.la

There is no static link at the moment.

### Documentation

Class level documentation for CsString is available on the CopperSpice website:

www.copperspice.com/docs/cs_string/index.html

### Presentations

For additional information refer to our CsString presentations at CppCon 2017:

www.copperspice.com/presentations.html

### Authors

* **Ansel Sermersheim**
* **Barbara Geller**

### License

This library is released under the BSD 2-clause license. For more information refer to the
LICENSE file provided with this project.

### References

* Website: www.copperspice.com
* Email:   info@copperspice.com


text:
package org.gradoop.flink.model.impl.operators.matching.single.preserving.explorative.functions;

import org.apache.flink.api.common.functions.FlatMapFunction;
import org.apache.flink.util.Collector;
import org.gradoop.flink.model.impl.operators.matching.common.MatchStrategy;
import org.gradoop.flink.model.impl.operators.matching.common.query.Step;
import org.gradoop.flink.model.impl.operators.matching.common.query.TraversalCode;
import org.gradoop.flink.model.impl.operators.matching.common.tuples.TripleWithCandidates;
import org.gradoop.flink.model.impl.operators.matching.single.preserving.explorative.tuples.EmbeddingWithTiePoint;

/**
 * Initializes an {@link EmbeddingWithTiePoint} from the given edge triple.
 *
 * @param <K> key type
 */
public class BuildEmbeddingFromTriple<K>
  extends BuildEmbedding<K>
  implements FlatMapFunction<TripleWithCandidates<K>, EmbeddingWithTiePoint<K>> {
  /**
   * Match strategy for the traversal.
   */
  private final MatchStrategy matchStrategy;
  /**
   * Index of the source vertex in the vertex embedding.
   */
  private final int sourceIndex;
  /**
   * Index of the edge in the edge embedding
   */
  private final int edgeIndex;
  /**
   * Index of the target vertex in the vertex mapping.
   */
  private final int targetIndex;
  /**
   * Vertex candidate to continue traversal from
   */
  private int nextFrom;
  /**
   * True, iff the initial step is a loop.
   */
  private boolean isQueryLoop;

  /**
   * Constructor
   *
   * @param keyClazz    key type is needed for array initialization
   * @param traversalCode traversal code for the current query
   * @param matchStrategy strategy used for morphism checks
   * @param vertexCount number of vertices in the query graph
   * @param edgeCount   number of edges in the query graph
   */
  public BuildEmbeddingFromTriple(Class<K> keyClazz, TraversalCode traversalCode,
    MatchStrategy matchStrategy, long vertexCount, long edgeCount) {
    super(keyClazz, vertexCount, edgeCount);

    this.matchStrategy = matchStrategy;
    Step step = traversalCode.getStep(0);

    boolean isOutgoing = step.isOutgoing();
    this.edgeIndex = (int) step.getVia();
    // set source and target index in case of incoming or outgoing traversal
    this.sourceIndex = isOutgoing ? (int) step.getFrom() : (int) step.getTo();
    this.targetIndex = isOutgoing ? (int) step.getTo() : (int) step.getFrom();
    this.isQueryLoop = sourceIndex == targetIndex;

    if (traversalCode.getSteps().size() > 1) {
      nextFrom = (int) traversalCode.getStep(1).getFrom();
    }
  }

  @Override
  public void flatMap(TripleWithCandidates<K> triple, Collector<EmbeddingWithTiePoint<K>> out)
    throws Exception {
    if (isValidTriple(triple)) {
      reuseEmbedding.getEdgeMapping()[edgeIndex] = triple.getEdgeId();
      reuseEmbedding.getVertexMapping()[sourceIndex] = triple.getSourceId();
      reuseEmbedding.getVertexMapping()[targetIndex] = triple.getTargetId();
      reuseEmbeddingWithTiePoint.setTiePointId(reuseEmbedding.getVertexMapping()[nextFrom]);
      out.collect(reuseEmbeddingWithTiePoint);
    }
  }

  /**
   * Checks if the given triple is valid according to the match strategy and query characteristics.
   *
   * @param triple triple to check validity for
   * @return true, iff the triple is a valid initial candidate
   */
  private boolean isValidTriple(TripleWithCandidates<K> triple) {
    return (matchStrategy == MatchStrategy.HOMOMORPHISM) ||
      (isQueryLoop && triple.getSourceId().equals(triple.getTargetId())) ||
      (!isQueryLoop && !triple.getSourceId().equals(triple.getTargetId()));
  }
}


text:
<ion-header>

  <ion-toolbar>
    <ion-title>Checkboxes</ion-title>
  </ion-toolbar>

</ion-header>

<ion-content>

  <form (submit)="doSubmit($event)" [formGroup]="fruitsForm">

    <ion-list>

      <ion-item>
        <ion-label>Apple, formControlName</ion-label>
        <ion-checkbox formControlName="apple"></ion-checkbox>
      </ion-item>

      <ion-item>
        <ion-label>Banana, formControlName</ion-label>
        <ion-checkbox formControlName="banana"></ion-checkbox>
      </ion-item>

      <ion-item>
        <ion-label>Cherry, formControlName, disabled</ion-label>
        <ion-checkbox formControlName="cherry"></ion-checkbox>
      </ion-item>

      <ion-item>
        <ion-label>Grape, formControlName, checked, disabled</ion-label>
        <ion-checkbox [checked]="grapeChecked" formControlName="grape"></ion-checkbox>
      </ion-item>

      <ion-item>
        <ion-label>Kiwi, (ionChange) Secondary color</ion-label>
        <ion-checkbox color="secondary" (ionChange)="kiwiChange($event)"></ion-checkbox>
      </ion-item>

      <ion-item>
        <ion-label>Strawberry, (ionChange) [checked]="true"</ion-label>
        <ion-checkbox color="light" (ionChange)="strawberryChange($event)" [checked]="true"></ion-checkbox>
      </ion-item>

      <ion-item>
        <ion-label>Checkbox right, checked, really long text that should ellipsis</ion-label>
        <ion-checkbox item-end [color]="dangerColor" checked></ion-checkbox>
      </ion-item>

      <button ion-item detail-none>
        <ion-label>Checkbox right side</ion-label>
        <ion-checkbox item-end checked></ion-checkbox>
      </button>

      <button ion-item detail-none>
        Button w/ right side default icon, really long text that should ellipsis
        <ion-icon name="information-circle" item-end></ion-icon>
      </button>

    </ion-list>

  </form>

    <button ion-button (click)="toggleGrapeChecked()" outline small class="e2eGrapeChecked">Grape Checked</button>
    <button ion-button (click)="toggleGrapeDisabled()" outline small class="e2eGrapeDisabled">Grape Disabled</button>
    <button ion-button (click)="doSubmit($event)" outline small class="e2eSubmit">Submit</button>

    <ion-checkbox [(ngModel)]="standAloneChecked"></ion-checkbox>
    Stand-alone checkbox: {{standAloneChecked}}

    appleCtrl.dirty: {{appleCtrl.dirty}}

    appleCtrl.value: {{appleCtrl.value}}

    bananaCtrl.dirty: {{bananaCtrl.dirty}}

    bananaCtrl.value: {{bananaCtrl.value}}

    cherry.dirty: {{cherryCtrl.dirty}}

    cherry.value: {{cherryCtrl.value}}

    grape.dirty: {{grapeCtrl.dirty}}

    grape.value: {{grapeCtrl.value}}

    kiwiValue: {{kiwiValue}}

    strawberryValue: {{strawberryValue}}

{{formResults}}

  <ion-item>
    <ion-label>Checkbox / Toggle</ion-label>
    <ion-checkbox [(ngModel)]="checked" [disabled]="disabled"></ion-checkbox>
    <ion-toggle [(ngModel)]="checked" [disabled]="disabled"></ion-toggle>
  </ion-item>
  <ion-item>
    <ion-label>checked</ion-label>
    <ion-checkbox [(ngModel)]="checked"></ion-checkbox>
    <ion-toggle [(ngModel)]="checked"></ion-toggle>
  </ion-item>
  <ion-item>
    <ion-label>disabled</ion-label>
    <ion-checkbox [(ngModel)]="disabled"></ion-checkbox>
    <ion-toggle [(ngModel)]="disabled"></ion-toggle>
  </ion-item>

</ion-content>


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

    <title>monty.shutil module — monty 2022.9.9 documentation</title>
    <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="_static/flasky.css" />

    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="monty.string module" href="monty.string.html" />
    <link rel="prev" title="monty.serialization module" href="monty.serialization.html" />

  <link media="only screen and (max-device-width: 480px)" href="_static/small_flask.css" type= "text/css" rel="stylesheet" />
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">

Navigation

          index

          modules |

          next |

          previous |

monty 2022.9.9 documentation »

monty package »

monty.shutil module

monty.shutil module¶

Copying and zipping utilities. Works on directories mostly.

compress_dir(path, compression='gz')[source]¶

Recursively compresses all files in a directory. Note that this
compresses all files singly, i.e., it does not create a tar archive. For
that, just use Python tarfile class.

Parameters:

path (str) – Path to parent directory.

compression (str) – A compression mode. Valid options are "gz" or
"bz2". Defaults to gz.

compress_file(filepath, compression='gz')[source]¶

Compresses a file with the correct extension. Functions like standard
Unix command line gzip and bzip2 in the sense that the original
uncompressed files are not retained.

Parameters:

filepath (str) – Path to file.

compression (str) – A compression mode. Valid options are "gz" or
"bz2". Defaults to "gz".

copy_r(src, dst)[source]¶

Implements a recursive copy function similar to Unix's "cp -r" command.
Surprisingly, python does not have a real equivalent. shutil.copytree
only works if the destination directory is not present.

Parameters:

src (str) – Source folder to copy.

dst (str) – Destination folder.

decompress_dir(path)[source]¶

Recursively decompresses all files in a directory.

Parameters:

path (str) – Path to parent directory.

decompress_file(filepath)[source]¶

Decompresses a file with the correct extension. Automatically detects
gz, bz2 or z extension.

Parameters:

filepath (str) – Path to file.

compression (str) – A compression mode. Valid options are "gz" or
"bz2". Defaults to "gz".

gzip_dir(path, compresslevel=6)[source]¶

Gzips all files in a directory. Note that this is different from
shutil.make_archive, which creates a tar archive. The aim of this method
is to create gzipped files that can still be read using common Unix-style
commands like zless or zcat.

Parameters:

path (str) – Path to directory.

compresslevel (int) – Level of compression, 1-9. 9 is default for
GzipFile, 6 is default for gzip.

remove(path, follow_symlink=False)[source]¶

Implements a remove function that will delete files, folder trees and
symlink trees

1.) Remove a file
2.) Remove a symlink and follow into with a recursive rm if follow_symlink
3.) Remove directory with rmtree

Parameters:

path (str) – path to remove

follow_symlink (bool) – follow symlinks and removes whatever is in them

Related Topics

Documentation overview

monty package

Previous: monty.serialization module

Next: monty.string module

This Page

Show Source

Quick search

    <form class="search" action="search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

      © Copyright 2014, Shyue Ping Ong.


text:
package org.kaazing.k3po.driver.internal.netty.channel;

import static java.util.Objects.requireNonNull;
import static org.jboss.netty.channel.Channels.succeededFuture;

import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFuture;

final class UpstreamShutdownInputEvent implements ShutdownInputEvent {

    private final Channel channel;

    UpstreamShutdownInputEvent(
            Channel channel) {
        requireNonNull(channel);
        this.channel = channel;
    }

    @Override
    public Channel getChannel() {
        return channel;
    }

    @Override
    public ChannelFuture getFuture() {
        return succeededFuture(getChannel());
    }

    @Override
    public String toString() {
        String channelString = getChannel().toString();
        StringBuilder buf = new StringBuilder(channelString.length() + 64);
        buf.append(channelString);
        buf.append(" INPUT_SHUTDOWN");
        return buf.toString();
    }

}


text:
package org.apache.solr.spelling.suggest;

import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.params.SpellingParams;
import org.apache.solr.common.util.NamedList;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

public class SuggesterTest extends SolrTestCaseJ4 {
  /** Expected URI at which the given suggester will live. */
  protected String requestUri = "/suggest";

  // TODO: fix this test to not require FSDirectory
  static String savedFactory;

  @BeforeClass
  public static void beforeClass() throws Exception {
    savedFactory = System.getProperty("solr.DirectoryFactory");
    System.setProperty("solr.directoryFactory", "org.apache.solr.core.MockFSDirectoryFactory");
    initCore("solrconfig-spellchecker.xml", "schema-spellchecker.xml");
  }

  @AfterClass
  public static void afterClass() {
    if (savedFactory == null) {
      System.clearProperty("solr.directoryFactory");
    } else {
      System.setProperty("solr.directoryFactory", savedFactory);
    }
  }

  public static void addDocs() {
    assertU(
        adoc(
            "id", "1",
            "text", "acceptable accidentally accommodate acquire"));
    assertU(
        adoc(
            "id", "2",
            "text", "believe bellwether accommodate acquire"));
    assertU(
        adoc("id", "3", "text", "cemetery changeable conscientious consensus acquire bellwether"));
  }

  @Test
  public void testSuggestions() {
    addDocs();
    assertU(commit()); // configured to do a rebuild on commit

    assertQ(
        req(
            "qt",
            requestUri,
            "q",
            "ac",
            SpellingParams.SPELLCHECK_COUNT,
            "2",
            SpellingParams.SPELLCHECK_ONLY_MORE_POPULAR,
            "true"),
        "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='ac']/int[@name='numFound'][.='2']",
        "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='ac']/arr[@name='suggestion']/str[1][.='acquire']",
        "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='ac']/arr[@name='suggestion']/str[2][.='accommodate']");
  }

  @Test
  public void testReload() throws Exception {
    addDocs();
    assertU(commit());

    h.reload();
    // wait until the new searcher is registered
    waitForWarming();

    assertQ(
        req(
            "qt",
            requestUri,
            "q",
            "ac",
            SpellingParams.SPELLCHECK_COUNT,
            "2",
            SpellingParams.SPELLCHECK_ONLY_MORE_POPULAR,
            "true"),
        "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='ac']/int[@name='numFound'][.='2']",
        "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='ac']/arr[@name='suggestion']/str[1][.='acquire']",
        "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='ac']/arr[@name='suggestion']/str[2][.='accommodate']");
  }

  @Test
  public void testRebuild() {
    addDocs();
    assertU(commit());
    assertQ(
        req(
            "qt",
            requestUri,
            "q",
            "ac",
            SpellingParams.SPELLCHECK_COUNT,
            "2",
            SpellingParams.SPELLCHECK_ONLY_MORE_POPULAR,
            "true"),
        "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='ac']/int[@name='numFound'][.='2']");
    assertU(adoc("id", "4", "text", "actually"));
    assertU(commit());
    assertQ(
        req(
            "qt",
            requestUri,
            "q",
            "ac",
            SpellingParams.SPELLCHECK_COUNT,
            "2",
            SpellingParams.SPELLCHECK_ONLY_MORE_POPULAR,
            "true"),
        "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='ac']/int[@name='numFound'][.='2']");
  }

  // SOLR-2726
  public void testAnalyzer() {
    Suggester suggester = new Suggester();
    NamedList<Object> params = new NamedList<>();
    params.add("field", "test_field");
    params.add("lookupImpl", "org.apache.solr.spelling.suggest.tst.TSTLookupFactory");
    suggester.init(params, h.getCore());
    assertNotNull(suggester.getQueryAnalyzer());
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<element><![CDATA[ <![CDATA[ not supposed to be nested ]]> ]]></element>


text:
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.IO;
using Google.Cloud.Spanner.V1;
using Xunit;

namespace Google.Cloud.Spanner.Data.Tests
{
    public class ConnectionStringBuilderTests
    {
        //look for "badjuju" for the error in each unit test case.
        [Theory]
        [InlineData("Data Source=badjuju/project1/instances/instance1/databases/database1")]
        [InlineData("Data Source=projects/project1/badjuju/instance1/databases/database1")]
        [InlineData("Data Source=projects/project1/instances/instance1/badjuju/database1")]
        public void BadConnectionStringThrows(string connectionString)
        {
            Assert.Throws<ArgumentException>(
                () =>
                    new SpannerConnectionStringBuilder(connectionString));

            Assert.Throws<ArgumentException>(
                () =>
                    new SpannerConnectionStringBuilder {ConnectionString = connectionString});
        }

        [Theory]
        [InlineData("badjuju/project1/instances/instance1/databases/database1")]
        [InlineData("projects/project1/badjuju/instance1/databases/database1")]
        [InlineData("projects/project1/instances/instance1/badjuju/database1")]
        [InlineData(
            "Data Source=projects/project1/instances/instance1/databases/database1")] //valid *for a connection string*
        public void BadDataSourceThrows(string dataSource)
        {
            Assert.Throws<ArgumentException>(
                () =>
                    new SpannerConnectionStringBuilder
                    {
                        DataSource = dataSource
                    }
            );
        }

        [Fact]
        public void DataSourceParsing()
        {
            var connectionStringBuilder =
                new SpannerConnectionStringBuilder(
                    "Data Source=projects/project1/instances/instance1/databases/database1");
            Assert.Equal("project1", connectionStringBuilder.Project);
            Assert.Equal("instance1", connectionStringBuilder.SpannerInstance);
            Assert.Equal("database1", connectionStringBuilder.SpannerDatabase);
        }

        [Fact]
        public void DataSourceSettableViaProperty()
        {
            var connectionStringBuilder =
                new SpannerConnectionStringBuilder
                {
                    DataSource = "projects/project1/instances/instance1/databases/database1"
                };
            Assert.Equal("project1", connectionStringBuilder.Project);
            Assert.Equal("instance1", connectionStringBuilder.SpannerInstance);
            Assert.Equal("database1", connectionStringBuilder.SpannerDatabase);
        }

        [Fact]
        public void DefaultEndpointIfNotSpecified()
        {
            var connectionStringBuilder = new SpannerConnectionStringBuilder();
            Assert.Equal(SpannerClient.DefaultEndpoint.Host, connectionStringBuilder.Host);
            Assert.Equal(SpannerClient.DefaultEndpoint.Port, connectionStringBuilder.Port);
        }

        [Fact]
        public void EndpointParsing()
        {
            var connectionStringBuilder =
                new SpannerConnectionStringBuilder(
                    "Data Source=projects/project1/instances/instance1/databases/database1;Host=foo;Port=1234");

            Assert.Equal("foo", connectionStringBuilder.Host);
            Assert.Equal(1234, connectionStringBuilder.Port);
        }

        [Fact]
        public void EndPointSettableViaProperty()
        {
            var connectionStringBuilder = new SpannerConnectionStringBuilder
            {
                Host = "foo",
                Port = 1234
            };
            Assert.Equal("foo", connectionStringBuilder.Host);
            Assert.Equal(1234, connectionStringBuilder.Port);
        }

        [Fact]
        public void InstanceOnlyDataSource()
        {
            var connectionStringBuilder =
                new SpannerConnectionStringBuilder("Data Source=projects/project1/instances/instance1");
            Assert.Equal("project1", connectionStringBuilder.Project);
            Assert.Equal("instance1", connectionStringBuilder.SpannerInstance);
            Assert.Null(connectionStringBuilder.SpannerDatabase);
        }

        [Fact]
        public void CredentialFile()
        {
            // ReSharper disable once JoinDeclarationAndInitializer
            string appFolder;
#if NETCOREAPP1_0
            appFolder = AppContext.BaseDirectory;
#else
            appFolder = AppDomain.CurrentDomain.BaseDirectory;
#endif
            string jsonFile = $"{appFolder}{Path.DirectorySeparatorChar}SpannerEF-8dfc036f6000.json";
            Assert.True(File.Exists(jsonFile));
            using (var connection = new SpannerConnection($"CredentialFile={jsonFile}"))
            {
                Assert.NotNull(connection.GetCredentials());
            }
        }

        [Fact]
        public void CredentialFileRelative()
        {
            using (var connection = new SpannerConnection("CredentialFile=SpannerEF-8dfc036f6000.json"))
            {
                Assert.NotNull(connection.GetCredentials());
            }
        }

        [Fact]
        public void CredentialFileP12Error()
        {
            using (var connection = new SpannerConnection("CredentialFile=SpannerEF-8dfc036f6000.p12"))
            {
                Assert.Throws<InvalidOperationException>(() => connection.GetCredentials());
            }
        }

        [Fact]
        public void CredentialFileNotFound()
        {
            using (var connection = new SpannerConnection("CredentialFile=..\\BadFilePath.json"))
            {
                Assert.Throws<FileNotFoundException>(() => connection.GetCredentials());
            }
        }
    }
}


text:
"""Test MNStorage.create() and MNStorage.update() with Resource Map."""
import logging

import pytest
import responses

import d1_common.types
import d1_common.types.exceptions

import django.test

import d1_gmn.app.resource_map
import d1_gmn.tests.gmn_test_case

import d1_test.instance_generator.identifier
import d1_test.instance_generator.random_data

# # Long test
# NUM_CREATE = 1000
# MAX_AGGR_SIZE = 50
# MAX_REDUCE_SIZE = 10
# # 0.2 = 20% chance of creating a resource map
# MAP_CHANCE = 0.2

# Fast test
NUM_CREATE = 100
MAX_AGGR_SIZE = 5
MAX_REDUCE_SIZE = 10
# 0.2 = 20% chance of creating a resource map
MAP_CHANCE = 0.2

class TestCreateResourceMap(d1_gmn.tests.gmn_test_case.GMNTestCase):
    @responses.activate
    @django.test.override_settings(RESOURCE_MAP_CREATE="block")
    def test_1000(self, gmn_client_v2):
        """MNStorage.create(): "block" mode: Creating a resource map after creating its
        aggregated objects is supported."""
        pid_list = self.create_multiple_objects(gmn_client_v2)
        ore_pid = self.create_resource_map(gmn_client_v2, pid_list)
        member_list = d1_gmn.app.resource_map.get_resource_map_members_by_map(ore_pid)
        assert sorted(pid_list) == sorted(member_list)

    @responses.activate
    @django.test.override_settings(RESOURCE_MAP_CREATE="block")
    def test_1010(self, gmn_client_v2):
        """MNStorage.create(): "block" mode: Creating a resource map before creating its
        aggregated objects raises InvalidRequest."""
        pid_list = [
            d1_test.instance_generator.identifier.generate_pid("PID_AGGR_")
            for _ in range(10)
        ]
        with pytest.raises(d1_common.types.exceptions.InvalidRequest):
            self.create_resource_map(gmn_client_v2, pid_list)

    @responses.activate
    @django.test.override_settings(RESOURCE_MAP_CREATE="open")
    def test_1020(self, gmn_client_v2):
        """MNStorage.create(): "open" mode: Creating a resource map after creating its
        aggregated objects is supported."""
        pid_list = self.create_multiple_objects(gmn_client_v2)
        ore_pid = self.create_resource_map(gmn_client_v2, pid_list)
        member_list = d1_gmn.app.resource_map.get_resource_map_members_by_map(ore_pid)
        assert sorted(pid_list) == sorted(member_list)

    @responses.activate
    @django.test.override_settings(RESOURCE_MAP_CREATE="open")
    def test_1030(self, gmn_client_v2):
        """MNStorage.create(): "open" mode: Creating a resource map before creating its
        aggregated objects is supported."""
        pid_list = [
            d1_test.instance_generator.identifier.generate_pid("PID_AGGR_")
            for _ in range(10)
        ]
        ore_pid = self.create_resource_map(gmn_client_v2, pid_list)
        member_list = d1_gmn.app.resource_map.get_resource_map_members_by_map(ore_pid)
        assert sorted(pid_list) == sorted(member_list)

    @responses.activate
    @django.test.override_settings(RESOURCE_MAP_CREATE="open")
    def test_1040(self, gmn_client_v1_v2, none_true):
        """MNStorage.create(): "open" mode: Creating a random series of objects and
        resource maps.

        - Some PIDs aggregated in multiple maps
        - Some maps aggregating each other
        - Maps created both before and after their aggregated PIDs
        - Some maps containing references to themselves

        """
        avail_pid_set = [
            d1_test.instance_generator.identifier.generate_pid()
            for _ in range(NUM_CREATE)
        ]
        uncreated_pid_set = avail_pid_set[:]

        while True:
            pid = d1_test.instance_generator.random_data.random_choice_pop(
                uncreated_pid_set
            )
            aggr_list = d1_test.instance_generator.random_data.random_sized_sample(
                avail_pid_set, 2, max_size=MAX_AGGR_SIZE
            )
            if not uncreated_pid_set or not aggr_list:
                break
            d1_test.instance_generator.random_data.random_sized_sample_pop(
                avail_pid_set, 0, max_size=MAX_REDUCE_SIZE
            )
            is_ore = d1_test.instance_generator.random_data.random_bool_factor(
                MAP_CHANCE
            )
            if is_ore:
                self.create_resource_map(gmn_client_v1_v2, aggr_list, pid)
            else:
                self.create_obj(gmn_client_v1_v2, pid, sid=none_true)
            logging.info(
                "uncreated={} available={} ORE={} aggr_list={}".format(
                    len(uncreated_pid_set), len(avail_pid_set), is_ore, len(aggr_list)
                )
            )


text:
namespace Homework3.Enumerators
{
    public enum DepartmentsType
    {
        Mathematics = 1,
        Economics = 2,
        History = 3,
        Law = 4
    }
}