text:
import {tap} from "../utils/obj";
import {Schedule} from "./schedule-model";
import {arrayOf, arrayWithSome} from "../model-helpers/model-helpers";
import {escapeRegex} from "../utils/string";
import {XmlEntities} from "html-entities";
import moment = require('moment');

var entities = new XmlEntities();

function encloseInEnml(body: string) {
  return `<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note style="margin:20px">${body}</en-note>`
}

const fullStops = [
  "᠃", "᠉", "⳹", "⳾", "⸼", "。", "꓿", "꘎", "꛳", "︒", "﹒", ".", "。", "𖫵",
  "𛲟", ".", "։", "۔", "܁", "܂", "።", "᙮", "\n", "?", "!", "¿", ";", "՞", "؟", "፧", "፨",
  "᥅", "⁇", "⁈", "⁉", "⳺", "⳻", "⸮", "꘏", "꛷", "︖", "﹖", "?", "𑅃", "¡", "՜", "߹", "᥄",
  "‼", "︕", "﹗", "!", "、"
];
const fullStopRegex = new RegExp(fullStops.map(escapeRegex).join("|") + "|\s\s\s+");
const allNotFullStopRegex = new RegExp("[^" + fullStopRegex.source + "]*");
const allNotFullStopTailRegex = new RegExp(allNotFullStopRegex.source + "$");
const allNotFullStopHeadRegex = new RegExp("^" + allNotFullStopRegex.source);
function atleastXUntilSentenceRegexTail(n: number) {
  return new RegExp("[^" + fullStopRegex.source + "]*.{0," + n + "}$", "g");
}

function atleastXUntilSentenceRegexHead(n: number) {
  return new RegExp("^.{0," + n + "}[^" + fullStopRegex.source + "]*");
}

export class Note {
  id = "";
  text = "";
  sourceURL = "";
  location = "";
  terms = arrayOf(Term);
  version = 0;

  findTermRegion(term: Term, text: string) {
    var fullMarker = term.original + "[" + term.marker + "]";
    var start = text.indexOf(fullMarker);
    if (start === -1) {
      if (term.marker.indexOf(term.original) === 0) {
        start = text.indexOf(term.marker);

        if (start == -1) return [-1, -1];
        return [start, start + term.marker.length]
      }
      return [-1, -1];
    }
    return [start, start + fullMarker.length];
  }

  findNextUniqueMarker(original: string) {
    var markers = {} as {[k: string]: boolean};
    this.terms.forEach(t => markers[t.marker] = true);

    for (var i = 1; ; ++i) {
      if (markers[i + ""]) continue;
      if (this.text.indexOf(original + "[" + i + "]") !== -1) continue;

      break;
    }

    return i + "";
  }

  toString() {
    var contentText = this.text
      .replace(/\r\n/g, "\n")
      .split("\n").map(l => l.trim()).join("\n")
      .replace(/\n\n/g, "\n");

    if (this.terms.length > 0) contentText += "\n\n";

    contentText += this.terms.map((t: Term) => {
      var lines = [] as string[];

      lines.push("[" + t.marker + "] " + t.original);
      if (t.hint) lines.push("? " + t.hint.replace(/\n/, " ").trim());

      t.clozes.forEach(cloze => {
        if (cloze.schedule) {
          lines.push(formatCloze(cloze));
        } else {
          lines.push("-- " + cloze.segment);
        }
      });

      t.details.split("\n").forEach(l => lines.push(l));

      return lines.filter(s => !!s.trim()).join("\n")
    }).join("\n\n");

    return contentText;
  }

  toEvernoteContent() {
    return encloseInEnml(entities.encode(this.toString())
        .replace(/\b/g, "")
        .replace(/\n/g, "
") + "
");
  }

  findTermRegionInReplaced(term: Term): [number, number, string] {
    var text = this.text;
    for (var i = 0; i < this.terms.length; ++i) {
      if (this.terms[i].marker === term.marker) continue;
      var [s, e] = this.findTermRegion(this.terms[i], text);
      text = text.slice(0, s) + this.terms[i].original + text.slice(e);
    }

    var [s, e] = this.findTermRegion(term, text);

    return [s, e, text];
  }

  termContext(term: Term, grabCharsMax = 60): [string, string, string] {
    var [termStart, termEnd, text] = this.findTermRegionInReplaced(term);
    var leftSide = text.slice(0, termStart);
    var partialLeftSide = leftSide.slice(-grabCharsMax);
    var unusedLeft = leftSide.slice(0, leftSide.length - partialLeftSide.length);
    leftSide = unusedLeft.match(allNotFullStopTailRegex)[0] + partialLeftSide;

    var rightSide = text.slice(termEnd);
    var unusedRight = rightSide.slice(grabCharsMax);
    rightSide = rightSide.slice(0, grabCharsMax) + unusedRight.match(allNotFullStopHeadRegex)[0];

    return [leftSide.replace(/^\s*/, ""), text.slice(termStart, termEnd),
      rightSide.replace(/\s*$/, "")];
  }

  clozeParts(term: Term, cloze: Cloze): [string, string, string] {
    var left = "";
    var idx = 0;
    for (var i = 0; i < term.clozes.length; ++i) {
      var segment = term.clozes[i].segment;
      var nextIdx = term.original.indexOf(segment, idx);
      if (nextIdx !== -1) {
        left += term.original.slice(idx, nextIdx);
        nextIdx += segment.length;
        if (cloze === term.clozes[i]) {
          return [left, segment, term.original.slice(nextIdx)]
        }
        left += segment;
        idx = nextIdx;
      }
    }

    return [left, "", ""];
  }

  findTerm(clozeIdentifier: ClozeIdentifier) {
    if (clozeIdentifier.noteId != this.id) return null;
    for (var term of this.terms) {
      if (term.marker == clozeIdentifier.termMarker) {
        return term;
      }
    }
  }

  findCloze(clozeIdentifier: ClozeIdentifier) {
    var term = this.findTerm(clozeIdentifier);
    if (term == null) return null;
    return term.clozes[clozeIdentifier.clozeIdx];
  }
}

export class Term {
  original = "";
  marker = "";
  details = "";
  hint = "";
  imageIds = arrayWithSome("");
  clozes = arrayOf(Cloze);
}

export class Cloze {
  segment = "";
  schedule = new Schedule();

  speakMatch() {
    return this.segment.match(/^(speak|train):/);
  }
}

export class ClozeIdentifier {
  noteId = "";
  termMarker = "";
  clozeIdx = 0;

  static of(note: Note, term: Term, cloze: Cloze) {
    var result = new ClozeIdentifier();
    result.noteId = note.id;
    result.termMarker = term.marker;
    result.clozeIdx = term.clozes.indexOf(cloze);
    return result;
  }

  static fromString(ident: string) {
    var result = new ClozeIdentifier();
    var parts = ident.split(";");
    result.noteId = parts[0];
    result.termMarker = parts[1];
    result.clozeIdx = parseInt(parts[2], 10);
    return result;
  }

  toString() {
    return `${this.noteId.toString()};${this.termMarker.toString()};${this.clozeIdx.toString()}`;
  }

  static noteIdentifierOf(ident: string) {
    return ident.slice(0, ident.indexOf(';'));
  }
}

export class Resource {
  id = "";
  b64Data = "";
  contentType = "";
  width = 0;
  height = 0;
  noteId = "";
}

export function formatCloze(cloze: Cloze) {
  return `-- ${cloze.segment} ` +
    `new ${cloze.schedule.isNew} ` +
    `due ${moment(cloze.schedule.dueAtMinutes * 60 * 1000).utc().format(TIME_FORMAT)} ` +
    `interval ${moment.duration(cloze.schedule.intervalMinutes * 60 * 1000).toISOString()} ` +
    `last ${moment(cloze.schedule.lastAnsweredMinutes * 60 * 1000).utc().format(TIME_FORMAT)}`;
}

export const TIME_FORMAT = "MM-DD-YYYY HH:mm";


text:
function h = mv_plot_result(result, varargin)
%Provides a simple visual representation of the results obtained with the
%functions mv_crossvalidate, mv_classify_across_time, mv_classify_timextime,
%and mv_searchlight.
%
%The type of plot depends on which of these functions was used.
%
%Usage:
% h = mv_plot_result(result,<...>)
%
%Parameters:
% result            - results struct obtained from one of the
%                     classification functions above. A cell array of
%                     results can be provided (e.g. results for different
%                     subjects); in this case, all results need to be
%                     created with the same function using the same metric.
%                     If multiple metrics have been used, a separate plot
%                     is generated for each metric.
%
% Additional arguments can be provided as key-value parameters, e.g.
% mv_plot_result(result,'title','This is my title'). See ADDITIONAL
% KEY-VALUE ARGUMENTS below.
%
% Furthermore, additional arguments can be provided depending on which
% classification function was used to create the results, as described
% next:
%
% MV_CROSSVALIDATE:
% Usage: h = mv_plot_result(result,...)
%
% Plots the classification result as a barplot. Plots multiple bars and the
% mean, if multiple result are provided.
%
% MV_CLASSIFY_ACROSS_TIME:
% Usage: h = mv_plot_result(result,x,...)
%
% Plots the classification result as a line plot. Plots multiple lines and
% a mean, if multiple result are provided.  Optional in x is the values for
% the x axis (eg time in sec).
%
% MV_CLASSIFY_TIMExTIME:
% h = mv_plot_result(result,x,y,...)
%
% Plots the classification result as an image. Plots multiple images and a
% mean, if multiple result are provided.
% Optionally, second and third inputs x and y can be provided that
% specify the values for the x and y axes (eg time in sec).
%
% MV_SEARCHLIGHT:
% h = mv_plot_result(result,chanlocs,...)
%
% Plots classification performance for each feature.
% If the features correspond to EEG/MEG channels and channel locations are
% provided (chanlocs must be a struct with a field pos specifying their 2d
% positions) the performance is plotted as a topography.
% In any other case, the features are plotted as bars in a bar graph.
%
% ADDITIONAL KEY-VALUE ARGUMENTS:
% title          - string that serves as axis title
% label          - if result argument is a cell array, a cell array of strings can
%                  be provided to label the different results (serves as
%                  legend labels for mv_classify_across_time plots and as
%                  xlabels for mv_crossvalidate plots)
% new_figure     - if 1, results are plotted in a new figure. If 0, results
%                  are plotted in the current axes instead (default 1)
%
% RETURNS:
% h        - struct with handles to the graphical elements

% (c) matthias treder

if ~iscell(result), result = {result}; end

if iscell(result{1}.metric) && numel(result{1}.metric) > 1
    % if multiple metrics are provided, this function is called for each
    % metric separately
    for mm=1:numel(result{1}.metric)
        res = cell(numel(result), 1);
        for ii=1:numel(result)
            res{ii} = result{ii};
            res{ii}.metric = res{ii}.metric{mm};
            res{ii}.perf = res{ii}.perf{mm};
            res{ii}.perf_std = res{ii}.perf_std{mm};
        end
        mv_plot_result(res, varargin{:});
    end
    h=[];
    return
end

nresults = numel(result);
nclasses = result{1}.nclasses;
metric = result{1}.metric;

fun = result{1}.function;

if numel(unique(cellfun( @(res) res.function, result,'Un',0))) > 1
    error('All results must come from the same function')
end
if numel(unique(cellfun( @(res) res.metric, result,'Un',0))) > 1
    error('All results must use the same metric')
end

fprintf('Plotting the results of %s.\n', fun);

%% Check whether the combination of metric and function is supported for plotting
incompatible_metric_function = {...
    'confusion'          {'mv_classify_across_time','mv_classify_timextime','mv_searchlight'};
    };

idx = find(ismember(incompatible_metric_function(:,1), result{1}.metric));

if any(idx) && any(ismember(incompatible_metric_function{idx,2}, result{1}.function))
    error('mv_plot_result does not currently support the metric ''%s'' for results from %s', incompatible_metric_function{idx,1}, result{1}.function)
end

%% Parse any key-value pairs
opt = mv_parse_key_value_pairs(varargin{:});

if ~isfield(opt,'new_figure'), opt.new_figure = 1; end

%% Extract all performance measures into a matrix
perf = cellfun( @(res) res.perf, result, 'Un', 0);
if ~isempty(result{1}.perf_std)
    perf_std = cellfun( @(res) res.perf_std, result, 'Un', 0);
else
    perf_std = cellfun( @(res) res.perf * 0, result, 'Un', 0);
end

if strcmp(fun,'mv_classify_timextime')
    cat_dim = 3;
else
    cat_dim = 2;
end

% check whether metric is multivariate
is_multivariate = strcmp(metric,'dval') || ...
        (nclasses>2 && any(strcmp(metric,{'precision','recall','f1'})));

if is_multivariate
    cat_dim = cat_dim + 1;
end

perf = cat(cat_dim, perf{:});
perf_std = cat(cat_dim, perf_std{:});

%% Create axis or legend labels (unless they have already been specified)
if ~isfield(opt,'label')
    if nresults==1
        opt.label = {result{1}.classifier};
    else
        opt.label = arrayfun( @(x) [num2str(x) ' (' result{x}.classifier ')'], 1:nresults,'Un',0);
    end
end

%% Struct with handles to graphical objects
h =struct();
h.ax = [];
h.title = [];

%% Prepare title
titleopt = {'Interpreter','none'};
if ~isfield(opt,'title')
    opt.title = metric;
end

% Plotting options
leg_opt = {'Interpreter','none'};

%% Plot
switch(fun)
    %% --------------- MV_CROSSVALIDATE ---------------
    case 'mv_crossvalidate'

        if opt.new_figure, figure; end
        h.ax = gca;
        if strcmp(result{1}.metric, 'confusion')  % plot confusion matrix
            opt_txt = {'Fontsize',15,'HorizontalAlignment','center'};
            for ii=1:nresults
                subplot(1,nresults,ii)
                imagesc(result{ii}.perf)
                colorbar
                h.xlabel(ii) = xlabel('Predicted class');
                h.ylabel(ii) = ylabel('True class');
                set(gca,'Xtick',1:nclasses,'Ytick',1:nclasses)
                for rr=1:nclasses
                    for cc=1:nclasses
                        text(cc,rr, sprintf('%0.2f',result{ii}.perf(rr,cc)), opt_txt{:})
                    end
                end
                h.title(ii) = title(sprintf('confusion matrix\n%s',result{ii}.classifier),titleopt{:});
            end
        else
            h.bar = bar(1:nresults, perf');
            set(gca,'XTick',1:nresults, 'XTickLabel', strrep(opt.label,'_','\_'))
            % Indicate SEM if the bars are not grouped
            if any(strcmp(metric,{'auc' 'acc' 'accuracy' 'precision' 'recall' 'f1'}))
                hold on
                errorbar(1:nresults, perf', perf_std','.')
            end

            % X and Y labels
            h.ylabel = ylabel(metric);
            h.fig = gcf;
            h.title = title(opt.title,titleopt{:});

            % Set Y label
            for ii=1:numel(h.ax)
                h.ylabel(ii) = ylabel(h.ax(ii),metric);
            end
        end

    %% --------------- MV_CLASSIFY_ACROSS_TIME ---------------
    case 'mv_classify_across_time'

        if (nargin > 1) && ~ischar(varargin{1})
            x = varargin{1};
        else
            x = 1:length(result{1}.perf);
        end

        if opt.new_figure, figure; end
        if any(strcmp(metric,{'auc', 'acc','accuracy','precision','recall','f1'}))
            hor = 1 / nclasses;
        elseif any(strcmp(metric,{'dval', 'tval','kappa'}))
            hor = 0;
        end

        opt_1D = {'ylabel',metric, 'hor', hor};
        if is_multivariate
            % dval: create separate subplot for each result
            N = size(perf,3);
            nc = ceil(sqrt(N));
            nr = ceil(N/nc);
            h.plt = [];
            classes = arrayfun( @(x) sprintf('Class %d', x), 1:nclasses, 'Un', 0);
            for ii=1:N
                subplot(nr,nc,ii)
                tmp = mv_plot_1D(x, squeeze(perf(:,:,ii)), squeeze(perf_std(:,:,ii)), opt_1D{:});
                legend(tmp.plt, classes,leg_opt{:})
                h.ax = [h.ax; tmp.ax];
                h.plt = [h.plt; tmp.plt];
                h.fig = gcf;
                if N>1
                    h.title = [h.title; title(sprintf('%s [%d]',opt.title,ii),titleopt{:})];
                else
                    h.title = [h.title; title(sprintf('%s',opt.title),titleopt{:})];
                end
            end
        else
            tmp = mv_plot_1D(x, perf, perf_std,opt_1D{:});
            legend(opt.label,leg_opt{:})
            h.ax = tmp.ax;
            h.plt = tmp.plt;
            h.fig = gcf;
            h.title = title(opt.title,titleopt{:});
        end

        % Set Y label
        for ii=1:numel(h.ax)
            h.ylabel(ii) = ylabel(h.ax(ii),metric);
        end

    %% --------------- MV_CLASSIFY_TIMEXTIME ---------------
    case 'mv_classify_timextime'

        % settings for 2d plot
        cfg= [];
        if (nargin > 1) && ~ischar(varargin{1}), cfg.x = varargin{1};
        else, cfg.x = 1:size(result{1}.perf,1);
        end
        if (nargin > 2) && ~ischar(varargin{2}), cfg.y = varargin{2};
        else, cfg.y = 1:size(result{1}.perf,2);
        end
        if any(strcmp(metric,{'auc', 'acc','accuracy','f1'}))
            cfg.climzero = 1 / nclasses;
        elseif any(strcmp(metric,{'dval', 'tval','precision','recall','kappa'}))
            cfg.climzero = 0;
        end

        if strcmp(metric,'dval')
            % dval: create figure each class
            hs = cell(1,2);
            for cl=1:2
                figure
                cfg.title = strcat(opt.title, ' - ' ,opt.label, ' (class ', num2str(cl),')');
                hs{cl} = mv_plot_2D(cfg, squeeze(perf(:,cl,:,:)) );
            end
            h = [hs{:}];

        else
            cfg.title = strcat(opt.title, '-' ,opt.label);
            h = mv_plot_2D(cfg, perf);
        end

        % set metric as title for colorbar
        for ii=1:numel(h)
            set(get(h(ii).colorbar,'title'),'String',metric)
        end

    %% --------------- MV_SEARCHLIGHT ---------------
    case 'mv_searchlight'

        if nargin>1
            % If a struct with channel information is given, we use it to plot
            % a topography
            chans = varargin{1};
            cfg = [];
            cfg.cbtitle = metric;
            cfg.clim = 'sym';

            if any(strcmp(metric,{'auc', 'acc','accuracy'}))
                cfg.climzero = 0.5;
            elseif any(strcmp(metric,{'dval', 'tval','precision','recall','f1'}))
                cfg.climzero = 0;
            end

            if isfield(chans,'outline'), cfg.outline = chans.outline; end

            if strcmp(metric,'dval')
                % dval: create figure each class
                hs = cell(1,2);
                for cl=1:2
                    figure
                    cfg.title = strcat(opt.title, ' - ' ,opt.label, ' (class ', num2str(cl),')');
                    hs{cl} = mv_plot_topography(cfg, squeeze(perf(:,cl,:)), chans.pos);
                    axis on
                    axis off
                end
                h = [hs{:}];
            else
                % no dval: all plots in one figure
                cfg.title = strcat(opt.title, ' - ' ,opt.label);
                h = mv_plot_topography(cfg, perf, chans.pos);
            end

        else
            % If no chans are provided: plot classification performance
            % for each feature as a grouped bar graph

            if strcmp(metric,'dval')
                % dval: create figure each class
                hs = cell(1,2);
                for cl=1:2
                    figure
                    hs{cl}.bar = bar(squeeze(perf(:,cl,:))');
                    hs{cl}.title= title(sprintf('%s - class %d',opt.title,cl),titleopt{:});
                    hs{cl}.xlabel = xlabel('features');
                    hs{cl}.ylabel = ylabel(metric);
                    set(gca,'XTick',1:nresults,'XTickLabel',opt.label)
                end
                h = [hs{:}];
            else
                if opt.new_figure, figure; end
                h.bar = bar(perf');
                h.xlabel = xlabel('features');
                h.ylabel = ylabel(metric);
                set(gca,'XTick',1:nresults,'XTickLabel',opt.label)
                h.title= title(opt.title,titleopt{:});
            end
            grid on

        end

end

grid on

end

redpajama_set_name: RedPajamaGithub


text:
package seev

import (
	"encoding/xml"

	"github.com/fgrid/iso20022"
)

type Document00300104 struct {
	XMLName xml.Name                           `xml:"urn:iso:std:iso:20022:tech:xsd:seev.003.001.04 Document"`
	Message *MeetingEntitlementNotificationV04 `xml:"MtgEntitlmntNtfctn"`
}

func (d *Document00300104) AddMessage() *MeetingEntitlementNotificationV04 {
	d.Message = new(MeetingEntitlementNotificationV04)
	return d.Message
}

// Scope
// An account servicer sends the MeetingEntitlementNotification to an issuer, its agent, an intermediary or an account owner to advise the entitlement in relation to a shareholders meeting.
// Usage
// This message is sent to advise the quantity of securities held by an account owner. The balance is specified for the securities for which the meeting is taking place.
// This entitlement message is sent by the account servicer or the registrar to an intermediary, the issuer's agent or the issuer. It is also sent between the account servicer and the account owner or the party holding the right to vote.
// The message is also used to amend a previously sent MeetingEntitlementNotification. To notify an update, the RelatedReference must be included in the message.
type MeetingEntitlementNotificationV04 struct {

	// Identifies the notification of entitlement instruction.
	Identification *iso20022.MessageIdentification1 `xml:"Id"`

	// Identifies the meeting entitlement message to be modified.
	RelatedReference *iso20022.MessageIdentification `xml:"RltdRef,omitempty"`

	// Series of elements which allow to identify a meeting.
	MeetingReference *iso20022.MeetingReference4 `xml:"MtgRef"`

	// Party notifying the entitlement.
	NotifyingParty *iso20022.PartyIdentification9Choice `xml:"NtifngPty"`

	// Identifies the security for which the meeting is organised, the account and the positions of the security holder.
	Security []*iso20022.SecurityPosition7 `xml:"Scty"`

	// Defines the dates determining eligibility.
	Eligibility *iso20022.EligibilityDates1 `xml:"Elgblty"`

	// Additional information that can not be captured in the structured fields and/or any other specific block.
	Extension []*iso20022.Extension2 `xml:"Xtnsn,omitempty"`
}

func (m *MeetingEntitlementNotificationV04) AddIdentification() *iso20022.MessageIdentification1 {
	m.Identification = new(iso20022.MessageIdentification1)
	return m.Identification
}

func (m *MeetingEntitlementNotificationV04) AddRelatedReference() *iso20022.MessageIdentification {
	m.RelatedReference = new(iso20022.MessageIdentification)
	return m.RelatedReference
}

func (m *MeetingEntitlementNotificationV04) AddMeetingReference() *iso20022.MeetingReference4 {
	m.MeetingReference = new(iso20022.MeetingReference4)
	return m.MeetingReference
}

func (m *MeetingEntitlementNotificationV04) AddNotifyingParty() *iso20022.PartyIdentification9Choice {
	m.NotifyingParty = new(iso20022.PartyIdentification9Choice)
	return m.NotifyingParty
}

func (m *MeetingEntitlementNotificationV04) AddSecurity() *iso20022.SecurityPosition7 {
	newValue := new(iso20022.SecurityPosition7)
	m.Security = append(m.Security, newValue)
	return newValue
}

func (m *MeetingEntitlementNotificationV04) AddEligibility() *iso20022.EligibilityDates1 {
	m.Eligibility = new(iso20022.EligibilityDates1)
	return m.Eligibility
}

func (m *MeetingEntitlementNotificationV04) AddExtension() *iso20022.Extension2 {
	newValue := new(iso20022.Extension2)
	m.Extension = append(m.Extension, newValue)
	return newValue
}


text:
                <button type="button" class="close" aria-label="Close" ng-click="$hide()">×</button>

New student registration

                <form>

                        First name:
                        <input type="text" class="form-control" id="firstname" ng-model="ctrl.newStudentMy.firstname">

                        Last name:
                        <input type="text" class="form-control" id="lastname" ng-model="ctrl.newStudentMy.lastname">

                        Email:
                        <input type="email" class="form-control" id="email" ng-model="ctrl.newStudentMy.email">

                        Group:
                        <select class="form-control input-md" id="group" name="singleSelect" ng-model="ctrl.newStudentMy.group">
                            <option ng-repeat="group in ctrl.groupsList" value="{{group.name}}">{{group.name}}</option>
                        </select>

                </form>

                <button type="button" class="btn btn-default" ng-click="$hide()">Close</button>
                <button type="button" class="btn btn-primary" ng-click="ctrl.saveStudent(ctrl.newStudentMy)" data-dismiss="modal">Create student</button>


text:
<?php

namespace Magento\Framework\Translate\Inline;

interface ParserInterface
{
    /**
     * Regular Expression for detected and replace translate
     */
    const REGEXP_TOKEN = '\{\{\{(.*?)\}\}\{\{(.*?)\}\}\{\{(.*?)\}\}\{\{(.*?)\}\}\}';

    /**
     * Parse and save edited translation
     *
     * @param array $translateParams
     * @return $this
     */
    public function processAjaxPost(array $translateParams);

    /**
     * Replace html body with translation wrapping.
     *
     * @param string $body
     * @return string
     */
    public function processResponseBodyString($body);

    /**
     * Returns the body content that is being parsed.
     *
     * @return string
     */
    public function getContent();

    /**
     * Sets the body content that is being parsed passed upon the passed in string.
     *
     * @param $content string
     * @return void
     */
    public function setContent($content);

    /**
     * Set flag about parsed content is Json
     *
     * @param bool $flag
     * @return $this
     */
    public function setIsJson($flag);
}


text:
@protocol SHExampleProtocol <NSObject>
@property(nonatomic,strong) NSString * name;

-(IBAction)performSegue:(id)sender;
@end


text:
package org.kuali.kra.iacuc.personnel;

import org.kuali.coeus.sys.framework.rule.KcBusinessRule;
import org.kuali.kra.protocol.ProtocolDocumentBase;
import org.kuali.kra.protocol.personnel.AddProtocolPersonnelEventBase;

/**
 * Represents the event to add a ProtocolPersonnel.
 */
public class AddIacucProtocolPersonnelEvent extends AddProtocolPersonnelEventBase {

    /**
     * Constructs a AddProtocolPersonnelEventBase.
     * @param errorPathPrefix The error path prefix
     * @param document The document to validate
     * @param protocolPerson the person to add
     */
    public AddIacucProtocolPersonnelEvent(String errorPathPrefix, ProtocolDocumentBase document, IacucProtocolPerson protocolPerson) {
        super(errorPathPrefix, document, protocolPerson);

    }

    @Override
    @SuppressWarnings("unchecked")
    public KcBusinessRule getRule() {
        return new AddIacucProtocolPersonnelRule();
    }

}


text:
async function requireUserMiddleware(ctx, next) {
    if (!ctx.currentUser) {
        ctx.redirect("/login");
        return;
    }

    await next();
}

module.exports = requireUserMiddleware;


text:
package org.apache.bcel.util;

import java.util.LinkedHashMap;
import java.util.Map;

import org.apache.bcel.classfile.JavaClass;

/**
 * Maintains a least-recently-used (LRU) cache of {@link JavaClass} with maximum size {@code cacheSize}.
 *
 * <p>
 * This repository supports a class path consisting of too many JAR files to handle in {@link ClassPathRepository} or
 * {@link MemorySensitiveClassPathRepository} without causing {@code OutOfMemoryError}.
 * </p>
 *
 * @since 6.4.0
 */
public class LruCacheClassPathRepository extends AbstractClassPathRepository {

    private final LinkedHashMap<String, JavaClass> loadedClasses;

    public LruCacheClassPathRepository(final ClassPath path, final int cacheSize) {
        super(path);

        if (cacheSize < 1) {
            throw new IllegalArgumentException("cacheSize must be a positive number.");
        }
        final int initialCapacity = (int) (0.75 * cacheSize);
        final boolean accessOrder = true; // Evicts least-recently-accessed
        loadedClasses = new LinkedHashMap<String, JavaClass>(initialCapacity, cacheSize, accessOrder) {

            private static final long serialVersionUID = 1L;

            @Override
            protected boolean removeEldestEntry(final Map.Entry<String, JavaClass> eldest) {
                return size() > cacheSize;
            }
        };
    }

    @Override
    public void clear() {
        loadedClasses.clear();
    }

    @Override
    public JavaClass findClass(final String className) {
        return loadedClasses.get(className);
    }

    @Override
    public void removeClass(final JavaClass javaClass) {
        loadedClasses.remove(javaClass.getClassName());
    }

    @Override
    public void storeClass(final JavaClass javaClass) {
        // Not storing parent's _loadedClass
        loadedClasses.put(javaClass.getClassName(), javaClass);
        javaClass.setRepository(this);
    }
}


text:
SUBDIRS(gtest)
SUBDIRS(create_autonomy/ca_tools)
SUBDIRS(create_autonomy/create_autonomy)
SUBDIRS(roomba)
SUBDIRS(create_autonomy/ca_msgs)
SUBDIRS(labone)
SUBDIRS(create_autonomy/ca_description)
SUBDIRS(create_autonomy/ca_driver)
SUBDIRS(irobot)
SUBDIRS(labtwo)