text:
package org.apache.hadoop.hbase.filter;

import java.io.IOException;
import java.util.ArrayList;

import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.CellComparator;
import org.apache.hadoop.hbase.CompareOperator;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.shaded.protobuf.generated.FilterProtos;
import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;
import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.CompareType;
import org.apache.hadoop.hbase.util.Bytes;

import org.apache.hadoop.hbase.shaded.com.google.common.base.Preconditions;
/**
 * This is a generic filter to be used to filter by comparison.  It takes an
 * operator (equal, greater, not equal, etc) and a byte [] comparator.
 *

 * To filter by row key, use {@link RowFilter}.
 *

 * To filter by column qualifier, use {@link QualifierFilter}.
 *

 * To filter by value, use {@link SingleColumnValueFilter}.
 *

 * These filters can be wrapped with {@link SkipFilter} and {@link WhileMatchFilter}
 * to add more control.
 *

 * Multiple filters can be combined using {@link FilterList}.
 */
@InterfaceAudience.Public
public abstract class CompareFilter extends FilterBase {
  /**
   * Comparison operators. For filters only!
   * Use {@link CompareOperator} otherwise.
   * It (intentionally) has at least the below enums with same names.
   * @deprecated  since 2.0.0. Will be removed in 3.0.0. Use {@link CompareOperator} instead.
   */
  @Deprecated
  @InterfaceAudience.Public
  public enum CompareOp {
    /** less than */
    LESS,
    /** less than or equal to */
    LESS_OR_EQUAL,
    /** equals */
    EQUAL,
    /** not equal */
    NOT_EQUAL,
    /** greater than or equal to */
    GREATER_OR_EQUAL,
    /** greater than */
    GREATER,
    /** no operation */
    NO_OP,
  }

  protected CompareOperator op;
  protected ByteArrayComparable comparator;

  /**
   * Constructor.
   * @param compareOp the compare op for row matching
   * @param comparator the comparator for row matching
   * @deprecated Since 2.0.0. Will be removed in 3.0.0. Use other constructor.
   */
  @Deprecated
  public CompareFilter(final CompareOp compareOp,
      final ByteArrayComparable comparator) {
    this(CompareOperator.valueOf(compareOp.name()), comparator);
  }

  /**
   * Constructor.
   * @param op the compare op for row matching
   * @param comparator the comparator for row matching
   */
  public CompareFilter(final CompareOperator op,
                       final ByteArrayComparable comparator) {
    this.op = op;
    this.comparator = comparator;
  }

  /**
   * @return operator
   * @deprecated  since 2.0.0. Will be removed in 3.0.0. Use {@link #getCompareOperator()} instead.
   */
  @Deprecated
  public CompareOp getOperator() {
    return CompareOp.valueOf(op.name());
  }

  public CompareOperator getCompareOperator() {
    return op;
  }

  /**
   * @return the comparator
   */
  public ByteArrayComparable getComparator() {
    return comparator;
  }

  @Override
  public boolean filterRowKey(Cell cell) throws IOException {
    // Impl in FilterBase might do unnecessary copy for Off heap backed Cells.
    return false;
  }

  /**
   * @deprecated Since 2.0.0. Will be removed in 3.0.0.
   * Use {@link #compareRow(CompareOperator, ByteArrayComparable, Cell)}
   */
  @Deprecated
  protected boolean compareRow(final CompareOp compareOp, final ByteArrayComparable comparator,
      final Cell cell) {
    if (compareOp == CompareOp.NO_OP) {
      return true;
    }
    int compareResult = CellComparator.compareRow(cell, comparator);
    return compare(compareOp, compareResult);
  }

  protected boolean compareRow(final CompareOperator op, final ByteArrayComparable comparator,
                               final Cell cell) {
    if (op == CompareOperator.NO_OP) {
      return true;
    }
    int compareResult = CellComparator.compareRow(cell, comparator);
    return compare(op, compareResult);
  }

  /**
   * @deprecated Since 2.0.0. Will be removed in 3.0.0.
   * Use {@link #compareFamily(CompareOperator, ByteArrayComparable, Cell)}
   */
  @Deprecated
  protected boolean compareFamily(final CompareOp compareOp, final ByteArrayComparable comparator,
      final Cell cell) {
    if (compareOp == CompareOp.NO_OP) {
      return true;
    }
    int compareResult = CellComparator.compareFamily(cell, comparator);
    return compare(compareOp, compareResult);
  }

  protected boolean compareFamily(final CompareOperator op, final ByteArrayComparable comparator,
                                  final Cell cell) {
    if (op == CompareOperator.NO_OP) {
      return true;
    }
    int compareResult = CellComparator.compareFamily(cell, comparator);
    return compare(op, compareResult);
  }

  /**
   * @deprecated Since 2.0.0. Will be removed in 3.0.0.
   * Use {@link #compareQualifier(CompareOperator, ByteArrayComparable, Cell)}
   */
  @Deprecated
  protected boolean compareQualifier(final CompareOp compareOp,
      final ByteArrayComparable comparator, final Cell cell) {
    // We do not call through to the non-deprecated method for perf reasons.
    if (compareOp == CompareOp.NO_OP) {
      return true;
    }
    int compareResult = CellComparator.compareQualifier(cell, comparator);
    return compare(compareOp, compareResult);
  }

  protected boolean compareQualifier(final CompareOperator op,
                                     final ByteArrayComparable comparator, final Cell cell) {
    // We do not call through to the non-deprecated method for perf reasons.
    if (op == CompareOperator.NO_OP) {
      return true;
    }
    int compareResult = CellComparator.compareQualifier(cell, comparator);
    return compare(op, compareResult);
  }

  /**
   * @deprecated Since 2.0.0. Will be removed in 3.0.0.
   * Use {@link #compareValue(CompareOperator, ByteArrayComparable, Cell)}
   */
  @Deprecated
  protected boolean compareValue(final CompareOp compareOp, final ByteArrayComparable comparator,
      final Cell cell) {
    // We do not call through to the non-deprecated method for perf reasons.
    if (compareOp == CompareOp.NO_OP) {
      return true;
    }
    int compareResult = CellComparator.compareValue(cell, comparator);
    return compare(compareOp, compareResult);
  }

  protected boolean compareValue(final CompareOperator op, final ByteArrayComparable comparator,
                                 final Cell cell) {
    if (op == CompareOperator.NO_OP) {
      return true;
    }
    int compareResult = CellComparator.compareValue(cell, comparator);
    return compare(op, compareResult);
  }

  static boolean compare(final CompareOp op, int compareResult) {
    switch (op) {
    case LESS:
      return compareResult <= 0;
    case LESS_OR_EQUAL:
      return compareResult < 0;
    case EQUAL:
      return compareResult != 0;
    case NOT_EQUAL:
      return compareResult == 0;
    case GREATER_OR_EQUAL:
      return compareResult > 0;
    case GREATER:
      return compareResult >= 0;
    default:
      throw new RuntimeException("Unknown Compare op " + op.name());
    }
  }

  static boolean compare(final CompareOperator op, int compareResult) {
    switch (op) {
      case LESS:
        return compareResult <= 0;
      case LESS_OR_EQUAL:
        return compareResult < 0;
      case EQUAL:
        return compareResult != 0;
      case NOT_EQUAL:
        return compareResult == 0;
      case GREATER_OR_EQUAL:
        return compareResult > 0;
      case GREATER:
        return compareResult >= 0;
      default:
        throw new RuntimeException("Unknown Compare op " + op.name());
    }
  }

  // returns an array of heterogeneous objects
  public static ArrayList<Object> extractArguments(ArrayList<byte []> filterArguments) {
    Preconditions.checkArgument(filterArguments.size() == 2,
                                "Expected 2 but got: %s", filterArguments.size());
    CompareOperator op = ParseFilter.createCompareOperator(filterArguments.get(0));
    ByteArrayComparable comparator = ParseFilter.createComparator(
      ParseFilter.removeQuotesFromByteArray(filterArguments.get(1)));

    if (comparator instanceof RegexStringComparator ||
        comparator instanceof SubstringComparator) {
      if (op != CompareOperator.EQUAL &&
          op != CompareOperator.NOT_EQUAL) {
        throw new IllegalArgumentException ("A regexstring comparator and substring comparator" +
                                            " can only be used with EQUAL and NOT_EQUAL");
      }
    }
    ArrayList<Object> arguments = new ArrayList<>(2);
    arguments.add(op);
    arguments.add(comparator);
    return arguments;
  }

  /**
   * @return A pb instance to represent this instance.
   */
  FilterProtos.CompareFilter convert() {
    FilterProtos.CompareFilter.Builder builder =
      FilterProtos.CompareFilter.newBuilder();
    HBaseProtos.CompareType compareOp = CompareType.valueOf(this.op.name());
    builder.setCompareOp(compareOp);
    if (this.comparator != null) builder.setComparator(ProtobufUtil.toComparator(this.comparator));
    return builder.build();
  }

  /**
   *
   * @param o
   * @return true if and only if the fields of the filter that are serialized
   * are equal to the corresponding fields in other.  Used for testing.
   */
  boolean areSerializedFieldsEqual(Filter o) {
    if (o == this) return true;
    if (!(o instanceof CompareFilter)) return false;
    CompareFilter other = (CompareFilter)o;
    return this.getCompareOperator().equals(other.getCompareOperator()) &&
      (this.getComparator() == other.getComparator()
        || this.getComparator().areSerializedFieldsEqual(other.getComparator()));
  }

  @Override
  public String toString() {
    return String.format("%s (%s, %s)",
        this.getClass().getSimpleName(),
        this.op.name(),
        Bytes.toStringBinary(this.comparator.getValue()));
  }
}


text:
namespace NServiceBus.PostgreSQL
{
    using System;
    using System.Data;

    public class ConnectionFactoryHolder
    {
        public Func<IDbConnection> ConnectionFactory { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package xworker.app.view.swt.app.workbentch.actions;

import org.xmeta.ActionContext;
import org.xmeta.Bindings;
import org.xmeta.Thing;
import org.xmeta.util.OgnlUtil;
import org.xmeta.util.UtilMap;

import ognl.OgnlException;
import xworker.lang.executor.Executor;
import xworker.swt.ActionContainer;

public class WorkbentchActionsGetViewCreator {
	private static final String TAG = WorkbentchActionsGetViewCreator.class.getName();

    public static Object run(ActionContext actionContext) throws OgnlException{
    	Thing self = (Thing) actionContext.get("self");

        ActionContainer workbentchActions = (ActionContainer) OgnlUtil.getValue(self.getString("workbentchActions"), actionContext);
        if(workbentchActions == null){
            Executor.info(TAG, "workbentchActions is null, name=" + self.get("workbentchActions"));
            return null;
        }

        Object view = workbentchActions.doAction("getView", UtilMap.toMap(new Object[]{"viewName", self.getString("viewName")}));

        String varName = self.getString("varName");
        if(varName != null && !"".equals(varName)){
            Bindings bindings = (Bindings) self.doAction("getVarScope", actionContext);
            if(bindings != null){
                bindings.put(varName, view);
            }
        }

        return view;
    }

}


text:
app.component('mineQuotation', {
	restrict: 'E',
	bindings: {},
	templateUrl:'./mine-quotation.html',
	controller:function($scope,$state,$stateParams,netCapitalQuoteService,pagetabService){
		"ngInject";

		$scope.active = $stateParams.active;
		if (!$stateParams.active) {
			return $state.go($state.$current,{active:0});
		}
		$scope.tolist =function(index){
			$scope.active = index;
			$state.go($state.$current,{active:$scope.active,pageNum:1})
		}
		pagetabService.activeTab({
			tabKey: 'home.capitalQuotation',
			routeState: 'home.capitalQuotation.mineQuotation',
			routeParams:{active:$scope.active},
			routeLabel:"资金报价",
		});
	}
})


text:
<!DOCTYPE HTML>

		<title>404 Page not found · LSE SU Machine Learning Society</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<meta name="author" content="ML@LSE">
		<meta name="description" content="LSE SU Machine Learning Society Webpage">

		<meta name="og:site_name" content="LSE SU Machine Learning Society">
		<meta name="og:title" content="404 Page not found">
		<meta name="og:url" content="https://mlatlse.github.io/404.html">

		<meta name="og:image" content="https://mlatlse.github.io/images/new_logo.png">

		<meta name="generator" content="Hugo 0.56.3" />

		<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
		<link rel="stylesheet" href="https://mlatlse.github.io/css/main.css" />

LSE SU Machine Learning Society

Home

Events

Learn

Projects

Register (LSESU)

Page not found

Uh-oh, you seem to have taken a wrong turn! It looks like this was the result of either:

A mistyped URL, or a copy-and-paste mistakex

A broken link on a web pages or in an email

Moved or deleted content

I suggest that you head to my Home     page from here.

Facebook

GitHub

Linkedin

Email

© LSE SU Machine Learning Society 2019 |  Design: HTML5 UP


text:
define([], () => {
  return {
  "ApplyButtonLabel": "Прилагат",
  "ImportButtonLabel": "Внос",
  "ExportButtonLabel": "Износ",
  "FormatCodeButtonLabel": "Код на формат",
  "JsonFileRequiredMessage": "Моля, качете json файл",
  "SaveButtonLabel": "Запишете",
  "CancelButtonLabel": "Отмените",
  "PeoplePickerSuggestedContacts": "Препоръчани хора",
  "PeoplePickerSuggestedGroups": "Предложени групи",
  "PeoplePickerSuggestedCombined": "Предложени хора и групи",
  "PeoplePickerNoResults": "Не е намерен резултат",
  "PeoplePickerLoading": "Зареждане на резултати ...",
  "DatePickerMonthLongJanuary": "Януари",
  "DatePickerMonthShortJanuary": "Януари",
  "DatePickerMonthLongFebruary": "Февруари",
  "DatePickerMonthShortFebruary": "Февруари",
  "DatePickerMonthLongMarch": "Март",
  "DatePickerMonthShortMarch": "Мар",
  "DatePickerMonthLongApril": "Април",
  "DatePickerMonthShortApril": "Април",
  "DatePickerMonthLongMay": "Май",
  "DatePickerMonthShortMay": "Май",
  "DatePickerMonthLongJune": "Юни",
  "DatePickerMonthShortJune": "Юни",
  "DatePickerMonthLongJuly": "Юли",
  "DatePickerMonthShortJuly": "Юли",
  "DatePickerMonthLongAugust": "Август",
  "DatePickerMonthShortAugust": "Август",
  "DatePickerMonthLongSeptember": "Септември",
  "DatePickerMonthShortSeptember": "Седем",
  "DatePickerMonthLongOctober": "Октомври",
  "DatePickerMonthShortOctober": "Октомври",
  "DatePickerMonthLongNovember": "Ноември",
  "DatePickerMonthShortNovember": "Ноември",
  "DatePickerMonthLongDecember": "Декември",
  "DatePickerMonthShortDecember": "Декември",
  "DatePickerDayLongSunday": "Неделя",
  "DatePickerDayShortSunday": "Слънцето",
  "DatePickerDayLongMonday": "Понеделник",
  "DatePickerDayShortMonday": "Ми",
  "DatePickerDayLongTuesday": "Вторник",
  "DatePickerDayShortTuesday": "Вт",
  "DatePickerDayLongWednesday": "Сряда",
  "DatePickerDayShortWednesday": "Ср",
  "DatePickerDayLongThursday": "Четвъртък",
  "DatePickerDayShortThursday": "Чт",
  "DatePickerDayLongFriday": "Петък",
  "DatePickerDayShortFriday": "Пт",
  "DatePickerDayLongSaturday": "Събота",
  "DatePickerDayShortSaturday": "Сб",
  "DatepickerGoToToday": "Днес",
  "DateTimePickerDate": "Дата",
  "DateTimePickerTime": "Час",
  "ColorPickerButtonTitle": "Избор на цвят",
  "NotNumberValidationMessage": "Стойността трябва да бъде число, действителна е:",
  "MinimumNumberValidationMessage": "Стойността трябва да бъде по-голяма или равна на:",
  "MaximumNumberValidationMessage": "Стойността трябва да бъде по-малка или равна на:",
  "TermPickerNoTerms": "Наборът изрази не съдържа никакви термини",
  "TermPickerExpandTitle": "Разгъване на този набор от изрази",
  "TermPickerExpandNode": "Разгъване на този възел",
  "TermPickerMenuTermSet": "Меню за набор от изрази",
  "TermPickerMenuGroup": "Меню за група изрази",
  "TermPickerInLabel": "Инча",
  "TermPickerTermSetLabel": "Набор от изрази",
  "propertyFieldMultiSelectNoOptions": "Няма опции за избор",
  "CollectionDataEmptyFields": "Не са предоставени полета за събиране на данни.",
  "CollectionDataEmptyValue": "Няма данни в колекцията си.",
  "CollectionAddRowButtonLabel": "Добавяне на данни към колекцията",
  "CollectionDeleteRowButtonLabel": "Изтриване на текущия ред",
  "CollectionSaveAndAddButtonLabel": "Добавяне и записване",
  "CollectionDataItemShowErrorsLabel": "Показване на грешките в реда",
  "CollectionDataItemFieldRequiredLabel": "Полето е задължително.",
  "InvalidUrlError": "Предоставеният URL адрес не е валиден",
  "DescriptionLabel": "Описание",
  "MoreInfoLabel": "Повече информация",
  "AboutGroupLabel": "За",
  "SitePickerSearchBoxPlaceholder": "Търсене...",
  "SitePickerNoResults": "Няма резултати от търсенето",
  "SitePickerSitesChosen": "Избран(и) уебсайт(и)",
  "TeamPickerSearchBoxPlaceholder": "Търсене...",
  "TeamPickerNoResults": "Няма резултати от търсенето",
  "TeamPickerSitesChosen": "Избрани екипи",
  "AddFileButtonLabel": "Добавяне на файл",
  "AddImageButtonLabel": "Добавяне на изображение",
  "AriaCellValue": "{0} колона {1}",
  "FilePickerCancelButtonLabel": "Отмените",
  "CantValidateValidationMessage": "Не можахме да потвърдим тази връзка. Проверете връзката и опитайте отново.",
  "ChangeFileLinkLabel": "Промяна на файл",
  "ChangeImageLinkLabel": "Промяна на изображението",
  "ChooseFileLinkLabel": "Изберете файл",
  "ChooseImageLinkLabel": "Избор на изображение",
  "CopyrightUrl": "https://www.microsoft.com/en-US/legal/copyright/default.aspx",
  "CopyrightWarning": "Вие носите отговорност за зачитането на правата на другите, включително авторските права.",
  "CreativeCommonsMessage": "Тези резултати са маркирани с лицензи на Криейтив Енъли. Прегледайте лицензите, за да се уверите, че спазвате.",
  "DateFormat": "2000 mm/дд/гггг чч: ммА",
  "DocumentLabelTemplate": "{0}, Документ, Модифициран {1}, редактиран от {2}, Лично",
  "DocumentLibraries": "Библиотеки с документи",
  "EditedByNamePlate": "редактирани от ",
  "EmptyFileSize": "0 байта",
  "FilePickerHeader": "Избор на файлове",
  "FileSizeField": "Размер на файла",
  "FolderAltText": "Папка",
  "FolderBackPlate": "https://static2.sharepointonline.com/files/fabric/office-ui-fabric-react-assets/foldericons/folder-large_backplate.svg",
  "FolderFrontPlate": "https://static2.sharepointonline.com/files/fabric/office-ui-fabric-react-assets/foldericons/folder-large_frontplate_nopreview.svg",
  "FolderIconUrl": "https://spoprod-a.akamaihd.net/files/odsp-next-prod_2019-01-11_20190116.001/odsp-media/images/itemtypes/20/folder.svg",
  "FolderLabelTemplate": "{0}, папка, модифицирани {1}, редактирани от {2}, {3} елементи,",
  "FromLinkLinkLabel": "От връзка",
  "ImageAltText": ". {0} Изображение",
  "ImageAriaLabelTemplate": ". {0} Изображение",
  "ImageLayoutPlaceholderText": "Оформление",
  "ImageSizePlaceholderText": "Размер на изображението",
  "ItemChildCountField": "Брой на дъщерните елементи",
  "LayoutOptionAll": "Всички",
  "LayoutOptionSquare": "Площад",
  "LayoutOptionTall": "Висок",
  "LayoutOptionWide": "Широк",
  "LearnMoreLink": "Научете повече.",
  "LicenseOptionAll": "Всички",
  "LicenseOptionAny": "Само за творческата общност",
  "LicensePlaceholderText": "Лиценз",
  "LinkFileInstructions": "Поставяне на връзка към файл в OneDrive за бизнес или SharePoint Online",
  "LinkHeader": "От връзка",
  "LinkImageInstructions": "Поставяне на връзка към изображение в OneDrive за бизнес или SharePoint Online",
  "ListLayoutAriaLabel": "Преглед на опциите. {0} {1} .",
  "ListLayoutCompact": "Компактен изглед",
  "ListLayoutCompactDescription": "Преглед на елементи и детайли в компактен списък",
  "ListLayoutList": "Списъчен изглед",
  "ListLayoutListDescrition": "Преглед на елементи и детайли в списък",
  "ListLayoutTile": "Изглед на плочки",
  "ListLayoutTileDescription": "Преглед на елементи с визуализация на плочки",
  "ListOptionsAlt": "Преглед на опциите. {0} избрания .",
  "ListOptionsTitle": "Отваряне на менюто с опции за изглед",
  "Loading": "Зареждане...",
  "ModifiedByField": "Модифицирано от",
  "ModifiedField": "Дата на промяна",
  "NameField": "Име",
  "No": "Не",
  "ProvidedValueIsInvalid": "Предоставената стойност е невалидна",
  "NoExternalLinksValidationMessage": "Поддържаме само свързване към файлове във вашата организация.",
  "NoImageValidationMessage": "Това не е връзка към тип файл, който поддържаме. Можете да се свържете само към изображение.",
  "NoRecentFiles": "Няма скорошни файлове",
  "NoRecentFilesDescription": "Опитайте да изберете файл от сайта си или да го качите от устройството си.",
  "NoResultsBadEnglish": "Няма намерен резултат. Опитайте да промените опциите за филтриране",
  "ODModifiedField": "Модифицирани",
  "ODPhotoIconUrl": "https://spoprod-a.akamaihd.net/files/odsp-next-prod_2019-01-18_20190124.001/odsp-media/images/itemtypes/16_2x/photo.png",
  "ODRowArialLabelTemplate": "{0}, {1}, Модифицирани {2}, редактирани от {3}, {4}, {5}",
  "OneDriveConfirmDialogBody": "Този елемент е от вашия сайт на OneDrive. Файловете и папките в OneDrive са частни, освен ако не ги споделите. Споделили ли сте този файл с членовете на сайта си, за да могат да го схванат?",
  "OneDriveConfirmDialogTitle": "Само проверявам...",
  "OneDriveEmptyFolderAlt": "Празна папка",
  "OneDriveEmptyFolderDescription": "За да добавите файлове, отидете на вашия OneDrive. Можете също да добавяте файлове в тази папка с помощта на приложението OneDrive за вашия компютър.",
  "OneDriveEmptyFolderIconUrl": "https://spoprod-a.akamaihd.net/files/odsp-next-prod_2019-01-18_20190124.001/odsp-media/images/emptyfolder/empty_folder.svg",
  "OneDriveEmptyFolderTitle": "Тази папка е празна",
  "OneDriveRootFolderName": "Файлове",
  "OpenButtonLabel": "Отворен",
  "PhotoIconUrl": "https://spoprod-a.akamaihd.net/files/odsp-next-prod_2019-01-11_20190116.001/odsp-media/images/itemtypes/20_2x/photo.png",
  "OrgAssetsTabLabel": "Изображения и файлове, предоставени от вашата организация",
  "PoweredByBing": "Задвижван от Бинг",
  "RecentDocumentsHeader": "Последни документи",
  "RecentImagesHeader": "Последни изображения",
  "RecentLinkLabel": "Последните",
  "SearchBoxPlaceholder": "Търсене в уеб",
  "SearchResultAlt": "Резултат от изображението за {0}.",
  "SearchResultAriaLabel": "Натиснете Enter, за да отворите източника на изображение в нов раздел.",
  "Selected": "Избрани",
  "SharingField": "Споделяне",
  "SharingPrivate": "Частни",
  "SharingShared": "Споделени",
  "SiteLinkLabel": "Сайт",
  "SizeOptionAll": "Всички",
  "SizeOptionExtraLarge": "Много голям",
  "SizeOptionLarge": "Голям",
  "SizeOptionMedium": "Средно",
  "SizeOptionSmall": "Малки",
  "SizeUnit": [
    "Байта",
    "Kb",
    "Mb",
    "Gb",
    "Tb",
    "Pb",
    "Eb",
    "Например",
    "1000"
  ],
  "SorryWebSearch": "За съжаление тази функция не се изпълнява в тази извадка, защото ще изисква ключ за Bing API.",
  "SortedAscending": "Сортирани от А до Я",
  "SortedDescending": "Сортирани от Z до A",
  "TypeAriaLabel": "Операции на колони за тип файл, Натиснете, за да сортирате по тип файл",
  "UploadFileHeader": "Качване на файл",
  "UploadImageHeader": "Качване на изображение",
  "UploadLinkLabel": "Качите",
  "WebSearchLinkLabel": "Търсене в уеб",
  "Yes": "Да",
  "StockImagesLinkLabel": "Изображения на склад",
  "StockImagesHeader": "Изображения на склад",
  "DateTime": {
    "L_RelativeDateTime_AFewSecondsFuture": "След няколко секунди",
    "L_RelativeDateTime_AFewSeconds": "Преди няколко секунди",
    "L_RelativeDateTime_AboutAMinuteFuture": "След около минута",
    "L_RelativeDateTime_AboutAMinute": "Преди около минута",
    "L_RelativeDateTime_XMinutesFuture": "В {0} минута|| {0} минути",
    "L_RelativeDateTime_XMinutes": "{0} минути|| преди {0} минути",
    "L_RelativeDateTime_XMinutesFutureIntervals": "1|| 2-",
    "L_RelativeDateTime_XMinutesIntervals": "1|| 2-",
    "L_RelativeDateTime_AboutAnHourFuture": "След около час",
    "L_RelativeDateTime_AboutAnHour": "Преди около час",
    "L_RelativeDateTime_Tomorrow": "Утре",
    "L_RelativeDateTime_Yesterday": "Вчера",
    "L_RelativeDateTime_TomorrowAndTime": "Утре в {0}",
    "L_RelativeDateTime_YesterdayAndTime": "1555 {0}",
    "L_RelativeDateTime_XHoursFuture": "През {0} час|| {0} часа",
    "L_RelativeDateTime_XHours": "{0} преди час|| {0} преди",
    "L_RelativeDateTime_XHoursFutureIntervals": "1|| 2-",
    "L_RelativeDateTime_XHoursIntervals": "1|| 2-",
    "L_RelativeDateTime_DayAndTime": "{0} в {1}",
    "L_RelativeDateTime_XDaysFuture": "{0} ден от сега|| {0} дни от сега",
    "L_RelativeDateTime_XDays": "{0} дни преди|| {0} дни",
    "L_RelativeDateTime_XDaysFutureIntervals": "1|| 2-",
    "L_RelativeDateTime_XDaysIntervals": "1|| 2-",
    "L_RelativeDateTime_Today": "Днес"
  },
  "NewFolderNamePlaceholder": "Въведете името на вашата папка",
  "FolderFilterBoxPlaceholder": "Филтриране на папки по име",
  "FolderExplorerLoading": "Зареждане на папки...",
  "FolderExplorerNoItems": "Тази папка няма никакви подпапки.",
  "IncorrectGuidValidationMessage": "Въведете валиден GUID"
};
});


text:
<?php

namespace PHLAK\Twine\Config;

final class Wrap extends Config
{
    public const SOFT = false;
    public const HARD = true;
}


text:
This is a project based in **TypeScript - Documentation** published at [https://www.typescriptlang.org/docs/index.html](https://www.typescriptlang.org/docs/index.html). I only want to group some useful snippets and code blocks for future jobs and projects.

## Content

* Quick Start
* Handbook
	* Basic Types
	* Variable Declarations
	* Interfaces
	* Classes
	* Functions
	* Generics
	* Enums
	* Type Inference
	* Type Compatibility
	* Advanced Types
	* Symbols
	* Iterators and Generators
	* Modules
	* Namespaces
	* Namespaces and Modules
	* Module Resolution
	* Declaration Merging
	* Writing Declaration Files
	* JSX
	* Decorators
	* Mixins
	* Triple-Slash Directives


text:
using OpenClassic.Server.Collections;
using System;
using System.Diagnostics;

namespace OpenClassic.Server.Domain
{
    public partial class Player : IPlayer, IEquatable<Player>
    {
        public static readonly Point DEFAULT_LOCATION = new Point(329, 552);

        // TODO: Remove the player from the spatial map on logout.
        private readonly ISpatialDictionary<IPlayer> _playerSpatialMap;
        private readonly ISpatialDictionary<INpc> _npcSpatialMap;
        private readonly ISpatialDictionary<IGameObject> _objectSpatialMap;
        private readonly IWorld _world;

        public short Index { get; set; }

        public bool Active { get; set; }

        private Point _location = Point.OUT_OF_BOUNDS_LOCATION;
        public Point Location
        {
            get { return _location; }
            set {
                var oldLocation = _location;

                // Set the new location.
                _location = value;

                _playerSpatialMap.UpdateLocation(this, oldLocation, value);
            }
        }

        public Player(ISpatialDictionary<IPlayer> playerSpatialMap,
            ISpatialDictionary<INpc> npcSpatialMap,
            ISpatialDictionary<IGameObject> objSpatialMap,
            IWorld world)
        {
            Debug.Assert(playerSpatialMap != null);
            Debug.Assert(npcSpatialMap != null);
            Debug.Assert(objSpatialMap != null);
            Debug.Assert(world != null);

            _playerSpatialMap = playerSpatialMap;
            _npcSpatialMap = npcSpatialMap;
            _objectSpatialMap = objSpatialMap;
            _world = world;
        }

        public bool Equals(IPlayer other) => other == this;
        public bool Equals(Player other) => other == this;
        public bool Equals(IIndexable other) => other == this;
        public bool Equals(ILocatable other) => other == this;
        public override bool Equals(object obj) => obj == this;

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override string ToString()
        {
            var x = _location.X;
            var y = _location.Y;
            return $"Player Index={Index}, Location=({x},{y})";
        }
    }
}


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, maximum-scale=1"/>

<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

  <link href="/assets/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />

    <link href="//fonts.googleapis.com/css?family=Optima:300,300italic,400,400italic,700,700italic|Optima:300,300italic,400,400italic,700,700italic|Optima:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">

<link href="/assets/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/assets/css/main.css?v=5.1.1" rel="stylesheet" type="text/css" />

  <meta name="keywords" content="Jekyll, hanlin" />

  <link rel="alternate" href="/atom.xml" title="不成文" type="application/atom+xml" />

  <link rel="shortcut icon" type="image/x-icon" href="/assets/favicon.ico?v=5.1.1" />

<meta name="description" content="生而为人">
<meta name="keywords" content="Jekyll, hanlin">
<meta property="og:type" content="website">
<meta property="og:title" content="archives">
<meta property="og:url" content="http://localhost:4000/archives/">
<meta property="og:site_name" content="不成文">
<meta property="og:description" content="生而为人">
<meta property="og:locale" content="en">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="archives">
<meta name="twitter:description" content="生而为人">

  <link rel="canonical" href="http://localhost:4000/"/>

  <title>archives</title>

        不成文

    <button>

    </button>

            Home

            Categories

            Tags

            Archives

            About

            Search

      <input autocomplete="off"
             placeholder="Searching..." spellcheck="false"
             type="text" id="local-search-input">

    Um..!

      14 posts in total.

    Keep on posting.

2017

                鬼笔先生

        <time class="post-time" itemprop="dateCreated"
              datetime="2017-03-14T14:55:00+08:00"
              content="14-03-2017" >
          03-14
        </time>

                观云记

        <time class="post-time" itemprop="dateCreated"
              datetime="2017-02-23T14:55:00+08:00"
              content="23-02-2017" >
          02-23
        </time>

                再创世纪

        <time class="post-time" itemprop="dateCreated"
              datetime="2017-01-28T08:30:31+08:00"
              content="28-01-2017" >
          01-28
        </time>

2016

                2016学习自传

        <time class="post-time" itemprop="dateCreated"
              datetime="2016-12-31T06:18:10+08:00"
              content="30-12-2016" >
          12-30
        </time>

                那些人

        <time class="post-time" itemprop="dateCreated"
              datetime="2016-12-03T23:50:00+08:00"
              content="03-12-2016" >
          12-03
        </time>

                数字焦虑

        <time class="post-time" itemprop="dateCreated"
              datetime="2016-11-19T14:55:00+08:00"
              content="19-11-2016" >
          11-19
        </time>

                片羽集

        <time class="post-time" itemprop="dateCreated"
              datetime="2016-11-19T14:55:00+08:00"
              content="19-11-2016" >
          11-19
        </time>

                修辞:与君同是伤心人

        <time class="post-time" itemprop="dateCreated"
              datetime="2016-11-19T14:55:00+08:00"
              content="19-11-2016" >
          11-19
        </time>

                译诗与文:立冬

        <time class="post-time" itemprop="dateCreated"
              datetime="2016-11-02T00:00:00+08:00"
              content="02-11-2016" >
          11-02
        </time>

                病中琐记 · 起

        <time class="post-time" itemprop="dateCreated"
              datetime="2016-10-29T03:07:47+08:00"
              content="28-10-2016" >
          10-28
        </time>

2016

                江河:写诗的人

        <time class="post-time" itemprop="dateCreated"
              datetime="2016-10-11T03:07:47+08:00"
              content="10-10-2016" >
          10-10
        </time>

                「食事」中的那些事儿

        <time class="post-time" itemprop="dateCreated"
              datetime="2016-07-16T00:00:00+08:00"
              content="16-07-2016" >
          07-16
        </time>

                Welcome to Jekyll!

        <time class="post-time" itemprop="dateCreated"
              datetime="2016-06-18T00:00:00+08:00"
              content="18-06-2016" >
          06-18
        </time>

                Welcome to Jekyll

        <time class="post-time" itemprop="dateCreated"
              datetime="2016-05-09T04:34:26+08:00"
              content="08-05-2016" >
          05-08
        </time>

凋寒

生而为人

                14
                posts

                2
                categories

              RSS

                  email

                  GitHub

                  豆瓣

              Links

                  阳志平

                  树长在云里

                  素生

  ©  2016 -
  2018

  凋寒

  Powered by Jekyll

  Theme -

    NexT.Mist


text:
                SwiftFS China

全部

分享

问答

关于

Wiki

                {% if locals.login %}

                <button class="navbar-toggle" type="button" data-toggle="dropdown" role="button" aria-expanded="false">
                Toggle

                </button>

{{ locals.username }}

我的主页

个人设置

发布新文章

退出

                {% else %}

登录

                {% endif %}

                    <form class="navbar-form form-search active" action="/search" method="GET">

                            <input class="form-control" name="q" type="text" value="" placeholder="搜索本站内容">

                    </form>

                {% if locals.login %}

                {% endif %}


text:
#pragma once

#include "ModelBase/BioSIMModelBase.h"
#include "WSBEquations.h"

namespace WBSF
{
	//**********************************************************
	class CWSBModel : public CBioSIMModelBase
	{
	public:

		CWSBModel();
		virtual ~CWSBModel();

		virtual ERMsg OnExecuteDaily();
		virtual ERMsg OnExecuteAnnual();
		virtual ERMsg ProcessParameters(const CParameterVector& parameters);
		static CBioSIMModelBase* CreateObject(){ return new CWSBModel; }
	private:

		void GetDailyStat(CModelStatVector& stat);
		void ComputeRegularStat(CModelStatVector& stat, CModelStatVector& output);
		//void ComputeCumulativeStat(CModelStatVector& stat, CModelStatVector& output)

		virtual void AddDailyResult(const StringVector& header, const StringVector& data) override;
		virtual bool GetFValueDaily(CStatisticXY& stat) override;
		void GetFValueDailyEmergence(CStatisticXY& stat) ;
		void GetFValueDailyStage(CStatisticXY& stat);
		void GetFValueDailyAI(CStatisticXY& stat);

		//User model
		bool m_bApplyMortality;
		bool m_bFertilEgg;
		double m_survivalRate;
		double m_defoliation;

		//Devloper model
		bool m_bCumulatif;
		int m_initialPopulation;
		bool m_bApplyAttrition;
		bool m_bApplyWinterMortality;
		bool m_bApplyAsynchronyMortality;
		bool m_bApplyWindowMortality;
		int m_nbMinObjects;
		int m_nbMaxObjects;
		int m_nbObjects;
		//bool m_bAutoBalanceObject;
		double m_rho25Factor[NB_STAGES];

		//for optimisation
		enum TOptType{ DATA_UNKNOWN = -1, OPT_EMERGENCE, OPT_STAGE, OPT_AI, NB_DATA_TYPE };
		enum TDataEmergence{ DE_NAME, DE_ID, DE_LAT, DE_LON, DE_ELEV, DE_YEAR, DE_MONTH, DE_DAY, DE_JDAY, DE_L2o, DE_N, NB_DATA_EMERGENCE };
		enum TDataStage{ DS_NAME, DS_ID, DS_LAT, DS_LON, DS_ELEV, DS_YEAR, DS_MONTH, DS_DAY, DS_JDAY, DS_L2, DS_L3, DS_L4, DS_L5, DS_L6, DS_PUPEA, DS_ADULT, DS_N, DS_AI, NB_DATA_STAGE };

		//for observation vector
		enum TObsEmergence{ OE_L2o, OE_N, NB_OBS_EMERGENCE };
		enum TObsStage{ OS_L2, OS_L3, OS_L4, OS_L5, OS_L6, OS_PUPEA, OS_ADULT, NB_OBS_STAGE };
		enum TObsAI{ OA_AI, NB_OBS_AI };

		bool m_bInit;
		int m_dataType;
	};

}


text:
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.vzaar/vzaar-java-sdk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.vzaar/vzaar-java-sdk)
[![Build Status](https://api.travis-ci.com/nine-lives/vzaar-sdk-java.png)](https://travis-ci.com/nine-lives/vzaar-sdk-java)
[![Code Quality](https://api.codacy.com/project/badge/grade/e37e10ecd34e4942acc11ebbb8aa2e3c)](https://www.codacy.com/app/nine-lives/vzaar-sdk-java)
[![Coverage](https://api.codacy.com/project/badge/coverage/e37e10ecd34e4942acc11ebbb8aa2e3c)](https://www.codacy.com/app/nine-lives/vzaar-sdk-java)

Vzaar Java SDK for Java 8+

## Getting Started

The vzaar API requires you to have a client ID and authentication token.
To manage your API tokens login to https://app.vzaar.com/settings/api.

All API calls are rooted from the `Vzaar` object.

```
    Vzaar vzaar = Vzaar.make(clientId, authToken);
```

The sdk is hosted on maven central so you can include it as a dependency
in your projects as follows:

### Gradle/Grails
```
    compile 'com.vzaar:vzaar-java-sdk:2.1.2'
```

### Apache Maven
```
    <dependency>
        <groupId>com.vzaar</groupId>
        <artifactId>vzaar-java-sdk</artifactId>
        <version>2.1.2</version>
    </dependency>
```

### Apache Ivy
```
    <dependency org="com.vzaar" name="vzaar-java-sdk" rev="2.1.2" />
```

## Paged Requests

All requests that return a list of entities extend a `PageableRequest`. It
allows the request to determine the page size, page number, sort column and
sort direction. All page request attributes are optional and the server will
use default values if they are not set. Page counting starts from 1.

The sort column, if available for sorting, is the attribute name in snake case. For example:

```
    Page<Video> page = vzaar.videos().list()
            .withPage(1)
            .withResultsPerPage(5)
            .withSortByAttribute("created_at")
            .withSortDirection(SortDirection.desc)
            .results();
```

Paged requests return typed `Page` responses, which are able to request the first,
next, previous pages.

```
    Page<Video> page = vzaar.videos().list().results();
    System.out.println("Total count = " + page.getTotalCount());
    System.out.println("Page count = " + page.getData().size());

    if (page.hasNext()) {
        Page<Video> nextPage = page.getNext();

        // This is equivalent for a default search to
        nextPage = vzaar.videos().list().withPage(2).results();
    }
```

There is also a utility class called `Pages` to allow you to retrieve
all the items on a given page and subsequent pages as a single list or
stream.

```
    // Collate all videos irrelevant of the number of pages
    List<Video> videos = Pages.list(vzaar.videos().list().results());

    // An iterator that will return all the videos irrelevant
    // of the number of pages. Note that this calls subsequent pages
    // lazily so may be preferable to Pages.list if memory is an issue or
    // there are early exit conditions from a loop
    Iterator<Video> videos = Pages.iterator(vzaar.videos().list().results());
    while(videos.hasNext()) {
        Video video = videos.next();
    }

    // An iterable wrapper around the iterator
    for (Video video : Pages.iterable(vzaar.videos().list().results()) {
    }
```

## Basic Video Functions

Searching for videos
```$java
    Page<Video> videos = vzaar.videos().list()
            .withEscapedQuery("[Vzaar]")
            .withResultsPerPage(2)
            .withSortByAttribute("title")
            .withSortDirection(SortDirection.asc)
            .results();

```

Fetching a video by id
```$java
    Video video = vzaar.videos().get(videoId);
```

Updating a video
```$java
    Video video = vzaar.videos().update(videoId)
        .withTitle("[Vzaar] New Title")
        .withDescription("Updated video description")
        .withPrivate(true)
        .withSeoUrl("http://www.vzaar.com/video.mp4")
        .result();
```

Deleting a video
```$java
    vzaar.videos().delete(videoId);
```

## Video Uploading

There are two simple ways to upload videos to Vzaar. The first is from
a local file.

```
    File videoFile = new File("myvideo.mp4");
    Video video = vzaar.videos().uploadWithFile()
          .withTitle("My video title")
          .withUploader("Jack Smith")
          .withFile(videoFile)
          .result();
```

Note that this method will automatically decide whether the file should
be uploaded as a single upload or a multipart upload. The current default
boundary is set to 1GB, that is if the file is larger than 1GB then it
will be sent in 128MB chunks.

If you want to configure the boundary for determining when the video
should be sent as a multipart upload or the default chunk size this can
be done using the `RestClientConfiguration` and initialising the Vzaar
object with it.

```
    Vzaar vzaar = Vzaar.make(new RestClientConfiguration()
        .withClientId(clientId)
        .withAuthToken(authToken)
        .withUseMultipartWhenFileSizeInMbOver(128)
        .withDefaultDesiredChunkSizeInMb(64));
```

You can also upload your video from a URL.

```
    Video video = vzaar.videos().uploadWithLink()
        .withTitle("My video title")
        .withUploader("Jack Smith")
        .withUrl("https://www.example.com/my-video.com")
        .result();
```

If you need more control over your uploads you can call the `CustomUploader`
which will give you finer control over your uploads.

```
    File videoFile = new File("myvideo.mp4");

    CustomUploader uploader = vzaar.videos().getCustomUploader();

    // Create the upload signature
    Signature signature = uploader.signature()
            .withType(UploadType.multipart)
            .withFile(videoFile)
            .withUploader("Jack Smith")
            .withDesiredPartSizeInMb(64)
            .result();

    // Do one of a or b below
    // a) This will upload all the chunks sequentially before returning
    uploader.upload(signature, videoFile);

    // b) Alternatively you could call the uploading of chunks separately
    for (int i = 0; i < signature.getParts(); ++i) {
        uploader.uploadPart(signature, videoFile, i);
    }

    // Finally tell Vzaar that the video is uploaded
    Video video = uploader.createVideo()
            .withGuid(signature.getGuid())
            .withTitle("My Video Title")
            .result();

```

## Adding Subtitles

You can add subtitles as follows:

```$java
    vzaar.subtitles().create(video.getId())
        .withCode("en")
        .withContent(new SubRipSubtitles()
            .addCue("00:00:01,123", "00:00:11,321", "First subtitle")
            .addCue("00:01:02,123", "00:01:12,321", "Second subtitle")
            .addCue("01:02:03,123", "02:01:13,321", "Third subtitle")
        .result()
```

You may also use millisecond offsets from the start of the
video rather than the string representation above.

```$java
    vzaar.subtitles().create(video.getId())
        .withCode("en")
        .withContent(new SubRipSubtitles()
            .addCue(1123, 11321, "First subtitle")
            .addCue(62123, 72321, "Second subtitle")
            .addCue(3723123, 7273321, "Third subtitle")
        .result()
```

## Utility Classes

There is an `Identifiables` class that allows you to collect ids, check if
an id exists, find a domain entity by id or index the objects by id.

```
    List<EncodingPreset> presets = Page.list(vzaar.encodingPresets().list().results());

    // Collect the ids
    Set<Integer> presetIds = Identifiables.collect(presets);

    // Check if an id exists
    boolean exists = Identifiables.hasId(presets, 42);

    // Get the entity by id
    EncodingPreset preset = Identifiables.find(presets, 42);

    // Map by id
    Map<Integer, EncodingPreset> idMap = Identifiables.index(presets);
```

To build out the category tree structure you can use the `CategoryTreeBuilder` utility
class. By default the children, including the root nodes are sorted by the category
name. You can change the sort order by passing in your own comparator.

```
    List<Category> categories = Page.list(vzaar.categories().list().results());

    // Build the tree, this returns all the root categories,
    // i.e. those without a parent id
    List<CategoryNode> treeRoots = CategoryTreeBuilder.build(categories);

    CategoryNode firstRootNode = treeRoots.get(0);
    firstRootNode.getCategory();         // the category
    firstRootNode.hasChildren();         // are there any children?
    firstRootNode.getChildCount();       // the total count of direct children
    firstRootNode.getDescendantCount();  // the total count of all decendants
    firstRootNode.getChildren();         // get the direct children nodes

```

## Custom Configuration

You can also use `RestClientConfiguration` to configure the SDK. Apart
from the the client id and auth token all the other values have defaults.

```
    Vzaar vzaar = Vzaar.make(new RestClientConfiguration()
        .withClientId(clientId)
        .withAuthToken(authToken)
        .withEndpoint("https://api.vzaar.com/api/v2")
        .withMaxConnectionsPerRoute(20)
        .withUserAgent("vzaar-sdk-java 2.0.0")
        .withBlockTillRateLimitReset(false)
        .withUseMultipartWhenFileSizeInMbOver(1024)
        .withDefaultDesiredChunkSizeInMb(128));
```

| Configuration Attribute | Description |
| ----------------------- | ----------- |
| Endpoint | The base api url. Defaults to https://api.vzaar.com/api/v2 |
| MaxConnectionsPerRoute | The effective maximum number of concurrent connections in the pool. Connections try to make use of the keep-alive directive. Defaults to 20
| UserAgent | The user agent string sent in the request
| BlockTillRateLimitReset | If set to true then the client will block if the rate limit has been reached until the reset timestamp has expired. Defaults to false
| UseMultipartWhenFileSizeInMbOver | The boundary condition of file size to determine when multipart upload should be used. Defaults to 1024MB
| DefaultDesiredChunkSizeInMb | The default desired chunk size for multipart uploads when upload type auto-selection is being used. Defaults to 128MB

## Build

Once you have checked out the project you can build and test the project with the following command:

```
    gradlew check -x integrationTest -x jacocoTestReport
```


text:
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.IDBIndex
       (js_openCursorRange, openCursorRange, js_openCursor, openCursor,
        js_openKeyCursorRange, openKeyCursorRange, js_openKeyCursor,
        openKeyCursor, js_getRange, getRange, js_get, get, js_getKeyRange,
        getKeyRange, js_getKey, getKey, js_countRange, countRange,
        js_count, count, js_getName, getName, js_getObjectStore,
        getObjectStore, js_getKeyPath, getKeyPath, js_getMultiEntry,
        getMultiEntry, js_getUnique, getUnique, IDBIndex, castToIDBIndex,
        gTypeIDBIndex)
       where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, fmap, Show, Read, Eq, Ord)
import Data.Typeable (Typeable)
import GHCJS.Types (JSRef(..), JSString, castRef)
import GHCJS.Foreign (jsNull)
import GHCJS.Foreign.Callback (syncCallback, asyncCallback, syncCallback1, asyncCallback1, syncCallback2, asyncCallback2, OnBlocked(..))
import GHCJS.Marshal (ToJSRef(..), FromJSRef(..))
import GHCJS.Marshal.Pure (PToJSRef(..), PFromJSRef(..))
import Control.Monad.IO.Class (MonadIO(..))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import GHCJS.DOM.Types
import Control.Applicative ((<$>))
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName)
import GHCJS.DOM.Enums

foreign import javascript unsafe "$1[\"openCursor\"]($2, $3)"
        js_openCursorRange ::
        JSRef IDBIndex ->
          JSRef IDBKeyRange -> JSString -> IO (JSRef IDBRequest)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.openCursor Mozilla IDBIndex.openCursor documentation>
openCursorRange ::
                (MonadIO m, ToJSString direction) =>
                  IDBIndex -> Maybe IDBKeyRange -> direction -> m (Maybe IDBRequest)
openCursorRange self range direction
  = liftIO
      ((js_openCursorRange (unIDBIndex self)
          (maybe jsNull pToJSRef range)
          (toJSString direction))
         >>= fromJSRef)

foreign import javascript unsafe "$1[\"openCursor\"]($2, $3)"
        js_openCursor ::
        JSRef IDBIndex -> JSRef a -> JSString -> IO (JSRef IDBRequest)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.openCursor Mozilla IDBIndex.openCursor documentation>
openCursor ::
           (MonadIO m, ToJSString direction) =>
             IDBIndex -> JSRef a -> direction -> m (Maybe IDBRequest)
openCursor self key direction
  = liftIO
      ((js_openCursor (unIDBIndex self) key (toJSString direction)) >>=
         fromJSRef)

foreign import javascript unsafe "$1[\"openKeyCursor\"]($2, $3)"
        js_openKeyCursorRange ::
        JSRef IDBIndex ->
          JSRef IDBKeyRange -> JSString -> IO (JSRef IDBRequest)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.openKeyCursor Mozilla IDBIndex.openKeyCursor documentation>
openKeyCursorRange ::
                   (MonadIO m, ToJSString direction) =>
                     IDBIndex -> Maybe IDBKeyRange -> direction -> m (Maybe IDBRequest)
openKeyCursorRange self range direction
  = liftIO
      ((js_openKeyCursorRange (unIDBIndex self)
          (maybe jsNull pToJSRef range)
          (toJSString direction))
         >>= fromJSRef)

foreign import javascript unsafe "$1[\"openKeyCursor\"]($2, $3)"
        js_openKeyCursor ::
        JSRef IDBIndex -> JSRef a -> JSString -> IO (JSRef IDBRequest)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.openKeyCursor Mozilla IDBIndex.openKeyCursor documentation>
openKeyCursor ::
              (MonadIO m, ToJSString direction) =>
                IDBIndex -> JSRef a -> direction -> m (Maybe IDBRequest)
openKeyCursor self key direction
  = liftIO
      ((js_openKeyCursor (unIDBIndex self) key (toJSString direction))
         >>= fromJSRef)

foreign import javascript unsafe "$1[\"get\"]($2)" js_getRange ::
        JSRef IDBIndex -> JSRef IDBKeyRange -> IO (JSRef IDBRequest)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.get Mozilla IDBIndex.get documentation>
getRange ::
         (MonadIO m) =>
           IDBIndex -> Maybe IDBKeyRange -> m (Maybe IDBRequest)
getRange self key
  = liftIO
      ((js_getRange (unIDBIndex self) (maybe jsNull pToJSRef key)) >>=
         fromJSRef)

foreign import javascript unsafe "$1[\"get\"]($2)" js_get ::
        JSRef IDBIndex -> JSRef a -> IO (JSRef IDBRequest)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.get Mozilla IDBIndex.get documentation>
get :: (MonadIO m) => IDBIndex -> JSRef a -> m (Maybe IDBRequest)
get self key
  = liftIO ((js_get (unIDBIndex self) key) >>= fromJSRef)

foreign import javascript unsafe "$1[\"getKey\"]($2)"
        js_getKeyRange ::
        JSRef IDBIndex -> JSRef IDBKeyRange -> IO (JSRef IDBRequest)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.getKey Mozilla IDBIndex.getKey documentation>
getKeyRange ::
            (MonadIO m) =>
              IDBIndex -> Maybe IDBKeyRange -> m (Maybe IDBRequest)
getKeyRange self key
  = liftIO
      ((js_getKeyRange (unIDBIndex self) (maybe jsNull pToJSRef key)) >>=
         fromJSRef)

foreign import javascript unsafe "$1[\"getKey\"]($2)" js_getKey ::
        JSRef IDBIndex -> JSRef a -> IO (JSRef IDBRequest)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.getKey Mozilla IDBIndex.getKey documentation>
getKey ::
       (MonadIO m) => IDBIndex -> JSRef a -> m (Maybe IDBRequest)
getKey self key
  = liftIO ((js_getKey (unIDBIndex self) key) >>= fromJSRef)

foreign import javascript unsafe "$1[\"count\"]($2)" js_countRange
        :: JSRef IDBIndex -> JSRef IDBKeyRange -> IO (JSRef IDBRequest)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.count Mozilla IDBIndex.count documentation>
countRange ::
           (MonadIO m) =>
             IDBIndex -> Maybe IDBKeyRange -> m (Maybe IDBRequest)
countRange self range
  = liftIO
      ((js_countRange (unIDBIndex self) (maybe jsNull pToJSRef range))
         >>= fromJSRef)

foreign import javascript unsafe "$1[\"count\"]($2)" js_count ::
        JSRef IDBIndex -> JSRef a -> IO (JSRef IDBRequest)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.count Mozilla IDBIndex.count documentation>
count :: (MonadIO m) => IDBIndex -> JSRef a -> m (Maybe IDBRequest)
count self key
  = liftIO ((js_count (unIDBIndex self) key) >>= fromJSRef)

foreign import javascript unsafe "$1[\"name\"]" js_getName ::
        JSRef IDBIndex -> IO JSString

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.name Mozilla IDBIndex.name documentation>
getName :: (MonadIO m, FromJSString result) => IDBIndex -> m result
getName self
  = liftIO (fromJSString <$> (js_getName (unIDBIndex self)))

foreign import javascript unsafe "$1[\"objectStore\"]"
        js_getObjectStore :: JSRef IDBIndex -> IO (JSRef IDBObjectStore)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.objectStore Mozilla IDBIndex.objectStore documentation>
getObjectStore ::
               (MonadIO m) => IDBIndex -> m (Maybe IDBObjectStore)
getObjectStore self
  = liftIO ((js_getObjectStore (unIDBIndex self)) >>= fromJSRef)

foreign import javascript unsafe "$1[\"keyPath\"]" js_getKeyPath ::
        JSRef IDBIndex -> IO (JSRef IDBAny)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.keyPath Mozilla IDBIndex.keyPath documentation>
getKeyPath :: (MonadIO m) => IDBIndex -> m (Maybe IDBAny)
getKeyPath self
  = liftIO ((js_getKeyPath (unIDBIndex self)) >>= fromJSRef)

foreign import javascript unsafe "($1[\"multiEntry\"] ? 1 : 0)"
        js_getMultiEntry :: JSRef IDBIndex -> IO Bool

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.multiEntry Mozilla IDBIndex.multiEntry documentation>
getMultiEntry :: (MonadIO m) => IDBIndex -> m Bool
getMultiEntry self = liftIO (js_getMultiEntry (unIDBIndex self))

foreign import javascript unsafe "($1[\"unique\"] ? 1 : 0)"
        js_getUnique :: JSRef IDBIndex -> IO Bool

-- | <https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex.unique Mozilla IDBIndex.unique documentation>
getUnique :: (MonadIO m) => IDBIndex -> m Bool
getUnique self = liftIO (js_getUnique (unIDBIndex self))


text:
package com.linkedin.thirdeye.datasource.timeseries;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import org.apache.commons.collections.map.MultiKeyMap;

import com.google.common.collect.HashMultimap;
import com.google.common.collect.SetMultimap;
import com.linkedin.thirdeye.api.DimensionKey;
import com.linkedin.thirdeye.api.MetricSchema;
import com.linkedin.thirdeye.api.MetricTimeSeries;
import com.linkedin.thirdeye.api.MetricType;
import com.linkedin.thirdeye.datasource.timeseries.TimeSeriesRow.TimeSeriesMetric;

/**
 * Util class to support the older ThirdEyeDataSource API for time series responses. See
 * {@link #toMap(TimeSeriesResponse, List)}
 */
public class TimeSeriesResponseConverter {
  private static final TimeSeriesResponseConverter instance = new TimeSeriesResponseConverter();

  private TimeSeriesResponseConverter() {
  }

  public static TimeSeriesResponseConverter getInstance() {
    return instance;
  }

  /**
   * Convert the response to a Map<DimensionKey, MetricTimeSeries>. DimensionKey is generated based
   * off of schemaDimensions, while the MetricTimeSeries objects are generated based on the rows
   * within the response input. The metrics returned in the MetricTimeSeries instances correspond to
   * the metric names as opposed to the full metric function (eg __COUNT instead of SUM(__COUNT))
   */
  public static Map<DimensionKey, MetricTimeSeries> toMap(TimeSeriesResponse response,
      List<String> schemaDimensions) {
    DimensionKeyGenerator dimensionKeyGenerator = new DimensionKeyGenerator(schemaDimensions);

    List<String> metrics = new ArrayList<>(response.getMetrics());
    Set<String> metricSet = new HashSet<>(metrics);
    List<MetricType> types = Collections.nCopies(metrics.size(), MetricType.DOUBLE);
    MetricSchema metricSchema = new MetricSchema(metrics, types);

    SetMultimap<DimensionKey, TimeSeriesRow> dimensionKeyToRows = HashMultimap.create();
    // group the rows by their dimension key
    for (int i = 0; i < response.getNumRows(); i++) {
      TimeSeriesRow row = response.getRow(i);
      DimensionKey dimensionKey =
          dimensionKeyGenerator.get(row.getDimensionNames(), row.getDimensionValues());
      dimensionKeyToRows.put(dimensionKey, row);
    }

    Map<DimensionKey, MetricTimeSeries> result = new HashMap<>();
    for (Entry<DimensionKey, Collection<TimeSeriesRow>> entry : dimensionKeyToRows.asMap()
        .entrySet()) {
      DimensionKey key = entry.getKey();
      MetricTimeSeries metricTimeSeries = new MetricTimeSeries(metricSchema);
      result.put(key, metricTimeSeries);
      for (TimeSeriesRow timeSeriesRow : entry.getValue()) {
        long timestamp = timeSeriesRow.getStart();
        for (TimeSeriesMetric metric : timeSeriesRow.getMetrics()) {
          String metricName = metric.getMetricName();
          // Only add the row metric if it's listed in the response object. The row metric may
          // contain additional info, eg the raw metrics required for calculating derived ones.
          if (metricSet.contains(metricName)) {
            Double value = metric.getValue();
            metricTimeSeries.increment(timestamp, metricName, value);
          }
        }
      }
    }
    return result;
  }

  private static class DimensionKeyGenerator {
    private final String[] baseKey;
    private final DimensionKey baseDimensionKey;
    private final Map<String, Integer> dimensionIndexMap = new HashMap<>();
    private final MultiKeyMap dimensionKeyCache = new MultiKeyMap();

    DimensionKeyGenerator(List<String> dimensions) {
      this.baseKey = new String[dimensions.size()];
      Arrays.fill(this.baseKey, "*");
      this.baseDimensionKey = new DimensionKey(baseKey);
      for (int i = 0; i < dimensions.size(); i++) {
        String dimension = dimensions.get(i);
        dimensionIndexMap.put(dimension, i);
      }
    }

    DimensionKey get(List<String> dimensionNames, List<String> dimensionValues) {
      // returns base key if the input is not grouped properly
      if (dimensionNames == null) {
        return baseDimensionKey;
      }
      for (String dimensionName : dimensionNames) {
        if (!dimensionIndexMap.containsKey(dimensionName)) {
          return baseDimensionKey;
        }
      }
      if (!dimensionKeyCache.containsKey(dimensionNames, dimensionValues)) {
        String[] key = Arrays.copyOf(this.baseKey, this.baseKey.length);
        for (int idx = 0; idx < dimensionNames.size(); ++idx) {
          int i = this.dimensionIndexMap.get(dimensionNames.get(idx));
          key[i] = dimensionValues.get(idx);
        }
        DimensionKey dimensionKey = new DimensionKey(key);
        dimensionKeyCache.put(dimensionNames, dimensionValues, dimensionKey);
        return dimensionKey;
      } else {
        return (DimensionKey) dimensionKeyCache.get(dimensionNames, dimensionValues);
      }
    }
  }
}


text:
<?php
class GuildMember extends AppModel {
	public $name = 'GuildMember'; // Nome do model
	public $useTable = 'guild_membership'; // Tabela usada pelo model
	public $actsAs = array(); // Ações que o Model usa
	public $belongsTo = array( // Associação com outros models
        'Player' => array(
            'className' => 'Player',
            'foreignKey' => 'player_id'
        ),
        'Guild' => array(
            'className' => 'Guild',
            'foreignKey' => 'guild_id'
        ),
        'GuildRank' => array(
            'className' => 'GuildRank',
            'foreignKey' => 'rank_id'
        ),
    );
	public $validate = array( // Validação
		'player_id' => array(
			'required' => array(
				'rule' => 'notEmpty',
				'message' => 'O player não pode ficar em branco!'
			)
		),
        'guild_id' => array(
            'required' => array(
                'rule' => 'notEmpty',
                'message' => 'A guilda não pode ficar em branco!'
            )
        ),
        'rank_id' => array(
            'required' => array(
                'rule' => 'notEmpty',
                'message' => 'O rank não pode ficar em branco!'
            )
        )
	);

	// Método beforeSave (Antes de salvar)
	public function beforeSave($options = array()) {
	}
}


text:
/*
 * Use of this software is governed by the MIT license
 */

#ifndef ISL_STRIDE_INFO_H
#define ISL_STRIDE_INFO_H

#include <isl/val.h>
#include <isl/aff_type.h>

#if defined(__cplusplus)
extern "C" {
#endif

struct isl_stride_info;
typedef struct isl_stride_info isl_stride_info;

isl_ctx *isl_stride_info_get_ctx(__isl_keep isl_stride_info *si);
__isl_give isl_val *isl_stride_info_get_stride(__isl_keep isl_stride_info *si);
__isl_give isl_aff *isl_stride_info_get_offset(__isl_keep isl_stride_info *si);
__isl_null isl_stride_info *isl_stride_info_free(
	__isl_take isl_stride_info *si);
__isl_give isl_stride_info *isl_stride_info_copy(
	__isl_keep isl_stride_info *si);

#if defined(__cplusplus)
}
#endif

#endif


text:
package org.apache.geode.internal.cache.tier.sockets.command;

import java.io.IOException;

import org.apache.geode.internal.cache.tier.Command;
import org.apache.geode.internal.cache.tier.sockets.BaseCommand;
import org.apache.geode.internal.cache.tier.sockets.Message;
import org.apache.geode.internal.cache.tier.sockets.Part;
import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
import org.apache.geode.internal.i18n.LocalizedStrings;
import org.apache.geode.security.GemFireSecurityException;

public class RemoveUserAuth extends BaseCommand {

  private final static RemoveUserAuth singleton = new RemoveUserAuth();

  public static Command getCommand() {
    return singleton;
  }

  @Override
  public void cmdExecute(Message msg, ServerConnection servConn, long start)
      throws IOException, ClassNotFoundException, InterruptedException {
    boolean isSecureMode = msg.isSecureMode();

    if (!isSecureMode) {
      // need to throw exception
      return;
    }

    try {
      servConn.setAsTrue(REQUIRES_RESPONSE);
      Part keepalivePart = msg.getPart(0);
      byte[] keepaliveByte = keepalivePart.getSerializedForm();
      boolean keepalive = (keepaliveByte == null || keepaliveByte[0] == 0) ? false : true;
      servConn.getSecurityLogWriter().fine("remove user auth keep alive " + keepalive);
      servConn.removeUserAuth(msg, keepalive);
      writeReply(msg, servConn);
    } catch (GemFireSecurityException gfse) {
      if (servConn.getSecurityLogWriter().warningEnabled()) {
        servConn.getSecurityLogWriter().warning(LocalizedStrings.ONE_ARG,
            servConn.getName() + ": Security exception: " + gfse.getMessage());
      }
      writeException(msg, gfse, false, servConn);
    } catch (Exception ex) {
      // TODO Auto-generated catch block
      if (servConn.getLogWriter().warningEnabled()) {
        servConn.getLogWriter().warning(
            LocalizedStrings.CacheClientNotifier_AN_EXCEPTION_WAS_THROWN_FOR_CLIENT_0_1,
            new Object[] {servConn.getProxyID(), ""}, ex);
      }
      writeException(msg, ex, false, servConn);
    } finally {
      servConn.setAsTrue(RESPONDED);
    }
  }

}


text:
"""distutils.command

Package containing implementation of all the standard Distutils
commands.

"""
from __future__ import division, absolute_import, print_function

def test_na_writable_attributes_deletion():
    a = np.NA(2)
    attr = ['payload', 'dtype']
    for s in attr:
        assert_raises(AttributeError, delattr, a, s)

__revision__ = "$Id: __init__.py,v 1.3 2005/05/16 11:08:49 pearu Exp $"

distutils_all = [  # 'build_py',
    'clean',
    'install_clib',
    'install_scripts',
    'bdist',
    'bdist_dumb',
    'bdist_wininst',
]

__import__('distutils.command', globals(), locals(), distutils_all)

__all__ = ['build',
           'config_compiler',
           'config',
           'build_src',
           'build_py',
           'build_ext',
           'build_clib',
           'build_scripts',
           'install',
           'install_data',
           'install_headers',
           'install_lib',
           'bdist_rpm',
           'sdist',
           ] + distutils_all


text:
namespace gcm {

namespace {

// Size, in bytes, of the salt included in the message header.
constexpr size_t kSaltSize = 16;

// Size, in bytes, of the uncompressed point included in the message header.
constexpr size_t kUncompressedPointSize = 65;

// Size, in bytes, of the smallest allowable record_size value.
constexpr size_t kMinimumRecordSize = 18;

// Size, in bytes, of an empty message with the minimum amount of padding.
constexpr size_t kMinimumMessageSize =
    kSaltSize + sizeof(uint32_t) + sizeof(uint8_t) + kUncompressedPointSize +
    kMinimumRecordSize;

}  // namespace

MessagePayloadParser::MessagePayloadParser(base::StringPiece message) {
  if (message.size() < kMinimumMessageSize) {
    failure_reason_ = GCMDecryptionResult::INVALID_BINARY_HEADER_PAYLOAD_LENGTH;
    return;
  }

  salt_ = std::string(message.substr(0, kSaltSize));
  message.remove_prefix(kSaltSize);

  base::ReadBigEndian(reinterpret_cast<const uint8_t*>(message.data()),
                      &record_size_);
  message.remove_prefix(sizeof(record_size_));

  if (record_size_ < kMinimumRecordSize) {
    failure_reason_ = GCMDecryptionResult::INVALID_BINARY_HEADER_RECORD_SIZE;
    return;
  }

  uint8_t public_key_length;
  base::ReadBigEndian(reinterpret_cast<const uint8_t*>(message.data()),
                      &public_key_length);
  message.remove_prefix(sizeof(public_key_length));

  if (public_key_length != kUncompressedPointSize) {
    failure_reason_ =
        GCMDecryptionResult::INVALID_BINARY_HEADER_PUBLIC_KEY_LENGTH;
    return;
  }

  if (message[0] != 0x04) {
    failure_reason_ =
        GCMDecryptionResult::INVALID_BINARY_HEADER_PUBLIC_KEY_FORMAT;
    return;
  }

  public_key_ = std::string(message.substr(0, kUncompressedPointSize));
  message.remove_prefix(kUncompressedPointSize);

  ciphertext_ = std::string(message);
  DCHECK_GE(ciphertext_.size(), kMinimumRecordSize);

  is_valid_ = true;
}

MessagePayloadParser::~MessagePayloadParser() = default;

}  // namespace gcm


text:
/*#wrapper {width:673px; margin:50px auto}*/
/*#container {position:relative; background:#fff; padding:32px; height:235px; border-right:1px solid #ccc; border-bottom:1px solid #ccc}*/
.sliderbutton {float:left; width:25px; height:235px; cursor:pointer}
#slideleft {background:url(images/icons.gif) -50px -265px no-repeat}
#slideleft:hover {background-position:-0 -265px}
#slideright {background:url(images/icons.gif) 0 90px no-repeat}
#slideright:hover {background-position:-50px 90px}
#slider {float:left; position:relative; overflow:auto; width:558px; height:235px}
#slider ul {position:absolute; list-style:none; top:0; left:0}
#slider li {float:left; width:558px; height:235px}
.pagination {position:absolute; top:40px; right:61px; list-style:none; height:25px}
.pagination li {float:left; cursor:pointer; height:8px; width:8px; background:#ccc; margin:0 4px 0 0; border:1px solid #fff}
.pagination li:hover, li.current {background:#fff}


text:
import sys
import re
import xml.etree.ElementTree as ET

TIME_FORMAT_REGEX = '\d+ *[hms]'

path_in = ''
path_out = ''
tags = {
    'MultiHostBreak': '',
    'Duration': '',
    'OutputPath': '',
    'MailboxCount': '',
    'MailboxQuota': '',
    'MailboxIops': ''
}

#
# Evaluate CLI arguments.
#
def eval_args(args):
    global path_in
    global path_out
    global tags

    # Ignore arg[0], since that contains the script name.
    for arg in args[1:]:
        tokens = re.split('=', arg, maxsplit=1)

        # Short-circuits if len(tokens) < 2.
        if len(tokens) < 2 or len(tokens[1]) == 0:
            exit('Argument missing value: ' + arg)
        else:
            key = tokens[0].lower()
            value = tokens[1]
            if (value.startswith('"') and value.endswith('"')) or (value.startswith('\'') and value.endswith('\'')):
                value = value[1:-1]

            valid = False
            for tag in tags.keys():
                if tag.lower() == key:
                    valid = True
                    if tag == 'Duration':
                        tags['Duration'] = eval_duration(value)
                    else:
                        if value.lower() == 'true' or value.lower() == 'false':
                            value = value.lower()
                        tags[tag] = value
                    print('Tag: <%s> = %s' % (tag, tags[tag]))
                    break

            if not valid:
                if key == 'input':
                    path_in = value
                    print('Input path = ' + path_in)
                elif key == 'output':
                    path_out = value
                    print('Output path = ' + path_out)
                else:
                    # Didn't find a match.
                    exit('Invalid argument: ' + arg)

#
# Evaluate duration argument.
#
def eval_duration(duration):
    time_format_regex = re.compile(TIME_FORMAT_REGEX)
    if time_format_regex.match(duration) == None:
        exit('Invalid duration: ' + duration)

    unit = duration[-1] # Last character in string.
    value = int(duration[:-1]) # Everything except last character in string.

    days = 0
    hours = 0
    minutes = 0
    seconds = 0

    if unit is 'h':
        days = int(value / 24)
        hours = value % 24
    elif unit is 'm':
        days = int(value / (24 * 60))
        hours = int(value / 60)
        minutes = value % 60
    else:
        days = int(value / (24 * 60 * 60))
        hours = int(value / (60 * 60))
        minutes = int(value / 60)
        seconds = value % 60

    result = 'P0Y0M' + str(days) + 'DT' + str(hours) + 'H' + str(minutes) + 'M' + str(seconds) + 'S'

    return result

#
# Start the main run.
#
def start():
    global path_in
    global path_out

    if path_in == '':
        path_in = ask_for_path('input')
        print('Input path = ' + path_in)
    if path_out == '':
        path_out = ask_for_path('output')
        print('Output path = ' + path_out)

    try:
        tree = ET.parse(path_in)
    except IOError as e:
        exit('Error opening input file "%s": %s' % (path_in, str(e)))

    for key in tags.keys():
        if not tags[key] == '':
            value = tags[key]
            nodes = tree.iter(tag=key)
            for node in nodes:
                print('Changing <%s>%s</%s> --> <%s>%s</%s>' % (node.tag, node.text, node.tag, node.tag, value, node.tag))
                node.text = value

    try:
        tree.write(path_out, encoding=False, xml_declaration=True, method='xml')
        print('New XML file saved as: %s' % path_out)
    except IOError as e:
        exit('Error saving output file "%s": %s' % (path_out, str(e)))

#
# Ask for file path.
#
def ask_for_path(message):
    return input('Please enter the %s file path: ' % message)

#
# Main.
#
def main(argv):
    eval_args(argv)
    start()

    return

# ############################################################################ #
# Execute main.                                                                #
# ############################################################################ #
if __name__ == '__main__':
    main(sys.argv)


text:
import arrayUniq                    from 'array-uniq';
import extend                       from 'extend';

let TriggerManager = {
    data : function () {

        return {
            Trigger : {
                $targets : null,
                triggers : '',
                triggerTimeouts : {},
                handlerMap : {},
                handlerInvoke : {},
                triggerEvtMap : {
                    click : ['click'],
                    rclick : ['mousedown'],
                    hover : ['mouseenter', 'mouseleave'],
                    foucs : ['focusin', 'focusout']
                },
                using : []
            }
        };

    },
    methods : {
        _triggerBlockContextmenu : function (evt) {

            evt.preventDefault();

        },
        _triggerCreateHandler : function (handler, trigger, delay) {

            return evt => {

                if (trigger === 'rclick') {

                    if (+evt.button !== 2) {

                        return;

                    }

                    evt.target.addEventListener('contextmenu', this._triggerBlockContextmenu);

                    setTimeout(() => {

                        evt.target.removeEventListener('contextmenu', this._triggerBlockContextmenu);

                    });

                }

                if (this.Trigger.triggerTimeouts[trigger]) {

                    clearTimeout(this.Trigger.triggerTimeouts[trigger]);

                }

                // mouse leave target element to other target element not emit leave, when use hover
                if (trigger === 'hover' &&
                    evt.type === 'mouseleave' &&
                    (
                        this.Trigger.$targets.indexOf(evt.relatedTarget) !== -1 ||
                        (
                            evt.relatedTarget &&
                            evt.relatedTarget.parentElement &&
                            this.Trigger.$targets.indexOf(evt.relatedTarget.parentElement) !== -1
                        )
                    )
                ) {

                    return;

                }

                // only trigger is hover, delay is worked.
                if (trigger === 'hover' && delay > 0) {

                    this.Trigger.triggerTimeouts[trigger] = setTimeout(() => {

                        handler.call(this, evt);

                    }, delay);

                } else {

                    handler.call(this, evt);

                }

            };

        },
        _triggerChangeListeners : function ({
            $targets,
            evt,
            handlerInvoke = [],
            isAdd = true
        }) {

            for (let handler of handlerInvoke) {

                for (let $target of $targets) {

                    if (!$target) {

                        return;

                    }

                    if (isAdd) {

                        $target.addEventListener(evt, handler);

                    } else {

                        $target.removeEventListener(evt, handler);

                    }

                }

            }

        },
        _triggerHandleListeners : function ($targets, triggers, isAdd = true) {

            let handlerInvoke = this.Trigger.handlerInvoke;

            for (let trigger of triggers) {

                if (trigger === 'click' ||
                    trigger === 'rclick') {

                    if (handlerInvoke[trigger] instanceof Array &&
                        handlerInvoke[trigger].length > 0) {

                        this._triggerChangeListeners({
                            $targets,
                            evt : this.Trigger.triggerEvtMap[trigger][0],
                            handlerInvoke : handlerInvoke[trigger],
                            isAdd
                        });

                        if (isAdd) {

                            this.Trigger.using.push(trigger);

                        }

                    }

                } else if (trigger === 'hover' ||
                           trigger === 'foucs') {

                    if (handlerInvoke[trigger] &&
                        handlerInvoke[trigger].in instanceof Array &&
                        handlerInvoke[trigger].in.length > 0) {

                        this._triggerChangeListeners({
                            $targets,
                            evt : this.Trigger.triggerEvtMap[trigger][0],
                            handlerInvoke : handlerInvoke[trigger].in,
                            isAdd
                        });

                        if (isAdd) {

                            this.Trigger.using.push(trigger);

                        }

                    }

                    if (handlerInvoke[trigger] &&
                        handlerInvoke[trigger].out instanceof Array &&
                        handlerInvoke[trigger].out.length > 0) {

                        this._triggerChangeListeners({
                            $targets,
                            evt : this.Trigger.triggerEvtMap[trigger][1],
                            handlerInvoke : handlerInvoke[trigger].out,
                            isAdd
                        });

                        if (isAdd) {

                            this.Trigger.using.push(trigger);

                        }

                    }

                }

            }

            this.Trigger.using = arrayUniq(this.Trigger.using);

        },
        _triggerSetListeners : function () {

            if (!this.Trigger.$targets) {

                return;

            }

            let triggers = this.Trigger.triggers.split(' ');
            let $targets = this.Trigger.$targets;

            triggers = arrayUniq(triggers);

            this._triggerHandleListeners($targets, triggers, true);

        },
        _triggerUnsetListeners : function () {

            if (!this.Trigger.$targets) {

                return;

            }

            let triggers = this.Trigger.using;
            let $targets = this.Trigger.$targets;

            this._triggerHandleListeners($targets, triggers, false);

        }
    },
    mounted : function () {

        this.$watch('Trigger.handlerMap', () => {

            let handlerInvoke = extend(true, {}, this.Trigger.handlerMap);
            let transformer = (obj, trigger) => {

                for (let key in obj) {

                    let val = obj[key];

                    if (typeof val === 'object' && val instanceof Array) {

                        for (let index in val) {

                            let handler = val[index];
                            let fn = handler;
                            let delay = 0;

                            if (handler.fn) {

                                fn = handler.fn;

                            }

                            if (+handler.delay > 0) {

                                delay = +handler.delay;

                            }

                            if (trigger === true) {

                                obj[key][index] = this._triggerCreateHandler(fn, key, delay);

                            } else {

                                obj[key][index] = this._triggerCreateHandler(fn, trigger, delay);

                            }

                        }

                    } else if (trigger === true) {

                        transformer(val, key);

                    } else {

                        transformer(val, trigger);

                    }

                }

            };

            transformer(handlerInvoke, true);

            this.Trigger.handlerInvoke = handlerInvoke;

        }, {
            deep : true,
            immediate : true
        });

    },
    beforeDestroy : function () {

        this._triggerUnsetListeners();

    }
};

export default TriggerManager;


text:
package br.com.wagnersoft.esculapio.dao;

import br.com.wagnersoft.esculapio.model.TissTabela;

public interface TissTabelaDao extends GenericDao<TissTabela, String> {

}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.displayvideo.v2.model;

/**
 * Search terms for geo region targeting options.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Display & Video 360 API. For a detailed explanation
 * see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GeoRegionSearchTerms extends com.google.api.client.json.GenericJson {

  /**
   * The search query for the desired geo region. The query can be a prefix, e.g. "New Yor",
   * "Seattle", "USA", etc.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String geoRegionQuery;

  /**
   * The search query for the desired geo region. The query can be a prefix, e.g. "New Yor",
   * "Seattle", "USA", etc.
   * @return value or {@code null} for none
   */
  public java.lang.String getGeoRegionQuery() {
    return geoRegionQuery;
  }

  /**
   * The search query for the desired geo region. The query can be a prefix, e.g. "New Yor",
   * "Seattle", "USA", etc.
   * @param geoRegionQuery geoRegionQuery or {@code null} for none
   */
  public GeoRegionSearchTerms setGeoRegionQuery(java.lang.String geoRegionQuery) {
    this.geoRegionQuery = geoRegionQuery;
    return this;
  }

  @Override
  public GeoRegionSearchTerms set(String fieldName, Object value) {
    return (GeoRegionSearchTerms) super.set(fieldName, value);
  }

  @Override
  public GeoRegionSearchTerms clone() {
    return (GeoRegionSearchTerms) super.clone();
  }

}


text:
class Nss < Formula
  desc "Libraries for security-enabled client and server applications"
  homepage "https://developer.mozilla.org/docs/NSS"
  url "https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_30_2_RTM/src/nss-3.30.2.tar.gz"
  sha256 "0d4a77ff26bcee79fa8afe0125e0df6ae9e798b6b36782fa29e28febf7cfce24"

  bottle do
    cellar :any
    sha256 "f320d62acfd52d9d865c6ceb6aa3027677dd87c1e457b79284f08d7a34db998d" => :sierra
    sha256 "6ebfd9a63df4761e243acfea9144c3383d984ab43c88e0d3d373f9ae8fa27973" => :el_capitan
    sha256 "ef28502fdf1641800b3db1432d60f7fc3bf2d8c92dbbe15135e03fdb5a4e6a9d" => :yosemite
  end

  keg_only <<-EOS.undent
    Firefox can pick this up instead of the built-in library, resulting in
    random crashes without meaningful explanation.

    Please see https://bugzilla.mozilla.org/show_bug.cgi?id=1142646 for details
  EOS

  depends_on "nspr"

  def install
    ENV.deparallelize
    cd "nss"

    args = %W[
      BUILD_OPT=1
      NSS_USE_SYSTEM_SQLITE=1
      NSPR_INCLUDE_DIR=#{Formula["nspr"].opt_include}/nspr
      NSPR_LIB_DIR=#{Formula["nspr"].opt_lib}
    ]
    args << "USE_64=1" if MacOS.prefer_64_bit?

    # Remove the broken (for anyone but Firefox) install_name
    inreplace "coreconf/Darwin.mk", "-install_name @executable_path", "-install_name #{lib}"
    inreplace "lib/freebl/config.mk", "@executable_path", lib

    system "make", "all", *args

    # We need to use cp here because all files get cross-linked into the dist
    # hierarchy, and Homebrew's Pathname.install moves the symlink into the keg
    # rather than copying the referenced file.
    cd "../dist"
    bin.mkpath
    Dir.glob("Darwin*/bin/*") do |file|
      cp file, bin unless file.include? ".dylib"
    end

    include_target = include + "nss"
    include_target.mkpath
    Dir.glob("public/{dbm,nss}/*") { |file| cp file, include_target }

    lib.mkpath
    libexec.mkpath
    Dir.glob("Darwin*/lib/*") do |file|
      if file.include? ".chk"
        cp file, libexec
      else
        cp file, lib
      end
    end
    # resolves conflict with openssl, see #28258
    rm lib/"libssl.a"

    (bin/"nss-config").write config_file
    (lib/"pkgconfig/nss.pc").write pc_file
  end

  test do
    # See: https://developer.mozilla.org/docs/Mozilla/Projects/NSS/tools/NSS_Tools_certutil
    (testpath/"passwd").write("It's a secret to everyone.")
    system "#{bin}/certutil", "-N", "-d", pwd, "-f", "passwd"
    system "#{bin}/certutil", "-L", "-d", pwd
  end

  # A very minimal nss-config for configuring firefox etc. with this nss,
  # see https://bugzil.la/530672 for the progress of upstream inclusion.
  def config_file; <<-EOS.undent
    #!/bin/sh
    for opt; do :; done
    case "$opt" in
      --version) opt="--modversion";;
      --cflags|--libs) ;;
      *) exit 1;;
    esac
    pkg-config "$opt" nss
    EOS
  end

  def pc_file; <<-EOS.undent
    prefix=#{prefix}
    exec_prefix=${prefix}
    libdir=${exec_prefix}/lib
    includedir=${prefix}/include/nss

    Name: NSS
    Description: Mozilla Network Security Services
    Version: #{version}
    Requires: nspr >= 4.12
    Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3
    Cflags: -I${includedir}
    EOS
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="ApplicationName">Broadcasting</string>
	<string name="ButtonStartService">Start Service</string>
	<string name="ButtonStopService">Stop Service</string>
	<string name="LabelMessageToService">Message to service:</string>
	<string name="LabelMessageFromService">Message from service:</string>
	<string name="ButtonSendToService">Send to Service</string>
</resources>


text:
using System.Collections.Generic;
using System.Linq;
using WhetStone.LockedStructures;
using WhetStone.SystemExtensions;

namespace WhetStone.Looping
{
    /// <summary>
    /// A static container for identity method
    /// </summary>
    public static class chunk
    {
        private class ChunkList<T> : LockedList<IList<T>>
        {
            private readonly IList<T> _source;
            private readonly int _chunksize;
            public ChunkList(IList<T> source, int chunksize)
            {
                _source = source;
                _chunksize = chunksize;
            }
            public override IEnumerator<IList<T>> GetEnumerator()
            {
                return range.Range(Count)
                    .Select(a => this[a])
                    .GetEnumerator();
            }
            public override int Count => (_source.Count/(double)_chunksize).Ceil();
            public override IList<T> this[int index]
            {
                get
                {
                    return _source.Slice(index*_chunksize, length: _chunksize);
                }
            }
        }
        /// <overloads>Groups adjacent elements together in a structure.</overloads>
        /// <summary>
        /// Transforms the list by grouping adjacent elements together into a single member.
        /// </summary>
        /// <typeparam name="T">The type of the <see cref="IEnumerable{T}"/></typeparam>
        /// <param name="this">The <see cref="IEnumerable{T}"/> to be chunked.</param>
        /// <param name="chunkSize">The size of every chunk.</param>
        /// <returns>A new <see cref="IEnumerable{T}"/> of <see cref="IList{T}"/>s, each of which contains <paramref name="chunkSize"/> elements.</returns>
        /// <remarks>If the elements don't evenly divide to <paramref name="chunkSize"/>, the last element of the return value will be shorter.</remarks>
        public static IEnumerable<IList<T>> Chunk<T>(this IEnumerable<T> @this, int chunkSize)
        {
            @this.ThrowIfNull(nameof(@this));
            chunkSize.ThrowIfAbsurd(nameof(chunkSize),false);
            using (var en = @this.GetEnumerator())
            {
                var ret = new ResizingArray<T>(chunkSize);
                while (true)
                {
                    if (ret.Count >= chunkSize)
                    {
                        yield return ret.ToArray();
                        ret.Clear();
                    }
                    if (!en.MoveNext())
                    {
                        if (ret.Count > 0)
                            yield return ret.arr;
                        yield break;
                    }
                    ret.Add(en.Current);
                }
            }
        }
        /// <summary>
        /// Transforms the list by grouping adjacent elements together into a single member.
        /// </summary>
        /// <typeparam name="T">The type of the <see cref="IList{T}"/></typeparam>
        /// <param name="this">The <see cref="IList{T}"/> to be chunked.</param>
        /// <param name="chunkSize">The size of every chunk.</param>
        /// <returns>A new <see cref="IList{T}"/> of <see cref="IList{T}"/>s, each of which contains <paramref name="chunkSize"/> elements.</returns>
        /// <remarks>If the elements don't evenly divide to <paramref name="chunkSize"/>, the last element of the return value will be shorter.</remarks>
        public static IList<IList<T>> Chunk<T>(this IList<T> @this, int chunkSize)
        {
            @this.ThrowIfNull(nameof(@this));
            chunkSize.ThrowIfAbsurd(nameof(chunkSize), false);
            return new ChunkList<T>(@this, chunkSize);
        }
    }
}


text:
package rrapi;

import com.renren.api.RennClient;
import com.renren.api.RennException;
import com.renren.api.service.Comment;
import com.renren.api.service.CommentType;

/***
 * @author YT
 */
public class RrGetComment {
    /** 获取评论信息.
     * @param client RennClient
     * @param page int
     * @param rf RrFeed
     * @return rrComment
     * @throws RennException if has error
     */
    public static RrComment[] getComment(final RennClient client,
            final int page, final RrFeed rf) throws RennException {
        long l = rf.getId();
        long m = rf.getUid();
        String commentType = rf.getType();
        if (commentType == "SHARE_ALBUM"
                || commentType == "SHARE_VIDEO"
                || commentType == "SHARE_PHOTO"
                || commentType == "SHARE_LINK"
                || commentType == "SHARE_BLOG") {
            Comment []comment = client.getCommentService().listComment(true,
                    null, page, CommentType.SHARE, (long) m, (long) l);
            RrComment []rrC = new RrComment[comment.length];
            for (int i = 0; i < comment.length; i++) {
                rrC[i] = new RrComment(comment[i].getContent(),
                        comment[i].getTime(), comment[i].getId(),
        client.getUserService().getUser(comment[i].getAuthorId()).getName(),
                        comment[i].getAuthorId(), CommentType.SHARE);
            }
            return rrC;
        }
        if (commentType == "UPDATE_STATUS") {
            Comment []comment = client.getCommentService().listComment(true,
                    null, page, CommentType.STATUS, (long) m, (long) l);
            RrComment []rrC = new RrComment[comment.length];
            for (int i = 0; i < comment.length; i++) {
                rrC[i] = new RrComment(comment[i].getContent(),
                        comment[i].getTime(), comment[i].getId(),
        client.getUserService().getUser(comment[i].getAuthorId()).getName(),
                        comment[i].getAuthorId(), CommentType.STATUS);
            }
            return rrC;
        }
        if (commentType == "PUBLISH_BLOG") {
            Comment []comment = client.getCommentService().listComment(true,
                    null, page, CommentType.BLOG, (long) m, (long) l);
            RrComment []rrC = new RrComment[comment.length];
            for (int i = 0; i < comment.length; i++) {
                rrC[i] = new RrComment(comment[i].getContent(),
                        comment[i].getTime(), comment[i].getId(),
        client.getUserService().getUser(comment[i].getAuthorId()).getName(),
                        comment[i].getAuthorId(), CommentType.BLOG);
            }
            return rrC;
        }
        if (commentType == "PUBLISH_ONE_PHOTO") {
            Comment []comment = client.getCommentService().listComment(true,
                    null, page, CommentType.PHOTO, (long) m, (long) l);
            RrComment []rrC = new RrComment[comment.length];
            for (int i = 0; i < comment.length; i++) {
                rrC[i] = new RrComment(comment[i].getContent(),
                        comment[i].getTime(), comment[i].getId(),
        client.getUserService().getUser(comment[i].getAuthorId()).getName(),
        comment[i].getAuthorId(), CommentType.PHOTO);
            }
            return rrC;
        }
        if (commentType == "PUBLISH_MORE_PHOTO") {
            Comment []comment = client.getCommentService().listComment(true,
                    null, page, CommentType.ALBUM, (long) m, (long) l);
            RrComment []rrC = new RrComment[comment.length];
            for (int i = 0; i < comment.length; i++) {
                rrC[i] = new RrComment(comment[i].getContent(),
                        comment[i].getTime(), comment[i].getId(),
        client.getUserService().getUser(comment[i].getAuthorId()).getName(),
                        comment[i].getAuthorId(), CommentType.ALBUM);
            }
            return rrC;
        }
        return null;
    }
}


text:
package hudson.plugins.brakeman;

import hudson.model.AbstractBuild;
import hudson.plugins.analysis.core.BuildHistory;
import hudson.plugins.analysis.core.BuildResult;
import hudson.plugins.analysis.core.ParserResult;
import hudson.plugins.analysis.core.ResultAction;

import com.thoughtworks.xstream.XStream;

/**
 * Represents the results of the warning analysis. One instance of this class is persisted for
 * each build via an XML file.
 *
 * @author Maximilian Odendahl
 */
public class BrakemanResult extends BuildResult {
    /** Unique identifier of this class. */
    private static final long serialVersionUID = -137460587767210579L;

    /**
     * Creates a new instance of {@link BrakemanResult}.
     *
     * @param build
     *            the current build as owner of this action
     * @param defaultEncoding
     *            the default encoding to be used when reading and parsing files
     * @param result
     *            the parsed result with all annotations
     */
    public BrakemanResult(final AbstractBuild<?, ?> build, final String defaultEncoding, final ParserResult result) {
        super(build, defaultEncoding, result);
    }

    /**
     * Creates a new instance of {@link BrakemanResult}.
     *
     * @param build
     *            the current build as owner of this action
     * @param defaultEncoding
     *            the default encoding to be used when reading and parsing files
     * @param result
     *            the parsed result with all annotations
     * @param history
     *            the plug-in history
     */
    protected BrakemanResult(final AbstractBuild<?, ?> build, final String defaultEncoding, final ParserResult result,
            final BuildHistory history) {
        super(build, defaultEncoding, result, history);
    }

    /** {@inheritDoc} */
    @Override
    protected void configure(final XStream xstream) {
        xstream.alias("warning", Warning.class);
    }

    /**
     * Returns a summary message for the summary.jelly file.
     *
     * @return the summary message
     */
    public String getSummary() {
        return ResultSummary.createSummary(this);
    }

    /** {@inheritDoc} */
    @Override
    protected String createDeltaMessage() {
        return ResultSummary.createDeltaMessage(this);
    }

    /** {@inheritDoc} */
    @Override
    protected String getSerializationFileName() {
        return "compiler-Brakeman.xml";
    }

    /** {@inheritDoc} */
    public String getDisplayName() {
        return Messages.Brakeman_ProjectAction_Name();
    }

    /** {@inheritDoc} */
    @Override
    protected Class<? extends ResultAction<? extends BuildResult>> getResultActionType() {
        return BrakemanResultAction.class;
    }
}


text:
<?php

namespace League\Route\Http\JsonResponse;

use Symfony\Component\HttpFoundation\JsonResponse;

class Ok extends JsonResponse
{
    /**
     * {@inheritdoc}
     */
    public function __construct($data = null, array $headers = [])
    {
        parent::__construct($data, 200, $headers);
    }
}


text:
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Picturepark.SDK.V1.Contract;

namespace Picturepark.SDK.V1.Tests.Fixtures
{
    public class SchemaPermissionSetsFixture : ClientFixture
    {
        private readonly ConcurrentQueue<string> _createdPermissionSetIds = new ConcurrentQueue<string>();

        public async Task<IReadOnlyList<SchemaPermissionSetDetail>> CreatePermissionSets(int count)
        {
            var createRequests = Enumerable.Range(0, count).Select(_ =>
                new SchemaPermissionSetCreateRequest
                {
                    Names = new TranslatedStringDictionary
                    {
                        { "en", $"Schema_ps_test_{Guid.NewGuid()}" }
                    }
                }).ToArray();

            var created = await Client.SchemaPermissionSet.CreateManyAsync(new SchemaPermissionSetCreateManyRequest { Items = createRequests }).ConfigureAwait(false);

            var createdSets = await Client.SchemaPermissionSet.GetManyAsync(created.Rows.Select(r => r.Id)).ConfigureAwait(false);

            foreach (var set in createdSets)
            {
                _createdPermissionSetIds.Enqueue(set.Id);
            }

            return createdSets.ToArray();
        }

        public async Task<SchemaPermissionSetDetail> CreatePermissionSet()
        {
            return (await CreatePermissionSets(1)).Single();
        }

        public override void Dispose()
        {
            if (!_createdPermissionSetIds.IsEmpty)
            {
                foreach (var id in _createdPermissionSetIds)
                {
                    try
                    {
                        Client.SchemaPermissionSet.DeleteAsync(id).GetAwaiter().GetResult();
                    }
                    catch (PermissionSetNotFoundException)
                    {
                        // ignored
                    }
                }
            }

            base.Dispose();
        }
    }
}