text:
/* --------------------------------------------
	НАВИГАЦИЯ
-------------------------------------------- */

.nav 					{ }
.nav li 				{ float:left;}
.nav li a 				{ display: block; font-size: 13px;}
.nav-filter-wrapper		{padding-bottom: 60px;}

/* Nav Main */
.nav.nav-main 					{ float: left; border-left: 1px solid #444}
.nav.nav-main li a 				{ color: #999;  padding: 7px 10px; border-right: 1px solid #444;font-size: 12px;}
.nav.nav-main li a:hover 		{ color: #efefef; }
.nav.nav-main li.active a 		{ background: #363636; color: #eee;  }

/* Userbar */
#userbar                                            {height: 32px;background: -moz-linear-gradient(top, #444, #222); border-left: 1px solid #444}
.nav.nav-userbar 									{ float: right; top:0;}
.nav.nav-userbar li 								{ }
.nav.nav-userbar li a 								{ color: #999; padding: 7px 8px;border-right: 1px solid #444}
.nav.nav-userbar li a:hover 						{ color: #eee; }
.nav.nav-userbar li a:active 						{ background: #333; }
.nav.nav-userbar li.nav-userbar-username a 			{ position: relative; padding-left: 47px; font-weight: bold; color: #9f9f9f; }
.nav.nav-userbar li.nav-userbar-username .avatar 	{ position: absolute; top: 4px; left: 15px; border-radius: 3px;}
.nav.nav-userbar li .new-messages 					{ color: #4AA731; font-weight: bold; }
.nav.nav-userbar li a.exit                          { color: #c63;}

/* Nav Topic Filter */
.nav.nav-filter 						{ }
.nav.nav-filter li 						{ }
.nav.nav-filter li a 					{ padding: 7px 13px;position: relative;border-right: 1px solid #39bEdD;}
.nav.nav-filter li:first-child a        { }
.nav.nav-filter li a:hover 				{ }
.nav.nav-filter li.active a 			{ color: #fff; background: #199EbD;}
.nav.nav-filter li .new 				{  color: #fff; padding: 2px 3px;font-size: 10px;line-height: 10px;}

/* Nav Pills */
.nav.nav-pills 				{ margin-bottom: 25px;overflow: hidden;}
.nav.nav-pills li 			{ margin-right: 3px; }
.nav.nav-pills li a 		{ padding: 5px 12px; color: #999;border-bottom: 1px dotted #999;}
.nav.nav-pills li a:hover 	{  }
.nav.nav-pills li.active a 	{  color: #ff1e00; border-bottom: 2px solid #ff1e00;}
.nav.nav-pills.nav-pills-profile 		{ margin-bottom: 30px; }

/* Nav Profile */
.nav.nav-profile 				{ margin-bottom: 15px; }
.nav.nav-profile li 			{ float: none; margin-bottom: 2px; }
.nav.nav-profile li a 			{ padding: 7px 12px; color: #333; }
.nav.nav-profile li a:hover 	{ color: #333; }

/* Dropdown */

.dropdown-create 		{ margin-right: 0px; line-height: 23px; }
.dropdown-create a 		{ font-weight: normal; }
.dropdown-create h3 a 	{ line-height: 32px;  color: #fcfcfc; text-transform: lowercase; display: inline-block; padding-left: 15px; }

.dropdown-menu-create 				{ padding: 5px 10px 10px; border: 1px solid #edf8fd; position: absolute; background: #fff; min-width: 100px; z-index: 10; font-size: 16px; text-transform: lowercase; }
.dropdown-menu-create li 			{ line-height: 1em; he }
.dropdown-menu-create li:last-child { margin: 0; }
.dropdown-menu-create li a 			{ color: #275ec2; text-decoration: none; border-bottom: 1px solid #275ec2; display: inline-block; padding: 3px 5px;}
.dropdown-menu-create li a:hover 	{ color: #f00; border-color: #f00; }
.dropdown-menu-create li.active a	{ color: #aaa; border-color: #aaa; }

#header .search{float: right;margin-top: 90px; }
#header .site-info{float: left;display: block;margin-top: 40px;}

.navigation{height: 32px;background:-moz-linear-gradient(top, #39bEdD, #199EBD); background:-webkit-linear-gradient(top, #39bEdD, #199EBD);margin-bottom: 0px;border-radius: 3px 3px 0 0; -moz-border-radius: 3px 3px 0 0;}


text:
<?php
/**
 * Full width post template (without sidebar)
 *
 * @package Hugo
 * @since Hugo 1.0
 */
?>

<div class="main-content col-1-1">
    <?php while ( have_posts() ) : the_post();

            get_template_part('templates/content');

            hugo_page_nav();

            if ( comments_open() || get_comments_number() ) {

                comments_template('/templates/comments.php');

            }

        endwhile;
    ?>
</div>

redpajama_set_name: RedPajamaGithub


text:
class MetaData():
    def save_data_source(self):
        pass


text:
<?php

namespace App\Modules\Core\Providers;

use App\Modules\Core\Repositories\SettingRepository;
use App\Modules\Core\Repositories\SettingRepositoryInterface;
use App\Modules\Core\Services\SettingService;
use App\Modules\Core\Services\SettingServiceInterface;
use Caffeinated\Modules\Support\ServiceProvider;

class ModuleServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the module services.
     *
     * @return void
     */
    public function boot()
    {
        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'core');
        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'core');

        $this->loadMigrationsFrom(module_path('core', 'Database/Migrations', 'app'));
        if (!$this->app->configurationIsCached()) {
            $this->loadConfigsFrom(module_path('core', 'Config', 'app'));
        }
    }

    /**
     * Register the module services.
     *
     * @return void
     */
    public function register()
    {
        //Bind Core Facade to the Service Container
        $this->app->bind('Core', function () {
            return new \App\Modules\Core\Core;
        });

        //Bind Errors Facade to the Service Container
        $this->app->bind('Errors', function () {
            return new \App\Modules\Core\Errors\Errors;
        });

        //Bind ApiConsumer Facade to the Service Container
        $this->app->bind('ApiConsumer', function ($app) {
            return new \App\Modules\Core\Utl\ApiConsumer($app, $app['request'], $app['router']);
        });

        $this->app->register(RouteServiceProvider::class);

        /**
         * Bind interfaces to implmentations.
         */
        $this->app->bind(SettingServiceInterface::class, SettingService::class);
        $this->app->bind(SettingRepositoryInterface::class, SettingRepository::class);
    }
}


text:
SEARCH JOBS AND SUBMIT YOUR RESUME

Take a look at our current job listings.

I.T. Silk Route seeks a diverse range of professionals to deliver specialized services and solutions to clients across all industries.Web Design, Development, Marketing and Branding services,

            we can take your business to the next level

			<a href="<?php echo  base_url(); ?>postresume" class="vc_btn">Post your resume

			<?php echo $jobs; ?>


text:
@interface SCSmartCheckin : SCSecuObject

@property (nonatomic, copy) NSString *customerName;
@property (nonatomic, copy) NSString *picture;
@property (nonatomic, copy) SCMediaResource *pictureObject;
@property (nonatomic, copy) NSDate *created;
@property (nonatomic, copy) SCGeneralAccount *account;
@property (nonatomic, copy) SCLoyaltyMerchantCard *merchantCard;
@property (nonatomic, copy) SCLoyaltyCustomer *customer;

@end


text:
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">

  <parent>
    <groupId>org.kie.workbench.screens</groupId>
    <artifactId>kie-wb-common-screens</artifactId>
    <version>6.3.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>kie-wb-common-data-modeller</artifactId>
  <packaging>pom</packaging>

  <name>Kie Workbench - Common - Data modeller</name>
  <description>Kie Workbench - Common - Data modeller</description>

  <modules>
    <module>kie-wb-common-data-modeller-api</module>
    <module>kie-wb-common-data-modeller-backend</module>
    <module>kie-wb-common-data-modeller-client</module>
  </modules>

</project>


text:
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/dash`. To experiment with that code, run `bin/console` for an interactive prompt.

TODO: Delete this and the text above, and describe your gem

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'dash'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install dash

## Usage

TODO: Write usage instructions here

## Development

After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/dash. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

## Setup

Run the setup rake task

```
rails dash:install
```

### Migrations

Copy migrations for notifications to your app and then run rails db:migrate
```
rails generate audited:install
rails railties:install:migrations
```
### Environment Config

#### Production

```
config.action_mailer.delivery_method = :mandrill
```

### Secrets

```
mandrill_api_key:
google_browser_key:
```

## Features

### Exporting

Table data can be exported to CSV easily by create an exporter.

The exporter by default should be [model_name]_exporter.rb

```
/app/exporters/user_exporter.rb

class UserExporter < DashExporter
  attributes :id, :first_name, :last_name
end
```

To export all table columns, pass the attributes as ```*User.column_names```

In a controller you can call the exporter like so

```
respond_to do |format|
  format.csv { send_data @users.to_csv, filename: "users-export.csv" }
end
```

You can create custom exporters although you'll need to call the exporter directly from the controller.

```
respond_to do |format|
  format.csv { send_data CustomUserExporter.new(@users).to_csv, filename: "users-export.csv" }
end
```
## Using Maps

### HTML Markup

```
<%= content_tag(:div, "", style: "height:250px;", class: "map-canvas", data: {zoom: 15, drag_callback: "mapCardDragCallback", bounds_callback: "mapCardBoundsCallback", markers: [{draggable: true, lat: -33.0, lng: 151.0, content_callback: "mapContentCallback"}].to_json}) %>
```

### Example JS callbacks

```
// Maps
function mapCardDragCallback(googleMap, newLatLng){
  $('.lat').val( newLatLng.lat() );
  $('.lng').val( newLatLng.lng() );
}

function mapCardBoundsCallback(googleMap){
  $('.zoom').val( googleMap.map.getZoom() );
}
function mapContentCallback(marker){
  return marker.title;
}
function addressMapSearchCallback(results){
  if(results.length > 0){
    var googlemap = $('.map-canvas').data('googlemap');
    if(googlemap){
      googlemap.moveMarker(googlemap.markers[0], results[0]);
    }
  }
  else{
    alert("Address was not found.");
  }
}
$(document).on('click', '.map-address-search', function(e){
  e.preventDefault();
  var address = $('.map-address-field').val();
  addressMapSearch( { 'address': address }, "addressMapSearchCallback" );
})
```

## HTML

### Team Nav

```
<div class="team-nav">
  <div class="wrapper">
    <div class="team-nav-content">
      <div class="avatar">
        <%= image_tag "https://site.com/avatar_blue.jpg" %>
      </div>
      <div class="content">
        <span class="name">Wahroonga Church</span>
      </div>
      <%= link_to content_tag(:i, "", class: "fas fa-angle-down"), "#", class: "team-toggle" %>
    </div>
    <ul class="team-list nav-group">
      <li><%= link_to content_tag(:i, "", class: "fas fa-fort-awesome icon").html_safe + "Fox Valley Church", "#", class: "nav-group-item" %></li>
      <li><%= link_to content_tag(:i, "", class: "fas fa-fort-awesome icon").html_safe + "3am Church", "#", class: "nav-group-item" %></li>
    </ul>
  </div>
</div>
```

## Trumbowyn

```
function addPageCardEditor(){
  $(".pc-editor").trumbowyg({
    btns: [['formatting', 'strong', 'em'], ['superscript', 'subscript'], ['unorderedList', 'orderedList'], ['linkChooser','unlink']],
    autogrow: true,
    removeformatPasted: true,
    autogrowOnEnter: true,
    resetCss: true
  });
}
$(document).on('turbolinks:load', addPageCardEditor);
```


text:
package File::Path;

use 5.005_04;
use strict;

use Cwd 'getcwd';
use File::Basename ();
use File::Spec     ();

BEGIN {
    if ($] < 5.006) {
        # can't say 'opendir my $dh, $dirname'
        # need to initialise $dh
        eval "use Symbol";
    }
}

use Exporter ();
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
$VERSION   = '2.07_03';
@ISA       = qw(Exporter);
@EXPORT    = qw(mkpath rmtree);
@EXPORT_OK = qw(make_path remove_tree);

my $Is_VMS     = $^O eq 'VMS';
my $Is_MacOS   = $^O eq 'MacOS';

# These OSes complain if you want to remove a file that you have no
# write permission to:
my $Force_Writeable = grep {$^O eq $_} qw(amigaos dos epoc MSWin32 MacOS os2);

# Unix-like systems need to stat each directory in order to detect
# race condition. MS-Windows is immune to this particular attack.
my $Need_Stat_Check = !($^O eq 'MSWin32');

sub _carp {
    require Carp;
    goto &Carp::carp;
}

sub _croak {
    require Carp;
    goto &Carp::croak;
}

sub _error {
    my $arg     = shift;
    my $message = shift;
    my $object  = shift;

    if ($arg->{error}) {
        $object = '' unless defined $object;
        $message .= ": $!" if $!;
        push @{${$arg->{error}}}, {$object => $message};
    }
    else {
        _carp(defined($object) ? "$message for $object: $!" : "$message: $!");
    }
}

sub make_path {
    push @_, {} unless @_ and UNIVERSAL::isa($_[-1],'HASH');
    goto &mkpath;
}

sub mkpath {
    my $old_style = !(@_ and UNIVERSAL::isa($_[-1],'HASH'));

    my $arg;
    my $paths;

    if ($old_style) {
        my ($verbose, $mode);
        ($paths, $verbose, $mode) = @_;
        $paths = [$paths] unless UNIVERSAL::isa($paths,'ARRAY');
        $arg->{verbose} = $verbose;
        $arg->{mode}    = defined $mode ? $mode : 0777;
    }
    else {
        $arg = pop @_;
        $arg->{mode}      = delete $arg->{mask} if exists $arg->{mask};
        $arg->{mode}      = 0777 unless exists $arg->{mode};
        ${$arg->{error}}  = [] if exists $arg->{error};
        $paths = [@_];
    }
    return _mkpath($arg, $paths);
}

sub _mkpath {
    my $arg   = shift;
    my $paths = shift;

    my(@created,$path);
    foreach $path (@$paths) {
        next unless defined($path) and length($path);
        $path .= '/' if $^O eq 'os2' and $path =~ /^\w:\z/s; # feature of CRT
        # Logic wants Unix paths, so go with the flow.
        if ($Is_VMS) {
            next if $path eq '/';
            $path = VMS::Filespec::unixify($path);
        }
        next if -d $path;
        my $parent = File::Basename::dirname($path);
        unless (-d $parent or $path eq $parent) {
            push(@created,_mkpath($arg, [$parent]));
        }
        print "mkdir $path\n" if $arg->{verbose};
        if (mkdir($path,$arg->{mode})) {
            push(@created, $path);
        }
        else {
            my $save_bang = $!;
            my ($e, $e1) = ($save_bang, $^E);
            $e .= "; $e1" if $e ne $e1;
            # allow for another process to have created it meanwhile
            if (!-d $path) {
                $! = $save_bang;
                if ($arg->{error}) {
                    push @{${$arg->{error}}}, {$path => $e};
                }
                else {
                    _croak("mkdir $path: $e");
                }
            }
        }
    }
    return @created;
}

sub remove_tree {
    push @_, {} unless @_ and UNIVERSAL::isa($_[-1],'HASH');
    goto &rmtree;
}

sub _is_subdir {
    my($dir, $test) = @_;

    my($dv, $dd) = File::Spec->splitpath($dir, 1);
    my($tv, $td) = File::Spec->splitpath($test, 1);

    # not on same volume
    return 0 if $dv ne $tv;

    my @d = File::Spec->splitdir($dd);
    my @t = File::Spec->splitdir($td);

    # @t can't be a subdir if it's shorter than @d
    return 0 if @t < @d;

    return join('/', @d) eq join('/', splice @t, 0, +@d);
}

sub rmtree {
    my $old_style = !(@_ and UNIVERSAL::isa($_[-1],'HASH'));

    my $arg;
    my $paths;

    if ($old_style) {
        my ($verbose, $safe);
        ($paths, $verbose, $safe) = @_;
        $arg->{verbose} = $verbose;
        $arg->{safe}    = defined $safe    ? $safe    : 0;

        if (defined($paths) and length($paths)) {
            $paths = [$paths] unless UNIVERSAL::isa($paths,'ARRAY');
        }
        else {
            _carp ("No root path(s) specified\n");
            return 0;
        }
    }
    else {
        $arg = pop @_;
        ${$arg->{error}}  = [] if exists $arg->{error};
        ${$arg->{result}} = [] if exists $arg->{result};
        $paths = [@_];
    }

    $arg->{prefix} = '';
    $arg->{depth}  = 0;

    my @clean_path;
    $arg->{cwd} = getcwd() or do {
        _error($arg, "cannot fetch initial working directory");
        return 0;
    };
    for ($arg->{cwd}) { /\A(.*)\Z/; $_ = $1 } # untaint

    for my $p (@$paths) {
        # need to fixup case and map \ to / on Windows
        my $ortho_root = $^O eq 'MSWin32' ? _slash_lc($p)          : $p;
        my $ortho_cwd  = $^O eq 'MSWin32' ? _slash_lc($arg->{cwd}) : $arg->{cwd};
        my $ortho_root_length = length($ortho_root);
        $ortho_root_length-- if $^O eq 'VMS'; # don't compare '.' with ']'
        if ($ortho_root_length && _is_subdir($ortho_root, $ortho_cwd)) {
            local $! = 0;
            _error($arg, "cannot remove path when cwd is $arg->{cwd}", $p);
            next;
        }

        if ($Is_MacOS) {
            $p  = ":$p" unless $p =~ /:/;
            $p .= ":"   unless $p =~ /:\z/;
        }
        elsif ($^O eq 'MSWin32') {
            $p =~ s{[/\\]\z}{};
        }
        else {
            $p =~ s{/\z}{};
        }
        push @clean_path, $p;
    }

    @{$arg}{qw(device inode perm)} = (lstat $arg->{cwd})[0,1] or do {
        _error($arg, "cannot stat initial working directory", $arg->{cwd});
        return 0;
    };

    return _rmtree($arg, \@clean_path);
}

sub _rmtree {
    my $arg   = shift;
    my $paths = shift;

    my $count  = 0;
    my $curdir = File::Spec->curdir();
    my $updir  = File::Spec->updir();

    my (@files, $root);
    ROOT_DIR:
    foreach $root (@$paths) {
        # since we chdir into each directory, it may not be obvious
        # to figure out where we are if we generate a message about
        # a file name. We therefore construct a semi-canonical
        # filename, anchored from the directory being unlinked (as
        # opposed to being truly canonical, anchored from the root (/).

        my $canon = $arg->{prefix}
            ? File::Spec->catfile($arg->{prefix}, $root)
            : $root
        ;

        my ($ldev, $lino, $perm) = (lstat $root)[0,1,2] or next ROOT_DIR;

        if ( -d _ ) {
            $root = VMS::Filespec::pathify($root) if $Is_VMS;

            if (!chdir($root)) {
                # see if we can escalate privileges to get in
                # (e.g. funny protection mask such as -w- instead of rwx)
                $perm &= 07777;
                my $nperm = $perm | 0700;
                if (!($arg->{safe} or $nperm == $perm or chmod($nperm, $root))) {
                    _error($arg, "cannot make child directory read-write-exec", $canon);
                    next ROOT_DIR;
                }
                elsif (!chdir($root)) {
                    _error($arg, "cannot chdir to child", $canon);
                    next ROOT_DIR;
                }
            }

            my ($cur_dev, $cur_inode, $perm) = (stat $curdir)[0,1,2] or do {
                _error($arg, "cannot stat current working directory", $canon);
                next ROOT_DIR;
            };

            if ($Need_Stat_Check) {
                ($ldev eq $cur_dev and $lino eq $cur_inode)
                    or _croak("directory $canon changed before chdir, expected dev=$ldev ino=$lino, actual dev=$cur_dev ino=$cur_inode, aborting.");
            }

            $perm &= 07777; # don't forget setuid, setgid, sticky bits
            my $nperm = $perm | 0700;

            # notabene: 0700 is for making readable in the first place,
            # it's also intended to change it to writable in case we have
            # to recurse in which case we are better than rm -rf for
            # subtrees with strange permissions

            if (!($arg->{safe} or $nperm == $perm or chmod($nperm, $curdir))) {
                _error($arg, "cannot make directory read+writeable", $canon);
                $nperm = $perm;
            }

            my $d;
            $d = gensym() if $] < 5.006;
            if (!opendir $d, $curdir) {
                _error($arg, "cannot opendir", $canon);
                @files = ();
            }
            else {
                no strict 'refs';
                if (!defined ${"\cTAINT"} or ${"\cTAINT"}) {
                    # Blindly untaint dir names if taint mode is
                    # active, or any perl < 5.006
                    @files = map { /\A(.*)\z/s; $1 } readdir $d;
                }
                else {
                    @files = readdir $d;
                }
                closedir $d;
            }

            if ($Is_VMS) {
                # Deleting large numbers of files from VMS Files-11
                # filesystems is faster if done in reverse ASCIIbetical order.
                # include '.' to '.;' from blead patch #31775
                @files = map {$_ eq '.' ? '.;' : $_} reverse @files;
                ($root = VMS::Filespec::unixify($root)) =~ s/\.dir\z//;
            }

            @files = grep {$_ ne $updir and $_ ne $curdir} @files;

            if (@files) {
                # remove the contained files before the directory itself
                my $narg = {%$arg};
                @{$narg}{qw(device inode cwd prefix depth)}
                    = ($cur_dev, $cur_inode, $updir, $canon, $arg->{depth}+1);
                $count += _rmtree($narg, \@files);
            }

            # restore directory permissions of required now (in case the rmdir
            # below fails), while we are still in the directory and may do so
            # without a race via '.'
            if ($nperm != $perm and not chmod($perm, $curdir)) {
                _error($arg, "cannot reset chmod", $canon);
            }

            # don't leave the client code in an unexpected directory
            chdir($arg->{cwd})
                or _croak("cannot chdir to $arg->{cwd} from $canon: $!, aborting.");

            # ensure that a chdir upwards didn't take us somewhere other
            # than we expected (see CVE-2002-0435)
            ($cur_dev, $cur_inode) = (stat $curdir)[0,1]
                or _croak("cannot stat prior working directory $arg->{cwd}: $!, aborting.");

            if ($Need_Stat_Check) {
                ($arg->{device} eq $cur_dev and $arg->{inode} eq $cur_inode)
                    or _croak("previous directory $arg->{cwd} changed before entering $canon, expected dev=$ldev ino=$lino, actual dev=$cur_dev ino=$cur_inode, aborting.");
            }

            if ($arg->{depth} or !$arg->{keep_root}) {
                if ($arg->{safe} &&
                    ($Is_VMS ? !&VMS::Filespec::candelete($root) : !-w $root)) {
                    print "skipped $root\n" if $arg->{verbose};
                    next ROOT_DIR;
                }
                if ($Force_Writeable and !chmod $perm | 0700, $root) {
                    _error($arg, "cannot make directory writeable", $canon);
                }
                print "rmdir $root\n" if $arg->{verbose};
                if (rmdir $root) {
                    push @{${$arg->{result}}}, $root if $arg->{result};
                    ++$count;
                }
                else {
                    _error($arg, "cannot remove directory", $canon);
                    if ($Force_Writeable && !chmod($perm, ($Is_VMS ? VMS::Filespec::fileify($root) : $root))
                    ) {
                        _error($arg, sprintf("cannot restore permissions to 0%o",$perm), $canon);
                    }
                }
            }
        }
        else {
            # not a directory
            $root = VMS::Filespec::vmsify("./$root")
                if $Is_VMS
                   && !File::Spec->file_name_is_absolute($root)
                   && ($root !~ m/(?<!\^)[\]>]+/);  # not already in VMS syntax

            if ($arg->{safe} &&
                ($Is_VMS ? !&VMS::Filespec::candelete($root)
                         : !(-l $root || -w $root)))
            {
                print "skipped $root\n" if $arg->{verbose};
                next ROOT_DIR;
            }

            my $nperm = $perm & 07777 | 0600;
            if ($Force_Writeable and $nperm != $perm and not chmod $nperm, $root) {
                _error($arg, "cannot make file writeable", $canon);
            }
            print "unlink $canon\n" if $arg->{verbose};
            # delete all versions under VMS
            for (;;) {
                if (unlink $root) {
                    push @{${$arg->{result}}}, $root if $arg->{result};
                }
                else {
                    _error($arg, "cannot unlink file", $canon);
                    $Force_Writeable and chmod($perm, $root) or
                        _error($arg, sprintf("cannot restore permissions to 0%o",$perm), $canon);
                    last;
                }
                ++$count;
                last unless $Is_VMS && lstat $root;
            }
        }
    }
    return $count;
}

sub _slash_lc {
    # fix up slashes and case on MSWin32 so that we can determine that
    # c:\path\to\dir is underneath C:/Path/To
    my $path = shift;
    $path =~ tr{\\}{/};
    return lc($path);
}

1;
__END__

=head1 NAME

File::Path - Create or remove directory trees

=head1 VERSION

This document describes version 2.07 of File::Path, released
2008-11-09.

=head1 SYNOPSIS

  use File::Path qw(make_path remove_tree);

  make_path('foo/bar/baz', '/zug/zwang');
  make_path('foo/bar/baz', '/zug/zwang', {
      verbose => 1,
      mode => 0711,
  });

  remove_tree('foo/bar/baz', '/zug/zwang');
  remove_tree('foo/bar/baz', '/zug/zwang', {
      verbose => 1,
      error  => \my $err_list,
  });

  # legacy (interface promoted before v2.00)
  mkpath('/foo/bar/baz');
  mkpath('/foo/bar/baz', 1, 0711);
  mkpath(['/foo/bar/baz', 'blurfl/quux'], 1, 0711);
  rmtree('foo/bar/baz', 1, 1);
  rmtree(['foo/bar/baz', 'blurfl/quux'], 1, 1);

  # legacy (interface promoted before v2.06)
  mkpath('foo/bar/baz', '/zug/zwang', { verbose => 1, mode => 0711 });
  rmtree('foo/bar/baz', '/zug/zwang', { verbose => 1, mode => 0711 });

=head1 DESCRIPTION

This module provide a convenient way to create directories of
arbitrary depth and to delete an entire directory subtree from the
filesystem.

The following functions are provided:

=over

=item make_path( $dir1, $dir2, .... )

=item make_path( $dir1, $dir2, ...., \%opts )

The C<make_path> function creates the given directories if they don't
exists before, much like the Unix command C<mkdir -p>.

The function accepts a list of directories to be created. Its
behaviour may be tuned by an optional hashref appearing as the last
parameter on the call.

The function returns the list of directories actually created during
the call; in scalar context the number of directories created.

The following keys are recognised in the option hash:

=over

=item mode => $num

The numeric permissions mode to apply to each created directory
(defaults to 0777), to be modified by the current C<umask>. If the
directory already exists (and thus does not need to be created),
the permissions will not be modified.

C<mask> is recognised as an alias for this parameter.

=item verbose => $bool

If present, will cause C<make_path> to print the name of each directory
as it is created. By default nothing is printed.

=item error => \$err

If present, it should be a reference to a scalar.
This scalar will be made to reference an array, which will
be used to store any errors that are encountered.  See the L</"ERROR
HANDLING"> section for more information.

If this parameter is not used, certain error conditions may raise
a fatal error that will cause the program will halt, unless trapped
in an C<eval> block.

=back

=item mkpath( $dir )

=item mkpath( $dir, $verbose, $mode )

=item mkpath( [$dir1, $dir2,...], $verbose, $mode )

=item mkpath( $dir1, $dir2,..., \%opt )

The mkpath() function provide the legacy interface of make_path() with
a different interpretation of the arguments passed.  The behaviour and
return value of the function is otherwise identical to make_path().

=item remove_tree( $dir1, $dir2, .... )

=item remove_tree( $dir1, $dir2, ...., \%opts )

The C<remove_tree> function deletes the given directories and any
files and subdirectories they might contain, much like the Unix
command C<rm -r> or C<del /s> on Windows.

The function accepts a list of directories to be
removed. Its behaviour may be tuned by an optional hashref
appearing as the last parameter on the call.

The functions returns the number of files successfully deleted.

The following keys are recognised in the option hash:

=over

=item verbose => $bool

If present, will cause C<remove_tree> to print the name of each file as
it is unlinked. By default nothing is printed.

=item safe => $bool

When set to a true value, will cause C<remove_tree> to skip the files
for which the process lacks the required privileges needed to delete
files, such as delete privileges on VMS. In other words, the code
will make no attempt to alter file permissions. Thus, if the process
is interrupted, no filesystem object will be left in a more
permissive mode.

=item keep_root => $bool

When set to a true value, will cause all files and subdirectories
to be removed, except the initially specified directories. This comes
in handy when cleaning out an application's scratch directory.

  remove_tree( '/tmp', {keep_root => 1} );

=item result => \$res

If present, it should be a reference to a scalar.
This scalar will be made to reference an array, which will
be used to store all files and directories unlinked
during the call. If nothing is unlinked, the array will be empty.

  remove_tree( '/tmp', {result => \my $list} );
  print "unlinked $_\n" for @$list;

This is a useful alternative to the C<verbose> key.

=item error => \$err

If present, it should be a reference to a scalar.
This scalar will be made to reference an array, which will
be used to store any errors that are encountered.  See the L</"ERROR
HANDLING"> section for more information.

Removing things is a much more dangerous proposition than
creating things. As such, there are certain conditions that
C<remove_tree> may encounter that are so dangerous that the only
sane action left is to kill the program.

Use C<error> to trap all that is reasonable (problems with
permissions and the like), and let it die if things get out
of hand. This is the safest course of action.

=back

=item rmtree( $dir )

=item rmtree( $dir, $verbose, $safe )

=item rmtree( [$dir1, $dir2,...], $verbose, $safe )

=item rmtree( $dir1, $dir2,..., \%opt )

The rmtree() function provide the legacy interface of remove_tree()
with a different interpretation of the arguments passed. The behaviour
and return value of the function is otherwise identical to
remove_tree().

=back

=head2 ERROR HANDLING

=over 4

=item B<NOTE:>

The following error handling mechanism is considered
experimental and is subject to change pending feedback from
users.

=back

If C<make_path> or C<remove_tree> encounter an error, a diagnostic
message will be printed to C<STDERR> via C<carp> (for non-fatal
errors), or via C<croak> (for fatal errors).

If this behaviour is not desirable, the C<error> attribute may be
used to hold a reference to a variable, which will be used to store
the diagnostics. The variable is made a reference to an array of hash
references.  Each hash contain a single key/value pair where the key
is the name of the file, and the value is the error message (including
the contents of C<$!> when appropriate).  If a general error is
encountered the diagnostic key will be empty.

An example usage looks like:

  remove_tree( 'foo/bar', 'bar/rat', {error => \my $err} );
  if (@$err) {
      for my $diag (@$err) {
          my ($file, $message) = %$diag;
          if ($file eq '') {
              print "general error: $message\n";
          }
          else {
              print "problem unlinking $file: $message\n";
          }
      }
  }
  else {
      print "No error encountered\n";
  }

Note that if no errors are encountered, C<$err> will reference an
empty array.  This means that C<$err> will always end up TRUE; so you
need to test C<@$err> to determine if errors occured.

=head2 NOTES

C<File::Path> blindly exports C<mkpath> and C<rmtree> into the
current namespace. These days, this is considered bad style, but
to change it now would break too much code. Nonetheless, you are
invited to specify what it is you are expecting to use:

  use File::Path 'rmtree';

The routines C<make_path> and C<remove_tree> are B<not> exported
by default. You must specify which ones you want to use.

  use File::Path 'remove_tree';

Note that a side-effect of the above is that C<mkpath> and C<rmtree>
are no longer exported at all. This is due to the way the C<Exporter>
module works. If you are migrating a codebase to use the new
interface, you will have to list everything explicitly. But that's
just good practice anyway.

  use File::Path qw(remove_tree rmtree);

=head3 SECURITY CONSIDERATIONS

There were race conditions 1.x implementations of File::Path's
C<rmtree> function (although sometimes patched depending on the OS
distribution or platform). The 2.0 version contains code to avoid the
problem mentioned in CVE-2002-0435.

See the following pages for more information:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286905
  http://www.nntp.perl.org/group/perl.perl5.porters/2005/01/msg97623.html
  http://www.debian.org/security/2005/dsa-696

Additionally, unless the C<safe> parameter is set (or the
third parameter in the traditional interface is TRUE), should a
C<remove_tree> be interrupted, files that were originally in read-only
mode may now have their permissions set to a read-write (or "delete
OK") mode.

=head1 DIAGNOSTICS

FATAL errors will cause the program to halt (C<croak>), since the
problem is so severe that it would be dangerous to continue. (This
can always be trapped with C<eval>, but it's not a good idea. Under
the circumstances, dying is the best thing to do).

SEVERE errors may be trapped using the modern interface. If the
they are not trapped, or the old interface is used, such an error
will cause the program will halt.

All other errors may be trapped using the modern interface, otherwise
they will be C<carp>ed about. Program execution will not be halted.

=over 4

=item mkdir [path]: [errmsg] (SEVERE)

C<make_path> was unable to create the path. Probably some sort of
permissions error at the point of departure, or insufficient resources
(such as free inodes on Unix).

=item No root path(s) specified

C<make_path> was not given any paths to create. This message is only
emitted if the routine is called with the traditional interface.
The modern interface will remain silent if given nothing to do.

=item No such file or directory

On Windows, if C<make_path> gives you this warning, it may mean that
you have exceeded your filesystem's maximum path length.

=item cannot fetch initial working directory: [errmsg]

C<remove_tree> attempted to determine the initial directory by calling
C<Cwd::getcwd>, but the call failed for some reason. No attempt
will be made to delete anything.

=item cannot stat initial working directory: [errmsg]

C<remove_tree> attempted to stat the initial directory (after having
successfully obtained its name via C<getcwd>), however, the call
failed for some reason. No attempt will be made to delete anything.

=item cannot chdir to [dir]: [errmsg]

C<remove_tree> attempted to set the working directory in order to
begin deleting the objects therein, but was unsuccessful. This is
usually a permissions issue. The routine will continue to delete
other things, but this directory will be left intact.

=item directory [dir] changed before chdir, expected dev=[n] ino=[n], actual dev=[n] ino=[n], aborting. (FATAL)

C<remove_tree> recorded the device and inode of a directory, and then
moved into it. It then performed a C<stat> on the current directory
and detected that the device and inode were no longer the same. As
this is at the heart of the race condition problem, the program
will die at this point.

=item cannot make directory [dir] read+writeable: [errmsg]

C<remove_tree> attempted to change the permissions on the current directory
to ensure that subsequent unlinkings would not run into problems,
but was unable to do so. The permissions remain as they were, and
the program will carry on, doing the best it can.

=item cannot read [dir]: [errmsg]

C<remove_tree> tried to read the contents of the directory in order
to acquire the names of the directory entries to be unlinked, but
was unsuccessful. This is usually a permissions issue. The
program will continue, but the files in this directory will remain
after the call.

=item cannot reset chmod [dir]: [errmsg]

C<remove_tree>, after having deleted everything in a directory, attempted
to restore its permissions to the original state but failed. The
directory may wind up being left behind.

=item cannot remove [dir] when cwd is [dir]

The current working directory of the program is F</some/path/to/here>
and you are attempting to remove an ancestor, such as F</some/path>.
The directory tree is left untouched.

The solution is to C<chdir> out of the child directory to a place
outside the directory tree to be removed.

=item cannot chdir to [parent-dir] from [child-dir]: [errmsg], aborting. (FATAL)

C<remove_tree>, after having deleted everything and restored the permissions
of a directory, was unable to chdir back to the parent. The program
halts to avoid a race condition from occurring.

=item cannot stat prior working directory [dir]: [errmsg], aborting. (FATAL)

C<remove_tree> was unable to stat the parent directory after have returned
from the child. Since there is no way of knowing if we returned to
where we think we should be (by comparing device and inode) the only
way out is to C<croak>.

=item previous directory [parent-dir] changed before entering [child-dir], expected dev=[n] ino=[n], actual dev=[n] ino=[n], aborting. (FATAL)

When C<remove_tree> returned from deleting files in a child directory, a
check revealed that the parent directory it returned to wasn't the one
it started out from. This is considered a sign of malicious activity.

=item cannot make directory [dir] writeable: [errmsg]

Just before removing a directory (after having successfully removed
everything it contained), C<remove_tree> attempted to set the permissions
on the directory to ensure it could be removed and failed. Program
execution continues, but the directory may possibly not be deleted.

=item cannot remove directory [dir]: [errmsg]

C<remove_tree> attempted to remove a directory, but failed. This may because
some objects that were unable to be removed remain in the directory, or
a permissions issue. The directory will be left behind.

=item cannot restore permissions of [dir] to [0nnn]: [errmsg]

After having failed to remove a directory, C<remove_tree> was unable to
restore its permissions from a permissive state back to a possibly
more restrictive setting. (Permissions given in octal).

=item cannot make file [file] writeable: [errmsg]

C<remove_tree> attempted to force the permissions of a file to ensure it
could be deleted, but failed to do so. It will, however, still attempt
to unlink the file.

=item cannot unlink file [file]: [errmsg]

C<remove_tree> failed to remove a file. Probably a permissions issue.

=item cannot restore permissions of [file] to [0nnn]: [errmsg]

After having failed to remove a file, C<remove_tree> was also unable
to restore the permissions on the file to a possibly less permissive
setting. (Permissions given in octal).

=back

=head1 SEE ALSO

=over 4

=item *

L<File::Remove>

Allows files and directories to be moved to the Trashcan/Recycle
Bin (where they may later be restored if necessary) if the operating
system supports such functionality. This feature may one day be
made available directly in C<File::Path>.

=item *

L<File::Find::Rule>

When removing directory trees, if you want to examine each file to
decide whether to delete it (and possibly leaving large swathes
alone), F<File::Find::Rule> offers a convenient and flexible approach
to examining directory trees.

=back

=head1 BUGS

Please report all bugs on the RT queue:

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Path>

=head1 ACKNOWLEDGEMENTS

Paul Szabo identified the race condition originally, and Brendan
O'Dea wrote an implementation for Debian that addressed the problem.
That code was used as a basis for the current code. Their efforts
are greatly appreciated.

Gisle Aas made a number of improvements to the documentation for
2.07 and his advice and assistance is also greatly appreciated.

=head1 AUTHORS

Tim Bunce and Charles Bailey. Currently maintained by David Landgren
<F<david@landgren.net>>.

=head1 COPYRIGHT

This module is copyright (C) Charles Bailey, Tim Bunce and
David Landgren 1995-2008. All rights reserved.

=head1 LICENSE

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut


text:
"""
    celery.exceptions
    ~~~~~~~~~~~~~~~~~

    This module contains Celery-specific exceptions.

    :copyright: (c) 2009 - 2012 by Ask Solem.
    :license: BSD, see LICENSE for more details.

"""
from __future__ import absolute_import

from billiard.exceptions import (  # noqa
    SoftTimeLimitExceeded, TimeLimitExceeded, WorkerLostError,
)

UNREGISTERED_FMT = """\
Task of kind %s is not registered, please make sure it's imported.\
"""

class SecurityError(Exception):
    """Security related exceptions.

    Handle with care.

    """

class SystemTerminate(SystemExit):
    """Signals that the worker should terminate."""

class QueueNotFound(KeyError):
    """Task routed to a queue not in CELERY_QUEUES."""

class ImproperlyConfigured(ImportError):
    """Celery is somehow improperly configured."""

class NotRegistered(KeyError):
    """The task is not registered."""

    def __repr__(self):
        return UNREGISTERED_FMT % str(self)

class AlreadyRegistered(Exception):
    """The task is already registered."""

class TimeoutError(Exception):
    """The operation timed out."""

class MaxRetriesExceededError(Exception):
    """The tasks max restart limit has been exceeded."""

class RetryTaskError(Exception):
    """The task is to be retried later."""

    def __init__(self, message, exc, *args, **kwargs):
        self.exc = exc
        Exception.__init__(self, message, exc, *args, **kwargs)

class TaskRevokedError(Exception):
    """The task has been revoked, so no result available."""

class NotConfigured(UserWarning):
    """Celery has not been configured, as no config module has been found."""

class AlwaysEagerIgnored(UserWarning):
    """send_task ignores CELERY_ALWAYS_EAGER option"""

class InvalidTaskError(Exception):
    """The task has invalid data or is not properly constructed."""

class CPendingDeprecationWarning(PendingDeprecationWarning):
    pass

class CDeprecationWarning(DeprecationWarning):
    pass

class IncompleteStream(Exception):
    """Found the end of a stream of data, but the data is not yet complete."""


text:
package com.baidu.palo.mysql;

import java.nio.ByteBuffer;

// class for MySQL protocol packet
public abstract class MysqlPacket {
    public boolean readFrom(ByteBuffer deserializer) {
        // Only used to read authenticate packet from client.
        return false;
    }

    abstract public void writeTo(MysqlSerializer serializer);
}


text:
// Copyright Naked Objects Group Ltd, 45 Station Road, Henley on Thames, UK, RG9 1AT
// 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.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using NakedObjects;
using NakedObjects.Services;

namespace TestData;

public class TestHelper {
    #region testcode

    private IDictionary<string, int> events;

    [NotMapped]
    public IDomainObjectContainer Container { protected get; set; }

    [NotMapped]
    public SimpleRepository<Person> MenuService { protected get; set; }

    [NotMapped]
    public SimpleRepository<Product> ContributedActions { protected get; set; }

    [NotMapped]
    public SimpleRepository<Address> SystemService { protected get; set; }

    [NotMapped]
    public bool HasContainer => Container != null;

    [NotMapped]
    public bool HasMenuService => MenuService != null;

    [NotMapped]
    public bool HasContributedActions => ContributedActions != null;

    [NotMapped]
    public bool HasSystemService => SystemService != null;

    [NakedObjectsIgnore]
    public IDictionary<string, int> GetEvents() => events;

    public void ResetEvents() {
        events = null;
    }

    private void SetupEvents() =>
        events ??= new Dictionary<string, int> {
            { "Created", 0 },
            { "Updating", 0 },
            { "Updated", 0 },
            { "Loading", 0 },
            { "Loaded", 0 },
            { "Persisting", 0 },
            { "Persisted", 0 },
            { "Deleting", 0 },
            { "Deleted", 0 }
        };

    #endregion

    #region callbacks

    public virtual void Created() {
        SetupEvents();
        events["Created"]++;
    }

    public virtual void Updating() {
        SetupEvents();
        events["Updating"]++;
    }

    public virtual void Updated() {
        SetupEvents();
        events["Updated"]++;
    }

    public virtual void Loading() {
        SetupEvents();
        events["Loading"]++;
    }

    public virtual void Loaded() {
        SetupEvents();
        events["Loaded"]++;
    }

    public virtual void Persisting() {
        SetupEvents();
        events["Persisting"]++;
    }

    public virtual void Persisted() {
        SetupEvents();
        events["Persisted"]++;
    }

    public virtual void Deleting() {
        SetupEvents();
        events["Deleting"]++;
    }

    public virtual void Deleted() {
        SetupEvents();
        events["Deleted"]++;
    }

    #endregion
}


text:
package main

import (
	"crypto/md5"
	"crypto/sha1"
	"crypto/sha256"
	"crypto/sha512"
	"encoding/hex"
	"encoding/json"
	"fmt"
	"github.com/gographics/imagick/imagick"
	"html/template"
	"io"
	"io/ioutil"
	"log"
	"math"
	"net/http"
	"os"
	"strconv"
	"strings"
	"time"
)

var allowedExtensions []string = []string{"tif", "tiff", "gif", "jpeg", "jpg", "png", "bmp", "svg", "webp"}

func extneionAllowed(e string) bool {
	for _, a := range allowedExtensions {
		if a == e {
			return true
		}
	}
	return false
}

type Uploads struct {
	Server  *Iori
	Auth    *Auth
	Writer  http.ResponseWriter
	Request *http.Request
	Path    []string
}

func (u Uploads) Process() {
	if !u.Auth.Authenticated {
		t, _ := template.ParseFiles("resources/Upload/index.html")
		t.Execute(u.Writer, true)
		return
	}
	if len(u.Path) == 1 {
		t, _ := template.ParseFiles("resources/Upload/index.html")
		t.Execute(u.Writer, false)
	} else {
		switch u.Path[1] {
		case "tags":
			u.Tags()
		case "add":
			u.Add()
		case "view":
			u.View()
		case "submit":
			u.Submit()
		default:
			fmt.Fprint(u.Writer, "404 Not Found\n")
		}
	}
}

func (u Uploads) Tags() {
	type Info struct {
		Success bool
		Tags    string
		Source  string
	}
	info := Info{true, "", ""}
	var response map[string]interface{}

	MD5 := u.Request.Form.Get("MD5")
	if MD5 == "" {
		info.Success = false
	} else {
		resp, err := http.Get("https://cure.ninja/booru/api/json/md5/" + MD5)
		var bytes []byte
		if err != nil {
			log.Println(err)
			info.Success = false
		} else {
			bytes, err = ioutil.ReadAll(resp.Body)
			resp.Body.Close()
			if err != nil {
				log.Println(err)
				info.Success = false
			} else {
				err = json.Unmarshal(bytes, &response)
				if err != nil {
					log.Println(err)
					info.Success = false
				}
			}
		}
		if info.Success {
			if response["success"].(bool) && len(response["results"].([]interface{})) != 0 {
				info.Tags = response["results"].([]interface{})[0].(map[string]interface{})["tag"].(string)
				source, ok := response["results"].([]interface{})[0].(map[string]interface{})["sourceURL"].(string)
				if source == "" || !ok {
					info.Source = response["results"].([]interface{})[0].(map[string]interface{})["page"].(string)
				} else {
					info.Source = source
				}
			}
		}
	}

	t, _ := template.ParseFiles("resources/Upload/tags.html")
	t.Execute(u.Writer, info)
}

func (u Uploads) Add() {
	type Info struct {
		Success bool
		Reason  string
	}
	info := Info{true, ""}

	fileName := u.Request.Header.Get("fileName")
	log.Println(fileName)
	var extension string
	if len(fileName) != 0 && strings.LastIndex(fileName, ".") != -1 {
		extension = strings.ToLower(fileName[strings.LastIndex(fileName, ".")+1:])
	}
	contentLength := u.Request.ContentLength
	if len(fileName) == 0 || contentLength == 0 || u.Request.Method != "POST" {
		info.Success = false
		info.Reason = "Invalid Request"
	}
	if info.Success && !extneionAllowed(extension) {
		info.Success = false
		info.Reason = "The extension " + extension + " is not allowed."
	}
	uploadFolder := "uploadTmp/" + strconv.FormatUint(u.Auth.User.Id, 10) + "/"
	uploadFile := uploadFolder + "upload." + extension
	if info.Success {
		err := os.MkdirAll(uploadFolder+"thumb/", 0755)
		if err != nil {
			log.Println(err)
			info.Success = false
			info.Reason = "OS Error"
		}
	}
	if info.Success {
		err := os.MkdirAll(uploadFolder+"iqdb/", 0755)
		if err != nil {
			log.Println(err)
			info.Success = false
			info.Reason = "OS Error"
		}
	}

	var SHA1 string
	var SHA256 string
	var SHA512 string
	var MD5 string
	if info.Success {
		file, err := os.Create(uploadFile)
		if err != nil {
			log.Println(err)
			info.Success = false
			info.Reason = "OS Error"
		} else {
			hasher1 := sha1.New()
			hasher256 := sha256.New()
			hasher512 := sha512.New()
			hasher5 := md5.New()
			for {
				bytes := make([]byte, 4096)
				read, err := u.Request.Body.Read(bytes)
				if err != nil && err != io.EOF {
					log.Println(err)
					info.Success = false
					info.Reason = "Error reading from browser."
					break
				}
				if read == 0 || err == io.EOF {
					break
				}
				readBytes := bytes[0:read]
				hasher1.Write(readBytes)
				hasher256.Write(readBytes)
				hasher512.Write(readBytes)
				hasher5.Write(readBytes)
				file.Write(readBytes)
			}
			SHA1 = hex.EncodeToString(hasher1.Sum(nil))
			SHA256 = hex.EncodeToString(hasher256.Sum(nil))
			SHA512 = hex.EncodeToString(hasher512.Sum(nil))
			MD5 = hex.EncodeToString(hasher5.Sum(nil))
			log.Println("SHA1:", SHA1)
			log.Println("SHA256:", SHA256)
			log.Println("SHA512:", SHA512)
			log.Println("MD5:", MD5)
			file.Close()
			err := os.Rename(uploadFile, uploadFolder+SHA256+"."+extension)
			if err != nil {
				log.Println(err)
				info.Success = false
				info.Reason = "OS Error"
			}
			uploadFile = uploadFolder + SHA256 + "." + extension
		}
	}

	if info.Success {
		upload, err := u.Server.DBmap.Get(Upload{}, SHA256)
		if err != nil {
			log.Println(err)
			info.Success = false
			info.Reason = "Error querying the database."
		}
		if upload != nil {
			info.Success = false
			info.Reason = "This image is already being uploaded."
		}
	}

	var width uint
	var height uint
	var thumnailWidth uint
	var thumnailHeight uint
	thumbnailExtension := extension
	if info.Success {
		mw := imagick.NewMagickWand()
		err := mw.ReadImage(uploadFile)
		if err != nil {
			log.Println(err)
			info.Success = false
			info.Reason = "Error reading image."
		} else {
			width = mw.GetImageWidth()
			height = mw.GetImageHeight()
			log.Println(width, height)

			newWidth := float64(width)
			newHeight := float64(height)
			if width > thumbnailSize || height > thumbnailSize {
				widthFactor := thumbnailSize / float64(width)
				heightFactor := thumbnailSize / float64(height)
				scaleFactor := 1.0

				if widthFactor < heightFactor {
					scaleFactor = widthFactor
				} else {
					scaleFactor = heightFactor
				}

				newWidth = math.Floor((float64(width) * scaleFactor) + 0.5)
				newHeight = math.Floor((float64(height) * scaleFactor) + 0.5)
			}
			thumnailWidth = uint(newWidth)
			thumnailHeight = uint(newHeight)
			log.Println(newWidth, newHeight)
			mw.ResizeImage(uint(newWidth), uint(newHeight), imagick.FILTER_LANCZOS2, 1)
			mw.SetImageColorspace(imagick.COLORSPACE_SRGB)

			if extension == "bmp" || extension == "webp" || extension == "svg" {
				thumbnailExtension = "jpg"
			}
			err := mw.WriteImage(uploadFolder + "thumb/" + SHA256 + "." + thumbnailExtension)
			if err != nil {
				log.Println(err)
				info.Success = false
				info.Reason = "Error saving thumbnail."
			}
		}
		mw.Destroy()
	}

	var fileSize int64
	var thumbnailFileSize int64
	if info.Success {
		fInfo, err := os.Stat(uploadFolder + SHA256 + "." + extension)
		if err != nil {
			log.Println(err)
			info.Success = false
			info.Reason = "Error retreving file info."
		} else {
			fileSize = fInfo.Size()
		}
		fInfo, err = os.Stat(uploadFolder + "thumb/" + SHA256 + "." + thumbnailExtension)
		if err != nil {
			log.Println(err)
			info.Success = false
			info.Reason = "Error retreving file info."
		} else {
			thumbnailFileSize = fInfo.Size()
		}
	}

	if info.Success {
		mw := imagick.NewMagickWand()
		err := mw.ReadImage(uploadFile)
		if err != nil {
			log.Println(err)
			info.Success = false
			info.Reason = "Error reading image."
		} else {
			mw.ResizeImage(128, 128, imagick.FILTER_LANCZOS2, 1)
			mw.SetImageColorspace(imagick.COLORSPACE_SRGB)

			iqdbFile := uploadFolder + "iqdb/" + SHA256 + ".png"

			err := mw.WriteImage(iqdbFile)
			if err != nil {
				log.Println(err)
				info.Success = false
				info.Reason = "Error saving IQDB thumb."
			}
		}
		mw.Destroy()
	}

	if info.Success {
		upload := new(Upload)
		upload.UserID = u.Auth.User.Id
		upload.MD5 = MD5
		upload.SHA1 = SHA1
		upload.SHA256 = SHA256
		upload.SHA512 = SHA512
		upload.Extension = extension
		upload.FileSize = fileSize
		upload.Width = int(width)
		upload.Height = int(height)
		upload.ThumbnailExtension = thumbnailExtension
		upload.ThumbnailFileSize = thumbnailFileSize
		upload.ThumnailWidth = int(thumnailWidth)
		upload.ThumnailHeight = int(thumnailHeight)
		upload.Time = time.Now().Unix()
		err := u.Server.DBmap.Insert(upload)
		if err != nil {
			log.Println(err)
			info.Success = false
			info.Reason = "Unable to add to database."
		}
	}

	u.Request.Body.Close()
	t, _ := template.ParseFiles("resources/Upload/add.html")
	t.Execute(u.Writer, info)
}

func (u Uploads) View() {
	SHA256 := u.Request.Form.Get("SHA256")

	obj, _ := u.Server.DBmap.Get(Upload{}, SHA256)

	if obj == nil {
		fmt.Fprint(u.Writer, "404 Not Found")
		return
	}
	upload := obj.(*Upload)

	http.ServeFile(u.Writer, u.Request, "uploadTmp/"+strconv.FormatUint(u.Auth.User.Id, 10)+"/"+upload.SHA256+"."+upload.Extension)
}

func (u Uploads) Submit() {
	type Info struct {
		Number int
		Image  string
		Upload *Upload
	}
	var info []Info

	results, _ := u.Server.DBmap.Select(Upload{}, "SELECT * FROM uploads WHERE UserID=?", u.Auth.User.Id)

	for i, result := range results {
		upload := result.(*Upload)
		thisInfo := Info{}
		thisInfo.Number = i
		thisInfo.Image = APIPath + "uploads/view?SHA256=" + upload.SHA256
		thisInfo.Upload = upload
		info = append(info, thisInfo)
	}

	t, _ := template.ParseFiles("resources/Upload/submit.html")
	t.Execute(u.Writer, info)
}


text:
shared_examples_for "rack application" do
  it 'is callable' do
    @app.should respond_to(:call)
  end

  it 'returns a 3-tuple' do
    @result.size.should == 3
  end

  it 'returns status as first tuple element' do
    @result.first.should == 200
  end

  it 'returns hash of headers as the second tuple element' do
    @result[1].should be_kind_of(Hash)
  end

  it 'returns response body as third tuple element' do
    @result.last.should == @body
  end
end

shared_examples_for "transparent middleware" do
  it "delegates request handling to wrapped Rack application" do
    @result.last.should == @body
  end

  describe "#deferred?" do
    it "is delegated to wrapped Rack application" do
      @middleware.deferred?(@env).should be(true)
      @middleware.deferred?(Rack::MockRequest.env_for('/not-deferred/')).should be(false)
    end
  end
end


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>SideCar: SideCar::GUI::RGBColor Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="DoxygenStyleSheet.css" rel="stylesheet" type="text/css" />

SideCar

Main Page

Related Pages

Modules

Namespaces

Data Structures

Files

Data Structures

Class Hierarchy

Data Fields

SideCar

GUI

RGBColor

Data Fields

SideCar::GUI::RGBColor Struct Reference

Primitive color class that holds OpenGL RGB values for a specific color.
 More...

#include </Users/howes/src/sidecar/GUI/Color.h>

Inheritance diagram for SideCar::GUI::RGBColor:

<map name="SideCar_1_1GUI_1_1RGBColor_inherit__map" id="SideCar_1_1GUI_1_1RGBColor_inherit__map">
<area shape="rect" id="node2" href="structSideCar_1_1GUI_1_1Color.html" title="Utility OpenGL color class that expands on the primitive RGBColor class to hold an opacity (alpha) va..." alt="" coords="20,84,159,114"/>
</map>
[legend]

Data Fields

GLfloat 	red

GLfloat 	green

GLfloat 	blue

Detailed Description

Primitive color class that holds OpenGL RGB values for a specific color.

NOTE: do not add any constructors, to this class; the CLUT class expects to initialize arrays of RGBColor objects, and at least GCC 4.0 is not able to do so if there is a constructor defined.

Definition at line 13 of file Color.h.

The documentation for this struct was generated from the following file:

/Users/howes/src/sidecar/GUI/Color.h

<address class="footer">
Generated by

 1.8.11
</address>


text:
package org.rioproject.resources.servicecore;

import com.sun.jini.landlord.LeasedResource;

/**
 * This class provides an adapter for LeaseListener methods. The methods in this
 * class are empty; this class is provided as a convenience for easily creating
 * listeners by extending this class and overriding only the methods of
 * interest.
 *
 * @author Dennis Reedy
 */
public class LeaseListenerAdapter implements LeaseListener {
    public void expired(LeasedResource resource) {
    }

    public void removed(LeasedResource resource) {
    }

    public void register(LeasedResource resource) {
    }

    public void renewed(LeasedResource resource) {
    }
}


text:
TEST(DiceRolls,VerifyValidDiceValues){

Dice *d = new Dice();
d->roll();
uint8_t firstRoll = d->left();
uint8_t secondRoll = d->right();
EXPECT_LE(firstRoll,6);
EXPECT_LE(secondRoll,6);
EXPECT_GE(firstRoll,1);
EXPECT_GE(secondRoll,1);

}

TEST(DiceRolls,MeanAndStdDev){
//TODO: As of now this is a sanity check, it needs to be much more statistically valid in the future

// Parameters
int numberOfRolls = 1000;
double mean_tolerance = 0.2;
double stdev_tolerance = 0.2;

// Declarations
Dice *d = new Dice();
uint8_t firstRoll, secondRoll;
std::vector<double> vectorOfRolls; //removed the (numberOfRolls) construction argument.  It was initializing the vector with <numberOfRolls> zeros.

// Roll dice a bunch of times
for(int i = 0; i < (numberOfRolls/2) ; i = i + 1 ){
  d->roll();
  firstRoll  = d->left();
  secondRoll = d->right();
  vectorOfRolls.push_back( (double) firstRoll);
  vectorOfRolls.push_back( (double) secondRoll);
}

// Calculate statistics
double mean_observed  = utils_mean(vectorOfRolls);
double stdev_observed = utils_stddev(vectorOfRolls);

// Expected results
// from (http://www.futureaccountant.com/theory-of-expectation-random-variable/problems-solutions/throwing-rolling-dice.php#.VOQF0jVTdNA)
double mean_desired  = 3.5;
double stdev_desired = 1.709;

double mean_lower_bound  = mean_desired  - mean_tolerance;
double mean_upper_bound  = mean_desired  + mean_tolerance;
double stdev_lower_bound = stdev_desired - stdev_tolerance;
double stdev_upper_bound = stdev_desired + stdev_tolerance;

EXPECT_LE(mean_lower_bound, mean_observed);
EXPECT_GE(mean_upper_bound, mean_observed);
EXPECT_LE(stdev_lower_bound, stdev_observed);
EXPECT_GE(stdev_upper_bound, stdev_observed);

}

TEST(EdgeCaseBehavior, Declaration){
	Dice* d = new Dice();
	d->prettyPrint();
}


text:
import React, { Component, PropTypes } from 'react';

export default class Counter extends Component {
  static propTypes = {
    increment: PropTypes.func.isRequired,
    incrementIfOdd: PropTypes.func.isRequired,
    decrement: PropTypes.func.isRequired,
    counter: PropTypes.number.isRequired
  };

  render() {
    const { increment, incrementIfOdd, decrement, counter, incrementAsync } = this.props;
    return (
      <p>
        <input type="text" className="text" id="textField1" />
        Clicked: {counter} times
        {' '}
        <button id="increment" className="button" onClick={increment}>+</button>
        {' '}
        <button id="decrement" className="button" onClick={decrement}>-</button>
        {' '}
        <button id="incrementIfOdd" className="button" onClick={incrementIfOdd}>Increment if odd</button>
        {' '}
        <button id="incrementAsync" className="button" onClick={incrementAsync}>Increment Async</button>
        <input type="text" className="text" id="textField" />
      </p>
    );
  }
}


text:
GLOBAL_DB_TABLE_PREFIX="<% if (!projectcraft3) { %>craft_<% } %>"

# The path of the `craft` folder, relative to the root path; paths should always have a trailing /
GLOBAL_CRAFT_PATH="<% if (!projectcraft3) { %>craft/<% } %>"

# The maximum age of db backups in days; backups older than this will be automatically removed
GLOBAL_DB_BACKUPS_MAX_AGE=90

# -- LOCAL settings --

# Local path constants; paths should always have a trailing /
LOCAL_ROOT_PATH="<%= projectpath %>/dist/"
LOCAL_ASSETS_PATH=$LOCAL_ROOT_PATH"<% if (projectcraft3) { %>web<% } else { %>public<% } %>/uploads/"

# Local user & group that should own the Craft CMS install
LOCAL_CHOWN_USER="<%= fileUser %>"
LOCAL_CHOWN_GROUP="<%= fileGroup %>"

# Local directories relative to LOCAL_ROOT_PATH that should be writeable by the $CHOWN_GROUP<% if (projectcraft3) { %>
LOCAL_WRITEABLE_DIRS=(
                "${GLOBAL_CRAFT_PATH}storage"
                "${GLOBAL_CRAFT_PATH}config"
                "web/assets"
                "web/imager"
                )
<% } else { %>
LOCAL_WRITEABLE_DIRS=(
                "${GLOBAL_CRAFT_PATH}storage"
                "${GLOBAL_CRAFT_PATH}config"
                "${GLOBAL_CRAFT_PATH}app"
                "public/assets"
                "public/imager"
                )
<% } %>
# Local asset directories relative to LOCAL_ASSETS_PATH that should be synched with remote assets
LOCAL_ASSETS_DIRS=(
                "images"
                "imager"
                )

# Craft-specific file directories relative to LOCAL_CRAFT_FILES_PATH that should be synched with remote files
LOCAL_CRAFT_FILE_DIRS=(
                "rebrand"
                "userphotos"
                )

# Absolute paths to directories to back up, in addition to `LOCAL_ASSETS_DIRS` and `LOCAL_CRAFT_FILE_DIRS`
LOCAL_DIRS_TO_BACKUP=(
                )

# Local FastCGI Cache path; leave it empty ("") if you're not using FastCGI Cache; paths should always have a trailing /
# The `clear_caches.sh` script will delete everything in this directory when it is executed (say, on deploy)
LOCAL_FASTCGI_CACHE_DIR=""

# Local database constants
LOCAL_DB_NAME="<%= credentialdbdatabase %>"
LOCAL_DB_PASSWORD="<%= credentialdbpass %>"
LOCAL_DB_USER="<%= credentialdbuser %>"
LOCAL_DB_HOST="localhost"
LOCAL_DB_PORT="3306"
LOCAL_REDIS_DB_ID=""

# If you are using mysql 5.6.10 or later and you have `login-path` setup as per:
# https://opensourcedbms.com/dbms/passwordless-authentication-using-mysql_config_editor-with-mysql-5-6/
# you can use it instead of the above LOCAL_DB_* constants; otherwise leave this blank
LOCAL_DB_LOGIN_PATH=""

# The `mysql` and `mysqldump` commands to run locally
LOCAL_MYSQL_CMD="mysql"
LOCAL_MYSQLDUMP_CMD="mysqldump"

# Local backups path; paths should always have a trailing /
LOCAL_BACKUPS_PATH="REPLACE_ME"

# -- REMOTE settings --

# Remote ssh credentials, user@domain.com and Remote SSH Port
REMOTE_SSH_LOGIN="REPLACE_ME"
REMOTE_SSH_PORT="22"

# Remote path constants; paths should always have a trailing /
REMOTE_ROOT_PATH="REPLACE_ME"
REMOTE_ASSETS_PATH=${REMOTE_ROOT_PATH}"REPLACE_ME"

# Remote database constants
REMOTE_DB_NAME="REPLACE_ME"
REMOTE_DB_PASSWORD="REPLACE_ME"
REMOTE_DB_USER="REPLACE_ME"
REMOTE_DB_HOST="localhost"
REMOTE_DB_PORT="3306"

# If you are using mysql 5.6.10 or later and you have `login-path` setup as per:
# https://opensourcedbms.com/dbms/passwordless-authentication-using-mysql_config_editor-with-mysql-5-6/
# you can use it instead of the above REMOTE_DB_* constants; otherwise leave this blank
REMOTE_DB_LOGIN_PATH=""

# The `mysql` and `mysqldump` commands to run remotely
REMOTE_MYSQL_CMD="mysql"
REMOTE_MYSQLDUMP_CMD="mysqldump"

# Remote backups path; paths should always have a trailing /
REMOTE_BACKUPS_PATH="REPLACE_ME"

# Remote Amazon S3 bucket name
REMOTE_S3_BUCKET="REPLACE_ME"


text:
require 'hertz/engine'

require 'hertz/notifiable'
require 'hertz/notification_deliverer'

module Hertz
  class << self
    def configure
      yield self
    end

    def common_couriers=(couriers)
      @common_couriers = [couriers].flatten.map(&:to_sym)
    end

    def common_couriers
      @common_couriers ||= []
    end
  end
end


text:
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="index.css">

        <script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
        <script src="bower_components/director/build/director.js"></script>
        <script>
            // By default use shadow dom
            window.Polymer = window.Polymer || {};
            window.Polymer.dom = 'shadow';

            window.addEventListener('WebComponentsReady', function(WebComponentsReadyEvent){

                var redirect = function (page , param){

                    var ironPages = document.querySelector("#iron-pages"),
                        app       = document.querySelector("#app");

                    ironPages.select(page);
                    ironPages.selected = page;

                    var ironPage = ironPages.querySelector("[page='"+((page !== "undefined") ? page : 'home' )+"']");

                    app['page'] = page;
                    app['pageTitle'] = ironPage.attributes["page-title"].value;
                    app[ironPage.attributes.param.value] = param;

                    console.info("pagejs redirect to %s" , page);

                }

                var routes = {
                    '/*': redirect,
                    '/*/:params': redirect,
                };

                window.router = Router(routes);

                router.init();

            });

        </script>

        <link rel="import" href="bower_components/polymer/polymer.html">
        <link rel="import" href="bower_components/paper-toolbar/paper-toolbar.html">
        <link rel="import" href="bower_components/iron-icon/iron-icon.html">
        <link rel="import" href="bower_components/iron-pages/iron-pages.html">

        <!-- import the default set of icons -->
        <link rel="import" href="bower_components/iron-icons/iron-icons.html">
    </head>
    <body class="fullbleed layout vertical">
        <template id="app" is="dom-bind">
            <paper-toolbar>
            </paper-toolbar>
            <iron-pages id="iron-pages" attr-for-selected="page" selected="home" >
                <page page="home" param="num" page-title="Home Page"></page>
            </iron-pages>
        <template>
    </body>
</html>


text:
/**
 * Created by Andrew on 29.8.16.
 */

import { Injectable } from "@angular/core";
import { Question } from "../../model";
import { Observable } from "rxjs/Rx";
import { URLSearchParams } from "@angular/http";
import { HttpService } from "../../core/http.service";
import { AppConstants } from "../../app.component";

/**
 *
 */
@Injectable()
export class QuestionRepository
{
    /**
     *
     * @param httpService
     */
    constructor(private httpService: HttpService)
    {
    }

    /**
     *
     * @param question
     * @returns {Observable<any>}
     */
    public saveQuestion(question: Question): Observable<Question>
    {
        return this.httpService.save(AppConstants.QUESTIONS_URL, question);
    }

    /**
     *
     * @param courseId
     * @param seqList
     * @returns {Observable<any[]>}
     */
    public countQuestionsByCourseAndDeckKeyNot(courseId: number): Observable<number>
    {
        let params = new URLSearchParams();
        params.set('course', courseId.toString());

        return this.httpService.count(AppConstants.QUESTIONS_URL + "/search/countByCourseAndDeckKeyNot", params);
    }

    /**
     *
     * @param courseId
     * @param deckKeys
     * @returns {Observable<any[]>}
     */
    public findQuestionsByCourseAndDeckKeyIn(courseId: number, deckKeys: string[]): Observable<Question[]>
    {
        let params = new URLSearchParams();
        params.set('course', courseId.toString());
        params.set('deckKeys', deckKeys.join());

        return this.httpService.search(AppConstants.QUESTIONS_URL + "/search/findByCourseAndDeckKeyIn", params);
    }

}


text:
{{getHeading()}}

       Add {{configuration.rowName.titleize()}}


text:
'use strict';

/**
 * This provides an Angular service for keeping track of various pieces of information relevant to importing custom data,
 * to easily pass them from place to place.
 *
 * @class neonDemo.services.ImportService
 * @constructor
 */
angular.module('neonDemo.services')
.factory('ImportService', function() {
    var userName = '';
    var databaseName = '';
    var dateString = '';
    // The maximum file size allowed to be uploaded, in bytes.
    var MAX_SIZE = 30000000;

    var service = {};

    service.getUserName = function() {
        return userName;
    };

    service.setUserName = function(newName) {
        userName = newName;
    };

    service.getDatabaseName = function() {
        return databaseName;
    };

    service.setDatabaseName = function(newName) {
        databaseName = newName;
    };

    service.getDateString = function() {
        return dateString;
    };

    service.setDateString = function(newString) {
        dateString = newString;
    };

    /**
     * Gets the maximum allowable file input size, in either bytes or a human-readable string depending on
     * the value of the input parameter.
     * @param {boolean} Whether or not the output should be an integer number of bytes or in a human-readable string.
     * @return The maximum allowable file input size, either as a string if readable is true, or as an integer if
     * readable is false.
     */
    service.getMaxSize = function(readable) {
        return readable ? service.sizeToReadable(MAX_SIZE) : MAX_SIZE;
    };

    /**
     * Given an array of objects, assumed to each have a name field and a type field at the very least,
     * returns a new array of objects identical to the input array but with all fields except for name
     * and type removed. It also puts any values of pairs of type OBJECT into objectFTPairs of the
     * associated pair.
     * @param fieldtypePairs {Array} The array of objects, each with at least a name and a type field.
     * @return {Array} An array identical to the input array, but with all fields except for name, type,
     * and objectFTPairs removed.
     */
    service.getFieldsAndTypes = function(fieldTypePairs) {
        var toReturn = angular.copy(fieldTypePairs);
        var toRemoveIndices = [];

        fieldTypePairs.forEach(function(pair, index) {
            if(pair.keys && pair.keys.length && pair.type === "OBJECT") {
                var objectFTPairs = [];

                // Find and save in pair all objectFTPairs that are associated with pair and save the index to remove later
                pair.keys.forEach(function(key) {
                    var index = _.findIndex(toReturn, {
                        name: pair.name + "__" + key
                    });
                    objectFTPairs.push({
                        name: key,
                        type: toReturn[index].type
                    });
                    toRemoveIndices.push(index);
                });

                toReturn[index] = {
                    name: pair.name,
                    type: pair.type,
                    objectFTPairs: objectFTPairs
                };
            } else if(pair.keys && pair.keys.length && pair.type !== "OBJECT") {
                // Find all objectFTPairs that are associated with pair and save the index to remove later
                pair.keys.forEach(function(key) {
                    var index = _.findIndex(toReturn, {
                        name: pair.name + "__" + key
                    });
                    toRemoveIndices.push(index);
                });

                toReturn[index] = {
                    name: pair.name,
                    type: pair.type
                };
            }
        });

        // Removes any pairs that are in any objectFTPairs
        toReturn = _.map(toReturn, function(pair, index) {
            if(toRemoveIndices.indexOf(index) < 0) {
                return {
                    name: pair.name,
                    type: pair.type,
                    objectFTPairs: pair.objectFTPairs
                };
            }
        });

        return _.filter(toReturn, function(pair) {
            return pair;
        });
    };

    /**
     * Takes an integer and makes it more easily human-readable, assuming the number's units
     * are bytes. If the number is returned in anything other than bytes (if a number >= 1000
     * is given), this method returns up to one decimal point.
     * For instance, an input of 1023 would return 1 kB , while an input of 1058 would return 1.1 kB.
     * @param size {Integer} A number, assumed to be of bytes, to translate into human-reabable form.
     * @return {String} A human-readable version of the input number, with units attached.
     */
    service.sizeToReadable = function(size) {
        var nameList = ["bytes", "kB", "mB", "gB", "tB", "pB"];
        var name = 0;
        while(size > 1000) {
            size /= 1000;
            name++;
        }
        return (Math.round(size * 10) / 10) + " " + nameList[name];
    };

    return service;
});


text:
layout: default
---

{{ page.title }}

    {{ content }}

    Written on {{ page.date | date: "%B %e, %Y" }}

  {% include disqus.html %}


text:
using OpenTK;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Quad64.src.Scripts
{

    class ModelBuilder
    {
        public struct FinalMesh
        {
            public List<Vector3> vertices;
            public List<Vector2> texCoords;
            public List<Vector4> colors;
            public List<uint> indices;
        }

        public struct TempMesh
        {
            public List<Vector3> vertices;
            public List<Vector2> texCoords;
            public List<Vector4> colors;
            public FinalMesh final;
        }

        public struct TextureInfo
        {
            public int wrapS, wrapT;
        }

        public bool processingTexture = false;

        public float currentScale = 1f;
        private int currentMaterial = -1;
        public int numTriangles = 0;
        public int CurrentMaterial { get { return currentMaterial; } }

        private List<Bitmap> textureImages = new List<Bitmap>();
        private List<uint> textureAddresses = new List<uint>();
        private List<TextureInfo> textureInfo = new List<TextureInfo>();

        public List<Bitmap> TextureImages { get { return textureImages; } }
        public List<uint> TextureAddresses { get { return textureAddresses; } }
        public List<TextureInfo> TexInfo { get { return textureInfo; } }
        private List<TempMesh> TempMeshes = new List<TempMesh>();
        private FinalMesh finalMesh;

        public bool UsesFog { get; set; }
        public Color FogColor { get; set; }
        public List<uint> FogColor_romLocation = new List<uint>();

        private Vector3 offset = new Vector3(0, 0, 0);
        public Vector3 Offset { get { return offset; } set { offset = value; } }

        private FinalMesh newFinalMesh()
        {
            FinalMesh m = new FinalMesh();
            m.vertices = new List<Vector3>();
            m.texCoords = new List<Vector2>();
            m.colors = new List<Vector4>();
            m.indices = new List<uint>();
            return m;
        }
        private TempMesh newTempMesh()
        {
            TempMesh m = new TempMesh();
            m.vertices = new List<Vector3>();
            m.texCoords = new List<Vector2>();
            m.colors = new List<Vector4>();
            m.final = newFinalMesh();
            return m;
        }
        public TextureInfo newTexInfo(int wrapS, int wrapT)
        {
            TextureInfo info = new TextureInfo();
            info.wrapS = wrapS;
            info.wrapT = wrapT;
            return info;
        }

        public void AddTexture(Bitmap bmp, TextureInfo info, uint segmentAddress)
        {
            currentMaterial = textureImages.Count;
            textureImages.Add(bmp);
            textureAddresses.Add(segmentAddress);
            textureInfo.Add(info);
            TempMeshes.Add(newTempMesh());
        }

        public void AddTempVertex(Vector3 pos, Vector2 uv, Vector4 color)
        {
            pos += offset;
            if (currentScale != 1f)
                pos *= currentScale;
            //Console.WriteLine("currentMaterial = " + currentMaterial + ", totalCount = " + textureImages.Count);
            if (currentMaterial == -1)
            {
                AddTexture(
                    TextureFormats.createColorTexture(System.Drawing.Color.White),
                    newTexInfo((int)OpenTK.Graphics.OpenGL.All.Repeat, (int)OpenTK.Graphics.OpenGL.All.Repeat),
                    0x00000000
                );
            }
            TempMeshes[currentMaterial].vertices.Add(pos);
            TempMeshes[currentMaterial].texCoords.Add(uv);
            TempMeshes[currentMaterial].colors.Add(color);
        }
        /*
        private void AddFinalVertex(Vector3 pos, Vector2 uv, Vector4 color)
        {
            finalMesh.vertices.Add(pos);
            finalMesh.texCoords.Add(uv);
            finalMesh.colors.Add(color);
        }*/

        private int doesVertexAlreadyExist(int index, Vector3 pos, Vector2 uv, Vector4 col)
        {
            TempMesh tmp = TempMeshes[index];
            for (int i = 0; i < tmp.final.vertices.Count; i++)
            {
                Vector3 v = tmp.final.vertices[i];
                if(pos.X == v.X && pos.Y == v.Y && pos.Z == v.Z)
                {
                    Vector2 t = tmp.final.texCoords[i];
                    if (uv.X == t.X && uv.Y == t.Y)
                    {
                        Vector4 c = tmp.final.colors[i];
                        if (col.X == c.X && col.Y == c.Y && col.Z == c.Z && col.W == c.W)
                        {
                            return i;
                        }
                    }
                }
            }
            return -1;
        }

        public void BuildData(ref List<Model3D.MeshData> meshes) {
            finalMesh = newFinalMesh();
            for (int t = 0; t < TempMeshes.Count; t++) {
                uint indexCount = 0;
                Model3D.MeshData md = new Model3D.MeshData();
                Bitmap bmp = textureImages[t];
                md.texture = ContentPipe.LoadTexture(ref bmp);
                md.texture.TextureParamS = textureInfo[t].wrapS;
                md.texture.TextureParamT = textureInfo[t].wrapT;
                TempMesh temp = TempMeshes[t];
                for (int i = 0; i < temp.vertices.Count; i++)
                {
                    int vExists = doesVertexAlreadyExist(t, temp.vertices[i], temp.texCoords[i], temp.colors[i]);
                    if (vExists < 0)
                    {
                        Vector2 texCoord = temp.texCoords[i];
                        texCoord.X /= (float)bmp.Width * 32.0f;
                        texCoord.Y /= (float)bmp.Height * 32.0f;
                        temp.final.vertices.Add(temp.vertices[i]);
                        temp.final.texCoords.Add(texCoord);
                        temp.final.colors.Add(temp.colors[i]);
                        temp.final.indices.Add(indexCount);
                        indexCount++;
                    }
                    else
                    {
                        temp.final.indices.Add((uint)vExists);
                    }
                }
                meshes.Add(md);
            }
        }

        public Vector3[] getVertices(int i) {
            return TempMeshes[i].final.vertices.ToArray();
        }

        public Vector2[] getTexCoords(int i)
        {
            return TempMeshes[i].final.texCoords.ToArray();
        }

        public Vector4[] getColors(int i)
        {
            return TempMeshes[i].final.colors.ToArray();
        }

        public uint[] getIndices(int i)
        {
            return TempMeshes[i].final.indices.ToArray();
        }

        public bool hasTexture(uint segmentAddress)
        {
            int index = 0;
            foreach (uint addr in textureAddresses)
            {
                if (addr == segmentAddress)
                {
                    currentMaterial = index;
                    return true;
                }
                index++;
            }
            return false;
        }
    }
}


text:
package org.apache.webapp.admin.users;

import java.net.URLEncoder;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.Action;
import org.apache.struts.util.MessageResources;
import org.apache.webapp.admin.ApplicationServlet;
import org.apache.webapp.admin.TreeBuilder;
import org.apache.webapp.admin.TreeControl;
import org.apache.webapp.admin.TreeControlNode;

/**
 * Implementation of TreeBuilder that adds the nodes required
 * for administering the user database.
 *
 * @author Craig R. McClanahan
 * @version $Revision: 1.5 $ $Date: 2002/05/04 01:40:59 $
 * @since 4.1
 */

public class UsersTreeBuilder implements TreeBuilder {

    // ----------------------------------------------------- Instance Variables

    // ---------------------------------------------------- TreeBuilder Methods

    /**
     * Add the required nodes to the specified treeControl
     * instance.
     *
     * @param treeControl The TreeControl to which we should
     *  add our nodes
     * @param servlet The controller servlet for the admin application
     * @param request The servlet request we are processing
     */
    public void buildTree(TreeControl treeControl,
                          ApplicationServlet servlet,
                          HttpServletRequest request) {

        MessageResources resources = (MessageResources)
            servlet.getServletContext().getAttribute(Action.MESSAGES_KEY);
        addSubtree(treeControl.getRoot(), resources);

    }

    // ------------------------------------------------------ Protected Methods

    /**
     * Add the subtree of nodes required for user administration.
     *
     * @param root The root node of our tree control
     * @param resources The MessageResources for our localized messages
     *  messages
     */
    protected void addSubtree(TreeControlNode root,
                              MessageResources resources) {

        String databaseName = URLEncoder.encode
          ("Users:type=UserDatabase,database=UserDatabase");

        TreeControlNode subtree = new TreeControlNode
            ("Global User and Group Administration",
             "folder_16_pad.gif",
             resources.getMessage("users.treeBuilder.subtreeNode"),
             null,
             "content",
             true);
        TreeControlNode groups = new TreeControlNode
            ("Global Administer Groups",
             "Groups.gif",
             resources.getMessage("users.treeBuilder.groupsNode"),
             "users/listGroups.do?databaseName=" +
             URLEncoder.encode(databaseName) +
             "&forward=" +
             URLEncoder.encode("Groups List Setup"),
             "content",
             false);
        TreeControlNode roles = new TreeControlNode
            ("Global Administer Roles",
             "Roles.gif",
             resources.getMessage("users.treeBuilder.rolesNode"),
             "users/listRoles.do?databaseName=" +
             URLEncoder.encode(databaseName) +
             "&forward=" +
             URLEncoder.encode("Roles List Setup"),
             "content",
             false);
        TreeControlNode users = new TreeControlNode
            ("Global Administer Users",
             "Users.gif",
             resources.getMessage("users.treeBuilder.usersNode"),
             "users/listUsers.do?databaseName=" +
             URLEncoder.encode(databaseName) +
             "&forward=" +
             URLEncoder.encode("Users List Setup"),
             "content",
             false);

        root.addChild(subtree);
        subtree.addChild(users);
        subtree.addChild(groups);
        subtree.addChild(roles);

    }

}


text:
package com.facebook.buck.core.rules.knowntypes;

import com.facebook.buck.core.cell.Cell;

/** A factory to create {@link KnownNativeRuleTypes}. */
public interface KnownNativeRuleTypesFactory {

  /** Creates {@link KnownNativeRuleTypes} for a given {@link Cell} */
  KnownNativeRuleTypes create(Cell cell);
}


text:
<title>elfedit - GNU Binary Utilities</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Binary Utilities">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="readelf.html#readelf" title="readelf">
<link rel="next" href="Common-Options.html#Common-Options" title="Common Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">

<meta http-equiv="Content-Style-Type" content="text/css">

Next: Common Options,
Previous: readelf,
Up: Top

16 elfedit

     elfedit [<samp>--input-mach=</samp><var>machine</var>]
             [<samp>--input-type=</samp><var>type</var>]
             [<samp>--input-osabi=</samp><var>osabi</var>]
             <samp>--output-mach=</samp><var>machine</var>
             <samp>--output-type=</samp><var>type</var>
             <samp>--output-osabi=</samp><var>osabi</var>
             [<samp>-v</samp>|<samp>--version</samp>]
             [<samp>-h</samp>|<samp>--help</samp>]
             <var>elffile</var>...

<samp>elfedit</samp> updates the ELF header of ELF files which have
the matching ELF machine and file types.  The options control how and
which fields in the ELF header should be updated.

<var>elffile</var>... are the ELF files to be updated.  32-bit and
64-bit ELF files are supported, as are archives containing ELF files.

The long and short forms of options, shown here as alternatives, are
equivalent. At least one of the <samp>--output-mach</samp>,
<samp>--output-type</samp> and <samp>--output-osabi</samp> options must be given.

<samp>--input-mach=<var>machine</var></samp>
Set the matching input ELF machine type to <var>machine</var>.  If
<samp>--input-mach</samp> isn't specified, it will match any ELF
machine types.

The supported ELF machine types are, <var>L1OM</var>, <var>K1OM</var> and
<var>x86-64</var>.

<samp>--output-mach=<var>machine</var></samp>
Change the ELF machine type in the ELF header to <var>machine</var>.  The
supported ELF machine types are the same as <samp>--input-mach</samp>.

<samp>--input-type=<var>type</var></samp>
Set the matching input ELF file type to <var>type</var>.  If
<samp>--input-type</samp> isn't specified, it will match any ELF file types.

The supported ELF file types are, <var>rel</var>, <var>exec</var> and <var>dyn</var>.

<samp>--output-type=<var>type</var></samp>
Change the ELF file type in the ELF header to <var>type</var>.  The
supported ELF types are the same as <samp>--input-type</samp>.

<samp>--input-osabi=<var>osabi</var></samp>
Set the matching input ELF file OSABI to <var>osabi</var>.  If
<samp>--input-osabi</samp> isn't specified, it will match any ELF OSABIs.

The supported ELF OSABIs are, <var>none</var>, <var>HPUX</var>, <var>NetBSD</var>,
<var>GNU</var>, <var>Linux</var> (alias for <var>GNU</var>),
<var>Solaris</var>, <var>AIX</var>, <var>Irix</var>,
<var>FreeBSD</var>, <var>TRU64</var>, <var>Modesto</var>, <var>OpenBSD</var>, <var>OpenVMS</var>,
<var>NSK</var>, <var>AROS</var> and <var>FenixOS</var>.

<samp>--output-osabi=<var>osabi</var></samp>
Change the ELF OSABI in the ELF header to <var>osabi</var>.  The
supported ELF OSABI are the same as <samp>--input-osabi</samp>.

<samp>-v</samp>
<samp>--version</samp>
Display the version number of <samp>elfedit</samp>.

<samp>-h</samp>
<samp>--help</samp>
Display the command line options understood by <samp>elfedit</samp>.


text:
package enc

import (
	"bytes"
	"crypto/aes"
	"crypto/cipher"
	"crypto/ecdsa"
	crand "crypto/rand"
	"crypto/sha256"
	"errors"
	"fmt"
	mrand "math/rand"

	"github.com/drausin/libri/libri/common/ecid"
	cerrors "github.com/drausin/libri/libri/common/errors"
	"github.com/drausin/libri/libri/librarian/api"
	"golang.org/x/crypto/hkdf"
)

// ErrAuthorOffCurve indicates that an author ECDSA private key is is not on the expected curve.
var ErrAuthorOffCurve = errors.New("author public key point not on expected elliptic curve")

// ErrReaderOffCurve indicates that a reader ECDSA public key is is not on the expected curve.
var ErrReaderOffCurve = errors.New("reader public key point not on expected elliptic curve")

// ErrIncompleteKeyDefinition indicates that the key definition function was unable to generate
// the required number of bytes for the encryption keys.
var ErrIncompleteKeyDefinition = errors.New("incomplete key definition")

// ErrInsufficientEEKBytes indicates when the crypto random number generator is unable to generate
// the sufficient number of bytes for the EEK key.
var ErrInsufficientEEKBytes = errors.New("insufficient EEK bytes")

// KEK (key encryption keys) are used to encrypt an EEK.
type KEK struct {
	// AESKey is the 32-byte AES-256 key used to encrypt the EEK.
	AESKey []byte

	// IV is the 12-byte block cipher initialization vector (IV) seed.
	IV []byte

	// HMACKey is the 32-byte key used for the EEK ciphertext HMAC-256.
	HMACKey []byte
}

// NewKEK generates a new *KEK instance from the shared secret between a random ECDSA private and
// separate ECDSA public key.
func NewKEK(priv *ecdsa.PrivateKey, pub *ecdsa.PublicKey) (*KEK, error) {
	if !ecid.Curve.IsOnCurve(priv.X, priv.Y) {
		return nil, ErrAuthorOffCurve
	}
	if !ecid.Curve.IsOnCurve(pub.X, pub.Y) {
		return nil, ErrReaderOffCurve
	}
	secretX, _ := ecid.Curve.ScalarMult(pub.X, pub.Y, priv.D.Bytes())
	kdf := hkdf.New(sha256.New, secretX.Bytes(), nil, nil)
	kekBytes := make([]byte, api.KEKLength)
	n, err := kdf.Read(kekBytes)
	if err != nil {
		return nil, err
	}
	if n != api.KEKLength {
		return nil, ErrIncompleteKeyDefinition
	}
	return UnmarshalKEK(kekBytes)
}

// NewPseudoRandomKEK generates a new *KEK instance from a random number generator for use in
// testing.
func NewPseudoRandomKEK(rng *mrand.Rand) (*KEK, []byte, []byte) {
	authorPriv := ecid.NewPseudoRandom(rng)
	readerPriv := ecid.NewPseudoRandom(rng)
	keys, err := NewKEK(authorPriv.Key(), &readerPriv.Key().PublicKey)
	cerrors.MaybePanic(err)
	return keys, authorPriv.PublicKeyBytes(), readerPriv.PublicKeyBytes()
}

// Encrypt encrypts the EEK, returning the EEK ciphertext and ciphertext MAC.
func (kek *KEK) Encrypt(eek *EEK) ([]byte, []byte, error) {
	gcmCipher, err := newGCMCipher(kek.AESKey)
	if err != nil {
		return nil, nil, err
	}
	plaintext := MarshalEEK(eek)
	eekCiphertext := gcmCipher.Seal(nil, kek.IV, plaintext, nil)
	eekCiphertextMAC := HMAC(eekCiphertext, kek.HMACKey)
	return eekCiphertext, eekCiphertextMAC, nil
}

// Decrypt checkes the EEK ciphertext MAC and decrypts it to a an EEK.
func (kek *KEK) Decrypt(eekCiphertext []byte, eekCiphertextMAC []byte) (*EEK, error) {
	gcmCipher, err := newGCMCipher(kek.AESKey)
	if err != nil {
		return nil, err
	}
	if !bytes.Equal(eekCiphertextMAC, HMAC(eekCiphertext, kek.HMACKey)) {
		return nil, ErrUnexpectedCiphertextMAC
	}
	eekPlaintext, err := gcmCipher.Open(nil, kek.IV, eekCiphertext, nil)
	if err != nil {
		return nil, err
	}
	return UnmarshalEEK(eekPlaintext)
}

// MarshalKEK serializes the EEK to their byte representation.
func MarshalKEK(keys *KEK) []byte {
	return bytes.Join(
		[][]byte{
			keys.AESKey,
			keys.IV,
			keys.HMACKey,
		},
		[]byte{},
	)
}

// UnmarshalKEK deserializes the KEK from its byte representation.
func UnmarshalKEK(x []byte) (*KEK, error) {
	err := api.ValidateBytes(x, api.KEKLength, "KEK byte representation")
	if err != nil {
		return nil, err
	}
	var offset int
	return &KEK{
		AESKey:  next(x, &offset, api.AESKeyLength),
		IV:      next(x, &offset, api.BlockCipherIVLength),
		HMACKey: next(x, &offset, api.HMACKeyLength),
	}, nil
}

// EEK (entry encryption keys) are used to encrypt an Entry and its Pages.
type EEK struct {
	// AESKey is the 32-byte AES-256 key used to encrypt Pages and Entry metadata.
	AESKey []byte

	// PageIVSeed is the 32-byte block cipher initialization vector (IV) seed for Page
	// enc.
	PageIVSeed []byte

	// HMACKey is the 32-byte key used for Page HMAC-256 calculations.
	HMACKey []byte

	// MetadataIV is the 12-byte IV for the Entry metadata block cipher.
	MetadataIV []byte
}

// NewEEK generates a *EEK instance using the private and public ECDSA keys.
func NewEEK() (*EEK, error) {
	eekBytes := make([]byte, api.EEKLength)
	nRead1, err := crand.Reader.Read(eekBytes)
	if err != nil {
		return nil, err
	}
	if nRead1 != api.EEKLength {
		// sometimes the crand.Reader runs out of bytes, so try reading again one more time
		nRead2, err := crand.Reader.Read(eekBytes)
		if err != nil {
			return nil, err
		}
		if nRead2 != api.EEKLength {
			return nil, ErrInsufficientEEKBytes
		}
	}
	return UnmarshalEEK(eekBytes)
}

// NewPseudoRandomEEK generates a new *EEK instance from a random number generator for use in
// testing.
func NewPseudoRandomEEK(rng *mrand.Rand) *EEK {
	eekBytes := make([]byte, api.EEKLength)
	nRead, err := rng.Read(eekBytes)
	cerrors.MaybePanic(err)
	if nRead != api.EEKLength {
		panic(fmt.Errorf("nRead (%d) != EEKLength (%d)", nRead, api.EEKLength))
	}
	eek, err := UnmarshalEEK(eekBytes)
	cerrors.MaybePanic(err)
	return eek
}

// MarshalEEK serializes the EEK to their byte representation.
func MarshalEEK(keys *EEK) []byte {
	return bytes.Join(
		[][]byte{
			keys.AESKey,
			keys.PageIVSeed,
			keys.HMACKey,
			keys.MetadataIV,
		},
		[]byte{},
	)
}

// UnmarshalEEK deserializes the EEK from its byte representation.
func UnmarshalEEK(x []byte) (*EEK, error) {
	err := api.ValidateBytes(x, api.EEKLength, "EEK byte representation")
	if err != nil {
		return nil, err
	}
	var offset int
	return &EEK{
		AESKey:     next(x, &offset, api.AESKeyLength),
		PageIVSeed: next(x, &offset, api.PageIVSeedLength),
		HMACKey:    next(x, &offset, api.HMACKeyLength),
		MetadataIV: next(x, &offset, api.BlockCipherIVLength),
	}, nil
}

func newGCMCipher(aesKey []byte) (cipher.AEAD, error) {
	block, err := aes.NewCipher(aesKey)
	if err != nil {
		return nil, err
	}
	return cipher.NewGCM(block)
}

func next(x []byte, offset *int, len int) []byte {
	next := x[*offset : *offset+len]
	*offset += len
	return next
}


text:
module Apigee
  class API
    module Apps

      # List apps in an org
      def apps(options={})
        get('/apps', options)
      end

      # Get an app profile (by id)
      def app_by_id(id)
        get("/apps/#{id}")
      end
      alias :app :app_by_id

      # Get an app profile (by family)
      def apps_by_family(family)
        apps(:appfamily => family)
      end

      # Get an app profile (by status)
      def apps_by_status(status)
        apps(:status => status)
      end

      # Get an app profile (by type)
      def apps_by_type(type)
        apps(:apptype => type)
      end

      # Get an app profile (by type)
      def apps_by_creation_date(createdat)
        t = createdat.is_a?(Time) ? createdat.to_i : createdat
        apps(:createdat => t)
      end

    end
  end
end


text:
package com.arjuna.qa.junit;

import org.jboss.arquillian.junit.Arquillian;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(Arquillian.class)
public class TestBASubordinateCrashDuringCommitAfterSubordinateExit extends
		BaseCrashTest {
	public TestBASubordinateCrashDuringCommitAfterSubordinateExit() {
		scriptName = "BASubordinateCrashDuringCommitAfterSubordinateExit";
	}

	@Test
	public void subordinateMultiParticipantCoordinatorCompletionParticipantCloseAndExitTest() throws Exception {
		testName = "subordinate.MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest";
		String testClass = "org.jboss.jbossts.xts.servicetests.test.ba.subordinate.MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest";
		runTest(testClass);
	}

	@Test
	public void subordinateMultiParticipantParticipantCompletionParticipantCloseAndExitTest() throws Exception {
		testName = "subordinate.MultiParticipantParticipantCompletionParticipantCloseAndExitTest";
		String testClass = "org.jboss.jbossts.xts.servicetests.test.ba.subordinate.MultiParticipantParticipantCompletionParticipantCloseAndExitTest";
		runTest(testClass);
	}
}


text:
START_ATF_NAMESPACE
    typedef tagEXTLOGFONTA *PEXTLOGFONT;
END_ATF_NAMESPACE