text:
    $(window).load(function(){
      $('.flexslider').flexslider({
        animation: "fade",

        start: function(){},            //Callback: function(slider) - Fires when the slider loads the first slide
		before: function(){captionMoveOut();},           //Callback: function(slider) - Fires asynchronously with each slider animation
		after: function(){captionMoveIn();},            //Callback: function(slider) - Fires after each slider animation completes
		end: function(){},              //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
		added: function(){},            //{NEW} Callback: function(slider) - Fires after a slide is added
		removed: function(){}
      });

      $('.flex-caption').hide();

       $('.flex-caption').fadeIn(2000);
    });

    function captionMoveIn() {
		$('.flex-caption')
		.animate({top: "35%"},0)
		.fadeIn(2000)
	;};

	function captionMoveOut() {
		$('.flex-caption')
		.animate({top: "-40%"},700)
		.fadeOut("normal")

	;};


text:
Title: US Secure Hosting Center - an XSF Sponsor
Date: 2011-04-27 12:14:59
Author: willsheward
Slug: us-secure-hosting-center
Category: page
Tags:
Summary: description:
Link: http://xmpp.org/sponsor/our-sponsors/us-secure-hosting-center/
post_id: 2233

## [![USSHC](/wp-content/uploads/2010/02/sidebar-usshc.png)](http://www.usshc.com/philosophy/)

USSHC is a privately owned underground secure colocation data center located in the rural Midwestern United States. We take pride in offering the most secure, carrier-class colocation data center services available. USSHC hosts the servers on which xmpp.org and jabber.org services are run.

### Unmatched Excellence

Unmatched excellence in security, and colocation services is our first priority. No other commercially available colocation facility can match our level of physical security for your colocated equipment. Multiple layers of security and redundancy are practiced throughout the data center facility. All security, cooling, power, and connectivity systems are implemented in layers, with primary, backup, and tertiary systems used throughout the underground colocation data center.

### Working with the leaders…

Our partners and customers are the new industry leaders in business continuity, information assurance, and disaster recovery and disaster preparedness programs.

### USSHC Owned

USSHC owns the data center. Unlike many secure internet colocation data centers, USSHC owns the building, the land above, below, and around it, the campus, and all infrastructure improvements. This ensures that both USSHC and their colocation customers have maximum flexibility and long term security.

redpajama_set_name: RedPajamaGithub


text:
/*
 *
 * Login
 *
 */

import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import { selectLoggedIn } from 'utils/auth/selectors';
import { selectQueryParams } from 'containers/App/selectors';

import styles from './styles.css';
import { createStructuredSelector } from 'reselect';
import { push } from 'react-router-redux';
import { saveUserSession } from 'utils/auth/actions';

export class Login extends React.Component { // eslint-disable-line react/prefer-stateless-function
  constructor(props) {
    super(props);
    this.gotoHome = this.gotoHome.bind(this);
    this.saveUserSession = this.saveUserSession.bind(this);
  }
  componentDidMount() {
    if (this.props.loggedIn) {
      this.gotoHome();
    } else {
      this.saveUserSession();
    }
  }
  componentDidUpdate(newProps) {
    if (this.props.loggedIn && this.props.loggedIn !== newProps.loggedIn) {
      this.gotoHome();
    } else {
      this.saveUserSession();
    }
  }
  saveUserSession() {
    const auth0Data = JSON.parse(localStorage.getItem('AUTH0_DATA'));
    if (auth0Data) {
      localStorage.removeItem('AUTH0_DATA');
      this.props.saveUserSession(auth0Data);
    }
  }
  gotoHome() {
    this.props.changeRoute('/');
  }
  render() {
    return (
      <div className={styles.login}>
        <Helmet
          title="Login"
          meta={[
            { name: 'Crea tu cuenta en CWRKS!', content: 'CWRKS, es EL sitio colaborativo para encontrar tu mejor opcion de cowork' },
          ]}
        />
        <h1> Login </h1>
      </div>
    );
  }
}

Login.propTypes = {
  dispatch: PropTypes.func.isRequired,
  loggedIn: PropTypes.bool.isRequired,
  changeRoute: PropTypes.func.isRequired,
  saveUserSession: PropTypes.func.isRequired,
  queryParams: PropTypes.shape({
    state: PropTypes.string,
    code: PropTypes.string,
  }).isRequired,
};

const mapStateToProps = createStructuredSelector({
  queryParams: selectQueryParams(),
  loggedIn: selectLoggedIn(),
});

function mapDispatchToProps(dispatch) {
  return {
    saveUserSession: (code, state) => dispatch(saveUserSession(code, state)),
    changeRoute: (url) => dispatch(push(url)),
    dispatch,
  };
}

export default connect(mapStateToProps, mapDispatchToProps)(Login);


text:
<?php

namespace Mhor\MediaInfo\Tests\Attribute;

use Mhor\MediaInfo\Attribute\Cover;
use Mhor\MediaInfo\Attribute\Duration;
use Mhor\MediaInfo\Attribute\Mode;
use Mhor\MediaInfo\Attribute\Rate;
use Mhor\MediaInfo\Attribute\Ratio;
use Mhor\MediaInfo\Attribute\Size;
use PHPUnit\Framework\TestCase;

class AttributeTest extends TestCase
{
    public function testCover(): void
    {
        $cover = new Cover('binary_string');
        $this->assertEquals('binary_string', $cover->getBinaryCover());
        $this->assertSame('binary_string', (string) $cover);
    }

    public function testDuration(): void
    {
        $duration = new Duration('1000');
        $this->assertSame(1000, $duration->getMilliseconds());
        $this->assertTrue(is_int($duration->getMilliseconds()));
        $this->assertSame('1000', (string) $duration);
    }

    public function testMode(): void
    {
        $mode = new Mode('short', 'full');
        $this->assertEquals('short', $mode->getShortName());
        $this->assertEquals('full', $mode->getFullName());
        $this->assertSame('short', (string) $mode);
    }

    public function testRatio(): void
    {
        $ratio = new Ratio('15555', '15.55 Mo');
        $this->assertSame(15555.0, $ratio->getAbsoluteValue());
        $this->assertTrue(is_float($ratio->getAbsoluteValue()));
        $this->assertEquals('15.55 Mo', $ratio->getTextValue());
        $this->assertSame('15.55 Mo', (string) $ratio);
    }

    public function testRate(): void
    {
        $rate = new Rate('720', '720p');
        $this->assertSame(720, $rate->getAbsoluteValue());
        $this->assertTrue(is_int($rate->getAbsoluteValue()));
        $this->assertEquals('720p', $rate->getTextValue());
        $this->assertSame('720p', (string) $rate);
    }

    public function testSize(): void
    {
        $size = new Size('42');
        $this->assertSame(42, $size->getBit());
        $this->assertTrue(is_int($size->getBit()));
        $this->assertSame('42', (string) $size);
    }
}


text:
namespace MassTransit.MongoDbIntegration.MessageData
{
    using System;
    using MongoDB.Bson;

    public class MessageDataResolver :
        IMessageDataResolver
    {
        const string Scheme = "urn";
        const string System = "mongodb";
        const string Specification = "gridfs";

        readonly string _format = string.Join(":", Scheme, System, Specification);

        public ObjectId GetObjectId(Uri address)
        {
            if (address.Scheme != Scheme)
                throw new UriFormatException($"The scheme did not match the expected value: {Scheme}");

            string[] tokens = address.AbsolutePath.Split(':');

            if (tokens.Length != 3 || !address.AbsoluteUri.StartsWith($"{_format}:"))
                throw new UriFormatException($"Urn is not in the correct format. Use '{_format}:{{resourceId}}'");

            return ObjectId.Parse(tokens[2]);
        }

        public Uri GetAddress(ObjectId id)
        {
            return new Uri($"{_format}:{id}");
        }
    }
}


text:
alarm_clock
===========

LIFX based alarm clock implementation in node.

This starts a sunrise alarm using the LIFX bulbs, fading from red to bright yellow.

The app currently operates with crontab entries using the /bin scripts to turn lights on and off as desired. I may add functionality to support node cron fully and allow for easier alarm setting than via crontab -e


text:
package pkg;

public class SuperClass {

  protected int pi;

  static protected int spi;

  protected int pm() { return 1; }

  static protected int spm() { return 1; }

  protected class pC { }

  static protected class spC { }

  protected interface pI { }

  static protected interface spI { }

}


text:
test_description='Merge-recursive merging renames'
. ./test-lib.sh

modify () {
	sed -e "$1" <"$2" >"$2.x" &&
	mv "$2.x" "$2"
}

test_expect_success setup \
'
cat >A <<\EOF &&
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
c cccccccccccccccccccccccccccccccccccccccccccccccc
d dddddddddddddddddddddddddddddddddddddddddddddddd
e eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
f ffffffffffffffffffffffffffffffffffffffffffffffff
g gggggggggggggggggggggggggggggggggggggggggggggggg
h hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
j jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
k kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
l llllllllllllllllllllllllllllllllllllllllllllllll
m mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
n nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
o oooooooooooooooooooooooooooooooooooooooooooooooo
EOF

cat >M <<\EOF &&
A AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
B BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
D DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
E EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
F FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
H HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
I IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
K KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
L LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
M MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
N NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
O OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
EOF

git add A M &&
git commit -m "initial has A and M" &&
git branch white &&
git branch red &&
git branch blue &&
git branch yellow &&
git branch change &&
git branch change+rename &&

sed -e "/^g /s/.*/g : master changes a line/" A+ &&
mv A+ A &&
git commit -a -m "master updates A" &&

git checkout yellow &&
rm -f M &&
git commit -a -m "yellow removes M" &&

git checkout white &&
sed -e "/^g /s/.*/g : white changes a line/" B &&
sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
rm -f A M &&
git update-index --add --remove A B M N &&
git commit -m "white renames A->B, M->N" &&

git checkout red &&
sed -e "/^g /s/.*/g : red changes a line/" B &&
sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
rm -f A M &&
git update-index --add --remove A B M N &&
git commit -m "red renames A->B, M->N" &&

git checkout blue &&
sed -e "/^g /s/.*/g : blue changes a line/" C &&
sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
rm -f A M &&
git update-index --add --remove A C M N &&
git commit -m "blue renames A->C, M->N" &&

git checkout change &&
sed -e "/^g /s/.*/g : changed line/" A+ &&
mv A+ A &&
git commit -q -a -m "changed" &&

git checkout change+rename &&
sed -e "/^g /s/.*/g : changed line/" B &&
rm A &&
git update-index --add B &&
git commit -q -a -m "changed and renamed" &&

git checkout master'

test_expect_success 'pull renaming branch into unrenaming one' \
'
	git show-branch &&
	test_expect_code 1 git pull . white &&
	git ls-files -s &&
	git ls-files -u B >b.stages &&
	test_line_count = 3 b.stages &&
	git ls-files -s N >n.stages &&
	test_line_count = 1 n.stages &&
	sed -ne "/^g/{
	p
	q
	}" B | grep master &&
	git diff --exit-code white N
'

test_expect_success 'pull renaming branch into another renaming one' \
'
	rm -f B &&
	git reset --hard &&
	git checkout red &&
	test_expect_code 1 git pull . white &&
	git ls-files -u B >b.stages &&
	test_line_count = 3 b.stages &&
	git ls-files -s N >n.stages &&
	test_line_count = 1 n.stages &&
	sed -ne "/^g/{
	p
	q
	}" B | grep red &&
	git diff --exit-code white N
'

test_expect_success 'pull unrenaming branch into renaming one' \
'
	git reset --hard &&
	git show-branch &&
	test_expect_code 1 git pull . master &&
	git ls-files -u B >b.stages &&
	test_line_count = 3 b.stages &&
	git ls-files -s N >n.stages &&
	test_line_count = 1 n.stages &&
	sed -ne "/^g/{
	p
	q
	}" B | grep red &&
	git diff --exit-code white N
'

test_expect_success 'pull conflicting renames' \
'
	git reset --hard &&
	git show-branch &&
	test_expect_code 1 git pull . blue &&
	git ls-files -u A >a.stages &&
	test_line_count = 1 a.stages &&
	git ls-files -u B >b.stages &&
	test_line_count = 1 b.stages &&
	git ls-files -u C >c.stages &&
	test_line_count = 1 c.stages &&
	git ls-files -s N >n.stages &&
	test_line_count = 1 n.stages &&
	sed -ne "/^g/{
	p
	q
	}" B | grep red &&
	git diff --exit-code white N
'

test_expect_success 'interference with untracked working tree file' '
	git reset --hard &&
	git show-branch &&
	echo >A this file should not matter &&
	test_expect_code 1 git pull . white &&
	test_path_is_file A
'

test_expect_success 'interference with untracked working tree file' '
	git reset --hard &&
	git checkout white &&
	git show-branch &&
	rm -f A &&
	echo >A this file should not matter &&
	test_expect_code 1 git pull . red &&
	test_path_is_file A
'

test_expect_success 'interference with untracked working tree file' '
	git reset --hard &&
	rm -f A M &&
	git checkout -f master &&
	git tag -f anchor &&
	git show-branch &&
	git pull . yellow &&
	test_path_is_missing M &&
	git reset --hard anchor
'

test_expect_success 'updated working tree file should prevent the merge' '
	git reset --hard &&
	rm -f A M &&
	git checkout -f master &&
	git tag -f anchor &&
	git show-branch &&
	echo >>M one line addition &&
	cat M >M.saved &&
	test_expect_code 128 git pull . yellow &&
	test_cmp M M.saved &&
	rm -f M.saved
'

test_expect_success 'updated working tree file should prevent the merge' '
	git reset --hard &&
	rm -f A M &&
	git checkout -f master &&
	git tag -f anchor &&
	git show-branch &&
	echo >>M one line addition &&
	cat M >M.saved &&
	git update-index M &&
	test_expect_code 128 git pull . yellow &&
	test_cmp M M.saved &&
	rm -f M.saved
'

test_expect_success 'interference with untracked working tree file' '
	git reset --hard &&
	rm -f A M &&
	git checkout -f yellow &&
	git tag -f anchor &&
	git show-branch &&
	echo >M this file should not matter &&
	git pull . master &&
	test_path_is_file M &&
	! {
		git ls-files -s |
		grep M
	} &&
	git reset --hard anchor
'

test_expect_success 'merge of identical changes in a renamed file' '
	rm -f A M N &&
	git reset --hard &&
	git checkout change+rename &&
	GIT_MERGE_VERBOSITY=3 git merge change | grep "^Skipped B" &&
	git reset --hard HEAD^ &&
	git checkout change &&
	GIT_MERGE_VERBOSITY=3 git merge change+rename | grep "^Skipped B"
'

test_expect_success 'setup for rename + d/f conflicts' '
	git reset --hard &&
	git checkout --orphan dir-in-way &&
	git rm -rf . &&

	mkdir sub &&
	mkdir dir &&
	printf "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n" >sub/file &&
	echo foo >dir/file-in-the-way &&
	git add -A &&
	git commit -m "Common commmit" &&

	echo 11 >>sub/file &&
	echo more >>dir/file-in-the-way &&
	git add -u &&
	git commit -m "Commit to merge, with dir in the way" &&

	git checkout -b dir-not-in-way &&
	git reset --soft HEAD^ &&
	git rm -rf dir &&
	git commit -m "Commit to merge, with dir removed" -- dir sub/file &&

	git checkout -b renamed-file-has-no-conflicts dir-in-way~1 &&
	git rm -rf dir &&
	git rm sub/file &&
	printf "1\n2\n3\n4\n5555\n6\n7\n8\n9\n10\n" >dir &&
	git add dir &&
	git commit -m "Independent change" &&

	git checkout -b renamed-file-has-conflicts dir-in-way~1 &&
	git rm -rf dir &&
	git mv sub/file dir &&
	echo 12 >>dir &&
	git add dir &&
	git commit -m "Conflicting change"
'

printf "1\n2\n3\n4\n5555\n6\n7\n8\n9\n10\n11\n" >expected

test_expect_success 'Rename+D/F conflict; renamed file merges + dir not in way' '
	git reset --hard &&
	git checkout -q renamed-file-has-no-conflicts^0 &&
	git merge --strategy=recursive dir-not-in-way &&
	git diff --quiet &&
	test -f dir &&
	test_cmp expected dir
'

test_expect_success 'Rename+D/F conflict; renamed file merges but dir in way' '
	git reset --hard &&
	rm -rf dir~* &&
	git checkout -q renamed-file-has-no-conflicts^0 &&
	test_must_fail git merge --strategy=recursive dir-in-way >output &&

	grep "CONFLICT (delete/modify): dir/file-in-the-way" output &&
	grep "Auto-merging dir" output &&
	grep "Adding as dir~HEAD instead" output &&

	test 2 -eq "$(git ls-files -u | wc -l)" &&
	test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&

	test_must_fail git diff --quiet &&
	test_must_fail git diff --cached --quiet &&

	test -f dir/file-in-the-way &&
	test -f dir~HEAD &&
	test_cmp expected dir~HEAD
'

test_expect_success 'Same as previous, but merged other way' '
	git reset --hard &&
	rm -rf dir~* &&
	git checkout -q dir-in-way^0 &&
	test_must_fail git merge --strategy=recursive renamed-file-has-no-conflicts >output 2>errors &&

	! grep "error: refusing to lose untracked file at" errors &&
	grep "CONFLICT (delete/modify): dir/file-in-the-way" output &&
	grep "Auto-merging dir" output &&
	grep "Adding as dir~renamed-file-has-no-conflicts instead" output &&

	test 2 -eq "$(git ls-files -u | wc -l)" &&
	test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&

	test_must_fail git diff --quiet &&
	test_must_fail git diff --cached --quiet &&

	test -f dir/file-in-the-way &&
	test -f dir~renamed-file-has-no-conflicts &&
	test_cmp expected dir~renamed-file-has-no-conflicts
'

cat >expected <<\EOF &&
1
2
3
4
5
6
7
8
9
10
<<<<<<>>>>>> dir-not-in-way
EOF

test_expect_success 'Rename+D/F conflict; renamed file cannot merge, dir not in way' '
	git reset --hard &&
	rm -rf dir~* &&
	git checkout -q renamed-file-has-conflicts^0 &&
	test_must_fail git merge --strategy=recursive dir-not-in-way &&

	test 3 -eq "$(git ls-files -u | wc -l)" &&
	test 3 -eq "$(git ls-files -u dir | wc -l)" &&

	test_must_fail git diff --quiet &&
	test_must_fail git diff --cached --quiet &&

	test -f dir &&
	test_cmp expected dir
'

test_expect_success 'Rename+D/F conflict; renamed file cannot merge and dir in the way' '
	modify s/dir-not-in-way/dir-in-way/ expected &&

	git reset --hard &&
	rm -rf dir~* &&
	git checkout -q renamed-file-has-conflicts^0 &&
	test_must_fail git merge --strategy=recursive dir-in-way &&

	test 5 -eq "$(git ls-files -u | wc -l)" &&
	test 3 -eq "$(git ls-files -u dir | grep -v file-in-the-way | wc -l)" &&
	test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&

	test_must_fail git diff --quiet &&
	test_must_fail git diff --cached --quiet &&

	test -f dir/file-in-the-way &&
	test -f dir~HEAD &&
	test_cmp expected dir~HEAD
'

cat >expected <<\EOF &&
1
2
3
4
5
6
7
8
9
10
<<<<<<>>>>>> renamed-file-has-conflicts
EOF

test_expect_success 'Same as previous, but merged other way' '
	git reset --hard &&
	rm -rf dir~* &&
	git checkout -q dir-in-way^0 &&
	test_must_fail git merge --strategy=recursive renamed-file-has-conflicts &&

	test 5 -eq "$(git ls-files -u | wc -l)" &&
	test 3 -eq "$(git ls-files -u dir | grep -v file-in-the-way | wc -l)" &&
	test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&

	test_must_fail git diff --quiet &&
	test_must_fail git diff --cached --quiet &&

	test -f dir/file-in-the-way &&
	test -f dir~renamed-file-has-conflicts &&
	test_cmp expected dir~renamed-file-has-conflicts
'

test_expect_success 'setup both rename source and destination involved in D/F conflict' '
	git reset --hard &&
	git checkout --orphan rename-dest &&
	git rm -rf . &&
	git clean -fdqx &&

	mkdir one &&
	echo stuff >one/file &&
	git add -A &&
	git commit -m "Common commmit" &&

	git mv one/file destdir &&
	git commit -m "Renamed to destdir" &&

	git checkout -b source-conflict HEAD~1 &&
	git rm -rf one &&
	mkdir destdir &&
	touch one destdir/foo &&
	git add -A &&
	git commit -m "Conflicts in the way"
'

test_expect_success 'both rename source and destination involved in D/F conflict' '
	git reset --hard &&
	rm -rf dir~* &&
	git checkout -q rename-dest^0 &&
	test_must_fail git merge --strategy=recursive source-conflict &&

	test 1 -eq "$(git ls-files -u | wc -l)" &&

	test_must_fail git diff --quiet &&

	test -f destdir/foo &&
	test -f one &&
	test -f destdir~HEAD &&
	test "stuff" = "$(cat destdir~HEAD)"
'

test_expect_success 'setup pair rename to parent of other (D/F conflicts)' '
	git reset --hard &&
	git checkout --orphan rename-two &&
	git rm -rf . &&
	git clean -fdqx &&

	mkdir one &&
	mkdir two &&
	echo stuff >one/file &&
	echo other >two/file &&
	git add -A &&
	git commit -m "Common commmit" &&

	git rm -rf one &&
	git mv two/file one &&
	git commit -m "Rename two/file -> one" &&

	git checkout -b rename-one HEAD~1 &&
	git rm -rf two &&
	git mv one/file two &&
	rm -r one &&
	git commit -m "Rename one/file -> two"
'

test_expect_success 'pair rename to parent of other (D/F conflicts) w/ untracked dir' '
	git checkout -q rename-one^0 &&
	mkdir one &&
	test_must_fail git merge --strategy=recursive rename-two &&

	test 2 -eq "$(git ls-files -u | wc -l)" &&
	test 1 -eq "$(git ls-files -u one | wc -l)" &&
	test 1 -eq "$(git ls-files -u two | wc -l)" &&

	test_must_fail git diff --quiet &&

	test 4 -eq $(find . | grep -v .git | wc -l) &&

	test -d one &&
	test -f one~rename-two &&
	test -f two &&
	test "other" = $(cat one~rename-two) &&
	test "stuff" = $(cat two)
'

test_expect_success 'pair rename to parent of other (D/F conflicts) w/ clean start' '
	git reset --hard &&
	git clean -fdqx &&
	test_must_fail git merge --strategy=recursive rename-two &&

	test 2 -eq "$(git ls-files -u | wc -l)" &&
	test 1 -eq "$(git ls-files -u one | wc -l)" &&
	test 1 -eq "$(git ls-files -u two | wc -l)" &&

	test_must_fail git diff --quiet &&

	test 3 -eq $(find . | grep -v .git | wc -l) &&

	test -f one &&
	test -f two &&
	test "other" = $(cat one) &&
	test "stuff" = $(cat two)
'

test_expect_success 'setup rename of one file to two, with directories in the way' '
	git reset --hard &&
	git checkout --orphan first-rename &&
	git rm -rf . &&
	git clean -fdqx &&

	echo stuff >original &&
	git add -A &&
	git commit -m "Common commmit" &&

	mkdir two &&
	>two/file &&
	git add two/file &&
	git mv original one &&
	git commit -m "Put two/file in the way, rename to one" &&

	git checkout -b second-rename HEAD~1 &&
	mkdir one &&
	>one/file &&
	git add one/file &&
	git mv original two &&
	git commit -m "Put one/file in the way, rename to two"
'

test_expect_success 'check handling of differently renamed file with D/F conflicts' '
	git checkout -q first-rename^0 &&
	test_must_fail git merge --strategy=recursive second-rename &&

	test 5 -eq "$(git ls-files -s | wc -l)" &&
	test 3 -eq "$(git ls-files -u | wc -l)" &&
	test 1 -eq "$(git ls-files -u one | wc -l)" &&
	test 1 -eq "$(git ls-files -u two | wc -l)" &&
	test 1 -eq "$(git ls-files -u original | wc -l)" &&
	test 2 -eq "$(git ls-files -o | wc -l)" &&

	test -f one/file &&
	test -f two/file &&
	test -f one~HEAD &&
	test -f two~second-rename &&
	! test -f original
'

test_expect_success 'setup rename one file to two; directories moving out of the way' '
	git reset --hard &&
	git checkout --orphan first-rename-redo &&
	git rm -rf . &&
	git clean -fdqx &&

	echo stuff >original &&
	mkdir one two &&
	touch one/file two/file &&
	git add -A &&
	git commit -m "Common commmit" &&

	git rm -rf one &&
	git mv original one &&
	git commit -m "Rename to one" &&

	git checkout -b second-rename-redo HEAD~1 &&
	git rm -rf two &&
	git mv original two &&
	git commit -m "Rename to two"
'

test_expect_success 'check handling of differently renamed file with D/F conflicts' '
	git checkout -q first-rename-redo^0 &&
	test_must_fail git merge --strategy=recursive second-rename-redo &&

	test 3 -eq "$(git ls-files -u | wc -l)" &&
	test 1 -eq "$(git ls-files -u one | wc -l)" &&
	test 1 -eq "$(git ls-files -u two | wc -l)" &&
	test 1 -eq "$(git ls-files -u original | wc -l)" &&
	test 0 -eq "$(git ls-files -o | wc -l)" &&

	test -f one &&
	test -f two &&
	! test -f original
'

test_done


text:
package co.cask.cdap.explore.table;

import co.cask.cdap.api.data.schema.Schema;
import co.cask.cdap.api.dataset.lib.Partitioning;
import co.cask.cdap.common.conf.Constants;
import co.cask.cdap.common.utils.ProjectInfo;
import co.cask.cdap.hive.stream.StreamStorageHandler;
import com.google.common.collect.ImmutableMap;
import org.junit.Assert;
import org.junit.Test;

import java.util.Map;

/**
 *
 */
public class CreateStatementBuilderTest {

  @Test
  public void testStorageHandlerCreate() throws Exception {
    String expected = "CREATE EXTERNAL TABLE IF NOT EXISTS stream_purchases " +
      "(f1 string, f2 int, f3 double, f4 boolean, f5 float, f6 binary) COMMENT 'CDAP Stream' " +
      "STORED BY 'co.cask.cdap.hive.stream.StreamStorageHandler' " +
      "WITH SERDEPROPERTIES ('explore.stream.name'='purchases', 'explore.stream.namespace'='default') " +
      "LOCATION 'hdfs://namenode/my/path' " +
      "TBLPROPERTIES ('somekey'='someval', 'cdap.name'='purchases', " +
                      "'cdap.version'='" + ProjectInfo.getVersion().toString() + "')";
    Schema schema = Schema.recordOf(
      "stuff",
      Schema.Field.of("f1", Schema.of(Schema.Type.STRING)),
      Schema.Field.of("f2", Schema.of(Schema.Type.INT)),
      Schema.Field.of("f3", Schema.of(Schema.Type.DOUBLE)),
      Schema.Field.of("f4", Schema.of(Schema.Type.BOOLEAN)),
      Schema.Field.of("f5", Schema.of(Schema.Type.FLOAT)),
      Schema.Field.of("f6", Schema.of(Schema.Type.BYTES)));
    Map<String, String> serdeProperties = ImmutableMap.of(
      Constants.Explore.STREAM_NAME, "purchases",
      Constants.Explore.STREAM_NAMESPACE, "default");

    String actual = new CreateStatementBuilder("purchases", "stream_purchases", false)
      .setSchema(schema)
      .setLocation("hdfs://namenode/my/path")
      .setTableProperties(ImmutableMap.of("somekey", "someval"))
      .setTableComment("CDAP Stream")
      .buildWithStorageHandler(StreamStorageHandler.class.getName(), serdeProperties);
    Assert.assertEquals(expected, actual);
  }

  @Test
  public void testRowDelimitedCreate() throws Exception {
    String expected = "CREATE EXTERNAL TABLE IF NOT EXISTS dataset_myfiles " +
      "(f1 string, f2 int, f3 double, f4 binary, f5 array<int>) COMMENT 'CDAP Dataset' " +
      "PARTITIONED BY (f1 STRING, f2 INT) " +
      "ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' " +
      "STORED AS TEXTFILE LOCATION 'hdfs://namenode/my/path' " +
      "TBLPROPERTIES ('cdap.name'='myfiles', 'cdap.version'='" + ProjectInfo.getVersion().toString() + "')";
    String hiveSchema = "f1 string, f2 int, f3 double, f4 binary, f5 array<int>";
    Partitioning partitioning = Partitioning.builder()
      .addStringField("f1")
      .addIntField("f2")
      .build();

    String actual = new CreateStatementBuilder("myfiles", "dataset_myfiles", false)
      .setSchema(hiveSchema)
      .setLocation("hdfs://namenode/my/path")
      .setTableComment("CDAP Dataset")
      .setPartitioning(partitioning)
      .setRowFormatDelimited(",", null)
      .buildWithFileFormat("TEXTFILE");
    Assert.assertEquals(expected, actual);
  }

  @Test
  public void testRowSerdeCreate() throws Exception {
    String expected = "CREATE EXTERNAL TABLE IF NOT EXISTS dataset_myfiles " +
      "(f1 string, f2 int, f3 double, f4 binary, f5 array<int>) COMMENT 'CDAP Dataset' " +
      "PARTITIONED BY (f1 STRING, f2 INT) " +
      "ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe' " +
      "WITH SERDEPROPERTIES ('input.regex'='escapeme!\\'') " +
      "STORED AS TEXTFILE LOCATION 'hdfs://namenode/my/path' " +
      "TBLPROPERTIES ('cdap.name'='myfiles', 'cdap.version'='" + ProjectInfo.getVersion().toString() + "')";
    String hiveSchema = "f1 string, f2 int, f3 double, f4 binary, f5 array<int>";
    Partitioning partitioning = Partitioning.builder()
      .addStringField("f1")
      .addIntField("f2")
      .build();

    String actual = new CreateStatementBuilder("myfiles", "dataset_myfiles", false)
      .setSchema(hiveSchema)
      .setLocation("hdfs://namenode/my/path")
      .setTableComment("CDAP Dataset")
      .setPartitioning(partitioning)
      .setRowFormatSerde("org.apache.hadoop.hive.serde2.RegexSerDe", ImmutableMap.of("input.regex", "escapeme!'"))
      .buildWithFileFormat("TEXTFILE");
    Assert.assertEquals(expected, actual);
  }

  @Test
  public void testRowSerdeFormatsCreate() throws Exception {
    Schema schema = Schema.recordOf(
      "record",
      Schema.Field.of("f1", Schema.of(Schema.Type.STRING)),
      Schema.Field.of("f2", Schema.of(Schema.Type.INT)),
      Schema.Field.of("f3", Schema.of(Schema.Type.DOUBLE))
    );
    String expected = "CREATE EXTERNAL TABLE IF NOT EXISTS dataset_myfiles (f1 string, f2 int, f3 double) " +
      "COMMENT 'CDAP Dataset' " +
      "PARTITIONED BY (f1 STRING, f2 INT) " +
      "ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe' " +
      "STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat' " +
      "OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat' " +
      "LOCATION 'hdfs://namenode/my/path' " +
      "TBLPROPERTIES ('avro.schema.literal'='" + schema.toString() + "', " +
      "'cdap.name'='myfiles', 'cdap.version'='" + ProjectInfo.getVersion().toString() + "')";
    Partitioning partitioning = Partitioning.builder()
      .addStringField("f1")
      .addIntField("f2")
      .build();

    String actual = new CreateStatementBuilder("myfiles", "dataset_myfiles", false)
      .setSchema(schema)
      .setTableProperties(ImmutableMap.of("avro.schema.literal", schema.toString()))
      .setLocation("hdfs://namenode/my/path")
      .setTableComment("CDAP Dataset")
      .setPartitioning(partitioning)
      .setRowFormatSerde("org.apache.hadoop.hive.serde2.avro.AvroSerDe")
      .buildWithFormats("org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat",
                        "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat");
    Assert.assertEquals(expected, actual);
  }
}


text:
.kie-wb-common-stunner-assignee-editor-table {
    width: 100%;
    border: 0;
    margin: 0;
}

.kie-wb-common-stunner-assignee-editor-table-action-column {
    width: 20px;
    text-align: center;
    vertical-align: bottom;
}

.kie-wb-common-stunner-assignee-editor-table-action {
    cursor: pointer;
}


text:
<?php

/**
 * Cabezera con la inclusión de Metas y Scripts por defecto para todas las
 * páginas del sitio.
 *
 * @package     View
 * @subpackage  Layouts
 * @author      JpBaena13
 * @since       PHP 5
 */

global $auth;
global $i18n;

?>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<meta name="author" content="JpBaena13">
<meta http-equiv="Expires" content="never">
<meta name="country" content="Colombia">

<!-- Permite colocar una imagen en la barra de direcciones.-->
<link rel="shortcut icon" href="<?php echo WEBROOT_URL ?>favicon.ico" type="image/x-icon"/>

<!--Stylesheet por Defecto, contiene: [normalize, jquery.jscrollpane, jquery.qtip, default]-->
<link rel="stylesheet" type="text/css" href="<?php echo WEBROOT_URL ?>css/main.css" media="all" />

<!-- Metadata -->
<meta name="keywords" content="<?php __('keywords')?>">


text:
namespace ustl {
namespace tm {
namespace {

//----------------------------------------------------------------------
// Type classes and type modifiers
//----------------------------------------------------------------------

typedef tl::Seq<unsigned char, unsigned short, unsigned, unsigned long>::Type
							StdUnsignedInts;
typedef tl::Seq<signed char, short, int, long>::Type	StdSignedInts;
typedef tl::Seq<bool, char, wchar_t>::Type		StdOtherInts;
typedef tl::Seq<float, double>::Type			StdFloats;

template <typename U> struct AddPointer		{ typedef U* Result; };
template <typename U> struct AddPointer<U&>	{ typedef U* Result; };
template <typename U> struct AddReference	{ typedef U& Result; };
template <typename U> struct AddReference<U&>	{ typedef U& Result; };
template <>           struct AddReference<void>	{ typedef NullType Result; };
template <typename U> struct AddParameterType	{ typedef const U& Result; };
template <typename U> struct AddParameterType<U&> { typedef U& Result; };
template <>           struct AddParameterType<void> { typedef NullType Result; };

//----------------------------------------------------------------------
// Function pointer testers
//----------------------------------------------------------------------
// Macros expand to numerous parameters

template <typename T>
struct IsFunctionPointerRaw { enum { result = false}; };
template <typename T>
struct IsMemberFunctionPointerRaw { enum { result = false}; };

#define TM_FPR_MAXN		9
#define TM_FPR_TYPE(n)		PASTE(T,n)
#define TM_FPR_TYPENAME(n)	typename TM_FPR_TYPE(n)

// First specialize for regular functions
template <typename T>
struct IsFunctionPointerRaw<T(*)(void)>
{enum {result = true};};

#define TM_FPR_SPEC(n)		\
template <typename T, COMMA_LIST(n, TM_FPR_TYPENAME)>		\
struct IsFunctionPointerRaw<T(*)(COMMA_LIST(n, TM_FPR_TYPE))>	\
{ enum { result = true }; }

LIST (TM_FPR_MAXN, TM_FPR_SPEC, ;);

// Then for those with an ellipsis argument
template <typename T>
struct IsFunctionPointerRaw<T(*)(...)>
{enum {result = true};};

#define TM_FPR_SPEC_ELLIPSIS(n)	\
template <typename T, COMMA_LIST(n, TM_FPR_TYPENAME)>			\
struct IsFunctionPointerRaw<T(*)(COMMA_LIST(n, TM_FPR_TYPE), ...)>	\
{ enum { result = true }; }

LIST (TM_FPR_MAXN, TM_FPR_SPEC_ELLIPSIS, ;);

// Then for member function pointers
template <typename T, typename S>
struct IsMemberFunctionPointerRaw<T (S::*)(void)>
{ enum { result = true }; };

#define TM_MFPR_SPEC(n)		\
template <typename T, typename S, COMMA_LIST(n, TM_FPR_TYPENAME)>	\
struct IsMemberFunctionPointerRaw<T (S::*)(COMMA_LIST(n, TM_FPR_TYPE))>	\
{ enum { result = true };};

LIST (TM_FPR_MAXN, TM_MFPR_SPEC, ;);

// Then for member function pointers with an ellipsis argument
template <typename T, typename S>
struct IsMemberFunctionPointerRaw<T (S::*)(...)>
{ enum { result = true }; };

#define TM_MFPR_SPEC_ELLIPSIS(n)		\
template <typename T, typename S, COMMA_LIST(n, TM_FPR_TYPENAME)>	\
struct IsMemberFunctionPointerRaw<T (S::*)(COMMA_LIST(n, TM_FPR_TYPE), ...)> \
{ enum { result = true }; };

LIST (TM_FPR_MAXN, TM_MFPR_SPEC_ELLIPSIS, ;);

// Then for const member function pointers (getting tired yet?)
template <typename T, typename S>
struct IsMemberFunctionPointerRaw<T (S::*)(void) const>
{ enum { result = true }; };

#define TM_CMFPR_SPEC(n)	\
template <typename T, typename S, COMMA_LIST(n, TM_FPR_TYPENAME)>	\
struct IsMemberFunctionPointerRaw<T (S::*)(COMMA_LIST(n, TM_FPR_TYPE)) const>	\
{ enum { result = true };};

LIST (TM_FPR_MAXN, TM_CMFPR_SPEC, ;);

// Finally for const member function pointers with an ellipsis argument (whew!)
template <typename T, typename S>
struct IsMemberFunctionPointerRaw<T (S::*)(...) const>
{ enum { result = true }; };

#define TM_CMFPR_SPEC_ELLIPSIS(n)		\
template <typename T, typename S, COMMA_LIST(n, TM_FPR_TYPENAME)>	\
struct IsMemberFunctionPointerRaw<T (S::*)(COMMA_LIST(n, TM_FPR_TYPE), ...) const> \
{ enum { result = true }; };

LIST (TM_FPR_MAXN, TM_CMFPR_SPEC_ELLIPSIS, ;);

#undef TM_FPR_SPEC
#undef TM_FPR_SPEC_ELLIPSIS
#undef TM_MFPR_SPEC
#undef TM_MFPR_SPEC_ELLIPSIS
#undef TM_CMFPR_SPEC
#undef TM_CMFPR_SPEC_ELLIPSIS
#undef TM_FPR_TYPENAME
#undef TM_FPR_TYPE
#undef TM_FPR_MAXN

} // namespace

//----------------------------------------------------------------------
// Type traits template
//----------------------------------------------------------------------

/// Figures out at compile time various properties of any given type
/// Invocations (T is a type, TypeTraits<T>::Propertie):
///
/// - isPointer       : returns true if T is a pointer type
/// - PointeeType     : returns the type to which T points if T is a pointer
///                     type, NullType otherwise
/// - isReference     : returns true if T is a reference type
/// - ReferredType    : returns the type to which T refers if T is a reference
///                     type, NullType otherwise
/// - isMemberPointer : returns true if T is a pointer to member type
/// - isStdUnsignedInt: returns true if T is a standard unsigned integral type
/// - isStdSignedInt  : returns true if T is a standard signed integral type
/// - isStdIntegral   : returns true if T is a standard integral type
/// - isStdFloat      : returns true if T is a standard floating-point type
/// - isStdArith      : returns true if T is a standard arithmetic type
/// - isStdFundamental: returns true if T is a standard fundamental type
/// - isUnsignedInt   : returns true if T is a unsigned integral type
/// - isSignedInt     : returns true if T is a signed integral type
/// - isIntegral      : returns true if T is a integral type
/// - isFloat         : returns true if T is a floating-point type
/// - isArith         : returns true if T is a arithmetic type
/// - isFundamental   : returns true if T is a fundamental type
/// - ParameterType   : returns the optimal type to be used as a parameter for
///                     functions that take Ts
/// - isConst         : returns true if T is a const-qualified type
/// - NonConstType    : Type with removed 'const' qualifier from T, if any
/// - isVolatile      : returns true if T is a volatile-qualified type
/// - NonVolatileType : Type with removed 'volatile' qualifier from T, if any
/// - UnqualifiedType : Type with removed 'const' and 'volatile' qualifiers from
///                     T, if any
/// - ConstParameterType: returns the optimal type to be used as a parameter
///                       for functions that take 'const T's
///
template <typename T>
class TypeTraits {
private:
    #define TMTT1	template <typename U> struct
    #define TMTT2	template <typename U, typename V> struct
    TMTT1 ReferenceTraits	{ enum { result = false }; typedef U ReferredType; };
    TMTT1 ReferenceTraits<U&>	{ enum { result = true  }; typedef U ReferredType; };
    TMTT1 PointerTraits		{ enum { result = false }; typedef NullType PointeeType; };
    TMTT1 PointerTraits<U*>	{ enum { result = true  }; typedef U PointeeType; };
    TMTT1 PointerTraits<U*&>	{ enum { result = true  }; typedef U PointeeType; };
    TMTT1 PToMTraits		{ enum { result = false }; };
    TMTT2 PToMTraits<U V::*>	{ enum { result = true  }; };
    TMTT2 PToMTraits<U V::*&>	{ enum { result = true  }; };
    TMTT1 FunctionPointerTraits	{ enum { result = IsFunctionPointerRaw<U>::result }; };
    TMTT1 PToMFunctionTraits	{ enum { result = IsMemberFunctionPointerRaw<U>::result }; };
    TMTT1 UnConst		{ typedef U Result;  enum { isConst = false }; };
    TMTT1 UnConst<const U>	{ typedef U Result;  enum { isConst = true  }; };
    TMTT1 UnConst<const U&>	{ typedef U& Result; enum { isConst = true  }; };
    TMTT1 UnVolatile		{ typedef U Result;  enum { isVolatile = false }; };
    TMTT1 UnVolatile<volatile U>{ typedef U Result;  enum { isVolatile = true  }; };
    TMTT1 UnVolatile<volatile U&> {typedef U& Result;enum { isVolatile = true  }; };
    #undef TMTT2
    #undef TMTT1
public:
    typedef typename UnConst<T>::Result
	NonConstType;
    typedef typename UnVolatile<T>::Result
	NonVolatileType;
    typedef typename UnVolatile<typename UnConst<T>::Result>::Result
	UnqualifiedType;
    typedef typename PointerTraits<UnqualifiedType>::PointeeType
	PointeeType;
    typedef typename ReferenceTraits<T>::ReferredType
	ReferredType;

    enum { isConst          = UnConst<T>::isConst };
    enum { isVolatile       = UnVolatile<T>::isVolatile };
    enum { isReference      = ReferenceTraits<UnqualifiedType>::result };
    enum { isFunction       = FunctionPointerTraits<typename AddPointer<T>::Result >::result };
    enum { isFunctionPointer= FunctionPointerTraits<
				    typename ReferenceTraits<UnqualifiedType>::ReferredType >::result };
    enum { isMemberFunctionPointer= PToMFunctionTraits<
				    typename ReferenceTraits<UnqualifiedType>::ReferredType >::result };
    enum { isMemberPointer  = PToMTraits<
				    typename ReferenceTraits<UnqualifiedType>::ReferredType >::result ||
				    isMemberFunctionPointer };
    enum { isPointer        = PointerTraits<
				    typename ReferenceTraits<UnqualifiedType>::ReferredType >::result ||
				    isFunctionPointer };
    enum { isStdUnsignedInt = tl::IndexOf<StdUnsignedInts, UnqualifiedType>::value >= 0 ||
			      tl::IndexOf<StdUnsignedInts,
				    typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
    enum { isStdSignedInt   = tl::IndexOf<StdSignedInts, UnqualifiedType>::value >= 0 ||
			      tl::IndexOf<StdSignedInts,
				    typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
    enum { isStdIntegral    = isStdUnsignedInt || isStdSignedInt ||
			      tl::IndexOf<StdOtherInts, UnqualifiedType>::value >= 0 ||
			      tl::IndexOf<StdOtherInts,
				    typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
    enum { isStdFloat       = tl::IndexOf<StdFloats, UnqualifiedType>::value >= 0 ||
			      tl::IndexOf<StdFloats,
				    typename ReferenceTraits<UnqualifiedType>::ReferredType>::value >= 0};
    enum { isStdArith       = isStdIntegral || isStdFloat };
    enum { isStdFundamental = isStdArith || isStdFloat || Conversion<T, void>::sameType };

    enum { isUnsignedInt    = isStdUnsignedInt };
    enum { isSignedInt      = isStdSignedInt };
    enum { isIntegral       = isStdIntegral || isUnsignedInt || isSignedInt };
    enum { isFloat          = isStdFloat };
    enum { isArith          = isIntegral || isFloat };
    enum { isFundamental    = isStdFundamental || isArith };

    typedef typename Select<isStdArith || isPointer || isMemberPointer, T,
	    typename AddParameterType<T>::Result>::Result
	ParameterType;
};

} // namespace tm
} // namespace ustl

#endif


text:
python3 PoolGRU.py --input-training-data-path ../../Data/ --output-model-path . --model_type l \
        --max_seq_len 100 --nfold 10 --emb_dim 300 --epochs 1 --batch_size 64 --ensemble_nfold 3 \
        --filter_size 128 --batch_interval 1000000 --full_connect_dropout 0 --emb_dropout 0 \
        --full_connect_hn 32 --rnn_unit 128 --vocab_size 150000 --separate_label_layer True --stem False \
        --wv_model_file wiki.en.vec.indata -resnet_hn False --vdcc_top_k 1 --char_split False --load_wv_model True \
        --fix_wv_model False --kernel_size_list 1,2,3,4,5,6,7 --rnn_input_dropout 0 --rnn_state_dropout 0 \
        --stacking False --uniform_init_emb False --load_stacking_data True

# python3 PoolGRU.py --input-training-data-path ../../Data/ --output-model-path . --model_type vdcnn \
#         --max_seq_len 100 --nfold 2 --emb_dim 32 --epochs 2 --batch_size 128 --ensemble_nfold 1 \
#         --vdcnn_filters "4, 8" --full_connect_dropout 0 --vdcc_top_k 8 \
#         --full_connect_hn "4, 0" --char_split True --load_wv_model False


text:
#ifndef USTRACKEDSERVICE_H
#define USTRACKEDSERVICE_H

#include "usTrackedServiceListener_p.h"
#include "usModuleAbstractTracked_p.h"
#include "usServiceEvent.h"

US_BEGIN_NAMESPACE

/**
 * This class is not intended to be used directly. It is exported to support
 * the CppMicroServices module system.
 */
template<class S, class TTT>
class TrackedService : public TrackedServiceListener,
    public ModuleAbstractTracked<ServiceReference<S>, TTT, ServiceEvent>
{

public:

  typedef typename TTT::TrackedType T;

  TrackedService(ServiceTracker<S,TTT>* serviceTracker,
                 ServiceTrackerCustomizer<S,T>* customizer);

  /**
   * Method connected to service events for the
   * ServiceTracker class. This method must NOT be
   * synchronized to avoid deadlock potential.
   *
   * @param event ServiceEvent object from the framework.
   */
  void ServiceChanged(const ServiceEvent event);

private:

  typedef ModuleAbstractTracked<ServiceReference<S>, TTT, ServiceEvent> Superclass;

  ServiceTracker<S,TTT>* serviceTracker;
  ServiceTrackerCustomizer<S,T>* customizer;

  /**
   * Increment the tracking count and tell the tracker there was a
   * modification.
   *
   * @GuardedBy this
   */
  void Modified();

  /**
   * Call the specific customizer adding method. This method must not be
   * called while synchronized on this object.
   *
   * @param item Item to be tracked.
   * @param related Action related object.
   * @return Customized object for the tracked item or null
   *         if the item is not to be tracked.
   */
  T CustomizerAdding(ServiceReference<S> item, const ServiceEvent& related);

  /**
   * Call the specific customizer modified method. This method must not be
   * called while synchronized on this object.
   *
   * @param item Tracked item.
   * @param related Action related object.
   * @param object Customized object for the tracked item.
   */
  void CustomizerModified(ServiceReference<S> item,
                          const ServiceEvent& related, T object) ;

  /**
   * Call the specific customizer removed method. This method must not be
   * called while synchronized on this object.
   *
   * @param item Tracked item.
   * @param related Action related object.
   * @param object Customized object for the tracked item.
   */
  void CustomizerRemoved(ServiceReference<S> item,
                         const ServiceEvent& related, T object) ;
};

US_END_NAMESPACE

#include "usTrackedService.tpp"

#endif // USTRACKEDSERVICE_H


text:
import operator
import weakref
import types
import objc
from objc import python_method
import AppKit
from vanilla.nsSubclasses import getNSSubclass
from vanilla.vanillaBase import VanillaBaseObject, VanillaCallbackWrapper, osVersionCurrent, osVersion10_16
from vanilla.vanillaScrollView import ScrollView
from vanilla.dragAndDrop import DropTargetProtocolMixIn, dropOperationMap, makePasteboardItem

simpleDataTypes = (
    str,
    int,
    float,
    complex,
    bool,
    type(None)
)

class VanillaList2DataSourceAndDelegate(AppKit.NSObject):

    def initWithTableView_(self, tableView):
        self = VanillaList2DataSourceAndDelegate.alloc().init()
        self._items = []
        self._arrangedIndexes = []
        self._groupRowIndexes = []
        self._tableView = tableView
        self._cellClasses = {} # { identifier : (class, kwargs) }
        self._valueToCellConverters = {} # { identifier : function }
        self._cellToValueConverters = {} # { identifier : function }
        self._groupRowCellClass = None
        self._groupRowCellClassKwargs = {}
        self._cellWrappers = {} # { nsView : vanilla wrapper } for view + wrapper reuse purposes
        self._valueGetters = {} # { identifier : options (see below) }
        self._valueSetters = {} # { identifier : options (see below) }
        # {
        #     property : str
        #     method : str
        #     function : func
        # }
        return self

    @python_method
    def setCellClassWithKwargsForColumn(self, cls, kwargs, identifier):
        if "callback" in kwargs:
            kwargs["callback"] = self.cellEditCallback
        self._cellClasses[identifier] = (cls, kwargs)

    @python_method
    def setGroupCellClassWithKwargs(self, cls, kwargs):
        self._groupRowCellClass = cls
        self._groupRowCellClassKwargs = kwargs

    @python_method
    def setGetters(self, getters):
        self._valueGetters = getters

    @python_method
    def setSetters(self, setters):
        self._valueSetters = setters

    @python_method
    def setValueToCellConverters(self, converters):
        self._valueToCellConverters = converters

    @python_method
    def setCellToValueConverters(self, converters):
        self._cellToValueConverters = converters

    @python_method
    def vanillaWrapper(self):
        return self._tableView.vanillaWrapper()

    @python_method
    def items(self):
        return self._items

    @python_method
    def setItems(self, items):
        self._items = items
        self._groupRowIndexes = []
        for index, item in enumerate(items):
            if isinstance(item, List2GroupRow):
                self._groupRowIndexes.append(index)
        self._updateArrangedIndexes()

    @python_method
    def arrangedIndexes(self):
        return self._arrangedIndexes

    @python_method
    def arrangedItems(self):
        items = [
            self._items[index]
            for index in self._arrangedIndexes
        ]
        return items

    @python_method
    def _updateArrangedIndexes(self):
        tableView = self._tableView
        sortDescriptors = tableView.sortDescriptors()
        items = self._items
        indexes = range(len(items))
        for sortDescriptor in reversed(sortDescriptors):
            identifier = sortDescriptor.key()
            ascending = sortDescriptor.ascending()
            reverse = not ascending
            getters = self._valueGetters.get(identifier, {})
            property = getters.get("property")
            method = getters.get("method")
            function = getters.get("function")
            if property is not None:
                key = operator.attrgetter(property)
            elif method is not None:
                key = operator.methodcaller(method)
            elif function is not None:
                key = function
            else:
                key = operator.itemgetter(identifier)

            def valueGetter(index):
                return key(items[index])

            indexes = sorted(indexes, key=valueGetter, reverse=reverse)
        self._arrangedIndexes = list(indexes)
        tableView.reloadData()

    @python_method
    def _getItemForRow(self, index):
        itemIndex = self._arrangedIndexes[index]
        return self._items[itemIndex]

    @python_method
    def getGroupValueForRow(self, index):
        itemIndex = self._arrangedIndexes[index]
        return self._items[itemIndex].value

    # Data Editing Via Cells

    @python_method
    def getItemValueForColumnAndRow(self, identifier, row):
        item = self._getItemForRow(row)
        getters = self._valueGetters.get(identifier, {})
        property = getters.get("property")
        method = getters.get("method")
        function = getters.get("function")
        if property is not None:
            value = getattr(item, property)
        elif method is not None:
            value = getattr(item, method)()
        elif function is not None:
            value = function(item)
        else:
            value = item[identifier]
        if identifier in self._valueToCellConverters:
            value = self._valueToCellConverters[identifier](value)
        return value

    @python_method
    def setItemValueForColumnAndRow(self, value, identifier, row):
        if identifier in self._cellToValueConverters:
            value = self._cellToValueConverters[identifier](value)
        item = self._getItemForRow(row)
        setters = self._valueSetters.get(identifier, {})
        property = setters.get("property")
        method = setters.get("method")
        function = setters.get("function")
        if property is not None:
            return setattr(item, property, value)
        elif method is not None:
            return getattr(item, method)(value)
        elif function is not None:
            return function(item, value)
        elif isinstance(item, dict):
            item[identifier] = value

    # Data Source

    def numberOfRowsInTableView_(self, tableView):
        return len(self._arrangedIndexes)

    def tableView_objectValueForTableColumn_row_(self, tableView, column, row):
        isGroupRow = column is None
        if isGroupRow:
            return self.getGroupValueForRow(row)
        identifier = column.identifier()
        value = self.getItemValueForColumnAndRow(identifier, row)
        return value

    def tableView_sortDescriptorsDidChange_(self, tableView, sortDescriptors):
        self._updateArrangedIndexes()

    # Delegate

    def tableView_viewForTableColumn_row_(self, tableView, column, row):
        isGroupRow = column is None
        if isGroupRow:
            view = self._groupRowCellClass(**self._groupRowCellClassKwargs)
            view.set(self.getGroupValueForRow(row))
            return view._nsObject
        identifier = column.identifier()
        value = self.getItemValueForColumnAndRow(identifier, row)
        nsView = tableView.makeViewWithIdentifier_owner_(
            column.identifier(),
            self
        )
        if nsView is not None:
            view = self._cellWrappers[nsView]
        else:
            cellClass, kwargs = self._cellClasses[identifier]
            view = cellClass(**kwargs)
            nsView = view._nsObject
            self._cellWrappers[nsView] = view
            nsView.setIdentifier_(identifier)
        view._representedColumnRow = (identifier, row)
        view.set(value)
        return nsView

    def tableViewSelectionDidChange_(self, notification):
        wrapper = self.vanillaWrapper()
        if wrapper._selectionCallback is not None:
            wrapper._selectionCallback(wrapper)

    def tableView_isGroupRow_(self, tableView, row):
        itemIndex = self._arrangedIndexes[row]
        return itemIndex in self._groupRowIndexes

    def tableView_shouldSelectRow_(self, tableView, row):
        wrapper = self.vanillaWrapper()
        if not wrapper._allowsSelection:
            return False
        return True

    # Editing

    @python_method
    def cellEditCallback(self, sender):
        identifier, row = sender._representedColumnRow
        value = sender.get()
        self.setItemValueForColumnAndRow(value, identifier, row)
        wrapper = self.vanillaWrapper()
        if wrapper._editCallback is not None:
            wrapper._editCallback(wrapper)

    # Drag

    def tableView_pasteboardWriterForRow_(
            self,
            tableView,
            row
        ):
        index = self._arrangedIndexes[row]
        return self.vanillaWrapper()._getPasteboardDataForIndex(index)

    # Drop

    def tableView_validateDrop_proposedRow_proposedDropOperation_(
            self,
            tableView,
            draggingInfo,
            row,
            operation
        ):
        if not self._arrangedIndexes:
            index = None
        elif row == len(self._arrangedIndexes):
            index = row
        else:
            index = self._arrangedIndexes[row]
        return self.vanillaWrapper()._dropCandidateUpdated(draggingInfo, index, operation)

    def tableView_acceptDrop_row_dropOperation_(
            self,
            tableView,
            draggingInfo,
            row,
            operation
        ):
        if not self._arrangedIndexes:
            index = None
        elif row == len(self._arrangedIndexes):
            index = row
        else:
            index = self._arrangedIndexes[row]
        return self.vanillaWrapper()._performDrop(draggingInfo, index, operation)

class VanillaList2TableViewSubclass(AppKit.NSTableView):

    def draggingEntered_(self, draggingInfo):
        super().draggingEntered_(draggingInfo)
        return self.vanillaWrapper()._dropCandidateEntered(draggingInfo)

    @objc.signature(b"Z@:@") # PyObjC bug? <- Found in the FontGoogles source.
    def draggingEnded_(self, draggingInfo):
        self.vanillaWrapper()._dropCandidateEnded(draggingInfo)
        # XXX
        # super().draggingEnded_(draggingInfo)
        # the super doesn't have this.
        # i'm not sure if it because of the
        # PyObjC bug mentioned above or
        # something else.

    def draggingExited_(self, draggingInfo):
        self.vanillaWrapper()._dropCandidateExited(draggingInfo)
        super().draggingExited_(draggingInfo)

    def canDragRowsWithIndexes_atPoint_(self, indexes, point):
        return self.vanillaWrapper()._validateRowsForDrag(indexes)

class List2(ScrollView, DropTargetProtocolMixIn):

    """
    A control that shows a list of items. These lists can contain one or more columns.

    **posSize** Tuple of form *(left, top, width, height)* or *"auto"*
    representing the position and size of the list.

    **items** The items to be displayed in the list. This can be a simple list of
    basic object types:

    - str
    - int
    - float
    - complex
    - bool
    - None

    It may also be a list of dictionaries or other Python objects. The values will
    be retrieved and set with the provided value and getter and setter defined in the
    column description. If no getter or setter is given, the column identifier will be
    used to get and set the value in the item as if the item were a dictionary::

        value = item[columnIdentifier]
        item[columnIdentifier] = value

    **columnDescriptions** An ordered list of dictionaries describing the
    columns. This is only necessary for multiple column lists.

    +-------------------------------------+-----------------------------------------------------------+
    | *"identifier"*                      | The unique identifier for this column.                    |
    +-------------------------------------+-----------------------------------------------------------+
    | *"title"* (optional)                | The title to appear in the column header.                 |
    +-------------------------------------+-----------------------------------------------------------+
    | *"cellClass"* (optional)            | A cell class to be displayed in the column.               |
    |                                     | If nothing is given, a text cell is used.                 |
    +-------------------------------------+-----------------------------------------------------------+
    | *"cellClassArguments"* (optional)   | A dictionary of keyword arguments to be used when         |
    |                                     | *cellClass* is instantiated.                              |
    +-------------------------------------+-----------------------------------------------------------+
    | *"valueToCellConverter"* (optional) | A function for converting the value for display in the    |
    |                                     | cell.                                                     |
    +-------------------------------------+-----------------------------------------------------------+
    | *"cellToValueConverter"* (optional) | A function for converting the value displayed in the cell |
    |                                     | value for storage.                                        |
    +-------------------------------------+-----------------------------------------------------------+
    | *"editable"* (optional)             | Enable or disable editing in the column. If               |
    |                                     | nothing is given, it will follow the                      |
    |                                     | editability of the rest of the list.                      |
    +-------------------------------------+-----------------------------------------------------------+
    | *"width"* (optional)                | The width of the column.                                  |
    +-------------------------------------+-----------------------------------------------------------+
    | *"minWidth"* (optional)             | The minimum width of the column. The fallback is `width`. |
    +-------------------------------------+-----------------------------------------------------------+
    | *"maxWidth"* (optional)             | The maximum width of the column. The fallback is `width`. |
    +-------------------------------------+-----------------------------------------------------------+
    | *"sortable"* (optional)             | A boolean representing that this column allows the user   |
    |                                     | to sort the table by clicking the column's header.        |
    |                                     | The fallback is `True`. If a List is set to disallow      |
    |                                     | sorting the column level settings will be ignored.        |
    +-------------------------------------+-----------------------------------------------------------+
    | property (optional)                 | A property name for getting and setting the item value.   |
    +-------------------------------------+-----------------------------------------------------------+
    | getMethod (optional)                | A method name for getting the item value.                 |
    +-------------------------------------+-----------------------------------------------------------+
    | setMethod (optional)                | A method name for setting the item value.                 |
    +-------------------------------------+-----------------------------------------------------------+
    | getFunction (optional)              | A function for getting the item value.                    |
    +-------------------------------------+-----------------------------------------------------------+
    | setFunction (optional)              | A function for getting the item value.                    |
    +-------------------------------------+-----------------------------------------------------------+

    **showColumnTitles** Boolean representing if the column titles should be shown or not.
    Column titles will not be shown in single column lists.

    **selectionCallback** Callback to be called when the selection in the list changes.

    **doubleClickCallback** Callback to be called when an item is double clicked.

    **editCallback** Callback to be called after an item has been edited.

    # **menuCallback** Callback to be called when a contextual menu is requested.

    # **enableDelete** A boolean representing if items in the list can be deleted via the interface.

    **enableTypingSensitivity** A boolean representing if typing in the list will jump to the
    closest match as the entered keystrokes.

    **allowsSelection** A boolean representing if items in the list can be selected.

    **allowsMultipleSelection** A boolean representing if the list allows more than one item to be selected.

    **allowsEmptySelection** A boolean representing if the list allows zero items to be selected.

    **allowsSorting** A boolean indicating if the list allows user sorting by clicking column headers.

    **allowsColumnReordering** A boolean indicating if the list allows the user to reorder columns.

    **drawVerticalLines** Boolean representing if vertical lines should be drawn in the list.

    **drawHorizontalLines** Boolean representing if horizontal lines should be drawn in the list.

    **drawFocusRing** Boolean representing if the standard focus ring should be drawn when the list is selected.

    **alternatingRowColors** Boolean representing if alternating row colors should be used.

    **autohidesScrollers** Boolean representing if scrollbars should automatically be hidden if possible.

    Group Rows:

    It is possible to have rows that act as headers for a group of rows. To do this,
    add an instance of `List2GroupRow` to your items.::

        class Demo:

            def __init__(self):
                self.w = vanilla.Window((300, 150))
                items = [
                    vanilla.List2GroupRow("Group 1"),
                    "A",
                    "B",
                    "C",
                    vanilla.List2GroupRow("Group 2"),
                    "D",
                    "E",
                    "F"
                ]
                self.w.list = vanilla.List2(
                    "auto",
                    items=items,
                    allowsGroupRows=True,
                    floatsGroupRows=True,
                    allowsSorting=False
                )
                rules = [
                    "H:|[list]|",
                    "V:|[list]|"
                ]
                self.w.addAutoPosSizeRules(rules)
                self.w.open()

    **allowsGroupRows** Boolean representing if the list allows allows group rows.

    **floatsGroupRows** Boolean representing if the list floats the group rows.

    **groupRowCellClass**  A cell class to be displayed in the column.
    If nothing is given, a text cell is used.

    **groupRowCellClassArguments** A dictionary of keyword arguments to be used
    when *groupRowCellClass* is instantiated.

    **autosaveName** A string representing a unique name for the list. If given,
    this name will be used to store the column states in the application preferences.

    **dropSettings** A drop settings dictionary.

    Differences from the standard vanilla drag and drop API:

    Only these callbacks will be used:

    - `dropCandidateCallback`
    - `performDropCallback`
    - `dropCandidateEnteredCallback`
    - `dropCandidateEndedCallback`
    - `dropCandidateExitedCallback`

    `dropCandidateCallback` should return a boolean indicating if the
    drop is acceptable instead of a drop operation.

    The dragging info dictionary will contain an `index` key that specifies
    where in the list the is proposed for insertion. If the list doesn't
    allow dropping on or between rows, index will be `None`.
    """

    nsTableViewClass = VanillaList2TableViewSubclass
    dataSourceAndDelegateClass = VanillaList2DataSourceAndDelegate

    def __init__(self,
            posSize,
            items=[],
            columnDescriptions=[],
            allowsSelection=True,
            allowsMultipleSelection=True,
            allowsEmptySelection=True,
            allowsSorting=True,
            allowColumnReordering=True,
            enableTypingSensitivity=False,
            showColumnTitles=True,
            drawFocusRing=True,
            drawVerticalLines=False,
            drawHorizontalLines=False,
            alternatingRowColors=True,
            autohidesScrollers=False,
            selectionCallback=None,
            doubleClickCallback=None,
            editCallback=None,
            allowsGroupRows=False,
            floatsGroupRows=False,
            groupRowCellClass=None,
            groupRowCellClassArguments={},
            autosaveName=None,
            dragSettings=None,
            dropSettings=None
        ):
        if not columnDescriptions:
            showColumnTitles = False
            columnDescriptions = [
                dict(
                    identifier="value",
                    cellClass=EditTextList2Cell
                )
            ]
        self._tableView = getNSSubclass(self.nsTableViewClass)(self)
        self._dataSourceAndDelegate = self.dataSourceAndDelegateClass.alloc().initWithTableView_(self._tableView)
        self._tableView.setDataSource_(self._dataSourceAndDelegate)
        self._tableView.setDelegate_(self._dataSourceAndDelegate)
        # group rows
        if allowsGroupRows:
            assert not allowsSorting, "Group rows are not allowed in sortable lists."
            if groupRowCellClass is None:
                groupRowCellClass = GroupTitleList2Cell
            self._dataSourceAndDelegate.setGroupCellClassWithKwargs(groupRowCellClass, groupRowCellClassArguments)
            self._tableView.setFloatsGroupRows_(floatsGroupRows)
        # callbacks
        self._selectionCallback = selectionCallback
        self._editCallback = editCallback
        if doubleClickCallback is not None:
            self._doubleClickTarget = VanillaCallbackWrapper(doubleClickCallback)
            self._tableView.setTarget_(self._doubleClickTarget)
            self._tableView.setDoubleAction_("action:")
        # behavior attributes
        self._allowsSelection = allowsSelection
        self._tableView.setAllowsEmptySelection_(allowsEmptySelection)
        self._tableView.setAllowsMultipleSelection_(allowsMultipleSelection)
        self._tableView.setAllowsColumnReordering_(allowColumnReordering)
        self._allowsSorting = allowsSorting
        self._tableView.setAllowsTypeSelect_(enableTypingSensitivity)
        # visual attributes
        if not showColumnTitles:
            self._tableView.setHeaderView_(None)
            self._tableView.setCornerView_(None)
        self._tableView.setUsesAlternatingRowBackgroundColors_(alternatingRowColors)
        if not drawFocusRing:
            self._tableView.setFocusRingType_(AppKit.NSFocusRingTypeNone)
        if drawVerticalLines or drawHorizontalLines:
            if drawVerticalLines and drawHorizontalLines:
                lineType = AppKit.NSTableViewSolidVerticalGridLineMask | AppKit.NSTableViewSolidHorizontalGridLineMask
            elif drawVerticalLines:
                lineType = AppKit.NSTableViewSolidVerticalGridLineMask
            else:
                lineType = AppKit.NSTableViewSolidHorizontalGridLineMask
            self._tableView.setGridStyleMask_(lineType)
        if osVersionCurrent >= osVersion10_16:
            self._tableView.setStyle_(AppKit.NSTableViewStyleInset)
        # auto save
        if autosaveName is not None:
            self._tableView.setAutosaveName_(autosaveName)
            self._tableView.setAutosaveTableColumns_(True)
        # columns
        self._buildColumns(columnDescriptions)
        # self._tableView.setRowSizeStyle_(AppKit.NSTableViewRowSizeStyleDefault)
        super().__init__(
            posSize,
            nsView=self._tableView,
            autohidesScrollers=autohidesScrollers
        )
        # drag and drop
        if dragSettings is not None:
            self._dragCandidateCallback = dragSettings.get("dragCandidateCallback")
            self._dragStartedCallback = dragSettings.get("dragStartedCallback")
            self._makeDragDataCallback = dragSettings.get("makeDragDataCallback")
            self._dragEndedCallback = dragSettings.get("dragEndedCallback")
        if dropSettings is not None:
            self.setDropSettings(dropSettings)
        # populate
        self._itemsWereDict = True
        self.set(items)

    def _breakCycles(self):
        super()._breakCycles()
        self._selectionCallback = None
        self._editCallback = None

    def _getDropView(self):
        return self._tableView

    def _buildColumns(self, columnDescriptions):
        getters = {}
        setters = {}
        cellToValueConverters = {}
        valueToCellConverters = {}
        rowHeights = []
        if osVersionCurrent >= osVersion10_16:
            rowHeights.append(24)
        else:
            rowHeights.append(17)
        for columnDescription in columnDescriptions:
            identifier = columnDescription["identifier"]
            title = columnDescription.get("title", "")
            width = columnDescription.get("width")
            minWidth = columnDescription.get("minWidth", width)
            maxWidth = columnDescription.get("maxWidth", width)
            sortable = columnDescription.get("sortable")
            cellClass = columnDescription.get("cellClass", EditTextList2Cell)
            cellKwargs = columnDescription.get("cellClassArguments", {})
            editable = columnDescription.get("editable", False)
            property = columnDescription.get("property")
            getMethod = columnDescription.get("getMethod")
            setMethod = columnDescription.get("setMethod")
            getFunction = columnDescription.get("getFunction")
            setFunction = columnDescription.get("setFunction")
            cellToValueConverter = columnDescription.get("cellToValueConverter")
            valueToCellConverter = columnDescription.get("valueToCellConverter")
            getters[identifier] = dict(
                property=property,
                method=getMethod,
                function=getFunction
            )
            setters[identifier] = dict(
                property=property,
                method=setMethod,
                function=setFunction
            )
            if cellToValueConverter is not None:
                cellToValueConverters[identifier] = cellToValueConverter
            if valueToCellConverter is not None:
                valueToCellConverters[identifier] = valueToCellConverter
            cellKwargs["editable"] = editable
            if editable:
                cellKwargs["callback"] = True
            self._dataSourceAndDelegate.setCellClassWithKwargsForColumn(
                cellClass, cellKwargs, identifier
            )
            if width is not None:
                if width == minWidth and width == maxWidth:
                    resizingMask = AppKit.NSTableColumnNoResizing
                else:
                    resizingMask = AppKit.NSTableColumnUserResizingMask | AppKit.NSTableColumnAutoresizingMask
            else:
                resizingMask = AppKit.NSTableColumnUserResizingMask | AppKit.NSTableColumnAutoresizingMask
            column = AppKit.NSTableColumn.alloc().initWithIdentifier_(identifier)
            column.setTitle_(title)
            column.setResizingMask_(resizingMask)
            if width is not None:
                column.setWidth_(width)
                column.setMinWidth_(minWidth)
                column.setMaxWidth_(maxWidth)
            if self._allowsSorting and sortable:
                sortDescriptor = AppKit.NSSortDescriptor.sortDescriptorWithKey_ascending_selector_(
                    identifier,
                    True,
                    "compare:"
                )
                column.setSortDescriptorPrototype_(sortDescriptor)
            self._tableView.addTableColumn_(column)
            # measure the cell to get the row height
            cell = cellClass(**cellKwargs)
            height = cell._nsObject.fittingSize().height
            del cell
            rowHeights.append(height)
        self._dataSourceAndDelegate.setGetters(getters)
        self._dataSourceAndDelegate.setSetters(setters)
        self._dataSourceAndDelegate.setCellToValueConverters(cellToValueConverters)
        self._dataSourceAndDelegate.setValueToCellConverters(valueToCellConverters)
        self._tableView.setRowHeight_(max(rowHeights))

    def _wrapItem(self, item):
        if isinstance(item, simpleDataTypes):
            self._itemsWereDict = False
            item = dict(value=item)
        return item

    def getNSTableView(self):
        """
        Return the `NSTableView`_ that this object wraps.

        .. _NSTableView: https://developer.apple.com/documentation/appkit/nstableview?language=objc
        """
        return self._tableView

    def enable(self, onOff):
        """
        Enable or disable the object. **onOff** should be a boolean.
        """
        self._tableView.setEnabled_(onOff)

    # Data

    def set(self, items):
        """
        Set the items in the list.

        **items** should follow the same format as described in the constructor.
        """
        items = [self._wrapItem(item) for item in items]
        self._dataSourceAndDelegate.setItems(items)

    def get(self):
        """
        Get the list of items in the list.
        """
        items = list(self._dataSourceAndDelegate.items())
        if not self._itemsWereDict:
            items = [item["value"] for item in items]
        return items

    def getArrangedIndexes(self):
        """
        Get the indexes of the items as they appear
        to the user in the list.
        """
        return self._dataSourceAndDelegate.arrangedIndexes()

    def getArrangedItems(self):
        """
        Get the items as they appear to the user in the list.
        """
        return self._dataSourceAndDelegate.arrangedItems()

    def reloadData(self, indexes=None):
        """
        Reload the data on display. This is needed when
        the items have changed values and the presentation
        of the items in the list needs to be updated.

        **indexes** may be provided to indicate that only
        specific items need to be reloaded.
        """
        tableView = self._tableView
        if indexes is None:
            tableView.reloadData()
        else:
            rowIndexes = makeIndexSet(indexes)
            columnIndexes = range(len(tableView.tableColumns()))
            columnIndexes = makeIndexSet(columnIndexes)
            tableView.reloadDataForRowIndexes_columnIndexes_(
                rowIndexes,
                columnIndexes
            )

    # Selection

    def getSelectedItems(self):
        """
        Get a list of selected items in the list.
        """
        selectedIndexes = self._tableView.selectedRowIndexes()
        items = self.get()
        indexes = self.getArrangedIndexes()
        items = [
            items[i]
            for i in indexes
            if i in selectedIndexes
        ]
        return items

    def setSelectedItems(self, items):
        """
        Set the selected items in the list.

        .. note::
           `setSelectedIndexes` is the recommended method
           for setting selection. `setSelectedItems` is
           a convenience method that relies on iteration
           and comparing object ids to find the item indexes,
           which are then sent to `setSelectedIndexes`. If
           the list contains a large number of items this
           iteration can create a performance problem.
        """
        allItems = self.get()
        indexMapping = {
            id(item) : index
            for index, item in enumerate(allItems)
        }
        selectionIndexes = [
            indexMapping[id(item)]
            for item in items
        ]
        self.setSelectedIndexes(selectionIndexes)

    def getSelectedIndexes(self):
        """
        Get a list of indexes of selected items in the list.
        """
        rowIndexes = self._tableView.selectedRowIndexes()
        arrangedIndexes = self.getArrangedIndexes()
        itemIndexes = [
            arrangedIndexes[i]
            for i in rowIndexes
        ]
        return itemIndexes

    def setSelectedIndexes(self, indexes):
        """
        Set the selected indexes in the list.

        **indexes** should be a list of indexes.
        """
        itemIndexToRowIndexes = {
            itemIndex : rowIndex
            for rowIndex, itemIndex
            in enumerate(self.getArrangedIndexes())
        }
        rowIndexes = [
            itemIndexToRowIndexes[itemIndex]
            for itemIndex in indexes
        ]
        rowIndexes = makeIndexSet(rowIndexes)
        self._tableView.selectRowIndexes_byExtendingSelection_(rowIndexes, False)

    def scrollToSelection(self):
        """
        Scroll the selected rows to visible.
        """
        selection = self.getSelectedIndexes()
        if not selection:
            return
        index = min(selection)
        self.scrollToIndex(index)

    def scrollToIndex(self, row):
        """
        Scroll the row to visible.
        """
        self._tableView.scrollRowToVisible_(row)

    # Drag

    _dragCandidateCallback = None
    _dragStartedCallback = None
    _makeDragDataCallback = None
    _dragEndedCallback = None

    def _validateRowsForDrag(self, indexes):
        if self._dragCandidateCallback is None:
            if self._makeDragDataCallback is None:
                return False
            return True
        return self._dragCandidateCallback(indexes)

    def _getPasteboardDataForIndex(self, index):
        if self._makeDragDataCallback is None:
            return None
        typesAndValues = self._makeDragDataCallback(index)
        if not typesAndValues:
            return None
        return makePasteboardItem(typesAndValues)

    # Drop

    _allowDropOnRow = None
    _allowDropBetweenRows = None

    def setDropSettings(self, settings):
        self._allowDropOnRow = settings.get("allowDropOnRow", False)
        self._allowDropBetweenRows = settings.get("allowDropBetweenRows", True)
        super().setDropSettings(settings)

    def _dropCandidateUpdated(self, draggingInfo, index, operation):
        if self._dropCandidateCallback is None:
            return AppKit.NSDragOperationNone
        info = self._unpackDropCandidateInfo(draggingInfo)
        info["index"] = index
        if not self._allowDropOnRow and not self._allowDropBetweenRows:
            index = None
        elif not self._allowDropOnRow and operation == AppKit.NSTableViewDropOn:
            return AppKit.NSDragOperationNone
        elif not self._allowDropBetweenRows and operation == AppKit.NSTableViewDropAbove:
            return AppKit.NSDragOperationNone
        if not len(self.get()):
            index = None
        operation = self._dropCandidateCallback(info)
        operation = dropOperationMap.get(operation, operation)
        # highlight the whole table instead of a single spot
        if index is None:
            self._tableView.setDropRow_dropOperation_(-1, operation)
        return operation

    def _performDrop(self, draggingInfo, index, operation):
        if not self._allowDropOnRow and not self._allowDropBetweenRows:
            index = None
        info = self._unpackDropCandidateInfo(draggingInfo)
        info["index"] = index
        return self._performDropCallback(info)

# -----
# Tools
# -----

class List2GroupRow:

    def __init__(self, value=None):
        self.value = value

def makeIndexSet(indexes):
    indexSet = AppKit.NSMutableIndexSet.indexSet()
    for i in indexes:
        indexSet.addIndex_(i)
    return indexSet

# -----
# Cells
# -----

from vanilla.vanillaGroup import Group
from vanilla.vanillaEditText import EditText

class EditTextList2Cell(Group):

    """
    An object that displays text in a List2 column.

    **verticalAlignment** The vertical alignment of the text
    within the row. Options:

    - `"top"`
    - `"center"`
    - `"bottom"`

    .. note::
       This class should only be used in the *columnDescriptions*
       *cellClass* argument during the construction of a List.
       This is never constructed directly.
    """

    # Implementation Note:
    # Using NSTextField directly as the row view doesn't
    # allow for vertically positioning the text anywhere
    # but to the top. In macOS 11 this leads to text
    # being out of alignment with other cell types like
    # checkboxes and sliders. I found numerous complaints
    # about this on Stack Overflow so I'm not alone in
    # noticing this. This is apparently solved automatically
    # when using IB, but a pain when building things
    # programatically. Additionally, I chose to use NSView
    # as the base of this instead of NSTableCellView because
    # NSTableCellView doesn't have a textField by default
    # so it has to be built and we may as well skip the
    # expense of NSTableCellView and go straight to NSView.
    # Sigh.

    def __init__(self,
            verticalAlignment="center",
            editable=False,
            callback=None
        ):
        self._externalCallback = callback
        super().__init__("auto")
        self.editText = EditText(
            "auto",
            readOnly=not editable,
            callback=self._internalCallback
        )
        container = self._nsObject
        textField = self.editText.getNSTextField()
        if verticalAlignment == "top":
            yRule = "V:|[editText]"
        elif verticalAlignment == "bottom":
            yRule = "V:[editText]|"
        else:
            yRule = dict(
                view1=self.editText,
                attribute1="centerY",
                view2=self,
                attribute2="centerY"
            )
        rules = [
            "H:|[editText]|",
            yRule
        ]
        if verticalAlignment != "center":
            heightRule = dict(
                view1=self.editText,
                attribute1="height",
                view2=self,
                attribute2="height"
            )
            rules.append(heightRule)
        self.addAutoPosSizeRules(rules)
        textField.setDrawsBackground_(False)
        textField.setBezeled_(False)

    def getNSTextField(self):
        return self.editText.getNSTextField()

    def _internalCallback(self, sender):
        if self._externalCallback is not None:
            self._externalCallback(self)

    def set(self, value):
        self.editText.set(value)

    def get(self):
        return self.editText.get()

class GroupTitleList2Cell(EditTextList2Cell):

    """
    An object that displays highlighted text for group rows
    in a List2 column.

    **font** The font.

    **textColor** The text color.

    **backgroundColor** The background color.

    **verticalAlignment** The vertical alignment of the text
    within the row. Options:

    - `"top"`
    - `"center"`
    - `"bottom"`

    .. note::
       This class should only be used in the *columnDescriptions*
       *cellClass* argument during the construction of a List.
       This is never constructed directly.
    """

    def __init__(self,
            font=None,
            textColor=None,
            backgroundColor=None,
            verticalAlignment="center",
            editable=False,
            callback=None
        ):
        super().__init__(
            editable=False,
            callback=callback
        )
        textField = self.getNSTextField()
        if backgroundColor is not None:
            textField.setDrawsBackground_(True)
            textField.setBackgroundColor_(backgroundColor)
        if textColor is not None:
            textField.setTextColor_(textColor)
        if font is not None:
            textField.setFont_(font)

from vanilla.vanillaSlider import Slider

class SliderList2Cell(Slider):

    """
    An object that displays a slider in a List2 column.

    **minValue** The minimum value for the slider.

    **maxValue** The maximum value for the slider.

    **tickMarkCount** The number of tick marks to be displayed on the slider.
    If *None* is given, no tick marks will be displayed.

    **stopOnTickMarks** Boolean representing if the slider knob should only
    stop on the tick marks.

    .. note::
       This class should only be used in the *columnDescriptions*
       *cellClass* argument during the construction of a List.
       This is never constructed directly.
    """

    def __init__(self,
            minValue=0,
            maxValue=100,
            value=50,
            tickMarkCount=0,
            stopOnTickMarks=False,
            editable=False,
            callback=None
        ):
        super().__init__(
            "auto",
            minValue=minValue,
            maxValue=maxValue,
            value=value,
            tickMarkCount=tickMarkCount,
            stopOnTickMarks=stopOnTickMarks,
            sizeStyle="small",
            callback=callback
        )
        self.enable(editable)

from vanilla.vanillaCheckBox import CheckBox

class CheckBoxList2Cell(CheckBox):

    """
    An object that displays a check box in a List2 column.

    **title** The title to be set in *all* items in the List column.

    .. note::
       This class should only be used in the *columnDescriptions*
       *cellClass* argument during the construction of a List.
       This is never constructed directly.
    """

    def __init__(self,
            title=None,
            editable=False,
            callback=None
        ):
        super().__init__(
            "auto",
            title=title,
            sizeStyle="small",
            callback=callback
        )
        self.enable(editable)

from vanilla.vanillaPopUpButton import PopUpButton

class PopUpButtonList2Cell(PopUpButton):

    """
    An object that displays a pop up list in a List2 column.

    **items** The items that should appear in the pop up list.

    .. note::
       This class should only be used in the *columnDescriptions*
       *cellClass* argument during the construction of a List.
       This is never constructed directly.
    """

    def __init__(self,
            items=[],
            editable=False,
            callback=None
        ):
        super().__init__(
            "auto",
            items=items,
            sizeStyle="small",
            callback=callback
        )
        self.enable(editable)

from vanilla.vanillaImageView import ImageView

class ImageList2Cell(ImageView):

    """
    An object that displays an image in a List2 column.

    **horizontalAlignment** A string representing the desired horizontal
    alignment of the image in the view. The options are:

    +-------------+-------------------------+
    | "left"      | Image is aligned left.  |
    +-------------+-------------------------+
    | "right"     | Image is aligned right. |
    +-------------+-------------------------+
    | "center"    | Image is centered.      |
    +-------------+-------------------------+

    **verticalAlignment** A string representing the desired vertical alignment
    of the image in the view. The options are:

    +-------------+--------------------------+
    | "top"       | Image is aligned top.    |
    +-------------+--------------------------+
    | "bottom"    | Image is aligned bottom. |
    +-------------+--------------------------+
    | "center"    | Image is centered.       |
    +-------------+--------------------------+

    **scale** A string representing the desired scale style of the image in the
    view. The options are:

    +----------------+----------------------------------------------+
    | "proportional" | Proportionally scale the image to fit in the |
    |                | view if it is larger than the view.          |
    +----------------+----------------------------------------------+
    | "fit"          | Distort the proportions of the image until   |
    |                | it fits exactly in the view.                 |
    +----------------+----------------------------------------------+
    | "none"         | Do not scale the image.                      |
    +----------------+----------------------------------------------+

    .. note::
       This class should only be used in the *columnDescriptions*
       *cellClass* argument during the construction of a List.
       This is never constructed directly.
    """

    def __init__(self,
            horizontalAlignment="center",
            verticalAlignment="center",
            scale="proportional",
            editable=False,
            callback=None
        ):
        super().__init__(
            "auto",
            horizontalAlignment=horizontalAlignment,
            verticalAlignment=verticalAlignment,
            scale=scale
        )

    def set(self, image):
        self.setImage(imageObject=image)

    def get(self):
        return self.getNSImageView().image()

from vanilla.vanillaSegmentedButton import SegmentedButton

class SegmentedButtonList2Cell(SegmentedButton):

    """
    An object that displays a segmented button in a List2 column.

    **segmentDescriptions** An ordered list of dictionaries describing the segments.

    **minValue** The minimum value for the slider.

    **maxValue** The maximum value for the slider.

    +------------------------+-----------------------------------------------------+
    | imagePath (optional)   | A file path to an image to display in the segment.  |
    +------------------------+-----------------------------------------------------+
    | imageNamed (optional)  | The name of an image already loaded as a `NSImage`_ |
    |                        | by the application to display in the segment.       |
    +------------------------+-----------------------------------------------------+
    | imageObject (optional) | A `NSImage`_ object to display in the segment.      |
    +------------------------+-----------------------------------------------------+

    .. _NSImage: https://developer.apple.com/documentation/appkit/nsimage?language=objc

    .. note::
       This class should only be used in the *columnDescriptions*
       *cellClass* argument during the construction of a List.
       This is never constructed directly.
    """

    def __init__(self,
            segmentDescriptions=[],
            selectionStyle="one",
            editable=False,
            callback=None
        ):
        super().__init__(
            "auto",
            segmentDescriptions=segmentDescriptions,
            selectionStyle=selectionStyle,
            sizeStyle="small",
            callback=callback
        )
        self.enable(editable)

from vanilla.vanillaColorWell import ColorWell

class ColorWellList2Cell(ColorWell):

    """
    An object that displays a color well in a List2 column.

    **title** The title to be set in *all* items in the List column.

    .. note::
       This class should only be used in the *columnDescriptions*
       *cellClass* argument during the construction of a List.
       This is never constructed directly.
    """

    def __init__(self,
            editable=False,
            callback=None
        ):
        super().__init__(
            "auto",
            callback=callback
        )
        colorWell = self.getNSColorWell()
        self.enable(editable)

from vanilla.vanillaLevelIndicator import LevelIndicator

class LevelIndicatorList2Cell(LevelIndicator):

    """
    An object that displays a level indicator in a List2 column.
    Refer to the LevelIndicator documentation for options.

    .. note::
       This class should only be used in the *columnDescriptions*
       *cellClass* argument during the construction of a List.
       This is never constructed directly.
    """

    def __init__(self,
            style="discrete",
            value=5,
            minValue=0,
            maxValue=10,
            warningValue=None,
            criticalValue=None,
            tickMarkPosition=None,
            minorTickMarkCount=None,
            majorTickMarkCount=None,
            imagePath=None,
            imageNamed=None,
            imageObject=None,
            editable=False,
            callback=None
        ):
        super().__init__(
            "auto",
            style=style,
            value=value,
            minValue=minValue,
            maxValue=maxValue,
            warningValue=warningValue,
            criticalValue=criticalValue,
            tickMarkPosition=tickMarkPosition,
            minorTickMarkCount=minorTickMarkCount,
            majorTickMarkCount=majorTickMarkCount,
            # sizeStyle="small",
            callback=callback
        )
        self.enable(editable)
        cell = self._nsObject.cell()
        if imagePath is not None:
            image = NSImage.alloc().initWithContentsOfFile_(imagePath)
        elif imageNamed is not None:
            image = NSImage.imageNamed_(imageNamed)
        elif imageObject is not None:
            image = imageObject
        if imageObject is not None:
            cell.setImage_(image)


text:
import * as React from 'react';
import { render } from '../../../../__tests__/utils/test-utils';
import { Header } from '../header';

describe('Header', function fnDescribe() {
    it('should render correctly', function fnIt() {
        const { asFragment } = render(<Header>Headers Children</Header>);
        expect(asFragment()).toMatchSnapshot();
    });
});


text:
package edu.harvard.iq.dataverse;
import java.io.Serializable;

/**
 * Id Class for {@link DatasetVersionUser}, representing a composite key.
 * @author skraffmiller
 */

public class DatasetVersionDatasetUserId implements Serializable {

    private String userIdentifier;
    private long datasetversionid;

    @Override
    public int hashCode() {
        return (int) (userIdentifier.hashCode() ^ datasetversionid);
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof DatasetVersionDatasetUserId)) {
            return false;
        }
        DatasetVersionDatasetUserId other = (DatasetVersionDatasetUserId) object;
        return (this.userIdentifier.equals(other.userIdentifier) && this.datasetversionid == other.datasetversionid );
    }

    @Override
    public String toString() {
        return "DatasetVersionDatasetUserId{" + "userIdentifier=" + userIdentifier + ", datasetversionid=" + datasetversionid + '}';
    }

    public String getUserIdentifier() {
        return userIdentifier;
    }

    public void setUserIdentifier(String userIdentifier) {
        this.userIdentifier = userIdentifier;
    }

    public long getDatasetversionid() {
        return datasetversionid;
    }

    public void setDatasetversionid(long datasetversionid) {
        this.datasetversionid = datasetversionid;
    }

}


text:
module UpdateHelper
  module Mapper
    class Base
    end
  end
end