text:
Returns whether or not all given react elements match elements in the render tree.
It will determine if an element in the wrapper matches the expected element by checking if the expected element has the same props as the wrapper's element and share the same values.

#### Arguments

1. `nodeOrNodes` (`ReactElement|Array<ReactElement>`): The node or array of nodes whose presence you are detecting in the current instance's
render tree.

#### Returns

`Boolean`: whether or not the current wrapper has nodes anywhere in its render tree that match
the ones passed in.

#### Example

```jsx
const wrapper = mount(
  <div>
    <div data-foo="foo" data-bar="bar">Hello</div>
  </div>
);

expect(wrapper.contains(<div data-foo="foo" data-bar="bar">Hello</div>)).to.equal(true);

expect(wrapper.contains(<div data-foo="foo">Hello</div>)).to.equal(false);
expect(wrapper.contains(<div data-foo="foo" data-bar="bar" data-baz="baz">Hello</div>)).to.equal(false);
expect(wrapper.contains(<div data-foo="foo" data-bar="Hello">Hello</div>)).to.equal(false);
expect(wrapper.contains(<div data-foo="foo" data-bar="bar" />)).to.equal(false);
```

```jsx
const wrapper = mount(
  <div>
    <span>Hello</span>
    <div>Goodbye</div>
    <span>Again</span>
  </div>
);

expect(wrapper.contains([
  <span>Hello</span>,
  <div>Goodbye</div>,
])).to.equal(true);

expect(wrapper.contains([
  <span>Hello</span>,
  <div>World</div>,
])).to.equal(false);
```

#### Common Gotchas

- `.contains()` expects a ReactElement, not a selector (like many other methods). Make sure that
when you are calling it you are calling it with a ReactElement or a JSX expression.
- Keep in mind that this method determines equality based on the equality of the node's children as
well.


text:
<?php

use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model common\models\Hisprojectinfo */

$this->title = 'Create Hisprojectinfo';
$this->params['breadcrumbs'][] = ['label' => 'Hisprojectinfos', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

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

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

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Междисциплинарная школа эмпирико-правовых исследований">
    <meta name="author" content="Институт проблем правоприменения при ЕУСПб">
	<meta property="og:type" content="website">
    <meta property="og:image" content="http://empravo.ru/img/2019/facebook_header.png"/>
    <meta property="og:image:width" content="1321" />
    <meta property="og:image:height" content="761" />
	<meta property="og:title" content="Эмпирическое правоведение: от идеи до статьи за 5 дней" />
	<meta property="og:description" content="Междисциплинарная школа эмпирико-правовых исследований" />
	<meta property="og:url" content="https://empravo.ru" />
	<meta property="og:locale" content="ru_RU" />

    <title>Школа эмпирического правоведения</title>
    <base target="_blank">

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

    <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>

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

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

	<link rel="stylesheet" href="css/likely.css">

            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                Открыть меню

            </button>
            Наверх

                    О школе

                    Организаторы

                    Отзывы

                    Заявка

                    Задание

                    FAQ

                    Контакты

Шестая междисциплинарная школа

Института проблем правоприменения

Эмпирическое правоведение: от идеи до статьи за 5 дней

Конец сентября 2019 @ Санкт-Петербург

            Еще есть время!

О школе

Школа эмпирического правоведения проводится уже шестой год и собирает участников со всей страны. Главная цель Школы – научить участников думать в парадигме эмпирических исследований права и самостоятельно проводить исследования, начиная от постановки исследовательского вопроса и заканчивая написанием научной статьи или аналитической записки.

Школа рассчитана на широкий круг людей, заинтересованных в исследованиях права и правоприменения в России методами социальных наук: социологов, юристов, экономистов, политологов, антропологов и специалистов по анализу данных.

В течение Школы мы стараемся уделять максимум времени реальной исследовательской работе. На конкретных задачах мы будем заниматься поиском, критической деконструкцией, сбором и анализом данных, работой с существующими исследованиями, а также расскажем об организации и результатах исследований Института и о том, как писать академические и прикладные тексты (такие, как научные статьи, колонки и policy memo). Результатом 5 дней работы на Школе станут реальные исследования и тексты, созданные участниками при поддержке сотрудников Института.

Организаторы

Организатором школы является Институт проблем правоприменения при Европейском Университете в Санкт-Петербурге. Миссия Института - содействие реформе правоприменения и утверждению принципа верховенства права в России посредством проведения научных исследований, публикации академических статей  и  аналитических записок и взаимодействия со СМИ (РБК, Медуза, регулярная колонка в газете «Ведомости»).

Работа Института финансируется Сбербанком России, Комитетом гражданских инициатив и Центром стратегических разработок. Подробнее о нас можно прочитать здесь.

Отзывы о прошлых школах

Мария Немова, адвокат, аспирант факультета права НИУ ВШЭ:

За неделю, проведенную на школе, я узнала о дизайне исследования, возможностях использования и интерпретирования данных в праве, «лайфхаках» поиска данных и литературы, оформлении библиографии больше, чем об этом рассказывали преподаватели на курсах бакалавриата, магистратуры и аспирантуры.

Максим Никонов, кандидат юридических наук,  адвокат:

Знания, которые мало где в России можно получить, замечательный коллектив лекторов, зашкаливающий градус интеллектуального удовольствия, общение с коллегами из разных регионов и всё это в Питере.

Анатолий Пронин, преподаватель-юрист, Воронежский государственный университет:

Самые яркие впечатления от самого мероприятия — вихрь новых идей, сильнейшее желание в авральном порядке прочитать кипу незнакомой, но манящей литературы и бесконечный восторг от дружелюбной, но в то же время академичной атмосферы.

Павел Барышников, аспирант кафедры гражданского процесса Саратовской государственной юридической академии:

...школа позволяет встать на долгую дорогу научного поиска. Обучение в ней вдохновило меня на написание статьи и обогатило знаниями, которые позволили принять участие в масштабном эмпирическом исследовании.
Подводя итог, отмечу, что школа преследовала разные цели, но мне запомнилась вот эта: создать сообщество экспертов, занимающихся эмпирическими исследованиями права. Такое сообщество создано, и оно развивается. Присоединяйтесь и побывайте на «на той стороне права»!

Ольга Кряжкова, кандидат юридических наук, доцент кафедры конституционного права Российского государственного университета правосудия:

...Впоследствии я приняла участие в подготовке научной статьи о том, как Конституционный Суд Российской Федерации излагает свои решения. Приобретённые знания сильно повлияли на её содержание. После того как она была опубликована, мой наставник и учитель, известный правовед, сказал: «Вот это - настоящая наука». Пожалуй, лучшего отзыва в моей исследовательской практике я не получала! Конечно же, останавливаться на достигнутом я не намереваюсь.

Организаторам школы и ведущим удалось не только научить нас чему-то полезному, но и создать удивительно тёплую атмосферу, за что говорю отдельное спасибо!

Юлия Халикова, магистрант, факультет социологии, НИУ ВШЭ:

Я приняла участие в школе ИПП, будучи студенткой пятого курса факультета права НИУ ВШЭ. <...> Участие в школе подтолкнуло меня к желанию и дальше изучать то, как применяется право. Сейчас я учусь в магистратуре Вышки на факультете социологии и планирую писать магистерскую работу, так или иначе связанную с правоприменением в современной России. Поэтому я хотела бы порекомендовать участие в школе студентам с совершенно различным бэкграундом - юристам, даже не интересующимся социологией, будет полезно расширить свой кругозор и увидеть, как действительно применяется право в различных ситуациях, а представителям социальных и экономических наук – узнать, как возможно соединить эти две сферы.

Ирина Дудко, кандидат юридических наук, доцент, Российский государственный университет правосудия:

Школа существенно изменила мои представления о возможностях применения эмпирических методов в праве. Позволила по-другому взглянуть на правоведение, осознать практически неиспользуемые российскими учеными  возможности исследования...

Со всеми отзывами о предыдущих Школах можно ознакомиться здесь.

Подать заявку

Жёстких ограничений для тех, кто может участвовать, нет. Однако мы отдадим предпочтение тем, кто на момент Школы учится не менее, чем на 3 курсе бакалавриата, тем, кто не имеет защищённой кандидатской диссертации и тем, кто закончил бакалавриат не более 7 лет назад.

Чтобы подать заявку, нужно выполнить отборочное задание и заполнить форму.

Отборочное задание — это два развёрнутых ответа (каждый объёмом до 1000 слов) на любые два вопроса-задачи из представленных ниже. Иными словами, вы должны выбрать любые две задачи из списка, и на каждую из них дать обоснованный ответ-решение. Должно получиться два ответа, каждый объёмом до 1000 слов. Эти ответы нужно поместить в один документ формата Word или PDF. Отборочные задания и советы по их решению представлены в разделе ниже.

После того, как вы сделали задание, нужно заполнить эту форму и выслать документ с решениями отборочного задания по адресу aknorre@eu.spb.ru с темой "Заявка на осеннюю школу". Без решения отборочного задания заявка не будет рассматриваться.

Приём заявок на школу будет прекращен 1 июня 16 июня 2019 года в 23:59 по Московскому времени.

Отбор участников Школы будет произведен до 15 июля 2019 года. В случае положительного решения комиссии Институт обеспечит победителям бесплатное участие в Школе, оплатит проживание и проезд до Санкт-Петербурга и обратно.

Если вам необходимо объяснить кому-то в вузе, куда именно вы уезжаете, можно использовать для этого информационное письмо.

Отборочное задание

Задача 1. В 2017-2018 Институт проблем правоприменения проводил исследование работы правоохранительной и судебной системы Республики Казахстан. Одним из результатов работы стал анализ дезагрегированных данных о всех зарегистрированных преступлениях в Республике за 2016 год. Наибольший интерес представили графики того, как принятие процессуальных решений распределено по времени. Эти графики представлены ниже. Что, по Вашему мнению, могут сказать эти графики о специфике работы уголовной юстиции Республики, и какие выводы из них можно сделать?

Задача 2. Cohen & Felson (1979) полагают, что повседневные практики людей определяют их потенциальное криминальное поведение. Они исходят из того, что любое преступление – это сочетание трех ключевых элементов: мотивированного злодея, подходящей жертвы или цели, и отсутствия внешних сдерживающих факторов. Взгляните на графики ниже, отображающие суточные временные циклы двух социально-профессиональных групп убийц. Как Вы думаете, что за преступники отображены на графике А, и что за преступники - на графике Б? Объясните свой выбор в коротком тексте.

Cohen, L. E., & Felson, M. (1979). Social change and crime rate trends: A routine activity approach. American sociological review, 588-608. PDF.

Задача 3. В январе 2019 года Дмитрий Медведев объявил о старте «регуляторной гильотины». Суть этой меры заключается в борьбе с чрезмерной проверочной нагрузкой на бизнес с помощью удаления избыточных, устаревших или вредных требований. Для этого пересматриваются и отменяются все существующие в настоящее время нормативные акты в сфере контроля и надзора, включая ведомственные региональные приказы, письма и инструкции. Трудоёмкая работа по пересмотру требований ляжет на органы исполнительной власти федерального уровня. Как и в случае с другими реформами, ФОИВы могут не понять или даже саботировать работу по реформе. Предположите, какими способами органы исполнительной власти могут саботировать регуляторную гильотину, и какие решения офис реформы может предпринять, чтобы это выявить.

Задача 4. В России нередко говорят о том, что значительная часть нагрузки судов приходится не необоснованные иски и заявления, которые граждане подают в суды общей юрисдикции по гражданским и административным делам. Для того, чтобы таких исков стало меньше, предлагаются специальные меры. Оцените пожалуйста, используя статистические данные Судебного департамента, насколько можно было бы снизить нагрузку на суды, используя такие меры (минимум и максимум). Обоснуйте свой ответ.

Как выполнять отборочное задание?

Отнеситесь к отборочному заданию как к эссе в свободном формате. Идеальное решение отборочного задания должно быть развёрнутым рассуждением, содержащим интерпретацию (ваше понимание) задания, вашу позицию, аргументацию и вывод. Аргументация не должна строиться исключительно на логических предположениях и отсылках к законодательству, а должна отсылать к существующим исследованиям, подходам и данным, поэтому в вашем ответе должно быть хотя бы несколько ссылок на литературу. Замечательно, если у вас получится рассказать, что по этому поводу уже говорили и писали. Особенно ценно, если вы попробуете самостоятельно найти и проанализировать данные, которые подтвердят вашу позицию. Такими данными может быть криминальная и судебная статистика, результаты опросов общественного мнения или что-то еще.

Как искать существующие исследования? Обычно это делают через библиографические системы, такие, как Google Scholar, Web of Science или JSTOR. Последние две, к сожалению, платные и требуют подписки, которая есть у многих университетов России и мира. Многие полезные статьи с исследованиями и обзорами написаны на английском языке. Читать их может быть сложнее, но зачастую они интереснее и более содержательно насыщенны, чем статьи на русском языке.

Итак, для выполнения отборочного задания нужно выбрать любые две задачи из списка выше, для каждой из них дать развёрнутый ответ, и каждый ответ должен быть размером до 1000 слов. Удачи!

Вопросы и ответы

Q: А где будет проходить Школа?

A: В гостинице «Новый Петергоф» в Петергофе, ближайшем пригороде Санкт-Петербурга. Участники школы проживают в 2- и 3-местных номерах, оснащенных всем необходимым (в том числе Wi-Fi).

Q: Я отправил незаконченную анкету. Что теперь делать?

A: Ничего страшного, просто заполните и отправьте анкету еще раз.

Q: Я не из России. Могу ли я участвовать в школе?

A: Да, рабочий язык школы - русский, участвовать могут граждане других стран, если они владеют русским.

Q: Оплачивается ли дорога до Петербурга и обратно, если я прошёл конкурс?

A: Да, оплачивается из любой точки страны. Наш администратор связывается с вами и обговаривает детали покупки билета. Не забудьте посадочный купон или корешок авиабилета, они нужны для отчётности.

Q: Можно ли приехать на несколько дней раньше или уехать позже?

A: Это возможно, но обсуждается отдельно. Для этого нужно написать нам электронное письмо после оглашения результатов конкурса. Если вы решите остаться в Петербурге еще на несколько дней или приехать раньше начала Школы, мы всё равно оплатим билеты. Имейте в виду, что мы обеспечиваем проживание только во время Школы.

Q: А оплачивается ли проживание и питание?

A: Да, при условии, что вы прошли конкурс.

Q: Можно ли приехать за свой счёт, если я не прошёл по конкурсу?

A: Такая возможность есть. Если вы не прошли конкурс, но хотите приехать за свой счёт, напишите нам об этом после объявления результатов конкурса.

Контакты

Следите за новостями на странице ВКонтакте.

Кстати, до 1 сентября мы проводим
конкурс научных статей по исследованиям правоприменения с денежными призами.

Если у вас остались вопросы, вы можете связаться с куратором Школы:

Алексей Кнорре

aknorre@eu.spb.ru

Jekyll | Creative Theme | Исходный код сайта | Прошлые годы: 2018, 2017


text: CSV


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>MNE-CPP: XDISPLIB::FrequencySpectrumModel Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

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

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

MNE-CPP
    beta 1.0

Main Page

Related Pages

Modules

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

XDISPLIB

FrequencySpectrumModel

Signals |
Public Member Functions |
List of all members

XDISPLIB::FrequencySpectrumModel Class Reference

The FrequencySpectrumModel class implements the data access model for a real-time multi sample array data stream.
 More...

#include <frequencyspectrummodel.h>

Inheritance diagram for XDISPLIB::FrequencySpectrumModel:

  <map id="XDISPLIB::FrequencySpectrumModel_map" name="XDISPLIB::FrequencySpectrumModel_map">
</map>

Signals

void 	newSelection (QList< qint32 > selection)

Public Member Functions

 	FrequencySpectrumModel (QObject *parent=0)

virtual int 	rowCount (const QModelIndex &parent=QModelIndex()) const

virtual int 	columnCount (const QModelIndex &parent=QModelIndex()) const

virtual QVariant 	data (const QModelIndex &index, int role=Qt::DisplayRole) const

virtual QVariant 	headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const

void 	setInfo (FiffInfo::SPtr &info)

void 	setScaleType (qint8 ScaleType)

void 	addData (const MatrixXd &data)

FiffInfo::SPtr 	getInfo () const

RowVectorXd 	getFreqScale () const

RowVectorXd 	getFreqScaleBound () const

qint32 	getNumStems () const

const QMap< qint32, qint32 > & 	getIdxSelMap () const

void 	selectRows (const QList< qint32 > &selection)

void 	resetSelection ()

void 	toggleFreeze (const QModelIndex &index)

bool 	isFreezed () const

void 	setBoundaries (float fLowerFrqBound, float fUpperFrqBound)

qint32 	getLowerFrqBound () const

qint32 	getUpperFrqBound () const

Detailed Description

The FrequencySpectrumModel class implements the data access model for a real-time multi sample array data stream.

DECLARE CLASS FrequencySpectrumModel

Definition at line 89 of file frequencyspectrummodel.h.

Constructor & Destructor Documentation

          FrequencySpectrumModel::FrequencySpectrumModel
          (
          QObject *
          parent = 0	)

Constructs an real-time multi sample array table model for the given parent.

Parameters

[in]	parent	parent of the table model

Definition at line 57 of file frequencyspectrummodel.cpp.

Member Function Documentation

          void FrequencySpectrumModel::addData
          (
          const MatrixXd &
          data	)

Adds the frequency estimation

Parameters

[in]	data	the frequency estimation

Definition at line 205 of file frequencyspectrummodel.cpp.

          int FrequencySpectrumModel::columnCount
          (
          const QModelIndex &
          parent = QModelIndex()	)
           const

virtual

Returns the number of columns for the children of the given parent.

Parameters

[in]	parent	not used

Returns

number of columns

Definition at line 83 of file frequencyspectrummodel.cpp.

          QVariant FrequencySpectrumModel::data
          (
          const QModelIndex &
          index,

          int
          role = Qt::DisplayRole

          )
          	 const

virtual

Returns the data stored under the given role for the item referred to by the index.

Parameters

[in]	index	determines item location

[in]	role	role to return

Returns

accessed data

Definition at line 91 of file frequencyspectrummodel.cpp.

          RowVectorXd XDISPLIB::FrequencySpectrumModel::getFreqScale
          (
          	)
           const

inline

Returns the frequency scale of the x axis

Returns

the frequency scale of the x axis

Definition at line 315 of file frequencyspectrummodel.h.

          RowVectorXd XDISPLIB::FrequencySpectrumModel::getFreqScaleBound
          (
          	)
           const

inline

Returns the frequency scale scaled to boundaries of the x axis

Returns

the frequency scale of the x axis

Definition at line 323 of file frequencyspectrummodel.h.

          const QMap< qint32, qint32 > & XDISPLIB::FrequencySpectrumModel::getIdxSelMap
          (
          	)
           const

inline

Returns a map which conatins the channel idx and its corresponding selection status

Returns

the channel idx to selection status

Definition at line 339 of file frequencyspectrummodel.h.

          FiffInfo::SPtr XDISPLIB::FrequencySpectrumModel::getInfo
          (
          	)
           const

inline

Returns the fiff info

Returns

the fiff info

Definition at line 307 of file frequencyspectrummodel.h.

          qint32 XDISPLIB::FrequencySpectrumModel::getLowerFrqBound
          (
          	)
           const

inline

Returns the lower frequency boundary

Returns

the lower frequency boundary

Definition at line 355 of file frequencyspectrummodel.h.

          qint32 XDISPLIB::FrequencySpectrumModel::getNumStems
          (
          	)
           const

inline

Returns the number of stems

Returns

the number of stems

Definition at line 331 of file frequencyspectrummodel.h.

          qint32 XDISPLIB::FrequencySpectrumModel::getUpperFrqBound
          (
          	)
           const

inline

Returns the upper frequency boundary

Returns

the upper frequency boundary

Definition at line 363 of file frequencyspectrummodel.h.

          QVariant FrequencySpectrumModel::headerData
          (
          int
          section,

          Qt::Orientation
          orientation,

          int
          role = Qt::DisplayRole

          )
          	 const

virtual

Returns the data for the given role and section in the header with the specified orientation.

Parameters

[in]	section	For horizontal headers, the section number corresponds to the column number. Similarly, for vertical headers, the section number corresponds to the row number.

[in]	orientation	Qt::Horizontal or Qt::Vertical

[in]	role	role to show

Returns

accessed eader data

Definition at line 153 of file frequencyspectrummodel.cpp.

          bool XDISPLIB::FrequencySpectrumModel::isFreezed
          (
          	)
           const

inline

Returns current freezing status

Returns

the current freezing status

Definition at line 347 of file frequencyspectrummodel.h.

          void XDISPLIB::FrequencySpectrumModel::newSelection
          (
          QList< qint32 >
          selection	)

signal

Emmited when new selcetion was made

Parameters

[in]	selection	list of all selected channels

          void FrequencySpectrumModel::resetSelection
          (
          	)

Resets the current selection (selects all channels)

Definition at line 271 of file frequencyspectrummodel.cpp.

          int FrequencySpectrumModel::rowCount
          (
          const QModelIndex &
          parent = QModelIndex()	)
           const

virtual

Returns the number of rows under the given parent. When the parent is valid it means that rowCount is returning the number of children of parent.

Parameters

[in]	parent	not used

Returns

number of rows

Definition at line 72 of file frequencyspectrummodel.cpp.

          void FrequencySpectrumModel::selectRows
          (
          const QList< qint32 > &
          selection	)

Selects the given list of channel indeces and unselect all other channels

Parameters

[in]	selection	channel index list to select

Definition at line 247 of file frequencyspectrummodel.cpp.

          void FrequencySpectrumModel::setBoundaries
          (
          float
          fLowerFrqBound,

          float
          fUpperFrqBound

          )

Set plotting boundaries

Parameters

[in]	fLowerFrqBound	Lower frequency boudnary

[in]	fUpperFrqBound	Upper frequency boudnary

Definition at line 303 of file frequencyspectrummodel.cpp.

          void FrequencySpectrumModel::setInfo
          (
          FiffInfo::SPtr &
          info	)

Sets corresponding fiff info

Parameters

[in]	inf	The corresponding fiff information object

Definition at line 186 of file frequencyspectrummodel.cpp.

          void FrequencySpectrumModel::setScaleType
          (
          qint8
          ScaleType	)

Sets Scale type

Parameters

[in]	ScaleType	The corresponding scale type

Definition at line 198 of file frequencyspectrummodel.cpp.

          void FrequencySpectrumModel::toggleFreeze
          (
          const QModelIndex &
          index	)

Toggle freeze for all channels when a channel is double clicked

Parameters

[in]	index	of the channel which has been double clicked

Definition at line 286 of file frequencyspectrummodel.cpp.

The documentation for this class was generated from the following files:

D:/Users/Christoph/GitHub/mne-cpp/applications/mne_x_libs/xDisp/helpers/frequencyspectrummodel.h

D:/Users/Christoph/GitHub/mne-cpp/applications/mne_x_libs/xDisp/helpers/frequencyspectrummodel.cpp

<address class="footer">
Generated on Fri Mar 27 2015 22:54:45 for MNE-CPP by

 1.8.9.1
</address>


text:
package Engine.Components.Interaction;

import Engine.Components.Component;

public class Cursor extends Component {
}


text:
require 'ostruct'
module Panoptes
  def self.cors_config
    @cors_config ||= OpenStruct.new(
      headers: :any,
      request_methods: %w[delete get post options put head],
      expose: %w[ETag X-CSRF-Param X-CSRF-Token],
      max_age: ENV.fetch('CORS_MAX_AGE', 300).to_i,
      allows: [
        { origins: '*', resource: '/api/*' },
        { origins: '*', resource: '/graphql' },
        { origins: cors_origins_regex, resource: '/users*', credentials: true },
        { origins: cors_origins_regex, resource: '/oauth/*', credentials: true }
      ]
    )
  end

  def self.cors_origins_regex
    cors_origins = ENV.fetch(
      'CORS_ORIGINS_REGEX',
      '^https?:\/\/(127\.0\.0\.1|localhost|[a-z0-9-]+\.local)(:\d+)?$'
    )
    /#{cors_origins}/
  end
end

Panoptes.cors_config


text:
require 'uns_park/complication'

module UnsPark
  class Engine < ::Rails::Engine
    isolate_namespace UnsPark

    config.generators do |g|
      g.test_framework :rspec
      g.fixture_replacement :factory_girl, :dir => 'spec/factories'
    end

    initializer :append_migrations do |app|
      unless app.root.to_s.match root.to_s
        config.paths["db/migrate"].expanded.each do |expanded_path|
          app.config.paths["db/migrate"] << expanded_path
        end
      end
    end

    def complication
      UnsPark::Complication.new
    end

  end
end


text:
require 'volt/models/persistors/base'
require 'volt/utils/local_storage'
require 'json'

module Volt
  module Persistors
    # Backs a collection in the local store
    class LocalStore < Base
      def initialize(model)
        @model = model
      end

      # Called when a model is added to the collection
      def added(model, index)
        root_model.persistor.save_all
      end

      def loaded(initial_state = nil)
        # When the main model is first loaded, we pull in the data from the
        # store if it exists
        if @model.path == []
          json_data = LocalStorage['volt-store']
          if json_data
            root_attributes = JSON.parse(json_data)

            @loading_data = true
            root_attributes.each_pair do |key, value|
              @model.send(:"_#{key}=", value)
            end
            @loading_data = nil
          end
        end
      end

      # Callled when an item is changed (or removed)
      def changed(attribute_name)
        root_model.persistor.save_all
      end

      # Called on the root
      def save_all
        return if @loading_data

        json_data = JSON.dump(@model.to_h)

        LocalStorage['volt-store'] = json_data
      end
    end
  end
end


text:
How-to add Identify
===================

If you would like to have your map users to be able to get information
on specific features using the Identify tool, you must: \* ensure the
``<map-source>`` type is one of: ``wms``, ``mapserver``, ``wfs``,
``mapserver-wfs``, or ``ags-vector`` \* add an identify template to the
layer in the ``<map-source>`` (see below) \* have the user display the
layer in the Catalog

Add a ``<template name="identify">`` to the ``<layer ...>``. An easy way
to do this is to add ``<template name="identify" auto="true" />``. For
example, to add identify to the desktop demo's "borders"
``<map-source>`` (titled "City and County Boundaries" in the Catalog),
change the ``<map-source>`` to be:

.. code:: xml

        <map-source name="borders" type="mapserver" title="City and County Borders">
            <file>./demo/statedata/basemap.map</file>
            <layer name="city_poly" status="off"/>
            <layer name="county_borders" status="on">
                <template name="identify" auto="true" />
            </layer>
        </map-source>

When the user turns on the layer in the Catalog, clicks Identify, then
clicks inside a county polygon, the details for that polygon will be
shown in the Super Tab, something like:

::

    City and County Borders
    boundedBy: -10443124.4532125805088.070692-10358662.5561045947016.049725
    AREA: 5163166424.00009
    PERIMETER: 309931.11344
    COUNTY_: 84
    COUNTY_ID: 21
    COUNTY_NUM: 1
    COUNTYNAME: Aitkin
    COUNTYFIPS: 001
    FIPS: 27001

Since the template you just added has ``auto="true"``, GeoMoose renders
all the feature's properties names and values (including the calculated
"boundedBy" bounding box for the feature). The above result is not very
pretty, but fortunately you can customize the look of the result by
writing a custom template for the data. Instead of an "auto" generated
template, change the template to be:

.. code:: xml

            <layer name="county_borders" status="on">
                <template name="identify"><![CDATA[

                    County

                        Name:{{properties.COUNTYNAME}}

                ]]>
                </template>
            </layer>

In the example above, there are a few things to note: \* Customizing the
look of the results is done using HTML syntax \* GeoMoose substitutes
values for references it knows about when encounters ``{{ }}`` \*
Referencing the feature's value is done using ``properties.COUNTYNAME``,
where the ``properties`` part is from the GeoJSON format of the query
results (so that is common to evert identify template), and the
``COUNTYNAME`` is the **case-sensitive** attribute name specific to the
layer

Because the template is HTML (and will be interpreted by the browser),
you can do things like adding a link based on a feature's values:

.. code:: xml

            <layer name="county_borders" status="on">
                <template name="identify"><![CDATA[

                    County

                        Name:

                            {{properties.COUNTYNAME}}

                ]]>
                </template>
            </layer>

And since it is interpreted by the browser, it can even contain
JavaScript:

.. code:: xml

                <template name="identify"><![CDATA[

                    County

                        Name:

                            {{properties.COUNTYNAME}}

                ]]>
                </template>

The Firestations layer
----------------------

This section references the ``firestations`` source and
``fire_stations`` layer. For more information on setting those up in
your local demo, read the:doc:`./add-a-layer`
guide.

Adding identify to Firestations
-------------------------------

-  WMS has the GetFeatureInfo request which GeoMoose will use to fetch
   feature data.
-  GeoMoose will also use WFS and AGS FeatureServer for identify if a
   ``<map-source>`` is configured with ``wfs``, ``mapserver-wfs``, or
   ``ags-vector``.
-  For a layer to work with identify it needs to have a ``<template>``
   named ``identify``
-  In the ``mapbook.xml`` file update the ``firestations``
   ``<map-source>`` definition:

.. raw:: html

.. code:: xml

    <map-source name="firestations" type="mapserver">
        <file>./demo/firestations/firestations.map</file>
        <layer name="fire_stations">
            <template name="identify"><![CDATA[

                Firestation

                Station City: {{ properties.Dak_GIS__4 }}

                Station Number: {{ properties.Dak_GIS__5 }}

            ]]></template>
        </layer>
    </map-source>

.. raw:: html

-  This example uses GeoMoose's template system. GeoMoose has a rich
   template system provided by Mark.up. :ref:`More information on GeoMoose
   templates here. <templates>`


text:
package org.onosproject.incubator.elasticcfg;

import org.onosproject.event.ListenerService;

import java.util.concurrent.CompletableFuture;

/**
 * Service for storing and distributing elastic configuration data.
 */
public interface ElasticConfigService
        extends ListenerService<ElasticConfigEvent, ElasticConfigListener> {
    /**
     * Adds a new node to the elastic config store.
     *
     * @param store type of store to which the application wants to add the node to.
     * @param path  data structure with absolute path to the parent and relative
     *              path to the node
     * @param node  data structure with nodetype and value to be stored at the node
     * @return future that is completed with {@code true} if the new node was successfully
     * added. Future will be completed with {@code false} if a node already exists at
     * the specified path. Future will be completed exceptionally with a
     * {@code FailedException} if the parent node (for the node to create) does not exist.
     */
    CompletableFuture<Boolean> addNode(ConfigStoreType store,
                                       ConfigNodePath path, ConfigNode node);

    /**
     * Removes  a node from the elastic config store.
     *
     * @param store type of store which the application wants to access.
     * @param path  data structure with absolute path to the parent and
     *              relative path to the node
     * @return future for the previous value. Future will be completed with a
     * {@code FailedException} if the node to be removed is either the root
     * node or has one or more children or if the node to be removed does not exist.
     */
    CompletableFuture<ConfigNode> removeNode(ConfigStoreType store, ConfigNodePath path);

    /**
     * Creates/Updates  a node in the elastic config store.
     *
     * @param store type of store which the application wants to access.
     * @param path  data structure with absolute path to the parent and
     *              relative path to the node
     * @param node  data structure with nodetype and new value to be stored at the node
     * @return future for the previous value. Future will be completed with {@code null}
     * if there was no node previously at that path.
     * Future will be completed with a {@code FailedException}
     * if the parent node (for the node to create/update) does not exist.
     */
    CompletableFuture<ConfigNode> updateNode(ConfigStoreType store,
                                             ConfigNodePath path, ConfigNode node);

    /**
     * Creates nodes in the elastic config store, recursively by creating
     * all missing intermediate nodes in the path.
     *
     * @param store type of store which the application wants to access.
     * @param path  data structure with absolute path to the parent and relative
     *              path to the node
     * @param node  recursive data structure with nodetype and value to
     *              be stored at the node
     * @return future that is completed with {@code true} if all the new
     * nodes were  successfully
     * created. Future will be completed with {@code false} if any node
     * already exists at the specified path
     * //TODO
     */
    CompletableFuture<Boolean> createRecursive(ConfigStoreType store,
                                               ConfigNodePath path, ConfigNode node);

    /**
     * Delete nodes in the elastic config store, recursively by deleting all
     * intermediate nodes in the path.
     *
     * @param store type of store which the appplication wants to access.
     * @param path  data structure with absolute path to the parent and
     *              relative path to the node
     * @return future that is completed with {@code true} if all the
     * nodes under the given path including the node at the path could
     * be successfully deleted. Future will be completed with {@code false}
     * if the node at the given path or any parent node
     * did not exist //TODO
     */
    CompletableFuture<Boolean> deleteRecursive(ConfigStoreType store, ConfigNodePath path);

    /**
     * Creates/Updates nodes in the elastic config store, recursively by creating
     * all missing intermediate nodes in the path.
     *
     * @param store type of store which the appplication wants to access.
     * @param path  data structure with absolute path to the parent and
     *              relative path to the node
     * @param node  recursive data structure with nodetype and value to
     *              be stored at the node
     * @return future that is completed with {@code true} if all the
     * nodes under the given path
     * including the node at the path could be successfully updated.
     * Future will be completed with {@code false} if the node at the
     * given path or any parent node
     * did not exist //TODO
     */
    CompletableFuture<Boolean> updateRecursive(ConfigStoreType store,
                                               ConfigNodePath path, ConfigNode node);

    /**
     * Returns a value node or subtree under the given path.
     *
     * @param store type of store which the application wants to access.
     * @param path  data structure with absolute path to the parent and
     *              relative path to the node
     * @param mode whether to retrieve the nodes recursively or not
     * @param filter filtering conditions to be applied on the result
     *               list of nodes.
     * @return future that will be completed either with a value node
     * or a recursive data structure containing the subtree;
     * will be completed with {@code null} if
     * after applying the filter, the result is an empty list of nodes.
     * Future will be completed with a {@code FailedException} if path
     * does not point to a valid node.
     */
    CompletableFuture<ConfigNode> getNode(ConfigStoreType store,
                                          ConfigNodePath path, TraversalMode mode,
                                          ConfigFilter filter);

    /**
     * Returns the number of children under the given path, excluding
     * the node at the path.
     *
     * @param store type of store which the application wants to access.
     * @param path  data structure with absolute path to the parent and
     *              relative path to the node
     * @param filter how the value nodes should be filtered
     * @return future that will be completed with {@code Integer}, the
     * count of the children
     * after applying the filtering conditions as well.
     * Future will be completed with a {@code FailedException} if path
     * does not point to a valid node
     */
    CompletableFuture<Integer> getNumberOfChildren(ConfigStoreType store,
                                                   ConfigNodePath path, ConfigFilter filter);

    //TODO
    /**
     * Filter
     * What should be the filtering conditions?
     * a list of keys? node attribute/s? level1 children?
     * Merge Trees
     * add sub tree
     * delete subtree
     * update sub tree
     * get sub tree
     * How to handle big subtrees?
     * how many levels? how many results to limit?
     */

    /**
     * Registers a listener to be notified when the subtree rooted at
     * the specified path
     * is modified.
     *
     * @param store type of store which the application wants to access.
     * @param path  data structure with absolute path to the parent and
     *              relative path to the node
     * @param listener listener to be notified
     * @return a future that is completed when the operation completes
     */
    CompletableFuture<Void> addConfigListener(ConfigStoreType store,
                                              ConfigNodePath path,
                                              ElasticConfigListener listener);

    /**
     * Unregisters a previously added listener.
     *
     * @param listener listener to unregister
     * @return a future that is completed when the operation completes
     */
    CompletableFuture<Void> removeConfigListener(ElasticConfigListener listener);
}


text:
*First compiled: November 11, 2017.*
See the [notebook](SPRING_export.ipynb).

### Exporting AnnData objects to SPRING

In contrast to Scanpy's builtin visualization tools, the graph drawing tool SPRING of
[Weinreb *et al.* (2017)](https://doi.org/10.1101/090332) allows an
*interactive* exploration of the data.


text:
package dk.ilios.spanner.runner;

import android.test.suitebuilder.TestMethod;

import java.lang.annotation.Annotation;

import static dk.ilios.spanner.runner.Predicates.or;

/**
 * A predicate that checks to see if a {@link TestMethod} has a specific annotation, either on the
 * method or on the containing class.
 *
 */
public class HasAnnotation implements Predicate<TestMethod> {

    private Predicate<TestMethod> hasMethodOrClassAnnotation;

    public HasAnnotation(Class<? extends Annotation> annotationClass) {
        this.hasMethodOrClassAnnotation = or(
                new HasMethodAnnotation(annotationClass),
                new HasClassAnnotation(annotationClass));
    }

    public boolean apply(TestMethod testMethod) {
        return hasMethodOrClassAnnotation.apply(testMethod);
    }
}


text:
# Setup

## Table of Contents

1. [Pre-Installation Steps](#pre-installation-steps)
2. [Installation Steps](#installation-steps)
3. [Optional Post-Installation Steps](#optional-post-installation-steps)
4. [Using gopass](#using-gopass)

## Pre-Installation Steps

### Download and Install Dependencies

gopass needs some external programs to work:

* `gpg` - [GnuPG](https://www.gnupg.org/), preferably in Version 2 or later
* `git` - [Git SCM](https://git-scm.com/), any Version should be OK

It is recommended to have either `rng-tools` or `haveged` installed to speed up
key generation if these are available for your platform.

#### Ubuntu & Debian

```bash
apt-get install gnupg2 git rng-tools
```

_Note:_ installing on Ubuntu prior to 16.04 and similarly old Debian versions might require you to install `gnupg` instead of `gnupg2`.

#### RHEL & CentOS

```bash
yum install gnupg2 git rng-tools
```

#### Arch Linux

```bash
pacman -S gnupg2 git rng-tools
```

#### MacOS

If you haven't already, install [homebrew](http://brew.sh). And then:

```bash
brew install gnupg2 git
```

#### Windows

* Download and install [GPG4Win](https://www.gpg4win.org/).
* Download and install [the Windows git installer](https://git-scm.com/download/win).

Alternatively, it can be installed via [chocolatey](https://chocolatey.org/packages/gopass)

* `choco install gopass` (requires admin privileges)

#### OpenBSD

For OpenBSD -current:
```
pkg_add gopass
```

For OpenBSD 6.2 and earlier, install via `go get`.

Please note that the OpenBSD builds uses `pledge(2)` to disable some syscalls,
so some features (e.g. version checks, auto-update) are unavailable.

### Set up a GPG key pair

gopass depends on the `gpg` program for encryption and decryption. You **must** have a
suitable key pair. To list your current keys, you can do:

```bash
gpg --list-secret-keys
```

If there is no output, then you don't have any keys. To create a new key:

```bash
gpg --full-generate-key
```

You will be presented with several options:

* Key type: Choose either "RSA and RSA" or "DSA and ElGamal".
* Key size: Choose at least 2048.
* Validity: 5 to 10 years is a good default.
* Enter your real name and primary email address.
* A comment is not necessary.
* Pass phrase: Make sure to pick a very long pass phrase, not just a simple password. Remember this should be stronger than any of the secrets you store in the password store. You can configure the GPG Agent later to save you repetitive typing.

Now, you have created a public and private key pair. If you don't know what that means, or if you are not familiar with GPG, we highly recommend you do a little reading on the subject. Check out the following manuals:

* ["git + gpg, know thy commits" at coderwall](https://coderwall.com/p/d3uo3w/git-gpg-know-thy-commits)
* ["Generating a new GPG key" by GitHub](https://help.github.com/articles/generating-a-new-gpg-key/)

### Git and GPG

gopass will configure git to sign commits by default, so you should make sure that git can
interface with GPG.

```bash
mkdir some-dir
cd some-dir
git init
touch foo
git add foo
git commit -S -m "test"
```
Here the `-S` flag will sign your commit using GPG, allowing you to test your GPG setup with git.
If the last step fails please investigate this before continuing.

Also if you have both `gnupg` and `gnupg2` installed, make sure to use the latter in git:
```bash
git config --global gpg.program gpg2
```

## Installation Steps

Depending on your operating system, you can either use a package manager, download a pre-built binary, or install from source. If you have a working Go development environment, we recommend building from source.

### MacOS

If you haven't already, install [homebrew](http://brew.sh). And then:

```bash
brew install gopass
```

Alternatively, you can install gopass from the appropriate Darwin release from the repository [releases page](https://github.com/gopasspw/gopass/releases).

If you're using a password on your GPG key, you also have to install `pinentry-mac` from brew and configure it in your `~/gpg/gpg-agent.conf`:

```bash
brew install pinentry-mac
echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
```

### Ubuntu & Debian

**WARNING**: The official Debian repositories contain a package named `gopass` that
is not related to this project in any way. It's a similar tool with a completely
independent implementation and feature set. We are aware of this issue but can not
do anything about it.

When installing on Ubuntu or Debian you can either download the `deb` package and install manually or use our repository.

#### Manual download

First, find the latest .deb release from the repository [releases page](https://github.com/gopasspw/gopass/releases). Then, download and install it:

```bash
wget [the URL of the latest .deb release]
sudo dpkg -i gopass-1.2.0-linux-amd64.deb
```

### Gentoo

There is an overlay that includes gopass. Run these commands to install gopass through `emerge`.

```bash
layman -a go-overlay
emerge -av gopass
```

### Fedora / Red Hat / CentOS

There is an unofficial RPM build maintained by a contributor.

```bash
# if you're using dnf (needs dnf-plugins-core)
dnf copr enable daftaupe/gopass
dnf install gopass
# of if you're using an older distribution (needs yum-plugin-copr)
yum copr enable daftaupe/gopass
yum install gopass
```

### Arch Linux
```bash
pacman -S gopass
```

### Windows

**WARNING**: Windows is not yet officially supported. We try to support it in the future. These are steps are only meant to help you setup gopass on Windows so you can provide us with feedback about the current state of our Windows support.

You can install `gopass` by [Chocolatey](https://chocolatey.org/):

```bash
choco install gopass
```

Or by [Scoop](https://scoop.sh/):

```bash
scoop install gopass
```

Alternatively, download and install a suitable Windows build from the repository [releases page](https://github.com/gopasspw/gopass/releases).

### Installing from Source

If you have [Go](https://golang.org/) already installed, you can use `go get` to automatically download the latest version:

```bash
GO111MODULE=on go get -u github.com/gopasspw/gopass
```

If `$GOPATH/bin` is in your `$PATH`, you can now run `gopass` from anywhere on your system.

## Optional Post-Installation Steps

### Securing Your Editor

Various editors may store temporary files outside of the secure working directory when editing secrets. We advise you to check and disable this behavior for your editor of choice.

For `vim` on Linux, the following setting may be helpful:

```
au BufNewFile,BufRead /dev/shm/gopass.* setlocal noswapfile nobackup noundofile
```

For MacOS consider this setting:

```
au BufNewFile,BufRead /private/**/gopass** setlocal noswapfile nobackup noundofile
```

### Migrating from pass to gopass

If you are migrating from pass to gopass, you can simply use your existing password store and everything should just work. Furthermore, it may be helpful to link the gopass binary so that you can use it as a drop-in replacement. For example, assuming `$HOME/bin/` exists and is present in your `$PATH`:

```bash
ln -s $GOPATH/bin/gopass $HOME/bin/pass
```

### Migrating to gopass from Other Password Stores

Before migrating to gopass, you may have been using other password managers (such as [KeePass](https://keepass.info/), for example). If you were, you might want to import all of your existing passwords over. Because gopass is fully backwards compatible with pass, you can use any of the existing migration tools found under the "Migrating to pass" section of the [official pass website](https://www.passwordstore.org/).

### Enable Bash Auto completion

If you use Bash, you can run one of the following commands to enable auto completion for sub-commands like `gopass show`, `gopass ls` and others.

```bash
source <(gopass completion bash)
```

**MacOS**: The version of bash shipped with MacOS may [require a workaround](https://stackoverflow.com/questions/32596123/why-source-command-doesnt-work-with-process-substitution-in-bash-3-2) to enable auto completion. If the instructions above do not work try the following one:

```bash
source /dev/stdin <<<"$(gopass completion bash)"
```

### Enable  Z Shell Auto completion

If you use zsh, `make install` or `make install-completion` should install the completion in the correct location.

If zsh autocompletion is still not functional, or if you want to install it manually, you can run the following commands:

```bash
$ gopass completion zsh > ~/_gopass
$ sudo mv ~/_gopass /usr/share/zsh/site-functions/_gopass
$ rm -i ${ZDOTDIR:-${HOME:?No ZDOTDIR or HOME}}/.zcompdump && compinit

```
Then exit and re-run zsh if the last command failed.

Notice that it is important to directly redirect Gopass' output to a file,
using pipes or echo mess up the output. Also notice that the generated `_gopass` file is
a completion file that is supposed to be handled by zsh and to be installed in the zsh
completions directory, as defined by either the standard `/usr/share/zsh/site-functions/` path,
or by a user-specified `fpath` folder. It is not meant to used with `source`.

If zsh completion is still not working, you might want to add the following to your `.zshrc` file:
```bash
autoload -U compinit && compinit
```
if you don't have it already.

### Enable fish completion

If you use the [fish](https://fishshell.com/) shell, you can enable experimental shell completion by the following command:
```fish
$ mkdir -p ~/.config/fish/completions and; gopass completion fish > ~/.config/fish/completions/gopass.fish
```
and start a new shell afterwards.

Since writing fish completion scripts is not yet supported by the CLI library we use, this completion script is missing a few features. Feel free to contribute if you want to improve it.

### dmenu / rofi support

In earlier versions gopass supported [dmenu](http://tools.suckless.org/dmenu/). We removed this and encourage you to call dmenu yourself now.

This also makes it easier to call gopass with any drop-in replacement of dmenu, like [rofi](https://github.com/DaveDavenport/rofi), for example, since you would just need to replace the `dmenu` call below by `rofi -dmenu`.

```bash
# Simply copy the selected password to the clipboard
gopass ls --flat | dmenu | xargs --no-run-if-empty gopass show -c
# First pipe the selected name to gopass, decrypt it and type the password with xdotool.
gopass ls --flat | dmenu | xargs --no-run-if-empty gopass show -o | xdotool type --clearmodifiers --file -
# First pipe the selected name to gopass, and type the value from the key "username" with xdotool.
gopass ls --flat | dmenu | xargs --no-run-if-empty -- bash -c 'gopass show -f $0 username' | head -n 1 | xdotool type --clearmodifiers --file -
# Oterwise type the name of the entry using xdotool, in case you are not including a username key in your entries
gopass ls --flat | dmenu | sed 's!.*/!!' | tr -d '\n' | xdotool type --clearmodifiers --file -
```

You can then bind these command lines to your preferred shortcuts in your window manager settings, typically under `System Settings > Keyboard > Shortcuts > Custom Shortcuts`. In some cases you may need to wrap it with `bash -c 'your command'` in order for it to work (tested and working in Ubuntu 18.04).

### Filling in passwords from browser

Gopass allows filling in passwords in browsers leveraging a browser plugin like [gopass bridge](https://github.com/gopasspw/gopassbridge).
The browser plugin communicates with gopass-jsonapi via JSON messages.
To allow the plugin to start gopass-jsonapi, a [native messaging manifest](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_messaging) must be installed for each browser.
Chrome, Chromium and Firefox are supported, currently.

**Upgrade to gopass v1.10 / v1.11**:
`gopass-jsonapi` is now its own binary file, which you need to install separately.

The binary for v1.10 and v1.11 can be downloaded and unpacked from
[archive files on Github Releases](https://github.com/gopasspw/gopass/releases/tag/v1.11.0).

You need to run `gopass-jsonapi configure` after the upgrade to configure your browser for the new command.

**Upgrade to gopass v1.12**
The new binary can be downloaded from the latest
[Github Release on gopass-jsonapi](https://github.com/gopasspw/gopass-jsonapi/releases).

For more detailed instructions, please read: [gopass-jsonapi/README](https://github.com/gopasspw/gopass-jsonapi/blob/main/README.md).

### Storing and Syncing your Password Store with Google Drive / Dropbox / etc.

The recommended way to use Gopass is to sync your store with a git repository, preferably a private one, since the name and path of your secrets might reveal information that you'd prefer to keep private.
However, shall you prefer to, you might also use the `noop` storage backend that is meant to store data on a cloud provider instead of a git server.

Please be warned that using cloud-based storage may negatively impact the confidentiality of your store. However, if you wish to use one of these services, you can do so.

For example, to use gopass with [Google Drive](https://drive.google.com):

```bash
gopass init --rcs noop
mv .password-store/ "Google Drive/Password-Store"
gopass config path "~/Google Drive/Password-Store"
```

### Download a GUI

Because gopass is fully backwards compatible with pass, you can use some existing graphical user interfaces / frontends:

* Android - [PwdStore](https://github.com/zeapo/Android-Password-Store)
* iOS - [Pass for iOS](https://github.com/davidjb/pass-ios#readme)
* Windows / MacOS / Linux -  [QtPass](https://qtpass.org/)

There is also [Gopass UI](https://github.com/codecentric/gopass-ui) which was exclusively implemented for gopass and is available for MacOS, Linux and Windows.

Others can be found at the "Compatible Clients" section of the [official pass website](https://www.passwordstore.org/).

## Using gopass

Once you have installed gopass, check out the [features documentation](https://github.com/gopasspw/gopass/blob/master/docs/features.md) for some quick usage examples.

### Using the onboarding wizard

Running `gopass` with no existing store will start the onboarding wizard which
will guide you through the setup of gopass.

### Batch bootstrapping

In order to simplify the setup of gopass for your team members it can be run in a fully scripted bootstrap mode.

```bash
# First initialize a new shared store and push it to an empty remote
gopass --yes setup --remote github.com/example/pass.git --alias example --create --name "John Doe" --email "john.doe@example.com"

# For every other team member initialize a new store and clone the existing remote
gopass --yes setup --remote github.com/example/pass.git --alias example --name "Jane Doe" --email "jane.doe@example.com"
```


text:
"use strict";

var SouthernOceanLocationSamplingView = Backbone.View.extend({

  initialize: function() {
    _.bindAll(this, "render");
    var self = this;
    self.render();
  },
  template: JST['ooiui/static/js/partials/SouthernOceanLocationSampling.html'],
  render: function() {
    this.$el.html(this.template());
  }
});


text:
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import * as React from 'react';
import { isFragment } from 'react-is';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
export const styles = {
  /* Styles applied to the root element. */
  root: {},

  /* Styles applied to the root element if `orientation="horizontal"`. */
  horizontal: {
    paddingLeft: 8,
    paddingRight: 8
  },

  /* Styles applied to the root element if `orientation="vertical"`. */
  vertical: {},

  /* Styles applied to the root element if `alternativeLabel={true}`. */
  alternativeLabel: {
    flex: 1,
    position: 'relative'
  },

  /* Pseudo-class applied to the root element if `completed={true}`. */
  completed: {}
};
const Step = /*#__PURE__*/React.forwardRef(function Step(props, ref) {
  const {
    active = false,
    // eslint-disable-next-line react/prop-types
    alternativeLabel,
    children,
    classes,
    className,
    completed = false,
    // eslint-disable-next-line react/prop-types
    connector: connectorProp,
    disabled = false,
    expanded = false,
    // eslint-disable-next-line react/prop-types
    index,
    // eslint-disable-next-line react/prop-types
    last,
    // eslint-disable-next-line react/prop-types
    orientation
  } = props,
        other = _objectWithoutPropertiesLoose(props, ["active", "alternativeLabel", "children", "classes", "className", "completed", "connector", "disabled", "expanded", "index", "last", "orientation"]);

  const connector = connectorProp ? /*#__PURE__*/React.cloneElement(connectorProp, {
    orientation,
    alternativeLabel,
    index,
    active,
    completed,
    disabled
  }) : null;
  const newChildren = /*#__PURE__*/React.createElement("div", _extends({
    className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, completed && classes.completed),
    ref: ref
  }, other), connector && alternativeLabel && index !== 0 ? connector : null, React.Children.map(children, child => {
    if (! /*#__PURE__*/React.isValidElement(child)) {
      return null;
    }

    if (process.env.NODE_ENV !== 'production') {
      if (isFragment(child)) {
        console.error(["Material-UI: The Step component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
      }
    }

    return /*#__PURE__*/React.cloneElement(child, _extends({
      active,
      alternativeLabel,
      completed,
      disabled,
      expanded,
      last,
      icon: index + 1,
      orientation
    }, child.props));
  }));

  if (connector && !alternativeLabel && index !== 0) {
    return /*#__PURE__*/React.createElement(React.Fragment, null, connector, newChildren);
  }

  return newChildren;
});
process.env.NODE_ENV !== "production" ? Step.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // |     To update them edit the d.ts file and run "yarn proptypes"     |
  // ----------------------------------------------------------------------

  /**
   * Sets the step as active. Is passed to child components.
   */
  active: PropTypes.bool,

  /**
   * Should be `Step` sub-components such as `StepLabel`, `StepContent`.
   */
  children: PropTypes.node,

  /**
   * Override or extend the styles applied to the component.
   * See [CSS API](#css) below for more details.
   */
  classes: PropTypes.object,

  /**
   * @ignore
   */
  className: PropTypes.string,

  /**
   * Mark the step as completed. Is passed to child components.
   */
  completed: PropTypes.bool,

  /**
   * Mark the step as disabled, will also disable the button if
   * `StepButton` is a child of `Step`. Is passed to child components.
   */
  disabled: PropTypes.bool,

  /**
   * Expand the step.
   */
  expanded: PropTypes.bool
} : void 0;
export default withStyles(styles, {
  name: 'MuiStep'
})(Step);


text:
<?php

namespace Mary\WebBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\OneToOne;
use Doctrine\ORM\Mapping\OneToMany;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * @ORM\Entity(repositoryClass="AuthorRepository")
 * @ORM\Table(name="author")
 */
class Author
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="string")
     */
    protected $name;

    /**
     * @ORM\Column(type="string")
     */
    protected $birth;

    /**
     * @OneToMany(targetEntity="Book", mappedBy="author", orphanRemoval=true)
     */
    private $books;

    /**
     * @OneToMany(targetEntity="Category", mappedBy="author")
     */
    private $categories;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Author
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set birth
     *
     * @param string $birth
     * @return Author
     */
    public function setBirth($birth)
    {
        $this->birth = $birth;

        return $this;
    }

    /**
     * Get birth
     *
     * @return string
     */
    public function getBirth()
    {
        return $this->birth;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->books = new \Doctrine\Common\Collections\ArrayCollection();
        $this->categories = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add books
     *
     * @param \Mary\WebBundle\Entity\Book $books
     * @return Author
     */
    public function addBook(\Mary\WebBundle\Entity\Book $books)
    {
        $this->books[] = $books;

        return $this;
    }

    /**
     * Remove books
     *
     * @param \Mary\WebBundle\Entity\Book $books
     */
    public function removeBook(\Mary\WebBundle\Entity\Book $books)
    {
        $this->books->removeElement($books);
    }

    /**
     * Get books
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getBooks()
    {
        return $this->books;
    }

    /**
     * Add categories
     *
     * @param \Mary\WebBundle\Entity\Category $categories
     * @return Author
     */
    public function addCategory(\Mary\WebBundle\Entity\Category $categories)
    {
        $this->categories[] = $categories;

        return $this;
    }

    /**
     * Remove categories
     *
     * @param \Mary\WebBundle\Entity\Category $categories
     */
    public function removeCategory(\Mary\WebBundle\Entity\Category $categories)
    {
        $this->categories->removeElement($categories);
    }

    /**
     * Get categories
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCategories()
    {
        return $this->categories;
    }
}


text:
package com.clover_studio.spikachatmodule.utils;

import android.graphics.Bitmap;
import android.os.Build;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.ProgressBar;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;

import java.io.File;

/**
 * Created by ubuntu_ivo on 08.02.16..
 */
public class UtilsImage {

    public static void setImageWithLoader(final ImageView imageView, final int defaultResource, final ProgressBar pbLoading, String url){
        if(!TextUtils.isEmpty(url)){
            ImageLoader.getInstance().displayImage(url, imageView, new ImageLoadingListener() {
                @Override
                public void onLoadingStarted(String imageUri, View view) {

                }

                @Override
                public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
                    if (pbLoading != null) pbLoading.setVisibility(View.GONE);
                    if (defaultResource != -1) imageView.setImageResource(defaultResource);
                }

                @Override
                public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                    if (pbLoading != null) pbLoading.setVisibility(View.GONE);
                }

                @Override
                public void onLoadingCancelled(String imageUri, View view) {
                    if (pbLoading != null) pbLoading.setVisibility(View.GONE);
                    if (defaultResource != -1) imageView.setImageResource(defaultResource);
                }
            });
        }else{
            if(pbLoading != null) pbLoading.setVisibility(View.GONE);
            if(defaultResource != -1) imageView.setImageResource(defaultResource);
        }
    }

    public static void setImageWithFileLoaderAndCallback(final ImageView imageView, final int defaultResource, final ProgressBar pbLoading, final File file, final ImageCallback callback){
        if(file != null){

            ImageLoader.getInstance().displayImage("file://" + file.getAbsolutePath(), imageView, new ImageLoadingListener() {
                @Override
                public void onLoadingStarted(String imageUri, View view) {

                }

                @Override
                public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
                    callback.onError();
                }

                @Override
                public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                    callback.onSuccess();
                }

                @Override
                public void onLoadingCancelled(String imageUri, View view) {
                    callback.onError();
                }
            });

        }else{
            if(pbLoading != null) pbLoading.setVisibility(View.GONE);
            if(defaultResource != -1) imageView.setImageResource(defaultResource);
        }
    }

    public static void setImageWithLoaderAndCallback(final ImageView imageView, final int defaultResource, final ProgressBar pbLoading, String url, final ImageCallback callback){
        if(!TextUtils.isEmpty(url)){

            ImageLoader.getInstance().displayImage(url, imageView, new ImageLoadingListener() {
                @Override
                public void onLoadingStarted(String imageUri, View view) {

                }

                @Override
                public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
                    callback.onError();
                }

                @Override
                public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
                    callback.onSuccess();
                }

                @Override
                public void onLoadingCancelled(String imageUri, View view) {
                    callback.onError();
                }
            });

        }else{
            if(pbLoading != null) pbLoading.setVisibility(View.GONE);
            if(defaultResource != -1) imageView.setImageResource(defaultResource);
        }
    }

    public interface ImageCallback{
        void onSuccess();
        void onError();
    }

}


text:
package fi.jumi.actors.generator.ast;

import javax.tools.SimpleJavaFileObject;
import java.net.URI;

public class JavaSourceFromString extends SimpleJavaFileObject {

    private final String code;

    public JavaSourceFromString(String name, String code) {
        super(URI.create("string:///" + name.replace('.', '/') + Kind.SOURCE.extension), Kind.SOURCE);
        this.code = code;
    }

    @Override
    public CharSequence getCharContent(boolean ignoreEncodingErrors) {
        return code;
    }
}


text:
## Peer
**Kind**: global class

* [Peer](#Peer)
  * [new Peer(options)](#new_Peer_new)
  * [.setProxy(host, port)](#Peer+setProxy) ⇒ [Peer](#Peer)
  * [.connect()](#Peer+connect) ⇒ [Peer](#Peer)
  * [.disconnect()](#Peer+disconnect) ⇒ [Peer](#Peer)
  * [.sendMessage(message)](#Peer+sendMessage)
  * [._sendVersion()](#Peer+_sendVersion)
  * [._sendPong()](#Peer+_sendPong)
  * [._readMessage()](#Peer+_readMessage)
  * [._getSocket()](#Peer+_getSocket) ⇒ Socket

### new Peer(options)
The Peer constructor will create an instance of Peer to send and receive messages
using the standard Bitcoin protocol. A Peer instance represents one connection
on the Bitcoin network. To create a new peer connection provide the host and port
options and then invoke the connect method. Additionally, a newly connected socket
can be provided instead of host and port.

**Returns**: [Peer](#Peer) - A new instance of Peer.

| Param | Type | Description |
| --- | --- | --- |
| options | Object |  |
| options.host | String | IP address of the remote host |
| options.port | Number | Port number of the remote host |
| options.network | Network | The network configuration |
| [options.relay] | Boolean | An option to disable automatic inventory relaying from the remote peer |
| [options.socket] | Socket | An existing connected socket |

**Example**
```javascript

var peer = new Peer({host: '127.0.0.1'}).setProxy('127.0.0.1', 9050);
peer.on('tx', function(tx) {
 console.log('New transaction: ', tx.id);
});
peer.connect();
```

### peer.setProxy(host, port) ⇒ [Peer](#Peer)
Set a socks5 proxy for the connection. Enables the use of the TOR network.

**Kind**: instance method of [Peer](#Peer)
**Returns**: [Peer](#Peer) - The same Peer instance.

| Param | Type | Description |
| --- | --- | --- |
| host | String | IP address of the proxy |
| port | Number | Port number of the proxy |

### peer.connect() ⇒ [Peer](#Peer)
Init the connection with the remote peer.

**Kind**: instance method of [Peer](#Peer)
**Returns**: [Peer](#Peer) - The same peer instance.

### peer.disconnect() ⇒ [Peer](#Peer)
Disconnects the remote connection.

**Kind**: instance method of [Peer](#Peer)
**Returns**: [Peer](#Peer) - The same peer instance.

### peer.sendMessage(message)
Send a Message to the remote peer.

**Kind**: instance method of [Peer](#Peer)

| Param | Type | Description |
| --- | --- | --- |
| message | Message | A message instance |

### peer._sendVersion()
Internal function that sends VERSION message to the remote peer.

**Kind**: instance method of [Peer](#Peer)

### peer._sendPong()
Send a PONG message to the remote peer.

**Kind**: instance method of [Peer](#Peer)

### peer._readMessage()
Internal function that tries to read a message from the data buffer

**Kind**: instance method of [Peer](#Peer)

### peer._getSocket() ⇒ Socket
Internal function that creates a socket using a proxy if necessary.

**Kind**: instance method of [Peer](#Peer)
**Returns**: Socket - A Socket instance not yet connected.


text:
import { EventEmitter } from 'events';
import ShoppingCartDispatcher from '../dispatcher/ShoppingCartDispatcher';
import ShoppingCartConstants from '../constants/ShoppingCartConstants';

const productData = [
  {
    id: 0,
    product: 'Product 1',
    details:
      'Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Lorem ipsum dolor sit amet.',
    image: 'http://placehold.it/100x100',
    quantity: 1,
    price: 5
  },
  {
    id: 1,
    product: 'Product 2',
    details:
      'Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Lorem ipsum dolor sit amet.',
    image: 'http://placehold.it/100x100',
    quantity: 1,
    price: 10
  },
  {
    id: 2,
    product: 'Product 3',
    details:
      'Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Lorem ipsum dolor sit amet.',
    image: 'http://placehold.it/100x100',
    quantity: 1,
    price: 3
  }
];

const columnMapping = [
  {
    title: 'ID',
    key: 'id',
    display: false
  },
  {
    title: 'Product',
    key: 'product'
  },
  {
    title: 'Details',
    key: 'details',
    display: false
  },
  {
    title: 'Image',
    key: 'image',
    display: false
  },
  {
    title: 'Price',
    key: 'price'
  },
  {
    title: 'Quantity',
    key: 'quantity'
  }
];

class ShoppingCartStore extends EventEmitter {
  constructor() {
    super();
    this.dispatchToken = ShoppingCartDispatcher.register(this.dispatcherCallback.bind(this));
  }

  emitChange() {
    this.emit('change');
  }

  addChangeListener(listener) {
    this.on('change', listener);
  }

  getProducts() {
    return productData;
  }

  getColumns() {
    return columnMapping;
  }

  quantityChanged(index, value) {
    productData[index].quantity = Number(value);
    this.emitChange();
  }

  productRemoved(index) {
    productData.splice(index, 1);
    this.emitChange();
  }

  dispatcherCallback(action) {
    switch (action.actionType) {
      case ShoppingCartConstants.SHOPPING_CART_PRODUCT_QUANTITY_CHANGED: {
        this.quantityChanged(action.index, action.newValue);
        break;
      }
      case ShoppingCartConstants.SHOPPING_CART_PRODUCT_REMOVED: {
        this.productRemoved(action.index);
        break;
      }
    }
  }
}

export default new ShoppingCartStore();


text:
import sys

from lib.modules import BaseCommands
from lib.tools.argparser import args
from lib.connector import automationSDKConnect
from lib.exceptions import VmCLIException

try:
    from com.vmware.cis.tagging_client import Tag, TagAssociation
    from com.vmware.vapi.std_client import DynamicID
    HAS_AUTOMAT_SDK_INSTALLED = True
except ImportError:
    HAS_AUTOMAT_SDK_INSTALLED = False

class TagCommands(BaseCommands):
    """Allows managing Tags fetaure in Vcenter 6+ versions."""

    def __init__(self, *args, **kwargs):
        super(TagCommands, self).__init__(*args, **kwargs)

    def execute(self, args):
        if not HAS_AUTOMAT_SDK_INSTALLED:
            raise VmCLIException('Required vsphere-automation-sdk-python not installed. Exiting...')
            sys.exit(1)

        stub_config = automationSDKConnect(args.vcenter, args.username, args.password, args.insecure)

        if args.name:
            self.associate_tag(stub_config, args.name, args.tags)
        else:
            self.print_tags(stub_config)

    def print_tags(self, stub_config):
        """Prints available tags for user."""
        tag_svc = Tag(stub_config)
        for t in tag_svc.list():
            tag = tag_svc.get(t)
            print(tag.name)

    @args('--tags', help='Tag names to associate with VM e.g. tag1,tag2')
    @args('--name', help='name of VM to associate tags to')
    def associate_tag(self, stub_config, name, tags):
        """Associates tags with specific VM."""
        if not name or not tags:
            raise VmCLIException('Arguments name or tags are missing, cannot continue!')

        vm = self.get_vm_obj(name, fail_missing=True)
        # Get vmware ID representation in form 'vm-XXX' for later association
        vm_id = vm._GetMoId()
        vm_dynid = DynamicID(type='VirtualMachine', id=vm_id)
        # Create API services for Tag and TagAssociation backends
        tag_svc = Tag(stub_config)
        tag_asoc = TagAssociation(stub_config)
        # Search for tag object(s)
        tags_found = []
        if ',' in tags:
            tags = tags.split(',')
        else:
            tags = [tags]

        for t in tag_svc.list():
            tag = tag_svc.get(t)
            if tag.name in tags:
                tags_found.append(tag)

        if len(tags_found) != len(tags):
            raise VmCLIException('One or more tags were not found')

        # Asosociate tags with VM
        for tag in tags_found:
            tag_asoc.attach(tag_id=tag.id, object_id=vm_dynid)
        self.logger.info('All tags have been attached to the VM')

BaseCommands.register('tag', TagCommands)


text:
export class ListDetailsFilters {

  public static DEFAULT: ListDetailsFilters = new ListDetailsFilters(false, false);

  constructor(public hideCompleted: boolean, public hideUsed: boolean) {
  }
}


text:
<?php namespace Sections\LocalManagers;

class Suppliers extends LocalManagersSection {

    public function __construct(){
        parent::__construct();
        $this -> breadcrumbs -> addCrumb('suppliers', 'Suppliers');
    }

    public function getIndex()
    {
        $suppliers = \Model\Suppliers::where('unit_id', '=', $this -> auth_user -> unit() -> id) -> get();
        $breadcrumbs = $this -> breadcrumbs -> addLast( $this -> setAction('list') );
        return \View::make($this->regView('index'), compact('suppliers','breadcrumbs'));
    }

    public function getCreate()
    {
        $breadcrumbs = $this -> breadcrumbs -> addLast( $this -> setAction('create') );
        return \View::make($this->regView('create'), compact('breadcrumbs'));
    }

    public function getImport()
    {
        $breadcrumbs = $this -> breadcrumbs -> addLast( $this -> setAction('import') );
        return \View::make($this->regView('import'), compact('breadcrumbs'));
    }

    public function postImport()
    {
        $file = \Input::file('import');
        $model = new \Model\Suppliers();
        $rules = $model->import['rules'];
        $columns = [$model->getTable() => $model->import['columns']];
        $import = \Services\FilesImport::import($rules, $columns, $file);
        if(isset($import['errors'])){
            return \Redirect::back()->withErrors($import['errors']);
        }
        else{
            return \Redirect::back()->with('success', \Lang::get('/common/messages.import_success'));
        }
    }

    public function postCreate()
    {
        $new = new \Model\Suppliers();
        $rules = $new -> rules;
        $input = \Input::all();
        $validator = \Validator::make($input, $rules);
        if($input['warning_min'] > $input['valid_min']){
            $validator->getMessageBag()->add('warning_min', 'Danger min is greater then Warning min');
            $validator->getMessageBag()->add('valid_min', 'Warning max is less then Danger min');
        }
        if($input['warning_max'] < $input['valid_max']){
            $validator->getMessageBag()->add('warning_max', 'Danger max is less then Warning max');
            $validator->getMessageBag()->add('valid_max', 'Warning max is greater then Danger max');
        }
        if(!$validator -> errors() -> count()) {
            $products = serialize($this->getProductList(\Input::get('products')));
            $new -> fill($input);
            $new -> unit_id = \Auth::user() -> unit() -> id;
            $new -> products = $products;
            $save= $new -> save();
            $type = $save ? 'success' : 'fail';
            $msg  = $save ? \Lang::get('/common/messages.create_success') : \Lang::get('/common/messages.update_fail');
            return \Redirect::to('/suppliers')->with($type, $msg);
        }
        else{
            return \Redirect::back()->withInput()->withErrors($validator);
        }
    }

    public function getDatatable()
    {
        if(!\Request::ajax())
            return $this -> redirectIfNotExist();
        $suppliers = \Model\Suppliers::where('unit_id', '=',  $this -> auth_user -> unit() -> id) -> get();
        $suppliers = ($filter = \Input::get('datatable')) ? \Mapic::datatableFilter($filter, $suppliers) : $suppliers -> take(100);
        $options = [];
        if (count($suppliers)){
            foreach ($suppliers as $row)
            {
                $options[] = [
                    $row->name,
                    $row->name,
                    $row->city,
                    \HTML::mdOwnOuterBuilder(\HTML::mdOwnButton($row->id, 'suppliers','details','search', 'md-btn-small md-btn-action')),
                    \HTML::mdOwnOuterBuilder(\HTML::mdOwnButton($row->id, 'suppliers','edit/logo','image', 'md-btn-small md-btn-action')),
                    \HTML::mdOwnOuterBuilder(
                        \HTML::mdActionButton($row->id, 'suppliers','edit/general', 'edit', 'Edit').' '.
                        \HTML::mdActionButton($row->id, 'suppliers','delete', 'delete', 'Delete')
                    )
                ];
            }
            if($options)
                return \Response::json(['aaData' => $options]);
            else
                return \Response::json(['aaData' => []]);
        }
        return \Response::json(['aaData' => []]);
    }

    public function getIncidents($id)
    {
        $supplier = \Model\Suppliers::find($id);
        if(!$supplier || !$supplier -> checkAccess())
            return $this -> redirectIfNotExist();

        $this -> breadcrumbs -> addCrumb('/suppliers/details/'.$supplier -> id, $supplier -> name, null);
        $breadcrumbs = $this -> breadcrumbs -> addLast( $this -> setAction('incidents') );
        return \View::make($this->regView('incidents'), compact('supplier', 'incidents', 'breadcrumbs'));
    }

    public function getDetails($id)
    {
        $supplier = \Model\Suppliers::find($id);
        if(!$supplier || !$supplier -> checkAccess())
            return $this -> redirectIfNotExist();

        $this -> breadcrumbs -> addCrumb('/suppliers/details/'.$supplier -> id, $supplier -> name, null);
        $breadcrumbs = $this -> breadcrumbs -> addLast( $this -> setAction('details') );
        return \View::make($this->regView('details'), compact('supplier', 'breadcrumbs'));
    }

    public function getEditGeneral($id)
    {
        $supplier = \Model\Suppliers::find($id);
        if(!$supplier || !$supplier -> checkAccess())
            return $this -> redirectIfNotExist();

        $this -> breadcrumbs -> addCrumb('/suppliers/details/'.$supplier -> id, $supplier -> name, null);
        $breadcrumbs = $this -> breadcrumbs -> addLast( $this -> setAction('edit_general') );
        return \View::make($this->regView('edit_general'), compact('supplier', 'breadcrumbs'));
    }

    public function postEditGeneral($id)
    {
        $supplier = \Model\Suppliers::find($id);
        if(!$supplier || !$supplier -> checkAccess())
            return $this -> redirectIfNotExist();
        $rules = $supplier -> rules;
        $input = \Input::all();
        $validator = \Validator::make($input, $rules);
        if($input['warning_min'] > $input['valid_min']){
            $validator->getMessageBag()->add('warning_min', 'Danger min is greater then Warning min');
            $validator->getMessageBag()->add('valid_min', 'Warning max is less then Danger min');
        }
        if($input['warning_max'] < $input['valid_max']){
            $validator->getMessageBag()->add('warning_max', 'Danger max is less then Warning max');
            $validator->getMessageBag()->add('valid_max', 'Warning max is greater then Danger max');
        }
        if(!$validator -> errors() -> count()) {
            $products = serialize($this->getProductList(\Input::get('products')));
            $supplier -> fill($input);
            $supplier -> products = $products;
            $update = $supplier -> update();
            $type = $update ? 'success' : 'fail';
            $msg  = $update ? \Lang::get('/common/messages.update_success') : \Lang::get('/common/messages.update_fail');
            return \Redirect::back()->with($type, $msg);
        }
        else{
            return \Redirect::back()->withInput()->withErrors($validator);
        }
    }

    public function getEditLogo($id)
    {
        $supplier = \Model\Suppliers::find($id);
        if(!$supplier || !$supplier -> checkAccess())
            return $this -> redirectIfNotExist();
        $this -> breadcrumbs -> addCrumb('/suppliers/details/'.$supplier -> id, $supplier -> name, null);
        $breadcrumbs = $this -> breadcrumbs -> addLast( $this -> setAction('edit_logo') );
        return \View::make($this->regView('edit_logo'), compact('supplier', 'breadcrumbs'));
    }

    public function postEditLogo($id)
    {
        if(!\Request::ajax())
            return $this -> redirectIfNotExist();
        $supplier = \Model\Suppliers::find($id);
        if(!$supplier || !$supplier -> checkAccess())
            return \Response::json(['type'=>'warning', 'msg'=>\Lang::get('common/messages.not_exist')]);
        $postData = \Input::get();
        $photo = new \Services\FilesUploader('suppliers');
        $path  = $photo -> getUploadPath($supplier->id);
        $logo  = $photo -> avatarUploader($postData,$path);
        \File::delete(public_path().$supplier -> logo);
        $supplier -> logo = $logo;
        $supplier -> update();
        return \Response::json(['url'=>$logo]);
    }

    public function getProductsAutocomplete($tag)
    {
        if(!\Request::ajax())
            return $this -> redirectIfNotExist();
        return \Response::json(\Model\ProductsList::select('name')->where('name','LIKE','%'.$tag.'%')->get()->toArray());
    }

    public function getProductList($input){

        $products = explode(',',$input);
        $prodArr = [];
        if(count($products)) {
            foreach ($products as $product) {
                $product = trim($product);
                $productList = \Model\ProductsList::whereName($product)->first();
                if ($productList)
                    $prodArr[] = $productList->id;
                else {
                    $productList = new \Model\ProductsList();
                    $productList->name = $product;
                    $productList->save();
                    $prodArr[] = $productList->id;
                }
            }
        }
        return $prodArr;
    }

    public function getDelete($id)
    {
        $supplier = \Model\Suppliers::find($id);
        if(!$supplier || !$supplier -> checkAccess())
            return $this -> redirectIfNotExist();
        $delete = $supplier -> delete();
        $type = $delete ? 'success' : 'fail';
        $msg  = $delete ? \Lang::get('/common/messages.delete_success') : \Lang::get('/common/messages.delete_fail');
        return \Redirect::to('/suppliers')->with($type, $msg);
    }
}


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

import java.math.*;

import javax.annotation.Generated;

import com.amazonaws.services.migrationhubstrategyrecommendations.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;

import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;

/**
 * ImportFileTaskInformation JSON Unmarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ImportFileTaskInformationJsonUnmarshaller implements Unmarshaller<ImportFileTaskInformation, JsonUnmarshallerContext> {

    public ImportFileTaskInformation unmarshall(JsonUnmarshallerContext context) throws Exception {
        ImportFileTaskInformation importFileTaskInformation = new ImportFileTaskInformation();

        int originalDepth = context.getCurrentDepth();
        String currentParentElement = context.getCurrentParentElement();
        int targetDepth = originalDepth + 1;

        JsonToken token = context.getCurrentToken();
        if (token == null)
            token = context.nextToken();
        if (token == VALUE_NULL) {
            return null;
        }

        while (true) {
            if (token == null)
                break;

            if (token == FIELD_NAME || token == START_OBJECT) {
                if (context.testExpression("completionTime", targetDepth)) {
                    context.nextToken();
                    importFileTaskInformation.setCompletionTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
                }
                if (context.testExpression("id", targetDepth)) {
                    context.nextToken();
                    importFileTaskInformation.setId(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("importName", targetDepth)) {
                    context.nextToken();
                    importFileTaskInformation.setImportName(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("inputS3Bucket", targetDepth)) {
                    context.nextToken();
                    importFileTaskInformation.setInputS3Bucket(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("inputS3Key", targetDepth)) {
                    context.nextToken();
                    importFileTaskInformation.setInputS3Key(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("numberOfRecordsFailed", targetDepth)) {
                    context.nextToken();
                    importFileTaskInformation.setNumberOfRecordsFailed(context.getUnmarshaller(Integer.class).unmarshall(context));
                }
                if (context.testExpression("numberOfRecordsSuccess", targetDepth)) {
                    context.nextToken();
                    importFileTaskInformation.setNumberOfRecordsSuccess(context.getUnmarshaller(Integer.class).unmarshall(context));
                }
                if (context.testExpression("startTime", targetDepth)) {
                    context.nextToken();
                    importFileTaskInformation.setStartTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
                }
                if (context.testExpression("status", targetDepth)) {
                    context.nextToken();
                    importFileTaskInformation.setStatus(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("statusReportS3Bucket", targetDepth)) {
                    context.nextToken();
                    importFileTaskInformation.setStatusReportS3Bucket(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("statusReportS3Key", targetDepth)) {
                    context.nextToken();
                    importFileTaskInformation.setStatusReportS3Key(context.getUnmarshaller(String.class).unmarshall(context));
                }
            } else if (token == END_ARRAY || token == END_OBJECT) {
                if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
                    if (context.getCurrentDepth() <= originalDepth)
                        break;
                }
            }
            token = context.nextToken();
        }

        return importFileTaskInformation;
    }

    private static ImportFileTaskInformationJsonUnmarshaller instance;

    public static ImportFileTaskInformationJsonUnmarshaller getInstance() {
        if (instance == null)
            instance = new ImportFileTaskInformationJsonUnmarshaller();
        return instance;
    }
}


text:
#ifndef _LIST_H
#define _LIST_H	1

/* The definitions of this file are adopted from those which can be
   found in the Linux kernel headers to enable people familiar with
   the latter find their way in these sources as well.  */

/* Basic type for the double-link list.  */
typedef struct list_head
{
  struct list_head *next;
  struct list_head *prev;
} list_t;

/* Define a variable with the head and tail of the list.  */
#define LIST_HEAD(name) \
  list_t name = { &(name), &(name) }

/* Initialize a new list head.  */
#define INIT_LIST_HEAD(ptr) \
  (ptr)->next = (ptr)->prev = (ptr)

/* Add new element at the head of the list.  */
static inline void
list_add (list_t *newp, list_t *head)
{
  head->next->prev = newp;
  newp->next = head->next;
  newp->prev = head;
  head->next = newp;
}

/* Add new element at the tail of the list.  */
static inline void
list_add_tail (list_t *newp, list_t *head)
{
  head->prev->next = newp;
  newp->next = head;
  newp->prev = head->prev;
  head->prev = newp;
}

/* Remove element from list.  */
static inline void
list_del (list_t *elem)
{
  elem->next->prev = elem->prev;
  elem->prev->next = elem->next;
}

/* Join two lists.  */
static inline void
list_splice (list_t *add, list_t *head)
{
  /* Do nothing if the list which gets added is empty.  */
  if (add != add->next)
    {
      add->next->prev = head;
      add->prev->next = head->next;
      head->next->prev = add->prev;
      head->next = add->next;
    }
}

/* Get typed element from list at a given position.  */
#define list_entry(ptr, type, member) \
  ((type *) ((char *) (ptr) - (unsigned long) (&((type *) 0)->member)))

/* Iterate forward over the elements of the list.  */
#define list_for_each(pos, head) \
  for (pos = (head)->next; pos != (head); pos = pos->next)

/* Iterate forward over the elements of the list.  */
#define list_for_each_prev(pos, head) \
  for (pos = (head)->prev; pos != (head); pos = pos->prev)

/* Iterate backwards over the elements list.  The list elements can be
   removed from the list while doing this.  */
#define list_for_each_prev_safe(pos, p, head) \
  for (pos = (head)->prev, p = pos->prev; \
       pos != (head); \
       pos = p, p = pos->prev)

#endif	/* list.h */


text:
var UserService = function($http, locationUtils, userModel, messageModel, ENV) {

    this.getCurrentUser = function() {
        return $http.get(ENV.api['root'] + "user/current").then(
            function(result) {
                userModel.setUser(result.data.response);
                return result.data.response;
            },
            function(err) {
                throw err;
            }
        );
    };

    this.resetPassword = function(email) {
        return $http.post(ENV.api['root'] + "user/reset_password", { email: email }).then(
            function(result) {
                messageModel.setMessages(result.data.alerts, false);
                return result;
            },
            function(err) {
                messageModel.setMessages(err.data.alerts, false);
                throw err;
            }
        );
    };

    this.getUsers = function(queryParams) {
        return $http.get(ENV.api['root'] + 'users', {params: queryParams}).then(
            function (result) {
                return result.data.response;
            },
            function (err) {
                console.error(err);
                throw err;
            }
        )
    };

    this.getUser = function(id) {
        return $http.get(ENV.api['root'] + 'users', {params: {id: id}}).then(
            function (result) {
                return result.data.response[0];
            },
            function (err) {
                console.error(err);
                throw err;
            }
        )
    };

    this.createUser = function(user) {
        return $http.post(ENV.api['root'] + 'users', user).then(
            function(result) {
                messageModel.setMessages([ { level: 'success', text: 'User created' } ], true);
                locationUtils.navigateToPath('/users');
                return result;
            },
            function(err) {
                messageModel.setMessages(err.data.alerts, false);
                throw err;
            }
        );
    };

    // todo: change to use query param when it is supported
    this.updateUser = function(user) {
        return $http.put(ENV.api['root'] + "users/" + user.id, user).then(
            function(result) {
                if (userModel.user.id === user.id) {
                    // if you are updating the currently logged in user...
                    userModel.setUser(user);
                }
                messageModel.setMessages(result.data.alerts, false);
                return result;
            },
            function(err) {
                messageModel.setMessages(err.data.alerts, false);
                throw err;
            }
        );
    };

    this.registerUser = function(registration) {
        return $http.post(ENV.api['root'] + "users/register", registration).then(
            function(result) {
                messageModel.setMessages(result.data.alerts, false);
                return result;
            },
            function(err) {
                messageModel.setMessages(err.data.alerts, false);
                throw err;
            }
        );
    };
};

UserService.$inject = ['$http', 'locationUtils', 'userModel', 'messageModel', 'ENV'];
module.exports = UserService;