text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>AbsoluteAdmin - A Responsive Boostrap 3 Admin Dashboard</title>
  <meta name="keywords" content="Bootstrap 3 Admin Dashboard Template Theme" />
  <meta name="description" content="AdminDesigns - Bootstrap 3 Admin Dashboard Theme">
  <meta name="author" content="AdminDesigns">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

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

  <link rel="stylesheet" type="text/css" href="vendor/plugins/tagmanager/tagmanager.css">
  <link rel="stylesheet" type="text/css" href="vendor/plugins/daterange/daterangepicker.css">
  <link rel="stylesheet" type="text/css" href="vendor/plugins/datepicker/css/bootstrap-datetimepicker.css">
  <link rel="stylesheet" type="text/css" href="vendor/plugins/colorpicker/css/bootstrap-colorpicker.min.css">
  <link rel="stylesheet" type="text/css" href="vendor/plugins/select2/css/core.css">

  <link rel="stylesheet" type="text/css" href="assets/skin/default_skin/css/theme.css">

  <link rel="shortcut icon" href="assets/img/favicon.ico">

         Theme Options

            Navbar

            Sidebar

            Misc

            <form id="toolbox-header-skin">

Header Skins

                  <input type="radio" name="headerSkin" id="headerSkin8" checked value="">
                  Light

                  <input type="radio" name="headerSkin" id="headerSkin1" value="bg-primary">
                  Primary

                  <input type="radio" name="headerSkin" id="headerSkin3" value="bg-info">
                  Info

                  <input type="radio" name="headerSkin" id="headerSkin4" value="bg-warning">
                  Warning

                  <input type="radio" name="headerSkin" id="headerSkin5" value="bg-danger">
                  Danger

                  <input type="radio" name="headerSkin" id="headerSkin6" value="bg-alert">
                  Alert

                  <input type="radio" name="headerSkin" id="headerSkin7" value="bg-system">
                  System

                  <input type="radio" name="headerSkin" id="headerSkin2" value="bg-success">
                  Success

                  <input type="radio" name="headerSkin" id="headerSkin9" value="bg-dark">
                  Dark

            </form>

            <form id="toolbox-sidebar-skin">

Sidebar Skins

                  <input type="radio" name="sidebarSkin" checked id="sidebarSkin3" value="">
                  Dark

                  <input type="radio" name="sidebarSkin" id="sidebarSkin1" value="sidebar-light">
                  Light

                  <input type="radio" name="sidebarSkin" id="sidebarSkin2" value="sidebar-light light">
                  Lighter

            </form>

            <form id="toolbox-settings-misc">

Layout Options

                  <input type="checkbox" checked="" id="header-option">
                  Fixed Header

                  <input type="checkbox" checked="" id="sidebar-option">
                  Fixed Sidebar

                  <input type="checkbox" id="breadcrumb-option">
                  Fixed Breadcrumbs

                  <input type="checkbox" id="breadcrumb-hidden">
                  Hide Breadcrumbs

Layout Options

                  <input type="radio" id="fullwidth-option" checked name="layout-option">
                  Fullwidth Layout

                  <input type="radio" id="boxed-option" name="layout-option" disabled>
                  Boxed Layout
                    (Coming Soon)

            </form>

          Clear LocalStorage

          AbsoluteAdmin

          Dropdown

Action

Another action

Something else here

Separated link

      <form class="navbar-form navbar-left navbar-search alt" role="search">

          <input type="text" class="form-control" placeholder="Search..." value="Search...">

      </form>

            <button data-toggle="dropdown" class="btn btn-sm dropdown-toggle">

              9
            </button>

                      Recent Activity
                     <button class="btn btn-default light btn-xs pull-right" type="button"></button>

                            Michael Added to his store:
                            Ipod

1:25am

                            Sara Added his store:
                            Notebook

3:05am

                            Admin created invoice for:
                            Software

4:15am

                            Admin created invoice for:
                            Apple

7:45am

                            Admin created invoice for:
                            Software

4:15am

                            Admin created invoice for:
                            Apple

7:45am

                            Michael Added his store:
                            Ipod

8:25am

                            Admin created invoice for:
                            Software

4:15am

                            Sara Added to his store:
                            Notebook

3:05am

                     View All

            <button data-toggle="dropdown" class="btn btn-sm dropdown-toggle">

              5
            </button>

                      Notifications
                      Messages
                      Activity

New Registration

 Tyler Durden - 16 hours ago

 Approve?

                              <button type="button" class="btn btn-default btn-xs light">

                              </button>
                              <button type="button" class="btn btn-default btn-xs light">

                              </button>

New Order

 Apple Ipod - 4 hours ago

 Confirm?

                              <button type="button" class="btn btn-default btn-xs light">

                              </button>
                              <button type="button" class="btn btn-default btn-xs light">

                              </button>

New Comment

 Mike - I loved your article!

 Moderate?

                              <button type="button" class="btn btn-default btn-xs light">

                              </button>
                              <button type="button" class="btn btn-default btn-xs light">

                              </button>

New Review

 Sammy Hilton - 4 hours ago

 Approve?

                              <button type="button" class="btn btn-default btn-xs light">

                              </button>
                              <button type="button" class="btn btn-default btn-xs light">

                              </button>

New Registration

 Michael Sober - 7 hours ago

 Approve?

                              <button type="button" class="btn btn-default btn-xs light">

                              </button>
                              <button type="button" class="btn btn-default btn-xs light">

                              </button>

New Invoice

 Apple Ipod - 4 hours ago

#518358

New Order

 Apple Ipod - 4 hours ago

 Confirm?

                              <button type="button" class="btn btn-default btn-xs light">

                              </button>
                              <button type="button" class="btn btn-default btn-xs light">

                              </button>

Courtney Faught
                               - 12:30am

 Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin.

Joe Gibbons
                               - 12:30am

 Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque.

Courtney Faught
                               - 12:30am

 Cras sit amet nibh libero, in gravida nulla. Nulla vel metuscommodo.

Joe Gibbons
                               - 12:30am

 Cras sit amet nibh libero, in Nulla vel metus scelerisque antecommodo.

Courtney Faught
                               - 12:30am

 Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque soltudino.

Joe Gibbons
                               - 12:30am

 Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo.

Article
                                - 08/16/22

 Last Updated 36 days ago by
                               Max

Article
                                 - 08/16/22

                              Last Updated 36 days ago by
                               Max

Article
                                - 08/16/22

 Last Updated 36 days ago by
                               Max

Article
                                - 08/16/22

 Last Updated 36 days ago by
                               Max

Article
                                - 08/16/22

 Last Updated 36 days ago by
                               Max

Article
                                 - 08/16/22

                              Last Updated 36 days ago by
                               Max

Article
                                - 08/16/22

 Last Updated 36 days ago by
                               Max

                            First Name
                            Last Name
                            Username

                            Mark
                            Otto
                            @mdo

                            Jacob
                            Thornton
                            @fat

                            Larry
                            the Bird
                            @twitter

                            Sussy
                            Watcher
                            @thehawk

                            Mark
                            Otto
                            @mdo

                            Sussy
                            Watcher
                            @thehawk

                            Jacob
                            Thornton
                            @fat

                            Larry
                            the Bird
                            @twitter

                            Sussy
                            Watcher
                            @thehawk

                            Mark
                            Otto
                            @mdo

                            Jacob
                            Thornton
                            @fat

                     View All

	          <button data-toggle="dropdown" class="btn btn-sm dropdown-toggle">

	          </button>

	                 Hindu

	                 Turkish

	                 Spanish

          	 Michael .R

                <select id="user-status">
                  <optgroup label="Current Status:">
                    <option value="1-1">Away</option>
                    <option value="1-2">Offline</option>
                    <option value="1-3" selected="selected">Online</option>
                  </optgroup>
                </select>

                <select id="user-role">
                  <optgroup label="Logged in As:">
                    <option value="1-1">Client</option>
                    <option value="1-2">Editor</option>
                    <option value="1-3" selected="selected">Admin</option>
                  </optgroup>
                </select>

                 Messages
                2

                 Friends
                6

                 Notifications

                 Settings

               Logout

                   User Menu - Logout

Michael Richards

              <input type="text" id="sidebar-search" class="form-control" placeholder="Search...">

Menu

              Messages

                New

              Documentation

              Dashboard

Exclusive Tools

              Admin Plugins

                   Admin Panels

                   Admin Modals

                   Admin Dock

              Admin Forms

                   Admin Elements

                   Admin Widgets

                   Admin Validation

                   Admin Layouts

                   Admin Wizard

Systems

              Widget Packages

                   Tile Widgets

                   Panel Widgets

                   Scroller Widgets

                   Admin Widgets

              Ecommerce

                   Dashboard
                  New

                   Products

                   Orders

                   Customers

                   Store Settings

              Email Templates

Elements

              UI Elements

                   Alerts

                   Animations

                   Buttons

                   Typography

                   Portlets

                   Progress Bars

                   Tabs

                   Icons

                   Grid

              Form Elements

                   Basic Inputs

                   Plugin Inputs
                  New

                   Editors

                   Treeview

                   Nestable

                   Image Tools
                  New

                   Uploaders

                   Notifications

                   Content Sliders

              Plugins

                   Maps

                    Admin Maps

                    Basic Maps

                    Vector Maps

                    Full Map

                   Charts

                    Highcharts

                    D3 Charts

                    Flot Charts

                   Tables

                     Basic Tables

                     DataTables

                     Editable Tables

                     Pricing Tables

                   Misc

                     Site Tour

                     Session Timeout

                     Page Progress Loader

              Pages

                   Utility

                     Landing Page

                     Confirmation
                      New

                     Login

                     Login Alt
                      New

                     Register

                     Register Alt
                      New

                     Screenlock

                     Screenlock Alt
                      New

                     Forgot Password

                     Forgot Password Alt
                      New

                     Coming Soon

                     404 Error

                     500 Error

                     404 Error Alt

                     500 Error Alt

                   Basic

                    Search Results
                      New

                     Profile

                     Timeline Split

                     Timeline Single

                     FAQ Page

                     Calendar

                     Messages

                     Messages Alt

                     Gallery

                   Misc

                     Printable Invoice

                     Blank

Projects

              Website Redesign

              Ecommerce Panel

              Adobe Mockup

              SSD Upgrades

User Stats

              Email Storage
              35%

                  35% Complete

              Bandwidth
              58%

                  58% Complete

              Messages

              Users

              Support

              Videos

              Settings

              Pictures

              Dashboard

              Home

Dashboard

            Reporting Period
            <select id="topbar-multiple" class="hidden">
              <optgroup label="Filter By:">
                <option value="1-1">Last 30 Days</option>
                <option value="1-2" selected="selected">Last 60 Days</option>
                <option value="1-3">Last Year</option>
              </optgroup>
            </select>

              3

                Bootstrap Multiselect

                    <form class="form-horizontal" role="form">

                        Single

                          <select id="multiselect1">
                            <option value="cheese">Cheese</option>
                            <option value="tomatoes">Tomatoes</option>
                            <option value="mozarella" selected>Mozzarella</option>
                            <option value="mushrooms">Mushrooms</option>
                            <option value="pepperoni">Pepperoni</option>
                            <option value="onions">Onions</option>
                          </select>

                        Multiple

                          <select id="multiselect2" multiple="multiple">
                            <option value="cheese">Cheese</option>
                            <option value="tomatoes">Tomatoes</option>
                            <option value="mozarella">Mozzarella</option>
                            <option value="mushrooms">Mushrooms</option>
                            <option value="pepperoni">Pepperoni</option>
                            <option value="onions">Onions</option>
                          </select>

                        With Labels

                          <select id="multiselect3" class="multiselect-withlabels" multiple="multiple">
                            <optgroup label="Mathematics">
                              <option value="analysis">Analysis</option>
                              <option value="discrete">Discrete Mathematics</option>
                              <option value="probability">Probability Theory</option>
                            </optgroup>
                            <optgroup label="Computer Science">
                              <option value="programming">Introduction to Programming</option>
                              <option value="automata">Automata Theory</option>
                              <option value="complexity">Complexity Theory</option>
                            </optgroup>
                          </select>

                        With Sorting

                          <select id="multiselect4" multiple="multiple">
                            <option value="cheese">Cheese</option>
                            <option value="tomatoes">Tomatoes</option>
                            <option value="mozarella">Mozzarella</option>
                            <option value="mushrooms">Mushrooms</option>
                            <option value="pepperoni">Pepperoni</option>
                            <option value="onions">Onions</option>
                          </select>

                    </form>

                    <form class="form-horizontal" role="form">

                          <select id="multiselect5">
                            <option value="cheese">Cheese</option>
                            <option value="tomatoes">Tomatoes</option>
                            <option value="mozarella" selected>Mozzarella</option>
                            <option value="mushrooms">Mushrooms</option>
                            <option value="pepperoni">Pepperoni</option>
                            <option value="onions">Onions</option>
                          </select>

                          <select id="multiselect6" multiple="multiple">
                            <option value="cheese">Cheese</option>
                            <option value="tomatoes">Tomatoes</option>
                            <option value="mozarella">Mozzarella</option>
                            <option value="mushrooms">Mushrooms</option>
                            <option value="pepperoni">Pepperoni</option>
                            <option value="onions">Onions</option>
                          </select>

                          <select id="multiselect7" class="multiselect-withlabels" multiple="multiple">
                            <optgroup label="Mathematics">
                              <option value="analysis">Analysis</option>
                              <option value="discrete">Discrete Mathematics</option>
                              <option value="probability">Probability Theory</option>
                            </optgroup>
                            <optgroup label="Computer Science">
                              <option value="programming">Introduction to Programming</option>
                              <option value="automata">Automata Theory</option>
                              <option value="complexity">Complexity Theory</option>
                            </optgroup>
                          </select>

                          <select id="multiselect8" multiple="multiple">
                            <option value="cheese">Cheese</option>
                            <option value="tomatoes">Tomatoes</option>
                            <option value="mozarella">Mozzarella</option>
                            <option value="mushrooms">Mushrooms</option>
                            <option value="pepperoni">Pepperoni</option>
                            <option value="onions">Onions</option>
                          </select>

                    </form>

              <form id="demoform" class="hide-list-label" action="#" method="post">

                   Dual Select Listbox

                  <select class="demo1" multiple="multiple" size="10" name="demo1">
                    <option value="option1">Option 1</option>
                    <option value="option2">Option 2</option>
                    <option value="option3">Option 3</option>
                    <option value="option4">Option 4</option>
                    <option value="option5">Option 5</option>
                    <option value="option6">Option 6</option>
                    <option value="option7">Option 7</option>
                    <option value="option8">Option 8</option>
                    <option value="option9">Option 9</option>
                    <option value="option10">Option 10</option>
                    <option value="option11">Option 11</option>
                    <option value="option12">Option 12</option>
                  </select>

                  <button type="submit" class="btn btn-default ph25">Submit Data</button>

              </form>

                 Input Field Maxlength

                <form class="form-horizontal" role="form">

                    Input MaxLength

                      <input type="text" class="form-control" maxlength="15" placeholder="Maxlength of 15 characters..">

                </form>

                 Typeahead Inputs

                <form class="form-horizontal" role="form">

                    Try Me

                      <input type="text" class="form-control typeahead" id="test-field" placeholder="States of USA">

                </form>

                Spinner Fields

                <form class="form-horizontal" role="form">

                    Default

                        <input id="spinner1" class="form-control ui-spinner-input" name="spinner" value="15" />

                    Currency

                        <input id="spinner2" class="form-control ui-spinner-input" name="spinner" value="35" />

                    Decimal

                        <input id="spinner3" class="form-control ui-spinner-input" name="spinner" value="13.5" />

                    Time

                        <input id="spinner4" class="form-control ui-spinner-input" name="spinner" value="08:30 PM" />

                </form>

                Masked Input Fields

                <form class="form-horizontal" role="form">

                    Date

                        <input type="text" id="maskedDate" class="form-control date" maxlength="10" autocomplete="off" placeholder="11/11/1111">

                    Time

                        <input type="text" id="maskedTime" class="form-control time" maxlength="10" autocomplete="off" placeholder="00:00:00">

                    Date and Time

                        <input type="text" id="maskedMultiple" class="form-control date_time" maxlength="10" autocomplete="off" placeholder="99/99/9999 00:00:00">

                    Zip Code

                        <input type="text" id="maskedZip" class="form-control zip" maxlength="10" autocomplete="off" placeholder="99999-999">

                    Phone

                        <input type="text" id="maskedPhone" class="form-control phone" maxlength="10" autocomplete="off" placeholder="(999) 999-9999">

                    Phone + Ext

                        <input type="text" id="maskedExt" class="form-control phoneext" maxlength="10" autocomplete="off" placeholder="9999-9999">

                    Money

                        <input type="text" id="maskedMoney" class="form-control money" maxlength="10" autocomplete="off" placeholder="000.000.000.000">

                    Product Key

                        <input type="text" id="maskedKey" class="form-control product" maxlength="10" autocomplete="off" placeholder="000.000.000.000,00">

                    Tax ID

                        <input type="text" id="maskedID" class="form-control tin" maxlength="10" autocomplete="off" placeholder="99999-999">

                    SSN

                        <input type="text" id="maskedSSN" class="form-control ssn" maxlength="10" autocomplete="off" placeholder="999-99-9999">

                    Eye Script

                        <input type="text" id="maskedScript" class="form-control eyescript" maxlength="10" autocomplete="off" placeholder="0ZZ.0ZZ.0ZZ.0ZZ">

                    Custom

                        <input type="text" id="maskedCustom" class="form-control custom" maxlength="10" autocomplete="off" placeholder="1-22-333-4444">

                </form>

                 Select2 Multiselect

                <form class="form-horizontal" role="form">

                    Single Select

                      <select class="select2-single form-control">
                        <option value="CA">California</option>
                        <option value="AL">Alabama</option>
                        <option value="WY">Wyoming</option>
                      </select>

                    Multiple Select

                      <select class="select2-multiple form-control select-primary" multiple="multiple">
                        <option value="CA">California</option>
                        <option value="AL">Alabama</option>
                        <option value="WY">Wyoming</option>
                      </select>

                  </form>

                          <select class="select2-primary form-control">
                            <option value="CA">California</option>
                            <option value="AL">Alabama</option>
                            <option value="WY">Wyoming</option>
                          </select>

                          <select class="select2-info form-control">
                            <option value="CA">California</option>
                            <option value="AL">Alabama</option>
                            <option value="WY">Wyoming</option>
                          </select>

                          <select class="select2-success form-control">
                            <option value="CA">California</option>
                            <option value="AL">Alabama</option>
                            <option value="WY">Wyoming</option>
                          </select>

                          <select class="select2-warning form-control">
                            <option value="CA">California</option>
                            <option value="AL">Alabama</option>
                            <option value="WY">Wyoming</option>
                          </select>

                Tag manager

                <form class="form-horizontal" role="form">

                    Tag Field

                      <input type="text" id="tagmanager" class="form-control tm-input" placeholder="Create a new tag..">

                </form>

                <form class="form-horizontal" role="form">

                    Tag Options

                          Primary Tag

                          Success Tag

                          Info Tag

                          Warning Tag

                          Danger Tag

                          Alert Tag

                          System Tag

                          Inverse Tag

                </form>

                Color Picker

                <form class="form-horizontal" role="form">

                    Static

                      Click to open me!

                    Default Field

                      <input type="text" class="form-control demo demo-1 demo-auto" value="#5367ce" />

                    Component Field

                        <input type="text" value="" class="form-control" />

                </form>

                <form class="form-horizontal" role="form">

                    Inline

                </form>

                Date Range Picker

                <form class="form-horizontal" role="form">

                    Default Field

                      <input type="text" class="form-control pull-right" name="daterange" id="daterangepicker1">

                    Component Field

                        <input type="text" class="form-control">

                </form>

                Date/Time Picker

                <form class="form-horizontal" role="form">

                    Default Field

                      <input type="text" class="form-control" id="datetimepicker1">

                    Component Field

                        <input type="text" class="form-control">

                </form>

                <form class="form-horizontal" role="form">

                    Inline Picker

                        <input type="text" class="form-control" style="max-width: 250px;">

                </form>

                Time Picker

                <form class="form-horizontal" role="form">

                    Default Field

                      <input type="text" class="form-control" id="datetimepicker5">

                    Component Field

                        <input type="text" class="form-control">

                </form>

                <form class="form-horizontal" role="form">

                    Inline Time

                        <input type="text" class="form-control" style="max-width: 250px;">

                </form>

              Tab 1

              Tab 2

              Tab 3

 Server Statistics
                 2013

                  DB Request

                  Server Load

                  Server Connections

Traffic Margins

132

                     13.2%

Database Request

212

                     25.6%

Server Response

82.5

                     17.9%

 Server Statistics
                USA


text:
'use strict';
import {assert} from 'chai';
import {ShengjiGameManager} from '../../src/game/shengjiGameManager';
import {ShengjiGameState} from '../../src/models/statemachines/shengjiGameState';
import * as Players from '../../src/players/index';

describe('initialize new game', () => {
  it('Check state is initialized', () => {
    const shengjiGameManager: ShengjiGameManager = new ShengjiGameManager();
    shengjiGameManager.loadPlayers([
      new Players.ConsolePlayer(),
      new Players.ConsolePlayer(),
      new Players.ConsolePlayer(),
      new Players.ConsolePlayer()
    ]);
    shengjiGameManager.initializeNewGame();
    const state: ShengjiGameState = shengjiGameManager.rootState.state;
    assert.strictEqual(2, state.currentRank);
    assert.strictEqual(2, state.currentRank);
    assert.strictEqual(2, state.currentRank);
    assert.strictEqual(2, state.currentRank);
    assert.strictEqual(2, state.team1Rank);
    assert.strictEqual(2, state.team2Rank);
    assert.strictEqual(1, state.dealerTeam);
    assert.strictEqual(0, state.dealer);
    assert.strictEqual(null, state.dominantCard);
    assert.strictEqual(4, state.noOfPlayers);
  });
});

describe('load players process', () => {
  // Won't compile in TypeScript
  /*
  it('won\'t accept undefined', () => {
    const shengjiGameManager: ShengjiGameManager = new ShengjiGameManager();

    assert.throws(() => {
      shengjiGameManager.loadPlayers(undefined);
    }, 'ShengjiGameManager.loadPlayers accepts an array of players.');
  });
  */

  it('must be exactly 4 players', () => {
    const shengjiGameManager: ShengjiGameManager = new ShengjiGameManager();

    assert.throws(() => {
      shengjiGameManager.loadPlayers([
        new Players.ConsolePlayer(),
        new Players.ConsolePlayer(),
        new Players.ConsolePlayer()
      ]);
    }, 'ShengjiGameManager.loadPlayers accepts 4 players only.');

    assert.throws(() => {
      shengjiGameManager.loadPlayers([
        new Players.ConsolePlayer(),
        new Players.ConsolePlayer(),
        new Players.ConsolePlayer(),
        new Players.ConsolePlayer(),
        new Players.ConsolePlayer()
      ]);
    }, 'ShengjiGameManager.loadPlayers accepts 4 players only.');
  });
});

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="ru_RU">
<context>
    <name>AddFriendForm</name>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="32"/>
        <source>Add Friends</source>
        <translation>Добавление друзей</translation>
    </message>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="35"/>
        <source>Tox ID</source>
        <comment>Tox ID of the person you're sending a friend request to</comment>
        <translation>Tox ID</translation>
    </message>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="36"/>
        <source>Message</source>
        <comment>The message you send in friend requests</comment>
        <translation>Сообщение</translation>
    </message>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="37"/>
        <source>Send friend request</source>
        <translatorcomment>Мне не нравится, но другого не придумал, и фейсбук использует это</translatorcomment>
        <translation>Отправить запрос на добавление в друзья</translation>
    </message>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="84"/>
        <source>Tox me maybe?</source>
        <comment>Default message in friend requests if the field is left blank. Write something appropriate!</comment>
        <translatorcomment>Вот таким нехитрым и незамысловатым образом решаются сложные переводчиские проблемы</translatorcomment>
        <translation>Добавь меня, а?</translation>
    </message>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="92"/>
        <source>Please fill in a valid Tox ID</source>
        <comment>Tox ID of the friend you're sending a friend request to</comment>
        <translation>Пожалуйста, введите корректный Tox ID</translation>
    </message>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="109"/>
        <source>This address does not exist</source>
        <comment>The DNS gives the Tox ID associated to toxme.se addresses</comment>
        <translation>Нет такого адреса</translation>
    </message>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="113"/>
        <source>Error while looking up DNS</source>
        <comment>The DNS gives the Tox ID associated to toxme.se addresses</comment>
        <translation>Ошибка при просмотре DNS</translation>
    </message>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="119"/>
        <source>Unexpected number of text records</source>
        <comment>Error with the DNS</comment>
        <translation>Непредвиденное количество текстовых записей</translation>
    </message>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="125"/>
        <source>Unexpected number of values in text record</source>
        <comment>Error with the DNS</comment>
        <translation>Непредвиденное количество значений в текстовой записи</translation>
    </message>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="132"/>
        <source>The DNS lookup does not contain any Tox ID</source>
        <comment>Error with the DNS</comment>
        <translation>В ответе DNS ни одного Tox ID</translation>
    </message>
    <message>
        <location filename="../widget/form/addfriendform.cpp" line="138"/>
        <location filename="../widget/form/addfriendform.cpp" line="144"/>
        <source>The DNS lookup does not contain a valid Tox ID</source>
        <comment>Error with the DNS</comment>
        <translation>Ответ DNS не содержит корректных Tox ID</translation>
    </message>
</context>
<context>
    <name>Camera</name>
    <message>
        <location filename="../widget/camera.cpp" line="161"/>
        <source>Camera eror</source>
        <translation>Ошибка камеры</translation>
    </message>
    <message>
        <location filename="../widget/camera.cpp" line="162"/>
        <source>Camera format %1 not supported, can't use the camera</source>
        <translation>Формат камеры %1 не поддерживается, невозможно использовать камеру</translation>
    </message>
</context>
<context>
    <name>ChatForm</name>
    <message>
        <location filename="../widget/form/chatform.cpp" line="291"/>
        <source>Send a file</source>
        <translation>Отправить файл</translation>
    </message>
    <message>
        <location filename="../widget/form/chatform.cpp" line="616"/>
        <location filename="../widget/form/chatform.cpp" line="622"/>
        <source>Save chat log</source>
        <translation>Сохранить лог чата</translation>
    </message>
</context>
<context>
    <name>CopyableElideLabel</name>
    <message>
        <location filename="../widget/tool/copyableelidelabel.cpp" line="29"/>
        <source>Copy</source>
        <translation>Копировать</translation>
    </message>
</context>
<context>
    <name>FileTransfertWidget</name>
    <message>
        <location filename="../widget/filetransfertwidget.cpp" line="270"/>
        <source>Save a file</source>
        <comment>Title of the file saving dialog</comment>
        <translation>Сохранить файл</translation>
    </message>
</context>
<context>
    <name>FilesForm</name>
    <message>
        <location filename="../widget/form/filesform.cpp" line="25"/>
        <source>Transfered Files</source>
        <comment>"Headline" of the window</comment>
        <translation>Переданные файлы</translation>
    </message>
    <message>
        <location filename="../widget/form/filesform.cpp" line="30"/>
        <source>Downloads</source>
        <translation>Загрузки</translation>
    </message>
    <message>
        <location filename="../widget/form/filesform.cpp" line="31"/>
        <source>Uploads</source>
        <translation>Выгрузки</translation>
    </message>
</context>
<context>
    <name>FriendRequestDialog</name>
    <message>
        <location filename="../widget/tool/friendrequestdialog.cpp" line="30"/>
        <source>Friend request</source>
        <comment>Title of the window to aceept/deny a friend request</comment>
        <translatorcomment>Мне не нравится, но другого не придумал, и фейсбук использует это</translatorcomment>
        <translation>Запрос на добавление в друзья</translation>
    </message>
    <message>
        <location filename="../widget/tool/friendrequestdialog.cpp" line="32"/>
        <source>Someone wants to make friends with you</source>
        <translatorcomment>«Подружиться», вероятно, недостаточно вежливо</translatorcomment>
        <translation>Кто-то хочет добавить вас в друзья</translation>
    </message>
    <message>
        <location filename="../widget/tool/friendrequestdialog.cpp" line="33"/>
        <source>User ID:</source>
        <translation>ID пользователя:</translation>
    </message>
    <message>
        <location filename="../widget/tool/friendrequestdialog.cpp" line="37"/>
        <source>Friend request message:</source>
        <translation>Текст запроса:</translation>
    </message>
    <message>
        <location filename="../widget/tool/friendrequestdialog.cpp" line="44"/>
        <source>Accept</source>
        <comment>Accept a friend request</comment>
        <translation>Принять</translation>
    </message>
    <message>
        <location filename="../widget/tool/friendrequestdialog.cpp" line="45"/>
        <source>Reject</source>
        <comment>Reject a friend request</comment>
        <translation>Отклонить</translation>
    </message>
</context>
<context>
    <name>FriendWidget</name>
    <message>
        <location filename="../widget/friendwidget.cpp" line="87"/>
        <source>Copy friend ID</source>
        <comment>Menu to copy the Tox ID of that friend</comment>
        <translation>Копировать ID друга</translation>
    </message>
    <message>
        <location filename="../widget/friendwidget.cpp" line="88"/>
        <source>Invite in group</source>
        <comment>Menu to invite a friend in a groupchat</comment>
        <translation>Пригласить в группу</translation>
    </message>
    <message>
        <location filename="../widget/friendwidget.cpp" line="98"/>
        <source>Remove friend</source>
        <comment>Menu to remove the friend from our friendlist</comment>
        <translation>Удалить друга</translation>
    </message>
</context>
<context>
    <name>GroupChatForm</name>
    <message>
        <location filename="../widget/form/groupchatform.cpp" line="48"/>
        <source>%1 users in chat</source>
        <comment>Number of users in chat</comment>
        <translation>%1 пользователей в чате</translation>
    </message>
    <message>
        <location filename="../widget/form/groupchatform.cpp" line="173"/>
        <source><Unknown></source>
        <translation><Неизвестно></translation>
    </message>
    <message>
        <location filename="../widget/form/groupchatform.cpp" line="242"/>
        <source>%1 users in chat</source>
        <translation>%1 пользователей в чате</translation>
    </message>
    <message>
        <location filename="../widget/form/groupchatform.cpp" line="261"/>
        <source>Save chat log</source>
        <translation>Сохранить лог чата</translation>
    </message>
</context>
<context>
    <name>GroupWidget</name>
    <message>
        <location filename="../widget/groupwidget.cpp" line="89"/>
        <source>Quit group</source>
        <comment>Menu to quit a groupchat</comment>
        <translation>Покинуть группу</translation>
    </message>
    <message>
        <location filename="../widget/groupwidget.cpp" line="54"/>
        <location filename="../widget/groupwidget.cpp" line="146"/>
        <source>%1 users in chat</source>
        <translation>%1 пользователей в чате</translation>
    </message>
    <message>
        <location filename="../widget/groupwidget.cpp" line="56"/>
        <location filename="../widget/groupwidget.cpp" line="148"/>
        <source>0 users in chat</source>
        <translation>Ни одного пользователя в чате</translation>
    </message>
</context>
<context>
    <name>SelfCamView</name>
    <message>
        <location filename="../widget/selfcamview.cpp" line="32"/>
        <source>Tox video test</source>
        <comment>Title of the window to test the video/webcam</comment>
        <translation>Проверка видео</translation>
    </message>
</context>
<context>
    <name>SettingsForm</name>
    <message>
        <location filename="../widget/form/settingsform.cpp" line="31"/>
        <source>User Settings</source>
        <comment>"Headline" of the window</comment>
        <translation>Пользовательские настройки</translation>
    </message>
    <message>
        <location filename="../widget/form/settingsform.cpp" line="34"/>
        <source>Name</source>
        <comment>Username/nick</comment>
        <translation>Имя</translation>
    </message>
    <message>
        <location filename="../widget/form/settingsform.cpp" line="35"/>
        <source>Status</source>
        <comment>Status message</comment>
        <translation>Статус</translation>
    </message>
    <message>
        <location filename="../widget/form/settingsform.cpp" line="36"/>
        <source>(click here to copy)</source>
        <comment>Click on this text to copy TID to clipboard</comment>
        <translation>(нажмите здесь чтобы скопировать)</translation>
    </message>
    <message>
        <location filename="../widget/form/settingsform.cpp" line="44"/>
        <source>Test video</source>
        <comment>Text on a button to test the video/webcam</comment>
        <translation>Проверить видео</translation>
    </message>
    <message>
        <location filename="../widget/form/settingsform.cpp" line="45"/>
        <source>Enable IPv6 (recommended)</source>
        <comment>Text on a checkbox to enable IPv6</comment>
        <translation>Включить IPv6 (рекомендуется)</translation>
    </message>
    <message>
        <location filename="../widget/form/settingsform.cpp" line="47"/>
        <source>Use translations</source>
        <comment>Text on a checkbox to enable translations</comment>
        <translatorcomment>Так гораздо понятнее, чем «использовать переводы»</translatorcomment>
        <translation>Русскоязычный интерфейс</translation>
    </message>
    <message>
        <location filename="../widget/form/settingsform.cpp" line="49"/>
        <source>Make Tox portable</source>
        <comment>Text on a checkbox to make qTox a portable application</comment>
        <translation>Портативный режим</translation>
    </message>
</context>
<context>
    <name>Widget</name>
    <message>
        <location filename="../widget.ui" line="42"/>
        <source>Tox</source>
        <translation>Tox</translation>
    </message>
    <message>
        <location filename="../widget.ui" line="1951"/>
        <source>Your name</source>
        <translation>Ваше имя</translation>
    </message>
    <message>
        <location filename="../widget.ui" line="2033"/>
        <source>Your status</source>
        <translation>Ваш статус</translation>
    </message>
    <message>
        <location filename="../widget.ui" line="2610"/>
        <source>Add friends</source>
        <translation>Добавить друзей</translation>
    </message>
    <message>
        <location filename="../widget.ui" line="2652"/>
        <source>Create a group chat</source>
        <translation>Создать групповой чат</translation>
    </message>
    <message>
        <location filename="../widget.ui" line="2700"/>
        <source>(button inactive currently)</source>
        <translation>(кнопка на данный момент неактивна)</translation>
    </message>
    <message>
        <location filename="../widget.ui" line="2748"/>
        <source>Change your settings</source>
        <translation>Изменить ваши настройки</translation>
    </message>
    <message>
        <location filename="../widget.ui" line="3321"/>
        <source>Close</source>
        <translation>Закрыть</translation>
    </message>
    <message>
        <location filename="../widget.ui" line="3324"/>
        <source>Ctrl+Q</source>
        <translation>Ctrl+Q</translation>
    </message>
    <message>
        <source>Online</source>
        <comment>Button to set your status to 'Online'</comment>
        <translation type="obsolete">В сети</translation>
    </message>
    <message>
        <source>Away</source>
        <comment>Button to set your status to 'Away'</comment>
        <translatorcomment>Вероятно, это не столь долгое путешествие</translatorcomment>
        <translation type="obsolete">Отошёл</translation>
    </message>
    <message>
        <source>Busy</source>
        <comment>Button to set your status to 'Busy'</comment>
        <translation type="obsolete">Занят</translation>
    </message>
</context>
</TS>


text:
class AddPlaceToLessons < ActiveRecord::Migration
  def change
    add_column :lessons, :place_id, :integer
  end
end


text:
<!doctype html public "storage">

<meta charset=utf-8/>
<link rel="stylesheet" href="./modules/index.css" />
<title>My First React Router App</title>


text:
layout: post
authors: ["Kara Woo"]
title: "R Foundation Announces Code of Conduct Policy"
date: 2015-11-08
time: "12:00:00"
tags: ["Community", "R Foundation"]
---

  The R Foundation
  recently announced
  that all conferences it supports must have a code of conduct. They encourage
  other R meetings to adopt codes of conduct as well, stating that:

    A code of conduct serves two important purposes. Firstly, it sends a clear
    message to those outside the community that an R conference is a
    professional and comfortable working environment for all participants.
    Secondly, it provides a mechanism for reporting and monitoring any incidents
    of harassment that may occur.

  The R Foundation has opted not to require a specific format for the code of
  conduct, but they point
  to useR! 2015's code as
  one example. Acknowledging that a written code of conduct is insufficient
  without enforcement, the R Foundation has also stipulated that the codes of
  conduct should be legally and practically enforceable.

  This announcement came as welcome news to members of the R community who had
  requested such a policy. Last June many R users formalized this request in
  an open
  letter to the R Foundation.

  With its new policy, the R Foundation joins a growing number of academic and
  professional organizations
  (including Software Carpentry) that
  have instituted codes of conduct for all of their events. These policies are
  an important step in building inclusive and diverse communities, and it is
  rewarding to see the R Foundation respond positively to the voices of R users
  who want to make R conferences as safe and welcoming as possible.


text:
'use strict';

module.exports = function(app) {
    var getRouterFor = require('../fake-backend.js').getRouterFor;
    var contactsRouter = getRouterFor('contact', 'contacts');
    app.use('/api/contacts', contactsRouter);
};


text:
body{
  background-image: url(images/bg.jpg);
  background-position: top;
	background-color: #f7fcf8;
  background-repeat: repeat-x;
  background-attachment: scroll;
  margin: 50px 0px;
	padding:0px;
	border:0;
  text-align: center;
}

#header {

}

.logo {
	background-image: url(images/logo.png);
	background-repeat: no-repeat;
	text-decoration: none;

	margin-top: 7px;
	margin-right:5%;
	float: left;
	height: 135px;
	width: 128px;
	padding: 0px;

}
.menu_area {
	float: left;
	margin:0 13% 15px;
  width: 100%;
  padding:0;
}

.menu_text {
	font-family: Arial;
	font-size: 10px;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	color: #FFFFFF;
	text-decoration: none;
}
.ideas:hover,
.ideas {
  background-image: url(images/menu_01.png);
	font-family: Arial;
	font-size: 31px;
	font-weight: normal;
	color: #5a5a5a;
	background-repeat: no-repeat;
	margin-top:50px;
	float: left;
	height: 50px;
	width: 100px;
	padding:23px 0 0 34px;
  text-decoration:none;
  text-transform:capitalize;
}

.links:hover,
.links {
	background-image: url(images/menu_02.png);
	font-family: Arial;
	font-size: 31px;
	font-weight: normal;
	color: #5a5a5a;
	background-repeat: no-repeat;
	margin-top:50px;
	float: left;
	height: 50px;
	width: 100px;
  padding:23px 7px 0 42px;
  text-decoration:none;
  text-transform:capitalize;
}

.info:hover,
.info {
	background-image: url(images/menu_03.png);
  font-family: Arial;
	font-size: 31px;
	font-weight: normal;
	color: #5a5a5a;
	background-repeat: no-repeat;
	margin-top:50px;
	float: left;
	height: 50px;
	width: 100px;
	padding:23px 0 0 34px;
  text-decoration:none;
  text-transform:capitalize;
}

.works:hover,
.works {
	background-image: url(images/menu_04.png);
  font-family: Arial;
	font-size: 31px;
	font-weight: normal;
	color: #5a5a5a;
	background-repeat: no-repeat;
	margin-top:50px;
	float: left;
	height: 50px;
	width: 100px;
	padding:23px 0 0 50px;
  text-decoration:none;
  text-transform:capitalize;
}

.info:hover,
.links:hover,
.works:hover,
.ideas:hover {	color: #ffffff;}


text:
import * as tf from '@tensorflow/tfjs';
import * as path from 'path';
import {ProgbarLogger} from './callbacks';
import {nodeFileSystemRouter} from './io/file_system';
import * as nodeIo from './io/index';
import {NodeJSKernelBackend} from './nodejs_kernel_backend';
import {TFJSBinding} from './tfjs_binding';
import * as nodeVersion from './version';

// tslint:disable-next-line:no-require-imports
const binary = require('node-pre-gyp');
const bindingPath =
    binary.find(path.resolve(path.join(__dirname, '/../package.json')));
// tslint:disable-next-line:no-require-imports
const bindings = require(bindingPath);

// Merge version and io namespaces.
export const version = {
  ...tf.version,
  'tfjs-node': nodeVersion.version
};
export const io = {
  ...tf.io,
  ...nodeIo
};

// Export all union package symbols
export * from '@tensorflow/tfjs';
export * from './node';

// tslint:disable-next-line:no-require-imports
const pjson = require('../package.json');

tf.registerBackend('tensorflow', () => {
  return new NodeJSKernelBackend(bindings as TFJSBinding, pjson.name);
}, 3 /* priority */);

const success = tf.setBackend('tensorflow');
if (!success) {
  throw new Error(`Could not initialize TensorFlow backend.`);
}

// Register the model saving and loading handlers for the 'file://' URL scheme.
tf.io.registerLoadRouter(nodeFileSystemRouter);
tf.io.registerSaveRouter(nodeFileSystemRouter);

// Register the ProgbarLogger for Model.fit() at verbosity level 1.
tf.registerCallbackConstructor(1, ProgbarLogger);


text:
package org.diorite.config.annotations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Used to mark properties in config interfaces that should use given format.
 */
@Documented
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Formatted
{
    /**
     * Returns format of value.
     *
     * @return format of value.
     *
     * @see java.util.Formatter
     */
    String value();
}


text:
using System;
using System.ComponentModel;
using System.Windows;

namespace Xceed.Utils.Wpf.Markup
{
  [ EditorBrowsable( EditorBrowsableState.Never ) ]
  public sealed class XceedResourceDictionary : ResourceDictionary
  {
    #region CONSTRUCTORS

    public XceedResourceDictionary()
      : base()
    {
      m_xceedSource = string.Empty;
    }

    #endregion CONSTRUCTORS

    #region XceedSource PROPERTY

    private string m_xceedSource;

    [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly" )]
    public string XceedSource
    {

      get
      {
        return m_xceedSource;
      }
      set
      {
        if( value == null )
          throw new ArgumentNullException( "XceedSource" );

        m_xceedSource = value;

        string[] parsedArguments = m_xceedSource.Split( new char[] { ';' }, 2, StringSplitOptions.RemoveEmptyEntries );

        if( parsedArguments.Length != 2 )
          throw new ArgumentException( "Invalid URI format.", "XceedSource" );

        string uriString =  parsedArguments[ 0 ] +
          ";;;" + parsedArguments[ 1 ];

        Uri uri = new Uri( uriString, UriKind.RelativeOrAbsolute );

        this.Source = uri;
      }
    }

    #endregion XceedSource PROPERTY
  }
}


text:
package com.tyrlib2.graphics.renderer;

/**
 * Basic interface for objects providing a render capability
 * @author Sascha
 *
 */

public interface IRenderable {

	/** Renders this object the matrix containing projection and view will be passed **/
	public void render(float[] vpMatrix);
	public void renderShadow(float[] vpMatrix);
	public void setInsertionID(int id);
	public int getInsertionID();
	public void destroy();
}


text:
angular.module("app")
    .controller('DialogCtrl', function ($scope, $mdDialog, rest) {
        var prom = rest.getInfo();
        prom.then(function(data){
            $scope.info =data;
        });

        $scope.hide = function () {
            $mdDialog.hide();
        };

        $scope.cancel = function () {
            $mdDialog.cancel();
        };

        $scope.answer = function (answer) {
            $mdDialog.hide(answer);
        };
    });


text:
#region // Copyright - MIT License
//  © 2021 by Phill Hallam-Baker
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
#endregion

namespace Goedel.Utilities;

/// <summary>
/// Debug trace class
/// </summary>
public partial class Screen {

    ///<summary>Global default log level</summary>
    public static LogLevel LogLevel { get; set; } = LogLevel.Information;

    /// <summary>
    /// Write debug output to current trace listener.
    /// </summary>
    /// <param name="format">The format string</param>
    /// <param name="arg">Arguments to apply to the format string.</param>
    public static void WriteLine(string format, params object[] arg) =>
        WriteInfo(format, arg);

    /// <summary>
    /// Write debug output to current trace listener.
    /// </summary>
    /// <param name="format">The format string</param>
    /// <param name="arg">Arguments to apply to the format string.</param>
    public static void WriteInfo(string format, params object[] arg) {

        var caller = AssemblyStack.GetCallerMethodName();
        if (caller == "TaskFunctionality") {
            return;
            }
        if (arg == null || arg.Length == 0) {
            Console.WriteLine(format);
            }
        else {
            Console.WriteLine(format, arg);
            }

        }

    /// <summary>
    /// Write a blank line to the output
    /// </summary>
    public static void WriteLine() => Console.WriteLine();

    /// <summary>
    /// Write text to the console;
    /// </summary>
    /// <param name="text">The text to write.</param>
    public static void Write(string text) => Console.Write(text);

    }


text:
package com.dgex.offspring.wallet;

public interface INXTWalletAccount extends IWalletAccount {

  public String getPrivateKey();

  public String getAccountNumber();

  public long getBalance();

}


text:
package hasheq
package immutable

import hasheq.std.int._

class HashSetTest extends TestSuite {

  // test set of Int
  checkAll(SetRepr.properties[HashSet, Int]("SetRepr[HashSet, Int]"))

  // test set of Int modulo 10
  object Mod10
  implicit object IntEqMod10 extends Equiv[Int, Mod10.type] {
    def mod10(i: Int): Int = {
      val r = i % 10
      if (r < 0) r + 10
      else r
    }
    def equiv(a: Int, b: Int): Boolean = mod10(a) == mod10(b)
  }
  implicit object IntHashMod10 extends HashEq[Int, Mod10.type] {
    def hash(a: Int): Int = IntEqMod10.mod10(a)
  }
  checkAll(Setoid.genProperties[HashSetoid, Int, Mod10.type]("Setoid[HashSetoid, Int, Mod10]"))

  // check that the equivalence on HashSet is lawful
  checkAll(Equiv.properties[HashSet[Int]]())

  // check that the hash function on HashSet is lawful
  checkAll(HashEq.properties[HashSet[Int]]())

  // compilation check
  val x = HashSetoid(HashSetoid(HashSet(1)))
}


text:
package foo.bar;
import androidx.room.*;
import java.util.List;
import io.reactivex.Completable;
import io.reactivex.Maybe;
import io.reactivex.Single;

@Dao
abstract interface UpdateDao {
    @Update
    void updateUser(User user);
    @Update
    void updateUsers(User user1, List<User> others);
    @Update
    void updateArrayOfUsers(User[] users);
    @Update(onConflict=OnConflictStrategy.NONE)
    void updateTwoUsers(User userOne, User userTwo);

    @Update
    int updateUserAndReturnCount(User user);
    @Update
    int updateUserAndReturnCount(User user1, List<User> others);
    @Update
    int updateUserAndReturnCount(User[] users);

    @Update
    Integer updateUserAndReturnCountObject(User user);

    @Update
    Completable updateUserAndReturnCountCompletable(User user);
    @Update
    Single<Integer> updateUserAndReturnCountSingle(User user);
    @Update
    Maybe<Integer> updateUserAndReturnCountMaybe(User user);

    @Update
    int multiPKey(MultiPKeyEntity entity);

    @Update
    void updateUserAndBook(User user, Book book);

    @Query("UPDATE User SET ageColumn = ageColumn + 1 WHERE uid = :uid")
    void ageUserByUid(String uid);

    @Query("UPDATE User SET ageColumn = ageColumn + 1")
    void ageUserAll();

    @Query("UPDATE User SET ageColumn = ageColumn + 1")
    Completable ageUserAllCompletable();

    @Query("UPDATE User SET ageColumn = ageColumn + 1")
    Single<Integer> ageUserAllSingle();

    @Query("UPDATE User SET ageColumn = ageColumn + 1")
    Maybe<Integer> ageUserAllMaybe();

    @Transaction
    default void updateAndAge(User user) {
        updateUser(user);
        ageUserByUid(String.valueOf(user.uid));
    }
}


text:
package com.google.firebase.database.utilities;

public class OffsetClock implements Clock {

  private final Clock baseClock;
  private long offset = 0;

  public OffsetClock(Clock baseClock, long offset) {
    this.baseClock = baseClock;
    this.offset = offset;
  }

  public void setOffset(long offset) {
    this.offset = offset;
  }

  @Override
  public long millis() {
    return baseClock.millis() + offset;
  }
}


text:
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * AdGroupCriterionLabel.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
 */

package com.google.api.ads.adwords.axis.v201809.cm;

/**
 * Manages the labels associated with an AdGroupCriterion.
 */
public class AdGroupCriterionLabel  implements java.io.Serializable {
    /* The id of the adgroup containing the criterion that the label
     * is applied to.
     *                 This field is required
     * and should not be {@code null} when it is contained within {@link
     * Operator}s : ADD, REMOVE. */
    private java.lang.Long adGroupId;

    /* The id of the criterion that the label is applied to.
     *                 This field is required
     * and should not be {@code null} when it is contained within {@link
     * Operator}s : ADD, REMOVE. */
    private java.lang.Long criterionId;

    /* The id of an existing label to be applied to the adgroup criterion.
     * This field is required and should
     * not be {@code null} when it is contained within {@link Operator}s
     * : ADD, REMOVE. */
    private java.lang.Long labelId;

    public AdGroupCriterionLabel() {
    }

    public AdGroupCriterionLabel(
           java.lang.Long adGroupId,
           java.lang.Long criterionId,
           java.lang.Long labelId) {
           this.adGroupId = adGroupId;
           this.criterionId = criterionId;
           this.labelId = labelId;
    }

    @Override
    public String toString() {
        return com.google.common.base.MoreObjects.toStringHelper(this.getClass())
            .omitNullValues()
            .add("adGroupId", getAdGroupId())
            .add("criterionId", getCriterionId())
            .add("labelId", getLabelId())
            .toString();
    }

    /**
     * Gets the adGroupId value for this AdGroupCriterionLabel.
     *
     * @return adGroupId   * The id of the adgroup containing the criterion that the label
     * is applied to.
     *                 This field is required
     * and should not be {@code null} when it is contained within {@link
     * Operator}s : ADD, REMOVE.
     */
    public java.lang.Long getAdGroupId() {
        return adGroupId;
    }

    /**
     * Sets the adGroupId value for this AdGroupCriterionLabel.
     *
     * @param adGroupId   * The id of the adgroup containing the criterion that the label
     * is applied to.
     *                 This field is required
     * and should not be {@code null} when it is contained within {@link
     * Operator}s : ADD, REMOVE.
     */
    public void setAdGroupId(java.lang.Long adGroupId) {
        this.adGroupId = adGroupId;
    }

    /**
     * Gets the criterionId value for this AdGroupCriterionLabel.
     *
     * @return criterionId   * The id of the criterion that the label is applied to.
     *                 This field is required
     * and should not be {@code null} when it is contained within {@link
     * Operator}s : ADD, REMOVE.
     */
    public java.lang.Long getCriterionId() {
        return criterionId;
    }

    /**
     * Sets the criterionId value for this AdGroupCriterionLabel.
     *
     * @param criterionId   * The id of the criterion that the label is applied to.
     *                 This field is required
     * and should not be {@code null} when it is contained within {@link
     * Operator}s : ADD, REMOVE.
     */
    public void setCriterionId(java.lang.Long criterionId) {
        this.criterionId = criterionId;
    }

    /**
     * Gets the labelId value for this AdGroupCriterionLabel.
     *
     * @return labelId   * The id of an existing label to be applied to the adgroup criterion.
     * This field is required and should
     * not be {@code null} when it is contained within {@link Operator}s
     * : ADD, REMOVE.
     */
    public java.lang.Long getLabelId() {
        return labelId;
    }

    /**
     * Sets the labelId value for this AdGroupCriterionLabel.
     *
     * @param labelId   * The id of an existing label to be applied to the adgroup criterion.
     * This field is required and should
     * not be {@code null} when it is contained within {@link Operator}s
     * : ADD, REMOVE.
     */
    public void setLabelId(java.lang.Long labelId) {
        this.labelId = labelId;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof AdGroupCriterionLabel)) return false;
        AdGroupCriterionLabel other = (AdGroupCriterionLabel) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
            ((this.adGroupId==null && other.getAdGroupId()==null) ||
             (this.adGroupId!=null &&
              this.adGroupId.equals(other.getAdGroupId()))) &&
            ((this.criterionId==null && other.getCriterionId()==null) ||
             (this.criterionId!=null &&
              this.criterionId.equals(other.getCriterionId()))) &&
            ((this.labelId==null && other.getLabelId()==null) ||
             (this.labelId!=null &&
              this.labelId.equals(other.getLabelId())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getAdGroupId() != null) {
            _hashCode += getAdGroupId().hashCode();
        }
        if (getCriterionId() != null) {
            _hashCode += getCriterionId().hashCode();
        }
        if (getLabelId() != null) {
            _hashCode += getLabelId().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(AdGroupCriterionLabel.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201809", "AdGroupCriterionLabel"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("adGroupId");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201809", "adGroupId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("criterionId");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201809", "criterionId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("labelId");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201809", "labelId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


text:
=============
Authorization
=============

Presto can be configured to enable authorization support for HTTP endpoints to
allow system administrators to control access to different HTTP endpoints in
Presto.

Role Based Access Control
-------------------------

Every HTTP endpoint in Presto is secured by a set of roles and can only be
accessed by identities that belong to one of those roles. There are three
roles defined in Presto:

* ``user``: Users who should have access to external endpoints like those needed
  to launch queries, check status, get output data and provides data for UI.
* ``internal``: Internal components of Presto (like coordinator and worker)
  which will have access to endpoints like launching tasks on workers and
  fetching exchange data from another worker.
* ``admin``: System administrators who will have access to internal service
  endpoints like those to get node status.

Enabling Authorization
----------------------

The following steps need to be taken in order to enable authorization:

 1. :ref:`enable_authentication`
 2. :ref:`configure_authorizer`
 3. :ref:`configure_authorization_settings`

.. _enable_authentication:

Enable Authentication
^^^^^^^^^^^^^^^^^^^^^

Presto authorization requires authentication to get the accessor's principal,
so make sure you have authentication enabled.

   - If TLS/SSL is configured properly, we can just use the certificate to
     identify the accessor.

     .. code-block:: none

         http-server.authentication.type=CERTIFICATE

   - It is also possible to specify other authentication types such as
     ``KERBEROS``, ``PASSWORD`` and ``JWT``. Additional configuration may be
     needed.

     .. code-block:: none

         node.internal-address=<authentication type>

.. _configure_authorizer:

Configure Authorizer
^^^^^^^^^^^^^^^^^^^^

To enable authorization, the interface
``com.facebook.airlift.http.server.Authorizer`` must be implemented and bound.
It performs the actual authorization check based on the principal of incoming
request and the allowed roles of endpoint being requested.

You can either use the preset ``ConfigurationBasedAuthorizer`` or implement
your own.

Configuration-based Authorizer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This plugin allows you to turn on authorization support by specifying a mapping
from roles to a regex for matching identities. Use the following steps to start using
Configuration-based authorizer:

1. Create a role to identity regex mapping and store it in a file.

    .. code-block:: none

        user=.*
        internal=coordinator
        admin=su.*

2. Specify the path to the mapping file in ``config.properties`` file:

    .. code-block:: none

        configuration-based-authorizer.role-regex-map.file-path=<path to mapping file>

3. Install the Guice module
   ``com.facebook.airlift.http.server.ConfigurationBasedAuthorizerModule``.

.. _configure_authorization_settings:

Configure Authorization Settings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Authorization settings is configured in the ``config.properties`` file. The
authorization on the worker and coordinator nodes are configured using the same
set of properties.

The following is an example of the properties that need to be added to the
``config.properties`` file:

.. code-block:: none

    http-server.authorization.enabled=true
    http-server.authorization.default-policy=ALLOW
    http-server.authorization.default-allowed-roles=USER,ADMIN
    http-server.authorization.allow-unsecured-requests=false

======================================================= ======================================================
Property                                                Description
======================================================= ======================================================
``http-server.authorization.enabled``                   Enable authorization for the Presto.
                                                        Should be set to ``true``. Default value is
                                                        ``false``.
``http-server.authorization.default-policy``            The default authorization policy applies to endpoints
                                                        without allowed roles specified. Can be set to
                                                        ``ALLOW``, ``DENY`` and ``DEFAULT_ROLES``.
``http-server.authorization.default-allowed-roles``     The roles allowed to access the endpoints without
                                                        explicitly specified when default-policy is set to
                                                        ``DEFAULT_ROLES``.
``http-server.authorization.allow-unsecured-requests``  Skip authorization check for unsecured requests.
                                                        Default value is ``false``.
======================================================= ======================================================

.. warning::

    ``http-server.authorization.allow-unsecured-requests`` is provided as a way to
    transition from HTTP to HTTPS with authorization and is a security hole
    since it allows unauthenticated requests to skip authorization checks. Only
    enable during the transition period and disable this setting once you have
    completed migrated to using HTTPS.


text:
import {expect} from 'chai'
import {transformYupToFormikError} from '../error-transform'
import {string, object} from 'yup'

it('transformYupToFormikError()', () => {
  const errorMsg = 'Name is required'
  const Schema = object().shape({
    name: string().required(errorMsg)
  })

  return Schema.validate({})
    .then(() => expect(true).to.be.false) // force catch to always be executed
    .catch((err) => {
      expect(err.name).to.be.equal('ValidationError')
      expect(transformYupToFormikError(err).name).to.be.equal(errorMsg)
    })
})


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>org.netbeans.modules.apisupport.project</type>
    <configuration>
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
            <code-name-base>com.airo.communicationbus</code-name-base>
            <suite-component/>
            <module-dependencies>
                <dependency>
                    <code-name-base>org.openide.util.lookup</code-name-base>
                    <build-prerequisite/>
                    <compile-dependency/>
                    <run-dependency>
                        <specification-version>8.24.1</specification-version>
                    </run-dependency>
                </dependency>
            </module-dependencies>
            <public-packages>
                <package>com.airo.utils.communicationbus</package>
                <package>com.airo.utils.communicationbus.sockets</package>
            </public-packages>
        </data>
    </configuration>
</project>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Typeyatsu
{
    /// <summary>
    /// PlayAloneResultPage.xaml の相互作用ロジック
    /// </summary>
    public partial class PlayAloneResultPage : UserControl
    {
        public PlayAloneResultPage()
        {
            InitializeComponent();
        }

        private PlayAloneResultPageViewModel ViewModel => this.DataContext as PlayAloneResultPageViewModel;

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            this.ViewModel.WindowKeyDown += (_, f) =>
            {
                switch (f.Key)
                {
                    case Key.Enter:
                    case Key.Space:
                    case Key.Escape:
                        this.ViewModel.GoBack();
                        e.Handled = true;
                        break;
                }
            };
        }
    }
}


text:
package net.jawr.web.test.postprocessor.autoprefixer;

import static org.junit.Assert.assertEquals;

import java.util.Collections;
import java.util.List;

import net.jawr.web.test.JawrTestConfigFiles;

import org.junit.Test;

import com.gargoylesoftware.htmlunit.TextPage;
import com.gargoylesoftware.htmlunit.html.HtmlLink;

/**
 * Integration Test for Autoprefixer postprocessor
 *
 * @author Ibrahim Chaehoi
 */
@JawrTestConfigFiles(webXml = "net/jawr/web/postprocessor/css/autoprefixer/config/web.xml", jawrConfig = "net/jawr/web/postprocessor/css/autoprefixer/config/jawr-with-autoprefixer-options.properties")
public class PageAutoPrefixerPostProcessorWithOptionsTest extends PageAutoPrefixerPostProcessorTest {

	@Test
	public void testPageLoad() throws Exception {

		final List<String> expectedAlerts = Collections
				.singletonList("A little message retrieved from the message bundle : Hello $ world!");
		assertEquals(expectedAlerts, collectedAlerts);

		assertContentEquals("/net/jawr/web/postprocessor/css/autoprefixer/resources/index-jsp-autoprefixer-with-options-result-expected.txt", page);
	}

	@Test
	public void checkGeneratedCssLinks() {
		// Test generated Css link
		final List<HtmlLink> styleSheets = getHtmlLinkTags();
		assertEquals(1, styleSheets.size());
		final HtmlLink css = styleSheets.get(0);
		assertEquals(
				getUrlPrefix()+"/N480141109/fwk/core/component.css",
				css.getHrefAttribute());

	}

	@Test
	public void testCssBundleContent() throws Exception {

		final List<HtmlLink> styleSheets = getHtmlLinkTags();
		final HtmlLink css = styleSheets.get(0);
		final TextPage page = getCssPage(css);
		assertContentEquals("/net/jawr/web/postprocessor/css/autoprefixer/resources/component-autoprefixer-with-options-expected.css", page);
	}
}


text:
<?php

class CM_Usertext_Filter_BadwordsTest extends CMTest_TestCase {

    public function testTransformDefaultReplacement() {
        $filter = new CM_Usertext_Filter_Badwords();

        $badwords = new CM_Paging_ContentList_Badwords();
        $badwords->add('foo');

        $this->assertSame('… bar', $filter->transform('foo bar', new CM_Frontend_Render()));
    }

    public function testTransformCustomReplacement() {
        $filter = new CM_Usertext_Filter_Badwords('---');

        $badwords = new CM_Paging_ContentList_Badwords();
        $badwords->add('foo');

        $this->assertSame('--- bar', $filter->transform('foo bar', new CM_Frontend_Render()));
    }
}


text:
SoundContentSettingObserver::SoundContentSettingObserver(
    content::WebContents* contents)
    : content::WebContentsObserver(contents), logged_site_muted_ukm_(false) {
  Profile* profile =
      Profile::FromBrowserContext(web_contents()->GetBrowserContext());
  host_content_settings_map_ =
      HostContentSettingsMapFactory::GetForProfile(profile);
  observer_.Add(host_content_settings_map_);

#if !defined(OS_ANDROID)
  // Listen to changes of the block autoplay pref.
  pref_change_registrar_.Init(profile->GetPrefs());
  pref_change_registrar_.Add(
      prefs::kBlockAutoplayEnabled,
      base::BindRepeating(&SoundContentSettingObserver::UpdateAutoplayPolicy,
                          base::Unretained(this)));
#endif
}

SoundContentSettingObserver::~SoundContentSettingObserver() = default;

void SoundContentSettingObserver::ReadyToCommitNavigation(
    content::NavigationHandle* navigation_handle) {
  if (navigation_handle->IsSameDocument())
    return;

  if (!base::FeatureList::IsEnabled(media::kAutoplayWhitelistSettings))
    return;

  GURL url = navigation_handle->IsInMainFrame()
                 ? navigation_handle->GetURL()
                 : navigation_handle->GetWebContents()->GetLastCommittedURL();

  content_settings::SettingInfo setting_info;
  std::unique_ptr<base::Value> setting =
      host_content_settings_map_->GetWebsiteSetting(
          url, navigation_handle->GetURL(), ContentSettingsType::SOUND,
          std::string(), &setting_info);

  if (content_settings::ValueToContentSetting(setting.get()) !=
      CONTENT_SETTING_ALLOW) {
    return;
  }

  if (setting_info.source != content_settings::SETTING_SOURCE_USER)
    return;

  if (setting_info.primary_pattern == ContentSettingsPattern::Wildcard() &&
      setting_info.secondary_pattern == ContentSettingsPattern::Wildcard()) {
    return;
  }

  mojo::AssociatedRemote<blink::mojom::AutoplayConfigurationClient> client;
  navigation_handle->GetRenderFrameHost()
      ->GetRemoteAssociatedInterfaces()
      ->GetInterface(&client);
  client->AddAutoplayFlags(url::Origin::Create(navigation_handle->GetURL()),
                           blink::mojom::kAutoplayFlagUserException);
}

void SoundContentSettingObserver::DidFinishNavigation(
    content::NavigationHandle* navigation_handle) {
  if (navigation_handle->IsInMainFrame() && navigation_handle->HasCommitted() &&
      !navigation_handle->IsSameDocument()) {
    MuteOrUnmuteIfNecessary();
    logged_site_muted_ukm_ = false;
  }
}

void SoundContentSettingObserver::OnAudioStateChanged(bool audible) {
  CheckSoundBlocked(audible);
}

void SoundContentSettingObserver::OnContentSettingChanged(
    const ContentSettingsPattern& primary_pattern,
    const ContentSettingsPattern& secondary_pattern,
    ContentSettingsType content_type,
    const std::string& resource_identifier) {
  if (content_type != ContentSettingsType::SOUND)
    return;

#if !defined(OS_ANDROID)
  if (primary_pattern == ContentSettingsPattern() &&
      secondary_pattern == ContentSettingsPattern() &&
      resource_identifier.empty()) {
    UpdateAutoplayPolicy();
  }
#endif

  MuteOrUnmuteIfNecessary();
  CheckSoundBlocked(web_contents()->IsCurrentlyAudible());
}

void SoundContentSettingObserver::MuteOrUnmuteIfNecessary() {
  bool mute = GetCurrentContentSetting() == CONTENT_SETTING_BLOCK;

// TabMutedReason does not exist on Android.
#if defined(OS_ANDROID)
  web_contents()->SetAudioMuted(mute);
#else
  // We don't want to overwrite TabMutedReason with no change.
  if (mute == web_contents()->IsAudioMuted())
    return;

  TabMutedReason reason = chrome::GetTabAudioMutedReason(web_contents());

  // Do not override the decisions of an extension.
  if (reason == TabMutedReason::EXTENSION)
    return;

  // Don't unmute a chrome:// URL if the tab has been explicitly muted on a
  // chrome:// URL.
  if (reason == TabMutedReason::CONTENT_SETTING_CHROME &&
      web_contents()->GetLastCommittedURL().SchemeIs(
          content::kChromeUIScheme)) {
    return;
  }

  chrome::SetTabAudioMuted(web_contents(), mute,
                           TabMutedReason::CONTENT_SETTING, std::string());
#endif  // defined(OS_ANDROID)
}

ContentSetting SoundContentSettingObserver::GetCurrentContentSetting() {
  GURL url = web_contents()->GetLastCommittedURL();
  return host_content_settings_map_->GetContentSetting(
      url, url, ContentSettingsType::SOUND, std::string());
}

void SoundContentSettingObserver::CheckSoundBlocked(bool is_audible) {
  if (is_audible && GetCurrentContentSetting() == CONTENT_SETTING_BLOCK) {
    // The tab has tried to play sound, but was muted.
    content_settings::TabSpecificContentSettings* settings =
        content_settings::TabSpecificContentSettings::FromWebContents(
            web_contents());
    if (settings)
      settings->OnAudioBlocked();

    RecordSiteMutedUKM();
  }
}

void SoundContentSettingObserver::RecordSiteMutedUKM() {
  // We only want to log 1 event per navigation.
  if (logged_site_muted_ukm_)
    return;
  logged_site_muted_ukm_ = true;

  ukm::builders::Media_SiteMuted(
      ukm::GetSourceIdForWebContentsDocument(web_contents()))
      .SetMuteReason(GetSiteMutedReason())
      .Record(ukm::UkmRecorder::Get());
}

SoundContentSettingObserver::MuteReason
SoundContentSettingObserver::GetSiteMutedReason() {
  const GURL url = web_contents()->GetLastCommittedURL();
  content_settings::SettingInfo info;
  host_content_settings_map_->GetWebsiteSetting(
      url, url, ContentSettingsType::SOUND, std::string(), &info);

  DCHECK_EQ(content_settings::SETTING_SOURCE_USER, info.source);

  if (info.primary_pattern == ContentSettingsPattern::Wildcard() &&
      info.secondary_pattern == ContentSettingsPattern::Wildcard()) {
    return MuteReason::kMuteByDefault;
  }
  return MuteReason::kSiteException;
}

#if !defined(OS_ANDROID)
void SoundContentSettingObserver::UpdateAutoplayPolicy() {
  // Force a WebkitPreferences update to update the autoplay policy.
  web_contents()->GetRenderViewHost()->OnWebkitPreferencesChanged();
}
#endif

WEB_CONTENTS_USER_DATA_KEY_IMPL(SoundContentSettingObserver)


text:
#include <aws/iam/model/GetGroupResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>

#include <utility>

using namespace Aws::IAM::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;

GetGroupResult::GetGroupResult() :
    m_isTruncated(false)
{
}

GetGroupResult::GetGroupResult(const Aws::AmazonWebServiceResult<XmlDocument>& result) :
    m_isTruncated(false)
{
  *this = result;
}

GetGroupResult& GetGroupResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
  const XmlDocument& xmlDocument = result.GetPayload();
  XmlNode rootNode = xmlDocument.GetRootElement();
  XmlNode resultNode = rootNode;
  if (!rootNode.IsNull() && (rootNode.GetName() != "GetGroupResult"))
  {
    resultNode = rootNode.FirstChild("GetGroupResult");
  }

  if(!resultNode.IsNull())
  {
    XmlNode groupNode = resultNode.FirstChild("Group");
    if(!groupNode.IsNull())
    {
      m_group = groupNode;
    }
    XmlNode usersNode = resultNode.FirstChild("Users");
    if(!usersNode.IsNull())
    {
      XmlNode usersMember = usersNode.FirstChild("member");
      while(!usersMember.IsNull())
      {
        m_users.push_back(usersMember);
        usersMember = usersMember.NextNode("member");
      }

    }
    XmlNode isTruncatedNode = resultNode.FirstChild("IsTruncated");
    if(!isTruncatedNode.IsNull())
    {
      m_isTruncated = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(isTruncatedNode.GetText()).c_str()).c_str());
    }
    XmlNode markerNode = resultNode.FirstChild("Marker");
    if(!markerNode.IsNull())
    {
      m_marker = Aws::Utils::Xml::DecodeEscapedXmlText(markerNode.GetText());
    }
  }

  if (!rootNode.IsNull()) {
    XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
    m_responseMetadata = responseMetadataNode;
    AWS_LOGSTREAM_DEBUG("Aws::IAM::Model::GetGroupResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
  }
  return *this;
}


text:
<?php
/**
 * Bootstrap Pagination.
 *
 * Echos Bootstraped paginated links (http://getbootstrap.com/components/#pagination).
 *
 * @since 0.0.1
 *
 * @param array $args {
 *     An array of arguments. Optional.
 *     @type bool 'echo'           If true, pagination is echoed. Otherwise is is returned.
 *                                 Default true. Accepts true|false.
 *     @type WP_Query 'query'      Allows you to specify a custom query to paginate (avoids the dreaded query_posts()).
 *                                 Default $GLOBALS['wp_query']. Accepts WP_Query object.
 *     @type bool 'show_all'       If set to True, then it will show all of the pages instead of a short list of the pages near the current page.
 *                                 Default false. Accepts true|false.
 *     @type bool 'prev_next'      Wheter to include the previous and next links in the list or not.
 *                                 Default true. Accepts true|false.
 *     @type string 'prev_text'    The previous page text which is only shown to screenreaders. Works only if 'prev_next' argument is set to true.
 *                                 Default ''. Accepts string.
 *     @type string 'next_text'    The next page text which is only shown to screenreaders. Works only if 'prev_next' argument is set to true.
 *                                 Default ''. Accepts string.
 * }
 * @return string Bootstrapped HTML for pagination list if 'echo' is set to false.
 * @return void Value is echoed if 'echo' is set to true.
 */

function roots_pagination( $args = array() ) {
	$defaults = array(
		'echo' => true,
		'query' => $GLOBALS['wp_query'],
		'show_all' => false,
		'prev_next' => true,
		'prev_text' => __('Previous Page', 'roots'),
		'next_text' => __('Next Page', 'roots'),
	);

	$args = wp_parse_args( $args, $defaults );
	extract($args, EXTR_SKIP);

	// Stop execution if there's only 1 page
	if( $query->max_num_pages <= 1 ) {
		return;
	}

	$pagination = '';
	$links = array();

	$paged = max( 1, absint( $query->get( 'paged' ) ) );
	$max   = intval( $query->max_num_pages );

	if ( $show_all ) {
		$links = range(1, $max);
	} else {
		// Add the pages before the current page to the array
		if ( $paged >= 2 + 1 ) {
			$links[] = $paged - 2;
			$links[] = $paged - 1;
		}

		// Add current page to the array
		if ( $paged >= 1 ) {
			$links[] = $paged;
		}

		// Add the pages after the current page to the array
		if ( ( $paged + 2 ) <= $max ) {
			$links[] = $paged + 1;
			$links[] = $paged + 2;
		}
	}

	$pagination .= "\n" . '
' . "\n";

	// Previous Post Link
	if ( $prev_next && get_previous_posts_link() ) {
		$pagination .= sprintf( '
%s
', get_previous_posts_link('«' . $prev_text . '') );
	}

	$pagination .= "\n";

	// Link to first page, plus ellipses if necessary
	if ( ! in_array( 1, $links ) ) {
		$class = 1 == $paged ? ' class="active"' : '';

		$pagination .= sprintf( '
%s
', $class, esc_url( get_pagenum_link( 1 ) ), '1' );
		$pagination .= "\n";
		if ( ! in_array( 2, $links ) ) {
			$pagination .= '
' . __( '…' ) . '
';
		}
		$pagination .= "\n";
	}

	// Link to current page, plus $mid_size pages in either direction if necessary
	sort( $links );
	foreach ( (array) $links as $link ) {
		$class = $paged == $link ? ' class="active"' : '';
		$pagination .= sprintf( '
%s
', $class, esc_url( get_pagenum_link( $link ) ), $link );
		$pagination .= "\n";
	}

	// Link to last page, plus ellipses if necessary
	if ( ! in_array( $max, $links ) ) {
		if ( ! in_array( $max - 1, $links ) ) {
			$pagination .= '
' . __( '…' ) . '
';
			$pagination .= "\n";
		}

		$class = $paged == $max ? ' class="active"' : '';
		$pagination .= sprintf( '
%s
' . "\n", $class, esc_url( get_pagenum_link( $max ) ), $max );
		$pagination .= "\n";
	}

	// Next Post Link
	if ( $prev_next && get_next_posts_link() && $paged <= $max ) {
		$pagination .= sprintf( '
%s
' . "\n", get_next_posts_link('' . $next_text . '»') );
	}

	$pagination .= "
\n";

	if ( $echo ) {
		echo $pagination;
	} else {
		return $pagination;
	}

}


text:
/* 通过托单模板加速托单的创建 */
$(function(){
    var copyBtn = $("<button class='btn btn-success btn-small pull-left'><i class='icon-inbox icon-white'></i> 引用模板</button>");
    copyBtn.appendTo( $("form div.bottom-bar") );
    copyBtn.click(function(){
        ksa.logistics.selectBookingNotes(function(bns){
            if( bns && bns.length > 0 ) {
                $("<input type='hidden' name='template' value='"+bns[0].value+"' />").appendTo($("form"));
                var action = $("form").attr("action");
                $("form").attr("action", action.replace('bookingnote/insert', 'create'));
                $("input[name='type']").remove();
                $("form")[0].submit();
            }
        });
        return false;
    });
});


text:
using System;
using System.Xml.Linq;

namespace twopointzero.Lml.Xml.Linq.Extensions
{
    internal static class XElementExtensions
    {
        internal static void AddAttributeIfValueNonEmpty(this XElement self, XName name, object value)
        {
            if (value == null || (value is string && ((string)value).Length == 0))
            {
                return;
            }

            self.Add(new XAttribute(name, value));
        }

        internal static DateTime? GetAttributeValueAsNullableDateTime(this XElement self, string attributeName)
        {
            string value = self.GetNonEmptyAttributeValueOrNull(attributeName);
            return value == null ? (DateTime?)null : Convert.ToDateTime(value);
        }

        internal static double? GetAttributeValueAsNullableDouble(this XElement self, string attributeName)
        {
            string value = self.GetNonEmptyAttributeValueOrNull(attributeName);
            return value == null ? (double?)null : Convert.ToDouble(value);
        }

        internal static int? GetAttributeValueAsNullableInt32(this XElement self, string attributeName)
        {
            string value = self.GetNonEmptyAttributeValueOrNull(attributeName);
            return value == null ? (int?)null : Convert.ToInt32(value);
        }

        internal static string GetNonEmptyAttributeValue(this XElement self, string attributeName,
                                                         string attributeClarification)
        {
            string value = self.GetNonEmptyAttributeValueOrNull(attributeName);
            if (value == null)
            {
                throw new ArgumentOutOfRangeException("self",
                                                      "A v (" + attributeClarification + ") attribute is required.");
            }
            return value;
        }

        internal static string GetNonEmptyAttributeValueOrNull(this XElement self, string name)
        {
            XAttribute attribute = self.Attribute(name);
            if (attribute == null || String.IsNullOrEmpty(attribute.Value))
            {
                return null;
            }

            return attribute.Value;
        }
    }
}


text:
require "spec_helper"
require_relative './embeds_many_models'

describe Mongoid::Association::Embedded::EmbedsMany do

  context 'when projecting with #only' do
    before do
      congress = EmmCongress.new(name: 'foo')
      congress.legislators << EmmLegislator.new(a: 1, b: 2)
      congress.save!
    end

    let(:congress) do
      EmmCongress.where(name: 'foo').only(:name, 'legislators._id', 'legislators.a').first
    end

    let(:legislator) { congress.legislators.first }

    it 'populates specified fields only' do
      expect(legislator.a).to eq(1)
      # has a default value specified in the model
      expect do
        legislator.b
      end.to raise_error(ActiveModel::MissingAttributeError)
      expect(legislator.attributes.keys).to eq(['_id', 'a'])
    end

    context 'when using only with $' do
      before do
        Patient.destroy_all
        Patient.create!(
          title: 'Steve',
          addresses: [
            Address.new(number: '123'),
            Address.new(number: '456'),
          ],
        )
      end

      let(:patient) do
        Patient.where('addresses.number' => {'$gt' => 100}).only('addresses.$').first
      end

      it 'loads embedded association' do
        expect(patient.addresses.first.number).to eq(123)
      end
    end
  end
end