text:
VizTact is ForceFusion's force-sensitive touch input device develpoment project.
--

redpajama_set_name: RedPajamaGithub


text: <ng-include src="'partials/autogenerated/contribute.html'"> </ng-include>


text:
package debop4k.mongodb.datetime;

import debop4k.core.ToStringHelper;
import debop4k.core.utils.Hashx;
import debop4k.mongodb.AbstractMongoDocument;
import debop4k.timeperiod.models.TimestampZoneText;
import lombok.Getter;
import lombok.Setter;
import org.joda.time.DateTime;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 시계열 정보를 표현하는 MongoDB 용 엔티티.
 *
 * @author sunghyouk.bae@gmail.com
 */
@Document
@Getter
@Setter
public class TimeSeries extends AbstractMongoDocument {

  @Indexed
  private TimestampZoneText time;

  private long score;

  public TimeSeries() {}

  public TimeSeries(DateTime time, long score) {
    this.time = TimestampZoneText.of(time);
    this.score = score;
  }

  @Override
  public int hashCode() {
    return Hashx.compute(time);
  }

  @Override
  public ToStringHelper buildStringHelper() {
    return super.buildStringHelper()
                .add("time", time)
                .add("score", score);
  }

  private static final long serialVersionUID = 2629457149132159294L;
}


text:
=encoding utf8

=head1 NAME

DBD::mysql::INSTALL - How to install and configure DBD::mysql

=head1 SYNOPSIS

  perl Makefile.PL [options]
  make
  make test
  make install

=head1 DESCRIPTION

This document describes the installation and configuration of
DBD::mysql, the Perl DBI driver for the MySQL database. Before
reading on, make sure that you have the prerequisites available:
Perl, MySQL and DBI. For details see the separate section
L</PREREQUISITES>.

Depending on your version of Perl, it might be possible to
use a binary distribution of DBD::mysql. If possible, this is
recommended. Otherwise you need to install from the sources.
If so, you will definitely need a C compiler. Installation
from binaries and sources are both described in separate
sections. L</BINARY INSTALLATION>. L</SOURCE INSTALLATION>.

Finally, if you encounter any problems, do not forget to
read the section on known problems L</KNOWN PROBLEMS>. If
that doesn't help, you should check the section on L</SUPPORT>.

=head1 PREREQUISITES

=over

=item Perl

Preferably a version of Perl, that comes preconfigured with
your system. For example, all Linux and FreeBSD distributions
come with Perl. For Windows, using ActivePerl or Strawberry Perl
is recommended, see L<http://www.activestate.com> and
L<http://www.strawberryperl.com> for details.

=item MySQL

You need not install the actual MySQL database server, the
client files and the development files are sufficient. For
example, Fedora Linux distribution comes with RPM files
(using YUM) B<mysql> and B<mysql-server> (use "yum search"
to find exact package names). These are sufficient, if the MySQL
server is located on a foreign machine.  You may also create client
files by compiling from the MySQL source distribution and using

  configure --without-server

If you are using Windows and need to compile from sources
(which is only the case if you are not using ActivePerl or
Strawberry Perl),
then you must ensure that the header and library files are
installed. This may require choosing a "Custom installation"
and selecting the appropriate option when running the
MySQL setup program.

=item DBI

DBD::mysql is a DBI driver, hence you need DBI. It is available
from the same source where you got the DBD::mysql distribution
from.

=item C compiler

A C compiler is only required if you install from source. In
most cases there are binary distributions of DBD::mysql
available. However, if you need a C compiler, make sure, that
it is the same C compiler that was used for compiling Perl and
MySQL! Otherwise you will almost definitely encounter problems
because of differences in the underlying C runtime libraries.

In the worst case, this might mean to compile Perl and MySQL
yourself. But believe me, experience shows that a lot of problems
are fixed this way.

=item Gzip libraries

Late versions of MySQL come with support for compression. Thus
it B<may> be required that you have install an RPM package like
libz-devel, libgz-devel or something similar.

=back

=head1 BINARY INSTALLATION

Binary installation is possible in the most cases, depending
on your system.

=head2 Windows

=head3 Strawberry Perl

Strawberry Perl comes bundled with DBD::mysql and the needed
client libraries.

=head3 ActiveState Perl

ActivePerl offers a PPM archive of DBD::mysql. All you need to
do is typing in a cmd.exe window:

  ppm install DBD-mysql

This will fetch the module via HTTP and install them. If you
need to use a WWW proxy server, the environment variable
HTTP_proxy must be set:

  set HTTP_proxy=http://myproxy.example.com:8080/
  ppm install DBD-mysql

Of course you need to replace the host name C<myproxy.example.com>
and the port number C<8080> with your local values.

If the above procedure doesn't work, please upgrade to the latest
version of ActivePerl. ActiveState has a policy where it only
provides access free-of-charge for the PPM mirrors of the last
few stable Perl releases. If you have an older perl, you'd either
need to upgrade your perl or contact ActiveState about a subscription.

=head2 Red Hat Enterprise Linux (RHEL), CentOS and Fedora

Red Hat Enterprise Linux, its community derivatives such as
CentOS, and Fedora come with MySQL and DBD::mysql.

Use the following command to install DBD::mysql:

    yum install "perl(DBD::mysql)"

=head2 Debian and Ubuntu

On Debian, Ubuntu and derivatives you can install DBD::mysql from
the repositories with the following command:

    sudo apt-get install libdbd-mysql-perl

=head2 SLES and openSUSE

On SUSE Linux Enterprise and the community version openSUSE, you
can install DBD::mysql from the repositories with the following
command:

    zypper install perl-DBD-mysql

=head2 Other systems

In the case of other Linux or FreeBSD distributions it is very likely
that all you need comes with your distribution.
I just cannot give you names, as I am not using
these systems.

Please let me know if you find the files in your favorite
Linux or FreeBSD distribution so that I can extend the above list.

=head1 SOURCE INSTALLATION

So you need to install from sources. If you are lucky, the Perl
module C<CPAN> will do all for you, thanks to the excellent work
of Andreas König. Otherwise you will need to do a manual
installation.
All of these installation types have their own section:
L</CPAN installation>, L</Manual installation> and L</Configuration>.

The DBD::mysql Makefile.PL needs to know where to find your MySQL
installation. This may be achieved using command line switches
(see L</Configuration>) or automatically using the mysql_config binary
which comes with most MySQL distributions. If your MySQL distribution
contains mysql_config the easiest method is to ensure this binary
is on your path.

Typically, this is the case if you've installed the mysql library
from your systems' package manager.

e.g.

  PATH=$PATH:/usr/local/mysql/bin
  export PATH

As stated, to compile DBD::mysql you'll need a C compiler. This should
be the same compiler as the one used to build perl AND the mysql client
libraries. If you're on linux, this is most typically the case and you
need not worry. If you're on UNIX systems, you might want to pay
attention.

Also you'll need to get the MySQL client and development headers on
your system. The easiest is to get these from your package manager.

To run the tests that ship with the module, you'll need access to a
running MySQL server. This can be running on localhost, but it can also
be on a remote machine.

On Fedora the process is as follows. Please note that Fedora actually
ships with MariaDB but not with MySQL. This is not a problem, it
will work just as well.
In this example we install and start a local server for running the
tests against.

    yum -y install make gcc mariadb-devel mariadb-libs mariadb-server
    yum -y install "perl(Test::Deep)" "perl(Test::More)"
    systemctl start mariadb.service

=head2 Environment Variables

For ease of use, you can set environment variables for
DBD::mysql installation. You can set any or all of the options, and
export them by putting them in your .bashrc or the like:

    export DBD_MYSQL_CFLAGS=-I/usr/local/mysql/include/mysql
    export DBD_MYSQL_LIBS="-L/usr/local/mysql/lib/mysql -lmysqlclient"
    export DBD_MYSQL_EMBEDDED=
    export DBD_MYSQL_CONFIG=mysql_config
    export DBD_MYSQL_NOCATCHSTDERR=0
    export DBD_MYSQL_NOFOUNDROWS=0
    export DBD_MYSQL_SSL=
    export DBD_MYSQL_TESTDB=test
    export DBD_MYSQL_TESTHOST=localhost
    export DBD_MYSQL_TESTPASSWORD=s3kr1+
    export DBD_MYSQL_TESTPORT=3306
    export DBD_MYSQL_TESTUSER=me

The most useful may be the host, database, port, socket, user, and password.

Installation will first look to your mysql_config, and then your
environment variables, and then it will guess with intelligent defaults.

=head2 CPAN installation

Installation of DBD::mysql can be incredibly easy:

  cpan DBD::mysql

Please note that this will only work if the prerequisites are
fulfilled, which means you have a C-compiler installed, and you
have the development headers and mysql client libraries available
on your system.

If you are using the CPAN module for the first time, just answer
the questions by accepting the defaults which are fine in most
cases.

If you cannot get the CPAN module working, you might try manual
installation. If installation with CPAN fails because the your local
settings have been guessed wrong, you need to ensure MySQL's
mysql_config is on your path (see L</SOURCE INSTALLATION>) or
alternatively create a script called C<mysql_config>. This is
described in more details later. L</Configuration>.

=head2 Manual installation

For a manual installation you need to fetch the DBD::mysql
source distribution. The latest version is always available
from

  https://metacpan.org/module/DBD::mysql

The name is typically something like

  DBD-mysql-4.025.tar.gz

The archive needs to be extracted. On Windows you may use a tool
like 7-zip, on *nix you type

  tar xf DBD-mysql-4.025.tar.gz

This will create a subdirectory DBD-mysql-4.025. Enter this
subdirectory and type

  perl Makefile.PL
  make
  make test

(On Windows you may need to replace "make" with "dmake" or
"nmake".) If the tests seem to look fine, you may continue with

  make install

If the compilation (make) or tests fail, you might need to
configure some settings.

For example you might choose a different database, the C
compiler or the linker might need some flags. L</Configuration>.
L</Compiler flags>. L</Linker flags>.

For Cygwin there is a special section below.
L</Cygwin>.

=head2 Configuration

The install script "Makefile.PL" can be configured via a lot of
switches. All switches can be used on the command line. For
example, the test database:

  perl Makefile.PL --testdb=<db>

If you do not like configuring these switches on the command
line, you may alternatively create a script called C<mysql_config>.
This is described later on.

Available switches are:

=over

=item testdb

Name of the test database, defaults to B<test>.

=item testuser

Name of the test user, defaults to empty. If the name is empty,
then the currently logged in users name will be used.

=item testpassword

Password of the test user, defaults to empty.

=item testhost

Host name or IP number of the test database; defaults to localhost.

=item testport

Port number of the test database

=item ps-protcol=1 or 0

Whether to run the test suite using server prepared statements or driver
emulated prepared statements. ps-protocol=1 means use server prepare,
ps-protocol=0 means driver emulated.

=item cflags

This is a list of flags that you want to give to the C compiler.
The most important flag is the location of the MySQL header files.
For example, on Red Hat Linux the header files are in /usr/include/mysql
and you might try

  -I/usr/include/mysql

On Windows the header files may be in C:\mysql\include and you might try

  -IC:\mysql\include

The default flags are determined by running

  mysql_config --cflags

More details on the C compiler flags can be found in the following
section. L</Compiler flags>.

=item libs

This is a list of flags that you want to give to the linker
or loader. The most important flags are the locations and names
of additional libraries. For example, on Red Hat Linux your
MySQL client libraries are in /usr/lib/mysql and you might try

  -L/usr/lib/mysql -lmysqlclient -lz

On Windows the libraries may be in C:\mysql\lib and

  -LC:\mysql\lib -lmysqlclient

might be a good choice. The default flags are determined by running

  mysql_config --libs

More details on the linker flags can be found in a separate section.
L<Linker flags>.

=back

If a switch is not present on the command line, then the
script C<mysql_config> will be executed. This script comes
as part of the MySQL distribution. For example, to determine
the C compiler flags, we are executing

  mysql_config --cflags
  mysql_config --libs

If you want to configure your own settings for database name,
database user and so on, then you have to create a script with
the same name, that replies

=head2 Compiler flags

Note: the following info about compiler and linker flags, you shouldn't have
to use these options because Makefile.PL is pretty good at utilizing
mysql_config to get the flags that you need for a successful compile.

It is typically not so difficult to determine the appropriate
flags for the C compiler. The linker flags, which you find in
the next section, are another story.

The determination of the C compiler flags is usually left to
a configuration script called F<mysql_config>, which can be
invoked with

  mysql_config --cflags

When doing so, it will emit a line with suggested C compiler
flags, for example like this:

  -L/usr/include/mysql

The C compiler must find some header files. Header files have
the extension C<.h>. MySQL header files are, for example,
F<mysql.h> and F<mysql_version.h>. In most cases the header
files are not installed by default. For example, on Windows
it is an installation option of the MySQL setup program
(Custom installation), whether the header files are installed
or not. On Red Hat Linux, you need to install an RPM archive
F<mysql-devel> or F<MySQL-devel>.

If you know the location of the header files, then you will
need to add an option

  -L<header directory>

to the C compiler flags, for example C<-L/usr/include/mysql>.

=head2 Linker flags

Appropriate linker flags are the most common source of problems
while installing DBD::mysql. I will only give a rough overview,
you'll find more details in the troubleshooting section.
L</KNOWN PROBLEMS>

The determination of the C compiler flags is usually left to
a configuration script called F<mysql_config>, which can be
invoked with

  mysql_config --libs

When doing so, it will emit a line with suggested C compiler
flags, for example like this:

   -L'/usr/lib/mysql' -lmysqlclient -lnsl -lm -lz -lcrypt

The following items typically need to be configured for the
linker:

=over

=item The mysqlclient library

The MySQL client library comes as part of the MySQL distribution.
Depending on your system it may be a file called

  F<libmysqlclient.a>   statically linked library, Unix
  F<libmysqlclient.so>  dynamically linked library, Unix
  F<mysqlclient.lib>    statically linked library, Windows
  F<mysqlclient.dll>    dynamically linked library, Windows

or something similar.

As in the case of the header files, the client library is typically
not installed by default. On Windows you will need to select them
while running the MySQL setup program (Custom installation). On
Red Hat Linux an RPM archive F<mysql-devel> or F<MySQL-devel> must
be installed.

The linker needs to know the location and name of the mysqlclient
library. This can be done by adding the flags

  -L<lib directory> -lmysqlclient

or by adding the complete path name. Examples:

  -L/usr/lib/mysql -lmysqlclient
  -LC:\mysql\lib -lmysqlclient

If you would like to use the static libraries (and there are
excellent reasons to do so), you need to create a separate
directory, copy the static libraries to that place and use
the -L switch above to point to your new directory. For example:

  mkdir /tmp/mysql-static
  cp /usr/lib/mysql/*.a /tmp/mysql-static
  perl Makefile.PL --libs="-L/tmp/mysql-static -lmysqlclient"
  make
  make test
  make install
  rm -rf /tmp/mysql-static

=item The gzip library

The MySQL client can use compression when talking to the MySQL
server, a nice feature when sending or receiving large texts over
a slow network.

On Unix you typically find the appropriate file name by running

  ldconfig -p | grep libz
  ldconfig -p | grep libgz

Once you know the name (libz.a or libgz.a is best), just add it
to the list of linker flags. If this seems to be causing problem
you may also try to link without gzip libraries.

=back

=head1 MARIADB NATIVE CLIENT INSTALLATION

The MariaDB native client is another option for connecting to a MySQL·
database licensed LGPL 2.1. To build DBD::mysql against this client, you
will first need to build the client. Generally, this is done with
the following:

  cd path/to/src/mariadb-native-client
  cmake -G "Unix Makefiles'
  make
  sudo make install

Once the client is built and installed, you can build DBD::mysql against
it:

  perl Makefile.PL --testuser=xxx --testpassword=xxx --testsocket=/path/to//mysqld.sock --mysql_config=/usr/local/bin/mariadb_config·
  make
  make test
  make install

=head1 SPECIAL SYSTEMS

Below you find information on particular systems:

=head2 Mac OS X

Please see the the post at
L<https://discussions.apple.com/thread/3932531>

(Thanks to Kris Davey for pointing this out to me). I plan to see if I can get the build process
to be more intelligent about using build flags that work. It is very difficult as it's
not a driver problem per se but a problem in how one builds DBD::mysql with a binary client lib
built on a different compiler than the one the user is using.

Quite simply, using the binary MySQL installation from Oracle, you will need to first run:

  perl Makefile.PL --mysql_config=/usr/local/mysql-5.6.16-osx10.7-x86_64/bin/mysql_config

There are some runtime issues you may encounter with OS X. Upon
running make test, you might encounter the error:

  Error:  Can't load '/Users/username/DBD-mysql/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/username/DBD-mysql/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Library not loaded: libmysqlclient.18.dylib

To solve this issue, you need to set the library path, similar to LD_LIBRARY_PATH on other Unix variants, buit on OS X you need to do the following (this is for a binary install of MySQL from Oracle)

  export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/mysql-5.6.16-osx10.7-x86_64/lib/

=head2 Cygwin

If you are a user of Cygwin you already
know, it contains a nicely running perl 5.6.1, installation of
additional modules usually works like a charm via the standard
procedure of

    perl makefile.PL
    make
    make test
    make install

The Windows binary distribution of MySQL runs smoothly under Cygwin.
You can start/stop the server and use all Windows clients without problem.
But to install DBD::mysql you have to take a little special action.

Don't attempt to build DBD::mysql against either the MySQL Windows or
Linux/Unix BINARY distributions: neither will work!

You MUST compile the MySQL clients yourself under Cygwin, to get a
'libmysqlclient.a' compiled under Cygwin. Really! You'll only need
that library and the header files, you don't need any other client parts.
Continue to use the Windows binaries. And don't attempt (currently) to
build the MySQL Server part, it is unnecessary, as MySQL AB does an
excellent job to deliver optimized binaries for the mainstream
operating systems, and it is told, that the server compiled under Cygwin is
unstable.

Install a MySQL server for testing against. You can install the regular
Windows MySQL server package on your Windows machine, or you can also
test against a MySQL server on a remote host.

=head3 Build MySQL clients under Cygwin:

download the MySQL LINUX source from
L<http://www.mysql.com/downloads/index.html>,
unpack mysql-<version>.tar.gz into some tmp location and from this directory
run configure:

  ./configure --prefix=/usr/local/mysql --without-server

This prepares the Makefile with the installed Cygwin features. It
takes some time, but should finish without error. The 'prefix', as
given, installs the whole Cygwin/MySQL thingy into a location not
normally in your PATH, so that you continue to use already installed
Windows binaries. The --without-server parameter tells configure to
only build the clients.

  make

This builds all MySQL client parts ... be patient. It should finish
finally without any error.

  make install

This installs the compiled client files under /usr/local/mysql/.
Remember, you don't need anything except the library under
/usr/local/mysql/lib and the headers under /usr/local/mysql/include!

Essentially you are now done with this part. If you want, you may try
your compiled binaries shortly; for that, do:

  cd /usr/local/mysql/bin
  ./mysql -h 127.0.0.1

The host (-h) parameter 127.0.0.1 targets the local host, but forces
the mysql client to use a TCP/IP connection. The default would be a
pipe/socket connection (even if you say '-h localhost') and this
doesn't work between Cygwin and Windows (as far as I know).

If you have your MySQL server running on some other box, then please
substitute '127.0.0.1' with the name or IP-number of that box.

Please note, in my environment the 'mysql' client did not accept a
simple RETURN, I had to use CTRL-RETURN to send commands
... strange,
but I didn't attempt to fix that, as we are only interested in the
built lib and headers.

At the 'mysql>' prompt do a quick check:

  mysql> use mysql
  mysql> show tables;
  mysql> select * from db;
  mysql> exit

You are now ready to build DBD::mysql!

=head3 compile DBD::mysql

download and extract DBD-mysql-<version>.tar.gz from CPAN

cd into unpacked dir DBD-mysql-<version>
you probably did that already, if you are reading this!

  cp /usr/local/mysql/bin/mysql_config .

This copies the executable script mentioned in the DBD::mysql docs
from your just built Cywin/MySQL client directory; it knows about
your Cygwin installation, especially about the right libraries to link
with.

  perl Makefile.PL --testhost=127.0.0.1

The --testhost=127.0.0.1 parameter again forces a TCP/IP connection
to the MySQL server on the local host instead of a pipe/socket
connection for the 'make test' phase.

  make

This should run without error

  make test
  make install

This installs DBD::mysql into the Perl hierarchy.

=head1 KNOWN PROBLEMS

=head2 no gzip on your system

Some Linux distributions don't come with a gzip library by default.
Running "make" terminates with an error message like

  LD_RUN_PATH="/usr/lib/mysql:/lib:/usr/lib" gcc
    -o blib/arch/auto/DBD/mysql/mysql.so  -shared
    -L/usr/local/lib dbdimp.o mysql.o -L/usr/lib/mysql
    -lmysqlclient -lm -L/usr/lib/gcc-lib/i386-redhat-linux/2.96
    -lgcc -lz
  /usr/bin/ld: cannot find -lz
  collect2: ld returned 1 exit status
  make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1

If this is the case for you, install an RPM archive like
libz-devel, libgz-devel, zlib-devel or gzlib-devel or something
similar.

=head2 different compiler for mysql and perl

If Perl was compiled with gcc or egcs, but MySQL was compiled
with another compiler or on another system, an error message like
this is very likely when running "Make test":

  t/00base............install_driver(mysql) failed: Can't load
  '../blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql:
  ../blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: _umoddi3
  at /usr/local/perl-5.005/lib/5.005/i586-linux-thread/DynaLoader.pm
  line 168.

This means, that your linker doesn't include libgcc.a. You have
the following options:

The solution is telling the linker to use libgcc. Run

  gcc --print-libgcc-file

to determine the exact location of libgcc.a or for older versions
of gcc

  gcc -v

to determine the directory. If you know the directory, add a

  -L<directory> -lgcc

to the list of C compiler flags. L</Configuration>. L</Linker flags>.

=head1 SUPPORT

Finally, if everything else fails, you are not alone. First of
all, for an immediate answer, you should look into the archives
of the dbi-users mailing list, which is available at
L<http://groups.google.com/group/perl.dbi.users?hl=en&lr=>

To subscribe to this list, send and email to

    dbi-users-subscribe@perl.org

If you don't find an appropriate posting and reply in the
mailing list, please post a question. Typically a reply will
be seen within one or two days.


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information
namespace DotNetNuke.UI.WebControls
{
    using System;
    using System.Globalization;
    using System.Web.UI;

    using DotNetNuke.Services.Localization;

    /// -----------------------------------------------------------------------------
    /// Project:    DotNetNuke
    /// Namespace:  DotNetNuke.UI.WebControls
    /// Class:      EnumEditControl
    /// -----------------------------------------------------------------------------
    /// <summary>
    /// The EnumEditControl control provides a standard UI component for editing
    /// enumerated properties.
    /// </summary>
    /// -----------------------------------------------------------------------------
    [ToolboxData("<{0}:EnumEditControl runat=server></{0}:EnumEditControl>")]
    public class EnumEditControl : EditControl
    {
        private readonly Type EnumType;

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="EnumEditControl"/> class.
        /// Constructs an EnumEditControl.
        /// </summary>
        /// -----------------------------------------------------------------------------
        public EnumEditControl()
        {
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="EnumEditControl"/> class.
        /// Constructs an EnumEditControl.
        /// </summary>
        /// -----------------------------------------------------------------------------
        public EnumEditControl(string type)
        {
            this.SystemType = type;
            this.EnumType = Type.GetType(type);
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Gets or sets stringValue is the value of the control expressed as a String.
        /// </summary>
        /// <value>A string representing the Value.</value>
        /// -----------------------------------------------------------------------------
        protected override string StringValue
        {
            get
            {
                var retValue = Convert.ToInt32(this.Value);
                return retValue.ToString(CultureInfo.InvariantCulture);
            }

            set
            {
                int setValue = int.Parse(value);
                this.Value = setValue;
            }
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// OnDataChanged runs when the PostbackData has changed.  It raises the ValueChanged
        /// Event.
        /// </summary>
        /// -----------------------------------------------------------------------------
        protected override void OnDataChanged(EventArgs e)
        {
            int intValue = Convert.ToInt32(this.Value);
            int intOldValue = Convert.ToInt32(this.OldValue);

            var args = new PropertyEditorEventArgs(this.Name)
            { Value = Enum.ToObject(this.EnumType, intValue), OldValue = Enum.ToObject(this.EnumType, intOldValue) };

            this.OnValueChanged(args);
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// RenderEditMode renders the Edit mode of the control.
        /// </summary>
        /// <param name="writer">A HtmlTextWriter.</param>
        /// -----------------------------------------------------------------------------
        protected override void RenderEditMode(HtmlTextWriter writer)
        {
            int propValue = Convert.ToInt32(this.Value);
            Array enumValues = Enum.GetValues(this.EnumType);

            // Render the Select Tag
            this.ControlStyle.AddAttributesToRender(writer);
            writer.AddAttribute(HtmlTextWriterAttribute.Type, "text");
            writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID);
            writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID);
            writer.RenderBeginTag(HtmlTextWriterTag.Select);

            for (int I = 0; I <= enumValues.Length - 1; I++)
            {
                int enumValue = Convert.ToInt32(enumValues.GetValue(I));
                string enumName = Enum.GetName(this.EnumType, enumValue);
                enumName = Localization.GetString(enumName, this.LocalResourceFile);

                // Add the Value Attribute
                writer.AddAttribute(HtmlTextWriterAttribute.Value, enumValue.ToString(CultureInfo.InvariantCulture));

                if (enumValue == propValue)
                {
                    // Add the Selected Attribute
                    writer.AddAttribute(HtmlTextWriterAttribute.Selected, "selected");
                }

                // Render Option Tag
                writer.RenderBeginTag(HtmlTextWriterTag.Option);
                writer.Write(enumName);
                writer.RenderEndTag();
            }

            // Close Select Tag
            writer.RenderEndTag();
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// RenderViewMode renders the View (readonly) mode of the control.
        /// </summary>
        /// <param name="writer">A HtmlTextWriter.</param>
        /// -----------------------------------------------------------------------------
        protected override void RenderViewMode(HtmlTextWriter writer)
        {
            int propValue = Convert.ToInt32(this.Value);
            string enumValue = Enum.Format(this.EnumType, propValue, "G");

            this.ControlStyle.AddAttributesToRender(writer);
            writer.RenderBeginTag(HtmlTextWriterTag.Span);
            writer.Write(enumValue);
            writer.RenderEndTag();
        }
    }
}


text:
home="$(cd "$(dirname $0)"; pwd)"

java -jar ${agent_opts} -Dskywalking.statuscheck.max_recursive_depth=2 -Dskywalking.statuscheck.ignored_exceptions=test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestListedException ${home}/../libs/exception-checker-spring-scenario.jar &


text:
package javax.mail;

import java.io.InvalidObjectException;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.util.Date;
import javax.mail.search.SearchTerm;

/**
 * @version $Rev$ $Date$
 */
public abstract class Message implements Part {
    /**
     * Enumeration of types of recipients allowed by the Message class.
     */
    public static class RecipientType implements Serializable {
        /**
         * A "To" or primary recipient.
         */
        public static final RecipientType TO = new RecipientType("To");
        /**
         * A "Cc" or carbon-copy recipient.
         */
        public static final RecipientType CC = new RecipientType("Cc");
        /**
         * A "Bcc" or blind carbon-copy recipient.
         */
        public static final RecipientType BCC = new RecipientType("Bcc");
        protected String type;

        protected RecipientType(String type) {
            this.type = type;
        }

        protected Object readResolve() throws ObjectStreamException {
            if (type.equals("To")) {
                return TO;
            } else if (type.equals("Cc")) {
                return CC;
            } else if (type.equals("Bcc")) {
                return BCC;
            } else {
                throw new InvalidObjectException("Invalid RecipientType: " + type);
            }
        }

        public String toString() {
            return type;
        }
    }

    /**
     * The index of a message within its folder, or zero if the message was not retrieved from a folder.
     */
    protected int msgnum;
    /**
     * True if this message has been expunged from the Store.
     */
    protected boolean expunged;
    /**
     * The {@link Folder} that contains this message, or null if it was not obtained from a folder.
     */
    protected Folder folder;
    /**
     * The {@link Session} associated with this message.
     */
    protected Session session;

    /**
     * Default constructor.
     */
    protected Message() {
    }

    /**
     * Constructor initializing folder and message msgnum; intended to be used by implementations of Folder.
     *
     * @param folder the folder that contains the message
     * @param msgnum the message index within the folder
     */
    protected Message(Folder folder, int msgnum) {
        this.folder = folder;
        this.msgnum = msgnum;
        // make sure we copy the session information from the folder.
        this.session = folder.getStore().getSession();
    }

    /**
     * Constructor initializing the session; intended to by used by client created instances.
     *
     * @param session the session associated with this message
     */
    protected Message(Session session) {
        this.session = session;
    }

    /**
     * Return the "From" header indicating the identity of the person the message is from;
     * in some circumstances this may be different than the actual sender.
     *
     * @return a list of addresses this message is from; may be empty if the header is present but empty, or null
     *         if the header is not present
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract Address[] getFrom() throws MessagingException;

    /**
     * Set the "From" header for this message to the value of the "mail.user" property,
     * or if that property is not set, to the value of the system property "user.name"
     *
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract void setFrom() throws MessagingException;

    /**
     * Set the "From" header to the supplied address.
     *
     * @param address the address of the person the message is from
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract void setFrom(Address address) throws MessagingException;

    /**
     * Add multiple addresses to the "From" header.
     *
     * @param addresses the addresses to add
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract void addFrom(Address[] addresses) throws MessagingException;

    /**
     * Get all recipients of the given type.
     *
     * @param type the type of recipient to get
     * @return a list of addresses; may be empty if the header is present but empty,
     *         or null if the header is not present
     * @throws MessagingException if there was a problem accessing the Store
     * @see RecipientType
     */
    public abstract Address[] getRecipients(RecipientType type) throws MessagingException;

    /**
     * Get all recipients of this message.
     * The default implementation extracts the To, Cc, and Bcc recipients using {@link #getRecipients(javax.mail.Message.RecipientType)}
     * and then concatentates the results into a single array; it returns null if no headers are defined.
     *
     * @return an array containing all recipients
     * @throws MessagingException if there was a problem accessing the Store
     */
    public Address[] getAllRecipients() throws MessagingException {
        Address[] to = getRecipients(RecipientType.TO);
        Address[] cc = getRecipients(RecipientType.CC);
        Address[] bcc = getRecipients(RecipientType.BCC);
        if (to == null && cc == null && bcc == null) {
            return null;
        }
        int length = (to != null ? to.length : 0) + (cc != null ? cc.length : 0) + (bcc != null ? bcc.length : 0);
        Address[] result = new Address[length];
        int j = 0;
        if (to != null) {
            for (int i = 0; i < to.length; i++) {
                result[j++] = to[i];
            }
        }
        if (cc != null) {
            for (int i = 0; i < cc.length; i++) {
                result[j++] = cc[i];
            }
        }
        if (bcc != null) {
            for (int i = 0; i < bcc.length; i++) {
                result[j++] = bcc[i];
            }
        }
        return result;
    }

    /**
     * Set the list of recipients for the specified type.
     *
     * @param type      the type of recipient
     * @param addresses the new addresses
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract void setRecipients(RecipientType type, Address[] addresses) throws MessagingException;

    /**
     * Set the list of recipients for the specified type to a single address.
     *
     * @param type    the type of recipient
     * @param address the new address
     * @throws MessagingException if there was a problem accessing the Store
     */
    public void setRecipient(RecipientType type, Address address) throws MessagingException {
        setRecipients(type, new Address[]{address});
    }

    /**
     * Add recipents of a specified type.
     *
     * @param type      the type of recipient
     * @param addresses the addresses to add
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract void addRecipients(RecipientType type, Address[] addresses) throws MessagingException;

    /**
     * Add a recipent of a specified type.
     *
     * @param type    the type of recipient
     * @param address the address to add
     * @throws MessagingException if there was a problem accessing the Store
     */
    public void addRecipient(RecipientType type, Address address) throws MessagingException {
        addRecipients(type, new Address[]{address});
    }

    /**
     * Get the addresses to which replies should be directed.
     *

     * As the most common behavior is to return to sender, the default implementation
     * simply calls {@link #getFrom()}.
     *
     * @return a list of addresses to which replies should be directed
     * @throws MessagingException if there was a problem accessing the Store
     */
    public Address[] getReplyTo() throws MessagingException {
        return getFrom();
    }

    /**
     * Set the addresses to which replies should be directed.
     *

     * The default implementation throws a MethodNotSupportedException.
     *
     * @param addresses to which replies should be directed
     * @throws MessagingException if there was a problem accessing the Store
     */
    public void setReplyTo(Address[] addresses) throws MessagingException {
        throw new MethodNotSupportedException("setReplyTo not supported");
    }

    /**
     * Get the subject for this message.
     *
     * @return the subject
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract String getSubject() throws MessagingException;

    /**
     * Set the subject of this message
     *
     * @param subject the subject
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract void setSubject(String subject) throws MessagingException;

    /**
     * Return the date that this message was sent.
     *
     * @return the date this message was sent
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract Date getSentDate() throws MessagingException;

    /**
     * Set the date this message was sent.
     *
     * @param sent the date when this message was sent
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract void setSentDate(Date sent) throws MessagingException;

    /**
     * Return the date this message was received.
     *
     * @return the date this message was received
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract Date getReceivedDate() throws MessagingException;

    /**
     * Return a copy the flags associated with this message.
     *
     * @return a copy of the flags for this message
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract Flags getFlags() throws MessagingException;

    /**
     * Check whether the supplied flag is set.
     * The default implementation checks the flags returned by {@link #getFlags()}.
     *
     * @param flag the flags to check for
     * @return true if the flags is set
     * @throws MessagingException if there was a problem accessing the Store
     */
    public boolean isSet(Flags.Flag flag) throws MessagingException {
        return getFlags().contains(flag);
    }

    /**
     * Set the flags specified to the supplied value; flags not included in the
     * supplied {@link Flags} parameter are not affected.
     *
     * @param flags the flags to modify
     * @param set   the new value of those flags
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract void setFlags(Flags flags, boolean set) throws MessagingException;

    /**
     * Set a flag to the supplied value.
     * The default implmentation uses {@link #setFlags(Flags, boolean)}.
     *
     * @param flag the flag to set
     * @param set  the value for that flag
     * @throws MessagingException if there was a problem accessing the Store
     */
    public void setFlag(Flags.Flag flag, boolean set) throws MessagingException {
        setFlags(new Flags(flag), set);
    }

    /**
     * Return the message number for this Message.
     * This number refers to the relative position of this message in a Folder; the message
     * number for any given message can change during a session if the Folder is expunged.
     * Message numbers for messages in a folder start at one; the value zero indicates that
     * this message does not belong to a folder.
     *
     * @return the message number
     */
    public int getMessageNumber() {
        return msgnum;
    }

    /**
     * Set the message number for this Message.
     * This must be invoked by implementation classes when the message number changes.
     *
     * @param number the new message number
     */
    protected void setMessageNumber(int number) {
        msgnum = number;
    }

    /**
     * Return the folder containing this message. If this is a new or nested message
     * then this method returns null.
     *
     * @return the folder containing this message
     */
    public Folder getFolder() {
        return folder;
    }

    /**
     * Checks to see if this message has been expunged. If true, all methods other than
     * {@link #getMessageNumber()} are invalid.
     *
     * @return true if this method has been expunged
     */
    public boolean isExpunged() {
        return expunged;
    }

    /**
     * Set the expunged flag for this message.
     *
     * @param expunged true if this message has been expunged
     */
    protected void setExpunged(boolean expunged) {
        this.expunged = expunged;
    }

    /**
     * Create a new message suitable as a reply to this message with all headers set
     * up appropriately. The message body will be empty.
     *

     * if replyToAll is set then the new message will be addressed to all recipients
     * of this message; otherwise the reply will be addressed only to the sender as
     * returned by {@link #getReplyTo()}.
     *

     * The subject field will be initialized with the subject field from the orginal
     * message; the text "Re:" will be prepended unless it is already present.
     *
     * @param replyToAll if true, indciates the message should be addressed to all recipients not just the sender
     * @return a new message suitable as a reply to this message
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract Message reply(boolean replyToAll) throws MessagingException;

    /**
     * To ensure changes are saved to the Store, this message should be invoked
     * before its containing Folder is closed. Implementations may save modifications
     * immediately but are free to defer such updates to they may be sent to the server
     * in one batch; if saveChanges is not called then such changes may not be made
     * permanent.
     *
     * @throws MessagingException if there was a problem accessing the Store
     */
    public abstract void saveChanges() throws MessagingException;

    /**
     * Apply the specified search criteria to this message
     *
     * @param term the search criteria
     * @return true if this message matches the search criteria.
     * @throws MessagingException if there was a problem accessing the Store
     */
    public boolean match(SearchTerm term) throws MessagingException {
        return term.match(this);
    }
}


text:
package org.apache.kudu.spark.tools

import org.apache.kudu.Type
import org.apache.kudu.client.KuduPartitioner
import org.apache.kudu.spark.kudu.KuduTestSuite
import org.apache.kudu.test.RandomUtils
import org.apache.kudu.util.DecimalUtil
import org.apache.kudu.util.SchemaGenerator
import org.apache.kudu.spark.kudu.SparkListenerUtil.withJobTaskCounter
import org.apache.spark.rdd.RDD
import org.apache.spark.sql.Row
import org.junit.Test
import org.junit.Assert.assertEquals
import org.slf4j.Logger
import org.slf4j.LoggerFactory

class DistributedDataGeneratorTest extends KuduTestSuite {
  val log: Logger = LoggerFactory.getLogger(getClass)

  private val generator = new SchemaGenerator.SchemaGeneratorBuilder()
    .random(RandomUtils.getRandom)
    // These types don't have enough values to prevent collisions.
    .excludeTypes(Type.BOOL, Type.INT8)
    // Ensure decimals have enough values to prevent collisions.
    .precisionRange(DecimalUtil.MAX_DECIMAL32_PRECISION, DecimalUtil.MAX_DECIMAL_PRECISION)
    .build()

  private val randomTableName: String = "random-table"

  @Test
  def testGenerateRandomData() {
    val numRows = 100
    val args = Array(
      s"--num-rows=$numRows",
      "--num-tasks=10",
      "--type=random",
      randomTableName,
      harness.getMasterAddressesAsString)
    val (metrics, rdd) = runGeneratorTest(args)
    val (rowsWritten, collisions) = (metrics.rowsWritten.value, metrics.collisions.value)
    // Collisions may cause the number of rows written to be less than the number generated.
    assertEquals(rowsWritten, rdd.collect.length.toLong)
    assertEquals(numRows, rowsWritten + collisions)
  }

  @Test
  def testGenerateSequentialData() {
    val numRows = 100
    val args = Array(
      s"--num-rows=$numRows",
      "--num-tasks=10",
      "--type=sequential",
      randomTableName,
      harness.getMasterAddressesAsString)
    val (metrics, rdd) = runGeneratorTest(args)
    val (rowsWritten, collisions) = (metrics.rowsWritten.value, metrics.collisions.value)
    assertEquals(numRows.toLong, rowsWritten)
    assertEquals(numRows, rdd.collect.length)
    assertEquals(0L, collisions)
  }

  @Test
  def testRepartitionData() {
    val numRows = 100
    val args = Array(
      s"--num-rows=$numRows",
      "--num-tasks=10",
      "--type=sequential",
      "--repartition=true",
      randomTableName,
      harness.getMasterAddressesAsString)
    val (metrics, rdd) = runGeneratorTest(args)
    val (rowsWritten, collisions) = (metrics.rowsWritten.value, metrics.collisions.value)
    assertEquals(numRows.toLong, rowsWritten)
    assertEquals(numRows, rdd.collect.length)
    assertEquals(0L, collisions)
  }

  @Test
  def testNumTasks() {
    val numTasks = 8
    val numRows = 100
    val args = Array(
      s"--num-rows=$numRows",
      s"--num-tasks=$numTasks",
      randomTableName,
      harness.getMasterAddressesAsString)

    // count the number of tasks that end.
    val actualNumTasks = withJobTaskCounter(ss.sparkContext) { () =>
      runGeneratorTest(args)
    }
    assertEquals(numTasks, actualNumTasks)
  }

  @Test
  def testNumTasksRepartition(): Unit = {
    val numTasks = 8
    val numRows = 100
    val args = Array(
      s"--num-rows=$numRows",
      s"--num-tasks=$numTasks",
      "--repartition=true",
      randomTableName,
      harness.getMasterAddressesAsString)

    // count the number of tasks that end.
    val actualNumTasks = withJobTaskCounter(ss.sparkContext) { () =>
      runGeneratorTest(args)
    }

    val table = kuduContext.syncClient.openTable(randomTableName)
    val numPartitions = new KuduPartitioner.KuduPartitionerBuilder(table).build().numPartitions()

    // We expect the number of tasks to be equal to numTasks + numPartitions because numTasks tasks
    // are run to generate the data then we repartition the data to match the table partitioning
    // and numPartitions tasks load the data.
    assertEquals(numTasks + numPartitions, actualNumTasks)
  }

  def runGeneratorTest(args: Array[String]): (GeneratorMetrics, RDD[Row]) = {
    val schema = generator.randomSchema()
    val options = generator.randomCreateTableOptions(schema)
    kuduClient.createTable(randomTableName, schema, options)
    val metrics = DistributedDataGenerator.testMain(args, ss)
    (metrics, kuduContext.kuduRDD(ss.sparkContext, randomTableName))
  }
}


text:
<?php

declare(strict_types=1);

namespace WoohooLabs\Worm\Model\Relationship;

use WoohooLabs\Worm\Execution\IdentityMap;

class BelongsToManyRelationship extends BelongsToOneRelationship
{
    public function matchRelationship(
        array $entities,
        string $relationshipName,
        array $relatedEntities,
        IdentityMap $identityMap
    ): array {
        return $this->insertManyRelationship(
            $entities,
            $relationshipName,
            $relatedEntities,
            $this->referencedKey,
            $this->foreignKey,
            $identityMap
        );
    }

    public function addRelationshipToIdentityMap(
        IdentityMap $identityMap,
        string $relationshipName,
        array $parentEntity
    ): void {
        $this->addManyToEntityMap($identityMap, $relationshipName, $parentEntity, $parentEntity[$relationshipName]);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2011 - 2015 Metamarkets Group Inc.
  ~
  ~ 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.
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.metamx</groupId>
        <artifactId>oss-parent</artifactId>
        <version>1</version>
    </parent>

    <artifactId>extendedset</artifactId>
    <version>1.4.3-SNAPSHOT</version>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>
        Implementation of CONCISE (COmpressed 'N" Composable Integer SEt) bit map compression algorithm by Alessandro
        Colantonio with some enhanced features - http://ricerca.mat.uniroma3.it/users/colanton/docs/concise.pdf
    </description>
    <url>https://github.com/metamx/extendedset</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Metamarkets Open Source Team</name>
            <email>oss@metamarkets.com</email>
            <organization>Metamarkets Group Inc.</organization>
            <organizationUrl>https://www.metamarkets.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:ssh://git://github.com/metamx/extendedset.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/metamx/extendedset.git</developerConnection>
        <url>https://github.com/metamx/extendedset.git</url>
        <tag>HEAD</tag>
    </scm>

    <dependencies>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>16.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.roaringbitmap</groupId>
            <artifactId>RoaringBitmap</artifactId>
            <version>0.5.18</version>
        </dependency>

        <!-- Tests -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>


text:
'use strict';

/**
 * Change environment support for PointerEvent.
 */

const emptyFunction = function() {};

export function hasPointerEvent() {
  return global != null && global.PointerEvent != null;
}

export function setPointerEvent(bool) {
  const pointerCaptureFn = name => id => {
    if (typeof id !== 'number') {
      if (__DEV__) {
        console.error('A pointerId must be passed to "%s"', name);
      }
    }
  };
  global.PointerEvent = bool ? emptyFunction : undefined;
  global.HTMLElement.prototype.setPointerCapture = bool
    ? pointerCaptureFn('setPointerCapture')
    : undefined;
  global.HTMLElement.prototype.releasePointerCapture = bool
    ? pointerCaptureFn('releasePointerCapture')
    : undefined;
}

/**
 * Change environment host platform.
 */

const platformGetter = jest.spyOn(global.navigator, 'platform', 'get');

export const platform = {
  clear() {
    platformGetter.mockClear();
  },
  get() {
    return global.navigator.platform === 'MacIntel' ? 'mac' : 'windows';
  },
  set(name: 'mac' | 'windows') {
    switch (name) {
      case 'mac': {
        platformGetter.mockReturnValue('MacIntel');
        break;
      }
      case 'windows': {
        platformGetter.mockReturnValue('Win32');
        break;
      }
      default: {
        break;
      }
    }
  },
};

/**
 * Button property
 * This property only guarantees to indicate which buttons are pressed during events caused by pressing or
 * releasing one or multiple buttons. As such, it is not reliable for events such as 'mouseenter', 'mouseleave',
 * 'mouseover', 'mouseout' or 'mousemove'. Furthermore, the semantics differ for PointerEvent, where the value
 * for 'pointermove' will always be -1.
 */

export const buttonType = {
  // no change since last event
  none: -1,
  // left-mouse
  // touch contact
  // pen contact
  primary: 0,
  // right-mouse
  // pen barrel button
  secondary: 2,
  // middle mouse
  auxiliary: 1,
  // back mouse
  back: 3,
  // forward mouse
  forward: 4,
  // pen eraser
  eraser: 5,
};

/**
 * Buttons bitmask
 */

export const buttonsType = {
  none: 0,
  // left-mouse
  // touch contact
  // pen contact
  primary: 1,
  // right-mouse
  // pen barrel button
  secondary: 2,
  // middle mouse
  auxiliary: 4,
  // back mouse
  back: 8,
  // forward mouse
  forward: 16,
  // pen eraser
  eraser: 32,
};


text:
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/sync/driver/file_based_trusted_vault_client.h"

#include <utility>

#include "base/bind_helpers.h"
#include "base/files/file_util.h"
#include "base/files/important_file_writer.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/task_runner_util.h"
#include "components/os_crypt/os_crypt.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "components/sync/protocol/local_trusted_vault.pb.h"

namespace syncer {

namespace {

constexpr base::TaskTraits kBackendTaskTraits = {
    base::MayBlock(), base::TaskPriority::USER_VISIBLE,
    base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN};

sync_pb::LocalTrustedVault ReadEncryptedFile(const base::FilePath& file_path) {
  sync_pb::LocalTrustedVault proto;
  std::string ciphertext;
  std::string decrypted_content;
  if (base::ReadFileToString(file_path, &ciphertext) &&
      OSCrypt::DecryptString(ciphertext, &decrypted_content)) {
    proto.ParseFromString(decrypted_content);
  }

  return proto;
}

void WriteToDisk(const sync_pb::LocalTrustedVault& data,
                 const base::FilePath& file_path) {
  std::string encrypted_data;
  if (!OSCrypt::EncryptString(data.SerializeAsString(), &encrypted_data)) {
    DLOG(ERROR) << "Failed to encrypt trusted vault file.";
    return;
  }

  if (!base::ImportantFileWriter::WriteFileAtomically(file_path,
                                                      encrypted_data)) {
    DLOG(ERROR) << "Failed to write trusted vault file.";
  }
}

}  // namespace

//
class FileBasedTrustedVaultClient::Backend
    : public base::RefCountedThreadSafe<Backend> {
 public:
  explicit Backend(const base::FilePath& file_path) : file_path_(file_path) {}

  void ReadDataFromDisk() { data_ = ReadEncryptedFile(file_path_); }

  std::vector<std::vector<uint8_t>> FetchKeys(
      const CoreAccountInfo& account_info) {
    const sync_pb::LocalTrustedVaultPerUser* per_user_vault =
        FindUserVault(account_info.gaia);

    std::vector<std::vector<uint8_t>> keys;
    if (per_user_vault) {
      for (const sync_pb::LocalTrustedVaultKey& key : per_user_vault->key()) {
        const std::string& key_material = key.key_material();
        keys.emplace_back(key_material.begin(), key_material.end());
      }
    }

    return keys;
  }

  void StoreKeys(const std::string& gaia_id,
                 const std::vector<std::vector<uint8_t>>& keys,
                 int last_key_version) {
    // Find or create user for |gaid_id|.
    sync_pb::LocalTrustedVaultPerUser* per_user_vault = FindUserVault(gaia_id);
    if (!per_user_vault) {
      per_user_vault = data_.add_user();
      per_user_vault->set_gaia_id(gaia_id);
    }

    // Replace all keys.
    per_user_vault->set_last_key_version(last_key_version);
    per_user_vault->clear_key();
    for (const std::vector<uint8_t>& key : keys) {
      per_user_vault->add_key()->set_key_material(key.data(), key.size());
    }

    WriteToDisk(data_, file_path_);
  }

  void RemoveAllStoredKeys() {
    base::DeleteFile(file_path_, /*recursive=*/false);
    data_.Clear();
  }

 private:
  friend class base::RefCountedThreadSafe<Backend>;

  ~Backend() = default;

  // Finds the per-user vault in |data_| for |gaia_id|. Returns null if not
  // found.
  sync_pb::LocalTrustedVaultPerUser* FindUserVault(const std::string& gaia_id) {
    for (int i = 0; i < data_.user_size(); ++i) {
      if (data_.user(i).gaia_id() == gaia_id) {
        return data_.mutable_user(i);
      }
    }
    return nullptr;
  }

  const base::FilePath file_path_;

  sync_pb::LocalTrustedVault data_;

  DISALLOW_COPY_AND_ASSIGN(Backend);
};

FileBasedTrustedVaultClient::FileBasedTrustedVaultClient(
    const base::FilePath& file_path)
    : file_path_(file_path),
      backend_task_runner_(
          base::ThreadPool::CreateSequencedTaskRunner(kBackendTaskTraits)) {}

FileBasedTrustedVaultClient::~FileBasedTrustedVaultClient() = default;

std::unique_ptr<FileBasedTrustedVaultClient::Subscription>
FileBasedTrustedVaultClient::AddKeysChangedObserver(
    const base::RepeatingClosure& cb) {
  return observer_list_.Add(cb);
}

void FileBasedTrustedVaultClient::FetchKeys(
    const CoreAccountInfo& account_info,
    base::OnceCallback<void(const std::vector<std::vector<uint8_t>>&)> cb) {
  TriggerLazyInitializationIfNeeded();
  base::PostTaskAndReplyWithResult(
      backend_task_runner_.get(), FROM_HERE,
      base::BindOnce(&Backend::FetchKeys, backend_, account_info),
      std::move(cb));
}

void FileBasedTrustedVaultClient::StoreKeys(
    const std::string& gaia_id,
    const std::vector<std::vector<uint8_t>>& keys,
    int last_key_version) {
  TriggerLazyInitializationIfNeeded();
  backend_task_runner_->PostTask(
      FROM_HERE, base::BindOnce(&Backend::StoreKeys, backend_, gaia_id, keys,
                                last_key_version));
  observer_list_.Notify();
}

void FileBasedTrustedVaultClient::RemoveAllStoredKeys() {
  TriggerLazyInitializationIfNeeded();
  backend_task_runner_->PostTask(
      FROM_HERE, base::BindOnce(&Backend::RemoveAllStoredKeys, backend_));
  observer_list_.Notify();
}

void FileBasedTrustedVaultClient::MarkKeysAsStale(
    const CoreAccountInfo& account_info,
    base::OnceCallback<void(bool)> cb) {
  // Not really supported and not useful for this particular implementation.
  std::move(cb).Run(false);
}

void FileBasedTrustedVaultClient::WaitForFlushForTesting(
    base::OnceClosure cb) const {
  backend_task_runner_->PostTaskAndReply(FROM_HERE, base::DoNothing(),
                                         std::move(cb));
}

void FileBasedTrustedVaultClient::TriggerLazyInitializationIfNeeded() {
  if (backend_) {
    return;
  }

  backend_ = base::MakeRefCounted<Backend>(file_path_);
  backend_task_runner_->PostTask(
      FROM_HERE, base::BindOnce(&Backend::ReadDataFromDisk, backend_));
}

bool FileBasedTrustedVaultClient::IsInitializationTriggeredForTesting() const {
  return backend_ != nullptr;
}

}  // namespace syncer


text:
<?php
/**
 * Whoops - php errors for cool kids
 * @author Filipe Dobreira <http://github.com/filp>
 */

namespace Whoops\Handler;
use Whoops\Exception\Inspector;
use Whoops\Run;
use Exception;

interface HandlerInterface
{
    /**
     * @return int|null  A handler may return nothing, or a Handler::HANDLE_* constant
     */
    public function handle();

    /**
     * @param Whoops\Run $run
     */
    public function setRun(Run $run);

    /**
     * @param Exception $exception
     */
    public function setException(Exception $exception);

    /**
     * @param Whoops\Exception\Inspector $run
     */
    public function setInspector(Inspector $run);
}


text:
package interfaces;

public interface LoanTeller {
	/**
	 * Message stating that the teller is at his station and ready to take orders. Releases the atStation semaphore.
	 */
	public void msgAtStation();
	/**
	 * Message that releases the atIntermediate semaphore. Only for aesthetics - makes it so the teller doesn't move through objects
	 */
	public void msgAtIntermediate();
	/**
	 * message received by a bankClientRole that there is someone at the desk.
	 * @param b - bankClientRole being worked with
	 */
	public void msgInLine(BankClient b);

	/**
	 * message received by bankClientRole asking to open an account.
	 */
	public void msgOpenAccount();
	/**
	 * message received by a bankClientRole asking for a loan
	 * @param a - amount of money
	 * @param age - age of client
	 * @param hl - hasLoan
	 */
	public void msgLoan(double a, int age, boolean hl);

	/**
	 * message received by a bankClientRole asking to repay a loan
	 * @param a - amount of money offered
	 * @param m - amount of money to be repaid
	 */
	public void msgRepay(double a, double m);
}


text:
<!-- Test mixing attributes with optional unordered collections. -->
<binding>
  <mapping name="myelement" class="simple.MyClass6">
    <value style="attribute" name="a" field="a"/>
    <value style="attribute" name="b" field="b"/>
    <structure ordered="false">
      <collection field="ints" factory="simple.MyClass6.createList"
          set-method="setInts" usage="optional" >
        <value name="int" type="java.lang.Integer"/>
      </collection>
      <collection field="strings" factory="simple.MyClass6.createList"
          usage="optional">
        <value name="string" type="java.lang.String"/>
      </collection>
    </structure>
  </mapping>
</binding>


text:
/* LCM type definition class file
 * This file was automatically generated by lcm-gen
 * DO NOT MODIFY BY HAND!!!!
 */

package forseti2;

import java.io.*;
import java.util.*;
import lcm.lcm.*;

public final class forest_cmd implements lcm.lcm.LCMEncodable
{
    public forseti2.header header;
    public boolean lights[][];
    public int servos[];

    public forest_cmd()
    {
        lights = new boolean[8][3];
        servos = new int[8];
    }

    public static final long LCM_FINGERPRINT;
    public static final long LCM_FINGERPRINT_BASE = 0x3a668b0764040a01L;

    public static final int BRANCH_RED = 0;
    public static final int BRANCH_ORANGE = 1;
    public static final int BRANCH_GREEN = 2;

    static {
        LCM_FINGERPRINT = _hashRecursive(new ArrayList<Class<?>>());
    }

    public static long _hashRecursive(ArrayList<Class<?>> classes)
    {
        if (classes.contains(forseti2.forest_cmd.class))
            return 0L;

        classes.add(forseti2.forest_cmd.class);
        long hash = LCM_FINGERPRINT_BASE
             + forseti2.header._hashRecursive(classes)
            ;
        classes.remove(classes.size() - 1);
        return (hash<<1) + ((hash>>63)&1);
    }

    public void encode(DataOutput outs) throws IOException
    {
        outs.writeLong(LCM_FINGERPRINT);
        _encodeRecursive(outs);
    }

    public void _encodeRecursive(DataOutput outs) throws IOException
    {
        this.header._encodeRecursive(outs);

        for (int a = 0; a < 8; a++) {
            for (int b = 0; b < 3; b++) {
                outs.writeByte( this.lights[a][b] ? 1 : 0);
            }
        }

        for (int a = 0; a < 8; a++) {
            outs.writeInt(this.servos[a]);
        }

    }

    public forest_cmd(byte[] data) throws IOException
    {
        this(new LCMDataInputStream(data));
    }

    public forest_cmd(DataInput ins) throws IOException
    {
        if (ins.readLong() != LCM_FINGERPRINT)
            throw new IOException("LCM Decode error: bad fingerprint");

        _decodeRecursive(ins);
    }

    public static forseti2.forest_cmd _decodeRecursiveFactory(DataInput ins) throws IOException
    {
        forseti2.forest_cmd o = new forseti2.forest_cmd();
        o._decodeRecursive(ins);
        return o;
    }

    public void _decodeRecursive(DataInput ins) throws IOException
    {
        this.header = forseti2.header._decodeRecursiveFactory(ins);

        this.lights = new boolean[(int) 8][(int) 3];
        for (int a = 0; a < 8; a++) {
            for (int b = 0; b < 3; b++) {
                this.lights[a][b] = ins.readByte()!=0;
            }
        }

        this.servos = new int[(int) 8];
        for (int a = 0; a < 8; a++) {
            this.servos[a] = ins.readInt();
        }

    }

    public forseti2.forest_cmd copy()
    {
        forseti2.forest_cmd outobj = new forseti2.forest_cmd();
        outobj.header = this.header.copy();

        outobj.lights = new boolean[(int) 8][(int) 3];
        for (int a = 0; a < 8; a++) {
            System.arraycopy(this.lights[a], 0, outobj.lights[a], 0, 3);        }

        outobj.servos = new int[(int) 8];
        System.arraycopy(this.servos, 0, outobj.servos, 0, 8);
        return outobj;
    }

}


text:
The HTML5 Expense project is an expense reporting reference app demonstrating HTML5 and cross-platform mobile development. The project includes the following components.

### Client ###

The two native clients share the same web source built using PhoneGap, jQuery, and jQuery Mobile.

* ANDROID - native Android PhoneGap project files
* iOS - native iOS PhoneGap project files
* SHARED - shared web source and JavaScript

### Server ###

* API - Spring MVC application to which the client makes RESTful requests.
* OAUTH - Spring application built with Spring Security Oauth that manages access to the API.

## More Information ##

View the README files within the client and server directories for more information on each of those components.


text:
layout: null
title: Our Journey (test)
permalink: /our-journey-test/
x-nav-class: sr-only
x-created:   2019-01-24
x-oj-version: 1.5.1
x-oj-server: https://unpkg.com/our-journey@1.5.1
---
<!doctype html>

        <meta name="robots" content="noindex" />

        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=0.9" />

        <title>Our Journey (test)</title>

        <meta name="description" content=
        "'Our Journey' is an interactive activity to chart the highs and lows of your student learning journey. Developed in the Institute of Educational Technology (IET), at The Open University." />
        <meta name="copyright" content="© 2018 The Open University (IET)." />

        <link rel="stylesheet" href="{{ page.x-oj-server }}/style/journeystyle.css" />
        <link rel="X-icon" href="../assets/favicon.ico" type="image/x-icon" />

        Our Journey is loading...

        If this message remains after the page has completed loading, this could be because Our Journey requires Javascript.
        Check whether your browser has Javascript enabled, or try with a different browser / device.

      (Javascript disabled)