text:
class AddOrderState < ActiveRecord::Migration[4.2]

  def self.up
    change_table :orders do |t|
      t.string :state, limit: 50
    end
  end

  def self.down
    remove_column :orders, :state
  end

end


text:
package me.xcoding.opencdc.mysql.protocol.column;

import me.xcoding.opencdc.mysql.protocol.BasicReader;

/**
 * All of Column Value Type Parsers.
 * @author Teny Zh(zh.Teny.1@gmail.com)
 *
 */
public class ColumnValueParser {
	static final ValueParser[] parsers = new ValueParser[0x0020];

	static {
		parsers[ColumnType.MYSQL_TYPE_NULL] = new MNull();

		parsers[ColumnType.MYSQL_TYPE_BIT] = new MBit();
		parsers[ColumnType.MYSQL_TYPE_BLOB] = new MBlob();
		parsers[ColumnType.MYSQL_TYPE_ENUM] = new MEnum();
		parsers[ColumnType.MYSQL_TYPE_TINY_BLOB] = new MTinyBlob();
		parsers[ColumnType.MYSQL_TYPE_MEDIUM_BLOB] = new MMediumBlob();

		parsers[ColumnType.MYSQL_TYPE_TINY] = new MTiny();
		parsers[ColumnType.MYSQL_TYPE_LONG] = new MLong();
		parsers[ColumnType.MYSQL_TYPE_INT24] = new MInt24();
		parsers[ColumnType.MYSQL_TYPE_SHORT] = new MShort();
		parsers[ColumnType.MYSQL_TYPE_LONGLONG] = new MLongLong();

		parsers[ColumnType.MYSQL_TYPE_DATE] = new MDate();
		parsers[ColumnType.MYSQL_TYPE_NEWDATE] = new MNewDate();

		parsers[ColumnType.MYSQL_TYPE_YEAR] = new MYear();

		parsers[ColumnType.MYSQL_TYPE_TIME] = new MTime();
		parsers[ColumnType.MYSQL_TYPE_TIME2] = new MTime2();

		parsers[ColumnType.MYSQL_TYPE_FLOAT] = new MFloat();
		parsers[ColumnType.MYSQL_TYPE_DOUBLE] = new MDouble();
		parsers[ColumnType.MYSQL_TYPE_DECIMAL] = new MDecimal();
		parsers[ColumnType.MYSQL_TYPE_NEWDECIMAL] = new MNewDecimal();

		parsers[ColumnType.MYSQL_TYPE_DATETIME] = new MDateTime();
		parsers[ColumnType.MYSQL_TYPE_DATETIME2] = new MDateTime2();

		parsers[ColumnType.MYSQL_TYPE_TIMESTAMP] = new MTimestamp();
		parsers[ColumnType.MYSQL_TYPE_TIMESTAMP2] = new MTimestamp2();

		parsers[ColumnType.MYSQL_TYPE_STRING] = new MString();
		parsers[ColumnType.MYSQL_TYPE_VARCHAR] = new MVarchar();
		parsers[ColumnType.MYSQL_TYPE_VAR_STRING] = new MVarString();

		parsers[ColumnType.MYSQL_TYPE_GEOMETRY] = new MGeometry();
	}

	public static Object valueOf(int type, int length, BasicReader reader) {
		assert type > 0x01F : "typecode must less than 32";
		return parsers[type & 0x01F].valueOf(length, reader);
	}
}

redpajama_set_name: RedPajamaGithub


text:
// Code generated by gen_tests.py and process_polyglot.py.
// Do not edit this file directly.
// The template for this file is located at:
// ../template.go.tpl
package reql_tests

import (
	"testing"
	"time"

	"github.com/stretchr/testify/suite"
	r "gopkg.in/rethinkdb/rethinkdb-go.v6"
	"gopkg.in/rethinkdb/rethinkdb-go.v6/internal/compare"
)

// Test duplicate indexes with squashing
func TestChangefeedsIdxcopySuite(t *testing.T) {
	suite.Run(t, new(ChangefeedsIdxcopySuite))
}

type ChangefeedsIdxcopySuite struct {
	suite.Suite

	session *r.Session
}

func (suite *ChangefeedsIdxcopySuite) SetupTest() {
	suite.T().Log("Setting up ChangefeedsIdxcopySuite")
	// Use imports to prevent errors
	_ = time.Time{}
	_ = compare.AnythingIsFine

	session, err := r.Connect(r.ConnectOpts{
		Address: url,
	})
	suite.Require().NoError(err, "Error returned when connecting to server")
	suite.session = session

	r.DBDrop("db_feed_idxcopy").Exec(suite.session)
	err = r.DBCreate("db_feed_idxcopy").Exec(suite.session)
	suite.Require().NoError(err)
	err = r.DB("db_feed_idxcopy").Wait().Exec(suite.session)
	suite.Require().NoError(err)

	r.DB("db_feed_idxcopy").TableDrop("table_test_changefeed_idx").Exec(suite.session)
	err = r.DB("db_feed_idxcopy").TableCreate("table_test_changefeed_idx").Exec(suite.session)
	suite.Require().NoError(err)
	err = r.DB("db_feed_idxcopy").Table("table_test_changefeed_idx").Wait().Exec(suite.session)
	suite.Require().NoError(err)
}

func (suite *ChangefeedsIdxcopySuite) TearDownSuite() {
	suite.T().Log("Tearing down ChangefeedsIdxcopySuite")

	if suite.session != nil {
		r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session)
		r.DB("db_feed_idxcopy").TableDrop("table_test_changefeed_idx").Exec(suite.session)
		r.DBDrop("db_feed_idxcopy").Exec(suite.session)

		suite.session.Close()
	}
}

func (suite *ChangefeedsIdxcopySuite) TestCases() {
	suite.T().Log("Running ChangefeedsIdxcopySuite: Test duplicate indexes with squashing")

	table_test_changefeed_idx := r.DB("db_feed_idxcopy").Table("table_test_changefeed_idx")
	_ = table_test_changefeed_idx // Prevent any noused variable errors

	{
		// changefeeds/idxcopy.yaml line #4
		/* partial({'created':1}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"created": 1})
		/* table_test_changefeed_idx.index_create('a') */

		suite.T().Log("About to run line #4: table_test_changefeed_idx.IndexCreate('a')")

		runAndAssert(suite.Suite, expected_, table_test_changefeed_idx.IndexCreate("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #4")
	}

	{
		// changefeeds/idxcopy.yaml line #6
		/* AnythingIsFine */
		var expected_ string = compare.AnythingIsFine
		/* table_test_changefeed_idx.index_wait('a') */

		suite.T().Log("About to run line #6: table_test_changefeed_idx.IndexWait('a')")

		runAndAssert(suite.Suite, expected_, table_test_changefeed_idx.IndexWait("a"), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #6")
	}

	// changefeeds/idxcopy.yaml line #8
	// feed = table_test_changefeed_idx.order_by(index='a').limit(10).changes(squash=2).limit(9)
	suite.T().Log("Possibly executing: var feed r.Term = table_test_changefeed_idx.OrderBy().OptArgs(r.OrderByOpts{Index: 'a', }).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: 2, }).Limit(9)")

	feed := maybeRun(table_test_changefeed_idx.OrderBy().OptArgs(r.OrderByOpts{Index: "a"}).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: 2}).Limit(9), suite.session, r.RunOpts{
		MaxBatchRows: 1,
	})
	_ = feed // Prevent any noused variable errors

	{
		// changefeeds/idxcopy.yaml line #15
		/* partial({'inserted':12, 'errors':0}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"inserted": 12, "errors": 0})
		/* table_test_changefeed_idx.insert(r.range(0, 12).map({'id':r.row, 'a':5})) */

		suite.T().Log("About to run line #15: table_test_changefeed_idx.Insert(r.Range(0, 12).Map(map[interface{}]interface{}{'id': r.Row, 'a': 5, }))")

		runAndAssert(suite.Suite, expected_, table_test_changefeed_idx.Insert(r.Range(0, 12).Map(map[interface{}]interface{}{"id": r.Row, "a": 5})), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #15")
	}

	{
		// changefeeds/idxcopy.yaml line #20
		/* partial({'deleted':3, 'errors':0}) */
		var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"deleted": 3, "errors": 0})
		/* table_test_changefeed_idx.get_all(1, 8, 9, index='id').delete() */

		suite.T().Log("About to run line #20: table_test_changefeed_idx.GetAll(1, 8, 9).OptArgs(r.GetAllOpts{Index: 'id', }).Delete()")

		runAndAssert(suite.Suite, expected_, table_test_changefeed_idx.GetAll(1, 8, 9).OptArgs(r.GetAllOpts{Index: "id"}).Delete(), suite.session, r.RunOpts{
			GeometryFormat: "raw",
			GroupFormat:    "map",
		})
		suite.T().Log("Finished running line #20")
	}

	{
		// changefeeds/idxcopy.yaml line #26
		/* AnythingIsFine */
		var expected_ string = compare.AnythingIsFine
		/* wait(2) */

		suite.T().Log("About to run line #26: wait(2)")

		actual := wait(2)

		compare.Assert(suite.T(), expected_, actual)
		suite.T().Log("Finished running line #26")
	}

	{
		// changefeeds/idxcopy.yaml line #28
		/* bag([
		{"new_val":{"a":5, "id":0}, "old_val":nil},
		{"new_val":{"a":5, "id":2}, "old_val":nil},
		{"new_val":{"a":5, "id":3}, "old_val":nil},
		{"new_val":{"a":5, "id":4}, "old_val":nil},
		{"new_val":{"a":5, "id":5}, "old_val":nil},
		{"new_val":{"a":5, "id":6}, "old_val":nil},
		{"new_val":{"a":5, "id":7}, "old_val":nil},
		{"new_val":{"a":5, "id":10}, "old_val":nil},
		{"new_val":{"a":5, "id":11}, "old_val":nil}]) */
		var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 0}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 2}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 3}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 4}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 5}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 6}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 7}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 10}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 11}, "old_val": nil}})
		/* fetch(feed) */

		suite.T().Log("About to run line #28: fetch(feed, 0)")

		fetchAndAssert(suite.Suite, expected_, feed, 0)
		suite.T().Log("Finished running line #28")
	}
}


text:
time_slice_list build_alternate_list(list *es, time_hrts cl, time_hrts start_time, time_hrts end_time) {
    event_rm *ev = pop(es);
    time_slice_list ts = new_list();
    time_slice *cur = GC_MALLOC_ATOMIC(sizeof(time_slice));

    cur->start = cl - end_time;
    cur->task_id = -1;
    cur->statue = PTBA_FREE;

    while (ev) {
        cur->end = cl - ev->time;

        if (cur->start != cur->end) {
            if (ev->event == RM_EVENT_STARTED)
                cur->statue |= PTBA_ALTERNATE_FINISH;
            else if (ev->event == RM_EVENT_RESUMED)
                cur->statue |= PTBA_ALTERNATE_PAUSE;
            push_right(ts, cur);
        }

        cur = GC_MALLOC_ATOMIC(sizeof(time_slice));
        cur->start = cl - ev->time;
        cur->statue = PTBA_EMPTY;

        switch (ev->event) {
            case RM_EVENT_STARTED:
            case RM_EVENT_RESUMED:
                cur->task_id = -1;
                cur->statue |= PTBA_FREE;
                break;
            case RM_EVENT_PAUSED:
                cur->task_id = ev->task;
                cur->statue |= PTBA_ALTERNATE_RESUME;
                break;
            case RM_EVENT_FINISHED:
                cur->task_id = ev->task;
                cur->statue |= PTBA_ALTERNATE_START;
                break;
        }

        ev = pop(es);
    }

    if (cur->start != cl - start_time) {
        cur->end = cl - start_time;
        push_right(ts, cur);
    }

    return ts;
}

bool captured_by_task(const void *t, const void *id) {
    return (((time_slice *) t)->task_id == *((task_hrts *) id));
}

list_node *cancel_alternate(time_slice_list l, task_hrts tid) {
    list_node *t = head_of(l);

    while ((t = find_node_r(t, captured_by_task, &tid))) {

        if (t->prev && (ts_data(t->prev)->statue & PTBA_FREE)) {
            ts_data(t)->start = ts_data(t->prev)->start;
            delete_node(l, t->prev);
        }

        if (t->next && (ts_data(t->next)->statue & PTBA_FREE)) {
            ts_data(t)->end = ts_data(t->next)->end;
            delete_node(l, t->next);
        }

        ts_data(t)->task_id = -1;
        //ts_data(t)->statue = PTBA_FREE;

        if (ts_data(t)->statue & PTBA_ALTERNATE_FINISH) {
            ts_data(t)->statue = PTBA_FREE;
            return t;
        } else {
            ts_data(t)->statue = PTBA_FREE;
        }

    };

    return t;
}

bool tid_eq(const void *t, const void *id) {
    return (((task_rm *) t)->tid == *((task_hrts *) id));
}

task_list_rm pop_alternates_before(time_slice_list l, list_node *node, period_info_ptba *task_info,
                                   time_hrts cycle_length) {
    task_list_rm ts = new_list();
    list_node *tn;
    task_rm *task;
    time_hrts max_ft = (node) ? ts_data(node)->end : 0;
    time_hrts ft;
    list_node *tmp;

    while (node) {
        if (ts_data(node)->statue & PTBA_FREE)
            goto next_loop;

        if ((tn = find_node_r(head_of(ts), tid_eq, &(ts_data(node)->task_id)))) {
            ((task_rm *) data_of(tn))->rt += ts_data(node)->end - ts_data(node)->start;
            if (ts_data(node)->statue & PTBA_ALTERNATE_START)
                ((task_rm *) data_of(tn))->paused = false;
        } else {
            task = GC_MALLOC_ATOMIC(sizeof(task_rm));
            task->tid = ts_data(node)->task_id;
            task->rt = ts_data(node)->end - ts_data(node)->start;
            task->period = task_info[task_no(ts_data(node)->task_id)].period;
            ft = task->period * (job_no(ts_data(node)->task_id) + 1);
            if (ft > max_ft) ft = max_ft;
            task->st = cycle_length - ft;

            if (ts_data(node)->statue & PTBA_ALTERNATE_FINISH)
                task->resumed = false;
            else
                task->resumed = true;

            if (ts_data(node)->statue & PTBA_ALTERNATE_START)
                task->paused = false;
            else
                task->paused = true;

            push(ts, task);
        }

        next_loop:
        tmp = node;
        node = node->prev;
        delete_node(l, tmp);
    }

    return ts;
}

time_slice_list rm_backward_from_task_list(task_list_rm ts, time_hrts cl, time_hrts ct, time_hrts end_time) {
    schedule_status_rm *ss = init_status_rm(ts);
    event_list_rm es = new_list();
    time_hrts start_time = ct;

    while ((ct = schedule_rm(ss, es, ct)) >= 0);
    return build_alternate_list(es, cl, start_time, end_time);
}

void cancel_n_adjust_alternate(time_slice_list l, task_hrts tid, period_info_ptba *ts) {
    time_hrts start_time = ts_data(head_of(l))->start;
    time_hrts cl = ts_data(tail_of(l))->end;
    list_node *cancelled = cancel_alternate(l, tid);
    task_list_rm ts_before = pop_alternates_before(l, cancelled, ts, cl);
    time_hrts end_time = cancelled ? ts_data(cancelled)->end : ts_data(head_of(l))->end;
    time_slice_list l_before = rm_backward_from_task_list(ts_before, cl, cl - end_time, cl - start_time);

    if (not_empty(l_before) && not_empty(l) &&
        ts_data(tail_of(l_before))->task_id == ts_data(head_of(l))->task_id) {
        ts_data(head_of(l))->start = ts_data(tail_of(l_before))->start;
        if (ts_data(tail_of(l_before))->statue & PTBA_ALTERNATE_START) {
            ts_data(head_of(l))->statue &= ~PTBA_ALTERNATE_RESUME;
            ts_data(head_of(l))->statue |= PTBA_ALTERNATE_START;
        }
        delete_node(l_before, tail_of(l_before));
    }
    concat_before(l, l_before);
}

time_slice_list rm_backward(period_info_ptba *ts, task_hrts n, time_hrts cl) {
    task_list_rm tl = alternate_to_backward_task_rm(ts, n, cl);
    return rm_backward_from_task_list(tl, cl, 0, cl);
}

task_list_rm alternate_to_backward_task_rm(period_info_ptba *ts, task_hrts n, time_hrts cl) {
    task_list_rm tl = new_list();
    task_rm *task;

    for (task_hrts i = 0; i < n; i++)
        for (task_hrts j = 0; j < cl / ts[i].period; j++) {
            task = GC_MALLOC_ATOMIC(sizeof(task_rm));
            task->tid = task_id(i, j);
            task->period = ts[i].period;
            task->rt = ts[i].alternate_time;
            task->st = cl - (j + 1) * ts[i].period;
            task->paused = false;
            task->resumed = false;
            push_right(tl, task);
        }
    return tl;
}

statue_ptba *prepare_statue_ptba(task_info *ts, task_hrts n) {
    statue_ptba *statue = GC_MALLOC(sizeof(statue_ptba));
    statue->task_info = GC_MALLOC_ATOMIC(sizeof(period_info_ptba) * n);

    for (time_hrts i = 0; i < n; i++) {
        statue->task_info[i].alternate_time = ts[i].alternate_time;
        statue->task_info[i].primary_time = ts[i].primary_time;
        statue->task_info[i].period = ts[i].period;
    }

    statue->num_task = n;
    statue->cycle_length = cycle_length(ts, n);

    statue->alternate_ts = rm_backward(statue->task_info, n, statue->cycle_length);

    statue->last_scheduling_point = 0;
    statue->current_running = -1;

    statue->predict_table = NULL;
    statue->pt_task = -1;

    statue->alter_orig = NULL;

    statue->task_statue = GC_MALLOC_ATOMIC(sizeof(task_statue_ptba) * n);
    for (task_hrts i = 0; i < n; i++) {
        statue->task_statue[i].job = 0;
        statue->task_statue[i].remaining_time = ts[i].primary_time;
        statue->task_statue[i].statue = JOB_STATUE_RELEASED;
    }

    return statue;
}

statue_ptba *copy_statue(statue_ptba *s) {
    statue_ptba *s1 = GC_MALLOC(sizeof(statue_ptba));
    s1->task_info = GC_MALLOC_ATOMIC(sizeof(period_info_ptba) * s->num_task);
    memcpy(s1->task_info, s->task_info, sizeof(period_info_ptba) * s->num_task);
    s1->num_task = s->num_task;
    s1->cycle_length = s->cycle_length;
    s1->alternate_ts = copy_list(s->alternate_ts, sizeof(time_slice));
    s1->last_scheduling_point = 0;
    s1->current_running = -1;
    s1->predict_table = NULL;
    s1->pt_task = -1;
    s1->alter_orig = NULL;
    s1->task_statue = GC_MALLOC_ATOMIC(sizeof(task_statue_ptba) * s1->num_task);
    for (task_hrts i = 0; i < s1->num_task; i++) {
        s1->task_statue[i].job = 0;
        s1->task_statue[i].remaining_time = s1->task_info[i].primary_time;
        s1->task_statue[i].statue = JOB_STATUE_RELEASED;
    }

    return s1;
}

bool availability_for_primary(statue_ptba *s, time_slice_list tsl, task_hrts tid) {
    list_node *tmp = head_of(tsl);
    time_slice *t = NULL;
    task_hrts t_no = task_no(tid);
    task_hrts j_no = job_no(tid);
    time_hrts needed_time;
    time_hrts release_time = s->task_info[t_no].period * job_no(tid);

    if (j_no == s->task_statue[t_no].job)
        needed_time = s->task_statue[t_no].remaining_time;
    else
        needed_time = s->task_info[t_no].primary_time;

    time_hrts count_time = needed_time;
    while (tmp && ts_data(tmp)->task_id != tid) {
        if (ts_data(tmp)->statue & PTBA_FREE) {
            if (ts_data(tmp)->start < release_time) {
                if (ts_data(tmp)->end > release_time)
                    count_time -= ts_data(tmp)->end - release_time;
            } else {
                count_time -= ts_data(tmp)->end - ts_data(tmp)->start;
            }
            if (count_time <= 0) break;
        }
        tmp = tmp->next;
    }
    if (count_time > 0) return false;

    tmp = head_of(tsl);
    while (needed_time > 0) {
        if (ts_data(tmp)->statue & PTBA_FREE) {
            if (ts_data(tmp)->start < release_time) {
                if (ts_data(tmp)->end > release_time) {
                    t = GC_MALLOC_ATOMIC(sizeof(time_slice));
                    t->start = release_time;
                    t->end = ts_data(tmp)->end;
                    t->task_id = tid;
                    t->statue = PTBA_PRIMARY_USED;
                    ts_data(tmp)->end = release_time;
                    insert_after(tsl, tmp, t);
                    tmp = tmp->next;
                    needed_time -= t->end - t->start;
                }
            } else {
                ts_data(tmp)->task_id = tid;
                ts_data(tmp)->statue = PTBA_PRIMARY_USED;
                needed_time -= ts_data(tmp)->end - ts_data(tmp)->start;
            }

            if (needed_time < 0) {
                t = GC_MALLOC_ATOMIC(sizeof(time_slice));
                t->end = ts_data(tmp)->end;
                t->start = t->end + needed_time;
                t->statue = PTBA_FREE;
                t->task_id = -1;
                ts_data(tmp)->end = t->start;
                insert_after(tsl, tmp, t);
                needed_time = 0;
            }
        }
        tmp = tmp->next;
    }
    return true;
}

bool not_terminated(statue_ptba *statue, task_hrts tid) {
    time_hrts t_no = task_no(tid);

    if (job_no(tid) == statue->task_statue[t_no].job &&
            statue->task_statue[t_no].remaining_time == JOB_STATUE_PRIMARY_TERMINATED)
        return false;
    else
        return true;
}

bool predict(statue_ptba *statue, task_hrts tid) {
    time_slice_list tsl = copy_until_r(statue->alternate_ts, captured_by_task, sizeof(time_slice), &tid);
    list_node *tmp = head_of(tsl);

    while (tmp) {
        if (ts_data(tmp)->statue & PTBA_ALTERNATE_START) {
            if (not_terminated(statue, ts_data(tmp)->task_id))
                availability_for_primary(statue, tsl, ts_data(tmp)->task_id);
        }
        tmp = tmp->next;
    }

    if (availability_for_primary(statue, tsl, tid)) {
        statue->predict_table = tsl;
        statue->pt_task = tid;
        return true;
    } else {
        statue->predict_table = NULL;
        statue->pt_task = -1;
        return false;
    }
}

void adjust_released(statue_ptba *statue, time_hrts current_time) {
    time_hrts tmp_release_time;
    for (task_hrts i = 0; i < statue->num_task; i++) {
        if (statue->task_statue[i].statue == JOB_STATUE_FINISHED) {
            tmp_release_time = statue->task_info[i].period * (statue->task_statue[i].job + 1);
            if (tmp_release_time <= current_time) {
                statue->task_statue[i].job++;
                statue->task_statue[i].remaining_time = statue->task_info[i].primary_time;
                statue->task_statue[i].statue = JOB_STATUE_RELEASED;
            }
        }
    }
}

task_hrts find_task_with_earliest_notice_time(statue_ptba *statue) {
    job_statue_ptba job_statue;
    task_hrts tmp_tid;
    list_node *tmp;
    time_hrts least_notice_time = statue->cycle_length + 1;
    task_hrts selected_next_primary = -1;

    for (task_hrts i = 0; i < statue->num_task; i++) {
        job_statue = statue->task_statue[i].statue;
        if (job_statue == JOB_STATUE_RELEASED) {
            tmp_tid = task_id(i, statue->task_statue[i].job);
            tmp = find_node_r(head_of(statue->alternate_ts), captured_by_task, &tmp_tid);
            if (ts_data(tmp)->start <= least_notice_time) {
                least_notice_time = ts_data(tmp)->start;
                selected_next_primary = tmp_tid;
            }
        }
    }

    return selected_next_primary;
}

time_hrts schedule_ptba(statue_ptba *statue, time_hrts current_time, schedule_reason reason,
                        action_type *action) {

    action->action = ACTION_FINISH;
    action->task_no = -1;

    if (strip_time(statue->alternate_ts, current_time) == 0) {
        statue->current_running = -1;
        return -1;
    }

    if (statue->current_running >= 0) {
        task_statue_ptba *cur_task_statue = statue->task_statue + task_no(statue->current_running);
        if (reason != REASON_PRIMARY_CRASHED) {
            if (cur_task_statue->statue == JOB_STATUE_ALTERNATE_ADV_RUNNING) {
                clean_EIT(statue, current_time);
            } else {
                cur_task_statue->remaining_time -= current_time - statue->last_scheduling_point;
                if (cur_task_statue->remaining_time <= 0) {
                    if (cur_task_statue->statue == JOB_STATUE_PRIMARY_RUNNING) {
                        cancel_n_adjust_alternate(statue->alternate_ts, statue->current_running, statue->task_info);
                    }
                    cur_task_statue->statue = JOB_STATUE_FINISHED;
                }
            }
        }
    }

    adjust_released(statue, current_time);

    if (statue->predict_table)
        return schedule_ptba_PT(statue, current_time, reason, action);
    else
        return schedule_ptba_nonPT(statue, current_time, reason, action);
}

time_hrts schedule_ptba_nonPT(statue_ptba *statue, time_hrts current_time, schedule_reason reason,
                              action_type *action) {
    time_slice *first_slice = first(statue->alternate_ts);

    if (reason == REASON_PRIMARY_CRASHED) {
        task_statue_ptba *cur_task_statue = statue->task_statue + task_no(statue->current_running);
        cur_task_statue->statue = JOB_STATUE_PRIMARY_TERMINATED;
        cur_task_statue->remaining_time = 0;
    }

    if (!(first_slice->statue & PTBA_FREE)) {
        task_statue_ptba *cur_task_statue = statue->task_statue + task_no(first_slice->task_id);
        statue->current_running = first_slice->task_id;
        action->task_no = task_no(first_slice->task_id);

        if (first_slice->statue & PTBA_ALTERNATE_START) {
            action->action |= ACTION_START_ALTERNATE;
            cur_task_statue->remaining_time = statue->task_info[task_no(first_slice->task_id)].alternate_time;
            if (cur_task_statue->statue & JOB_STATUE_PRIMARY_RUNNING)
                action->action |= ACTION_CANCEL_PRIMARY;
            cur_task_statue->statue = JOB_STATUE_ALTERNATE_RUNNING;
        } else
            action->action |= ACTION_RESUME_ALTERNATE;

        statue->last_scheduling_point = current_time;
        return first_slice->end;
    } else {
        task_hrts selected_next_primary;

        while (1) {
            selected_next_primary = find_task_with_earliest_notice_time(statue);
            if (selected_next_primary < 0) break;

            if (predict(statue, selected_next_primary)) {
                statue->pt_task = selected_next_primary;
                return schedule_ptba_PT(statue, current_time, REASON_SCHEDULE_POINT, action);
            } else {
                task_statue_ptba *cur_task_statue = statue->task_statue + task_no(selected_next_primary);
                cur_task_statue->statue = JOB_STATUE_PRIMARY_TERMINATED;
                cur_task_statue->remaining_time = 0;
            }
        }

        try_EIT(statue, action);

        time_hrts next_schedule_time = statue->cycle_length;
        for (task_hrts i = 0; i < statue->num_task; i++) {
            if (statue->task_statue[i].statue == JOB_STATUE_FINISHED) {
                time_hrts tmp_release_time = statue->task_info[i].period * (statue->task_statue[i].job + 1);
                if (tmp_release_time < next_schedule_time)
                    next_schedule_time = tmp_release_time;
            }
        }

        first_slice = first(statue->alternate_ts);
        if (next_schedule_time > first_slice->end)
            next_schedule_time = first_slice->end;

        statue->last_scheduling_point = current_time;
        return next_schedule_time;
    }
}

time_hrts schedule_ptba_PT(statue_ptba *statue, time_hrts current_time, schedule_reason reason,
                           action_type *action) {
    time_slice *first_slice;
    first_slice = strip_time(statue->predict_table, current_time);

    if (reason == REASON_PRIMARY_CRASHED ||
            (statue->current_running == statue->pt_task &&
             statue->task_statue[task_no(statue->current_running)].statue == JOB_STATUE_FINISHED)) {
        statue->pt_task = -1;
        statue->predict_table = NULL;
        return schedule_ptba_nonPT(statue, current_time, reason, action);
    }

    if (first_slice->statue & PTBA_FREE) {
        action->task_no = -1;
        action->action = ACTION_NOTHING;
        statue->current_running = -1;
    } else {
        task_statue_ptba *cur_task_statue = statue->task_statue + task_no(first_slice->task_id);
        if (first_slice->statue & PTBA_PRIMARY_USED) {
            if (cur_task_statue->statue != JOB_STATUE_PRIMARY_RUNNING) {
                cur_task_statue->statue = JOB_STATUE_PRIMARY_RUNNING;
                action->action |= ACTION_START_PRIMARY;
            } else {
                action->action |= ACTION_RESUME_PRIMARY;
            }
        } else {
            if (first_slice->statue & PTBA_ALTERNATE_START) {
                cur_task_statue->remaining_time = statue->task_info[task_no(first_slice->task_id)].alternate_time;
                cur_task_statue->statue = JOB_STATUE_ALTERNATE_RUNNING;
                action->action |= ACTION_START_ALTERNATE;
            } else {
                action->action |= ACTION_RESUME_ALTERNATE;
            }
        }
        action->task_no = task_no(first_slice->task_id);
        statue->current_running = first_slice->task_id;
    }

    statue->last_scheduling_point = current_time;
    return first_slice->end;
}

time_slice *strip_time(time_slice_list tsl, time_hrts current_time) {
    time_slice *tmp_slice = first(tsl);

    while (tmp_slice && tmp_slice->end <= current_time) {
        pop(tsl);
        tmp_slice = first(tsl);
    }

    if (tmp_slice && tmp_slice->start < current_time)
        tmp_slice->start = current_time;

    return tmp_slice;
}

bool try_EIT(statue_ptba *statue, action_type *action) {
    task_hrts tmp = -1;
    task_hrts adv_tid;
    time_hrts tmp_period = 0;
    time_hrts len_orig;
    time_slice *first_ts;
    time_hrts len_first;
    time_slice *tmp_ts;

    for (task_hrts i = 0; i < statue->num_task; i++) {
        if ((statue->task_statue[i].statue == JOB_STATUE_PRIMARY_TERMINATED ||
             statue->task_statue[i].statue == JOB_STATUE_ALTERNATE_RUNNING) &&
            statue->task_info[i].period > tmp_period) {
            tmp_period = statue->task_info[i].period;
            tmp = (task_hrts) i;
        }
    }

    if (tmp < 0) {
        action->task_no = -1;
        action->action = ACTION_NOTHING;
        statue->current_running = -1;
        return false;
    } else {
        adv_tid = task_id(tmp, statue->task_statue[tmp].job);
        statue->alter_orig = find_node_r(head_of(statue->alternate_ts), captured_by_task, &adv_tid);
        action->task_no = tmp;
        if (ts_data(statue->alter_orig)->statue & PTBA_ALTERNATE_START)
            action->action |= ACTION_START_ALTERNATE;
        else
            action->action |= ACTION_RESUME_ALTERNATE;
        statue->current_running = adv_tid;
        if (statue->task_statue[tmp].remaining_time == 0)
            statue->task_statue[tmp].remaining_time = statue->task_info[tmp].alternate_time;
        statue->task_statue[tmp].statue = JOB_STATUE_ALTERNATE_ADV_RUNNING;

        len_orig = ts_data(statue->alter_orig)->end - ts_data(statue->alter_orig)->start;
        first_ts = first(statue->alternate_ts);
        len_first = first_ts->end - first_ts->start;

        if (len_orig < len_first) {
            tmp_ts = GC_MALLOC_ATOMIC(sizeof(time_slice));
            tmp_ts->end = first_ts->end;
            tmp_ts->start = first_ts->start + len_orig;
            tmp_ts->statue = PTBA_FREE;
            tmp_ts->task_id = -1;
            first_ts->end = tmp_ts->start;
            insert_after(statue->alternate_ts, head_of(statue->alternate_ts), tmp_ts);
        }
        return true;
    }

}

void clean_EIT(statue_ptba *statue, time_hrts current_time) {
    task_statue_ptba *cur_task_statue = statue->task_statue + task_no(statue->current_running);
    time_hrts len_orig = ts_data(statue->alter_orig)->end - ts_data(statue->alter_orig)->start;
    time_hrts len_used = current_time - statue->last_scheduling_point;
    time_slice *tmp = NULL;

    cur_task_statue->remaining_time -= len_used;
    if (cur_task_statue->remaining_time <= 0) {
        cur_task_statue->statue = JOB_STATUE_FINISHED;
        cancel_n_adjust_alternate(statue->alternate_ts, statue->current_running, statue->task_info);
    } else {
        cur_task_statue->statue = JOB_STATUE_ALTERNATE_RUNNING;
        if (len_orig > len_used) {
            if (statue->alter_orig->prev && ts_data(statue->alter_orig->prev)->statue & PTBA_FREE) {
                ts_data(statue->alter_orig->prev)->end += len_used;
                ts_data(statue->alter_orig)->start += len_used;
            } else {
                tmp = GC_MALLOC_ATOMIC(sizeof(time_slice));
                tmp->start = ts_data(statue->alter_orig)->start;
                tmp->end = tmp->start + len_used;
                tmp->task_id = -1;
                tmp->statue = PTBA_FREE;
                ts_data(statue->alter_orig)->start = tmp->end;
                insert_before(statue->alternate_ts, statue->alter_orig, tmp);
            }
            ts_data(statue->alter_orig)->statue &= ~PTBA_ALTERNATE_START;
            ts_data(statue->alter_orig)->statue |= PTBA_ALTERNATE_RESUME;
        } else {
            ts_data(statue->alter_orig)->statue = PTBA_FREE;
            ts_data(statue->alter_orig)->task_id = -1;
        }
    }
    statue->alter_orig = NULL;
}

void print_ts(void *tp) {
    time_slice *ts = tp;
    printf("[%ld-%ld][%ld-%ld/%d]", ts->start, ts->end, (long) task_no(ts->task_id), (long) job_no(ts->task_id),
           ts->statue);
}

void print_statue(statue_ptba *statue, size_t count) {
    printf("AT: ");
    print_list(statue->alternate_ts, print_ts, count);
    printf("PT: ");
    if (statue->predict_table)
        print_list(statue->predict_table, print_ts, count);
    else
        printf("NULL\n");

    printf("TS: ");

    for (task_hrts i = 0; i < statue->num_task; i++) {
        printf("<[%ld]%ld/%ld/%u>", (long) i, (long) statue->task_statue[i].job, statue->task_statue[i].remaining_time,
               statue->task_statue[i].statue);
    }
    printf("\n");
}


text:
using J2N.Text;
using Lucene.Net.Index;
using System;
using System.Collections.Generic;
using System.IO;

namespace Lucene.Net.Benchmarks.ByTask.Tasks
{

    /// <summary>
    /// Open an index reader.
    /// <para/>
    /// Other side effects: index reader object in perfRunData is set.
    /// <para/>
    /// Optional params commitUserData eg. OpenReader(false,commit1)
    /// </summary>
    public class OpenReaderTask : PerfTask
    {
        public static readonly string USER_DATA = "userData";
        private string commitUserData = null;

        public OpenReaderTask(PerfRunData runData)
            : base(runData)
        {
        }

        public override int DoLogic()
        {
            Store.Directory dir = RunData.Directory;
            DirectoryReader r; // LUCENENET: IDE0059: Remove unnecessary value assignment
            if (commitUserData != null)
            {
                r = DirectoryReader.Open(OpenReaderTask.FindIndexCommit(dir, commitUserData));
            }
            else
            {
                r = DirectoryReader.Open(dir);
            }
            RunData.SetIndexReader(r);
            // We transfer reference to the run data
            r.DecRef();
            return 1;
        }

        public override void SetParams(string @params)
        {
            base.SetParams(@params);
            if (@params != null)
            {
                string[] split = @params.Split(',').TrimEnd();
                if (split.Length > 0)
                {
                    commitUserData = split[0];
                }
            }
        }

        public override bool SupportsParams => true;

        public static IndexCommit FindIndexCommit(Store.Directory dir, string userData)
        {
            IList<IndexCommit> commits = DirectoryReader.ListCommits(dir);
            foreach (IndexCommit ic in commits)
            {
                IDictionary<string, string> map = ic.UserData;
                string ud = null;
                if (map != null)
                {
                    //ud = map.get(USER_DATA);
                    map.TryGetValue(USER_DATA, out ud);
                }
                if (ud != null && ud.Equals(userData, StringComparison.Ordinal))
                {
                    return ic;
                }
            }

            throw new IOException("index does not contain commit with userData: " + userData);
        }
    }
}


text:
external help file: Microsoft.Azure.Commands.SiteRecovery.dll-Help.xml
ms.assetid: 3DDC8DD8-889C-4C76-B32E-3D2C2AD0AC79
online version:
schema: 2.0.0
---

# Start-AzureRmSiteRecoveryPolicyAssociationJob

## SYNOPSIS
Starts a Site Recovery replication policy association job.

## SYNTAX

### EnterpriseToAzure (Default)
```
Start-AzureRmSiteRecoveryPolicyAssociationJob -Policy <ASRPolicy>
 -PrimaryProtectionContainer <ASRProtectionContainer> [<CommonParameters>]
```

### EnterpriseToEnterprise
```
Start-AzureRmSiteRecoveryPolicyAssociationJob -Policy <ASRPolicy>
 -PrimaryProtectionContainer <ASRProtectionContainer> -RecoveryProtectionContainer <ASRProtectionContainer>
 [<CommonParameters>]
```

## DESCRIPTION
The **Start-AzureRmSiteRecoveryPolicyAssociationJob** cmdlet initiates an association job to associate a replication policy with an Azure Site Recovery protection container.

## EXAMPLES

## PARAMETERS

### -Policy
Specifies the Site Recovery policy object.

```yaml
Type: ASRPolicy
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -PrimaryProtectionContainer
Specifies the primary protection container on which to apply the protection profile settings.

```yaml
Type: ASRProtectionContainer
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -RecoveryProtectionContainer
Specifies the recovery protection container on which to apply the protection profile settings.

```yaml
Type: ASRProtectionContainer
Parameter Sets: EnterpriseToEnterprise
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### ASRPolicy

Parameter 'Policy' accepts value of type 'ASRPolicy' from the pipeline

## OUTPUTS

### Microsoft.Azure.Commands.SiteRecovery.ASRJob

## NOTES

## RELATED LINKS


text:
package de.learnlib.util.nfa;

import de.learnlib.api.algorithm.LearningAlgorithm;
import de.learnlib.api.query.DefaultQuery;
import net.automatalib.automata.fsa.NFA;
import net.automatalib.automata.fsa.impl.compact.CompactDFA;
import net.automatalib.util.automata.fsa.NFAs;
import net.automatalib.words.Alphabet;

public class NFALearnerWrapper<I> implements LearningAlgorithm.DFALearner<I> {

    private final Alphabet<I> alphabet;
    private final LearningAlgorithm<? extends NFA<?, I>, I, Boolean> nfaLearner;

    public NFALearnerWrapper(Alphabet<I> alphabet, LearningAlgorithm<? extends NFA<?, I>, I, Boolean> nfaLearner) {
        this.alphabet = alphabet;
        this.nfaLearner = nfaLearner;
    }

    @Override
    public void startLearning() {
        nfaLearner.startLearning();
    }

    @Override
    public boolean refineHypothesis(DefaultQuery<I, Boolean> ceQuery) {
        return nfaLearner.refineHypothesis(ceQuery);
    }

    @Override
    public CompactDFA<I> getHypothesisModel() {
        NFA<?, I> nfaHyp = nfaLearner.getHypothesisModel();
        return NFAs.determinize(nfaHyp, alphabet);
    }

    @Override
    public String toString() {
        return nfaLearner.toString();
    }

}


text:
package org.joverseer.domain.structuredOrderResults;

/**
 * Stores Kidnaps (Order result)
 *
 * @author Marios Skounakis
 *
 */
public class Kidnap implements IStructuredOrderResult {
	String target;

	public String getTarget() {
		return this.target;
	}

	public void setTarget(String target) {
		this.target = target;
	}
}


text:
<?php

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/

$factory->define(App\User::class, function (Faker\Generator $faker) {
    static $password;

    return [
        'username' => $faker->userName,
        'first_name' => $faker->lastName,
        'last_name' => $faker->firstName,
        'email' => $faker->unique()->safeEmail,
        'points' => 0,
        'role' => \App\User::USER,
        'password' => $password ?: $password = bcrypt('secret'),
        'remember_token' => str_random(10),
    ];
});


text:
package org.estatio.module.capex.app;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;

import javax.annotation.Nullable;
import javax.inject.Inject;

import org.joda.time.LocalDate;

import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.DomainService;
import org.apache.isis.applib.annotation.DomainServiceLayout;
import org.apache.isis.applib.annotation.MinLength;
import org.apache.isis.applib.annotation.NatureOfService;
import org.apache.isis.applib.annotation.Parameter;
import org.apache.isis.applib.annotation.ParameterLayout;
import org.apache.isis.applib.annotation.RestrictTo;
import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.services.clock.ClockService;
import org.apache.isis.applib.services.user.UserService;

import org.isisaddons.module.excel.dom.ExcelService;
import org.isisaddons.module.excel.dom.util.Mode;
import org.isisaddons.module.security.app.user.MeService;
import org.isisaddons.module.security.dom.user.ApplicationUser;

import org.incode.module.base.dom.valuetypes.LocalDateInterval;

import org.estatio.module.asset.dom.Property;
import org.estatio.module.asset.dom.PropertyRepository;
import org.estatio.module.base.dom.EstatioRole;
import org.estatio.module.capex.dom.invoice.IncomingInvoiceRoleTypeEnum;
import org.estatio.module.capex.dom.invoice.IncomingInvoiceType;
import org.estatio.module.capex.dom.order.Order;
import org.estatio.module.capex.dom.order.OrderRepository;
import org.estatio.module.capex.dom.project.Project;
import org.estatio.module.capex.dom.project.ProjectRepository;
import org.estatio.module.capex.imports.OrderProjectImportAdapter;
import org.estatio.module.charge.dom.Charge;
import org.estatio.module.charge.dom.ChargeRepository;
import org.estatio.module.party.dom.Organisation;
import org.estatio.module.party.dom.Party;
import org.estatio.module.party.dom.PartyRepository;
import org.estatio.module.tax.dom.Tax;

import lombok.Getter;
import lombok.Setter;

@DomainService(
        nature = NatureOfService.VIEW_MENU_ONLY,
        objectType = "orders.OrderMenu"
)
@DomainServiceLayout(
        menuBar = DomainServiceLayout.MenuBar.PRIMARY,
        named = "Invoices In",
        menuOrder = "65.1"
)
public class OrderMenu {

    @Action(semantics = SemanticsOf.SAFE, restrictTo = RestrictTo.PROTOTYPING)
    public List<Order> allOrders() {
        return orderRepository.listAll();
    }

    /**
     * Specifically for Italian order process
     */
    @Action(semantics = SemanticsOf.NON_IDEMPOTENT)
    public Order createOrder(
            @Nullable final Property property,
            @Nullable @Parameter(maxLength = 3) final String multiPropertyReference,
            final Project project,
            final Charge charge,
            final Organisation buyer,
            @Nullable final Organisation supplier,
            final LocalDate orderDate,
            @Nullable final BigDecimal netAmount,
            @Nullable final Tax tax,
            @Nullable final String description) {
        final String userAtPath = meService.me().getAtPath();
        return orderRepository.create(property, multiPropertyReference, project, charge, buyer, supplier, orderDate, netAmount, tax, description, IncomingInvoiceType.ITA_ORDER_INVOICE, userAtPath);
    }

    public String validateCreateOrder(
            final Property property,
            final String multiPropertyReference,
            final Project project,
            final Charge charge,
            final Organisation buyer,
            final Organisation supplier,
            final LocalDate orderDate,
            final BigDecimal netAmount,
            final Tax tax,
            final String description) {
        if (property == null && multiPropertyReference == null)
            return "Either a property or a reference for multiple properties must be defined";

        if (property != null && multiPropertyReference != null)
            return "Can not define both property and multi property reference";

        if (numeratorForOrdersRepository.findNumerator(buyer) == null)
            return "No order number numerator found for this buyer";

        return null;
    }

    public List<Property> choices0CreateOrder() {
        if (externalUserService.isForExternalUser()) {
            return externalUserService.getPropertiesForExternalUser();
        } else {
            return propertyRepository.allProperties();
        }
    }

    public List<Project> autoComplete2CreateOrder(@MinLength(3) final String searchPhrase) {
        if (externalUserService.isForExternalUser()) {
            return externalUserService.getProjectsForExternalUser();
        } else {
            return projectRepository.autoComplete(searchPhrase);
        }
    }

    public List<Party> autoComplete4CreateOrder(@MinLength(3) final String searchPhrase) {
        if (externalUserService.isForExternalUser()) {
            return externalUserService.getBuyersForExternalUser();
        }
        return partyRepository.autoCompleteWithRole(searchPhrase, IncomingInvoiceRoleTypeEnum.ECP);
    }

    public List<Party> autoComplete5CreateOrder(@MinLength(3) final String search) {
        return partyRepository.autoCompleteWithRole(search, IncomingInvoiceRoleTypeEnum.SUPPLIER);
    }

    public LocalDate default6CreateOrder() {
        return clockService.now();
    }

    public List<Charge> choices3CreateOrder() {
        return chargeRepository.choicesItalianWorkTypes();
    }

    public boolean hideCreateOrder() {
        // admin can always see
        final boolean userIsAdmin = EstatioRole.ADMINISTRATOR.isApplicableFor(userService.getUser());
        if(userIsAdmin) {
            return false;
        }

        // otherwise, user needs to be Italian
        final ApplicationUser me = meService.me();
        if(me == null) { return true; }

        final String atPath = me.getAtPath();
        if(atPath == null) { return true; }

        boolean hideIfNotItalian = !atPath.startsWith("/ITA");
        return hideIfNotItalian;
    }

    @Action(semantics = SemanticsOf.SAFE)
    public List<Order> findOrder(
            @Nullable final String barcodeOrOrderNumber,
            @Nullable final String sellerNameOrReference,
            @ParameterLayout(named = "Order Date (Approximately)")
            @Nullable final LocalDate orderDate
    ) {
        return new OrderMenu.OrderFinder(orderRepository, partyRepository)
                .filterOrFindByDocumentName(barcodeOrOrderNumber)
                .filterOrFindBySeller(sellerNameOrReference)
                .filterOrFindByOrderDate(orderDate)
                .getResult();
    }

    public String validateFindOrder(final String barcodeOrOrderNumber, final String sellerNameOfReference, final LocalDate orderDate) {
        if (barcodeOrOrderNumber != null && barcodeOrOrderNumber.length() < 3) {
            return "Give at least 3 characters for barcode/order number (document name)";
        }
        if (sellerNameOfReference != null && sellerNameOfReference.length() < 3) {
            return "Give at least 3 characters for seller name or reference";
        }
        return null;
    }

    @Action(semantics = SemanticsOf.SAFE)
    public List<Order> findOrdersByCenter(final Property center) {
        return orderRepository.findByProperty(center);
    }

    public List<Property> choices0FindOrdersByCenter() {
        if (externalUserService.isForExternalUser()) {
            return externalUserService.getPropertiesForExternalUser();
        } else {
            return propertyRepository.allProperties();
        }
    }

    @Action(semantics = SemanticsOf.SAFE)
    public List<Order> findOrdersByCenterAndSupplier(
            final Property center,
            final Organisation supplier
    ) {
        return orderRepository.findByPropertyAndSeller(center, supplier);
    }

    public List<Property> choices0FindOrdersByCenterAndSupplier() {
        if (externalUserService.isForExternalUser()) {
            return externalUserService.getPropertiesForExternalUser();
        } else {
            return propertyRepository.allProperties();
        }
    }

    static class OrderFinder {

        public OrderFinder(OrderRepository orderRepository, PartyRepository partyRepository) {
            this.result = new ArrayList<>();
            this.orderRepository = orderRepository;
            this.partyRepository = partyRepository;
        }

        @Getter @Setter
        List<Order> result;

        OrderRepository orderRepository;

        PartyRepository partyRepository;

        OrderMenu.OrderFinder filterOrFindByDocumentName(final String barcode) {
            if (barcode == null)
                return this;

            // the query itself already matches on substrings, so user wildcards act as a 'placebo' and are removed
            List<Order> resultsForBarcode = orderRepository.findOrderByDocumentName(barcode.replace("*", ""));
            if (!this.result.isEmpty()) {
                filterByDocumentNameResults(resultsForBarcode);
            } else {
                setResult(resultsForBarcode);
            }
            return this;
        }

        OrderMenu.OrderFinder filterOrFindBySeller(final String sellerNameOrReference) {
            if (sellerNameOrReference == null || sellerNameOrReference.equals(""))
                return this;

            List<Organisation> sellerCandidates =
                    partyRepository.findParties("*".concat(sellerNameOrReference).concat("*"))
                            .stream()
                            .filter(Organisation.class::isInstance)
                            .map(Organisation.class::cast)
                            .collect(Collectors.toList());

            if (!this.result.isEmpty()) {
                filterBySellerCandidates(sellerCandidates);
            } else {
                createResultForSellerCandidates(sellerCandidates);
            }

            return this;
        }

        OrderMenu.OrderFinder filterOrFindByOrderDate(final LocalDate orderDate) {
            if (orderDate == null)
                return this;
            LocalDate orderDateStart = orderDate.minusDays(5);
            LocalDate orderDateEnd = orderDate.plusDays(5);
            if (!this.result.isEmpty()) {
                filterByOrderDate(orderDateStart, orderDateEnd);
            } else {
                createResultForOrderDate(orderDateStart, orderDateEnd);
            }
            return this;
        }

        void filterByDocumentNameResults(List<Order> resultsForBarcode) {
            setResult(
                    this.result
                            .stream()
                            .filter(x -> resultsForBarcode.contains(x))
                            .collect(Collectors.toList())
            );
        }

        void filterBySellerCandidates(final List<Organisation> sellerCandidates) {
            if (sellerCandidates.isEmpty()) {
                // reset result
                this.result = new ArrayList<>();
            } else {
                // filter result
                Predicate<Order> isInSellerCandidatesList =
                        x -> sellerCandidates.contains(x.getSeller());
                setResult(result.stream().filter(isInSellerCandidatesList).collect(Collectors.toList()));
            }
        }

        void createResultForSellerCandidates(final List<Organisation> sellerCandidates) {
            for (Organisation candidate : sellerCandidates) {
                this.result.addAll(
                        orderRepository.findBySeller(candidate)
                                .stream()
                                .collect(Collectors.toList())
                );
            }
        }

        void filterByOrderDate(final LocalDate orderDateStart, final LocalDate orderDateEnd) {
            Predicate<Order> hasOrderDate = x -> x.getOrderDate() != null;
            Predicate<Order> orderDateInInterval = x -> new LocalDateInterval(orderDateStart, orderDateEnd).contains(x.getOrderDate());
            setResult(
                    this.result
                            .stream()
                            .filter(hasOrderDate)
                            .filter(orderDateInInterval)
                            .collect(Collectors.toList())
            );
        }

        void createResultForOrderDate(final LocalDate orderDateStart, final LocalDate orderDateEnd) {
            Predicate<Order> hasOrderDate = x -> x.getOrderDate() != null;
            Predicate<Order> orderDateInInterval = x -> new LocalDateInterval(orderDateStart, orderDateEnd).contains(x.getOrderDate());
            setResult(
                    orderRepository.listAll()
                            .stream()
                            .filter(hasOrderDate)
                            .filter(orderDateInInterval)
                            .collect(Collectors.toList())
            );
        }

    }

    ///////////////////////////////////////////

    @Action(semantics = SemanticsOf.SAFE)
    public List<Order> findOrdersByOrderDate(final LocalDate fromDate, final LocalDate toDate) {
        return orderRepository.findByOrderDateBetween(fromDate, toDate);
    }

    public LocalDate default0FindOrdersByOrderDate() {
        return clockService.now().minusMonths(3);
    }

    public LocalDate default1FindOrdersByOrderDate() {
        return clockService.now();
    }

    ///////////////////////////////////////////

    @Action(semantics = SemanticsOf.SAFE)
    public List<Order> findOrdersByEntryDate(final LocalDate fromDate, final LocalDate toDate) {
        return orderRepository.findByEntryDateBetween(fromDate, toDate);
    }

    public LocalDate default0FindOrdersByEntryDate() {
        return clockService.now().minusMonths(3);
    }

    public LocalDate default1FindOrdersByEntryDate() {
        return clockService.now();
    }

    ///////////////////////////////////////////

    @Action(semantics = SemanticsOf.SAFE)
    public List<Order> findOrderByOrderNumber(final String orderNumber) {
        return orderRepository.matchByOrderNumber(orderNumber);
    }

    ///////////////////////////////////////////

    @Action(semantics = SemanticsOf.NON_IDEMPOTENT)
    public List<Order> importOrdersItaly(final org.apache.isis.applib.value.Blob orderSheet) {
        List<Order> result = new ArrayList<>();
        for (OrderProjectImportAdapter adapter : excelService.fromExcel(orderSheet, OrderProjectImportAdapter.class, "ECP Juma", Mode.RELAXED)) {
            adapter.handle(null);
            if (adapter.deriveOrderNumber() != null) {
                Order order = orderRepository.findByOrderNumber(adapter.deriveOrderNumber());
                if (order != null && !result.contains(order)) {
                    result.add(order);
                }
            }
        }
        return result;
    }

    @Inject
    OrderRepository orderRepository;

    @Inject
    PartyRepository partyRepository;

    @Inject
    ClockService clockService;

    @Inject
    MeService meService;

    @Inject
    ChargeRepository chargeRepository;

    @Inject
    ExcelService excelService;

    @Inject UserService userService;

    @Inject
    NumeratorForOrdersRepository numeratorForOrdersRepository;

    @Inject
    PropertyRepository propertyRepository;

    @Inject
    ExternalUserService externalUserService;

    @Inject ProjectRepository projectRepository;
}


text:
"""start networking-nec db migration

Revision ID: 978466bef2fe
Revises: None
Create Date: 2016-02-06 20:30:12.217571

"""

# revision identifiers, used by Alembic.
revision = '978466bef2fe'
down_revision = None

def upgrade():
    pass


text:
namespace Crawler.Business.Models
{
    public class Metadata
    {
        public static string Bytes { get { return "bytes"; } }
        public static string IsDir { get { return "is_dir"; } }
        public static string MimeType { get { return "mime_type"; } }
        public static string Path { get { return "path"; } }
    }
}


text:
package com.sqzr.ccbbs.auth.shiro.realm;

import com.sqzr.ccbbs.auth.entity.CcMember;
import com.sqzr.ccbbs.auth.service.MemberService;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import static com.xiaoleilu.hutool.Log.warn;

/**
 * Created by weiyang on 2015/6/9.
 */
public class CCRealm extends AuthorizingRealm {

    @Qualifier("memberService")
    @Autowired
    private MemberService memberService;

    /**
     * 授权查询回调函数, 进行鉴权但缓存中无用户的授权信息时调用.
     * 获取登陆用户的对象Object principal = principalCollection.getPrimaryPrincipal()
     * 通过(PhrMember)principal.getId();获取需要授权用户的id
     * 在PhrMemberRole中查询用户拥有的身份
     * 在PhrMemberPermission中查询用户拥有的权限
     *
     * @return AuthorizationInfo
     * new SimpleAuthorizationInfo().setRoles(Set)
     * new SimpleAuthorizationInfo().setPermissions(Set)
     */
    @Override
    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
        return null;
    }

    /**
     * 认证回调函数,登录时调用,在数据库查询有没有用户传来的用户名,如果存在则交给密码匹配器判断密码是否正确
     * 获取token UsernamePasswordToken token = (UsernamePasswordToken) authenticationToken;
     * 获取用户输入的用户名 token.getUsername()
     *
     * @return AuthenticationInfo
     * new SimpleAuthenticationInfo(查询到的用户对象,密码,realmName)
     * @throws AuthenticationException 用户名或者密码错误
     */
    @Override
    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
        String username = authenticationToken.getPrincipal().toString();
        CcMember member = memberService.findByUsername(username);
        if (member == null) {
            warn("未找到用户[{}]", username);
            throw new UnknownAccountException("登陆账号或密码不正确");
        }

        if ("notaudit".equals(member.getStatus())) {
            warn("账户未审核[{}}", username);
            throw new DisabledAccountException("账户未审核,请等待审核");
        }

        if ("lock".equals(member.getStatus())) {
            warn("账户锁定[{}]", username);
            throw new LockedAccountException("账户已锁定停用");
        }

        String hashedCredentials = member.getPassword();
        return new SimpleAuthenticationInfo(member, hashedCredentials, getName());
    }
}


text:
Yii 2.0 Public Preview - Composer Installer
======================

Thank you for choosing Yii - a high-performance component-based PHP framework.

If you are looking for a production-ready PHP framework, please use
[Yii v1.1](https://github.com/yiisoft/yii).

Yii 2.0 is still under heavy development. We may make significant changes
without prior notices. **Yii 2.0 is not ready for production use yet.**

[![Build Status](https://secure.travis-ci.org/yiisoft/yii2.png)](http://travis-ci.org/yiisoft/yii2)

This is the yii2 composer installer.

Installation
----------------

This extension offers you enhanced composer handling for your yii2-project. It will therefor require you to use composer.

`
php composer.phar require yiisoft/yii2-composer *
`

*Note: You might have to run `php composer.phar selfupdate` before using this extension.*

Usage & Documentation
-----------
This extensions allows you to hook to certain composer events and prepare your yii2-app for usage.

After the package is installed, the composer.json file has to be modified to enable this extension.

To see it in action take a look at the example apps in the repository:

[Basic](https://github.com/suralc/yii2/blob/master/apps/basic/composer.json#L27)
[Advanced](https://github.com/suralc/yii2/blob/extensions-readme/apps/advanced/composer.json)

However it might be useful to read through the official composer [documentation](http://getcomposer.org/doc/articles/scripts.md) to understand what this extension can to for you and what it can't.

You can also use this as an template to create your own composer additions to ease development and deployment of your app.


text:
package org.jenkinsci.plugins.pipeline.maven.trigger;

import hudson.Extension;
import hudson.model.Item;
import hudson.triggers.Trigger;
import hudson.triggers.TriggerDescriptor;
import jenkins.branch.MultiBranchProject;
import jenkins.branch.OrganizationFolder;
import org.jenkinsci.Symbol;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.kohsuke.stapler.DataBoundConstructor;

/**
 * @author Cyrille Le Clerc
 */
public class WorkflowJobDependencyTrigger extends Trigger<Item> {

    @DataBoundConstructor
    public WorkflowJobDependencyTrigger(){

    }

    @Symbol("snapshotDependencies")
    @Extension
    public static class DescriptorImpl extends TriggerDescriptor {
        @Override
        public boolean isApplicable(Item item) {
            return item instanceof WorkflowJob || item instanceof MultiBranchProject || item instanceof OrganizationFolder;
        }

        public String getDisplayName() {
            return "Build whenever a SNAPSHOT dependency is built";
        }

    }
}


text:
package org.innovateuk.ifs.questionnaire.config.repository;

import org.innovateuk.ifs.questionnaire.config.domain.Questionnaire;
import org.innovateuk.ifs.questionnaire.config.domain.QuestionnaireQuestion;
import org.springframework.data.repository.CrudRepository;

public interface QuestionnaireQuestionRepository extends CrudRepository<QuestionnaireQuestion, Long> {
}


text:
#include "BaseImporter.h"

#include <vector>

#include "OgreXmlHelper.hpp"
#include "irrXMLWrapper.h"

/// Ogre Importer TODO
/*	- Read Vertex Colors
	- Read multiple TexCoords
*/

namespace Assimp
{
namespace Ogre
{

//Forward declarations:
struct Face;
struct Weight;
struct Bone;
struct Animation;
struct Track;
struct Keyframe;

///A submesh from Ogre
struct SubMesh
{
	bool SharedData;

	std::string Name;
	std::string MaterialName;
	std::vector<Face> FaceList;

	std::vector<aiVector3D> Positions; bool HasPositions;
	std::vector<aiVector3D> Normals; bool HasNormals;
	std::vector<aiVector3D> Tangents; bool HasTangents;
	std::vector<std::vector<aiVector3D> > Uvs;//arbitrary number of texcoords, they are nearly always 2d, but assimp has always 3d texcoords, n vectors(outer) with texcoords for each vertex(inner)

	std::vector< std::vector<Weight> > Weights;//a list(inner) of bones for each vertex(outer)
	int MaterialIndex;///< The Index in the Assimp Materialarray from the material witch is attached to this submesh
	unsigned int BonesUsed;//the highest index of a bone from a bone weight, this is needed to create the assimp bone structur (converting from Vertex-Bones to Bone-Vertices)

	SubMesh(): SharedData(false), HasPositions(false), HasNormals(false), HasTangents(false),
		MaterialIndex(-1), BonesUsed(0) {}//initialize everything
};

///The Main Ogre Importer Class
class OgreImporter : public BaseImporter
{
public:
	virtual bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const;
	virtual void InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler);
	virtual const aiImporterDesc* GetInfo () const;
	virtual void SetupProperties(const Importer* pImp);
private:

	//-------------------------------- OgreMesh.cpp -------------------------------
	/// Helper Functions to read parts of the XML File
	void ReadSubMesh(SubMesh& theSubMesh, XmlReader* Reader);//the submesh reference is the result value

	/// Reads a single Vertexbuffer and writes its data in the Submesh
	static void ReadVertexBuffer(SubMesh &theSubMesh, XmlReader *Reader, unsigned int NumVertices);

	/// Reads bone weights are stores them into the given submesh
	static void ReadBoneWeights(SubMesh &theSubMesh, XmlReader *Reader);

	/// After Loading a SubMehs some work needs to be done (make all Vertexes unique, normalize weights)
	static void ProcessSubMesh(SubMesh &theSubMesh, SubMesh &theSharedGeometry);

	/// Uses the bone data to convert a SubMesh into a aiMesh which will be created and returned
	aiMesh* CreateAssimpSubMesh(const SubMesh &theSubMesh, const std::vector<Bone>& Bones) const;

	//-------------------------------- OgreSkeleton.cpp -------------------------------
	/// Writes the results in Bones and Animations, Filename is not const, because its call-by-value and the function will change it!
	void LoadSkeleton(std::string FileName, std::vector<Bone> &Bones, std::vector<Animation> &Animations) const;

	/// Converts the animations in aiAnimations and puts them into the scene
	void PutAnimationsInScene(const std::vector<Bone> &Bones, const std::vector<Animation> &Animations);

	/// Creates the aiskeleton in current scene
	void CreateAssimpSkeleton(const std::vector<Bone> &Bones, const std::vector<Animation> &Animations);

	/// Recursivly creates a filled aiNode from a given root bone
	static aiNode* CreateAiNodeFromBone(int BoneId, const std::vector<Bone> &Bones, aiNode* ParentNode);

	//-------------------------------- OgreMaterial.cpp -------------------------------
	aiMaterial* LoadMaterial(const std::string MaterialName) const;
	void ReadTechnique(std::stringstream &ss, aiMaterial* NewMaterial) const;

	//Now we don't have to give theses parameters to all functions
	std::string m_CurrentFilename;
	std::string m_MaterialLibFilename;
	bool m_TextureTypeFromFilename;
	IOSystem* m_CurrentIOHandler;
	aiScene *m_CurrentScene;
	SubMesh m_SharedGeometry;///< we will just use the vertexbuffers of the submesh
};

///For the moment just triangles, no other polygon types!
struct Face
{
	unsigned int VertexIndices[3];
};

struct BoneAssignment
{
	unsigned int BoneId;//this is, what we get from ogre
	std::string BoneName;//this is, what we need for assimp
};

///for a vertex->bone structur
struct Weight
{
	unsigned int BoneId;
	float Value;
};

/// Helper Class to describe an ogre-bone for the skeleton:
/** All Id's are signed ints, because than we have -1 as a simple INVALID_ID Value (we start from 0 so 0 is a valid bone ID!*/
struct Bone
{
	int Id;
	int ParentId;
	std::string Name;
	aiVector3D Position;
	float RotationAngle;
	aiVector3D RotationAxis;
	std::vector<int> Children;
	aiMatrix4x4 BoneToWorldSpace;

	///ctor
	Bone(): Id(-1), ParentId(-1), RotationAngle(0.0f) {}
	///this operator is needed to sort the bones after Id's
	bool operator<(const Bone& rval) const
		{return Id<rval.Id; }
	///this operator is needed to find a bone by its name in a vector<Bone>
	bool operator==(const std::string& rval) const
		{return Name==rval; }
	bool operator==(const aiString& rval) const
	{return Name==std::string(rval.data); }

	// implemented in OgreSkeleton.cpp
	void CalculateBoneToWorldSpaceMatrix(std::vector<Bone>& Bones);
};

///Describes an Ogre Animation
struct Animation
{
	std::string Name;
	float Length;
	std::vector<Track> Tracks;
};

///a track (keyframes for one bone) from an animation
struct Track
{
	std::string BoneName;
	std::vector<Keyframe> Keyframes;
};

/// keyframe (bone transformation) from a track from a animation
struct Keyframe
{
	float Time;
	aiVector3D Position;
	aiQuaternion Rotation;
	aiVector3D Scaling;
};

}//namespace Ogre
}//namespace Assimp


text:
/// @file xed-operand-action-enum.h

// This file was automatically generated.
// Do not edit this file.

#if !defined(_XED_OPERAND_ACTION_ENUM_H_)
# define _XED_OPERAND_ACTION_ENUM_H_
#include "xed-common-hdrs.h"
typedef enum {
  XED_OPERAND_ACTION_INVALID,
  XED_OPERAND_ACTION_RW, ///< Read and written (must write)
  XED_OPERAND_ACTION_R, ///< Read-only
  XED_OPERAND_ACTION_W, ///< Write-only (must write)
  XED_OPERAND_ACTION_RCW, ///< Read and conditionlly written (may write)
  XED_OPERAND_ACTION_CW, ///< Conditionlly written (may write)
  XED_OPERAND_ACTION_CRW, ///< Conditionlly read, always written (must write)
  XED_OPERAND_ACTION_CR, ///< Conditional read
  XED_OPERAND_ACTION_LAST
} xed_operand_action_enum_t;

XED_DLL_EXPORT xed_operand_action_enum_t str2xed_operand_action_enum_t(const char* s);
XED_DLL_EXPORT const char* xed_operand_action_enum_t2str(const xed_operand_action_enum_t p);

XED_DLL_EXPORT xed_operand_action_enum_t xed_operand_action_enum_t_last(void);

#endif


text:
<title>mars 3.0.23: rotext(n) -- Read-only Text Widget, submodule of marsgui(n)</title>

 mars 3.0.23: Mars Simulation Support Library

NAME

rotext(n) -- Read-only Text Widget, submodule of marsgui(n)

NAME

SYNOPSIS

DESCRIPTION

Text Tags

COMMANDS

INSTANCE COMMAND

ENVIRONMENT

AUTHOR

HISTORY

SYNOPSIS

package require marsgui 3.0.23
namespace import ::marsgui::*

rotext pathName ?options...?

    -foundcmd cmd

$rotext configure option value...

$rotext cget option

$rotext del args...

$rotext ins args...

$rotext selectAll

$rotext find subcommand ?args...?

$rotext find target targetType target

$rotext find update ?force?

$rotext find count

$rotext find instance

$rotext find show instance

$rotext find prev

$rotext find next

DESCRIPTION

The rotext(n) widget provides read-only browsing and searching
of styled text.  As such, it is a drop-in replacement for the standard
text(n) widget, with these differences:

 The insert and delete methods are no-ops; use the
       new ins and del methods instead.  These methods
       are used precisely like the text(n) methods they replace.

 The navigation key-bindings have been changed to allow easier
       browsing, i.e., the Up and Down arrow keys scroll the text in
       the widget rather than moving the insertion point (which is
       hidden in any event).

 The <<SelectAll>> virtual event will select
       all of the text in the widget.

 The find method and -foundcmd callback
       work with the finder(n) widget to allow searching
       of the displayed text.

This man page describes only those options and subcommands which are
specific to rotext(n); but see also the Tk text(n) man page for
more details.

Text Tags

The rotext(n) widget defines the following text tags, which are
used by the find mechanism:

 FOUND: This tag is used to highlight all instances of a
       search target in the widget's text.  By default, it adds
       boldface and underlining.

 SHOWN:  This tag is used to a line containing an
       instance of the search target.  The find subcommands
       can be used to move the highlight from one instance to the
       next, scrolling the widget as needed.  By default, it
       sets the foreground color to white and the
       background color to black.

COMMANDS

This module defines the following command:

rotext pathName ?options...?

Creates a new rotext widget named pathName.

The rotext widget may be created with the following
rotext(n)-specific options, along with the normal text(n) options:

-foundcmd cmd

This option is used to link a rotext(n) widget with a finder(n)
widget, or any other widget which supports the "found" half of the
find/found protocol.  It specifies a command which will be called when
the widget's find status is updated.  It will be called with two
additional arguments, both integers: the number of instances of the
target string which have been found (or 0 if there are none) and
the index (0 to N-1) of the instance which is currently highlighted
(or -1 if no instance is highlighted).

See finder(n) for an example.

INSTANCE COMMAND

$rotext configure option value...

Sets the values of the specified options.

$rotext cget option

Returns the value of the specified option.

$rotext del args...

Replacement for the text(n) "delete" method.

$rotext ins args...

Replacement for the text(n) "insert" method.

$rotext selectAll

Selects all of the text in the widget.

$rotext find subcommand ?args...?

The find method, along with the -foundcmd
callback, implements the rotext(n) widget's half of the find/found
protocol.  It is used to search for and highlight text strings.

$rotext find target targetType target

Searches for all instances of target, which must be a string
of the given targetType:

 exact -- any text string

 wildcard -- a glob-pattern

 regexp -- a regular expression

All instances are highlighted with the FOUND tag.  Then, the
widget scrolls to show the line containing the last instance
of the target; the line is highlighted with the SHOWN tag.
Finally, the -foundcmd, if any, is called.

To clear the search, call this method with a target of "".

$rotext find update ?force?

This method causes the widget to redo the current search.
If a line was highlighted before find update it
will still be highlighted after unless force is set true.

Call this method after changing the contents of the widget.

$rotext find count

Returns the number of instances of the target which were found.  Note
that if the target occurs twice on one line, that counts as a single
instance.

Returns 0 if there's no target.

$rotext find instance

Returns the index (0 to N-1) of the instance which is
currently highlighted, or -1 if no instance is highlighted.

Note that the resulting value might be incorrect if the
widget's contents have been modified since the search was
done (unless find update has been called).

$rotext find show instance

Scroll to and highlight the line containing an instance
of the search target.  instance is the instance number,
0 to [find count]-1, or "end" for the final instance.

$rotext find prev

Scroll to and highlight the line containing the next instance
of the search target, if any.

$rotext find next

Scroll to and highlight the line containing the previous instance
of the search target, if any.

ENVIRONMENT

marsgui(n) requires Tcl 8.5 or later.

To use marsgui(n) in a Tcl script, the environment variable
TCLLIBPATH must include the parent of the package
directory.

AUTHOR

Will Duquette

HISTORY

Original package.

mars 3.0.23 Man page generated by manpage(n) on
Fri Nov 20 09:53:55 PST 2015


text:
package com.tle.web.hierarchy.section;

import com.google.common.collect.ImmutableSet;
import com.tle.beans.item.Item;
import com.tle.core.guice.Bind;
import com.tle.core.services.item.FreetextResult;
import com.tle.web.itemlist.item.AbstractItemList;
import com.tle.web.itemlist.item.ItemlikeListEntryExtension;
import com.tle.web.itemlist.item.StandardItemListEntry;
import com.tle.web.itemlist.item.StandardItemListEntryFactory;
import com.tle.web.sections.SectionInfo;
import java.util.Set;
import javax.inject.Inject;

@Bind
public class HierarchyItemList
    extends AbstractItemList<StandardItemListEntry, AbstractItemList.Model<StandardItemListEntry>> {
  @Inject private StandardItemListEntryFactory factory;

  @SuppressWarnings("nls")
  @Override
  protected Set<String> getExtensionTypes() {
    return ImmutableSet.of(ItemlikeListEntryExtension.TYPE_STANDARD, "hierarchy");
  }

  @Override
  protected StandardItemListEntry createItemListEntry(
      SectionInfo info, Item item, FreetextResult result, int index, int available) {
    return factory.createItemListItem(info, item, result, index, available);
  }
}


text:
#ifndef OPTIONSMODEL_H
#define OPTIONSMODEL_H

#include <QAbstractListModel>

/** Interface from Qt to configuration data structure for Bitcoin client.
   To Qt, the options are presented as a list with the different options
   laid out vertically.
   This can be changed to a tree once the settings become sufficiently
   complex.
 */
class OptionsModel : public QAbstractListModel
{
    Q_OBJECT

public:
    explicit OptionsModel(QObject *parent = 0);

    enum OptionID {
        StartAtStartup,    // bool
        MinimizeToTray,    // bool
        MapPortUPnP,       // bool
        MinimizeOnClose,   // bool
        ProxyUse,          // bool
        ProxyIP,           // QString
        ProxyPort,         // int
        ProxySocksVersion, // int
        Fee,               // qint64
        ReserveBalance,    // qint64
        DisplayUnit,       // BitcoinUnits::Unit
        DisplayAddresses,  // bool
        HideAmounts,  // bool
        DetachDatabases,   // bool
        Language,          // QString
        CoinControlFeatures, // bool
        DecimalPoints, // int
        OptionIDRowCount,
    };

    void Init();

    /* Migrate settings from wallet.dat after app initialization */
    bool Upgrade(); /* returns true if settings upgraded */

    int rowCount(const QModelIndex & parent = QModelIndex()) const;
    QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
    bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);

    /* Explicit getters */
    qint64 getTransactionFee();
    qint64 getReserveBalance();
    bool getMinimizeToTray();
    bool getMinimizeOnClose();
    int getDisplayUnit();
    int getDecimalPoints();
    bool getDisplayAddresses();
    bool getHideAmounts();
    bool getCoinControlFeatures();
    QString getLanguage() { return language; }

private:
    int nDisplayUnit;
    int nDecimalPoints;
    bool bDisplayAddresses;
    bool bHideAmounts;
    bool fMinimizeToTray;
    bool fMinimizeOnClose;
    bool fCoinControlFeatures;
    QString language;

signals:
    void displayUnitChanged(int unit);
    void decimalPointsChanged(int decimals);
    void hideAmountsChanged(bool hideamounts);
    void transactionFeeChanged(qint64);
    void reserveBalanceChanged(qint64);
    void coinControlFeaturesChanged(bool);
};

#endif // OPTIONSMODEL_H


text:
%!TEX TS-program = xelatex
\documentclass[]{friggeri-cv}
\usepackage{afterpage}
\usepackage{hyperref}
\usepackage{color}
\usepackage{xcolor}
\hypersetup{
    pdftitle={},
    pdfauthor={},
    pdfsubject={},
    pdfkeywords={},
    colorlinks=false,       % no lik border color
   allbordercolors=white    % white border color for all
}
\RequirePackage{xcolor}
\definecolor{pblue}{HTML}{0395DE}

\usepackage{enumitem}

\begin{document}
\header{Victor M.}{Mendiola-Lau}{Software Engineer, Computer Scientist and Researcher}

% Fake text to add separator
\fcolorbox{white}{gray}{\parbox{\dimexpr\textwidth-2\fboxsep-2\fboxrule}{%
.....
}}

% In the aside, each new line forces a line break
\begin{aside}
  \section{Address}
    Málaga, Spain
    ~
    ~
    ~
  \section{Telephone}
    (+34) 621 06 15 01
    ~
    ~
    ~
  \section{Mail}
    \href{mailto:ryuzakyl@gmail.com}{\textbf{ryuzakyl@}gmail.com}
	~
	~
    ~
  \section{Web profiles}
    \href{https://ryuzakyl.github.io}{{\scriptsize ryuzakyl.github.io}}
    \href{https://github.com/ryuzakyl}{{\scriptsize github.com/ryuzakyl}}
    \href{https://www.linkedin.com/in/victormendiolalau}{{\scriptsize linkedin.com/in/VictorMendiolaLau}}
	\href{https://www.researchgate.net/profile/Victor_Mendiola-Lau}{{\scriptsize researchgate.net/Victor\char`_Mendiola-Lau}}
    ~
    ~
    ~
  \section{Personal Skills}
    ~
	\smartdiagram[bubble diagram]{
        \textbf{Team Player},
        \textbf{Curiosity},
        \textbf{Initiative},
        \textbf{Organize},
        \textbf{Manage},
        \textbf{Motivation}
    }
\end{aside}

\section{Work Experience}
\begin{entrylist}
  \entry
    {02/22 - Now}
    {DevOps Engineer}
    {Rolla Finance, USA}
    {As a DevOps engineer contractor I'm in charge of defining and implementing our Cloud and Kubernetes infrastructure.\\}

  \entry
    {04/21 - 06/21}
    {Cybersecurity Intern}
    {EY, Málaga, Spain}
    {As part of the Pentesting team I worked on generating security compliance reports with CIS Benchmark guides.\\}

  \entry
    {05/20 - 03/21}
    {Senior Fullstack Web Developer}
    {Novoshore, Málaga, Spain}
    {Wide range of responsibilities in Swiss Fintech Startup client. Frontend Technologies: Angular. Backend Technologies: NodeJS, Spring Boot, Java, PostgreSQL.\\}

  \entry
    {11/19 - 04/20}
    {Fullstack Web Developer}
    {Ottawa, Canada} % {Iversoft - Digital consultancy & technology partner. (https://www.iversoft.ca/)}
    {Construction of an organization's website. Technologies: Wordpress, PHP, HTML, CSS3, JavaScript, MySQL, etc.\\}

  \entry
    {09/18 - 09/19}
    {Software Engineer}
    {Kitsune Technologies, Tennessee, USA}
    {Wide range of responsibilities including Data Analysis, Computer Vision, Web development, services implementation, etc.\\}

  \entry
    {09/17 - 11/18}
    {Fullstack Web Developer}
    {Ottawa, Canada} % {HRSG - Human Resource Systems Group Ltd. (https://www.hrsg.ca/)}
    {Web-based applications as solutions to workforce management. Technologies: PHP, HTML, CSS3, JavaScript, jQuery, MySQL, etc.\\}

  \entry
    {04/18 - 06/18}
    {Python/Flask Backend Engineer}
    {Freelance, Cuba} %{Ezequiel}
    {Used Selenium and ChromeDriver combined with Celery/Redis to develop a REST API simulating user behavior to bypass CAPTCHA-based security.\\}

  \entry
    {12/17 - 02/18}
    {Python/Django Backend Developer}
    {SBY Technologies, Florida, USA}
    {Developed a REST API from the ground up with JWT Authentication, automatic reports generation (.pdf, .csv), etc. Also worked as a DevOps Engineer and Linux System Administrator.\\}

  \entry
    {02/16 - 03/16}
    {Ruby/Rails Backend Developer}
    {Ksabes, Havana, Cuba}
    {Completely engineered and developed an API relying on Json Web Token (JWT) for authentication.\\}

  \entry
    {09/14 - 01/15}
    {Ruby Developer}
    {IRStrat, México D.F., México}
    {Completely engineered and developed a multi-threaded and concurrent service for consuming real time stock market data.\\}

  \entry
    {09/13 - 09/17}
    {Data Science and Machine Learning Engineer}
    {CENATAV, Havana, Cuba}
    {Used Data Science and Machine Learning to design and implement Pattern Recognition systems using C\#/C++. Also worked as a Software Engineer designing and implementing efficient algorithms.\\}
\end{entrylist}

\pagebreak

\section{Education/Academic background}
\begin{entrylist}
  \entry
    {2019 - 2021}
    {Master's Degree in Cyber Security}
    {University of Jaén, Spain}
    {
    	Main subjects: Secure Cloud Applications, Network Security, Intrusion Detection, Reverse Engineering, Malware Analysis, Advanced Cryptography.\\
    	Thesis: \emph{``Study and implementation of security measures for Kubernetes clusters''.}\\
    }

  \entry
    {2008 - 2013}
    {B.Sc. in Computer Science}
    {University of Havana, Cuba}
    {B.Sc. in Computer Science (5.13 of 5.0).\\ Main subjects: Programming, Algorithms and Data Structures, Computational Complexity Theory, Matematics, Operational Research, Numerical Matematics and Artificial Intelligence.\\
    \emph{Title of the Thesis: "Iris Recognition using Functional Data Analysis (FDA)".}}

%  \entry
%    {2004 - 2007}
%    {Bachelor Diploma}
%    {IPVCE Vladimir Ilich Lenin, Havana, Cuba}
%    {Bachelor diploma with focus on these subjects: Matematics and Computer Science.}
\end{entrylist}

\section{Research \& Teaching}
\begin{entrylist}
  \entry
    {09/18 - 12/18}
    {Visiting Researcher}
    {University of Seville, Spain}
    {Researcher in topics like Machine Learning and Data Analysis.\\}

  \entry
    {10/17 - 09/18}
    {Instructor Professor}
    {University of Havana, Cuba}
    {Math instructor of topics such as Set theory, Functions, Algebra, Calculus, Numerical math and Ordinary Differential Equations.\\}

  \entry
    {09/13 - 09/17}
    {Researcher}
    {CENATAV, Havana, Cuba}
    {Design and development of Pattern Recognition Systems. Junior researcher and PhD. student. Interest on topics like Machine Learning, Data Analysis, Data Representation and Computer Vision. Technologies: Python, Numpy, SciPy, Matplotlib, scikit-learn, etc.\\}

  \entry
    {06/12 - 07/12}
    {Research internship}
    {CENATAV, Havana, Cuba}
    {Design and implementation of an iris encoding method based on Functional Data Analysis (FDA).\\}

  \entry
    {09/10 - 06/13}
    {Assistant Instructor}
    {University of Havana, Cuba}
    {Instructor of Programming and Algorithms for Mathematics students in the Faculty of Mathematics and Computer Science (MATCOM).\\}
\end{entrylist}

\section{Other responsibilities}
\begin{entrylist}
  \entry
    {11/18 - 10/19}
    {Consultant}
    {PNWA, Seattle, USA}
    {Member of the Pacific NorthWest Advisors (PNWA) consulting group conducting informatics and market research inside Cuba, also providing unique insights to Pacific Northwest firms.}
\end{entrylist}

\pagebreak

\section{Languages}
\begin{entrylist}
  \entry
    {\textbf{Spanish}}
    {}
    {}
    {Native tongue}

  \entry
    {\textbf{English}}
    {}
    {}
    {
    	\textbf{Proficient user}: IELTS score 7.0 overall (corresponding to \textbf{C1} in CEFR).
    	Graduated \textbf{\emph{summa cum laude}} at \emph{Abraham Lincoln} Languages School.\\
    }

  \entry
    {\textbf{French}}
    {}
    {}
    {Diplôme d'études en langue française (\textbf{DELF B2}) à l'Alliance française.}
\end{entrylist}

\section{Certifications \& Training courses}
\begin{entrylist}
  \entry
    {2014}
    {(Postgraduate) Methodologies of Scientific Research}
    {CENATAV, IDICT}
    {\emph{Demistify research and research methods. Outline of the fundamentals of doing research.}}
\end{entrylist}

\begin{entrylist}
  \entry
    {2013}
    {(Tutorial) Fundamentals of Iris Recognition}
    {CIARP 2013 Congress}
    {\emph{Tutorial presented by Professor Tieniu Tan on the roadmap of Iris Recognition.}}

  \entry
    {}
    {(Tutorial) Big Data Analytics}
    {CIARP 2013 Congress}
    {\emph{Mining Uncertain and Probabilistic Data for Big Data Analytics by Professor Jian Pei.}}

  \entry
    {}
    {(Undergraduate) \LaTeX}
    {University of Havana}
    {\emph{Introduction to the document description language built on top of \TeX.}}
\end{entrylist}

\begin{entrylist}
  \entry
    {2012}
    {(Postgraduate) Advanced Data Structures}
    {University of Havana}
    {\emph{Introduction concepts such as Amortized Analysis, Fibonacci Heaps, Splay Trees, etc.}}

  \entry
    {}
    {(Undergraduate) Business Intelligence}
    {University of Havana}
    {\emph{Introduction to the core concepts of modern Business Intelligence processes.}}

  \entry
    {}
    {(Undergraduate) Introduction to Cryptography}
    {University of Havana}
    {\emph{Introduction to the fundamentals of modern Cryptography.}}
\end{entrylist}

\begin{entrylist}
  \entry
    {2011}
    {(Undergraduate) Introduction to Computer Vision}
    {University of Havana}
    {\emph{Foundations of Computer Vision with OpenCV.}}

  \entry
    {}
    {(Undergraduate) Introduction to Computer Graphics}
    {University of Havana}
    {\emph{Foundations of Computer Graphics.}}
\end{entrylist}

\pagebreak

\section{Technologies}
\begin{entrylist}
  \entry
    {\textbf{Languages}}
    {}
    {}
    {\textbf{C\#} (+9 years), \textbf{Python} (+7 years), \textbf{C/C++} (5 years), \textbf{Ruby} (2 years), \textbf{PHP} (2 years). Other languages include \textbf{Go} and \textbf{Java}.}

  \entry
    {\textbf{IDEs}}
    {}
    {}
    {\textbf{Visual Studio}, \textbf{VS Code} and \textbf{JetBrains IDEs}.}

  \entry
    {\textbf{ML \& DA}}
    {}
    {}
    {The Python stack for Machine Learning and Data Analysis: \textbf{Numpy}, \textbf{SciPy}, \textbf{Pandas}, \textbf{scikit-learn} and \textbf{Matplotlib}. Also the \textbf{MATLAB} programming language and environment.}

  \entry
    {\textbf{Web}}
    {}
    {}
    {\textbf{HTML}, \textbf{CSS3}, \textbf{JavaScript}, \textbf{Vue.js}, \textbf{jQuery}, \textbf{PHP}, \textbf{Django}, \textbf{Django Rest Framework}, \textbf{ASP.NET MVC/Core} and \textbf{Ruby on Rails}.}

  \entry
    {\textbf{Cloud}}
    {}
    {}
    {\textbf{Kubernetes}, \textbf{Docker}, \textbf{Terraform/Terragrunt}, \textbf{AWS} and \textbf{GCP}.}

  \entry
    {\textbf{Desktop}}
    {}
    {}
    {\textbf{.NET} and \textbf{Qt}.}

\end{entrylist}

\begin{entrylist}
  \entry
    {\textbf{DVCS}}
    {}
    {}
    {\textbf{Git} (+7 years) (\textbf{GitHub} and \textbf{GitLab}).}

  \entry
    {\textbf{DBMS}}
    {}
    {}
    {\textbf{PostgreSQL}, \textbf{Microsoft SQL Server}, \textbf{MySQL} and \textbf{SQLite}.}

  \entry
    {\textbf{CV}}
    {}
    {}
    {\textbf{OpenCV}, \textbf{EmguCV} and \textbf{OpenCV-Python bindings}.}

  \entry
    {\textbf{OS}}
    {}
    {}
    {\textbf{GNU/Linux} (+6 years) (\textbf{Ubuntu}, \textbf{Linux Mint}) y \textbf{Microsoft Windows} (+12 years).}
\end{entrylist}
\\
\section{Publications}
\begin{paperlist}
  \paperentry
    {2017}
    {}
    {}
    {
		\textbf{Victor Mendiola-Lau}, Francisco J. Silva Mata, Yenisel Plasencia Calaña, Isneri Talavera Bustamante and Maria De Marsico. ``Bio-chemical Data Classification by Dissimilarity Representation and Template Selection." \emph{CIARP}, 2017.
    }
\end{paperlist}

\vspace{0.5cm}

\begin{paperlist}
  \paperentry
    {2016}
    {}
    {}
    {
		\textbf{Victor Mendiola-Lau}, F.J. Silva-Mata, Y. Martínez-Díaz, I. Talavera Bustamante and M. De Marsico. ``Exploratory Data Analysis Combined with Entropy-based Template Selection for the Identification of Mixed Substances."	 \emph{CAC}, 2016.
    }
\end{paperlist}

\begin{paperlist}
  \paperentry
    {}
    {}
    {}
    {
		\textbf{Victor Mendiola-Lau}, Francisco J. Silva Mata, Yoanna Martínez-Díaz, Isneri Talavera Bustamante, Maria De Marsico. ``Hierarchical Clustering Combined with Entropy Based-template Selection and SVM Classification for the Identification of Mixed Substances by Means of UV and GC Analytical Technique." \emph{Informática}, 2016.
    }
\end{paperlist}

\begin{paperlist}
  \paperentry
    {}
    {}
    {}
    {
		\textbf{Victor Mendiola-Lau}, Francisco J. Silva Mata, Yoanna Martínez-Díaz, Isneri Talavera Bustamante and Maria De Marsico. ``Automatic classification of herbal substances enhanced with an entropy criterion." \emph{CIARP}, 2016.
    }
\end{paperlist}

\vspace{0.5cm}

\begin{paperlist}
  \paperentry
    {2015}
    {}
    {}
    {
		Francisco J. Silva-Mata, \textbf{Victor Mendiola-Lau}, Isneri Talavera-Bustamante and Yoanna Martínez-Díaz. ``Automatic processing of TLC images for discovering clusters and performing classification tasks of herbal substances. Case of study". \emph{SSC14}, 2015.
    }
\end{paperlist}

\begin{paperlist}
  \paperentry
    {}
    {}
    {}
    {
		Francisco J. Silva Mata, Dania P.- Muñoz, Stefano Berretti, \textbf{Victor Mendiola-Lau}, Isneri Talavera Bustamante, Noslen Hernández, Yoanna Martínez-Díaz, Angel Augier . ``Alineación de señales e imágenes durante la aplicación del análisis de datos funcionales: Ejemplos prácticos en señales e imágenes quimiométricas y biométricas." \emph{RCF}, 2015.
    }
\end{paperlist}

\begin{paperlist}
  \paperentry
    {}
    {}
    {}
    {
		Francisco J. Silva Mata, Dania P.- Muñoz, \textbf{Victor Mendiola-Lau}, Isneri Talavera Bustamante, Angel Augier. ``Criterios y métodos de selección de bases y su impacto en el análisis de datos funcionales: Algunos ejemplos en biometría". \emph{RCF}, 2015.
    }
\end{paperlist}

\begin{paperlist}
  \paperentry
    {}
    {}
    {}
    {
		\textbf{Victor Mendiola-Lau}, Isneri Talavera Bustamante and Maria de Marsico. ``Clustering of simple and multi-way spectral data on the dissimilarity representation." \emph{Serie Azul CENATAV}, 2015.
    }
\end{paperlist}

\begin{paperlist}
  \paperentry
    {}
    {}
    {}
    {
		Francisco J. Silva Mata,  Isneri Talavera, \textbf{Victor Mendiola-Lau}, Yoanna Martínez Díaz, Anier Revilla Eng. ``Clasificación de Sustancias Vegetales con el uso de un Sistema Automatizado para el proceso de Imágenes de TLC". En: IX Congreso de Ciencias, Tecnología e Innovación Química, Quimicuba 2015, La Habana, Cuba, 13-16 de octubre de 2015.
    }
\end{paperlist}

\begin{paperlist}
  \paperentry
    {}
    {}
    {}
    {
		Dania Porro, Isneri Talavera, Robert Duin, Gabriela Barcas, \textbf{Victor Mendiola-Lau}. ``Comparación De Diferentes Formas De Representación De Datos Espectrales Para Clasificación De Sustancias." En: IX Congreso de Ciencias, Tecnología e Innovación Química, Quimicuba 2015, La Habana, Cuba, 13-16 de octubre de 2015.
    }
\end{paperlist}

\begin{paperlist}
  \paperentry
    {}
    {}
    {}
    {
		Francisco J. Silva Mata, \textbf{Victor Mendiola-Lau}, Anier Revilla, Isneri Talavera, Angel Augier, Stefano Berretti y Yoanna Martínez. Optimización de los Modelos Funcionales para Objetos Biométricos. \emph{RECPAT}, 2015.
    }
\end{paperlist}

\vspace{0.5cm}

\begin{paperlist}
  \paperentry
    {2014}
    {}
    {}
    {
		Francisco J. Silva-Mata, Dania P.-Muñoz, \textbf{Victor Mendiola-Lau}, Isneri Talavera-Bustamante, Angel Augier. ``Criteria and methods of selection of bases and their impact in functional data analysis. Some examples in biometrics". \emph{CIOFF}, 2014.
    }
\end{paperlist}

\begin{paperlist}
  \paperentry
    {}
    {}
    {}
    {
		Francisco J. Silva-Mata, Dania P.-Muñoz, Stefano Berretti, \textbf{Victor Mendiola-Lau}, Isneri Talavera-Bustamante, Noslen Hernández, Yoanna Martínez-Díaz, Angel Augier. ``Signal and image alignment during the application of functional data analysis. Practical examples of chemometrics and biometrics". \emph{CIOFF}, 2014.
    }
\end{paperlist}

\begin{paperlist}
  \paperentry
    {}
    {}
    {}
    {
		\textbf{Victor Mendiola-Lau}, Francisco J. Silva-Mata, Dania P.-Muñoz, Isneri Talavera-Bustamante. ``APIris: Nueva Plataforma Automatizada para el Reconocimiento de Iris". \emph{RECPAT}, 2014.
    }
\end{paperlist}

\begin{paperlist}
  \paperentry
    {}
    {}
    {}
    {
		Francisco J. Silva-Mata, Dania P.-Muñoz, \textbf{Victor Mendiola-Lau}, Anier Revilla-Eng, Isneri Talavera-Bustamante. ``Criterios y métodos para representar imágenes biométricas usando FDA". \emph{RECPAT}, 2014.
    }
\end{paperlist}

\vspace{0.5cm}

\begin{paperlist}
  \paperentry
    {2013}
    {}
    {}
    {
		Dania P.-Muñoz, Francisco J. Silva-Mata, \textbf{Victor Mendiola-Lau}, Noslen Hernández, and Isneri Talavera-Bustamante. ``A new iris recognition approach based on a functional representation". \emph{CIARP}, 2013.
    }
\end{paperlist}

\vspace{0.5cm}

\begin{paperlist}
  \paperentry
    {2011}
    {}
    {}
    {
		Javier Guillot-Jiménez, \textbf{Victor Mendiola-Lau}, Benny Jon-Robaina, Daniel A. Mesejo-León, Omar Salas-García and Haydée Guillot-Jiménez. ``SIMPLER: SIMPLER: desde el MERX hasta las Bases de Datos". \emph{COMPUMAT}, 2011.
    }
\end{paperlist}
\\
\section{Other Accomplishments}
\begin{itemize}[noitemsep, nolistsep]

	\item Achieved a GPA of 5.13 over a scale of 5.0\footnote{The extra points were the result of outstanding academic achievements.}.\\

	\item ACM-ICPC Cuban Finals contestant (2011 and 2013 editions)\footnote{Competed for a spot in ACM-ICPC Caribbean Finals contest.}.\\

	\item Winner of the $1^{st}$ prize at the 2010-2011 Scientific Journal of the Faculty of Mathematics and Computer Science.\\

	\item I have made some contributions to the Wikipedia article entitled ``\emph{Computational complexity theory}".\\

	\item Winner of the silver medal in Mathematics of the $12^{ve}$ grade in Havana.\\

	% \item From 2004 until 2007 was selected as part of advanced groups in Mathematics.\\

	% \item Best candidate\footnote{Highest grade.} of the \emph{Plaza de la Revolución} locality at the IPVCE Vladimir Ilich Lenin admission tests in 2003-2004.\\

	% \item Valedictorian from my elementary school in 2001.\\

\end{itemize}

\end{document}