text:
/**
 * 1. Make sure outline doesn't get hidden beneath adjacent elements.
 * 2. Override inherited styles (possibly from Bootstrap).
 */
/**
 * 1. Put 10px of space between each child.
 * 2. If there is only one child, align it to the right. If you wanted it aligned right, you
 *    wouldn't use the Bar in the first place.
 * 3. Children in the middle should center their content.
 * 4. Fix an IE bug which causes the last child to overflow the container.
 * 5. Fixing this bug means we now need to align the children to the right.
 */
* {
  box-sizing: border-box; }

body {
  font-family: "Open Sans", Helvetica, Arial, sans-serif; }

.kuiBar {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
  min-height: 30px;
  /* 1 */ }

.kuiBarSection {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
  margin-left: 25px;
  margin-right: 25px; }
  .kuiBarSection:not(:first-child):not(:last-child):not(:only-child) {
    -webkit-box-pack: center;
    -webkit-justify-content: center;
        -ms-flex-pack: center;
            justify-content: center;
    /* 3 */ }
  .kuiBarSection:first-child {
    margin-left: 0; }
  .kuiBarSection:last-child {
    margin-right: 0;
    -webkit-box-flex: 0;
    -webkit-flex: 0 1 auto;
        -ms-flex: 0 1 auto;
            flex: 0 1 auto;
    /* 4 */
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
        -ms-flex-pack: end;
            justify-content: flex-end;
    /* 5 */ }
  .kuiBarSection:only-child {
    margin-left: auto;
    /* 1 */ }
  .kuiBarSection > * + * {
    margin-left: 10px;
    /* 1 */ }

/**
 * 1. Setting to inline-block guarantees the same height when applied to both
 *    button elements and anchor tags.
 * 2. Disable for Angular.
 */
.kuiButton {
  display: inline-block;
  /* 1 */
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  cursor: pointer;
  padding: 4px 12px 5px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: none;
  border: none;
  border-radius: 4px; }
  .kuiButton:disabled {
    cursor: default;
    pointer-events: none;
    /* 2 */ }
  .kuiButton:active:enabled {
    -webkit-transform: translateY(1px);
            transform: translateY(1px); }
  .kuiButton:focus {
    z-index: 1;
    /* 1 */
    outline: 1px solid #6EADC1 !important;
    /* 2 */
    outline-offset: 2px !important;
    /* 2 */ }

.kuiButton--iconText .kuiButton__icon:first-child {
  margin-right: 4px; }

.kuiButton--iconText .kuiButton__icon:last-child {
  margin-left: 4px; }

/**
 * 1. Override Bootstrap.
 */
.kuiButton--basic {
  color: #5a5a5a;
  background-color: #F2F2F2; }
  .kuiButton--basic:focus {
    color: #5a5a5a !important;
    /* 1 */ }
  .kuiButton--basic:hover:enabled, .kuiButton--basic:active:enabled {
    color: #ffffff !important;
    /* 1 */
    background-color: #9B9B9B; }
  .kuiButton--basic:disabled {
    color: #9B9B9B; }

/**
 * 1. Override Bootstrap.
 */
.kuiButton--primary {
  color: #FFFFFF;
  background-color: #6EADC1; }
  .kuiButton--primary:hover:enabled, .kuiButton--primary:active:enabled {
    color: #FFFFFF !important;
    /* 1 */
    background-color: #006E8A; }
  .kuiButton--primary:disabled {
    background-color: #B6D6E0; }
  .kuiButton--primary:focus {
    color: #FFFFFF !important;
    /* 1 */ }

/**
 * 1. Override Bootstrap.
 */
.kuiButton--danger {
  color: #FFFFFF;
  background-color: #D76051; }
  .kuiButton--danger:hover:enabled, .kuiButton--danger:active:enabled {
    color: #FFFFFF !important;
    /* 1 */
    background-color: #A52E1F; }
  .kuiButton--danger:disabled {
    background-color: #efc0ba; }
  .kuiButton--danger:focus {
    z-index: 1;
    /* 1 */
    outline: 1px solid #ff523c !important;
    /* 2 */
    outline-offset: 2px !important;
    /* 2 */
    color: #FFFFFF !important;
    /* 1 */ }

.kuiButtonGroup {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center; }
  .kuiButtonGroup .kuiButton + .kuiButton {
    margin-left: 4px; }

.kuiButtonGroup--united > .kuiButton:not(:first-child):not(:last-child) {
  border-radius: 0; }

.kuiButtonGroup--united > .kuiButton:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0; }

.kuiButtonGroup--united > .kuiButton:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0; }

.kuiButtonGroup--united > .kuiButton:only-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px; }

.kuiButtonGroup--united .kuiButton + .kuiButton {
  margin-left: 2px; }

/**
 * 1. Deliberately disable only webkit appearance. If we disable it in Firefox, we get a really
 *    ugly default appearance which we can't customize, so our best option is to give Firefox
 *    control over the checkbox's appearance.
 * 2. Override default styles (possibly from Bootstrap).
 */
.kuiCheckBox {
  -webkit-appearance: none;
  /* 1 */
  background-color: #FFFFFF;
  border: 1px solid #BEBEBE;
  border-radius: 4px;
  width: 16px;
  height: 16px;
  line-height: 1.5 !important;
  /* 2 */
  margin: 0 !important;
  /* 2 */
  font: "Open Sans", Helvetica, Arial, sans-serif !important;
  /* 2 */
  font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
  /* 2 */
  font-size: 10px !important;
  /* 2 */
  -webkit-transition: background-color 0.1s linear;
  transition: background-color 0.1s linear; }
  .kuiCheckBox:before {
    position: relative;
    top: -0.05em;
    left: 0.15em;
    font-family: FontAwesome;
    content: "\F00C";
    font-size: 1em;
    opacity: 0;
    color: #ffffff;
    -webkit-transition: opacity 0.1s linear;
    transition: opacity 0.1s linear; }
  .kuiCheckBox:checked {
    border-color: #328CAA;
    background-color: #328CAA; }
    .kuiCheckBox:checked:before {
      opacity: 1; }
  .kuiCheckBox:focus {
    z-index: 1;
    /* 1 */
    outline: 1px solid #6EADC1 !important;
    /* 2 */
    outline-offset: 2px !important;
    /* 2 */ }
  .kuiCheckBox:disabled {
    opacity: 0.3;
    cursor: not-allowed; }

/**
 * 1. Embedded SVG of fa-caret-down (https://github.com/encharm/Font-Awesome-SVG-PNG/blob/master/black/svg/caret-down.svg).
 * 2. Make room on right side for the caret.
 */
.kuiSelect {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  padding: 3px 12px 4px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  background-color: #ffffff;
  border: 1px solid #DEDEDE;
  color: #191E23;
  border-radius: 4px;
  -webkit-transition: border-color 0.1s linear;
  transition: border-color 0.1s linear;
  /**
   * 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
   *    We only want invalid inputs to appear invalid after the user has had a chance to interact
   *    with it.
   */
  padding-right: 30px;
  /* 2 */
  background-image: url('data:image/svg+xml;utf8,<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1408 704q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45z"/></svg>');
  /* 1 */
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: calc(100% - 8px);
  /* 2 */ }
  .kuiSelect:invalid:not(.ng-untouched) {
    /* 1 */
    border-color: #D86051; }
  .kuiSelect:focus {
    outline: none;
    border-color: #6EADC1; }
  .kuiSelect:disabled {
    opacity: 0.4;
    cursor: not-allowed; }

.kuiTextArea {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  padding: 3px 12px 4px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  background-color: #ffffff;
  border: 1px solid #DEDEDE;
  color: #191E23;
  border-radius: 4px;
  -webkit-transition: border-color 0.1s linear;
  transition: border-color 0.1s linear;
  /**
   * 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
   *    We only want invalid inputs to appear invalid after the user has had a chance to interact
   *    with it.
   */ }
  .kuiTextArea:invalid:not(.ng-untouched) {
    /* 1 */
    border-color: #D86051; }
  .kuiTextArea:focus {
    outline: none;
    border-color: #6EADC1; }
  .kuiTextArea:disabled {
    opacity: 0.4;
    cursor: not-allowed; }

.kuiTextInput {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  padding: 3px 12px 4px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  background-color: #ffffff;
  border: 1px solid #DEDEDE;
  color: #191E23;
  border-radius: 4px;
  -webkit-transition: border-color 0.1s linear;
  transition: border-color 0.1s linear;
  /**
   * 1. Angular will add an ng-untouched class to an input if it hasn't been touched yet.
   *    We only want invalid inputs to appear invalid after the user has had a chance to interact
   *    with it.
   */ }
  .kuiTextInput:invalid:not(.ng-untouched) {
    /* 1 */
    border-color: #D86051; }
  .kuiTextInput:focus {
    outline: none;
    border-color: #6EADC1; }
  .kuiTextInput:disabled {
    opacity: 0.4;
    cursor: not-allowed; }

/**
 * 1. Copied from FontAwesome's .fa class. We use a custom class to make it easier to migrate away
 *    from FontAwesome someday. When we do migrate away, we can just update this definition.
 */
.kuiIcon {
  display: inline-block;
  /* 1 */
  font: normal normal normal 14px/1 FontAwesome;
  /* 1 */
  font-size: inherit;
  /* 1 */
  text-rendering: auto;
  /* 1 */
  -webkit-font-smoothing: antialiased;
  /* 1 */
  -moz-osx-font-smoothing: grayscale;
  /* 1 */ }

.kuiIcon--success {
  color: #417505; }

.kuiIcon--warning {
  color: #ffac15; }

.kuiIcon--error {
  color: #D86051; }

.kuiInfoPanel {
  padding: 20px;
  line-height: 1.5; }

.kuiInfoPanel--warning {
  background-color: #FFF6E4; }

.kuiLink {
  color: #3CAED2;
  text-decoration: none; }
  .kuiLink:visited, .kuiLink:active {
    color: #3CAED2; }
  .kuiLink:hover {
    color: #006E8A;
    text-decoration: underline; }

.kuiLoadingItems {
  padding: 30px;
  font-size: 18px;
  color: #9fa3a7;
  line-height: 1.5; }

/**
 * 1. Breadcrumbs are placed in the top-left corner and need to be bumped over
 *    a bit.
 */
.kuiLocalBreadcrumbs {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  height: 100%;
  padding-left: 10px;
  /* 1 */ }

.kuiLocalBreadcrumb + .kuiLocalBreadcrumb {
  margin-left: 6px; }
  .kuiLocalBreadcrumb + .kuiLocalBreadcrumb:before {
    content: '/';
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    margin-right: 4px;
    color: #5a5a5a; }
    .theme-dark .kuiLocalBreadcrumb + .kuiLocalBreadcrumb:before {
      color: #a5a5a5; }

.kuiLocalBreadcrumb:last-child .kuiLocalBreadcrumb__link {
  color: #2d2d2d;
  cursor: default; }
  .kuiLocalBreadcrumb:last-child .kuiLocalBreadcrumb__link:hover {
    text-decoration: none; }
  .theme-dark .kuiLocalBreadcrumb:last-child .kuiLocalBreadcrumb__link {
    color: #cecece; }

.kuiLocalBreadcrumb__link {
  font-size: 14px;
  color: #5a5a5a;
  text-decoration: none; }
  .kuiLocalBreadcrumb__link:hover {
    text-decoration: underline; }
  .theme-dark .kuiLocalBreadcrumb__link {
    color: #dedede; }

.kuiLocalBreadcrumb__emphasis {
  font-weight: 700; }

.kuiLocalDropdown {
  position: relative;
  padding: 10px 10px 14px;
  background-color: #f6f6f6;
  line-height: 20px; }
  .theme-dark .kuiLocalDropdown {
    background-color: #525252; }

.kuiLocalDropdownCloseButton {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-color: transparent;
  padding: 4px;
  border: none;
  position: absolute;
  top: 1px;
  right: 5px;
  font-size: 16px;
  color: #2d2d2d;
  cursor: pointer;
  opacity: 0.35; }
  .kuiLocalDropdownCloseButton:hover {
    opacity: 1; }
  .theme-dark .kuiLocalDropdownCloseButton {
    color: #cecece; }

.kuiLocalDropdownPanels {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex; }

.kuiLocalDropdownPanel {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 0%;
      -ms-flex: 1 1 0%;
          flex: 1 1 0%; }

.kuiLocalDropdownPanel--left {
  margin-right: 30px; }

.kuiLocalDropdownPanel--right {
  margin-left: 30px; }

.kuiLocalDropdownTitle {
  margin-bottom: 12px;
  font-size: 18px;
  color: #2d2d2d; }
  .theme-dark .kuiLocalDropdownTitle {
    color: #cecece; }

.kuiLocalDropdownSection {
  margin-bottom: 16px; }
  .kuiLocalDropdownSection:last-child {
    margin-bottom: 0; }

.kuiLocalDropdownHeader {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
  margin-bottom: 6px; }

.kuiLocalDropdownHeader__label {
  font-size: 14px;
  font-weight: 700;
  color: #2d2d2d; }
  .theme-dark .kuiLocalDropdownHeader__label {
    color: #cecece; }

.kuiLocalDropdownHeader__actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex; }

.kuiLocalDropdownHeader__action {
  color: #3CAED2;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer; }
  .kuiLocalDropdownHeader__action + .kuiLocalDropdownHeader__action {
    margin-left: 10px; }
  .kuiLocalDropdownHeader__action:hover, .kuiLocalDropdownHeader__action:active {
    color: #105A73; }
  .theme-dark .kuiLocalDropdownHeader__action {
    color: #b7e2ea; }
    .theme-dark .kuiLocalDropdownHeader__action:hover, .theme-dark .kuiLocalDropdownHeader__action:active {
      color: #def2f6; }

.kuiLocalDropdownInput {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 5px 15px;
  font-size: 14px;
  color: #2d2d2d;
  background-color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 4px; }
  .theme-dark .kuiLocalDropdownInput {
    color: #cecece;
    background-color: #444444;
    border-color: #444444; }

.kuiLocalDropdownFormNote {
  font-size: 14px;
  color: #737373; }
  .theme-dark .kuiLocalDropdownFormNote {
    color: #a2a2a2; }

.kuiLocalDropdownWarning {
  margin-bottom: 16px;
  padding: 6px 10px;
  font-size: 14px;
  color: #2d2d2d;
  background-color: #e4e4e4; }
  .theme-dark .kuiLocalDropdownWarning {
    color: #cecece;
    background-color: #636363; }

.kuiLocalDropdownHelpText {
  margin-bottom: 16px;
  font-size: 14px;
  color: #2D2D2D; }
  .theme-dark .kuiLocalDropdownHelpText {
    color: #9e9e9e; }

.kuiLocalMenu {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  height: 100%; }

.kuiLocalMenuItem {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  height: 100%;
  padding: 0 10px;
  font-size: 14px;
  background-color: transparent;
  color: #5a5a5a;
  border: 0;
  cursor: pointer; }
  .kuiLocalMenuItem:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #000000; }
  .kuiLocalMenuItem.kuiLocalMenuItem-isSelected {
    background-color: #f6f6f6; }
  .kuiLocalMenuItem.kuiLocalMenuItem-isDisabled {
    opacity: 0.5;
    cursor: default; }
    .kuiLocalMenuItem.kuiLocalMenuItem-isDisabled:hover {
      background-color: transparent;
      color: #5a5a5a; }
  .theme-dark .kuiLocalMenuItem {
    color: #dedede; }
    .theme-dark .kuiLocalMenuItem:hover {
      background-color: #000000;
      color: #ffffff; }
    .theme-dark .kuiLocalMenuItem.kuiLocalMenuItem-isSelected {
      background-color: #525252; }
    .theme-dark .kuiLocalMenuItem.kuiLocalMenuItem-isDisabled:hover {
      background-color: transparent;
      color: #dedede; }

.kuiLocalMenuItem__icon {
  margin-right: 5px;
  margin-bottom: -1px; }

/**
 * 1. Match height of logo in side bar, but allow it to expand to accommodate
 *    dropdown.
 */
.kuiLocalNav {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
  min-height: 70px;
  /* 1 */
  color: #2d2d2d;
  background-color: #e4e4e4; }
  .theme-dark .kuiLocalNav {
    color: #cecece;
    background-color: #333333; }

.kuiLocalNavRow {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
  height: 32px; }

.kuiLocalNavRow__section {
  height: 100%; }

.kuiLocalNavRow--secondary {
  height: 38px;
  padding: 0 10px; }

.kuiLocalSearch {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  width: 100%;
  height: 30px; }

.kuiLocalSearchInput {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 100%;
      -ms-flex: 1 1 100%;
          flex: 1 1 100%;
  padding: 5px 15px;
  font-size: 14px;
  color: #2d2d2d;
  background-color: #ffffff;
  border: 2px solid #ffffff;
  border-bottom-left-radius: 4px;
  border-top-left-radius: 4px;
  border-bottom-right-radius: 0;
  border-top-right-radius: 0; }
  .kuiLocalSearchInput.kuiLocalSearchInput-isInvalid {
    border-color: #e74C3c; }
  .theme-dark .kuiLocalSearchInput {
    color: #cecece;
    background-color: #4e4e4e;
    border-color: #4e4e4e; }
    .theme-dark .kuiLocalSearchInput.kuiLocalSearchInput-isInvalid {
      border-color: #ff6758; }

.kuiLocalSearchButton {
  width: 43px;
  height: 30px;
  font-size: 14px;
  color: #ffffff;
  background-color: #9c9c9c;
  border: 0;
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
  border-bottom-right-radius: 4px;
  border-top-right-radius: 4px; }
  .theme-dark .kuiLocalSearchButton {
    color: #ffffff;
    background-color: #777777; }

/**
 * 1. We want the bottom border on selected tabs to be flush with the bottom of the container.
 */
.kuiLocalTabs {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
      -ms-flex-align: end;
          align-items: flex-end;
  height: 100%; }

/**
   * 1. Make sure the bottom border is flush with the bottom of the LocalNav.
   */
.kuiLocalTab {
  padding: 5px 0 6px 0;
  font-size: 18px;
  line-height: 22px;
  /* 1 */
  color: #5a5a5a;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  cursor: pointer; }
  .kuiLocalTab:hover, .kuiLocalTab:active {
    color: #000000; }
    .theme-dark .kuiLocalTab:hover, .theme-dark .kuiLocalTab:active {
      color: #ffffff; }
  .kuiLocalTab.kuiLocalTab-isSelected {
    color: #000000;
    border-bottom-color: #000000;
    cursor: default; }
    .theme-dark .kuiLocalTab.kuiLocalTab-isSelected {
      color: #ffffff;
      border-bottom-color: #ffffff; }
  .kuiLocalTab + .kuiLocalTab {
    margin-left: 15px; }
  .theme-dark .kuiLocalTab {
    color: #dedede; }

.kuiLocalTitle {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  height: 100%;
  padding-left: 10px;
  font-size: 14px;
  font-weight: bold; }

/**
 * 1. Setting to inline-block guarantees the same height when applied to both
 *    button elements and anchor tags.
 * 2. Fit MicroButton inside of Table rows without pushing them taller.
 */
.kuiMicroButton {
  display: inline-block;
  /* 1 */
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  cursor: pointer;
  padding: 2px 5px;
  border: 1px solid transparent;
  color: #9fa3a7;
  background-color: transparent;
  font-size: 12px;
  line-height: 1;
  /* 2 */ }
  .kuiMicroButton:hover {
    color: #191E23; }

.kuiMicroButtonGroup {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex; }
  .kuiMicroButtonGroup .kuiMicroButton + .kuiMicroButton {
    margin-left: 2px; }

.kuiNoItems {
  padding: 30px;
  font-size: 18px;
  color: #9fa3a7;
  line-height: 1.5; }

.kuiPanel {
  border: 2px solid #E4E4E4; }

.kuiPanel--centered {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center; }

/**
 * 1. Make seamless transition from ToolBar to Table header.
 * 1. Make seamless transition from Table to ToolBarFooter header.
 */
.kuiControlledTable .kuiTable {
  border-top: none;
  /* 1 */ }

.kuiControlledTable .kuiToolBarFooter {
  border-top: none;
  /* 2 */ }

.kuiTable {
  width: 100%;
  border: 2px solid #E4E4E4;
  border-collapse: collapse;
  background-color: #FFFFFF; }

.kuiTableHeaderCell {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  padding: 7px 8px 8px;
  text-align: left;
  color: #a7a7a7; }
  .kuiTableHeaderCell:last-child {
    padding-right: 16px; }

/**
 * 1. Prevent rapid clicking from selecting text.
 */
.kuiTableHeaderCell--sortable {
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  /* 1 */
  cursor: pointer; }
  .kuiTableHeaderCell--sortable:hover:not(.kuiTableHeaderCell-isSorted) .kuiTableSortIcon {
    opacity: 0.4; }

.kuiTableHeaderCell--alignRight {
  text-align: right; }

.kuiTableSortIcon {
  pointer-events: none; }

.kuiTableRow:hover .kuiTableRowHoverReveal {
  display: inline-block; }

.kuiTableRowHoverReveal {
  display: none; }

.kuiTableRowCell {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  padding: 7px 8px 8px;
  text-align: left;
  color: #191E23;
  border-top: 1px solid #E4E4E4; }
  .kuiTableRowCell:last-child {
    padding-right: 16px; }

/**
   * 1. Vertically align all children.
   */
.kuiTableRowCell__liner {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; }
  .kuiTableRowCell__liner * > {
    vertical-align: middle;
    /* 1 */ }

.kuiTableRowCell--alignRight {
  text-align: right; }
  .kuiTableRowCell--alignRight .kuiTableRowCell__liner {
    text-align: right; }

/**
 * 1. Rendered width of cell with checkbox inside of it.
 * 2. Align checkbox with text in other cells.
 */
.kuiTableHeaderCell--checkBox,
.kuiTableRowCell--checkBox {
  width: 28px;
  /* 1 */
  padding-right: 0;
  line-height: 1; }

.kuiTabs {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  border-bottom: 2px solid #E4E4E4; }

/**
   * 1. Override button styles (some of which are from Bootstrap).
   */
.kuiTab {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  /* 1 */
  cursor: pointer;
  padding: 10px 30px;
  font-size: 14px;
  color: #9fa3a7;
  background-color: #ffffff;
  /* 1 */
  border: 1px solid #E4E4E4;
  border-bottom: none;
  border-radius: 0;
  /* 1 */ }
  .kuiTab + .kuiTab {
    border-left: none; }
  .kuiTab:focus {
    color: #3CAED2;
    z-index: 1;
    outline: 1px solid #6EADC1 !important;
    /* 1 */ }
  .kuiTab:hover:not(.kuiTab-isSelected) {
    color: #006E8A; }
  .kuiTab:active {
    outline: none;
    border-color: #ffffff;
    box-shadow: none;
    /* 1 */
    color: #3CAED2 !important; }
  .kuiTab.kuiTab-isSelected {
    color: #191E23;
    background-color: #F2F2F2;
    cursor: default; }

.kuiToolBar {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
  min-height: 30px;
  /* 1 */
  padding: 10px;
  height: 50px;
  background-color: #E4E4E4; }
  .kuiToolBar .kuiButton--basic {
    color: #5a5a5a;
    background-color: #FFFFFF; }
    .kuiToolBar .kuiButton--basic:disabled {
      color: #a7a7a7;
      background-color: #F3F3F3; }
  .kuiToolBar .kuiSelect {
    border-color: #ffffff; }
    .kuiToolBar .kuiSelect:focus {
      outline: none;
      border-color: #6EADC1; }

.kuiToolBarSection {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
  margin-left: 25px;
  margin-right: 25px; }
  .kuiToolBarSection:not(:first-child):not(:last-child):not(:only-child) {
    -webkit-box-pack: center;
    -webkit-justify-content: center;
        -ms-flex-pack: center;
            justify-content: center;
    /* 3 */ }
  .kuiToolBarSection:first-child {
    margin-left: 0; }
  .kuiToolBarSection:last-child {
    margin-right: 0;
    -webkit-box-flex: 0;
    -webkit-flex: 0 1 auto;
        -ms-flex: 0 1 auto;
            flex: 0 1 auto;
    /* 4 */
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
        -ms-flex-pack: end;
            justify-content: flex-end;
    /* 5 */ }
  .kuiToolBarSection:only-child {
    margin-left: auto;
    /* 1 */ }
  .kuiToolBarSection > * + * {
    margin-left: 10px;
    /* 1 */ }

/**
 * 1. Override Bar styles and put Search on the left side.
 */
.kuiToolBar--searchOnly .kuiToolBarSearch {
  margin-left: 0 !important;
  /* 1 */ }

.kuiToolBarFooter {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
  min-height: 30px;
  /* 1 */
  padding: 10px;
  height: 40px;
  background-color: #ffffff;
  border: 2px solid #E4E4E4; }

.kuiToolBarFooterSection {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
  margin-left: 25px;
  margin-right: 25px; }
  .kuiToolBarFooterSection:not(:first-child):not(:last-child):not(:only-child) {
    -webkit-box-pack: center;
    -webkit-justify-content: center;
        -ms-flex-pack: center;
            justify-content: center;
    /* 3 */ }
  .kuiToolBarFooterSection:first-child {
    margin-left: 0; }
  .kuiToolBarFooterSection:last-child {
    margin-right: 0;
    -webkit-box-flex: 0;
    -webkit-flex: 0 1 auto;
        -ms-flex: 0 1 auto;
            flex: 0 1 auto;
    /* 4 */
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
        -ms-flex-pack: end;
            justify-content: flex-end;
    /* 5 */ }
  .kuiToolBarFooterSection:only-child {
    margin-left: auto;
    /* 1 */ }
  .kuiToolBarFooterSection > * + * {
    margin-left: 10px;
    /* 1 */ }

/**
 * 1. Put 10px of space between each child.
 */
.kuiToolBarSearch {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  margin-left: 25px;
  margin-right: 25px;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
  max-width: 800px;
  line-height: 1.5; }
  .kuiToolBarSearch:first-child {
    margin-left: 0; }
  .kuiToolBarSearch:last-child {
    margin-right: 0; }
  .kuiToolBarSearch > * + * {
    margin-left: 10px;
    /* 1 */ }

.kuiToolBarSearchBox {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
  position: relative; }

.kuiToolBarSearchBox__icon {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 14px;
  color: #ACACAC; }

/**
   * 1. Fix inherited styles (possibly from Bootstrap).
   */
.kuiToolBarSearchBox__input {
  width: 100%;
  min-width: 200px;
  padding: 5px 12px 6px 28px;
  background-color: #FFFFFF;
  color: #191E23;
  border: 1px solid #FFFFFF;
  border-radius: 4px;
  font-size: 14px;
  border: 1px solid #ffffff;
  line-height: normal;
  /* 1 */ }
  .kuiToolBarSearchBox__input:focus {
    outline: none;
    border-color: #6EADC1; }

/*
 * 1. We don't want the text to take up two lines and overflow the ToolBar.
 */
.kuiToolBarText {
  font-size: 14px;
  line-height: 1.5;
  color: #5A5A5A;
  white-space: nowrap;
  /* 1 */ }


text:
local s = [===[
local function <<operator>>(x, y, optargs)
  local expander = require 'Q/OPERATORS/F1S1OPF2/lua/expander_f1s1opf2'
  if type(x) == "lVector" then
    local status, col = pcall(expander, "<<operator>>", x, y, optargs)
    if ( not status ) then print(col) end
    assert(status, "Could not execute <<operator>>")
    return col
  end
  assert(nil, "Bad arguments to f1s1ofp2")
end
T.<<operator>> = <<operator>>
require('Q/q_export').export('<<operator>>', <<operator>>)
    ]===]

local pow_s = [===[
local function <<operator>>(x, y, optargs)
  local expander = require 'Q/OPERATORS/F1S1OPF2/lua/expander_f1s1opf2'
  if type(x) == "lVector" then
    local op
    assert(y)
    if type(y) == "Scalar" then
      y = y:to_num()
    end
    if y == 2 then
      op = "sqr"
    else
      op = "pow"
    end
    local status, col = pcall(expander, op, x, y, optargs)
    if ( not status ) then print(col) end
    assert(status, "Could not execute <<operator>>")
    return col
  end
  assert(nil, "Bad arguments to f1s1ofp2")
end
T.<<operator>> = <<operator>>
require('Q/q_export').export('<<operator>>', <<operator>>)
    ]===]

io.output("_f1s1opf2.lua")
io.write("local T = {} \n")
local ops = assert(require 'Q/OPERATORS/F1S1OPF2/lua/operators')
local T = {}
for i, op in ipairs(ops) do
  if op == "pow" then
    T[#T+1] = string.gsub(pow_s, "<<operator>>", op)
  else
    T[#T+1] = string.gsub(s, "<<operator>>", op)
  end
  loadstring(T[#T])
end
local x = table.concat(T, "\n")
io.write(x)
io.write("\nreturn T\n")
io.close()
-- TODO Is it necessary to create a file? Will the loadstring be enough

redpajama_set_name: RedPajamaGithub


text:
require_relative "../lib/citero"

def pnx_data
<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<record>
  <display>
    <type>type-test</type>
    <publisher>publisher-test</publisher>
    <title>title-test</title>
    <creationdate>creationdate-test</creationdate>
    <language>language-test</language>
    <edition>edition-test</edition>
    <format>format-test</format>
    <identifier>identifier-test</identifier>
    <creator>creator-test</creator>
    <contributor>contributor-test</contributor>
    <description>description-test</description>
    <subject>subject-test</subject>
  </display>
  <addata>
    <pub>pub-test</pub>
    <cop>cop-test</cop>
    <issn>issn-test</issn>
    <eissn>eissn-test</eissn>
    <isbn>isbn-test</isbn>
    <date>date-test</date>
    <date>date-test</date>
    <jtitle>jtitle-test</jtitle>
    <addau>addau-test</addau>
  </addata>
  <enrichment>
    <classificationlcc>classificationlcc-test</classificationlcc>
  </enrichment>
  <control>
    <recordid>recordid-test</recordid>
  </control>
  <search>
    <subject>subject-test</subject>
    <creationdate>creationdate-test</creationdate>
  </search>
</record>

EOF
end

def pnx_data_book
<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<record>
  <display>
    <type>book</type>
    <publisher>publisher-test</publisher>
    <title>title-test</title>
    <creationdate>creationdate-test</creationdate>
    <language>language-test</language>
    <edition>edition-test</edition>
    <format>format-test</format>
    <identifier>identifier-test</identifier>
    <creator>creator-test</creator>
    <contributor>contributor-test</contributor>
    <description>description-test</description>
    <subject>subject-test</subject>
  </display>
  <addata>
    <pub>pub-test</pub>
    <cop>cop-test</cop>
    <issn>issn-test</issn>
    <eissn>eissn-test</eissn>
    <isbn>isbn-test</isbn>
    <date>date-test</date>
    <date>date-test</date>
    <jtitle>jtitle-test</jtitle>
    <addau>addau-test</addau>
  </addata>
  <enrichment>
    <classificationlcc>classificationlcc-test</classificationlcc>
  </enrichment>
  <control>
    <recordid>recordid-test</recordid>
  </control>
  <search>
    <subject>subject-test</subject>
    <creationdate>creationdate-test</creationdate>
  </search>
</record>

EOF
end


text:
.. _argus_monitoring_index:

Argus Monitoring
================

.. toctree::
   :maxdepth: 2

   emi_nagios_probes


text:
import sys
import os
import re
import fnmatch
import string

def cmp_ipc (insns_persrc, active_cycle):
  ipc = []
  for i,j in zip (insns_persrc, active_cycle):
    ipc = ipc + [ round (float (i) / float(j),3)]
  #print ipc
  return ipc

# compute weighted speedup
def cmp_ws (ipc_alone, ipc_share):
  if len(ipc_alone) != len(ipc_share):
    raise Exception ("not enough ipc element")
  ws = 0
  for i,j in zip (ipc_alone, ipc_share):
    if i == 0:
      raise Exception ("ipc_alone is 0")
    ws = ws + j/i
  #print ws
  return ws

#compute harmonic speedup
def cmp_hs (ipc_alone, ipc_share):
  if len(ipc_alone) != len(ipc_share):
    raise Exception ("not enough ipc element")
  temp = 0
  for i,j in zip (ipc_alone, ipc_share):
    if j == 0:
      raise Exception ("ipc_share is 0")
    temp = temp + i/j
  if temp == 0:
    raise Exception ("temp in cmp_hs() is 0")
  hs = len (ipc_share) / temp
  #print hs
  return hs

#compute the actual slowdown
def cmp_real_sd (ipc_alone, ipc_share):
  slowdown = []
  for i,j in zip (ipc_alone, ipc_share):
    slowdown = slowdown + [round(i/j,3)]
  #print slowdown
  return slowdown

#compute unfairness
def cmp_uf (ipc_alone, ipc_share):
  if len(ipc_alone) != len(ipc_share):
    raise Exception ("not enough ipc element")
  slowdown = cmp_real_sd(ipc_alone, ipc_share)
  #unfairness = max (slowdown) - min (slowdown)
  unfairness = max (slowdown)
  print unfairness
  return unfairness


text:
package org.alitouka.spark.dbscan

import org.alitouka.spark.dbscan.spatial._
import org.alitouka.spark.dbscan.spatial.rdd.{PointsPartitionedByBoxesRDD, BoxPartitioner}
import org.alitouka.spark.dbscan.spatial.BoundsInOneDimension._

class DistributedDbscanSuite extends DbscanSuiteBase with TestDatasets {

  val ordering = implicitly[Ordering[PointSortKey]]

  val bigBox = new Box ((-Double.MaxValue, Double.MaxValue), (-Double.MaxValue, Double.MaxValue))
  val boxes = BoxPartitioner.assignPartitionIdsToBoxes(List (bigBox))
  val broadcastBoxes = sc.broadcast(boxes)
  val broadcastNumberOfDimensions = sc.broadcast(2)
  val defaultBoundingBox = new Box ((0.0, 5.0, true), (0.0, 5.0, true))

  val pointsInDifferentBoxes = Array (create2DPoint (0.1, 0.9, 1, 4, 1, 1), create2DPoint (0.2, 0.9, 2, 4, 1, 2),
    create2DPoint (0.1, 1.1, 3, 4, 2, 3), create2DPoint (0.2, 1.1, 4, 4, 2, 4),
    create2DPoint (2.1, 0.9, 5, 3, 1, 5), create2DPoint (2.1, 1.1, 6, 3, 2, 6), create2DPoint (2.1, 0.5, 55, 3, 1, 5),
    create2DPoint (5.1, 0.9, 7, 3, 1, 7), create2DPoint (5.1, 1.1, 8, 2, 2, DbscanModel.UndefinedCluster),
    create2DPoint (5.1, 0.0, 77, 2, 1, 7))

  test ("DistributedDbscan.generateMappings should map 2 clusters and 1 border point") {
    val settings = new DbscanSettings ().withEpsilon (1).withNumberOfPoints (3)

    val impl = new DistributedDbscan(settings)

    val (mappings, borderPoints) = impl.generateMappings(pointsInDifferentBoxes)

    mappings.size should be (2)
    borderPoints.size should be (1)

    val mapping1 = mappings.find ( _._1.contains(1) ).get._1
    val mapping2 = mappings.find ( _._1.contains(5) ).get._1

    mapping1.size should be (4)
    mapping2.size should be (2)

    mapping1 should contain (1)
    mapping1 should contain (2)
    mapping1 should contain (3)

    mapping2 should contain (6)

    borderPoints should contain ((8, 7))
  }

  test("DistributedDbscan.generateMappings should map 2 clusters and no border points") {
    val settings = new DbscanSettings ().withEpsilon (1).withNumberOfPoints (3).withTreatBorderPointsAsNoise(true)

    val impl = new DistributedDbscan(settings)

    val (mappings, borderPoints) = impl.generateMappings(pointsInDifferentBoxes)

    mappings.size should be (2)
    borderPoints.size should be (0)

    val mapping1 = mappings.find ( _._1.contains(1) ).get._1
    val mapping2 = mappings.find ( _._1.contains(5) ).get._1

    mapping1.size should be (4)
    mapping2.size should be (2)

    mapping1 should contain (1)
    mapping1 should contain (2)
    mapping1 should contain (3)

    mapping2 should contain (6)
  }

  test ("DistributedDbscan.reassignClusterId should group all points into 3 clusters") {
//    val settings = new DbscanSettings ().withEpsilon (1).withNumberOfPoints (3)
//
//    val impl = new DistributedDbscan(settings)
//
//    val (mappings, borderPoints) = impl.generateMappings(pointsInDifferentBoxes)
//
//    val clusteredIterator = pointsInDifferentBoxes.map ( pt => impl.reassignClusterId(pt, mappings, borderPoints) ).map ( pt => (new PointSortKey(pt), pt)).iterator
//
//    val (noise, clusters) = groupPointsAndSeparateNoiseFromClusters(clusteredIterator)
//
//    clusters.size should be (3)
//    noise.size should be (0)

  }

  test ("DistributedDbscan.findClustersInOnePartition should coalesce all points into one cluster") {

    val settings = new DbscanSettings ().withEpsilon (0.8).withNumberOfPoints (4)
    val sortedIterator = sortDataset (dataset1, settings)
    val impl = new DistributedDbscan(settings)
    val clusteredIterator = impl.findClustersInOnePartition(sortedIterator, defaultBoundingBox)
    val (noise, clusters) = groupPointsAndSeparateNoiseFromClusters(clusteredIterator)

    clusters.size should be (1)

    val theOnlyCluster = clusters (0)

    val corePoint = create2DPoint (0.5, 0.5)
    theOnlyCluster.size should be (4)
    theOnlyCluster should contain (corePoint)
  }

  test("DistributedDbscan.findClustersInOnePartition should find one 4-point cluster and one noise point") {

    val settings = new DbscanSettings ().withEpsilon (0.8).withNumberOfPoints (4)
    val sortedIterator = sortDataset (dataset1_1, settings)
    val impl = new DistributedDbscan(settings)
    val clusteredIterator = impl.findClustersInOnePartition(sortedIterator, defaultBoundingBox)
    val (noise, clusters) = groupPointsAndSeparateNoiseFromClusters(clusteredIterator)

    clusters.size should be (1)

    val theOnlyCluster = clusters (0)
    val corePoint = create2DPoint (0.5, 0.5)
    theOnlyCluster.size should be (4)
    theOnlyCluster should contain (corePoint)

    noise.size should be (1)
    noise should contain (create2DPoint (0.5, 5.0))
  }

  test("DistributedDbscan.findClustersInOnePartition should find 2 clusters, and one of the points may belong to any cluster") {

    val settings = new DbscanSettings ().withEpsilon (0.8).withNumberOfPoints (4)

    val sortedIterator = sortDataset (dataset2, settings)
    val impl = new DistributedDbscan(settings)
    val clusteredIterator = impl.findClustersInOnePartition(sortedIterator, defaultBoundingBox)
    val (noise, clusters) = groupPointsAndSeparateNoiseFromClusters(clusteredIterator)

    clusters.size should be (2)

    val corePoint1 = create2DPoint (0.5, 0.5)
    val corePoint2 = create2DPoint (1.5, 0.5)
    val ambiguousPoint = create2DPoint (1.0, 0.5)

    val cluster1 = findClusterWithPoint2 (clusters, corePoint1).get.toArray
    val cluster2 = findClusterWithPoint2 (clusters, corePoint2).get.toArray

    if (cluster1.contains (ambiguousPoint)) {
      cluster1.size should be (4)
      cluster2.size should be (3)
    }
    else {
      cluster1.size should be (3)
      cluster2.size should be (4)
      cluster2 should contain (ambiguousPoint)
    }
  }

  test("DistributedDbscan.findClustersInOnePartition should find 2 clusters and 3 noise points") {
    val settings = new DbscanSettings ().withEpsilon (2.0).withNumberOfPoints (3)

    val sortedIterator = sortDataset (dataset0_1, settings)
    val impl = new DistributedDbscan(settings)
    val clusteredIterator = impl.findClustersInOnePartition(sortedIterator,
      new Box ((0.0, 16.0, true), (0.0, 16.0, true)))

    val (noise, clusters) = groupPointsAndSeparateNoiseFromClusters(clusteredIterator)

    clusters.size should be (2)

    val cluster1 = findClusterWithPoint2 (clusters, create2DPoint (1.0, 1.0)).get.toArray
    val cluster2 = findClusterWithPoint2 (clusters, create2DPoint (15.0, 14.0)).get.toArray

    cluster1.size should be (4)
    cluster2.size should be (3)
    noise.size should be (3)
  }

  test("DistributedDbscan.findClustersInOnePartition should find 2 clusters and 2 noise points") {
    val settings = new DbscanSettings ().withEpsilon (0.8).withNumberOfPoints (3)

    val sortedIterator = sortDataset (dataset4, settings)
    val impl = new DistributedDbscan(settings)
    val clusteredIterator = impl.findClustersInOnePartition(sortedIterator, defaultBoundingBox)
    val (noise, clusters) = groupPointsAndSeparateNoiseFromClusters(clusteredIterator)

    clusters.size should be (2)

    val cluster1 = findClusterWithPoint2 (clusters, create2DPoint (0.0, 0.0)).get.toArray
    val cluster2 = findClusterWithPoint2 (clusters, create2DPoint (4.0, 0.0)).get.toArray

    cluster1 should not equal (cluster2)
    cluster1.size should be (14)
    cluster2.size should be (14)
    noise.size should be (2)
  }

  test("DistributedDbscan.findClustersInOnePartition should find 2 clusters, where 2 points can belong to any cluster") {
    val settings = new DbscanSettings ().withEpsilon (1.0).withNumberOfPoints (4)
    val sortedIterator = sortDataset (dataset4, settings)
    val impl = new DistributedDbscan(settings)
    val clusteredIterator = impl.findClustersInOnePartition(sortedIterator, defaultBoundingBox)
    val (noise, clusters) = groupPointsAndSeparateNoiseFromClusters(clusteredIterator)

    clusters.size should be (2) // 2 clusters, no noise

    val ambiguousPoint1 = create2DPoint (2.0, 0.0)
    val ambiguousPoint2 = create2DPoint(2.0, 2.0)

    val cluster1 = findClusterWithPoint2 (clusters, create2DPoint (0.0, 0.0)).get.toArray
    val cluster2 = findClusterWithPoint2 (clusters, create2DPoint (4.0, 0.0)).get.toArray

    var expectedCluster1Size = 14
    var expectedCluster2Size = 14

    if (cluster1.contains(ambiguousPoint1)) {
      expectedCluster1Size += 1
    }
    else {
      expectedCluster2Size += 1
    }

    if (cluster1.contains(ambiguousPoint2)) {
      expectedCluster1Size += 1
    }
    else {
      expectedCluster2Size += 1
    }

    cluster1.size should be (expectedCluster1Size)
    cluster2.size should be (expectedCluster2Size)
  }

  test ("DistributedDbscan.findClustersInOnePartition * should find one 1-point cluster and 3 noise points") {

    val settings = new DbscanSettings ().withEpsilon(0.8).withNumberOfPoints(4).withTreatBorderPointsAsNoise(true)

    val sortedIterator = sortDataset (dataset1, settings)
    val impl = new DistributedDbscan(settings)
    val clusteredIterator = impl.findClustersInOnePartition(sortedIterator, defaultBoundingBox)
    val (noise, clusters) = groupPointsAndSeparateNoiseFromClusters(clusteredIterator)

    clusters.size should be (1)

    val corePoint = create2DPoint (0.5, 0.5)
    val theOnlyCluster = findClusterWithPoint2 (clusters, corePoint).get.toArray
    theOnlyCluster.size should be (1)

    noise.size should be (3)
  }

  test("DistributedDbscan.findClustersInOnePartition *find one 1-point cluster and 4 noise points") {

    val settings = new DbscanSettings ().withEpsilon(0.8).withNumberOfPoints(4).withTreatBorderPointsAsNoise(true)

    val sortedIterator = sortDataset (dataset1_1, settings)
    val impl = new DistributedDbscan(settings)
    val clusteredIterator = impl.findClustersInOnePartition(sortedIterator, defaultBoundingBox)
    val (noise, clusters) = groupPointsAndSeparateNoiseFromClusters(clusteredIterator)

    clusters.size should be (1)

    val corePoint = create2DPoint (0.5, 0.5)
    val theOnlyCluster = findClusterWithPoint2 (clusters, corePoint).get.toArray
    theOnlyCluster.size should be (1)

    noise.size should be (4)
  }

  test("DistributedDbscan.findClustersInOnePartition *find 2 1-point clusters and 5 noise points") {

    val settings = new DbscanSettings ().withEpsilon(0.8).withNumberOfPoints(4).withTreatBorderPointsAsNoise(true)

    val sortedIterator = sortDataset (dataset2, settings)
    val impl = new DistributedDbscan(settings)
    val clusteredIterator = impl.findClustersInOnePartition(sortedIterator, defaultBoundingBox)
    val (noise, clusters) = groupPointsAndSeparateNoiseFromClusters(clusteredIterator)

    clusters.size should be (2)

    val corePoint1 = create2DPoint (0.5, 0.5)
    val corePoint2 = create2DPoint (1.5, 0.5)

    val cluster1 = findClusterWithPoint2 (clusters, corePoint1).get.toArray
    val cluster2 = findClusterWithPoint2 (clusters, corePoint2).get.toArray

    cluster1.size should be (1)
    cluster2.size should be (1)
    noise.size should be (5)
  }

  test("DistributedDbscan.findClustersInOnePartition *find 2 clusters and 2 noise points") {

    val settings = new DbscanSettings ().withEpsilon(1.0).withNumberOfPoints(4).withTreatBorderPointsAsNoise(true)
    val sortedIterator = sortDataset (dataset4, settings)
    val impl = new DistributedDbscan(settings)
    val clusteredIterator = impl.findClustersInOnePartition(sortedIterator, defaultBoundingBox)
    val (noise, clusters) = groupPointsAndSeparateNoiseFromClusters(clusteredIterator)

    clusters.size should be (2)

    val cluster1 = findClusterWithPoint2 (clusters, create2DPoint (0.0, 0.0)).get.toArray
    val cluster2 = findClusterWithPoint2 (clusters, create2DPoint (4.0, 0.0)).get.toArray

    cluster1.size should be (14)
    cluster2.size should be (14)
    noise.size should be (2)
  }

  private def sortDataset (data: RawDataSet, settings: DbscanSettings) = {

    val ds2 = PointsPartitionedByBoxesRDD (data, dbscanSettings = settings)
    val ds3 = new DistanceAnalyzer (settings).countNeighborsForEachPoint(ds2)

      ds3
      .collect()
      .sortWith ((x, y) => ordering.lt(x._1, y._1))
      .iterator
  }

  private def groupPointsAndSeparateNoiseFromClusters (it: Iterator[(PointSortKey, Point)]) = {
    val clustersAndNoise = groupPointsByCluster (it)
    val (noise, clusters) = clustersAndNoise.partition ( x => x.exists( p => p.clusterId == DbscanModel.NoisePoint || p.clusterId == DbscanModel.UndefinedCluster ) )

    if (!noise.isEmpty) {
      (noise.flatMap ( x => x) , clusters)
    }
    else {
      (noise, clusters)
    }
  }

  private def create2DPoint (x: Double, y: Double, id: PointId, neighbors: Int, boxId: BoxId, cluster: ClusterId): Point = {
    new Point (new PointCoordinates (Array (x, y)), id, boxId, Math.sqrt (x*x+y*y), neighbors, cluster)
  }

}


text:
from tests.integration.integration_test_case import IntegrationTestCase

class TestQuestionnaireQuestionGuidance(IntegrationTestCase):

    def test_question_guidance(self):
        # Given I launch a questionnaire with various guidance
        self.launchSurvey('test', 'question_guidance')
        self.post(action='start_questionnaire')

        # When I start the survey I am presented with the title guidance correctly

        self.assertInBody('This one has a description but no list')
        self.assertInBody('No list items below this text')
        self.assertInBody('This one has no list or description')

        # When we continue to the next page with combinations of the guidance descriptions
        self.post(action='save_continue')

        # Then I am presented with the description guidance correctly
        self.assertInBody('No title above this text, list below')
        self.assertInBody('>Item Include 1<')
        self.assertInBody('Just description, no title above this text, no list below')

        # When we continue to the next page with combinations of the guidance lists
        self.post(action='save_continue')

        # Then I am presented with the lists guidance correctly
        self.assertInBody('Title, no description, list follows')
        self.assertInBody('>Item Include 1<')
        self.assertInBody('>Item Include 4<')
        self.assertInBody('>List with no title or description 1<')

        # When we continue to the description content guidance page
        self.post(action='save_continue')

        # I can see the description content guidance
        self.assertInBody('Test show guidance content description')
        self.assertInBody('Guidance with content description')
        self.assertInBody('Show test guidance.')
        self.assertInBody('The text here is for description')

        # When we continue to the title content guidance page
        self.post(action='save_continue')

        # I can see the title content guidance
        self.assertInBody('Test show guidance content title')
        self.assertInBody('Guidance with content title')
        self.assertInBody('Show test guidance.')
        self.assertInBody('The text here is for a title')

        # When we continue to the list content guidance page
        self.post(action='save_continue')

        # I can see the list content guidance
        self.assertInBody('Test show guidance content list')
        self.assertInBody('Guidance with content list')
        self.assertInBody('Show test guidance.')
        self.assertInBody('The text here is for a list')
        self.assertInBody('Another list item')
        self.assertInBody('One more')

        # When we continue to the test all guidance page
        self.post(action='save_continue')

        # When we navigate to the block with all guidance features enabled
        # Then we are presented with the question guidance with all features enabled

        self.assertInBody('Test guidance all')
        self.assertInBody('>Include<')
        self.assertInBody('>Item Include 1<')
        self.assertInBody('>Item Include 4<')

        self.assertInBody('>Exclude<')
        self.assertInBody('>Item Exclude 1<')
        self.assertInBody('>Item Exclude 4<')

        self.assertInBody('>Other<')
        self.assertInBody('>Item Other 1<')
        self.assertInBody('>Item Other 4<')

        self.assertInBody('Guidance include description text')
        self.assertInBody('Guidance exclude description text')
        self.assertInBody('Guidance other description text')

        # When we continue we go to the summary page
        self.post(action='save_continue')
        self.assertInUrl('summary')

        # And Submit my answers
        self.post(action='submit_answers')
        self.assertInUrl('thank-you')


text:
import unittest
import mutable_test

class TestRemoveShared(unittest.TestCase):
    '''Tests for function duplicates.remove_shared.'''

    def test_general_case(self):
        '''
        Test remove_shared where there are items that appear in both lists,
        and items that appear in only one or the other list.
        '''
        list_1 = [1, 2, 3, 4, 5, 6]
        list_2 = [2, 4, 5, 7]
        list_1_expected = [1, 3, 6]
        list_2_expected = [2, 4, 5, 7]

        mutable_test.remove_shared(list_1, list_2)
        self.assertEqual(list_1, list_1_expected)
        self.assertEqual(list_2, list_2_expected)

if __name__ == '__main__':
    unittest.main(exit=False)


text:
#region Using Directives

using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows.Media;

#endregion

namespace System.Windows.Documents.Reporting
{
    /// <summary>
    /// Represents the abstract base class for all kinds of document parts. Document parts make up the content of a document.
    /// </summary>
    public abstract class DocumentPart
    {
        #region Public Abstract Methods

        /// <summary>
        /// Renders the document part.
        /// </summary>
        /// <param name="dataContext">The data context, that is to be used during the rendering. The document part can bind to the content of this data context.</param>
        /// <param name="progress">The object which is used to report the progess of the rendering process.</param>
        /// <returns>Returns a list of rendered fixed pages, which can then be added to the document.</returns>
        public abstract Task<IEnumerable<FixedPage>> RenderAsync(object dataContext, IProgress<double> progress);

        #endregion

        #region Protected Static Methods

        /// <summary>
        /// A helper method, which makes it possible to find a child dependency object within the specified dependency object.
        /// </summary>
        /// <typeparam name="T">The type of dependency object that is to be searched for.</typeparam>
        /// <param name="dependencyObject">The dependency object within is to be searched.</param>
        /// <returns>Returns the first child of the specified type that was found. If not child of the specified type was found, then <c>null</c> is returned.</returns>
        protected static T FindVisualChild<T>(DependencyObject dependencyObject) where T : DependencyObject
        {
            // Checks if a dependency object was specified, only if one was specified, the search has to be performed
            if (dependencyObject != null)
            {
                // Cycles over all direct children of the dependency object
                for (int i = 0; i < VisualTreeHelper.GetChildrenCount(dependencyObject); i++)
                {
                    // Gets the child at the current index
                    DependencyObject child = VisualTreeHelper.GetChild(dependencyObject, i);

                    // Checks if the child is of the specified type, if so then the child was found and is therefore returned
                    if (child != null && child is T)
                        return (T)child;

                    // This is a recursive depth-first search, so the children of the current child are searched recursively, if a child of the specified type could be found, then it is returned
                    child = DocumentPart.FindVisualChild<T>(child);
                    if (child != null && child is T)
                        return (T)child;
                }
            }

            // Since no dependency object was specified or no child of the specified type was found, null is returned
            return null;
        }

        #endregion
    }
}


text:
import * as express from 'express';
import helmet from 'helmet';
import { ExpressMiddlewareInterface, Middleware } from 'routing-controllers';

@Middleware({ type: 'before' })
export class SecurityMiddleware implements ExpressMiddlewareInterface {

    public use(req: express.Request, res: express.Response, next: express.NextFunction): any {
        return helmet()(req, res, next);
    }

}


text:
<!DOCTYPE html>

      <title>Redirecting...</title>
      <link rel="canonical" href="/prereqs/cli"/>
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
      <meta http-equiv="refresh" content="0; url=/prereqs/cli" />

Redirecting...

Click here if you are not redirected.


text:
import { registerComponent } from 'nornj';
import Rate from 'antd/lib/rate';

registerComponent({
  'ant-Rate': Rate
});

export default Rate;


text:
var util = require("util");
var dns = require("dns");
var wait = require("wait.for-es6");
var parallel = require("../parallel");

// ----------------------
// DNS TESTS --------
// ----------------------

function* getReverse(addr){
    return yield wait.for(dns.reverse,addr);
}

function* parallel_reverse(hostname){

    console.log('\n\n---------------------------');
    console.log('parallel_reverse');
    console.log('---------------------------');
    console.log('\ndns.resolve4 ',hostname);
    var addresses = yield wait.for(dns.resolve4,hostname);
    console.log("\naddresses: ",JSON.stringify(addresses));
    var reversed = yield wait.for(parallel.map, addresses, getReverse);
    console.log("\nreversed : ",JSON.stringify(reversed));
}

function* sequential_reverse(hostname){
    console.log('\n\n---------------------------');
    console.log('sequential_reverse');
    console.log('---------------------------');
    console.log('dns.resolve4 ',hostname);
    var addresses = yield wait.for(dns.resolve4,hostname);
    console.log("addresses: ",JSON.stringify(addresses));
    for (var i = 0; i < addresses.length; i++) {
        console.log(yield  wait.for(dns.reverse,addresses[i]));
    };

}

// -------------------
// RUN TESTS (Fiber)--
// -------------------
function* runTests(hostname){
    // test 1
    yield wait.runGenerator ( parallel_reverse ,hostname );
    // test 2
    yield wait.runGenerator ( sequential_reverse ,hostname);
}

// MAIN
try{
    wait.launchFiber(runTests,"google.com");
}
catch(e){
    console.log("Error: " + e.message);
};


text:
using System;
using System.Collections;
using System.Reflection;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing.Design;
using System.Drawing;
using System.Windows.Forms;
using System.Windows.Forms.ComponentModel;
using System.Windows.Forms.Design;

namespace MbUnit.Framework.ComponentModel
{
    internal abstract class ListTypeEditor : UITypeEditor
    {
        public ListTypeEditor()
        { }

        public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
        {
            if (context != null)
                return UITypeEditorEditStyle.DropDown;
            return base.GetEditStyle(context);
        }

        public override object EditValue(
            ITypeDescriptorContext context,
            IServiceProvider provider,
            object value)
        {
            if (context == null || provider == null)
                return base.EditValue(context, provider, value);

            IWindowsFormsEditorService editorService =
                provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
            if (editorService == null)
                return base.EditValue(context, provider, value);

            EditorListBox list = new EditorListBox(editorService);
            this.FillList(list,context, provider, value);
            editorService.DropDownControl(list);

            return list.SelectedItem;
        }

        protected abstract void FillList(EditorListBox list,
            ITypeDescriptorContext context,
            IServiceProvider provider,
            object value);

        public class EditorListBox : ListBox
        {
            private IWindowsFormsEditorService editorService;

            public EditorListBox(IWindowsFormsEditorService editorService)
            {
                this.editorService = editorService;
                this.Sorted = true;
            }

            protected override void OnClick(EventArgs e)
            {
                base.OnClick(e);
                this.editorService.CloseDropDown();
            }
        }
    }
}


text:
<?php

namespace Sokil\Mongo;

use PHPUnit\Framework\TestCase;

class ExpressionTest extends TestCase
{
    /**
     * @var Collection
     */
    private $collection;

    public function setUp()
    {
        // connect to mongo
        $client = new Client(getenv('PHPMONGO_DSN') ? getenv('PHPMONGO_DSN') : null);

        // select database
        $database = $client->getDatabase('test');

        // select collection
        $this->collection = $database->getCollection('phpmongo_test_collection');
    }

    public function tearDown()
    {
        $this->collection->delete();
    }

    public function testMerge()
    {
        $expression1 = new Expression;
        $expression1->where('a', 77);
        $expression1->where('b', 88);
        $expression1->whereGreater('c', 99);

        $expression2 = new Expression;
        $expression2->where('a', 55);
        $expression1->whereLess('c', 66);

        $expression1->merge($expression2);

        $this->assertEquals(array(
            'a' => array(77, 55),
            'b' => 88,
            'c' => array(
                '$gt' => 99,
                '$lt' => 66,
            ),
        ), $expression1->toArray());
    }

    public function testSearchInArrayField()
    {
        // create document
        $document = $this->collection->createDocument();

        $document->push('param', 'value1');
        $document->push('param', 'value2');

        $document->save();

        // find document
        $document = $this->collection->find()->where('param', 'value1')->findOne();

        $this->assertEquals(array('value1', 'value2'), $document->param);
    }

    public function testWhereIn()
    {
        $document = $this->collection->createDocument(array(
            'param'    => 'value1',
        ));

        $document->save();

        $documentId = $document->getId();

        // find all rows
        $document = $this->collection->find()
            ->whereIn('param', array('value1', 'value2', 'value3'))
            ->findOne();

        $this->assertNotEmpty($document);

        $this->assertEquals($documentId, $document->getId());
    }

    public function testWhereEmpty()
    {

        $document = $this->collection->createDocument(array(
            'f_null'      => null,
            'f_string'    => '',
            'f_array'     => array(),
        ));

        $document->save();

        $documentId = $document->getId();

        // find all rows
        $this->assertEquals($documentId, $this->collection->find()->whereEmpty('f_null')->findOne()->getId());
        $this->assertEquals($documentId, $this->collection->find()->whereEmpty('f_string')->findOne()->getId());
        $this->assertEquals($documentId, $this->collection->find()->whereEmpty('f_array')->findOne()->getId());
        $this->assertEquals($documentId, $this->collection->find()->whereEmpty('f_unexisted_field')->findOne()->getId());
    }

    public function testWhereNotEmpty()
    {

        // null field
        $this->collection
            ->createDocument(array(
                'param'    => null,
            ))
            ->save();

        // empty array field
        $this->collection
            ->createDocument(array(
                'param'    => array(),
            ))
            ->save();

        // empty string field
        $this->collection
            ->createDocument(array(
                'param'    => '',
            ))
            ->save();

        // NOT EMPTY FIELD
        $documentId = $this->collection
            ->createDocument(array(
                'param'    => 'value',
            ))
            ->save()
            ->getId();

        // unexisted field
        $this->collection
            ->createDocument(array(
                'fieldName'    => 'value',
            ))
            ->save();

        // find all rows
        $documents = $this->collection
            ->find()
            ->whereNotEmpty('param')
            ->findAll();

        $this->assertNotEmpty($documents);

        $this->assertEquals(1, count($documents));

        $document = current($documents);

        $this->assertEquals($documentId, $document->getId());
    }

    public function testWhereNotIn()
    {
        $document = $this->collection->createDocument(array(
            'param'    => 'value',
        ));

        $document->save();

        $documentId = $document->getId();

        // find all rows
        $document = $this->collection->find()
            ->whereNotIn('param', array('value1', 'value2', 'value3'))
            ->findOne();

        $this->assertNotEmpty($document);

        $this->assertEquals($documentId, $document->getId());
    }

    public function testWhereArraySize()
    {
        $this->collection
            ->createDocument(array(
                'param'    => array(),
            ))
            ->save();

        $this->collection
            ->createDocument(array(
                'param'    => array('value1'),
            ))
            ->save();

        $documentId = $this->collection
            ->createDocument(array(
                'param'    => array('value1', 'value2'),
            ))
            ->save()
            ->getId();

        $this->collection
            ->createDocument(array(
                'param'    => array('value1', 'value2', 'value3'),
            ))
            ->save();

        // find all rows
        $document = $this->collection->find()
            ->whereArraySize('param', 2)
            ->findOne();

        $this->assertNotEmpty($document);

        $this->assertEquals($documentId, $document->getId());
    }

    public function testWhereLike()
    {

        // create new document
        $document = $this->collection->createDocument(array(
            'param'    => 'abcd',
        ));
        $document->save();
        $documentId = $document->getId();

        // find all rows
        $document = $this->collection->find()
            ->whereLike('param', 'ab[a-z]{2}')
            ->findOne();

        $this->assertEquals($documentId, $document->getId());
    }

    public function testFileType()
    {

        // create new document
        $document = $this->collection->createDocument(array(
            'f_double'          => 1.1,
            'f_string'          => 'string',
            'f_object'          => array('key' => 'value'),
            'f_array'           => array(1, 2, 3),
            'f_array_of_array'  => array(array(1, 2), array(3, 4)),
            'f_objectId'        => new \MongoId,
            'f_boolean'         => false,
            'f_date'            => new \MongoDate,
            'f_null'            => null,
        ));
        $document->save();

        $this->assertNotEmpty($this->collection->find()->whereDouble('f_double')->findOne());
        $this->assertNotEmpty($this->collection->find()->whereString('f_string')->findOne());
        $this->assertNotEmpty($this->collection->find()->whereObject('f_object')->findOne());
        $this->assertNotEmpty($this->collection->find()->whereArray('f_array')->findOne());
        $this->assertNotEmpty($this->collection->find()->whereArrayOfArrays('f_array_of_array')->findOne());
        $this->assertNotEmpty($this->collection->find()->whereObjectId('f_objectId')->findOne());
        $this->assertNotEmpty($this->collection->find()->whereBoolean('f_boolean')->findOne());
        $this->assertNotEmpty($this->collection->find()->whereDate('f_date')->findOne());
        $this->assertNotEmpty($this->collection->find()->whereNull('f_null')->findOne());
    }

    public function testCombinedWhereWithLikeAndNotIn()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'param'    => 'abcd',
        ));

        $document->save();
        $documentId = $document->getId();

        // try to found - must be empty result
        $document= $this->collection->find()
            ->whereLike('param', 'wrongregex[a-z]{2}')
            ->whereNotIn('param', array('abzz'))
            ->findOne();

        $this->assertEmpty($document);

        // try to found - must be empty result
        $document= $this->collection->find()
            ->whereLike('param', 'ab[a-z]{2}')
            ->whereNotIn('param', array('abcd'))
            ->findOne();

        $this->assertEmpty($document);

        // try to found - must be one result
        $document = $this->collection->find()
            ->whereLike('param', 'ab[a-z]{2}')
            ->whereNotIn('param', array('abzz'))
            ->findOne();

        $this->assertEquals($documentId, $document->getId());
    }

    public function testWhereOr()
    {
        // create new document
        $document1 = $this->collection->createDocument(array(
            'param1'    => 'p11',
            'param2'    => 'p12',
        ));
        $document1->save();
        $document1Id = $document1->getId();

        $document2 = $this->collection->createDocument(array(
            'param1'    => 'p21',
            'param2'    => 'p22',
        ));
        $document2->save();
        $document2Id = $document2->getId();

        // find
        $q1 = $this->collection->find();
        $this->assertEquals($document1Id, $q1->whereOr(
            $q1->expression()->where('param1', 'p11')->where('param2', 'p12'),
            $q1->expression()->where('param1', 'p11')->where('some', 'some')
        )->findOne()->getId());

        $q2 = $this->collection->find();
        $this->assertEquals($document2Id, $q2->whereOr(
            $q2->expression()->where('param1', 'p21'),
            $q2->expression()->where('param', '2')
        )->findOne()->getId());
    }

    /**
     * @link https://docs.mongodb.com/manual/reference/operator/query/and/#and-queries-with-multiple-expressions-specifying-the-same-operator
     */
    public function testTwoWhereOr()
    {
        $firstExpression = $this->collection->expression()->where('field', 1);
        $secondExpression = $this->collection->expression()->where('field', 2);
        $thirdExpression = $this->collection->expression()->where('field2', 3);
        $fourthExpression = $this->collection->expression()->where('field2', 4);

        $expression = $this->collection->expression()
            ->whereAnd(
                $this->collection->expression()->whereOr($firstExpression, $secondExpression),
                $this->collection->expression()->whereOr($thirdExpression, $fourthExpression)
            );

        $this->assertEquals(
            array(
                '$and' => array(
                    array('$or' => array(array('field' => 1), array('field' => 2))),
                    array('$or' => array(array('field2' => 3), array('field2' => 4))),
                ),
            ),
            $expression->toArray()
        );
    }

    public function testWhereNor()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'param'    => '1',
        ));
        $document->save();
        $documentId = $document->getId();

        // find
        $q = $this->collection->find();
        $this->assertEquals($documentId, $q->whereNor(
            $q->expression()->whereGreater('param', 100)->where('some', 'some'),
            $q->expression()->where('param', 5)
        )->findOne()->getId());
    }

    public function testWhereNot()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'param'    => '1',
        ));
        $document->save();
        $documentId = $document->getId();

        // scalar value
        $q1 = $this->collection->find();
        $this->assertEquals($documentId, $q1->whereNot(
            $q1->expression()->where('param', 2)
        )->findOne()->getId());

        // operator-expression
        $q2 = $this->collection->find();
        $this->assertEquals($documentId, $q2->whereNot(
            $q2->expression()->whereGreater('param', 5)
        )->findOne()->getId());
    }

    public function testWhereRegex()
    {
        // create new document
        $expectedDocumentId = $this
            ->collection
            ->createDocument(array(
                'foo'    => 'foo',
            ))
            ->save()
            ->getId();

        if (class_exists('\MongoDB\BSON\Regex')) {
            $regex = new \MongoDB\BSON\Regex('bar[0-9]', 'i');
        } else {
            $regex = new \MongoRegex('/bar[0-9]/i');
        }

        // scalar value
        $expression = new Expression();
        $expression->where('foo', $regex);

        $actualDocumentId = $this
            ->collection
            ->find()
            ->whereNot($expression)
            ->findOne()
            ->getId();

        $this->assertEquals($expectedDocumentId, $actualDocumentId);
    }

    public function testWhereElemMatch()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'param'    => array(
                array(
                    'subparam1'    => 10,
                    'subparam2'    => 20,
                ),
                array(
                    'subparam1'    => 200,
                    'subparam2'    => 300,
                ),
            ),
        ));
        $document->save();
        $documentId = $document->getId();

        // find
        $q = $this->collection->find();

        $search = $q->whereElemMatch('param',
            $q->expression()
                // param.sub-param1
                ->whereGreater('subparam1', 0)
                // param.sub-param2
                ->whereLess('subparam2', 30)
                ->whereGreater('subparam2', 10)
        );

        $document = $search->findOne();

        $this->assertNotEmpty($document);
        $this->assertEquals($documentId, $document->getId());
    }

    public function testWhereElemNotMatch()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'param'    => array(
                array(
                    'subparam1'    => 10,
                    'subparam2'    => 20,
                ),
                array(
                    'subparam1'    => 200,
                    'subparam2'    => 300,
                ),
            ),
        ));
        $document->save();
        $documentId = $document->getId();

        // find
        $q = $this->collection->find();

        $search = $q->whereElemNotMatch('param',
            $q->expression()->where('subparam1', 10000)
        );

        $document = $search->findOne();

        $this->assertNotEmpty($document);
        $this->assertEquals($documentId, $document->getId());
    }

    public function testWhereElemMatchWithoutHelpers()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'param'    => array(
                array(
                    'subparam1'    => 10,
                    'subparam2'    => 20,
                ),
                array(
                    'subparam1'    => 200,
                    'subparam2'    => 300,
                ),
            ),
        ));
        $document->save();
        $documentId = $document->getId();

        // find
        $search = $this->collection->find()->where('param', array('$elemMatch' => array(
            'subparam1' => array(
                '$gt'   => 0,
            ),
            'subparam2' => array(
                '$lt'   => 30,
                '$gt'   => 10,
            )
        )));

        $document = $search->findOne();

        $this->assertNotEmpty($document);
        $this->assertEquals($documentId, $document->getId());
    }

    public function testWhereElemMatchWithLogicalOr()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'param'    => array(
                array(
                    'subparam1'    => 10,
                    'subparam2'    => 20,
                ),
                array(
                    'subparam1'    => 200,
                    'subparam2'    => 300,
                ),
            ),
        ));
        $document->save();
        $documentId = $document->getId();

        // find
        $q = $this->collection->find();
        $search = $q->whereOr(
            $q->expression()->whereElemMatch('param',
                $q->expression()
                    // param.sub-param1
                    ->whereGreater('subparam1', 0)
                    // param.sub-param2
                    ->whereLess('subparam2', 30)
                    ->whereGreater('subparam2', 10)
            ),
            $q->expression()->whereElemMatch('param',
                $q->expression()
                    // param.sub-param1
                    ->whereGreater('subparam1', 100)
                    // param.sub-param2
                    ->whereLess('subparam2', 400)
                    ->whereGreater('subparam2', 100)
            )
        );

        $document = $search->findOne();

        $this->assertNotEmpty($document);
        $this->assertEquals($documentId, $document->getId());
    }

    public function testWhereElemMatchWithLogicalAnd()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'param'    => array(
                array(
                    'subparam1'    => 10,
                    'subparam2'    => 20,
                ),
                array(
                    'subparam1'    => 200,
                    'subparam2'    => 300,
                ),
            ),
        ));
        $document->save();
        $documentId = $document->getId();

        // find
        $q = $this->collection->find();
        $search = $q->whereAnd(
            $q->expression()->whereElemMatch('param',
                $q->expression()
                    // param.sub-param1
                    ->whereGreater('subparam1', 0)
                    // param.sub-param2
                    ->whereLess('subparam2', 30)
                    ->whereGreater('subparam2', 10)
            ),
            $q->expression()->whereElemMatch('param',
                $q->expression()
                    // param.sub-param1
                    ->whereGreater('subparam1', 100)
                    // param.sub-param2
                    ->whereLess('subparam2', 400)
                    ->whereGreater('subparam2', 100)
            )
        );

        $document = $search->findOne();

        $this->assertNotEmpty($document);
        $this->assertEquals($documentId, $document->getId());
    }

    public function testWhereElemMatchWithLogicalNot()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'param'    => array(
                array(
                    'subparam1'    => 10,
                    'subparam2'    => 20,
                ),
                array(
                    'subparam1'    => 200,
                    'subparam2'    => 300,
                ),
            ),
        ));
        $document->save();
        $documentId = $document->getId();

        // find
        $q = $this->collection->find();
        $q->whereNot($q->expression()->whereElemMatch('param', $q->expression()->where('subparam1', 777)));

        $document = $q->findOne();

        $this->assertNotEmpty($document);
        $this->assertEquals($documentId, $document->getId());
    }

    /**
     * Merging situations when all except values exual - use $in
     */
    public function _testWhereElemMatchByANDWithLogicalAnd()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'param'    => array(
                array(
                    'subparam1'    => 10,
                    'subparam2'    => 20,
                ),
                array(
                    'subparam1'    => 200,
                    'subparam2'    => 300,
                ),
            ),
        ));
        $document->save();
        $documentId = $document->getId();

        // find
        $q = $this->collection->find();
        $search = $q
            ->whereElemMatch('param',
                $q->expression()
                    // param.sub-param1
                    ->whereGreater('subparam1', 0)
                    // param.sub-param2
                    ->whereLess('subparam2', 30)
                    ->whereGreater('subparam2', 10)
            )->whereElemMatch('param',
                $q->expression()
                    // param.sub-param1
                    ->whereGreater('subparam1', 100)
                    // param.sub-param2
                    ->whereLess('subparam2', 400)
                    ->whereGreater('subparam2', 100)
            );

        $document = $search->findOne();

        $this->assertNotEmpty($document);
        $this->assertEquals($documentId, $document->getId());
    }

    public function testWhereFieldExists()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'fieldName'    => '1',
        ));
        $document->save();
        $documentId = $document->getId();

        // scalar value
        $this->assertEmpty($this->collection->find()->whereExists('unexistedFieldName')->findOne());
        $this->assertEquals($documentId, $this->collection->find()->whereExists('fieldName')->findOne()->getId());
    }

    public function testWhereFieldNotExists()
    {
        // create new document
        $document = $this->collection->createDocument(array(
            'fieldName'    => '1',
        ));
        $document->save();
        $documentId = $document->getId();

        $this->assertEmpty($this->collection->find()->whereNotExists('fieldName')->findOne());

        $this->assertEquals($documentId, $this->collection->find()->whereNotExists('unexistedFieldName')->findOne()->getId());
    }

    public function testGetMongoQuery()
    {
        // find
        $query = $this->collection->find()->where('some-field', 'some-value');
        $queryArray = $query->getMongoQuery();

        $this->assertInternalType('array', $queryArray);

        $this->assertEquals(array(
            'some-field' => 'some-value'
        ), $queryArray);
    }

    public function testWhereGreaterOrEqual()
    {
        for($i = 0; $i < 10; $i++) {
            $this->collection->createDocument(array('p' => $i))->save();
        }

        $documents = $this->collection->find()->whereGreaterOrEqual('p', 4)->findAll();
        $this->assertEquals(6, count($documents));
        foreach($documents as $document) {
            $this->assertGreaterThanOrEqual(4, $document->p);
        }
    }

    public function testWhereLessOrEqual()
    {
        for($i = 0; $i < 10; $i++) {
            $this->collection->createDocument(array('p' => $i))->save();
        }

        $documents = $this->collection->find()->whereLessOrEqual('p', 4)->findAll();
        $this->assertEquals(5, count($documents));
        foreach($documents as $document) {
            $this->assertLessThanOrEqual(4, $document->p);
        }
    }

    public function testWhereMod()
    {
        for($i = 0; $i < 10; $i++) {
            $this->collection->createDocument(array(
                'i' => $i,
            ));
        }

        foreach($this->collection->find()->whereMod('i', 3, 0) as $document) {
            $this->assertEquals(0, $document->i % 3);
        }
    }

    public function testWhereNoneOf()
    {
        $documentId = $this->collection
            ->createDocument(array(
                'p' => array(
                    1, 2, 3, 4, 5
                )
            ))
            ->save();

        $documents = $this->collection
            ->find()
            ->whereNoneOf('p', array(1, 4))
            ->findAll();

        $this->assertEquals(0, count($documents));
    }

    public function testWhereText()
    {
        $dbVersion = $this->collection->getDatabase()->getClient()->getDbVersion();

        if (version_compare($dbVersion, '2.6', '<=')) {
            return ;
        }

        $this->collection->ensureFulltextIndex(
            array(
                'subject',
                'body'
            ),
            array(
                'subject' => 2,
                'body' => 1,
            )
        );

        $this->collection->batchInsert(array(
            array('subject' => 'big brown dog', 'body' => 'walking on street'),
            array('subject' => 'little pony', 'body' => 'flying among rainbows'),
        ));

        $documents = $this->collection
            ->find()
            ->whereText('pony')
            ->findAll();

        $this->assertEquals(1, count($documents));

        $document = current($documents);

        $this->assertEquals('little pony', $document->subject);
    }
}


text:
package org.lwjgl.vulkan;

import javax.annotation.*;

import java.nio.*;

import org.lwjgl.*;
import org.lwjgl.system.*;

import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.MemoryStack.*;

/**
 * See {@link VkPhysicalDeviceSubgroupSizeControlFeatures}.
 *
 *
Layout

 *
 *

 * struct VkPhysicalDeviceSubgroupSizeControlFeaturesEXT {
 *     VkStructureType sType;
 *     void * pNext;
 *     VkBool32 subgroupSizeControl;
 *     VkBool32 computeFullSubgroups;
 * }

 */
public class VkPhysicalDeviceSubgroupSizeControlFeaturesEXT extends VkPhysicalDeviceSubgroupSizeControlFeatures {

    /**
     * Creates a {@code VkPhysicalDeviceSubgroupSizeControlFeaturesEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be
     * visible to the struct instance and vice versa.
     *
     *
The created instance holds a strong reference to the container object.

     */
    public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT(ByteBuffer container) {
        super(container);
    }

    /** Sets the specified value to the {@code sType} field. */
    @Override
    public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT sType(@NativeType("VkStructureType") int value) { nsType(address(), value); return this; }
    /** Sets the {@link VK13#VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES} value to the {@code sType} field. */
    @Override
    public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT sType$Default() { return sType(VK13.VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES); }
    /** Sets the specified value to the {@code pNext} field. */
    @Override
    public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT pNext(@NativeType("void *") long value) { npNext(address(), value); return this; }
    /** Sets the specified value to the {@code subgroupSizeControl} field. */
    @Override
    public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT subgroupSizeControl(@NativeType("VkBool32") boolean value) { nsubgroupSizeControl(address(), value ? 1 : 0); return this; }
    /** Sets the specified value to the {@code computeFullSubgroups} field. */
    @Override
    public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT computeFullSubgroups(@NativeType("VkBool32") boolean value) { ncomputeFullSubgroups(address(), value ? 1 : 0); return this; }

    /** Initializes this struct with the specified values. */
    @Override
    public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT set(
        int sType,
        long pNext,
        boolean subgroupSizeControl,
        boolean computeFullSubgroups
    ) {
        sType(sType);
        pNext(pNext);
        subgroupSizeControl(subgroupSizeControl);
        computeFullSubgroups(computeFullSubgroups);

        return this;
    }

    /**
     * Copies the specified struct data to this struct.
     *
     * @param src the source struct
     *
     * @return this struct
     */
    public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT set(VkPhysicalDeviceSubgroupSizeControlFeaturesEXT src) {
        memCopy(src.address(), address(), SIZEOF);
        return this;
    }

    // -----------------------------------

    /** Returns a new {@code VkPhysicalDeviceSubgroupSizeControlFeaturesEXT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT malloc() {
        return wrap(VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.class, nmemAllocChecked(SIZEOF));
    }

    /** Returns a new {@code VkPhysicalDeviceSubgroupSizeControlFeaturesEXT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT calloc() {
        return wrap(VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.class, nmemCallocChecked(1, SIZEOF));
    }

    /** Returns a new {@code VkPhysicalDeviceSubgroupSizeControlFeaturesEXT} instance allocated with {@link BufferUtils}. */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT create() {
        ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF);
        return wrap(VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.class, memAddress(container), container);
    }

    /** Returns a new {@code VkPhysicalDeviceSubgroupSizeControlFeaturesEXT} instance for the specified memory address. */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT create(long address) {
        return wrap(VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.class, address);
    }

    /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT createSafe(long address) {
        return address == NULL ? null : wrap(VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.class, address);
    }

    /**
     * Returns a new {@link VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer malloc(int capacity) {
        return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity);
    }

    /**
     * Returns a new {@link VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer calloc(int capacity) {
        return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity);
    }

    /**
     * Returns a new {@link VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer} instance allocated with {@link BufferUtils}.
     *
     * @param capacity the buffer capacity
     */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer create(int capacity) {
        ByteBuffer container = __create(capacity, SIZEOF);
        return wrap(Buffer.class, memAddress(container), capacity, container);
    }

    /**
     * Create a {@link VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer} instance at the specified memory.
     *
     * @param address  the memory address
     * @param capacity the buffer capacity
     */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer create(long address, int capacity) {
        return wrap(Buffer.class, address, capacity);
    }

    /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer createSafe(long address, int capacity) {
        return address == NULL ? null : wrap(Buffer.class, address, capacity);
    }

    // -----------------------------------

    /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */
    @Deprecated public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT mallocStack() { return malloc(stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */
    @Deprecated public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT callocStack() { return calloc(stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */
    @Deprecated public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT mallocStack(MemoryStack stack) { return malloc(stack); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */
    @Deprecated public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT callocStack(MemoryStack stack) { return calloc(stack); }
    /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */
    @Deprecated public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */
    @Deprecated public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); }
    /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */
    @Deprecated public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); }
    /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */
    @Deprecated public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); }

    /**
     * Returns a new {@code VkPhysicalDeviceSubgroupSizeControlFeaturesEXT} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack the stack from which to allocate
     */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT malloc(MemoryStack stack) {
        return wrap(VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.class, stack.nmalloc(ALIGNOF, SIZEOF));
    }

    /**
     * Returns a new {@code VkPhysicalDeviceSubgroupSizeControlFeaturesEXT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack the stack from which to allocate
     */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT calloc(MemoryStack stack) {
        return wrap(VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF));
    }

    /**
     * Returns a new {@link VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer malloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity);
    }

    /**
     * Returns a new {@link VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer calloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity);
    }

    // -----------------------------------

    /** An array of {@link VkPhysicalDeviceSubgroupSizeControlFeaturesEXT} structs. */
    public static class Buffer extends VkPhysicalDeviceSubgroupSizeControlFeatures.Buffer {

        private static final VkPhysicalDeviceSubgroupSizeControlFeaturesEXT ELEMENT_FACTORY = VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.create(-1L);

        /**
         * Creates a new {@code VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer} instance backed by the specified container.
         *
         * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
         * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
         * by {@link VkPhysicalDeviceSubgroupSizeControlFeaturesEXT#SIZEOF}, and its mark will be undefined.
         *
         *
The created buffer instance holds a strong reference to the container object.

         */
        public Buffer(ByteBuffer container) {
            super(container);
        }

        public Buffer(long address, int cap) {
            super(address, null, -1, 0, cap, cap);
        }

        Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) {
            super(address, container, mark, pos, lim, cap);
        }

        @Override
        protected Buffer self() {
            return this;
        }

        @Override
        protected VkPhysicalDeviceSubgroupSizeControlFeaturesEXT getElementFactory() {
            return ELEMENT_FACTORY;
        }

        /** Sets the specified value to the {@code sType} field. */
        @Override
        public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer sType(@NativeType("VkStructureType") int value) { VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.nsType(address(), value); return this; }
        /** Sets the {@link VK13#VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES} value to the {@code sType} field. */
        @Override
        public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer sType$Default() { return sType(VK13.VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES); }
        /** Sets the specified value to the {@code pNext} field. */
        @Override
        public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer pNext(@NativeType("void *") long value) { VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.npNext(address(), value); return this; }
        /** Sets the specified value to the {@code subgroupSizeControl} field. */
        @Override
        public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer subgroupSizeControl(@NativeType("VkBool32") boolean value) { VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.nsubgroupSizeControl(address(), value ? 1 : 0); return this; }
        /** Sets the specified value to the {@code computeFullSubgroups} field. */
        @Override
        public VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.Buffer computeFullSubgroups(@NativeType("VkBool32") boolean value) { VkPhysicalDeviceSubgroupSizeControlFeaturesEXT.ncomputeFullSubgroups(address(), value ? 1 : 0); return this; }

    }

}