text:
    Usage: shed-container [-h | --help | -V]
           shed-container [OPTIONS] COMMAND [ARGS]

    Manage Docker containers

    Options:
        -a, --all       Apply command to all containers
        -h, --help      Help information
        -l, --latest    Apply command to the latest created container
        -p, --propagate Propagate command to linked containers
        -V              Show version information

    General commands:
        build [OPTIONS] FILE
            Build a container from a Shedfile
        cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
           [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
           Copy files/folders between a container and the local filesystem
        create [OPTIONS] IMAGE [COMMAND] [ARG...]
            Create a new container
        diff [OPTIONS] CONTAINER
            Inspect changes on a container's filesystem
        export [OPTIONS] CONTAINER
            Export a container's filesystem as a tar archive
        links [OPTIONS] CONTAINER
            Show direct links of a container
        port [OPTIONS] CONTAINER [PRIVATE_PORT[/PROTO]]
            List port mappings or a specific mapping for the CONTAINER
        ps [OPTIONS]
            List containers
        rename [OPTIONS] OLD_NAME NEW_NAME
            Rename a container
        rm [OPTIONS] CONTAINER [CONTAINER...]
            Remove one or more containers
        status CONTAINER
            Show container status

    Runtime commands:
        attach [OPTIONS] CONTAINER
            Attach to a running container
        exec [OPTIONS] [CONTAINER COMMAND [ARG...]]
            Run a command in a running container
        kill [OPTIONS] CONTAINER [CONTAINER...]
            Kill a running container
        logs [OPTIONS] CONTAINER
            Fetch the logs of a container
        pause [OPTIONS] CONTAINER [CONTAINER...]
            Pause all processes within a container
        restart [OPTIONS] CONTAINER [CONTAINER...]
            Restart a container
        run [OPTIONS] IMAGE [COMMAND] [ARG...]
            Run a command in a new container
        ship [OPTIONS]
            Start and attach to containers
        start [OPTIONS] CONTAINER [CONTAINER...]
            Start one or more stopped containers
        stats [OPTIONS] [CONTAINER...]
            Display a live stream of one or more containers' resource usage statistics
        stop [OPTIONS] CONTAINER [CONTAINER...]
            Stop a running container
        top [OPTIONS] CONTAINER [ps OPTIONS]
            Display the running processes of a container
        unpause [OPTIONS] CONTAINER [CONTAINER...]
            Unpause all processes within a container
        update [OPTIONS] CONTAINER [CONTAINER...]
            Update resources of one or more containers
        wait [OPTIONS] CONTAINER [CONTAINER...]
            Block until a container stops, then print its exit code

    Run 'shed-container COMMAND --help' for more information on a command.

# General commands

## build

    Usage: shed-container build [OPTIONS] FILE

    Build a new container from the Shedfile FILE

      --name=""             Assign a name to the container
      -r, --remove=false    Remove container, stopping if necessary

## cp

    Usage:	shed-container cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
    	shed-container cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH

    Copy files/folders between a container and the local filesystem
    Use '-' as the source to read a tar archive from stdin
    and extract it to a directory destination in a container.
    Use '-' as the destination to stream a tar archive of a
    container source to stdout.

      --help               Print usage
      -L, --follow-link    Always follow symbol link in SRC_PATH

## create

    Usage:	shed-container create [OPTIONS] IMAGE [COMMAND] [ARG...]

    Create a new container

      -a, --attach=[]                 Attach to STDIN, STDOUT or STDERR
      --add-host=[]                   Add a custom host-to-IP mapping (host:ip)
      --blkio-weight                  Block IO (relative weight), between 10 and 1000
      --blkio-weight-device=[]        Block IO weight (relative device weight)
      --cpu-shares                    CPU shares (relative weight)
      --cap-add=[]                    Add Linux capabilities
      --cap-drop=[]                   Drop Linux capabilities
      --cgroup-parent                 Optional parent cgroup for the container
      --cidfile                       Write the container ID to the file
      --cpu-period                    Limit CPU CFS (Completely Fair Scheduler) period
      --cpu-quota                     Limit CPU CFS (Completely Fair Scheduler) quota
      --cpuset-cpus                   CPUs in which to allow execution (0-3, 0,1)
      --cpuset-mems                   MEMs in which to allow execution (0-3, 0,1)
      --device=[]                     Add a host device to the container
      --device-read-bps=[]            Limit read rate (bytes per second) from a device
      --device-read-iops=[]           Limit read rate (IO per second) from a device
      --device-write-bps=[]           Limit write rate (bytes per second) to a device
      --device-write-iops=[]          Limit write rate (IO per second) to a device
      --disable-content-trust=true    Skip image verification
      --dns=[]                        Set custom DNS servers
      --dns-opt=[]                    Set DNS options
      --dns-search=[]                 Set custom DNS search domains
      -e, --env=[]                    Set environment variables
      --entrypoint                    Overwrite the default ENTRYPOINT of the image
      --env-file=[]                   Read in a file of environment variables
      --expose=[]                     Expose a port or a range of ports
      --group-add=[]                  Add additional groups to join
      -h, --hostname                  Container host name
      --help                          Print usage
      -i, --interactive               Keep STDIN open even if not attached
      --ip                            Container IPv4 address (e.g. 172.30.100.104)
      --ip6                           Container IPv6 address (e.g. 2001:db8::33)
      --ipc                           IPC namespace to use
      --isolation                     Container isolation level
      --kernel-memory                 Kernel memory limit
      -l, --label=[]                  Set meta data on a container
      --label-file=[]                 Read in a line delimited file of labels
      --link=[]                       Add link to another container
      --log-driver                    Logging driver for container
      --log-opt=[]                    Log driver options
      -m, --memory                    Memory limit
      --mac-address                   Container MAC address (e.g. 92:d0:c6:0a:29:33)
      --memory-reservation            Memory soft limit
      --memory-swap                   Swap limit equal to memory plus swap: '-1' to enable unlimited swap
      --memory-swappiness=-1          Tune container memory swappiness (0 to 100)
      --name                          Assign a name to the container
      --net=default                   Connect a container to a network
      --net-alias=[]                  Add network-scoped alias for the container
      --oom-kill-disable              Disable OOM Killer
      --oom-score-adj                 Tune host's OOM preferences (-1000 to 1000)
      -P, --publish-all               Publish all exposed ports to random ports
      -p, --publish=[]                Publish a container's port(s) to the host
      --pid                           PID namespace to use
      --privileged                    Give extended privileges to this container
      --read-only                     Mount the container's root filesystem as read only
      --restart=no                    Restart policy to apply when a container exits
      --security-opt=[]               Security Options
      --shm-size                      Size of /dev/shm, default value is 64MB
      --stop-signal=SIGTERM           Signal to stop a container, SIGTERM by default
      -t, --tty                       Allocate a pseudo-TTY
      --tmpfs=[]                      Mount a tmpfs directory
      -u, --user                      Username or UID (format: <name|uid>[:<group|gid>])
      --ulimit=[]                     Ulimit options
      --uts                           UTS namespace to use
      -v, --volume=[]                 Bind mount a volume
      --volume-driver                 Optional volume driver for the container
      --volumes-from=[]               Mount volumes from the specified container(s)
      -w, --workdir                   Working directory inside the container

## diff

    Usage:	shed-container diff [OPTIONS] CONTAINER

    Inspect changes on a container's filesystem

      --help             Print usage

    Extended usage:

      shed-container --latest diff

## export

    Usage:	shed-container export [OPTIONS] CONTAINER

    Export a container's filesystem as a tar archive

      --help             Print usage
      -o, --output       Write to a file, instead of STDOUT

    Extended usage:

      shed-container --latest export

## links

    Usage: shed-container links [OPTIONS] CONTAINER

    Show links from CONTAINER in pre-order (root first) or post-order (root last)

        -p, --post=false    Show links in post-order

## port

    Usage:	shed-container port [OPTIONS] CONTAINER [PRIVATE_PORT[/PROTO]]

    List port mappings or a specific mapping for the CONTAINER

      --help             Print usage

    Extended usage:

      shed-container --latest port [PRIVATE_PORT[/PROTO]]

## ps

    Usage:	shed-container ps [OPTIONS]

    List containers

      -a, --all          Show all containers (default shows just running)
      -f, --filter=[]    Filter output based on conditions provided
      --format           Pretty-print containers using a Go template
      --help             Print usage
      -l, --latest       Show the latest created container (includes all states)
      -n=-1              Show n last created containers (includes all states)
      --no-trunc         Don't truncate output
      -q, --quiet        Only display numeric IDs
      -s, --size         Display total file sizes

## rename

    Usage:	shed-container rename [OPTIONS] OLD_NAME NEW_NAME

    Rename a container

      --help             Print usage

## rm

    Usage:	shed-container rm [OPTIONS] CONTAINER [CONTAINER...]

    Remove one or more containers

      -f, --force        Force the removal of a running container (uses SIGKILL)
      --help             Print usage
      -l, --link         Remove the specified link
      -v, --volumes      Remove the volumes associated with the container

    Extended usage:

      shed-container --all rm [OPTIONS]
      shed-container --propagate rm [OPTIONS] CONTAINER
      shed-container --latest --propagate rm [OPTIONS]
      shed-container --latest rm [OPTIONS] [CONTAINER...]

## status

    Usage: shed-container status CONTAINER

    Show CONTAINER status

# Runtime commands

## attach

    Usage:	shed-container attach [OPTIONS] CONTAINER

    Attach to a running container

      --detach-keys       Override the key sequence for detaching a container
      --help              Print usage
      --no-stdin          Do not attach STDIN
      --sig-proxy=true    Proxy all received signals to the process

    Extended usage:

      shed-container --latest attach [OPTIONS]

## exec

    Usage:	shed-container exec [OPTIONS] CONTAINER COMMAND [ARG...]

    Run a command in a running container

      -d, --detach         Detached mode: run command in the background
      --detach-keys        Override the key sequence for detaching a container
      --help               Print usage
      -i, --interactive    Keep STDIN open even if not attached
      --privileged         Give extended privileges to the command
      -t, --tty            Allocate a pseudo-TTY
      -u, --user           Username or UID (format: <name|uid>[:<group|gid>])

## kill

    Usage:	shed-container kill [OPTIONS] CONTAINER [CONTAINER...]

    Kill a running container

      --help               Print usage
      -s, --signal=KILL    Signal to send to the container

    Extended usage:

      shed-container kill
      shed-container kill [OPTIONS]
      shed-container --all kill [OPTIONS]
      shed-container --propagate kill [OPTIONS] CONTAINER
      shed-container --latest --propagate kill [OPTIONS]
      shed-container --latest kill [OPTIONS] [CONTAINER...]

## logs

    Usage:	shed-container logs [OPTIONS] CONTAINER

    Fetch the logs of a container

      -f, --follow        Follow log output
      --help              Print usage
      --since             Show logs since timestamp
      -t, --timestamps    Show timestamps
      --tail=all          Number of lines to show from the end of the logs

    Extended usage:

      shed-container logs
      shed-container --latest logs [OPTIONS]

## pause

    Usage:	shed-container pause [OPTIONS] CONTAINER [CONTAINER...]

    Pause all processes within a container

      --help             Print usage

    Extended usage:

      shed-container pause
      shed-container --all pause
      shed-container --propagate pause CONTAINER
      shed-container --latest --propagate pause
      shed-container --latest pause [CONTAINER...]

## restart

    Usage:	shed-container restart [OPTIONS] CONTAINER [CONTAINER...]

    Restart a container

      --help             Print usage
      -t, --time=10      Seconds to wait for stop before killing the container

    Extended usage:

      shed-container restart
      shed-container restart [OPTIONS]
      shed-container --all restart [OPTIONS]
      shed-container --propagate restart [OPTIONS] CONTAINER
      shed-container --latest --propagate restart [OPTIONS]
      shed-container --latest restart [OPTIONS] [CONTAINER...]

## run

    Usage:	shed-container run [OPTIONS] IMAGE [COMMAND] [ARG...]

    Run a command in a new container

      -a, --attach=[]                 Attach to STDIN, STDOUT or STDERR
      --add-host=[]                   Add a custom host-to-IP mapping (host:ip)
      --blkio-weight                  Block IO (relative weight), between 10 and 1000
      --blkio-weight-device=[]        Block IO weight (relative device weight)
      --cpu-shares                    CPU shares (relative weight)
      --cap-add=[]                    Add Linux capabilities
      --cap-drop=[]                   Drop Linux capabilities
      --cgroup-parent                 Optional parent cgroup for the container
      --cidfile                       Write the container ID to the file
      --cpu-period                    Limit CPU CFS (Completely Fair Scheduler) period
      --cpu-quota                     Limit CPU CFS (Completely Fair Scheduler) quota
      --cpuset-cpus                   CPUs in which to allow execution (0-3, 0,1)
      --cpuset-mems                   MEMs in which to allow execution (0-3, 0,1)
      -d, --detach                    Run container in background and print container ID
      --detach-keys                   Override the key sequence for detaching a container
      --device=[]                     Add a host device to the container
      --device-read-bps=[]            Limit read rate (bytes per second) from a device
      --device-read-iops=[]           Limit read rate (IO per second) from a device
      --device-write-bps=[]           Limit write rate (bytes per second) to a device
      --device-write-iops=[]          Limit write rate (IO per second) to a device
      --disable-content-trust=true    Skip image verification
      --dns=[]                        Set custom DNS servers
      --dns-opt=[]                    Set DNS options
      --dns-search=[]                 Set custom DNS search domains
      -e, --env=[]                    Set environment variables
      --entrypoint                    Overwrite the default ENTRYPOINT of the image
      --env-file=[]                   Read in a file of environment variables
      --expose=[]                     Expose a port or a range of ports
      --group-add=[]                  Add additional groups to join
      -h, --hostname                  Container host name
      --help                          Print usage
      -i, --interactive               Keep STDIN open even if not attached
      --ip                            Container IPv4 address (e.g. 172.30.100.104)
      --ip6                           Container IPv6 address (e.g. 2001:db8::33)
      --ipc                           IPC namespace to use
      --isolation                     Container isolation level
      --kernel-memory                 Kernel memory limit
      -l, --label=[]                  Set meta data on a container
      --label-file=[]                 Read in a line delimited file of labels
      --link=[]                       Add link to another container
      --log-driver                    Logging driver for container
      --log-opt=[]                    Log driver options
      -m, --memory                    Memory limit
      --mac-address                   Container MAC address (e.g. 92:d0:c6:0a:29:33)
      --memory-reservation            Memory soft limit
      --memory-swap                   Swap limit equal to memory plus swap: '-1' to enable unlimited swap
      --memory-swappiness=-1          Tune container memory swappiness (0 to 100)
      --name                          Assign a name to the container
      --net=default                   Connect a container to a network
      --net-alias=[]                  Add network-scoped alias for the container
      --oom-kill-disable              Disable OOM Killer
      --oom-score-adj                 Tune host's OOM preferences (-1000 to 1000)
      -P, --publish-all               Publish all exposed ports to random ports
      -p, --publish=[]                Publish a container's port(s) to the host
      --pid                           PID namespace to use
      --privileged                    Give extended privileges to this container
      --read-only                     Mount the container's root filesystem as read only
      --restart=no                    Restart policy to apply when a container exits
      --rm                            Automatically remove the container when it exits
      --security-opt=[]               Security Options
      --shm-size                      Size of /dev/shm, default value is 64MB
      --sig-proxy=true                Proxy received signals to the process
      --stop-signal=SIGTERM           Signal to stop a container, SIGTERM by default
      -t, --tty                       Allocate a pseudo-TTY
      --tmpfs=[]                      Mount a tmpfs directory
      -u, --user                      Username or UID (format: <name|uid>[:<group|gid>])
      --ulimit=[]                     Ulimit options
      --uts                           UTS namespace to use
      -v, --volume=[]                 Bind mount a volume
      --volume-driver                 Optional volume driver for the container
      --volumes-from=[]               Mount volumes from the specified container(s)
      -w, --workdir                   Working directory inside the container

## ship

    Usage: shed-container ship [OPTIONS]

    Start and attach to containers

        -f, --follow=false    Follow running containers logs
        --no-color=false      Produce monochrome output

## start

    Usage:	shed-container start [OPTIONS] CONTAINER [CONTAINER...]

    Start one or more stopped containers

      -a, --attach         Attach STDOUT/STDERR and forward signals
      --detach-keys        Override the key sequence for detaching a container
      --help               Print usage
      -i, --interactive    Attach container's STDIN

    Extended usage:

      shed-container start
      shed-container --all start [OPTIONS]
      shed-container --propagate start [OPTIONS] CONTAINER
      shed-container --latest --propagate start [OPTIONS]
      shed-container --latest start [OPTIONS] [CONTAINER...]

## stats

    Usage:	shed-container stats [OPTIONS] [CONTAINER...]

    Display a live stream of container(s) resource usage statistics

      -a, --all          Show all containers (default shows just running)
      --help             Print usage
      --no-stream        Disable streaming stats and only pull the first result

## stop

    Usage:	shed-container stop [OPTIONS] CONTAINER [CONTAINER...]

    Stop a running container.
    Sending SIGTERM and then SIGKILL after a grace period

      --help             Print usage
      -t, --time=10      Seconds to wait for stop before killing it

    Extended usage:

      shed-container stop
      shed-container stop [OPTIONS]
      shed-container --all stop [OPTIONS]
      shed-container --propagate stop [OPTIONS] CONTAINER
      shed-container --latest --propagate stop [OPTIONS]
      shed-container --latest stop [OPTIONS] [CONTAINER...]

## top

    Usage:	shed-container top [OPTIONS] CONTAINER [ps OPTIONS]

    Display the running processes of a container

      --help             Print usage

    Extended usage:

      shed-container --latest top [ps OPTIONS]

## update

    Usage:	shed-container update [OPTIONS] CONTAINER [CONTAINER...]

    Update resources of one or more containers

      --blkio-weight          Block IO (relative weight), between 10 and 1000
      --cpu-shares            CPU shares (relative weight)
      --cpu-period            Limit CPU CFS (Completely Fair Scheduler) period
      --cpu-quota             Limit CPU CFS (Completely Fair Scheduler) quota
      --cpuset-cpus           CPUs in which to allow execution (0-3, 0,1)
      --cpuset-mems           MEMs in which to allow execution (0-3, 0,1)
      --help                  Print usage
      --kernel-memory         Kernel memory limit
      -m, --memory            Memory limit
      --memory-reservation    Memory soft limit
      --memory-swap           Swap limit equal to memory plus swap: '-1' to enable unlimited swap

    Extended usage:

      shed-container update
      shed-container update [OPTIONS]
      shed-container --all update [OPTIONS]
      shed-container --propagate update [OPTIONS] CONTAINER
      shed-container --latest --propagate update [OPTIONS]
      shed-container --latest update [OPTIONS] [CONTAINER...]

## unpause

    Usage:	shed-container unpause [OPTIONS] CONTAINER [CONTAINER...]

    Unpause all processes within a container

      --help             Print usage

    Extended usage:

      shed-container unpause
      shed-container --all unpause
      shed-container --propagate unpause CONTAINER
      shed-container --latest --propagate unpause
      shed-container --latest unpause [CONTAINER...]

## wait

    Usage:	shed-container wait [OPTIONS] CONTAINER [CONTAINER...]

    Block until a container stops, then print its exit code

      --help             Print usage

    Extended usage:

      shed-container --all wait
      shed-container --propagate wait CONTAINER
      shed-container --latest --propagate wait
      shed-container --latest wait [CONTAINER...]


text:
<?php

namespace Google\Service\YouTube;

class LocalizedString extends \Google\Model
{
  /**
   * @var string
   */
  public $language;
  /**
   * @var string
   */
  public $value;

  /**
   * @param string
   */
  public function setLanguage($language)
  {
    $this->language = $language;
  }
  /**
   * @return string
   */
  public function getLanguage()
  {
    return $this->language;
  }
  /**
   * @param string
   */
  public function setValue($value)
  {
    $this->value = $value;
  }
  /**
   * @return string
   */
  public function getValue()
  {
    return $this->value;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LocalizedString::class, 'Google_Service_YouTube_LocalizedString');

redpajama_set_name: RedPajamaGithub


text:
def pizza_rewards(customers, min_orders, min_price):
    return [key for key in customers if len([x for x in customers[key] if x >= min_price]) >= min_orders]


text:
A minimalistic yet comprehensive boilerplate application for [Electron runtime](http://electron.atom.io). Tested on macOS, Windows and Linux.

This project does not impose on you any frontend framework. It tries to give you the 'electron' part of technology stack with the least amount of dependecies as possible. This enables you to pick your favorite tools to build the actual app.

# Quick start

The sole development dependency of this project is [Node.js](https://nodejs.org), so make sure you have it installed.
Then type the following commands known to every Node developer...
```
git clone https://github.com/szwacz/electron-boilerplate.git
cd electron-boilerplate
npm install
npm start
```
...and boom! You have a running desktop application on your screen.

# Structure of the project

The application consists of two main folders...

`src` - files within this folder get transpiled or compiled (because Electron can't use them directly).

`app` - contains all static assets (put here images, css, html etc.) which don't need any pre-processing.

The build process compiles the content of the `src` folder and puts it into the `app` folder, so after the build has finished, your `app` folder contains the full, runnable application.

Treat `src` and `app` folders like two halves of one bigger thing.

The drawback of this design is that `app` folder contains some files which should be git-ignored and some which shouldn't (see `.gitignore` file). But thanks to this two-folders split development builds are much (much!) faster.

# Development

## Starting the app

```
npm start
```

## Upgrading Electron version

To do so edit `package.json`:
```json
"devDependencies": {
  "electron": "1.6.11"
}
```
Side note: [Electron authors recommend](http://electron.atom.io/docs/tutorial/electron-versioning/) to use fixed version here.

## The build pipeline

Build process relies upon [gulp](https://github.com/gulpjs/gulp) task runner and [rollup](https://github.com/rollup/rollup) bundler. The entry-points of your code are the files `src/background.js` and `src/app.js`. Rollup will follow all `import` statements starting from those files and compile code of the whole dependency tree into one `.js` file for each entry point.

You can [add more entry points if you like](https://github.com/szwacz/electron-boilerplate/blob/master/tasks/build_app.js#L16) (e.g. to split your app into modules).

By the way, [rollup has a lot of plugins](https://github.com/rollup/rollup/wiki/Plugins). You can add them in [this file](https://github.com/szwacz/electron-boilerplate/blob/master/tasks/bundle.js#L29).

## Adding npm modules to your app

Remember to respect the split between `dependencies` and `devDependencies` in `package.json` file. Your distributable app will contain modules listed in `dependencies` after running the release script.

Side note: If the module you want to use in your app is a native one (not pure JavaScript but compiled binary) you should first  run `npm install name_of_npm_module --save` and then `npm run postinstall` to rebuild the module for Electron. You need to do this once after you're first time installing the module. Later on the postinstall script will fire automatically with every `npm install`.

## Working with modules

Thanks to [rollup](https://github.com/rollup/rollup) you can (and should) use ES6 modules for all code in `src` folder. But because ES6 modules still aren't natively supported you can't use them in the `app` folder.

Use ES6 syntax in the `src` folder like this:
```js
import myStuff from './my_lib/my_stuff';
```

But use CommonJS syntax in `app` folder. So the code from above should look as follows:
```js
var myStuff = require('./my_lib/my_stuff');
```

# Testing

## Unit tests

```
npm test
```

Using [electron-mocha](https://github.com/jprichardson/electron-mocha) test runner with the [chai](http://chaijs.com/api/assert/) assertion library. This task searches for all files in `src` directory which respect pattern `*.spec.js` (so you can put unit test file in the same directory as the tested file).

## End to end tests

```
npm run e2e
```

Using [mocha](https://mochajs.org/) test runner and [spectron](http://electron.atom.io/spectron/). This task searches for all files in `e2e` directory which respect pattern `*.e2e.js`.

## Code coverage

```
npm run coverage
```

Using [istanbul](http://gotwarlost.github.io/istanbul/) code coverage tool.

You can set the reporter(s) by setting `ISTANBUL_REPORTERS` environment variable (defaults to `text-summary` and `html`). `ISTANBUL_REPORT_DIR` configures the report directory and defaults to `coverage`.

## Continuous integration

Electron [is compatible with most CI Systems](https://github.com/atom/electron/blob/master/docs/tutorial/testing-on-headless-ci.md). This Boilerplate even preconfigures [Travis CI](https://travis-ci.org/) tests on macOS and Linux as well as [App Veyor](https://www.appveyor.com) tests on Windows out of the box.

# Making a release

To package your app into an installer use command:

```
npm run release
```

It will start the packaging process. One the process finished, the `dist` directory will contain your distributable file.

We use [electron-builder](https://github.com/electron-userland/electron-builder) to handle the packaging process. It has a lot of [customization options](https://www.electron.build/configuration/configuration), which you can declare under `"build"` key in `package.json`.

You can package your app cross-platform from a single machine, [electron-builder kind of supports this](https://www.electron.build/multi-platform-build), but there are limitations. That's why this boilerplate doesn't do that by default.

# License

Released under the MIT license.


text:
package org.tap4j.ext.junit.listener;

import org.junit.runner.Result;

/**
 * JUnit TAP listener that uses test classes and outputs YAML.
 *
 * @since 4.0
 */
public class TapListenerClassYaml extends TapListener {

    @Override
    public void testRunFinished(Result result) throws Exception {
        generateTapPerClass(result);
    }

    @Override
    public boolean isYaml() {
        return true;
    }

}


text:
namespace node {

using v8::Context;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::GCCallbackFlags;
using v8::GCType;
using v8::Handle;
using v8::HandleScope;
using v8::HeapStatistics;
using v8::Isolate;
using v8::Local;
using v8::Null;
using v8::Number;
using v8::Object;
using v8::Uint32;
using v8::Value;
using v8::kGCTypeAll;
using v8::kGCTypeMarkSweepCompact;
using v8::kGCTypeScavenge;

void Environment::IsolateData::BeforeGarbageCollection(Isolate* isolate,
                                                       GCType type,
                                                       GCCallbackFlags flags) {
  Get(isolate)->BeforeGarbageCollection(type, flags);
}

void Environment::IsolateData::AfterGarbageCollection(Isolate* isolate,
                                                      GCType type,
                                                      GCCallbackFlags flags) {
  Get(isolate)->AfterGarbageCollection(type, flags);
}

void Environment::IsolateData::BeforeGarbageCollection(GCType type,
                                                       GCCallbackFlags flags) {
  gc_info_before_ = GCInfo(isolate(), type, flags, uv_hrtime());
}

void Environment::IsolateData::AfterGarbageCollection(GCType type,
                                                      GCCallbackFlags flags) {
  gc_info_after_ = GCInfo(isolate(), type, flags, uv_hrtime());

  // The copy upfront and the remove-then-insert is to avoid corrupting the
  // list when the callback removes itself from it.  QUEUE_FOREACH() is unsafe
  // when the list is mutated while being walked.
  ASSERT(QUEUE_EMPTY(&gc_tracker_queue_) == false);
  QUEUE queue;
  QUEUE* q = QUEUE_HEAD(&gc_tracker_queue_);
  QUEUE_SPLIT(&gc_tracker_queue_, q, &queue);
  while (QUEUE_EMPTY(&queue) == false) {
    q = QUEUE_HEAD(&queue);
    QUEUE_REMOVE(q);
    QUEUE_INSERT_TAIL(&gc_tracker_queue_, q);
    Environment* env = ContainerOf(&Environment::gc_tracker_queue_, q);
    env->AfterGarbageCollectionCallback(&gc_info_before_, &gc_info_after_);
  }
}

void Environment::IsolateData::StartGarbageCollectionTracking(
    Environment* env) {
  if (QUEUE_EMPTY(&gc_tracker_queue_)) {
    isolate()->AddGCPrologueCallback(BeforeGarbageCollection, v8::kGCTypeAll);
    isolate()->AddGCEpilogueCallback(AfterGarbageCollection, v8::kGCTypeAll);
  }
  ASSERT(QUEUE_EMPTY(&env->gc_tracker_queue_) == true);
  QUEUE_INSERT_TAIL(&gc_tracker_queue_, &env->gc_tracker_queue_);
}

void Environment::IsolateData::StopGarbageCollectionTracking(Environment* env) {
  ASSERT(QUEUE_EMPTY(&env->gc_tracker_queue_) == false);
  QUEUE_REMOVE(&env->gc_tracker_queue_);
  QUEUE_INIT(&env->gc_tracker_queue_);
  if (QUEUE_EMPTY(&gc_tracker_queue_)) {
    isolate()->RemoveGCPrologueCallback(BeforeGarbageCollection);
    isolate()->RemoveGCEpilogueCallback(AfterGarbageCollection);
  }
}

// Considering a memory constrained environment, creating more objects is less
// than ideal
void Environment::AfterGarbageCollectionCallback(const GCInfo* before,
                                                 const GCInfo* after) {
  HandleScope handle_scope(isolate());
  Context::Scope context_scope(context());
  Local<Value> argv[] = { Object::New(isolate()), Object::New(isolate()) };
  const GCInfo* infov[] = { before, after };
  for (unsigned i = 0; i < ARRAY_SIZE(argv); i += 1) {
    Local<Object> obj = argv[i].As<Object>();
    const GCInfo* info = infov[i];
    switch (info->type()) {
      case kGCTypeScavenge:
        obj->Set(type_string(), scavenge_string());
        break;
      case kGCTypeMarkSweepCompact:
        obj->Set(type_string(), mark_sweep_compact_string());
        break;
      default:
        UNREACHABLE();
    }
    obj->Set(flags_string(), Uint32::NewFromUnsigned(isolate(), info->flags()));
    obj->Set(timestamp_string(), Number::New(isolate(), info->timestamp()));
    // TODO(trevnorris): Setting many object properties in C++ is a significant
    // performance hit. Redo this to pass the results to JS and create/set the
    // properties there.
#define V(name)                                                               \
    do {                                                                      \
      obj->Set(name ## _string(),                                             \
               Uint32::NewFromUnsigned(isolate(), info->stats()->name()));    \
    } while (0)
    V(total_heap_size);
    V(total_heap_size_executable);
    V(total_physical_size);
    V(used_heap_size);
    V(heap_size_limit);
#undef V
  }
  MakeCallback(this,
               Null(isolate()),
               gc_info_callback_function(),
               ARRAY_SIZE(argv),
               argv);
}

void Environment::StartGarbageCollectionTracking(Local<Function> callback) {
  ASSERT(gc_info_callback_function().IsEmpty() == true);
  set_gc_info_callback_function(callback);
  isolate_data()->StartGarbageCollectionTracking(this);
}

void Environment::StopGarbageCollectionTracking() {
  ASSERT(gc_info_callback_function().IsEmpty() == false);
  isolate_data()->StopGarbageCollectionTracking(this);
  set_gc_info_callback_function(Local<Function>());
}

void StartGarbageCollectionTracking(const FunctionCallbackInfo<Value>& args) {
  CHECK(args[0]->IsFunction() == true);
  HandleScope handle_scope(args.GetIsolate());
  Environment* env = Environment::GetCurrent(args.GetIsolate());
  env->StartGarbageCollectionTracking(args[0].As<Function>());
}

void GetHeapStatistics(const FunctionCallbackInfo<Value>& args) {
  Isolate* isolate = args.GetIsolate();
  HandleScope handle_scope(isolate);
  Environment* env = Environment::GetCurrent(isolate);
  HeapStatistics s;
  isolate->GetHeapStatistics(&s);
  Local<Object> info = Object::New(isolate);
  // TODO(trevnorris): Setting many object properties in C++ is a significant
  // performance hit. Redo this to pass the results to JS and create/set the
  // properties there.
#define V(name)                                                               \
  info->Set(env->name ## _string(), Uint32::NewFromUnsigned(isolate, s.name()))
  V(total_heap_size);
  V(total_heap_size_executable);
  V(total_physical_size);
  V(used_heap_size);
  V(heap_size_limit);
#undef V
  args.GetReturnValue().Set(info);
}

void StopGarbageCollectionTracking(const FunctionCallbackInfo<Value>& args) {
  HandleScope handle_scope(args.GetIsolate());
  Environment::GetCurrent(args.GetIsolate())->StopGarbageCollectionTracking();
}

void InitializeV8Bindings(Handle<Object> target,
                          Handle<Value> unused,
                          Handle<Context> context) {
  NODE_SET_METHOD(target,
                  "startGarbageCollectionTracking",
                  StartGarbageCollectionTracking);
  NODE_SET_METHOD(target,
                  "stopGarbageCollectionTracking",
                  StopGarbageCollectionTracking);
  NODE_SET_METHOD(target, "getHeapStatistics", GetHeapStatistics);
}

}  // namespace node

NODE_MODULE_CONTEXT_AWARE_BUILTIN(v8, node::InitializeV8Bindings)


text:
package ca.lucem.hangdroid;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;

public class GameOverActivity extends Activity {

    private String cameFrom;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //Remove title bar
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        //Remove notification bar
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        //set content view AFTER WINDOW_FEATURE sequence (to avoid crash)
        this.setContentView(R.layout.activity_game_over);

        TextView textViewWord = (TextView) findViewById(R.id.textViewWord);
        TextView textView = (TextView) findViewById(R.id.textViewScore);
        TextView textViewGameOver = (TextView) findViewById(R.id.textViewGameOver);
        try { // Do font stuff after loading contentview
            // Font path
            String fontPath = "fonts/bebas.otf";
            // Loading Font Face
            Typeface tf = Typeface.createFromAsset(getAssets(), fontPath);
            // Applying font
            textViewWord.setTypeface(tf);
            textView.setTypeface(tf);
            textViewGameOver.setTypeface(tf);
        } catch (RuntimeException ex) {
            Log.d("SEVRE", "ASSET NOT FOUND:" + ex.getMessage());
        }

        double endScore = getIntent().getDoubleExtra("SESSION_SCORE",0.0);
        String endWord = getIntent().getStringExtra("SESSION_WORD");
        cameFrom = getIntent().getStringExtra("SENDER");

        textView.setText(textView.getText() + " " + endScore);
        textViewWord.setText("The word was  '" + endWord + "'");

        Log.d("INFO", "The Package this came from is: " + cameFrom);
    }

    /**
     * This method returns the user to the game activity
     *
     * @param view The current view.
     */
    public void dontSave(View view) {
        if (cameFrom.equalsIgnoreCase("single")) {
            Intent singePlayerIntent = new Intent(this, SinglePlayerActivity.class);

            startActivity(singePlayerIntent); // Returns user to SinglePlayerActivity
        } else {
            Intent multiPlayerIntent = new Intent(this, MultiPlayerStartActivity.class);

            startActivity(multiPlayerIntent); // Returns user to multiplayer game.
        }
    }

    /**
     * This method will save the score to high scores and returns the user to the start screen.
     *
     * @param view The current view.
     */
    public void saveScore(View view) {
        if(cameFrom.equalsIgnoreCase("single")) {
            Intent singlePlayerIntent = new Intent(this, StartScreen.class);

            // TODO: Save high scores to local file.
            startActivity(singlePlayerIntent);
        } else {
            Intent multiPlayerIntent = new Intent(this, MultiPlayerStartActivity.class);

            startActivity(multiPlayerIntent);
        }
    }

}


text:
'use strict';

const Util = require('util');
const Errors = require('../Errors');

/** Helper class for the library methods arguments check. */
class ArgumentChecker {
    static notEmpty(arg, argName) {
        if (!arg || arg instanceof Array && arg.length === 0) {
            throw Errors.IgniteClientError.illegalArgumentError(Util.format('"%s" argument should not be empty', argName));
        }
    }

    static notNull(arg, argName) {
        if (arg === null || arg === undefined) {
            throw Errors.IgniteClientError.illegalArgumentError(Util.format('"%s" argument should not be null', argName));
        }
    }

    static hasType(arg, argName, isArray, ...types) {
        if (arg === null) {
            return;
        }
        if (isArray && arg instanceof Array) {
            for (let a of arg) {
                ArgumentChecker.hasType(a, argName, false, ...types);
            }
        }
        else {
            for (let type of types) {
                if (arg instanceof type) {
                    return;
                }
            }
            throw Errors.IgniteClientError.illegalArgumentError(Util.format('"%s" argument has incorrect type', argName));
        }
    }

    static hasValueFrom(arg, argName, isArray, values) {
        if (isArray && arg instanceof Array) {
            for (let a of arg) {
                ArgumentChecker.hasValueFrom(a, argName, false, values);
            }
        }
        else {
            if (!Object.values(values).includes(arg)) {
                throw Errors.IgniteClientError.illegalArgumentError(Util.format('"%s" argument has incorrect value', argName));
            }
        }
    }

    static isInteger(arg, argName) {
        if (arg === null || arg === undefined || !Number.isInteger(arg)) {
            throw Errors.IgniteClientError.illegalArgumentError(Util.format('"%s" argument should be integer', argName));
        }
    }

    static invalidArgument(arg, argName, type) {
        if (arg !== null && arg !== undefined) {
            throw Errors.IgniteClientError.illegalArgumentError(
                Util.format('"%s" argument is invalid for %s', argName, type.constructor.name));
        }
    }
}

module.exports = ArgumentChecker;


text:
/*** Styles for Live Preview Window ***/

#livepreview_iframe {
    box-shadow: inset 5px 5px 10px #666;
    -moz-box-shadow: inset 5 5px 10px #666;
    -webkit-box-shadow: inset 5 5px 10px #666;
}

#livepreview_dialog {
    padding:0px;
    height:200px;
    width:300px;
    background-color:#fff;
    background-image:url('/images/icon_loading.gif');
    background-repeat:no-repeat;
    background-position:center center;
    position:absolute;
    border:solid 5px #666;
    border-radius:5px;
    -moz-border-radius: 5px;
    -webkit-border-radius:5px;
}

#livepreview_dialog:after, #livepreview_dialog:before {
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}

#livepreview_dialog.bottom:after, #livepreview_dialog.bottom:before {
    bottom: 100%;
    left: 50%;
}

#livepreview_dialog.bottom:after {
    border-color: rgba(255, 255, 255, 0);
    border-bottom-color: #ffffffff;
    border-width: 20px;
    margin-left: -20px;
}
#livepreview_dialog.bottom:before {
    border-color: rgba(102, 102, 102, 0);
    border-bottom-color: #666666;
    border-width: 26px;
    margin-left: -26px;
}

#livepreview_dialog.top:after, #livepreview_dialog.top:before {
    top: 100%;
    left: 50%;
}

#livepreview_dialog.top:after {
    border-color: rgba(255, 255, 255, 0);
    border-top-color: #ffffffff;
    border-width: 20px;
    margin-left: -20px;
}

#livepreview_dialog.top:before {
    border-color: rgba(102, 102, 102, 0);
    border-top-color: #666666;
    border-width: 26px;
    margin-left: -26px;
}

#livepreview_dialog.right:after, #livepreview_dialog.right:before {
    right: 100%;
    top: 50%;
}

#livepreview_dialog.right:after {
    border-color: rgba(255, 255, 255, 0);
    border-right-color: #ffffffff;
    border-width: 20px;
    margin-top: -20px;
}

#livepreview_dialog.right:before {
    border-color: rgba(102, 102, 102, 0);
    border-right-color: #666666;
    border-width: 26px;
    margin-top: -26px;
}

#livepreview_dialog.left, #livepreview_dialog.left:before {
    left: 100%;
    top: 50%;
}

#livepreview_dialog.left:after {
    border-color: rgba(255, 255, 255, 0);
    border-left-color: #ffffffff;
    border-width: 20px;
    margin-top: -20px;
}

#livepreview_dialog.left:before {
    border-color: rgba(102, 102, 102, 0);
    border-left-color: #666666;
    border-width: 26px;
    margin-top: -26px;
}


text:
SYNONYM

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

#### Published in
De Wild. & Gentil, Lian. caoutch. Congo. & Ind. 59, t. 3. 1904

#### Original name
null

### Remarks
null


text:
$(document).ready(function() {
	$('body').append('

');

	$('body').on('touchstart click', "div", function(e) {
		if (($(this).hasClass('rkt-overcast') && !($('#rkt-shuttle').hasClass('rkt-permanent'))) || (($(this).hasClass('rkt-x')))) {
			$('#rkt-shuttle').removeClass('rkt-orbiting');
			setTimeout(landingSequence, 500);
		}
	});

	$('.rkt-launcher').click(function(e) {
		var launcher = $(this);
		if ((launcher.data('disable-below')) && $(window).width() < launcher.data('disable-below')) {
			return true;
		}
		e.preventDefault();
		e.stopPropagation();

		launch({
			url:             launcher.attr('href'),
			flightPlan:      launcher.data('flight-plan'),
			landingSequence: launcher.data('landing-sequence'),
			classes:         launcher.data('class'),
			w:               launcher.data('width'),
			h:               launcher.data('height'),
			mode:            launcher.attr('rel'),
			cargo:           launcher.data('cargo')
		});
		return false;
	});
});

function launch(settings) {
	$('.rkt-atmosphere').addClass('rkt-overcast');
	var shuttle = $('#rkt-shuttle');

	shuttle.attr('style', '');
	shuttle.attr('data-landing-sequence', '');
	shuttle.attr('class', '');

	if (settings.classes) {
		shuttle.addClass(settings.classes);
	}
	if (settings.landingSequence) {
		shuttle.attr('data-landing-sequence', settings.landingSequence);
	}

	var paddingX = Number(shuttle.css('padding-left').replace(/[^-\d\.]/g, '')) + Number(shuttle.css('padding-right').replace(/[^-\d\.]/g, '')),
		paddingY = Number(shuttle.css('padding-top').replace(/[^-\d\.]/g, '')) + Number(shuttle.css('padding-bottom').replace(/[^-\d\.]/g, ''));

	if (settings.w) {
		shuttle.css('width', Number(settings.w) + paddingX);
	}
	if (settings.h) {
		shuttle.css('height', Number(settings.h) + paddingY);
	}

	if (settings.cargo) {
		shuttle.html(settings.cargo + '
X
');
	} else if (settings.mode == 'image') {
		shuttle.html('' + '
X
');
	} else {
		shuttle.html('' + '
X
');
		if (!settings.w) {
			shuttle.css('width', 800 + paddingX);
		}
		if (!settings.h) {
			shuttle.css('height', 600 + paddingY);
		}
	}

	if (settings.flightPlan) {
		eval(settings.flightPlan);
	}

	shuttle.addClass('rkt-orbiting');
}

function landingSequence() {
	var shuttle = $('#rkt-shuttle');
	if (shuttle.data('landing-sequence')) {
		eval(shuttle.data('landing-sequence'));
	}
	$('.rkt-atmosphere').removeClass('rkt-overcast');
	shuttle.html('');
}


text:
var Profile = require('./models/profile');

function start(opts) {
  setInterval(function() {
    Profile.update({
      locked: true,
      locked_dt: {
        $lt: (new Date() - opts.unlockProfileMs)
      }
    }, {
      locked: false,
      locked_dt: null,
      session_id: null
    }, {
      multi: true
    }, function(err, profiles) {
      if (err) return console.error(err);
    });
  }, 60000).unref();
}

module.exports = {
  start: start
};


text:
<?php

namespace Core\Entities;

/**
 * Class ThumbnailEntity.
 *
 * @package Core\Entities
 */
final class ThumbnailEntity extends AbstractEntity
{
    private $path;
    private $width;
    private $height;

    /**
     * ThumbnailEntity constructor.
     *
     * @param array $attributes
     */
    public function __construct(array $attributes)
    {
        $this->setPath($attributes['path'] ?? null);
        $this->setWidth($attributes['width'] ?? null);
        $this->setHeight($attributes['height'] ?? null);
    }

    /**
     * @param string $path
     * @return $this
     */
    private function setPath(string $path): ThumbnailEntity
    {
        $this->path = $path;

        return $this;
    }

    /**
     * @return string
     */
    public function getPath(): string
    {
        return $this->path;
    }

    /**
     * @param int $width
     * @return $this
     */
    private function setWidth(int $width): ThumbnailEntity
    {
        $this->width = $width;

        return $this;
    }

    /**
     * @return int
     */
    public function getWidth(): int
    {
        return $this->width;
    }

    /**
     * @param int $height
     * @return $this
     */
    private function setHeight(int $height): ThumbnailEntity
    {
        $this->height = $height;

        return $this;
    }

    /**
     * @return int
     */
    public function getHeight(): int
    {
        return $this->height;
    }

    /**
     * @inheritdoc
     */
    public function __toString(): string
    {
        return $this->getPath();
    }

    /**
     * @inheritdoc
     */
    public function toArray(): array
    {
        return [
            'path' => $this->getPath(),
            'width' => $this->getWidth(),
            'height' => $this->getHeight(),
        ];
    }
}


text:
Basic starter kit for gulp development. Included Sass, Less, Jade, HTML, Eslint, and browserSync.

Based on [angularjs-gulp-browserify-boilerplate](https://github.com/jakemmarsh/angularjs-gulp-browserify-boilerplate/) by jakemmarsh.

---

## About

The main Gulp tasks that included in ```gulp/tasks``` :

- **browserSync** - [BrowserSync](https://www.browsersync.io/)
- **deploy** - Deploy Allthings
- **development** - Build Dev Code with Dev Server
- **production** - Build Production Code
- **watch** - Gulp Watch
- **server** - Run a Express-dev-server
- **css** - Compile CSS with autoprefixer & minify
- **sass** - [libSass](http://sass-lang.com/libsass) Compiler, support [autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) & [Compass Mixins](https://github.com/Igosuki/compass-mixins)
- **less** - [Less](lesscss.org) Compiler, also support [autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer) & [Compass Mixins](https://github.com/Igosuki/compass-mixins)
- **scripts** - JS, support concat & uglify.
- **lint** - Linter with [Eslint](http://eslint.org/), config in ```.eslintrc```
- **vendor** - Vendor for JS & CSS (will be bundled into each single file)
- **html** - HTML Watcher, support minify
- **jade** - [Jade](http://jade-lang.com/) Template Compiler, support ignore underscore file
- **images** - Images [minify](https://github.com/sindresorhus/gulp-imagemin)
- **fonts** - move fonts from static to build folder
- **locales** - minify JSON
- **gzip** - Gzip for ```html|xml|json|css|js|js.map|css.map```
- **test** - Unit Test with Karma

## Configuration

All Gulp config are written in ```gulp/tasks/config.js```

Dev, Prod & Watch's tasks can be configured in the end of config.js.

## Install

```
npm install
```

## Usage

Running Dev server

```
npm start
```

Building Production Code

```
npm run build
```

## License
MIT © [CJies](http://www.cjies.com)


text:
<?php

namespace Infuse\Cron\Events;

use Symfony\Contracts\EventDispatcher\Event;

class ScheduleRunFinishedEvent extends Event
{
    const NAME = 'schedule_run.finished';
}


text:
package com.didichuxing.doraemonkit.gps_mock.lbs.common;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Color;

import com.amap.api.maps.AMap;
import com.amap.api.maps.CameraUpdateFactory;
import com.amap.api.maps.model.BitmapDescriptor;
import com.amap.api.maps.model.BitmapDescriptorFactory;
import com.amap.api.maps.model.LatLng;
import com.amap.api.maps.model.LatLngBounds;
import com.amap.api.maps.model.Marker;
import com.amap.api.maps.model.MarkerOptions;
import com.amap.api.maps.model.Polyline;
import com.amap.api.maps.model.PolylineOptions;
import com.didichuxing.doraemonkit.R;

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

public class AMapRouteOverlay {
    protected List<Marker> stationMarkers = new ArrayList<Marker>();
    protected List<Polyline> allPolyLines = new ArrayList<Polyline>();
    protected Marker startMarker;
    protected Marker endMarker;
    protected LatLng startPoint;
    protected LatLng endPoint;
    protected AMap mAMap;
    private Context mContext;
    private Bitmap startBit, endBit, busBit, walkBit, driveBit;
    protected boolean nodeIconVisible = true;

    public AMapRouteOverlay(Context context) {
        mContext = context;
    }

    /**
     * 去掉BusRouteOverlay上所有的Marker。
     *
     * @since V2.1.0
     */
    public void removeFromMap() {
        if (startMarker != null) {
            startMarker.remove();

        }
        if (endMarker != null) {
            endMarker.remove();
        }
        for (Marker marker : stationMarkers) {
            marker.remove();
        }
        for (Polyline line : allPolyLines) {
            line.remove();
        }
        destroyBit();
    }

    private void destroyBit() {
        if (startBit != null) {
            startBit.recycle();
            startBit = null;
        }
        if (endBit != null) {
            endBit.recycle();
            endBit = null;
        }
        if (busBit != null) {
            busBit.recycle();
            busBit = null;
        }
        if (walkBit != null) {
            walkBit.recycle();
            walkBit = null;
        }
        if (driveBit != null) {
            driveBit.recycle();
            driveBit = null;
        }
    }

    /**
     * 给起点Marker设置图标,并返回更换图标的图片。如不用默认图片,需要重写此方法。
     *
     * @return 更换的Marker图片。
     * @since V2.1.0
     */
    protected BitmapDescriptor getStartBitmapDescriptor() {
        return BitmapDescriptorFactory.fromResource(R.mipmap.dk_lbs_start);
    }

    /**
     * 给终点Marker设置图标,并返回更换图标的图片。如不用默认图片,需要重写此方法。
     *
     * @return 更换的Marker图片。
     * @since V2.1.0
     */
    protected BitmapDescriptor getEndBitmapDescriptor() {
        return BitmapDescriptorFactory.fromResource(R.mipmap.dk_lbs_end);
    }

    /**
     * 给公交Marker设置图标,并返回更换图标的图片。如不用默认图片,需要重写此方法。
     *
     * @return 更换的Marker图片。
     * @since V2.1.0
     */
    protected BitmapDescriptor getBusBitmapDescriptor() {
        return BitmapDescriptorFactory.fromResource(R.mipmap.dk_lbs_bus);
    }

    /**
     * 给步行Marker设置图标,并返回更换图标的图片。如不用默认图片,需要重写此方法。
     *
     * @return 更换的Marker图片。
     * @since V2.1.0
     */
    protected BitmapDescriptor getWalkBitmapDescriptor() {
        return BitmapDescriptorFactory.fromResource(R.mipmap.dk_lbs_man);
    }

    protected BitmapDescriptor getDriveBitmapDescriptor() {
        return BitmapDescriptorFactory.fromResource(R.mipmap.dk_lbs_car);
    }

    protected void addStartAndEndMarker() {
        startMarker = mAMap.addMarker((new MarkerOptions())
                .position(startPoint).icon(getStartBitmapDescriptor())
                .title("\u8D77\u70B9"));
        // startMarker.showInfoWindow();

        endMarker = mAMap.addMarker((new MarkerOptions()).position(endPoint)
                .icon(getEndBitmapDescriptor()).title("\u7EC8\u70B9"));
        // mAMap.moveCamera(CameraUpdateFactory.newLatLngZoom(startPoint,
        // getShowRouteZoom()));
    }

    /**
     * 移动镜头到当前的视角。
     *
     * @since V2.1.0
     */
    public void zoomToSpan() {
        if (startPoint != null) {
            if (mAMap == null)
                return;
            try {
//				LatLngBounds bounds = getLatLngBounds();
//				mAMap.animateCamera(CameraUpdateFactory
//						.newLatLngBounds(bounds, 10));
                mAMap.animateCamera(CameraUpdateFactory.newLatLngZoom(startPoint, 10));
            } catch (Throwable e) {
                e.printStackTrace();
            }
        }
    }

    protected LatLngBounds getLatLngBounds() {
        LatLngBounds.Builder b = LatLngBounds.builder();
        b.include(new LatLng(startPoint.latitude, startPoint.longitude));
        b.include(new LatLng(endPoint.latitude, endPoint.longitude));
        return b.build();
    }

    /**
     * 路段节点图标控制显示接口。
     *
     * @param visible true为显示节点图标,false为不显示。
     * @since V2.3.1
     */
    public void setNodeIconVisibility(boolean visible) {
        try {
            nodeIconVisible = visible;
            if (this.stationMarkers != null && this.stationMarkers.size() > 0) {
                for (int i = 0; i < this.stationMarkers.size(); i++) {
                    this.stationMarkers.get(i).setVisible(visible);
                }
            }
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    protected void addStationMarker(MarkerOptions options) {
        if (options == null) {
            return;
        }
        Marker marker = mAMap.addMarker(options);
        if (marker != null) {
            stationMarkers.add(marker);
        }

    }

    protected void addPolyLine(PolylineOptions options) {
        if (options == null) {
            return;
        }
        Polyline polyline = mAMap.addPolyline(options);
        if (polyline != null) {
            allPolyLines.add(polyline);
        }
    }

    protected float getRouteWidth() {
        return 18f;
    }

    protected int getWalkColor() {
        return Color.parseColor("#6db74d");
    }

    /**
     * 自定义路线颜色。
     * return 自定义路线颜色。
     *
     * @since V2.2.1
     */
    protected int getBusColor() {
        return Color.parseColor("#537edc");
    }

    protected int getDriveColor() {
        return Color.parseColor("#537edc");
    }

    // protected int getShowRouteZoom() {
    // return 15;
    // }
}


text:
require('proof')(13, async okay => {
    await require('./harness')(okay, 'idbindex_getAllKeys')
    await harness(async function () {

        var alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');

        function getall_test(func, name) {
          indexeddb_test(
            function(t, connection, tx) {
              var store = connection.createObjectStore('generated',
                    {autoIncrement: true, keyPath: 'id'});
              var index = store.createIndex('test_idx', 'upper');
              alphabet.forEach(function(letter) {
                store.put({ch: letter, upper: letter.toUpperCase()});
              });

              store = connection.createObjectStore('out-of-line', null);
              index = store.createIndex('test_idx', 'upper');
              alphabet.forEach(function(letter) {
                store.put({ch: letter, upper: letter.toUpperCase()}, letter);
              });

              store = connection.createObjectStore('out-of-line-multi', null);
              index = store.createIndex('test_idx', 'attribs', {multiEntry: true});
              alphabet.forEach(function(letter) {
                const attrs = [];
                if (['a', 'e', 'i', 'o', 'u'].indexOf(letter) != -1)
                  attrs.push('vowel');
                else
                  attrs.push('consonant');
                if (letter == 'a')
                  attrs.push('first');
                if (letter == 'z')
                  attrs.push('last');
                store.put({ch: letter, attribs: attrs}, letter.toUpperCase());
              });

              store = connection.createObjectStore('empty', null);
              index = store.createIndex('test_idx', 'upper');
            },
            func,
            name
          );
        }

        function createGetAllKeysRequest(t, storeName, connection, range, maxCount) {
            var transaction = connection.transaction(storeName, 'readonly');
            var store = transaction.objectStore(storeName);
            var index = store.index('test_idx');
            var req = index.getAllKeys(range, maxCount);
            req.onerror = t.unreached_func('getAllKeys request should succeed');
            return req;
        }

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'out-of-line', connection, 'C');
              req.onsuccess = t.step_func(function(evt) {
                  var data = evt.target.result;
                  assert_array_equals(evt.target.result, ['c']);
                  t.done();
              });
            }, 'Single item get');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'empty', connection);
              req.onsuccess = t.step_func(function(evt) {
                  assert_array_equals(evt.target.result, [],
                      'getAllKeys() on empty object store should return empty array');
                  t.done();
              });
            }, 'Empty object store');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'out-of-line', connection);
              req.onsuccess = t.step_func(function(evt) {
                  assert_array_equals(evt.target.result, alphabet,
                      'getAllKeys() should return a..z');
                  t.done();
              });
            }, 'Get all keys');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'generated', connection);
              req.onsuccess = t.step_func(function(evt) {
                  assert_array_equals(evt.target.result,
                      [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
                       19, 20, 21, 22, 23, 24, 25, 26],
                      'getAllKeys() should return 1..26');
                  t.done();
              });
            }, 'Get all generated keys');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'out-of-line', connection, undefined,
                                            10);
              req.onsuccess = t.step_func(function(evt) {
                  assert_array_equals(evt.target.result,
                                     'abcdefghij'.split(''),
                                     'getAllKeys() should return a..j');
                  t.done();
              });
            }, 'maxCount=10');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'out-of-line', connection,
                                            IDBKeyRange.bound('G', 'M'));
              req.onsuccess = t.step_func(function(evt) {
                  assert_array_equals(evt.target.result,
                                      'ghijklm'.split(''),
                                      'getAllKeys() should return g..m');
                  t.done();
              });
            }, 'Get bound range');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'out-of-line', connection,
                                            IDBKeyRange.bound('G', 'M'), 3);
              req.onsuccess = t.step_func(function(evt) {
                  assert_array_equals(evt.target.result,
                                     ['g', 'h', 'i'],
                                     'getAllKeys() should return g..i');
                  t.done();
              });
            }, 'Get bound range with maxCount');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'out-of-line', connection,
                  IDBKeyRange.bound('G', 'K', false, true));
              req.onsuccess = t.step_func(function(evt) {
                  assert_array_equals(evt.target.result,
                                     ['g', 'h', 'i', 'j'],
                                     'getAllKeys() should return g..j');
                  t.done();
              });
            }, 'Get upper excluded');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'out-of-line', connection,
                  IDBKeyRange.bound('G', 'K', true, false));
              req.onsuccess = t.step_func(function(evt) {
                  assert_array_equals(evt.target.result,
                                     ['h', 'i', 'j', 'k'],
                                     'getAllKeys() should return h..k');
                  t.done();
              });
            }, 'Get lower excluded');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'generated',
                  connection, IDBKeyRange.bound(4, 15), 3);
              req.onsuccess = t.step_func(function(evt) {
                  assert_array_equals(evt.target.result, [],
                                      'getAllKeys() should return []');
                  t.done();
              });
            }, 'Get bound range (generated) with maxCount');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'out-of-line',
                  connection, "Doesn't exist");
              req.onsuccess = t.step_func(function(evt) {
                  assert_array_equals(evt.target.result, [],
                      'getAllKeys() using a nonexistent key should return empty array');
                  t.done();
              req.onerror = t.unreached_func('getAllKeys request should succeed');
              });
            }, 'Non existent key');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'out-of-line', connection,
                  undefined, 0);
              req.onsuccess = t.step_func(function(evt) {
                  assert_array_equals(evt.target.result, alphabet,
                      'getAllKeys() should return a..z');
                  t.done();
              });
            }, 'maxCount=0');

        getall_test(function(t, connection) {
              var req = createGetAllKeysRequest(t, 'out-of-line-multi', connection,
                                                'vowel');
              req.onsuccess = t.step_func(function(evt) {
                assert_array_equals(evt.target.result, ['A','E','I','O','U'])
                t.done();
              });
              req.onerror = t.unreached_func('getAllKeys request should succeed');
            }, 'Retrieve multiEntry keys');

    })
})


text:
namespace WebAPI.Dashboard.Models.ViewModels.Keys
{
    public class ApiKeyViewModel
    {
        public string Id { get; set; }
        public string ApiKey { get; set; }
        public string LastUsed { get; set; }
        public string Type { get; set; }
        public int UsageCount { get; set; }
        public string AccountId { get; set; }
        public string Pattern { get; set; }
        public bool Active { get; set; }
        public bool Development { get; set; }

        public string ButtonCssClass
        {
            get { return Active ? "btn-warning" : "btn-success"; }
        }

        public string StutusIconCssClass
        {
            get { return Active ? "glyphicon glyphicon-pause" : "glyphicon glyphicon-play"; }
        }

        public string StatusIconText
        {
            get { return Active ? "Deactivate" : "Activate"; }
        }

        public string TableRowCssClass
        {
            get { return Active ? "active" : "inactive"; }
        }

        public string UseTypeIconCssClass
        {
            get { return Development ? "label label-default" : ""; }
        }

        public string UseType
        {
            get { return Development ? "dev" : ""; }
        }
    }
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8" />
    <meta name="robots" content="index, follow, all" />
    <title>RocketTheme\Toolbox\ArrayTraits\ArrayAccessWithGetters | Grav API</title>

            <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="../../../css/bootstrap-theme.min.css">
        <link rel="stylesheet" type="text/css" href="../../../css/sami.css">

        <meta name="MobileOptimized" content="width">
        <meta name="HandheldFriendly" content="true">
        <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">

                <form id="search-form" action="../../../search.html" method="GET">

            <input name="search"
                   class="typeahead form-control"
                   type="search"
                   placeholder="Search">
        </form>

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
                    Toggle navigation

                </button>
                Grav API

Classes

Namespaces

Interfaces

Traits

Index

Search

trait

RocketTheme

Toolbox

ArrayTraits

ArrayAccessWithGetters

                							Edit on GitHub

ArrayAccessWithGetters

        Edit RocketTheme\Toolbox\ArrayTraits\ArrayAccessWithGetters

    trait
    ArrayAccessWithGetters

Implements getters and setters.

Traits

                                            RocketTheme\Toolbox\ArrayTraits\ArrayAccess

                    Implements ArrayAccess interface.

Properties

    array

                $items
                array$items
                from
    ArrayAccess

Methods

    bool

                    offsetExists(
    mixed $offset)

Whether or not an offset exists.

from
    ArrayAccess

    mixed

                    offsetGet(
    mixed $offset)

Returns the value at specified offset.

from
    ArrayAccess

                    offsetSet(
    mixed $offset,
    mixed $value)

Assigns a value to the specified offset.

from
    ArrayAccess

                    offsetUnset(
    mixed $offset)

Unsets an offset.

from
    ArrayAccess

                    __set(
    mixed $offset,
    mixed $value)

Magic setter method

    mixed

                    __get(
    mixed $offset)

Magic getter method

    boolean

                    __isset(
    mixed $offset)

Magic method to determine if the attribute is set

                    __unset(
    mixed $offset)

Magic method to unset the attribute

Details

in
    ArrayAccess at line 21

    bool
    offsetExists(
    mixed $offset)

Whether or not an offset exists.

Parameters

    mixed
                $offset
                An offset to check for.

Return Value

    bool
            Returns TRUE on success or FALSE on failure.

in
    ArrayAccess at line 32

    mixed
    offsetGet(
    mixed $offset)

Returns the value at specified offset.

Parameters

    mixed
                $offset
                The offset to retrieve.

Return Value

    mixed
            Can return all value types.

in
    ArrayAccess at line 43

    offsetSet(
    mixed $offset,
    mixed $value)

Assigns a value to the specified offset.

Parameters

    mixed
                $offset
                The offset to assign the value to.

    mixed
                $value
                The value to set.

in
    ArrayAccess at line 57

    offsetUnset(
    mixed $offset)

Unsets an offset.

Parameters

    mixed
                $offset
                The offset to unset.

at line 21

    __set(
    mixed $offset,
    mixed $value)

Magic setter method

Parameters

    mixed
                $offset
                Asset name value

    mixed
                $value
                Asset value

at line 32

    mixed
    __get(
    mixed $offset)

Magic getter method

Parameters

    mixed
                $offset
                Asset name value

Return Value

    mixed
            Asset value

at line 43

    boolean
    __isset(
    mixed $offset)

Magic method to determine if the attribute is set

Parameters

    mixed
                $offset
                Asset name value

Return Value

    boolean
            True if the value is set

at line 53

    __unset(
    mixed $offset)

Magic method to unset the attribute

Parameters

    mixed
                $offset
                The name value to unset

        Generated on December 8th at 8:01pm by Sami


text:
package org.jetbrains.plugins.scala
package lang
package parser
package parsing
package expressions

import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
import org.jetbrains.plugins.scala.lang.parser.parsing.patterns.CaseClauses
import org.jetbrains.plugins.scala.lang.parser.util.{ParserPatcher, ParserUtils}

/**
* @author Alexander Podkhalyuzin
* Date: 03.03.2008
*/

/*
 * Expr1 ::= 'if' '(' Expr ')' {nl} Expr [[semi] else Expr]
 *         | 'while' '(' Expr ')' {nl} Expr
 *         | 'try' '{' Block '}' [catch CatchHandler] ['finally' Expr ]
 *         | 'do' Expr [semi] 'while' '(' Expr ')'
 *         | 'for' ('(' Enumerators ')' | '{' Enumerators '}') {nl} ['yield'] Expr
 *         | 'throw' Expr
 *
 *         | implicit Id => Expr  # Not in Scala Specification yet!
 *
 *         | 'return' [Expr]
 *         | [SimpleExpr '.'] id '=' Expr
 *         | SimpleExpr1 ArgumentExprs '=' Expr
 *         | PostfixExpr
 *         | PostfixExpr Ascription
 *         | PostfixExpr 'match' '{' CaseClauses '}'
 *
 * CatchHandler ::= '{' CaseClauses '}'
 *                | '{' Path '}'
 *                | '(' Path ')'
 *                | Path
 */
object Expr1 {
  def parse(builder: ScalaPsiBuilder): Boolean = {
    val exprMarker = builder.mark
    builder.getTokenType match {
    //----------------------if statement------------------------//
      case ScalaTokenTypes.kIF =>
        builder.advanceLexer() //Ate if
        builder.getTokenType match {
          case ScalaTokenTypes.tLPARENTHESIS =>
            builder.advanceLexer() //Ate (
            builder.disableNewlines
            if (!Expr.parse(builder)) builder error ErrMsg("wrong.expression")
            builder.getTokenType match {
              case ScalaTokenTypes.tRPARENTHESIS =>
                builder.advanceLexer() //Ate )
              case _ =>
                builder error ErrMsg("rparenthesis.expected")
            }
            builder.restoreNewlinesState
          case _ =>
            builder error ErrMsg("condition.expected")
        }

        ParserPatcher getSuitablePatcher builder parse builder

        if (!Expr.parse(builder)) {
          builder error ErrMsg("wrong.expression")
        }
        val rollbackMarker = builder.mark
        builder.getTokenType match {
          case ScalaTokenTypes.tSEMICOLON =>
            builder.advanceLexer() //Ate semi
          case _ =>
        }
        builder.getTokenType match {
          case ScalaTokenTypes.kELSE =>
            builder.advanceLexer()
            if (!Expr.parse(builder)) builder error ErrMsg("wrong.expression")
            rollbackMarker.drop()
          case _ =>
            rollbackMarker.rollbackTo()
        }
        exprMarker.done(ScalaElementTypes.IF_STMT)
        return true
      //--------------------while statement-----------------------//
      case ScalaTokenTypes.kWHILE =>
        builder.advanceLexer() //Ate while
        builder.getTokenType match {
          case ScalaTokenTypes.tLPARENTHESIS =>
            builder.advanceLexer() //Ate (
            builder.disableNewlines
            if (!Expr.parse(builder)) builder error ErrMsg("wrong.expression")
            builder.getTokenType match {
              case ScalaTokenTypes.tRPARENTHESIS =>
                builder.advanceLexer() //Ate )
              case _ =>
                builder error ErrMsg("rparenthesis.expected")
            }
            builder.restoreNewlinesState
          case _ =>
            builder error ErrMsg("condition.expected")
        }
        if (!Expr.parse(builder)) {
          builder error ErrMsg("wrong.expression")
        }
        exprMarker.done(ScalaElementTypes.WHILE_STMT)
        return true
      //---------------------try statement------------------------//
      case ScalaTokenTypes.kTRY =>
        val tryMarker = builder.mark
        builder.advanceLexer() //Ate try
        builder.getTokenType match {
          case ScalaTokenTypes.tLBRACE =>
            builder.advanceLexer() //Ate {
            builder.enableNewlines
            def foo() {
              if (!Block.parse(builder, hasBrace = false)) {
                builder error ErrMsg("block.expected")
              }
            }
            ParserUtils.parseLoopUntilRBrace(builder, foo _)
            builder.restoreNewlinesState
          case _ =>
            if (!Block.parse(builder, hasBrace = false)) {
              builder error ErrMsg("block.expected")
            }
        }
        tryMarker.done(ScalaElementTypes.TRY_BLOCK)
        val catchMarker = builder.mark
        builder.getTokenType match {
          case ScalaTokenTypes.kCATCH =>
            builder.advanceLexer() //Ate catch
            if (!Expr.parse(builder)) {
              builder.error(ErrMsg("wrong.expression"))
            }
            catchMarker.done(ScalaElementTypes.CATCH_BLOCK)
          case _ =>
            catchMarker.drop()
        }
        val finallyMarker = builder.mark
        builder.getTokenType match {
          case ScalaTokenTypes.kFINALLY =>
            builder.advanceLexer() //Ate finally
            if (!Expr.parse(builder)) {
              builder error ErrMsg("wrong.expression")
            }
            finallyMarker.done(ScalaElementTypes.FINALLY_BLOCK)
          case _ =>
            finallyMarker.drop()
        }
        exprMarker.done(ScalaElementTypes.TRY_STMT)
        return true
      //----------------do statement----------------//
      case ScalaTokenTypes.kDO =>
        builder.advanceLexer() //Ate do
        if (!Expr.parse(builder)) builder error ErrMsg("wrong.expression")
        builder.getTokenType match {
          case ScalaTokenTypes.tSEMICOLON =>
            builder.advanceLexer() //Ate semi
          case _ =>
        }
        builder.getTokenType match {
          case ScalaTokenTypes.kWHILE =>
            builder.advanceLexer() //Ate while
            builder.getTokenType match {
              case ScalaTokenTypes.tLPARENTHESIS =>
                builder.advanceLexer() //Ate (
                builder.disableNewlines
                if (!Expr.parse(builder)) builder error ErrMsg("wrong.expression")
                builder.getTokenType match {
                  case ScalaTokenTypes.tRPARENTHESIS =>
                    builder.advanceLexer() //Ate )
                  case _ =>
                    builder error ErrMsg("rparenthesis.expected")
                }
                builder.restoreNewlinesState
              case _ =>
                builder error ErrMsg("condition.expected")
            }
          case _ =>
            builder error ErrMsg("while.expected")
        }
        exprMarker.done(ScalaElementTypes.DO_STMT)
        return true
      //----------------for statement------------------------//
      case ScalaTokenTypes.kFOR =>
        builder.advanceLexer() //Ate for
        builder.getTokenType match {
          case ScalaTokenTypes.tLBRACE =>
            builder.advanceLexer() //Ate {
            builder.enableNewlines
            def foo() {
              if (!Enumerators.parse(builder)) {
                builder error ErrMsg("enumerators.expected")
              }
            }
            ParserUtils.parseLoopUntilRBrace(builder, foo _)
            builder.restoreNewlinesState
          case ScalaTokenTypes.tLPARENTHESIS =>
            builder.advanceLexer() //Ate (
            builder.disableNewlines
            if (!Enumerators.parse(builder)) {
              builder error ErrMsg("enumerators.expected")
            }
            builder.getTokenType match {
              case ScalaTokenTypes.tRPARENTHESIS => builder.advanceLexer()
              case _ => builder error ErrMsg("rparenthesis.expected")
            }
            builder.restoreNewlinesState
          case _ =>
            builder error ErrMsg("enumerators.expected")
        }
        if (builder.twoNewlinesBeforeCurrentToken) {
          builder.error(ErrMsg("wrong.expression"))
          exprMarker.done(ScalaElementTypes.FOR_STMT)
          return true
        }
        builder.getTokenType match {
          case ScalaTokenTypes.kYIELD =>
            builder.advanceLexer() //Ate yield
          case _ =>
        }
        if (!Expr.parse(builder)) builder error ErrMsg("wrong.expression")
        exprMarker.done(ScalaElementTypes.FOR_STMT)
        return true
      //----------------throw statment--------------//
      case ScalaTokenTypes.kTHROW =>
        builder.advanceLexer() //Ate throw
        if (!Expr.parse(builder)) {
          builder error ErrMsg("wrong.expression")
        }
        exprMarker.done(ScalaElementTypes.THROW_STMT)
        return true
      //--------------implicit closure--------------//
      case ScalaTokenTypes.kIMPLICIT =>
        val ipmarker = builder.mark
        builder.advanceLexer() //Ate implicit
        builder.getTokenType match {
          case ScalaTokenTypes.tIDENTIFIER =>
            val pmarker = builder.mark
            builder.advanceLexer() //Ate id
            builder.getTokenType match {
              case ScalaTokenTypes.tFUNTYPE =>
                pmarker.done(ScalaElementTypes.PARAM)
                ipmarker.done(ScalaElementTypes.PARAM_CLAUSE)
                ipmarker.precede.done(ScalaElementTypes.PARAM_CLAUSES)

                builder.advanceLexer() //Ate =>
                if (!Expr.parse(builder)) builder error ErrMsg("wrong.expression")
                exprMarker.done(ScalaElementTypes.FUNCTION_EXPR)
                return true
              case _ =>
                pmarker.drop()
                ipmarker.drop()
            }
          case _ =>
            ipmarker.drop()
        }

      //---------------return statement-----------//
      case ScalaTokenTypes.kRETURN =>
        builder.advanceLexer() //Ate return
        if (!builder.newlineBeforeCurrentToken)
          Expr parse builder
        exprMarker.done(ScalaElementTypes.RETURN_STMT)
        return true

      //---------other cases--------------//
      case _ =>
        if (!PostfixExpr.parse(builder)) {
          exprMarker.rollbackTo()
          return false
        }
        builder.getTokenType match {
          case ScalaTokenTypes.tASSIGN =>
            builder.advanceLexer() //Ate =
            if (!Expr.parse(builder)) {
              builder error ErrMsg("wrong.expression")
            }
            exprMarker.done(ScalaElementTypes.ASSIGN_STMT)
            return true
          case ScalaTokenTypes.tCOLON =>
            Ascription parse builder
            exprMarker.done(ScalaElementTypes.TYPED_EXPR_STMT)
            return true
          case ScalaTokenTypes.kMATCH =>
            builder.advanceLexer() //Ate match
            builder.getTokenType match {
              case ScalaTokenTypes.tLBRACE =>
                builder.advanceLexer() //Ate {
                builder.enableNewlines
                def foo() {
                  if (!CaseClauses.parse(builder)) {
                    builder error ErrMsg("case.clauses.expected")
                  }
                }
                ParserUtils.parseLoopUntilRBrace(builder, foo _)
                builder.restoreNewlinesState
              case _ => builder error ErrMsg("case.clauses.expected")
            }
            exprMarker.done(ScalaElementTypes.MATCH_STMT)
            return true
          case _ =>
            exprMarker.drop()
            return true
        }
    }
    exprMarker.rollbackTo()
    false
  }
}


text:
package org.wso2.carbon.apimgt.gateway.throttling.dto;

/**
 * Temporary files should be delted once the Authentication handler part is completed
 */
public class AuthenticationContextDTO {

    private String keyType;
    private String apiKey;
    private String applicationId;
    private String subscriber;
    private String applicationName;
    private String username;

    private String subscriberTenantDomain;
    private String tier;
    private String applicationTier;
    private String requestKey;
    private String apiTier;
    private String callerToken;
    private String spikeArrestUnit;
    private int spikeArrestLimit;
    private boolean stopOnQuotaReach;

    public AuthenticationContextDTO() {
    }

    public String getKeyType() {
        return keyType;
    }

    public void setKeyType(String keyType) {
        this.keyType = keyType;
    }

    public String getApiKey() {
        return apiKey;
    }

    public void setApiKey(String apiKey) {
        this.apiKey = apiKey;
    }

    public String getApplicationId() {
        return applicationId;
    }

    public void setApplicationId(String applicationId) {
        this.applicationId = applicationId;
    }

    public String getSubscriber() {
        return subscriber;
    }

    public void setSubscriber(String subscriber) {
        this.subscriber = subscriber;
    }

    public String getApplicationName() {
        return applicationName;
    }

    public void setApplicationName(String applicationName) {
        this.applicationName = applicationName;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getSubscriberTenantDomain() {
        return subscriberTenantDomain;
    }

    public void setSubscriberTenantDomain(String subscriberTenantDomain) {
        this.subscriberTenantDomain = subscriberTenantDomain;
    }

    public String getTier() {
        return tier;
    }

    public void setTier(String tier) {
        this.tier = tier;
    }

    public String getApplicationTier() {
        return applicationTier;
    }

    public void setApplicationTier(String applicationTier) {
        this.applicationTier = applicationTier;
    }

    public String getRequestKey() {
        return requestKey;
    }

    public void setRequestKey(String requestKey) {
        this.requestKey = requestKey;
    }

    public String getApiTier() {
        return apiTier;
    }

    public void setApiTier(String apiTier) {
        this.apiTier = apiTier;
    }

    public String getCallerToken() {
        return callerToken;
    }

    public void setCallerToken(String callerToken) {
        this.callerToken = callerToken;
    }

    public String getSpikeArrestUnit() {
        return spikeArrestUnit;
    }

    public void setSpikeArrestUnit(String spikeArrestUnit) {
        this.spikeArrestUnit = spikeArrestUnit;
    }

    public int getSpikeArrestLimit() {
        return spikeArrestLimit;
    }

    public void setSpikeArrestLimit(int spikeArrestLimit) {
        this.spikeArrestLimit = spikeArrestLimit;
    }

    public boolean isStopOnQuotaReach() {
        return stopOnQuotaReach;
    }

    public void setStopOnQuotaReach(boolean stopOnQuotaReach) {
        this.stopOnQuotaReach = stopOnQuotaReach;
    }

    // TODO: should remove this method once we fetch the cotext from carbon message
    public static AuthenticationContextDTO getInstance() {

        AuthenticationContextDTO authContext = new AuthenticationContextDTO();
        authContext.setKeyType("PRODUCTION");
        authContext.setApiKey("/api/1.0.0");
        authContext.setApplicationId("1");
        authContext.setSubscriber("admin");
        authContext.setApplicationName("defaultApplication");
        authContext.setUsername("admin");
        authContext.setApplicationName("carbon.super");
        authContext.setTier("UNLIMITED");
        authContext.setApplicationTier("UNLIMITED");
        authContext.setApiTier("UNLIMITED");
        authContext.setCallerToken("xxxxxx.Test_token.xxxxxxx");
        authContext.setSpikeArrestUnit("minutes");
        authContext.setSpikeArrestLimit(10);
        authContext.setStopOnQuotaReach(true);
        return authContext;
    }
}


text:
package fuse

const outputHeaderSize = 200

const (
	_FUSE_KERNEL_VERSION   = 7
	_MINIMUM_MINOR_VERSION = 8
	_OUR_MINOR_VERSION     = 8
)


text:
using Google.Apis.Auth.OAuth2;
using Google.Apis.Dfareporting.v3_5;
using Google.Apis.Dfareporting.v3_5.Data;
using Google.Apis.Json;
using Google.Apis.Services;
using Google.Apis.Util.Store;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;

namespace DfaReporting.Samples {
  ///
  /// This example demonstrates how to authenticate and make a basic request using a user account,
  /// via the
  /// installed application flow.
  ///
  class AuthenticateUsingUserAccount : SampleBase {
    ///
    /// The location where authorization credentials will be cached.
    ///
    private static readonly string DataStorePath = Path.Combine(
        Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
        "DfaReporting.Auth.Sample");

    ///
    /// The OAuth 2.0 scopes to request.
    ///
    private static readonly IEnumerable<string> OAuthScopes = new[] {
      DfareportingService.Scope.Dfareporting
    };

    ///
    /// Returns a description about the code example.
    ///
    public override string Description {
      get {
        return "This example demonstrates how to authenticate and make a basic request using a" +
               " user account, via the installed application flow.\n";
      }
    }

    ///
    /// Main method, to run this code example as a standalone application.
    ///
    /// <param name="args">The command line arguments.</param>
    public static void Main(string[] args) {
      SampleBase codeExample = new AuthenticateUsingUserAccount();
      Console.WriteLine(codeExample.Description);
      codeExample.Run(null);
    }

    ///
    /// Run the code example.
    ///
    /// <param name="service">Unused</param>
    public override void Run(DfareportingService service) {
      string pathToJsonFile = _T("ENTER_PATH_TO_JSON_FILE_HERE");

      // Build user account credential.
      UserCredential credential =
          getUserAccountCredential(pathToJsonFile, new FileDataStore(DataStorePath, true));

      // Create a Dfareporting service object.
      //
      // Note: application name should be replaced with a value that identifies your application.
      service = new DfareportingService(
          new BaseClientService.Initializer {
            HttpClientInitializer = credential,
            ApplicationName = "C# installed app sample"
          }
      );

      // Retrieve and print all user profiles for the current authorized user.
      UserProfileList profiles = service.UserProfiles.List().Execute();

      foreach (UserProfile profile in profiles.Items) {
        Console.WriteLine("Found user profile with ID {0} and name \"{1}\".",
            profile.ProfileId, profile.UserName);
      }
    }

    private UserCredential getUserAccountCredential(String pathToJsonFile, IDataStore dataStore) {
      // Load client secrets from the specified JSON file.
      GoogleClientSecrets clientSecrets;
      using(Stream json = new FileStream(pathToJsonFile, FileMode.Open, FileAccess.Read)) {
        clientSecrets = GoogleClientSecrets.Load(json);
      }

      // Create an asynchronous authorization task.
      //
      // Note: providing a data store allows auth credentials to be cached, so they survive multiple
      // runs of the application. This avoids prompting the user for authorization every time the
      // access token expires, by remembering the refresh token. The "user" value is used to
      // identify a specific set of credentials within the data store. You may provide different
      // values here to persist credentials for multiple users to the same data store.
      Task<UserCredential> authorizationTask = GoogleWebAuthorizationBroker.AuthorizeAsync(
          clientSecrets.Secrets,
          OAuthScopes,
          "user",
          CancellationToken.None,
          dataStore);

      // Authorize and persist credentials to the data store.
      UserCredential credential = authorizationTask.Result;

      return credential;
    }
  }
}


text:
namespace CocosSharp
{
    public class CCEaseBackOut : CCActionEase
    {
        #region Constructors

        public CCEaseBackOut (CCFiniteTimeAction action) : base (action)
        {
        }

        #endregion Constructors

        protected internal override CCActionState StartAction(CCNode target)
        {
            return new CCEaseBackOutState (this, target);
        }

        public override CCFiniteTimeAction Reverse ()
        {
            return new CCEaseBackIn ((CCFiniteTimeAction)InnerAction.Reverse ());
        }
    }

    #region Action state

    public class CCEaseBackOutState : CCActionEaseState
    {
        public CCEaseBackOutState (CCEaseBackOut action, CCNode target) : base (action, target)
        {
        }

        public override void Update (float time)
        {
            InnerActionState.Update (CCEaseMath.BackOut (time));
        }
    }

    #endregion Action state
}


text:
(async function(testRunner) {
  let {page, session, dp} = await testRunner.startWithFrameControl(
      'Tests renderer: canvas.');

  await dp.Runtime.enable();
  await dp.HeadlessExperimental.enable();

  let RendererTestHelper =
      await testRunner.loadScript('../helpers/renderer-test-helper.js');
  let {httpInterceptor, frameNavigationHelper, virtualTimeController} =
      await (new RendererTestHelper(testRunner, dp, page)).init();

  httpInterceptor.addResponse(
      `http://example.com/`,
      `<html>
        <body>
          <canvas id="test_canvas" width="100" height="100"
                  style="position:absolute;left:0px;top:0px">
            Oops!  Canvas not supported!
          </canvas>
          <script>
            var context = document.getElementById("test_canvas").
                          getContext("2d");
            context.fillStyle = "rgb(255,0,0)";
            context.fillRect(25, 25, 50, 50);
          </script>
        </body>
      </html>`);

  await virtualTimeController.initialize(1000);
  await frameNavigationHelper.navigate('http://example.com/');
  await virtualTimeController.grantTime(500);
  const ctx = await virtualTimeController.captureScreenshot();
  const rgba = ctx.getImageData(0, 0, 1, 1).data;
  testRunner.log(`rgba @(0,0): ${rgba}`);
  // Expected rgba @(25,25): 255,0,0,255
  const rgba2 = ctx.getImageData(25, 25, 1, 1).data;
  testRunner.log(`rgba @(25,25): ${rgba2}`);
  testRunner.completeTest();
})


text:
import * as tf from '@tensorflow/tfjs-core';
import { NetInput } from './NetInput';
export declare type TMediaElement = HTMLImageElement | HTMLVideoElement | HTMLCanvasElement;
export declare type TResolvedNetInput = TMediaElement | tf.Tensor3D | tf.Tensor4D;
export declare type TNetInputArg = string | TResolvedNetInput;
export declare type TNetInput = TNetInputArg | Array<TNetInputArg> | NetInput | tf.Tensor4D;


text:
package scala.tools.nsc
package ast.parser

/** A descriptor for a matching pair of braces.
 *  @param loff    The offset of the opening brace (-1 means missing)
 *  @param lindent The indentation depth of the line of the opening brace (-1 means missing)
 *  @param roff    The offset of the closing brace (-1 means missing)
 *  @param rindent The indentation depth of the line of the closing brace (-1 means missing)
 *  @param nested The brace pairs nested in this one
 */
case class BracePair(loff: Int, lindent: Int, roff: Int, rindent: Int, nested: List[BracePair])


text:
A lightweight carousel directive built in AngularJS

*This is a work in progress*

#### TODO:
- Finish unit test
- Write documentation
- Add demos


text:
/*                                                                      *\
** Squants                                                              **
**                                                                      **
** Scala Quantities and Units of Measure Library and DSL                **
** (c) 2013-2015, Gary Keorkunian                                       **
**                                                                      **
\*                                                                      */

package squants.electro

import squants._

/**
 * @author  garyKeorkunian
 * @since   0.1
 *
 * @param value value in [[squants.electro.Henry]]
 */
final class Inductance private (val value: Double, val unit: InductanceUnit)
    extends Quantity[Inductance] {

  def dimension = Inductance

  def *(that: ElectricCurrent): MagneticFlux = Webers(this.toHenry * that.toAmperes)
  def /(that: Length): Permeability = HenriesPerMeter(this.toHenry / that.toMeters)

  def toHenry = to(Henry)
  def toMillihenry = to(Millihenry)
  def toMicrohenry = to(Microhenry)
  def toNanohenry = to(Nanohenry)
  def toPicohenry = to(Picohenry)
}

object Inductance extends Dimension[Inductance] {
  private[electro] def apply[A](n: A, unit: InductanceUnit)(implicit num: Numeric[A]) = new Inductance(num.toDouble(n), unit)
  def apply = parse _
  def name = "Inductance"
  def primaryUnit = Henry
  def siUnit = Henry
  def units = Set(Henry, Millihenry, Microhenry, Nanohenry, Picohenry)
}

trait InductanceUnit extends UnitOfMeasure[Inductance] with UnitConverter {
  def apply[A](n: A)(implicit num: Numeric[A]) = Inductance(n, this)
}

object Henry extends InductanceUnit with PrimaryUnit with SiUnit {
  val symbol = "H"
}

object Millihenry extends InductanceUnit with SiUnit {
  val symbol = "mH"
  val conversionFactor = MetricSystem.Milli
}

object Microhenry extends InductanceUnit with SiUnit {
  val symbol = "μH"
  val conversionFactor = MetricSystem.Micro
}

object Nanohenry extends InductanceUnit with SiUnit {
  val symbol = "nH"
  val conversionFactor = MetricSystem.Nano
}

object Picohenry extends InductanceUnit with SiUnit {
  val symbol = "pH"
  val conversionFactor = MetricSystem.Pico
}

object InductanceConversions {
  lazy val henry = Henry(1)
  lazy val millihenry = Millihenry(1)
  lazy val microhenry = Microhenry(1)
  lazy val nanohenry = Nanohenry(1)
  lazy val picohenry = Picohenry(1)

  implicit class InductanceConversions[A](n: A)(implicit num: Numeric[A]) {
    def henry = Henry(n)
    def millihenry = Millihenry(n)
    def microhenry = Microhenry(n)
    def nanohenry = Nanohenry(n)
    def picohenry = Picohenry(n)
  }

  implicit object InductanceNumeric extends AbstractQuantityNumeric[Inductance](Inductance.primaryUnit)
}