text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>weak-up-to: 33 s 🏆</title>
    <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
    <link href="../../../../../bootstrap.min.css" rel="stylesheet">
    <link href="../../../../../bootstrap-custom.css" rel="stylesheet">
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

             Coq bench

clean / extra-dev

dev / weak-up-to - dev

            « Up

              weak-up-to

                dev
                33 s 🏆

📅  (2022-04-28 01:17:57 UTC)

Context

# Packages matching: installed
# Name                   # Installed # Synopsis
base-bigarray            base
base-threads             base
base-unix                base
conf-findutils           1           Virtual package relying on findutils
conf-gmp                 4           Virtual package relying on a GMP lib system installation
coq                      dev         Formal proof management system
dune                     3.1.1       Fast, portable, and opinionated build system
ocaml                    4.07.1      The OCaml compiler (virtual package)
ocaml-base-compiler      4.07.1      Official release 4.07.1
ocaml-config             1           OCaml Switch Configuration
ocaml-secondary-compiler 4.08.1-1    OCaml 4.08.1 Secondary Switch Compiler
ocamlfind                1.9.1       A library manager for OCaml
ocamlfind-secondary      1.9.1       Adds support for ocaml-secondary-compiler to ocamlfind
zarith                   1.12        Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "dev@clarus.me"
homepage: "https://github.com/coq-contribs/weak-up-to"
license: "GPL"
build: [
  ["coq_makefile" "-f" "Make" "-o" "Makefile"]
  [make "-j%{jobs}%"]
]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/WeakUpTo"]
depends: [
  "ocaml"
  "coq" {= "dev"}
]
tags: [
  "keyword:weak bisimulation"
  "keyword:up-to techniques"
  "keyword:termination"
  "keyword:commutation"
  "keyword:Newman's lemma"
  "category:Computer Science/Concurrent Systems and Protocols/Theory of concurrent systems"
  "date:2005-02-22"
]
authors: [ "Damien Pous <Damien.Pous@ens-lyon.fr>" ]
synopsis: "New Up-to Techniques for Weak Bisimulation"
description: """
This contribution is the formalisation of a paper that appeared in
Proc. of ICALP 2005: "Up-to Techniques for Weak Bisimulation".
First we define a framework for defining up-to techniques for weak
bisimulation in a modular way. Then we prove the correctness of some
new up-to techniques, based on termination guarantees. Notably, a
generalisation of Newman's Lemma to commutation results is
established."""
flags: light-uninstall
url {
  src: "git+https://github.com/coq-contribs/weak-up-to.git#master"
}

Lint

Command

true

Return code

0

Dry install 🏜

Dry install with the current Coq version:

Command

opam install -y --show-action coq-weak-up-to.dev coq.dev

Return code

0

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command

true

Return code

0

Install dependencies

Command

opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-weak-up-to.dev coq.dev

Return code

0

Duration

11 s

Install 🚀

Command

opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y coq-weak-up-to.dev coq.dev

Return code

0

Duration

33 s

Installation size

Total: 638 K

64 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Settings.vo

50 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Theory.vo

47 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Relations.vo

42 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Theory.glob

38 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Diagrams.vo

37 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Settings.glob

36 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Relations.glob

32 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Diagrams.glob

26 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/WeakMonotonic.vo

23 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Applications.glob

20 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Monotonic.vo

20 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/WeakMonotonic.glob

20 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Functions.vo

19 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Controlled.vo

17 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Applications.vo

16 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Reductions.vo

15 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Functions.glob

15 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Controlled.glob

14 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Monotonic.glob

13 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Settings.v

13 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Diagrams.v

13 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Reductions.glob

10 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Relations.v

10 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Theory.v

7 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/WeakMonotonic.v

5 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Monotonic.v

5 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Controlled.v

5 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Applications.v

4 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Functions.v

4 K ../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/WeakUpTo/Reductions.v

Uninstall 🧹

Command

opam remove -y coq-weak-up-to.dev

Return code

0

Missing removes

                none

Wrong removes

                none

          Sources are on GitHub © Guillaume Claret 🐣


text:
package junit.tests.runner;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

import junit.framework.TestCase;
import junit.tests.framework.Success;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.tests.running.methods.AnnotationTest;

public class ResultTest extends TestCase {

    public void testRunFailureResultCanBeSerialised() throws Exception {
        JUnitCore runner = new JUnitCore();
        Result result = runner.run(AnnotationTest.FailureTest.class);
        assertResultSerializable(result);
    }

    public void testRunSuccessResultCanBeSerialised() throws Exception {
        JUnitCore runner = new JUnitCore();
        Result result = runner.run(Success.class);
        assertResultSerializable(result);
    }

    private void assertResultSerializable(Result result) throws IOException, ClassNotFoundException {
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        new ObjectOutputStream(byteArrayOutputStream).writeObject(result);
        byte[] bytes = byteArrayOutputStream.toByteArray();
        ObjectInputStream objectInputStream = new ObjectInputStream(new ByteArrayInputStream(bytes));
        Result fromStream = (Result) objectInputStream.readObject();
        assertNotNull(fromStream);
    }
}

redpajama_set_name: RedPajamaGithub


text:
"""Execute computations asynchronously using threads or processes."""

__author__ = 'Brian Quinlan (brian@sweetapp.com)'

from concurrent.futures._base import (FIRST_COMPLETED,
                                      FIRST_EXCEPTION,
                                      ALL_COMPLETED,
                                      CancelledError,
                                      TimeoutError,
                                      InvalidStateError,
                                      BrokenExecutor,
                                      Future,
                                      Executor,
                                      wait,
                                      as_completed)

__all__ = (
    'FIRST_COMPLETED',
    'FIRST_EXCEPTION',
    'ALL_COMPLETED',
    'CancelledError',
    'TimeoutError',
    'BrokenExecutor',
    'Future',
    'Executor',
    'wait',
    'as_completed',
    'ProcessPoolExecutor',
    'ThreadPoolExecutor',
)

def __dir__():
    return __all__ + ('__author__', '__doc__')

def __getattr__(name):
    global ProcessPoolExecutor, ThreadPoolExecutor

    if name == 'ProcessPoolExecutor':
        from .process import ProcessPoolExecutor as pe
        ProcessPoolExecutor = pe
        return pe

    if name == 'ThreadPoolExecutor':
        from .thread import ThreadPoolExecutor as te
        ThreadPoolExecutor = te
        return te

    raise AttributeError(f"module {__name__} has no attribute {name}")


text:
module ConservationStatusesHelper
  def iucn_status_select_options
    Taxon::IUCN_STATUS_NAMES.map do | status_name |
      ["#{I18n.t( status_name, default: status_name ).humanize} (#{Taxon::IUCN_STATUS_CODES[status_name]})",
       Object.const_get( "Taxon::IUCN_#{status_name.upcase}" )]
    end
  end
end


text:
package org.terracotta.ipceventbus.event;

import java.util.UUID;

/**
 * @author Mathieu Carbou
 */
public class BaseBuilder<T extends BaseBuilder<T>> {

  String busId;
  ErrorListener errorListener = new RethrowingErrorListener();

  BaseBuilder() {
  }

  /**
   * Identifies a bus. If no ID is given, a generated one will be given.
   *
   * @param busId An identifier to use for this bus
   * @return this builder
   */
  public T id(String busId) {
    this.busId = busId;
    return (T) this;
  }

  /**
   * Registers an {@link ErrorListener} to handle exceptions thrown by {@link EventListener}. By default, exceptions are rethrown.
   *
   * @param listener The listener to use. Some default implementations are provided.
   * @return this builder
   */
  public T onError(ErrorListener listener) {
    this.errorListener = listener;
    return (T) this;
  }

  public EventBus build() throws EventBusException {
    return new DefaultEventBus(busId != null ? busId : UUID.randomUUID().toString(), errorListener);
  }

}


text:
/* The test function takes a generic pointer as input */
typedef void (*test_funct)(void *);

/* Compute number of cycles used by test function f */
double fcyc(test_funct f, void* argp);

/*********************************************************
 * Set the various parameters used by measurement routines
 *********************************************************/

/*
 * set_fcyc_clear_cache - When set, will run code to clear cache
 *     before each measurement.
 *     Default = 0
 */
void set_fcyc_clear_cache(int clear);

/*
 * set_fcyc_cache_size - Set size of cache to use when clearing cache
 *     Default = 1<<19 (512KB)
 */
void set_fcyc_cache_size(int bytes);

/*
 * set_fcyc_cache_block - Set size of cache block
 *     Default = 32
 */
void set_fcyc_cache_block(int bytes);

/*
 * set_fcyc_compensate- When set, will attempt to compensate for
 *     timer interrupt overhead
 *     Default = 0
 */
void set_fcyc_compensate(int compensate_arg);

/*
 * set_fcyc_k - Value of K in K-best measurement scheme
 *     Default = 3
 */
void set_fcyc_k(int k);

/*
 * set_fcyc_maxsamples - Maximum number of samples attempting to find
 *     K-best within some tolerance.
 *     When exceeded, just return best sample found.
 *     Default = 20
 */
void set_fcyc_maxsamples(int maxsamples_arg);

/*
 * set_fcyc_epsilon - Tolerance required for K-best
 *     Default = 0.01
 */
void set_fcyc_epsilon(double epsilon_arg);


text:
'use strict';

const baseConfig = require('./webpack.config.base.js');
const merge = require('webpack-merge');
const path = require('path');
const webpack = require('webpack');

// Plugins
const ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = merge(baseConfig, {
    module: {
        rules: [
            {
                test: /\.(css|scss)$/,
                exclude: path.resolve('src/app/'),
                loader: ExtractTextPlugin.extract({
                    fallback: 'style-loader',
                    use: 'css-loader?sourceMap!sass-loader?sourceMap'
                })
            },
            {
                test: /\.(css|scss)$/,
                include: path.resolve('src/app/'),
                use: [
                    {
                        loader: 'to-string-loader'
                    },
                    {
                        loader: 'css-loader',
                        options: {
                            sourceMap: true
                        }
                    },
                    {
                        loader: 'sass-loader',
                        options: {
                            sourceMap: true
                        }
                    }
                ],
            }
        ]
    },
    devtool: 'source-map',
    plugins: [
        new webpack.DefinePlugin({
            'process.env.PRODUCTION': JSON.stringify(false)
        })
    ]
});


text:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AngularFirestore } from '@angular/fire/firestore';

@NgModule({
  imports: [
    CommonModule,
    BrowserAnimationsModule
  ],
  providers: [
    AngularFirestore
  ]
})
export class CoreModule { }


text:
var log4js = require('log4js');
var logger = log4js.getLogger('docker.model.mapper.2_0');

module.exports =  function(definition) {
    logger.debug(definition);

    return definition;
}


text:
namespace pp {
class FileSystem;
}  // namespace pp

class TestFileIO : public TestCase {
 public:
  explicit TestFileIO(TestingInstance* instance) : TestCase(instance) {}

  // TestCase implementation.
  virtual bool Init();
  virtual void RunTests(const std::string& filter);

 private:
  enum OpenExpectation {
    CREATE_IF_DOESNT_EXIST = 1 << 0,
    DONT_CREATE_IF_DOESNT_EXIST = 1 << 1,
    OPEN_IF_EXISTS = 1 << 2,
    DONT_OPEN_IF_EXISTS = 1 << 3,
    TRUNCATE_IF_EXISTS = 1 << 4,
    DONT_TRUNCATE_IF_EXISTS = 1 << 5,
    // All values above are defined in pairs: <some_expectation> and
    // DONT_<some_expectation>.
    END_OF_OPEN_EXPECATION_PAIRS = DONT_TRUNCATE_IF_EXISTS,

    INVALID_FLAG_COMBINATION = 1 << 6,
  };

  std::string TestOpen();
  std::string TestOpenDirectory();
  std::string TestReadWriteSetLength();
  std::string TestReadToArrayWriteSetLength();
  std::string TestTouchQuery();
  std::string TestAbortCalls();
  std::string TestParallelReads();
  std::string TestParallelWrites();
  std::string TestNotAllowMixedReadWrite();
  std::string TestRequestOSFileHandle();
  std::string TestRequestOSFileHandleWithOpenExclusive();
  std::string TestMmap();

  // Helper method used by TestOpen().
  // |expectations| is a combination of OpenExpectation values. The followings
  // are considered as valid input:
  // 1) INVALID_FLAG_COMBINATION
  // 2) (DONT_)?CREATE_IF_DOESNT_EXIST | (DONT_)?OPEN_IF_EXISTS |
  //    (DONT_)?TRUNCATE_IF_EXISTS
  std::string MatchOpenExpectations(pp::FileSystem* file_system,
                                    int32_t open_flags,
                                    int32_t expectations);
};

#endif  // PPAPI_TESTS_TEST_FILE_IO_H_


text:
Todo:

* Go through the folders tweaks, including screenshots of some of the customizations


text:
namespace syncable {

// We can't tokenize expected_min/expected_max since it can be a
// general expression.
#define ASSERT_ENUM_BOUNDS(enum_min, enum_max, expected_min, expected_max) \
  COMPILE_ASSERT(static_cast<int>(enum_min) ==                          \
                 static_cast<int>(expected_min),                        \
                 enum_min##_not_expected_min);                          \
  COMPILE_ASSERT(static_cast<int>(enum_max) ==                          \
                 static_cast<int>(expected_max),                        \
                 enum_max##_not_expected_max);

#define ENUM_CASE(enum_value) case enum_value: return #enum_value

const char* GetMetahandleFieldString(MetahandleField metahandle_field) {
  ASSERT_ENUM_BOUNDS(META_HANDLE, META_HANDLE,
                     INT64_FIELDS_BEGIN, BASE_VERSION - 1);
  switch (metahandle_field) {
    ENUM_CASE(META_HANDLE);
  }
  NOTREACHED();
  return "";
}

const char* GetBaseVersionString(BaseVersion base_version) {
  ASSERT_ENUM_BOUNDS(BASE_VERSION, BASE_VERSION,
                     META_HANDLE + 1, SERVER_VERSION - 1);
  switch (base_version) {
    ENUM_CASE(BASE_VERSION);
  }
  NOTREACHED();
  return "";
}

const char* GetInt64FieldString(Int64Field int64_field) {
  ASSERT_ENUM_BOUNDS(SERVER_VERSION, LOCAL_EXTERNAL_ID,
                     BASE_VERSION + 1, INT64_FIELDS_END - 1);
  switch (int64_field) {
    ENUM_CASE(SERVER_VERSION);
    ENUM_CASE(MTIME);
    ENUM_CASE(SERVER_MTIME);
    ENUM_CASE(CTIME);
    ENUM_CASE(SERVER_CTIME);
    ENUM_CASE(SERVER_POSITION_IN_PARENT);
    ENUM_CASE(LOCAL_EXTERNAL_ID);
    case INT64_FIELDS_END: break;
  }
  NOTREACHED();
  return "";
}

const char* GetIdFieldString(IdField id_field) {
  ASSERT_ENUM_BOUNDS(ID, NEXT_ID,
                     ID_FIELDS_BEGIN, ID_FIELDS_END - 1);
  switch (id_field) {
    ENUM_CASE(ID);
    ENUM_CASE(PARENT_ID);
    ENUM_CASE(SERVER_PARENT_ID);
    ENUM_CASE(PREV_ID);
    ENUM_CASE(NEXT_ID);
    case ID_FIELDS_END: break;
  }
  NOTREACHED();
  return "";
}

const char* GetIndexedBitFieldString(IndexedBitField indexed_bit_field) {
  ASSERT_ENUM_BOUNDS(IS_UNSYNCED, IS_UNAPPLIED_UPDATE,
                     BIT_FIELDS_BEGIN, INDEXED_BIT_FIELDS_END - 1);
  switch (indexed_bit_field) {
    ENUM_CASE(IS_UNSYNCED);
    ENUM_CASE(IS_UNAPPLIED_UPDATE);
    case INDEXED_BIT_FIELDS_END: break;
  }
  NOTREACHED();
  return "";
}

const char* GetIsDelFieldString(IsDelField is_del_field) {
  ASSERT_ENUM_BOUNDS(IS_DEL, IS_DEL,
                     INDEXED_BIT_FIELDS_END, IS_DIR - 1);
  switch (is_del_field) {
    ENUM_CASE(IS_DEL);
  }
  NOTREACHED();
  return "";
}

const char* GetBitFieldString(BitField bit_field) {
  ASSERT_ENUM_BOUNDS(IS_DIR, SERVER_IS_DEL,
                     IS_DEL + 1, BIT_FIELDS_END - 1);
  switch (bit_field) {
    ENUM_CASE(IS_DIR);
    ENUM_CASE(SERVER_IS_DIR);
    ENUM_CASE(SERVER_IS_DEL);
    case BIT_FIELDS_END: break;
  }
  NOTREACHED();
  return "";
}

const char* GetStringFieldString(StringField string_field) {
  ASSERT_ENUM_BOUNDS(NON_UNIQUE_NAME, UNIQUE_CLIENT_TAG,
                     STRING_FIELDS_BEGIN, STRING_FIELDS_END - 1);
  switch (string_field) {
    ENUM_CASE(NON_UNIQUE_NAME);
    ENUM_CASE(SERVER_NON_UNIQUE_NAME);
    ENUM_CASE(UNIQUE_SERVER_TAG);
    ENUM_CASE(UNIQUE_CLIENT_TAG);
    case STRING_FIELDS_END: break;
  }
  NOTREACHED();
  return "";
}

const char* GetProtoFieldString(ProtoField proto_field) {
  ASSERT_ENUM_BOUNDS(SPECIFICS, SERVER_SPECIFICS,
                     PROTO_FIELDS_BEGIN, PROTO_FIELDS_END - 1);
  switch (proto_field) {
    ENUM_CASE(SPECIFICS);
    ENUM_CASE(SERVER_SPECIFICS);
    case PROTO_FIELDS_END: break;
  }
  NOTREACHED();
  return "";
}

const char* GetBitTempString(BitTemp bit_temp) {
  ASSERT_ENUM_BOUNDS(SYNCING, SYNCING,
                     BIT_TEMPS_BEGIN, BIT_TEMPS_END - 1);
  switch (bit_temp) {
    ENUM_CASE(SYNCING);
    case BIT_TEMPS_END: break;
  }
  NOTREACHED();
  return "";
}

#undef ENUM_CASE
#undef ASSERT_ENUM_BOUNDS

}  // namespace syncable


text:
function filecell = file_search(exp,folder,varargin)
% file_search Search for files in a given folder using a regular expression
%             to filter the results
%
%   Required Parameters:
%     -exp - the experssion used as a filter, use '.*' to find all files
%     -folder - where to search for files
%
%   Optional:
%     -return_complete_files - True/False for returning the complete
%                              path to the file
%
%   Example:
%    - file_search('.*','my_data_directory');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Parameter Parsing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

i_p = inputParser;

i_p.addParameter('return_complete_files',0,@(x)x==1 || x==0);

i_p.parse(varargin{:});

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Main
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

listing = dir(folder);

%the first two entries from dir are always, '.' and '..', they are
%references to the current directory and one up, remove them from the
%search
listing(1:2)=[];

isfolder = {listing.isdir};
files = {listing.name};
for m = 1:length(isfolder)
    if isfolder{m} == 1
        sublist = dir(fullfile(folder,listing(m).name));
        sublist(1:2) = [];
        subfiles = {sublist.name};
        files = [files subfiles];
    end
end

match = regexp(files,exp);
indi = [];
for i = 1:length(match)
    if match{i}==1
        indi = [indi i];
    end
end
filecell = files(indi);

if (i_p.Results.return_complete_files)
    for i = 1:length(filecell)
        filecell(i) = fullfile(folder,filecell(i));
    end
end


text:
      No Map Records exist
    for {{focusProject.name}}

 0 || historicalRecords.length > 0">

    <button class="btn btn-xs btn-primary" ng-click="goMapRecords()">Map
      Records</button>
    <button class="btn btn-xs btn-primary" ng-click="openConceptBrowser()">SNOMED
      CT Browser</button>
      <button
    class="btn btn-xs btn-primary" ng-click="openTerminologyBrowser()">{{focusProject.terminologyButtonText}} Browser</button>
    <button class="btn btn-xs btn-primary" ng-show="indexViewerExists == true"
      ng-click="openIndexViewer()">Index Viewer</button>
     0">
      <button class="dropdown-toggle btn btn-xs btn-primary" uib-dropdown-toggle>Parents</button>

        Parents

          {{relationship.destinationConceptId}}:
            {{relationship.destinationConceptPreferredName}}

     0">
      <button class="dropdown-toggle btn btn-xs btn-primary" uib-dropdown-toggle>Children</button>

        Children

          {{concept.terminologyId}}:
            {{concept.value}}

  <accordion close-others="false"> <accordion-group is-open="true">
  <accordion-heading>

     {{focusProject.name}}

  </accordion-heading>

      Owner: {{record.owner.name}}

 Status: {{record.workflowStatus}}
      ({{record.lastModified | date:'MM-dd-yyyy HH:mm'}})

  </accordion-group> <accordion-group is-open="false" ng-show="historicalRecords.length > 0">
  <accordion-heading>

     Historical Map Records

  </accordion-heading>

      Owner: {{record.owner.name}}
 Status: ({{record.workflowStatus}}
      {{record.lastModified | date:'MM-dd-yyyy HH:mm'}})

  </accordion-group> <accordion-group is-open="false" ng-show="recordsNotInProject.length > 0">
  <accordion-heading>

     Map Records for Other Projects

  </accordion-heading>

{{getProjectName(recordsForProject[0])}}

        Owner: {{record.owner.name}}

 Status: {{record.workflowStatus}} ({{record.lastModified |
        date:'MM-dd-yyyy HH:mm'}})

  </accordion-group>


text:
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) > [puppeteer](./puppeteer.md) > [Protocol](./puppeteer.protocol.md) > [CSS](./puppeteer.protocol.css.md) > [SetStyleSheetTextRequest](./puppeteer.protocol.css.setstylesheettextrequest.md) > [text](./puppeteer.protocol.css.setstylesheettextrequest.text.md)

## Protocol.CSS.SetStyleSheetTextRequest.text property

<b>Signature:</b>

```typescript
text: string;
```


text:
Compile javascript **with** node.js. This allows you to move your executable around *without* needing to install the node.js runtime.

## Requirements

- Linux / Mac

## Caveats

- Doesn't support native modules (yet).
- Doesn't support windows (yet).

## Installation

Via NPM:

```bash
	npm install nexe
```

Or git:

```bash
	git clone
```

### Motivation

- Developing client-side utilities without requiring to install a bunch of dependencies first (node.js, npm).
- Ability to run multiple node.js applications with *different* node.js runtimes.
- Distributable packages without needing node / npm.
- Loads faster.

### CLI Usage

````text

Usage: nexe -i [sources] -o [binary]

Options:
  -i, --input    The entry javascript files         [default: cwd]
  -o, --output   The output binary                  [default: cwd/release/app.nex]
  -r, --runtime  The node.js runtime to use         [default: "0.8.15"]
  -t, --temp     The path to store node.js sources  [default: /tmp/nexe]

````

### Code usage

````javascript

var nexe = require('nexe');

nexe.compile({ input: 'input.js', output: 'path/to/bin', runtime: '0.8.15' } function() {

});

````


text:
using System.Linq;
using Carbon.Data.Annotations;
using Xunit;

namespace Carbon.Data.Tests
{
    public class DatasetTests
    {
        [Fact]
        public void NamedSequenceDefaults()
        {
            var dataset = DatasetInfo.Get<Order2>();

            var primaryKey = (dataset.PrimaryKey as ScalarKeyInfo);

            Assert.Equal("orders", primaryKey.SequenceName);
            Assert.Equal(1, primaryKey.Seed);
            Assert.Equal(1, primaryKey.CacheSize);
            Assert.Equal(1, primaryKey.Increment);
        }

        [Fact]
        public void NamedSequenceWithCustomSeed()
        {
            var dataset = DatasetInfo.Get<Invoice>();

            var primaryKey = (ScalarKeyInfo)dataset.PrimaryKey;

            Assert.Equal("invoices", primaryKey.SequenceName);
            Assert.Equal(1000,       primaryKey.Seed);
            Assert.Equal(10,         primaryKey.CacheSize);
            Assert.Equal(2,          primaryKey.Increment);
        }

        [Fact]
        public void Unannotated()
        {
            var dataset = DatasetInfo.Get<Q>();

            Assert.Equal("Q", dataset.Name);
        }

        /*
        [Fact]
        public void TagMap()
        {
            var dataset = DatasetInfo.Get<Point>();

            Assert.Equal("x", dataset.GetByTagNumber(1).Name);
            Assert.Equal("y", dataset.GetByTagNumber(2).Name);
            Assert.Equal("z", dataset.GetByTagNumber(3).Name);
            Assert.Null(dataset.GetByTagNumber(4));

            dataset = DatasetInfo.Get<OddIndex>();

            Assert.Equal("x", dataset.GetByTagNumber(4).Name);
            Assert.Equal("y", dataset.GetByTagNumber(5).Name);
            Assert.Equal("z", dataset.GetByTagNumber(6).Name);
            Assert.Null(dataset.GetByTagNumber(1));
        }
        */

        [Fact]
        public void FromTableAnnotations()
        {
            var dataset = DatasetInfo.Get<Animal>();

            Assert.Equal("Animals", dataset.Name);

            Assert.Equal(1,         dataset.PrimaryKey.Length);
            Assert.Equal("name",    dataset.PrimaryKey.Names[0]);

            Assert.Equal(2, dataset.Members.Length);

            var key = Key<Animal>.FromValues("hi");

            var first = key.First();

            Assert.Equal("name", first.Key);
            Assert.Equal("hi",   (string)first.Value);
        }

        [Fact]
        public void StructureType()
        {
            var dataset = DatasetInfo.Get<Point>();

            Assert.Equal("Points", dataset.Name);
            Assert.Equal(3, dataset.Members.Length);

            Assert.Equal("x", dataset.Members[0].Name);
            Assert.Equal(0d,  dataset.Members[1].DefaultValue);
        }

        [Fact]
        public void Fields()
        {
            var dataset = DatasetInfo.Get<ABC>();

            Assert.Equal("ABC", dataset.Name);
            Assert.Equal(3, dataset.Members.Length);

            Assert.Equal("a", dataset.Members[0].Name);
            Assert.Equal("b", dataset.Members[1].Name);
            Assert.Equal("c", dataset.Members[2].Name);
        }

        [Fact]
        public void TableNames()
        {
            var table = DatasetInfo.Get<User>();

            Assert.Equal("Users", table.Name);
            Assert.Equal(3, table.Members.Length);

            Assert.Equal("name", table.Members[0].Name);

            Assert.True(table["sessionCount"].IsMutable);
            Assert.False(table["created"].IsMutable);

            Assert.Equal(0, table.Members[2].DefaultValue);
        }

        [Fact]
        public void Keys()
        {
            var dataset = DatasetInfo.Get<Fruit>();
            var key     = (ScalarKeyInfo)dataset.PrimaryKey;

            Assert.Equal("Fruits", dataset.Name);
            Assert.Equal(3, dataset.Members.Length);

            Assert.Equal("name", dataset.Members[0].Name);
            Assert.True(dataset.Members[0].IsKey);
            Assert.False(dataset.Members[1].IsKey);

            var fruit = new Fruit {
                Name = "Orange",
                Calories = 100
            };

            Assert.Equal("Orange", key.Member.GetValue(fruit));
            Assert.Equal("Orange", key.Member.GetValue<string>(fruit));

        }

        [Fact]
        public void IdentityTest()
        {
            var dataset = DatasetInfo.Get<Crime>();

            var primaryKey = dataset.PrimaryKey as ScalarKeyInfo;

            Assert.True(primaryKey.IsGenerated);
            Assert.Equal(ValueGeneratorType.Identity, primaryKey.GenerationStrategy);

            Assert.Equal(1, primaryKey.Seed);
            Assert.Equal(1, primaryKey.CacheSize);
            Assert.Equal(1, primaryKey.Increment);
            Assert.Null(primaryKey.SequenceName);

            Assert.Equal(1, primaryKey.Names.Length);
            Assert.Equal("id", primaryKey.Names[0]);
        }

        [Fact]
        public void TimestampTests()
        {
            var dataset = DatasetInfo.Get<Crime>();

            var modified = dataset.Members[2];
            var created = dataset.Members[3];

            Assert.True(created.IsTimestamp);
            Assert.True(modified.IsTimestamp);

            Assert.True(modified.Timestamp.AutoUpdate);
            Assert.False(created.Timestamp.AutoUpdate);
        }
    }
}


text:
/**
 * Classes modeling the various types represented by AmazonElasticTranscoder.
 */
 package com.amazonaws.services.elastictranscoder.model;


text:
"""This module, trading_model.py, represents a trading model used in both training and testing."""

FINANCE_MODEL_TYPE_M0 = 'm0_net_resistance'

class FinanceModel(object):
	"""Represents a financial model that can be both trained and tested."""

	def __init__(self, model_type, types_of_data_needed):
		self._model_type = model_type
		self._types_of_data_needed = types_of_data_needed
		self._weights = []

		self._required_libraries = []
		self._required_defines   = []

	def add_required_library(self, l):
		"""Adds a required library."""
		self._required_libraries.append(l)

	def add_required_define_statement(self, d, v):
		"""Adds a required define statement."""
		self._required_defines.append([d, v])

	@property
	def required_libraries(self):
		"""Returns the required libraries of this model."""
		return self._required_libraries

	@property
	def required_define_statements(self):
		"""Returns the required define statements of this model."""
		return self._required_defines

	@property
	def model_name(self) -> str:
		"""Returns the name of this model."""
		return self._model_type

	@property
	def file_name(self) -> str:
		"""Returns the file name of this model."""
		return self._model_type + '.c'

	@property
	def type_of_data_needed(self):
		"""Returns the type of data this model needs."""
		return self._types_of_data_needed


text:
gmailWithAttachment
===================

Fech Inbox mail that email attachment download code.


text:
/** Version: 0.1.22.27 */
/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

/**
 * @param {!Document} doc
 * @return {string}
 */
function getReadyState(doc) {
  return /** @type {string} */ (doc['readyState']);
}

/**
 * Whether the document is ready.
 * @param {!Document} doc
 * @return {boolean}
 */
function isDocumentReady(doc) {
  const readyState = getReadyState(doc);
  return readyState != 'loading' && readyState != 'uninitialized';
}

/**
 * Calls the callback when document is ready.
 * @param {!Document} doc
 * @param {function(!Document)} callback
 */
function onDocumentReady(doc, callback) {
  onDocumentState(doc, isDocumentReady, callback);
}

/**
 * Calls the callback when document's state satisfies the stateFn.
 * @param {!Document} doc
 * @param {function(!Document):boolean} stateFn
 * @param {function(!Document)} callback
 */
function onDocumentState(doc, stateFn, callback) {
  let ready = stateFn(doc);
  if (ready) {
    callback(doc);
  } else {
    const readyListener = () => {
      if (stateFn(doc)) {
        if (!ready) {
          ready = true;
          callback(doc);
        }
        doc.removeEventListener('readystatechange', readyListener);
      }
    };
    doc.addEventListener('readystatechange', readyListener);
  }
}

/**
 * Returns a promise that is resolved when document is ready.
 * @param {!Document} doc
 * @return {!Promise<!Document>}
 */
function whenDocumentReady(doc) {
  return new Promise(resolve => {
    onDocumentReady(doc, resolve);
  });
}

/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

/**
 * @interface
 */
class Doc {

  /**
   * @return {!Window}
   */
  getWin() {}

  /**
   * The `Document` node or analog.
   * @return {!Node}
   */
  getRootNode() {}

  /**
   * The `Document.documentElement` element or analog.
   * @return {!Element}
   */
  getRootElement() {}

  /**
   * The `Document.head` element or analog. Returns `null` if not available
   * yet.
   * @return {!Element}
   */
  getHead() {}

  /**
   * The `Document.body` element or analog. Returns `null` if not available
   * yet.
   * @return {?Element}
   */
  getBody() {}

  /**
   * Whether the document has been fully constructed.
   * @return {boolean}
   */
  isReady() {}

  /**
   * Resolved when document has been fully constructed.
   * @return {!Promise}
   */
  whenReady() {}
}

/** @implements {Doc} */
class GlobalDoc {

  /**
   * @param {!Window|!Document} winOrDoc
   */
  constructor(winOrDoc) {
    const isWin = !!winOrDoc.document;
    /** @private @const {!Window} */
    this.win_ = isWin ?
        /** @type {!Window} */ (winOrDoc) :
        /** @type {!Window} */ (
            (/** @type {!Document} */ (winOrDoc)).defaultView);
    /** @private @const {!Document} */
    this.doc_ = isWin ?
        /** @type {!Window} */ (winOrDoc).document :
        /** @type {!Document} */ (winOrDoc);
  }

  /** @override */
  getWin() {
    return this.win_;
  }

  /** @override */
  getRootNode() {
    return this.doc_;
  }

  /** @override */
  getRootElement() {
    return this.doc_.documentElement;
  }

  /** @override */
  getHead() {
    // `document.head` always has a chance to be parsed, at least partially.
    return /** @type {!Element} */ (this.doc_.head);
  }

  /** @override */
  getBody() {
    return this.doc_.body;
  }

  /** @override */
  isReady() {
    return isDocumentReady(this.doc_);
  }

  /** @override */
  whenReady() {
    return whenDocumentReady(this.doc_);
  }
}

/**
 * @param {!Document|!Window|!Doc} input
 * @return {!Doc}
 */
function resolveDoc(input) {
  // Is it a `Document`
  if ((/** @type {!Document} */ (input)).nodeType === /* DOCUMENT */ 9) {
    return new GlobalDoc(/** @type {!Document} */ (input));
  }
  // Is it a `Window`?
  if ((/** @type {!Window} */ (input)).document) {
    return new GlobalDoc(/** @type {!Window} */ (input));
  }
  return /** @type {!Doc} */ (input);
}

/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

/**
 */
class PageConfig {

  /**
   * @param {string} productOrPublicationId
   * @param {boolean} locked
   */
  constructor(productOrPublicationId, locked) {
    let publicationId, productId, label;
    const div = productOrPublicationId.indexOf(':');
    if (div != -1) {
      // The argument is a product id.
      productId = productOrPublicationId;
      publicationId = productId.substring(0, div);
      label = productId.substring(div + 1);
    } else {
      // The argument is a publication id.
      publicationId = productOrPublicationId;
      productId = null;
      label = null;
    }

    /** @private @const {string} */
    this.publicationId_ = publicationId;
    /** @private @const {?string} */
    this.productId_ = productId;
    /** @private @const {?string} */
    this.label_ = label;
    /** @private @const {boolean} */
    this.locked_ = locked;
  }

  /**
   * @return {string}
   */
  getPublicationId() {
    return this.publicationId_;
  }

  /**
   * @return {?string}
   */
  getProductId() {
    return this.productId_;
  }

  /**
   * @return {?string}
   */
  getLabel() {
    return this.label_;
  }

  /**
   * @return {boolean}
   */
  isLocked() {
    return this.locked_;
  }
}

/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

/**
 * Whether the element have a next node in the document order.
 * This means either:
 *  a. The element itself has a nextSibling.
 *  b. Any of the element ancestors has a nextSibling.
 * @param {!Element} element
 * @param {?Node=} opt_stopNode
 * @return {boolean}
 */
function hasNextNodeInDocumentOrder(element, opt_stopNode) {
  let currentElement = element;
  do {
    if (currentElement.nextSibling) {
      return true;
    }
  } while ((currentElement = currentElement.parentNode) &&
            currentElement != opt_stopNode);
  return false;
}

/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

/**
 * Determines if value is actually an Array.
 * @param {*} value
 * @return {boolean}
 */
function isArray(value) {
  return Array.isArray(value);
}

/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

/**
 * Simple wrapper around JSON.parse that casts the return value
 * to JsonObject.
 * Create a new wrapper if an array return value is desired.
 * @param {*} json JSON string to parse
 * @return {?JsonObject|undefined} May be extend to parse arrays.
 */
function parseJson(json) {
  return /** @type {?JsonObject} */(JSON.parse(/** @type {string} */ (json)));
}

/**
 * Parses the given `json` string without throwing an exception if not valid.
 * Returns `undefined` if parsing fails.
 * Returns the `Object` corresponding to the JSON string when parsing succeeds.
 * @param {*} json JSON string to parse
 * @param {function(!Error)=} opt_onFailed Optional function that will be called
 *     with the error if parsing fails.
 * @return {?JsonObject|undefined} May be extend to parse arrays.
 */
function tryParseJson(json, opt_onFailed) {
  try {
    return parseJson(json);
  } catch (e) {
    if (opt_onFailed) {
      opt_onFailed(e);
    }
    return undefined;
  }
}

/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

const ALREADY_SEEN = '__SWG-SEEN__';

/**
 */
class PageConfigResolver {

  /**
   * @param {!Window|!Document|!Doc} winOrDoc
   */
  constructor(winOrDoc) {
    /** @private @const {!Doc} */
    this.doc_ = resolveDoc(winOrDoc);

    /** @private {?function((!PageConfig|!Promise))} */
    this.configResolver_ = null;

    /** @private @const {!Promise<!PageConfig>} */
    this.configPromise_ = new Promise(resolve => {
      this.configResolver_ = resolve;
    });

    /** @private @const {!MetaParser} */
    this.metaParser_ = new MetaParser(this.doc_);
    /** @private @const {!JsonLdParser} */
    this.ldParser_ = new JsonLdParser(this.doc_);
    /** @private @const {!MicrodataParser} */
    this.microdataParser_ = new MicrodataParser(this.doc_);
  }

  /**
   * @return {!Promise<!PageConfig>}
   */
  resolveConfig() {
    // Try resolve the config at different times.
    Promise.resolve().then(this.check.bind(this));
    this.doc_.whenReady().then(this.check.bind(this));
    return this.configPromise_;
  }

  /**
   * @return {?PageConfig}
   */
  check() {
    // Already resolved.
    if (!this.configResolver_) {
      return null;
    }
    let config = this.metaParser_.check();
    if (!config) {
      config = this.ldParser_.check();
    }
    if (!config) {
      config = this.microdataParser_.check();
    }
    if (config) {
      // Product ID has been found: initialize the rest of the config.
      this.configResolver_(config);
      this.configResolver_ = null;
    } else if (this.doc_.isReady()) {
      this.configResolver_(Promise.reject(
          new Error('No config could be discovered in the page')));
      this.configResolver_ = null;
    }
    return config;
  }
}

class MetaParser {
  /**
   * @param {!Doc} doc
   */
  constructor(doc) {
    /** @private @const {!Doc} */
    this.doc_ = doc;
  }

  /**
   * @return {?PageConfig}
   */
  check() {
    if (!this.doc_.getBody()) {
      // Wait until the whole `<head>` is parsed.
      return null;
    }

    // Try to find product id.
    const productId = getMetaTag(this.doc_.getRootNode(),
        'subscriptions-product-id');
    if (!productId) {
      return null;
    }

    // Is locked?
    const accessibleForFree = getMetaTag(this.doc_.getRootNode(),
        'subscriptions-accessible-for-free');
    const locked = (accessibleForFree &&
        accessibleForFree.toLowerCase() == 'false') || false;

    return new PageConfig(productId, locked);
  }
}

class JsonLdParser {
  /**
   * @param {!Doc} doc
   */
  constructor(doc) {
    /** @private @const {!Doc} */
    this.doc_ = doc;
  }

  /**
   * @return {?PageConfig}
   */
  check() {
    if (!this.doc_.getBody()) {
      // Wait until the whole `<head>` is parsed.
      return null;
    }

    const domReady = this.doc_.isReady();

    // type: 'application/ld+json'
    const elements = this.doc_.getRootNode().querySelectorAll(
        'script[type="application/ld+json"]');
    for (let i = 0; i < elements.length; i++) {
      const element = elements[i];
      if (element[ALREADY_SEEN] ||
          !element.textContent ||
          !domReady && !hasNextNodeInDocumentOrder(element)) {
        continue;
      }
      element[ALREADY_SEEN] = true;
      if (element.textContent.indexOf('NewsArticle') == -1) {
        continue;
      }
      const possibleConfig = this.tryExtractConfig_(element);
      if (possibleConfig) {
        return possibleConfig;
      }
    }
    return null;
  }

  /**
   * @param {!Element} element
   * @return {?PageConfig}
   */
  tryExtractConfig_(element) {
    const json = tryParseJson(element.textContent);
    if (!json) {
      return null;
    }

    // Must be a NewsArticle.
    if (!this.checkType_(json, 'NewsArticle')) {
      return null;
    }

    // Must have a isPartOf[@type=Product].
    let productId = null;
    const partOfArray = this.valueArray_(json, 'isPartOf');
    if (partOfArray) {
      for (let i = 0; i < partOfArray.length; i++) {
        productId = this.discoverProductId_(partOfArray[i]);
        if (productId) {
          break;
        }
      }
    }
    if (!productId) {
      return null;
    }

    // Found product id, just check for the access flag.
    const isAccessibleForFree = this.bool_(
        this.singleValue_(json, 'isAccessibleForFree'),
        /* default */ true);

    return new PageConfig(productId, !isAccessibleForFree);
  }

  /**
   * @param {*} value
   * @param {boolean} def
   * @return {boolean}
   */
  bool_(value, def) {
    if (value == null || value === '') {
      return def;
    }
    if (typeof value == 'boolean') {
      return value;
    }
    if (typeof value == 'string') {
      const lowercase = value.toLowerCase();
      if (lowercase == 'false') {
        return false;
      }
      if (lowercase == 'true') {
        return true;
      }
    }
    return def;
  }

  /**
   * @param {!Object} json
   * @return {?string}
   */
  discoverProductId_(json) {
    // Must have type `Product`.
    if (!this.checkType_(json, 'Product')) {
      return null;
    }
    return /** @type {?string} */ (this.singleValue_(json, 'productID'));
  }

  /**
   * @param {!Object} json
   * @param {string} name
   * @return {?Array}
   */
  valueArray_(json, name) {
    const value = json[name];
    if (value == null || value === '') {
      return null;
    }
    return isArray(value) ? value : [value];
  }

  /**
   * @param {!Object} json
   * @param {string} name
   * @return {*}
   */
  singleValue_(json, name) {
    const valueArray = this.valueArray_(json, name);
    const value = valueArray && valueArray[0];
    return (value == null || value === '') ? null : value;
  }

  /**
   * @param {!Object} json
   * @param {string} expectedType
   * @return {boolean}
   */
  checkType_(json, expectedType) {
    const typeArray = this.valueArray_(json, '@type');
    if (!typeArray) {
      return false;
    }
    return (typeArray.includes(expectedType) ||
        typeArray.includes('http://schema.org/' + expectedType));
  }
}

class MicrodataParser {
  /**
   * @param {!Doc} doc
   */
  constructor(doc) {
    /** @private @const {!Doc} */
    this.doc_ = doc;
    /** @private {?boolean} */
    this.access_ = null;
    /** @private {?string} */
    this.productId_ = null;
  }

  /**
   * Returns false if access is restricted, otherwise true
   * @param {!Element} root An element that is an item of type 'NewsArticle'
   * @return {?boolean} locked access
   * @private
   */
  discoverAccess_(root) {
    const ALREADY_SEEN = 'alreadySeenForAccessInfo';
    const nodeList = root
        .querySelectorAll("[itemprop='isAccessibleForFree']");
    for (let i = 0; nodeList[i]; i++) {
      const element = nodeList[i];
      const content = element.getAttribute('content') || element.textContent;
      if (!content) {
        continue;
      }
      if (this.isValidElement_(element, root, ALREADY_SEEN)) {
        let accessForFree = null;
        if (content.toLowerCase() == 'true') {
          accessForFree = true;
        } else if (content.toLowerCase() == 'false') {
          accessForFree = false;
        }
        return accessForFree;
      }
    }
    return null;
  }

  /**
   * Verifies if an element is valid based on the following
   * - child of an item of type 'NewsArticle'
   * - not a child of an item of any other type
   * - not seen before, marked using the alreadySeen tag
   * @param {?Element} current the element to be verified
   * @param {!Element} root the parent to track up to
   * @param {!string} alreadySeen used to tag already visited nodes
   * @return {!boolean} valid node
   * @private
   */
  isValidElement_(current, root, alreadySeen) {
    for (let node = current;
        node && !node[alreadySeen]; node = node.parentNode) {
      node[alreadySeen] = true;
      if (node.hasAttribute('itemscope')) {
        /**{?string} */
        const type = node.getAttribute('itemtype');
        if (type.indexOf('http://schema.org/NewsArticle') >= 0) {
          return true;
        } else {
          return false;
        }
      }
    }
    return false;
  }

  /**
   * Obtains the product ID that meets the requirements
   * - child of an item of type 'NewsArticle'
   * - Not a child of an item of type 'Section'
   * - child of an item of type 'productID'
   * @param {!Element} root An element that is an item of type 'NewsArticle'
   * @return {?string} product ID, if found
   * @private
   */
  discoverProductId_(root) {
    const ALREADY_SEEN = 'alreadySeenForProductInfo';
    const nodeList = root
        .querySelectorAll('[itemprop="productID"]');
    for (let i = 0; nodeList[i]; i++) {
      const element = nodeList[i];
      const content = element.getAttribute('content') || element.textContent;
      const item = element.closest('[itemtype][itemscope]');
      const type = item.getAttribute('itemtype');
      if (type.indexOf('http://schema.org/Product') <= -1) {
        continue;
      }
      if (this.isValidElement_(item.parentElement, root, ALREADY_SEEN)) {
        return content;
      }
    }
    return null;
  }

  /**
   * Returns PageConfig if available
   * @return {?PageConfig} PageConfig found so far
   */
  getPageConfig_() {
    let locked = null;
    if (this.access_ != null) {
      locked = !this.access_;
    } else if (this.doc_.isReady()) {
      // Default to unlocked
      locked = false;
    }
    if (this.productId_ != null && locked != null) {
      return new PageConfig(this.productId_, locked);
    }
    return null;
  }

  /**
   * Extracts page config from Microdata in the DOM
   * @return {?PageConfig} PageConfig found
   */
  tryExtractConfig_() {
    let config = this.getPageConfig_();
    if (config) {
      return config;
    }
    const nodeList = this.doc_.getRootNode().querySelectorAll(
        '[itemscope][itemtype*="http://schema.org/NewsArticle"]');
    for (let i = 0; nodeList[i] && config == null; i++) {
      const element = nodeList[i];
      if (this.access_ == null) {
        this.access_ = this.discoverAccess_(element);
      }
      if (!this.productId_) {
        this.productId_ = this.discoverProductId_(element);
      }
      config = this.getPageConfig_();
    }
    return config;
  }

  /**
   * @return {?PageConfig}
   */
  check() {
    if (!this.doc_.getBody()) {
      // Wait until the whole `<head>` is parsed.
      return null;
    }
    return this.tryExtractConfig_();
  }
}

/**
 * Returns the value from content attribute of a meta tag with given name.
 *
 * If multiple tags are found, the first value is returned.
 *
 * @param {!Node} rootNode
 * @param {string} name The tag name to look for.
 * @return {?string} attribute value or empty string.
 * @private
 */
function getMetaTag(rootNode, name) {
  const el = rootNode.querySelector(`meta[name="${name}"]`);
  if (el) {
    return el.getAttribute('content');
  }
  return null;
}

/**
 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
 *
 * 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.
 */

export {
  Doc,
  PageConfig,
  PageConfigResolver,
};


text:
<?php

namespace AppBundle\Controller;

use AppBundle\Facade\ProductFacade;
use AppBundle\Repository\ProductParameterRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

/**
 * @author Vašek Boch <vasek.boch@live.com>
 * @author Jan Klat <jenik@klatys.cz>
 * @Route(service="app.controller.product_controller")
 */
class ProductController
{
	private $productFacade;
	private $productParameterRepository;

	public function __construct(ProductFacade $productFacade, ProductParameterRepository $productParameterRepository)
	{
		$this->productFacade = $productFacade;
		$this->productParameterRepository = $productParameterRepository;
	}
	/**
	 * @Route("/product/{slug}", name="product_detail")
	 * @Template("product/detail.html.twig")
	 */
	public function productDetailAction($slug)
	{
		$product = $this->productFacade->getBySlug($slug);
		if (!$product) {
			throw new NotFoundHttpException("Produkt neexistuje");
		}

		return [
			"product" => $product,
			"parameters" => $this->productParameterRepository->findByProduct($product),
		];
	}

}


text:
//
//  BSSettingViewController.m
//  Baisi
//
//  Created by Imanol on 16/7/9.
//  Copyright © 2016年 imanol. All rights reserved.
//

#import "BSSettingViewController.h"

@interface BSSettingViewController ()

@end

@implementation BSSettingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    //如果不设置背景颜色,push 进来的时候会黑色,且看起来卡顿;
    self.view.backgroundColor = BSCommonColor;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


text:
package org.apache.isis.core.metamodel.facets.collections.collection.disabled;

import org.apache.isis.applib.annotation.Disabled;
import org.apache.isis.applib.annotation.When;
import org.apache.isis.applib.annotation.Where;
import org.apache.isis.core.metamodel.facetapi.FacetHolder;
import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet;
import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacetAbstractImpl;

/**
 * @deprecated
 */
@Deprecated
public class DisabledFacetForDisabledAnnotationOnCollection extends DisabledFacetAbstractImpl {

    public static DisabledFacet create(final Disabled annotation, final FacetHolder facetHolder) {
        return annotation != null
                ? new DisabledFacetForDisabledAnnotationOnCollection(annotation.when(), annotation.where(), annotation.reason(), facetHolder)
                : null;
    }

    private DisabledFacetForDisabledAnnotationOnCollection(final When when, Where where, String reason, final FacetHolder holder) {
        super(when, where, reason, holder);
    }

}


text:
<test>

  <!-- yarn-site.xml -->
  <configuration>

    <property>
      <name>yarn.resourcemanager.ha.enabled</name>
      <value>true</value>
    </property>

    <property>
      <name>yarn.resourcemanager.connect.retry-interval.ms</name>
      <value>5000</value>
    </property>

    <property>
      <name>yarn.resourcemanager.cluster-id</name>
      <value>yarn-res-cluster</value>
    </property>

    <property>
      <name>yarn.resourcemanager.ha.rm-ids</name>
      <value>rm1,rm2</value>
    </property>

    <property>
      <name>yarn.resourcemanager.hostname.rm1</name>
      <value>rm1</value>
    </property>

    <property>
      <name>yarn.resourcemanager.webapp.address.rm1</name>
      <value>rm1:8088</value>
    </property>

    <property>
      <name>yarn.resourcemanager.hostname.rm2</name>
      <value>rm2</value>
    </property>

    <property>
      <name>yarn.resourcemanager.webapp.address.rm2</name>
      <value>rm2:8088</value>
    </property>

    <property>
      <name>yarn.resourcemanager.zk-address</name>
      <value>zk1:2181,zk2:2181,zk3:2181</value>
    </property>

  </configuration>

</test>


text:
class StreamClient : public UDPPacketClient {

};

#endif //OPENCVCLIENT_STREAMCLIENT_HPP


text:
<?php

namespace app\modules\trainers;

class TrainersModule extends \yii\base\Module
{
    public $controllerNamespace = 'app\modules\trainers\controllers';

    public function init()
    {
        parent::init();

        // custom initialization code goes here
    }
}


text:
"""
Setup file for django-critic
"""
import os
from setuptools import setup
import critic

try:
    REQS = open(
        os.path.join(os.path.dirname(__file__),'requirements.txt')).read()
except (IOError, OSError):
    REQS = ''

setup(
    name = 'django-critic',
    version=critic.get_version(),
    description = 'A rating application.',
    author = 'Jose Soares',
    author_email = 'jose@linux.com',
    url = 'http://github.com/callowayproject/django-critic',
    packages = ['critic', 'critic.templatetags'],
    include_package_data = True,
    install_requires = REQS,
    classifiers = [
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python',
        'Operating System :: OS Independent',
    ]
)


text:
<?php

require_once dirname(__FILE__) . '/../utils/ExpressionType.php';
require_once dirname(__FILE__) . '/ConstantBuilder.php';

/**
 * This class implements the builder for the constraint statement part of CREATE TABLE.
 * You can overwrite all functions to achieve another handling.
 *
 * @author  André Rothe <andre.rothe@phosco.info>
 * @license http://www.debian.org/misc/bsd.license  BSD License (3 Clause)
 *
 */
class ConstraintBuilder {

    protected function buildConstant($parsed) {
        $builder = new ConstantBuilder();
        return $builder->build($parsed);
    }

    public function build($parsed) {
        if ($parsed['expr_type'] !== ExpressionType::CONSTRAINT) {
            return "";
        }
        $sql = $this->buildConstant($parsed['sub_tree']);
        return "CONSTRAINT" . (empty($sql) ? '' : (' ' . $sql));
    }

}
?>


text:
package org.killbill.billing.usage.api;

import org.killbill.billing.BillingExceptionBase;
import org.killbill.billing.ErrorCode;

public class UsageApiException extends BillingExceptionBase {

    private static final long serialVersionUID = 1L;

    public UsageApiException(final Throwable cause, final int code, final String msg) {
        super(cause, code, msg);
    }

    public UsageApiException(final Throwable cause, final ErrorCode code, final Object... args) {
        super(cause, code, args);
    }

    public UsageApiException(final ErrorCode code, final Object... args) {
        super(code, args);
    }
}


text:
using System;

namespace OrchardVNext.Data {
    [AttributeUsage(AttributeTargets.Class)]
    public class PersistentAttribute : Attribute {
    }
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Aust. Syst. Bot. 9(3): 331 (1996)

#### Original name
Densospora nuda McGee, 1996

### Remarks
null


text:
<?php

namespace craft\elements;

use Craft;
use craft\base\Element;
use craft\elements\db\ElementQueryInterface;
use craft\elements\db\TagQuery;
use craft\models\TagGroup;
use craft\records\Tag as TagRecord;
use yii\base\Exception;
use yii\base\InvalidConfigException;

/**
 * Tag represents a tag element.
 *
 * @property TagGroup $group the tag's group
 * @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
 * @since 3.0
 */
class Tag extends Element
{
    // Static
    // =========================================================================

    /**
     * @inheritdoc
     */
    public static function displayName(): string
    {
        return Craft::t('app', 'Tag');
    }

    /**
     * @inheritdoc
     */
    public static function refHandle()
    {
        return 'tag';
    }

    /**
     * @inheritdoc
     */
    public static function hasContent(): bool
    {
        return true;
    }

    /**
     * @inheritdoc
     */
    public static function hasTitles(): bool
    {
        return true;
    }

    /**
     * @inheritdoc
     */
    public static function hasUris(): bool
    {
        return true;
    }

    /**
     * @inheritdoc
     */
    public static function isLocalized(): bool
    {
        return true;
    }

    /**
     * @inheritdoc
     * @return TagQuery The newly created [[TagQuery]] instance.
     */
    public static function find(): ElementQueryInterface
    {
        return new TagQuery(static::class);
    }

    /**
     * @inheritdoc
     */
    protected static function defineSources(string $context = null): array
    {
        $sources = [];

        foreach (Craft::$app->getTags()->getAllTagGroups() as $tagGroup) {
            $sources[] = [
                'key' => 'taggroup:'.$tagGroup->id,
                'label' => Craft::t('site', $tagGroup->name),
                'criteria' => ['groupId' => $tagGroup->id]
            ];
        }

        return $sources;
    }

    // Properties
    // =========================================================================

    /**
     * @var int|null Group ID
     */
    public $groupId;

    // Public Methods
    // =========================================================================

    /**
     * @inheritdoc
     */
    public function extraFields()
    {
        $names = parent::extraFields();
        $names[] = 'group';
        return $names;
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        $rules = parent::rules();
        $rules[] = [['groupId'], 'number', 'integerOnly' => true];

        return $rules;
    }

    /**
     * @inheritdoc
     */
    public function getIsEditable(): bool
    {
        return true;
    }

    /**
     * @inheritdoc
     */
    public function getFieldLayout()
    {
        return parent::getFieldLayout() ?? $this->getGroup()->getFieldLayout();
    }

    /**
     * Returns the tag's group.
     *
     * @return TagGroup
     * @throws InvalidConfigException if [[groupId]] is missing or invalid
     */
    public function getGroup(): TagGroup
    {
        if ($this->groupId === null) {
            throw new InvalidConfigException('Tag is missing its group ID');
        }

        if (($group = Craft::$app->getTags()->getTagGroupById($this->groupId)) === null) {
            throw new InvalidConfigException('Invalid tag group ID: '.$this->groupId);
        }

        return $group;
    }

    // Indexes, etc.
    // -------------------------------------------------------------------------

    /**
     * @inheritdoc
     */
    public function getEditorHtml(): string
    {
        $html = Craft::$app->getView()->renderTemplateMacro('_includes/forms', 'textField', [
            [
                'label' => Craft::t('app', 'Title'),
                'siteId' => $this->siteId,
                'id' => 'title',
                'name' => 'title',
                'value' => $this->title,
                'errors' => $this->getErrors('title'),
                'first' => true,
                'autofocus' => true,
                'required' => true
            ]
        ]);

        $html .= parent::getEditorHtml();

        return $html;
    }

    // Events
    // -------------------------------------------------------------------------

    /**
     * @inheritdoc
     * @throws Exception if reasons
     */
    public function afterSave(bool $isNew)
    {
        // Get the tag record
        if (!$isNew) {
            $record = TagRecord::findOne($this->id);

            if (!$record) {
                throw new Exception('Invalid tag ID: '.$this->id);
            }
        } else {
            $record = new TagRecord();
            $record->id = $this->id;
        }

        $record->groupId = $this->groupId;
        $record->save(false);

        parent::afterSave($isNew);
    }
}


text:
namespace blink {

AtomicString FontSelector::FamilyNameFromSettings(
    const GenericFontFamilySettings& settings,
    const FontDescription& font_description,
    const FontFamily& generic_family,
    UseCounter* use_counter) {
  // Quoted <font-family> values corresponding to a <generic-family> keyword
  // should not be converted to a family name via user settings.
  auto& generic_family_name = generic_family.FamilyName();
  if (font_description.GenericFamily() != FontDescription::kStandardFamily &&
      !generic_family.FamilyIsGeneric() &&
      generic_family_name != font_family_names::kWebkitStandard)
    return g_empty_atom;

  if (font_description.GenericFamily() == FontDescription::kStandardFamily) {
    // FontDescription::kStandardFamily is only set internally via
    // ConvertFontFamilyName/ConvertGenericFamily and so correspond to a
    // -webkit-body CSS identifier.
    // TODO(crbug.com/1065468): Remove this counter when it's no longer
    // necessary.
    UseCounter::Count(use_counter,
                      WebFeature::kFontSelectorCSSFontFamilyWebKitPrefixBody);
  } else if (generic_family_name == font_family_names::kWebkitStandard &&
             !generic_family.FamilyIsGeneric()) {
    // -webkit-standard is set internally only with a kGenericFamily type in
    // FontFallbackList::GetFontData. So that non-generic -webkit-standard has
    // been specified on the page.
    // TODO(crbug.com/1065468): Remove this counter when it's no longer
    // necessary.
    UseCounter::Count(
        use_counter,
        WebFeature::kFontSelectorCSSFontFamilyWebKitPrefixStandard);
  }
#if defined(OS_ANDROID)
  // TODO(crbug.com/1228189): Android does not have pre-installed math font.
  // https://github.com/googlefonts/noto-fonts/issues/330
  if (font_description.GenericFamily() == FontDescription::kStandardFamily ||
      generic_family_name == font_family_names::kWebkitStandard) {
    return FontCache::GetGenericFamilyNameForScript(
        font_family_names::kWebkitStandard,
        GetFallbackFontFamily(font_description), font_description);
  }

  if (generic_family_name == font_family_names::kSerif ||
      generic_family_name == font_family_names::kSansSerif ||
      generic_family_name == font_family_names::kCursive ||
      generic_family_name == font_family_names::kFantasy ||
      generic_family_name == font_family_names::kMonospace) {
    return FontCache::GetGenericFamilyNameForScript(
        generic_family_name, generic_family_name, font_description);
  }
#else   // !defined(OS_ANDROID)
  UScriptCode script = font_description.GetScript();
  if (font_description.GenericFamily() == FontDescription::kStandardFamily)
    return settings.Standard(script);
  if (generic_family_name == font_family_names::kSerif)
    return settings.Serif(script);
  if (generic_family_name == font_family_names::kSansSerif)
    return settings.SansSerif(script);
  if (generic_family_name == font_family_names::kCursive)
    return settings.Cursive(script);
  if (generic_family_name == font_family_names::kFantasy)
    return settings.Fantasy(script);
  if (generic_family_name == font_family_names::kMonospace)
    return settings.Fixed(script);
  if (generic_family_name == font_family_names::kWebkitStandard)
    return settings.Standard(script);
  // TODO(crbug.com/1228189): Add preference with per-OS default values instead
  // of hardcoding this string.
  if (RuntimeEnabledFeatures::CSSFontFamilyMathEnabled() &&
      generic_family_name == font_family_names::kMath)
    return "Latin Modern Math";
#endif  // !defined(OS_ANDROID)
  return g_empty_atom;
}

void FontSelector::Trace(Visitor* visitor) const {
  visitor->Trace(font_fallback_map_);
  FontCacheClient::Trace(visitor);
}

FontFallbackMap& FontSelector::GetFontFallbackMap() {
  if (!font_fallback_map_) {
    font_fallback_map_ = MakeGarbageCollected<FontFallbackMap>(this);
    RegisterForInvalidationCallbacks(font_fallback_map_);
  }
  return *font_fallback_map_;
}

}  // namespace blink


text: Generates a Graphviz-based ER diagram from a SQL dump.


text:
package org.lpw.ranch.recycle;

import org.lpw.tephra.ctrl.context.Request;
import org.lpw.tephra.ctrl.execute.Execute;
import org.lpw.tephra.ctrl.validate.Validate;
import org.lpw.tephra.ctrl.validate.Validators;

import javax.inject.Inject;

/**
 * 回收站操作服务。
 *
 * @author lpw
 */
public abstract class RecycleCtrlSupport {
    @Inject
    protected Request request;

    /**
     * 删除信息到回收站。
     * id ID值。
     *
     * @return ""。
     */
    @Execute(name = "delete", validates = {
            @Validate(validator = Validators.ID, parameter = "id", failureCode = 86),
            @Validate(validator = Validators.SIGN)
    })
    public Object delete() {
        getRecycleService().delete(request.get("id"));

        return "";
    }

    /**
     * 检索回收站信息集。
     * pageSize 每页显示最大记录数。
     * pageNum 当前显示页码。
     *
     * @return {PageList}。
     */
    @Execute(name = "recycle", validates = {
            @Validate(validator = Validators.SIGN)
    })
    public Object recycle() {
        return getRecycleService().recycle();
    }

    /**
     * (从回收站)还原数据。
     * id ID值。
     *
     * @return ""。
     */
    @Execute(name = "restore", validates = {
            @Validate(validator = Validators.ID, parameter = "id", failureCode = 86),
            @Validate(validator = Validators.SIGN)
    })
    public Object restore() {
        getRecycleService().restore(request.get("id"));

        return "";
    }

    /**
     * 获取回收站服务实例。
     *
     * @return 回收站服务实例,不可为空。
     */
    protected abstract RecycleService getRecycleService();
}


text:
var myApp = new Framework7({
  pushState: true
});
var $$ = Framework7.$;

var mainView = myApp.addView('.view-main', {
  dynamicNavbar: true
});

myApp.onPageInit('index', function(page) {
  $$('.banner form').on('submit', function(e) {
    var action = $$(this).attr('action'),
      input = $$(this).find('input');
    mainView.router.loadPage(action + '?' + input.attr('name') + '=' + encodeURIComponent(input.val()));
    e.preventDefault();
  });
});

myApp.onPageInit('pingjia-info', function(page) {
  $$('.ui-pingjia-info-toolbar form').on('submitted', function(e) {
    var data = e.detail.data; // Ajax repsonse from action file
    data = JSON.parse(data);
    if (data.flag === 1) {
      myApp.alert('发布成功!', '提示信息');
    }
  });
});

myApp.onPageInit('zhuisu-info', function(page) {
  $$('.ui-zhuisu-info a.create-popup').on('click', function(e) {
    var url = $$(this).data('href');
    $$.ajax({
      url: url,
      success: function(data) {
        myApp.popup(data);
      }
    });
    e.preventDefault();
  });
});

myApp.init();

if (location.pathname === '/') {
  mainView.router.loadPage('/');
}


text:
package jp.co.btc.hrms.service.member;

import java.io.Serializable;

import org.springframework.util.Assert;

import lombok.Data;

@Data
public class MemberSearchCriteria implements Serializable {

	private static final long serialVersionUID = 1L;

	private String name;

	public MemberSearchCriteria() {
	}

	public MemberSearchCriteria(String name) {
		Assert.notNull(name, "Name must not be null");
		this.name = name;
	}
}


text:
module Stats
  module Collector
    class DraftToSubmittedTime
      SECONDS_IN_DAY = 60 * 60 * 24

      def initialize
        @num_claims = 0
        @total_days = 0
        @count_by_days = Hash.new(0)
      end

      def run
        claim_ids = Claim::BaseClaim.active.pluck(:id)
        claim_ids.each { |claim_id| calculate_time_draft_to_submitted(claim_id) }
        print_results
      end

      private

      def first_submitted_at(claim)
        transition_to_submitted = claim.claim_state_transitions.select { |cst| cst.to == 'submitted' }
        first_transmisison_to_submitted = transition_to_submitted.sort_by(&:created_at).first
        first_transmisison_to_submitted.created_at
      end

      def calculate_time_draft_to_submitted(claim_id)
        claim = Claim::BaseClaim.active.find claim_id
        return if claim.draft?
        period_in_secs = first_submitted_at(claim) - claim.created_at
        period_in_days = (period_in_secs / SECONDS_IN_DAY).to_i
        update_totals(period_in_days)
      end

      def update_totals(val)
        @count_by_days[val] += 1
        @num_claims += 1
        @total_days += val
      end

      def print_results
        puts "Number of claims analysed: #{@num_claims}"
        puts "Average days between create and submit: #{(@total_days / @num_claims.to_f).round(2)}"
        puts 'Distribution:'
        @count_by_days.keys.sort.each do |key|
          puts "  #{key} days:  #{@count_by_days[key]} claims"
        end
      end
    end
  end
end


text:
package org.basex.query.expr;

import static org.basex.query.QueryText.*;

import org.basex.query.*;
import org.basex.query.func.fn.*;
import org.basex.query.util.list.*;
import org.basex.query.value.item.*;
import org.basex.query.value.node.*;
import org.basex.query.value.type.*;
import org.basex.query.var.*;
import org.basex.util.*;

/**
 * Logical expression, extended by {@link And} and {@link Or}.
 *
 * @author BaseX Team 2005-16, BSD License
 * @author Christian Gruen
 */
abstract class Logical extends Arr {
  /**
   * Constructor.
   * @param info input info
   * @param exprs expressions
   */
  Logical(final InputInfo info, final Expr[] exprs) {
    super(info, exprs);
    seqType = SeqType.BLN;
  }

  @Override
  public final Expr compile(final QueryContext qc, final VarScope scp) throws QueryException {
    for(int i = 0; i < exprs.length; i++) {
      try {
        exprs[i] = exprs[i].compile(qc, scp);
      } catch(final QueryException qe) {
        // first expression is evaluated eagerly
        if(i == 0) throw qe;
        exprs[i] = FnError.get(qe, exprs[i].seqType());
      }
    }
    return optimize(qc, scp);
  }

  @Override
  public Expr optimize(final QueryContext qc, final VarScope scp) throws QueryException {
    final boolean and = this instanceof And;
    final int es = exprs.length;
    final ExprList el = new ExprList(es);
    for(final Expr e : exprs) {
      final Expr ex = e.optimizeEbv(qc, scp);
      if(ex.isValue()) {
        // atomic items can be pre-evaluated
        qc.compInfo(OPTREMOVE_X_X, this, e);
        if(ex.ebv(qc, info).bool(info) ^ and) return Bln.get(!and);
      } else {
        el.add(ex);
      }
    }
    if(el.isEmpty()) return Bln.get(and);
    exprs = el.finish();
    return this;
  }

  @Override
  public final void markTailCalls(final QueryContext qc) {
    // if the last expression surely returns a boolean, we can jump to it
    final Expr last = exprs[exprs.length - 1];
    if(last.seqType().eq(SeqType.BLN)) last.markTailCalls(qc);
  }

  @Override
  public void plan(final FElem plan) {
    final FElem el = planElem();
    plan.add(el);
    for(final ExprInfo e : exprs) if(e != null) e.plan(el);
  }

  @Override
  public Expr inline(final QueryContext qc, final VarScope scp, final Var var, final Expr ex)
      throws QueryException {
    final Expr[] arr = exprs;
    boolean change = false;
    for(int i = 0; i < arr.length; i++) {
      try {
        final Expr e = arr[i].inline(qc, scp, var, ex);
        if(e != null) {
          arr[i] = e;
          change = true;
        }
      } catch(final QueryException qe) {
        // first expression is evaluated eagerly
        if(i == 0) throw qe;

        // everything behind the error is dead anyway
        final Expr[] nw = new Expr[i + 1];
        System.arraycopy(arr, 0, nw, 0, i);
        nw[i] = FnError.get(qe, seqType());
        exprs = nw;
        change = true;
        break;
      }
    }
    return change ? optimize(qc, scp) : null;
  }

  /**
   * Flattens nested logical expressions.
   * @param qc query context
   */
  final void compFlatten(final QueryContext qc) {
    // flatten nested expressions
    final ExprList tmp = new ExprList(exprs.length);
    final boolean and = this instanceof And;
    final boolean or = this instanceof Or;
    for(final Expr ex : exprs) {
      if(and && ex instanceof And || or && ex instanceof Or) {
        for(final Expr e : ((Arr) ex).exprs) tmp.add(e);
        qc.compInfo(OPTFLAT_X, ex);
      } else {
        tmp.add(ex);
      }
    }
    exprs = tmp.finish();
  }
}


text:
'use strict';

describe('Features E2E Tests:', function () {
  describe('Test features page', function () {
    it('Should report missing credentials', function () {
      browser.get('http://localhost:3001/features');
      expect(element.all(by.repeater('feature in features')).count()).toEqual(0);
    });
  });
});


text:
require 'ec2/common/constants'
require 'ec2/amitools/parameters_base'
require 'ec2/amitools/region'

#------------------------------------------------------------------------------#

class S3ToolParameters < ParametersBase

  BUCKET_DESCRIPTION = ["The bucket to use. This is an S3 bucket,",
                        "followed by an optional S3 key prefix using '/' as a delimiter."]
  MANIFEST_DESCRIPTION = "The path to the manifest file."
  DELEGATION_TOKEN_DESCRIPTION = "The delegation token pass along to the AWS request."
  URL_DESCRIPTION = "The S3 service URL. Defaults to https://s3.amazonaws.com."
  REGION_DESCRIPTION = "The S3 region. Defaults to us-east-1."
  SIGV2_DESCRIPTION = "Use old signature version 2 signing"
  PROFILE_PATH = '/latest/meta-data/iam/security-credentials/'
  PROFILE_HOST = '169.254.169.254'

  REGION_MAP = {
    'us-east-1' => 'https://s3.amazonaws.com',
    'us-west-2' => 'https://s3-us-west-2.amazonaws.com',
    'us-west-1' => 'https://s3-us-west-1.amazonaws.com',
    'eu-west-1' => 'https://s3-eu-west-1.amazonaws.com',
    'eu-central-1' => 'https://s3.eu-central-1.amazonaws.com',
    'ap-southeast-1' => 'https://s3-ap-southeast-1.amazonaws.com',
    'ap-southeast-2' => 'https://s3-ap-southeast-2.amazonaws.com',
    'ap-northeast-1' => 'https://s3-ap-northeast-1.amazonaws.com',
    'sa-east-1' => 'https://s3-sa-east-1.amazonaws.com',
    'cn-north-1' => 'https://s3.cn-north-1.amazonaws.com.cn',
    'us-gov-west-1' => 'https://s3-us-gov-west-1.amazonaws.com'
  }

  VALID_SIGV = ['2', '4']

  DEFAULT_URL = 'https://s3.amazonaws.com'
  DEFAULT_REGION = 'us-east-1'

  attr_accessor :bucket,
                :keyprefix,
                :user,      # This now contains all the creds.
                :pass,      # pass is just kept for backwards compatibility.
                :url,
                :region,
                :sigv

  #------------------------------------------------------------------------------#

  def split_container(container)
    splitbits = container.sub(%r{^/*},'').sub(%r{/*$},'').split("/")
    bucket = splitbits.shift
    keyprefix = splitbits.join("/")
    keyprefix += "/" unless keyprefix.empty?
    @keyprefix = keyprefix
    @bucket = bucket
  end

  #----------------------------------------------------------------------------#

  def mandatory_params()
    on('-b', '--bucket BUCKET', String, *BUCKET_DESCRIPTION) do |container|
      @container = container
      split_container(@container)
    end

    on('-a', '--access-key USER', String, USER_DESCRIPTION) do |user|
      @user = {} if @user.nil?
      @user['aws_access_key_id'] = user
    end

    on('-s', '--secret-key PASSWORD', String, PASS_DESCRIPTION) do |pass|
      @user = {} if @user.nil?
      @user['aws_secret_access_key'] = pass
      @pass = pass
    end

    on('-t', '--delegation-token TOKEN', String, DELEGATION_TOKEN_DESCRIPTION) do |token|
      @user = {} if @user.nil?
      @user['aws_delegation_token'] = token
    end
  end

  #----------------------------------------------------------------------------#

  def optional_params()
    on('--url URL', String, URL_DESCRIPTION) do |url|
      @url = url
    end

    on('--region REGION', REGION_DESCRIPTION) do |region|
      @region = region
    end

    on('--sigv VERSION', SIGV2_DESCRIPTION) do |version_number|
      @sigv = version_number
    end
  end

  #----------------------------------------------------------------------------#

  def get_creds_from_instance_profile
  end

  def get_creds_from_instance_profile
    begin
      require 'json'
      require 'net/http'
      profile_name = Net::HTTP.get(PROFILE_HOST, PROFILE_PATH)
      unless (profile_name.nil? || profile_name.strip.empty?)
        creds_blob = Net::HTTP.get(PROFILE_HOST, PROFILE_PATH + profile_name.strip)
        creds = JSON.parse(creds_blob)
        @user = {
          'aws_access_key_id' => creds['AccessKeyId'],
          'aws_secret_access_key' => creds['SecretAccessKey'],
          'aws_delegation_token' => creds['Token'],
        }
        @pass = creds['SecretAccessKey']
      end
    rescue Exception => e
      @user = nil
    end
  end

  def validate_params()
    unless @user
        get_creds_from_instance_profile
    end
    raise MissingMandatory.new('--access-key') unless @user && @user['aws_access_key_id']
    raise MissingMandatory.new('--secret-key') unless @pass
    raise MissingMandatory.new('--bucket') unless @container
    if @sigv && !VALID_SIGV.include?(@sigv)
      raise InvalidValue.new('--sigv', @sigv, "Please specify one of these values: #{VALID_SIGV.join(', ')}")
    end
  end

  #----------------------------------------------------------------------------#

  def set_defaults()
    # We need three values to be set after this point:
    #   region - which will specify the region of the endpoint used for sigv4
    #   url - the url of the endpoint
    #   location - the S3 bucket location
    #
    # We allow the user to override any of these values. The client only has
    # to specify the region value.
    if @region
      @url ||= REGION_MAP[@region]
    elsif @location
      @region = case @location
        when "EU" then "eu-west-1"
        when "US", :unconstrained then "us-east-1"
        else @location
      end
      @url ||= REGION_MAP[@region]
    elsif @url
      STDERR.puts "Specifying url has been deprecated, please use only --region"
      uri = URI.parse(@url)
      if @region.nil?
        begin
          @region = AwsRegion::determine_region_from_host uri.host
          STDERR.puts "Region determined to be #{@region}"
        rescue => e
          STDERR.puts "No region specified and could not determine region from given url"
          @region = nil
        end
      end
    else
      @url ||= DEFAULT_URL
      @region ||= DEFAULT_REGION
    end
    @sigv ||= EC2::Common::SIGV4
  end
end


text:
This example demonstrates a way to persist user variables across sessions of
a chatbot, so that the bot may be shut down and restarted and it can still
remember where it left off with each user -- keeping track of user variables
such as their name, as well as the recent history of inputs and replies.

In this example, the bot asks you for a username when it starts up -- in a real
world scenario the username could come from somewhere else (i.e. if this were
an IRC bot, the user's IRC nick would be a logical thing to use). After each
reply from the bot, the user's variables are exported to a JSON file on disk
named after the username (example: `soandso.json`).

When the bot is restarted and its internal memory of user data is reset, the
user's variables can be reloaded by reading the JSON file from the hard disk.

## Usage

```bash
# From the root of the rivescript-js project, build the JS sources.
$ grunt

# From the persistence example folder, run the bot.
$ cd eg/persistence/
$ node bot.js
```

## Example Output

```
$ node bot.js
Enter your username [default: soandso]: kirsle
Hello kirsle
Type /quit to quit.

> Hello bot
Bot> How do you do. Please state your problem.
> My name is Noah
Bot> Noah, nice to meet you.
> /quit

$ node bot.js
Enter your username [default: soandso]: kirsle
Hello kirsle
Type /quit to quit.

> How are you?
Bot> What is it you really want to know?
> What is my name?
Bot> Your name is Noah.
> /quit
```

After running the bot, check the current working directory for a JSON file named
after your username. Example:

```javascript
// kirsle.json
{
  "topic": "random",
  "__history__": {
    "input": [
      "what is my name",
      "how are you",
      "my name is noah",
      "hello bot",
      "undefined",
      "undefined",
      "undefined",
      "undefined",
      "undefined",
      "undefined"
    ],
    "reply": [
      "Your name is Noah.",
      "What is it you really want to know?",
      "Noah, nice to meet you.",
      "How do you do. Please state your problem.",
      "undefined",
      "undefined",
      "undefined",
      "undefined",
      "undefined",
      "undefined"
    ]
  },
  "__lastmatch__": "(what is my name|who am i|do you know my name|do you know who i am){weight=10}",
  "__initialmatch__": "(what is my name|who am i|do you know my name|do you know who i am){weight=10}",
  "name": "Noah"
}
```

## Caveats

In this example, we read the JSON files from disk synchronously. This is
generally considered a bad practice in Node. Instead, a real chatbot would
probably pre-load user data for *all* users it knows about during its startup
process, so that reading files from disk won't cause latency when the bot is
actually fetching a reply for a user.

When saving user variables, on the other hand, this example writes the files
asynchronously.


text:
package io.progix.dropwizard.patch;

import java.util.ArrayList;
import java.util.List;

public class User {

	private long id;
	private String name;
	private List<String> emailAddresses;
	private List<Pet> pets;

	public User(long id, String name, List<String> emailAddresses, List<Pet> pets) {
		this.id = id;
		this.name = name;
		this.emailAddresses = emailAddresses;
		this.pets = pets;
	}

	public User() {

	}

	public User(User user) {
		this.id = user.id;
		this.name = user.name;
		this.emailAddresses = user.emailAddresses;
		this.pets = new ArrayList<>(user.pets);
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<String> getEmailAddresses() {
		return emailAddresses;
	}

	public void setEmailAddresses(List<String> emailAddresses) {
		this.emailAddresses = emailAddresses;
	}

	public List<Pet> getPets() {
		return pets;
	}

	public void setPets(List<Pet> pets) {
		this.pets = pets;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}

		User user = (User) o;

		if (id != user.id) {
			return false;
		}
		if (!emailAddresses.equals(user.emailAddresses)) {
			return false;
		}
		if (!name.equals(user.name)) {
			return false;
		}
		if (!pets.equals(user.pets)) {
			return false;
		}

		return true;
	}

	@Override
	public int hashCode() {
		int result = (int) (id ^ (id >>> 32));
		result = 31 * result + name.hashCode();
		result = 31 * result + emailAddresses.hashCode();
		result = 31 * result + pets.hashCode();
		return result;
	}

	@Override
	public String toString() {
		return "User{" +
				"id=" + id +
				", name='" + name + '\'' +
				", emailAddresses=" + emailAddresses +
				", pets=" + pets +
				'}';
	}
}


text:
package com.jiang.android.zhihu_topanswer.db;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteStatement;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.Property;
import de.greenrobot.dao.internal.DaoConfig;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
 * DAO for table "COLLECTION".
*/
public class CollectionDao extends AbstractDao<Collection, Long> {

    public static final String TABLENAME = "COLLECTION";

    /**
     * Properties of entity Collection.<br/>
     * Can be used for QueryBuilder and for referencing column names.
    */
    public static class Properties {
        public final static Property Id = new Property(0, Long.class, "id", true, "_id");
        public final static Property Title = new Property(1, String.class, "title", false, "TITLE");
        public final static Property Detail = new Property(2, String.class, "detail", false, "DETAIL");
        public final static Property Url = new Property(3, String.class, "url", false, "URL");
        public final static Property Type = new Property(4, Integer.class, "type", false, "TYPE");
    };

    public CollectionDao(DaoConfig config) {
        super(config);
    }

    public CollectionDao(DaoConfig config, DaoSession daoSession) {
        super(config, daoSession);
    }

    /** Creates the underlying database table. */
    public static void createTable(SQLiteDatabase db, boolean ifNotExists) {
        String constraint = ifNotExists? "IF NOT EXISTS ": "";
        db.execSQL("CREATE TABLE " + constraint + "\"COLLECTION\" (" + //
                "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
                "\"TITLE\" TEXT," + // 1: title
                "\"DETAIL\" TEXT," + // 2: detail
                "\"URL\" TEXT," + // 3: url
                "\"TYPE\" INTEGER);"); // 4: type
    }

    /** Drops the underlying database table. */
    public static void dropTable(SQLiteDatabase db, boolean ifExists) {
        String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"COLLECTION\"";
        db.execSQL(sql);
    }

    /** @inheritdoc */
    @Override
    protected void bindValues(SQLiteStatement stmt, Collection entity) {
        stmt.clearBindings();

        Long id = entity.getId();
        if (id != null) {
            stmt.bindLong(1, id);
        }

        String title = entity.getTitle();
        if (title != null) {
            stmt.bindString(2, title);
        }

        String detail = entity.getDetail();
        if (detail != null) {
            stmt.bindString(3, detail);
        }

        String url = entity.getUrl();
        if (url != null) {
            stmt.bindString(4, url);
        }

        Integer type = entity.getType();
        if (type != null) {
            stmt.bindLong(5, type);
        }
    }

    /** @inheritdoc */
    @Override
    public Long readKey(Cursor cursor, int offset) {
        return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
    }

    /** @inheritdoc */
    @Override
    public Collection readEntity(Cursor cursor, int offset) {
        Collection entity = new Collection( //
            cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
            cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // title
            cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // detail
            cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // url
            cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4) // type
        );
        return entity;
    }

    /** @inheritdoc */
    @Override
    public void readEntity(Cursor cursor, Collection entity, int offset) {
        entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
        entity.setTitle(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
        entity.setDetail(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
        entity.setUrl(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
        entity.setType(cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4));
     }

    /** @inheritdoc */
    @Override
    protected Long updateKeyAfterInsert(Collection entity, long rowId) {
        entity.setId(rowId);
        return rowId;
    }

    /** @inheritdoc */
    @Override
    public Long getKey(Collection entity) {
        if(entity != null) {
            return entity.getId();
        } else {
            return null;
        }
    }

    /** @inheritdoc */
    @Override
    protected boolean isEntityUpdateable() {
        return true;
    }

}


text:
module OBIX
  module Objects

    # Integers represent an integer number.
    class Integer < Object
      tag :int

      attribute :val, type: Types::Integer, default: 0
      attribute :min, type: Types::Integer
      attribute :max, type: Types::Integer
      attribute :unit, type: Types::String
    end

  end
end