text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.codehaus.jettison</groupId>
  <artifactId>jettison</artifactId>
  <version>1.2</version>
  <packaging>bundle</packaging>
  <name>Jettison</name>
  <description>A StAX implementation for JSON.</description>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>stax</groupId>
      <artifactId>stax-api</artifactId>
      <version>1.0.1</version>
    </dependency>
	<dependency>
		<groupId>woodstox</groupId>
		<artifactId>wstx-asl</artifactId>
		<version>3.2.2</version>
		<scope>test</scope>
	</dependency>
  </dependencies>
  <scm>
    <connection>scm:svn:https://svn.codehaus.org/jettison/tags/jettison-1.2</connection>
    <developerConnection>scm:svn:https://svn.codehaus.org/jettison/tags/jettison-1.2</developerConnection>
    <url>https://svn.codehaus.org/jettison/tags/jettison-1.2</url>
  </scm>
  <build>
    <extensions>
      <extension>
	    <groupId>org.apache.maven.wagon</groupId>
	    <artifactId>wagon-webdav</artifactId>
	    <version>1.0-beta-2</version>
      </extension>
    </extensions>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <optimize>true</optimize>
          <debug>true</debug>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <tagBase>https://svn.codehaus.org/jettison/tags/</tagBase>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <version>1.0.0</version>
        <configuration>
         <instructions>
           <Bundle-Name>${artifactId}</Bundle-Name>
           <Bundle-SymbolicName>${groupId}.${artifactId}</Bundle-SymbolicName>
           <Export-Package>org.codehaus.jettison*;version=${project.version}</Export-Package>
           <Import-Package>*</Import-Package>
           <Private-Package>!*</Private-Package>
           <Implementation-Title>${project.name}</Implementation-Title>
           <Implementation-Version>${project.version}</Implementation-Version>
         </instructions>
        </configuration>
      </plugin>

    </plugins>

  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <forkMode>pertest</forkMode>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <distributionManagement>
    <repository>
      <id>codehaus.org</id>
      <name>jettison Central Repository</name>
      <url>dav:https://dav.codehaus.org/repository/jettison/</url>
    </repository>
    <snapshotRepository>
      <id>codehaus.org</id>
      <name>jettison Central Development Repository</name>
      <url>dav:https://dav.codehaus.org/snapshots.repository/jettison/</url>
    </snapshotRepository>
    <site>
      <id>codehaus.org</id>
      <url>dav:https://dav.codehaus.org/jettison/</url>
    </site>
  </distributionManagement>

</project>


text:
'use strict';

const _util_ = require(__dirname + '/utilities');

class Core {
  constructor(node) {
    this.node          = node;
    this.hover         = this.node.querySelector('.seek-bar');
    this.playhead      = this.node.querySelector('.play-bar');
    this.timeline      = this.node.querySelector('.progress-bar');
    this.timelineWidth = this.timeline.offsetWidth - this.playhead.offsetWidth;
    this.scrubber      = false;

    this.playhead.addEventListener('mousedown', this.mouseDown.bind(this));
    this.timeline.addEventListener('mousedown', this.mouseDown.bind(this));
    this.timeline.addEventListener('mouseover', this.handleHover.bind(this));
    window.addEventListener('mouseup', this.mouseUp.bind(this));
  };

  addHover(e) {
    let positionOffset = _util_.handleOffsetParent(this.timeline);
    let newMargLeft    = e.pageX - positionOffset;

    if (newMargLeft >= 0 && newMargLeft <= this.timelineWidth) {
      this.hover.style.width = `${newMargLeft}px`;
    };

    if (newMargLeft < 0) {
      this.hover.style.width = '0px';
    };

    if (newMargLeft > this.timelineWidth) {
      this.hover.style.width = `${this.timelineWidth}px`;
    };
  };

  handleClick(e) {
    let positionOffset = _util_.handleOffsetParent(this.timeline);
    return (e.pageX - positionOffset) / this.timelineWidth;
  };

  handleHover() {
    this.timeline.addEventListener('mousemove', this.addHover.bind(this), false);
    this.timeline.addEventListener('mouseout', this.removeHover.bind(this), false);
  };

  handlePlayhead() {
    let playPercent = this.timelineWidth * (this.audio.currentTime / this.duration);
    this.playhead.style.paddingLeft = `${playPercent}px`;
  };

  mouseDown() {
    this.scrubber = true;
    this.audio.removeEventListener('timeupdate', this.handlePlayhead.bind(this), false);
  };

  mouseUp(e) {
    if (this.scrubber === false) {
      return;
    };

    this.movePlayhead(e);
    window.removeEventListener('mousemove', this.movePlayhead.bind(this), true);
    this.audio.currentTime = this.duration * this.handleClick(e);
    this.audio.addEventListener('timeupdate', this.handlePlayhead.bind(this), false);
    this.scrubber = false;
  };

  movePlayhead(e) {
    let positionOffset = _util_.handleOffsetParent(this.timeline);
    let newMargLeft = e.pageX - positionOffset;

    if (newMargLeft >= 0 && newMargLeft <= this.timelineWidth) {
      this.playhead.style.paddingLeft = `${newMargLeft}px`;
    };

    if (newMargLeft < 0) {
      this.playhead.style.paddingLeft = '0px';
    };

    if (newMargLeft > this.timelineWidth) {
      this.playhead.style.paddingLeft = `${this.timelineWidth}px`;
    };
  };

  removeHover() {
    this.hover.style.width = '0px';
  };
};

module.exports = Core;

redpajama_set_name: RedPajamaGithub


text:
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
    <meta charset="UTF-8">
    <title></title>

Bootstrap

Component practise

                Basic panel example
                this is a new website

Panel heading without title

                            Panel content

Panel title

                            Panel content

                                Panel content of this new website

Panel footer

this is a new website

New panel

New idea

New content

New practise

blue colour content

                            Panel content

Panel heading

                                        ...
                                        ...
                                        ...

                                //list group//
//basic exmple//

Cras justo odio

Dapibus ac facilisis in

Morbi leo risus

Porta ac consectetur ac

Vestibulum at eros


text:
CREATE PROCEDURE [employer_financial].[GetPreviousTransactionsCount]
	@AccountId BIGINT,
	@fromDate datetime
AS
select COUNT(*) FROM [employer_financial].[TransactionLine]
  WHERE AccountId = @AccountId AND DateCreated < @fromDate


text:
<html>
<body>

Inserts new call for the class.
</body>
</html>


text:
В рамках этого домашнего задания вам нужно реализовать авторизацию пользователя:

В файле `users.json` находиться массив с объектами. Каждый объект представляет из себя данные вымышленного пользователя.

На главной странице у есть форма которую нужно застилизировать под этот макет:
![image](https://cloud.githubusercontent.com/assets/25591824/24581984/97046ac6-172e-11e7-8268-d57d5ee1a377.png)

Когда пользователь введет логин и пароль которые можно будет найти в файле `users.json` он должен увидеть сообщение об успешной авторизации:
![image](https://cloud.githubusercontent.com/assets/25591824/24581997/c0ad8f6a-172e-11e7-9f84-cafceefc75b9.png)

В другом случае он должен увидеть сообщение об ошибке:
![image](https://cloud.githubusercontent.com/assets/25591824/24581999/d9dfe7a8-172e-11e7-8762-fbcdc8e7400e.png)

### Алгоритм поиска логина и пароля
Ваша задача сводиться к следующему:
 - пользователь вводит логин и пароль
 - кликает на кнопку "Sign In"
 - пароль и логин отправляються на сервер

На сервере вы проходитесь по массиву пользователей что находятся в файле `users.json` и _строго_ сравниваете логин и пароль каждого объекта с теми данными что пришли вам в запросе. После этого вам нужно отправить ответ на клиент - сообщить о результате авторизации, а именно - была ли она успешной. На клиенте вы получаете ответ на сервера и основываясь на этом ответе - показываете плашку с сообщением об успешной либо неуспешной авторизацией.

Для выполнения этого домашнего задания обязательно перейдите по ссылке: https://classroom.github.com/assignment-invitations/fb5f1f5397ba27a500d061c351824926


text:
output = Fle.open("output.txt", "w")
IO.readlines("input.txt").each do |line|
  output.puts( line.split.map { |x| x.to_i }.reduce(:+) )
end


text:
This folder is a container for all pages.

Each module at the root level is the page of the app and needs to be included in a dedicated folder with the same name
that will host:

```
modules/
  [module]/
    [module].controller.js
    [module].controller.spec.js
    [module].module.js
    [module].view.html
```


text:
require 'unit_spec_helper'

describe Shoulda::Matchers::ActiveModel::AllowMassAssignmentOfMatcher, type: :model do
  context '#description' do
    context 'without a role' do
      it 'includes the attribute name' do
        expect(described_class.new(:attr).description).
          to eq 'allow mass assignment of attr'
      end
    end

    if active_model_3_1?
      context 'with a role' do
        it 'includes the attribute name and the role' do
          expect(described_class.new(:attr).as(:admin).description).
            to eq 'allow mass assignment of attr as admin'
        end
      end
    end
  end

  context 'an attribute that is blacklisted from mass-assignment' do
    it 'rejects being mass-assignable' do
      model = define_model(:example, blacklisted: :string) do
        attr_protected :blacklisted
      end.new

      expect(model).not_to allow_mass_assignment_of(:blacklisted)
    end
  end

  context 'an attribute that is not whitelisted for mass-assignment' do
    it 'rejects being mass-assignable' do
      model = define_model(:example, not_whitelisted: :string,
        whitelisted: :string) do
        attr_accessible :whitelisted
      end.new

      expect(model).not_to allow_mass_assignment_of(:not_whitelisted)
    end
  end

  context 'an attribute that is whitelisted for mass-assignment' do
    it 'accepts being mass-assignable' do
      expect(define_model(:example, whitelisted: :string) do
        attr_accessible :whitelisted
      end.new).to allow_mass_assignment_of(:whitelisted)
    end
  end

  context 'an attribute not included in the mass-assignment blacklist' do
    it 'accepts being mass-assignable' do
      model = define_model(:example, not_blacklisted: :string,
        blacklisted: :string) do
        attr_protected :blacklisted
      end.new

      expect(model).to allow_mass_assignment_of(:not_blacklisted)
    end
  end

  unless active_model_3_2? || active_model_4_0?
    context 'an attribute on a class with no protected attributes' do
      it 'accepts being mass-assignable' do
        expect(no_protected_attributes).to allow_mass_assignment_of(:attr)
      end

      it 'assigns a negative failure message' do
        matcher = allow_mass_assignment_of(:attr)

        expect(matcher.matches?(no_protected_attributes)).to eq true

        expect(matcher.failure_message_when_negated).not_to be_nil
      end
    end

    def no_protected_attributes
      define_model(:example, attr: :string).new
    end
  end

  context 'an attribute on a class with all protected attributes' do
    it 'rejects being mass-assignable' do
      expect(all_protected_attributes).not_to allow_mass_assignment_of(:attr)
    end

    def all_protected_attributes
      define_model(:example, attr: :string) do
        attr_accessible nil
      end.new
    end
  end

  if active_model_3_1?
    context 'an attribute included in the mass-assignment whitelist for admin role only' do
      it 'rejects being mass-assignable' do
        expect(mass_assignable_as_admin).not_to allow_mass_assignment_of(:attr)
      end

      it 'accepts being mass-assignable for admin' do
        expect(mass_assignable_as_admin).to allow_mass_assignment_of(:attr).as(:admin)
      end

      def mass_assignable_as_admin
        define_model(:example, attr: :string) do
          attr_accessible :attr, as: :admin
        end.new
      end
    end
  end
end


text:
import { FormGroup } from '@angular/forms';
import { Subject, Subscription } from 'rxjs';
import {
  HttpClient,
  HttpErrorResponse,
  HttpEventType,
  HttpHeaders,
  HttpParams,
  HttpRequest,
  HttpResponse
} from '@angular/common/http';
import { Injectable } from '@angular/core';

import { FileItem } from './fileItem.model';
import { NgxUploadLogger } from '../utils/logger.model';
import { DropTargetOptions, InputFileOptions, UploadEndPoint } from '../utils/configuration.model';

// send an event for each upload event. These events can be catched by the user for call a callback

@Injectable({
  providedIn: 'root'
})
export class HttpClientUploadService {

  queue: FileItem[];
  progressTotal = 0;
  withCredentials: boolean;

  sub: Subscription;

  /**
   * Internal map of lowercase header names to values.
   */
  protected headers: Map<string, string[]>;

  public onCancel$ = new Subject<FileItem>();
  public onError$ = new Subject<{ item: FileItem, body: any, status: number, headers: any }>();
  public onDropError$ = new Subject<{ item?: File, errorAccept: boolean, errorMultiple: boolean }>();
  public onSuccess$ = new Subject<{ item: FileItem, body: any, status: number, headers: any }>(); // TODO headers isn't `any` but `Array`
  public onBeforeUploadItem$ = new Subject<FileItem>();
  public onProgress$ = new Subject<{ item: FileItem, progress: number }>();
  public onAddToQueue$ = new Subject<FileItem>();

  constructor(protected logger: NgxUploadLogger, private httpClient: HttpClient) {
    this.queue = new Array<FileItem>();
    this.headers = new Map();
  }

  /**
   * Adds files to the queue
   */
  addToQueue(files: FileList, formGroup: FormGroup | null, options: DropTargetOptions | InputFileOptions) {

    this.logger.info('add to queue');

    if (options && !options.multiple) {
      if (files.length > 1) {
        this.logger.error('there is more than one file.');
        this.onDropError$.next({errorAccept: false, errorMultiple: true});
        return;
      }
    }

    for (let i = 0; i < files.length; i++) {
      const file = files.item(i)!;
      this.logger.debug(files.item(i));

      if (options && options.accept) {
        const accepted = options.accept.some((type: string) => {
          if (type.indexOf('/*') > -1) {
            return type.split('/')[0] === file.type.split('/')[0]
          } else {
            return (type === '*' || type === file.type)
          }
        });
        if (!accepted) {
          this.logger.error('this file is not accepted because of its type', file);
          this.onDropError$.next({item: file, errorAccept: true, errorMultiple: false});
          continue
        }
      }

      let fileItem;
      if (options && options.disableMultipart) {
        fileItem = new FileItem(file, this, this.logger, true);
      } else {
        fileItem = new FileItem(file, this, this.logger, false);
        if (formGroup) {
          Object.keys(formGroup.controls).forEach((key) => {
            fileItem.formData.append(key, formGroup.get(key) !.value);
          });
        }
      }
      this.queue.push(fileItem);
      this.onAddToQueue$.next(fileItem);
    }
  }

  uploadFileItem(fileItem: FileItem, endpoint: UploadEndPoint, options: {
    headers?: HttpHeaders;
    reportProgress?: boolean;
    params?: HttpParams;
    responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
    withCredentials?: boolean;
  } = {}): void {
    this.logger.info('enter uploadService.uploadFileItem()');

    const method = endpoint.method as string;
    const url = endpoint.url as string;

    const index = this.queue.indexOf(fileItem);
    const item = this.queue[index];

    this.onBeforeUploadItem(item);

    if (item.isCancel) {
      return
    }

    item.uploadInProgress = true;

    let sendable;

    if (!fileItem.disableMultipart) {
      sendable = item.formData;
      sendable.append(item.alias, item.file, item.file.name);
    } else {
      sendable = item.file;
    }

    const req = new HttpRequest(method, url, sendable, Object.assign(options, {reportProgress: true}));

    fileItem.sub = this.httpClient.request(req).subscribe(
      (event) => {
        if (event.type === HttpEventType.UploadProgress) {
          // This is an upload progress event. Compute and show the % done:
          const percentDone = Math.round(event.loaded * 100 / (event.total ? event.total : event.loaded));
          this.logger.debug(`File is ${percentDone}% uploaded.`);
          fileItem.ɵonProgress(percentDone);
          this.onProgressItem(item, percentDone);

        } else if (event instanceof HttpResponse) {
          // A successful response is delivered on the event stream.
          fileItem.ɵonSuccess();
          this.onSuccess(item, event.body, event.status, event.headers);
        }
      },
      (err) => {
        if (err instanceof HttpErrorResponse) {
          if (url === 'ngx_upload_mock') {
            item.ɵonSuccess();
            this.onSuccess(item, err.message, err.status, err.headers);
          } else if (err.error instanceof Error) {
            // A client-side or network error occurred. Handle it accordingly.
            item.ɵonError();
            this.onError(item, err.error.message, err.status, err.headers);
          } else {
            // The backend returned an unsuccessful response code.
            // The response body may contain clues as to what went wrong,
            item.ɵonError();
            this.onError(item, err.error, err.status, err.headers);
          }
        }
      }
    );
  }

  cancelFileItem(fileItem: FileItem) {
    this.progressTotal = this.computeTotalProgress();
    this.onCancel$.next(fileItem)
  }

  /**
   * Uploads all not uploaded items of queue
   */
  uploadAll(endpoint: UploadEndPoint, options?: any) {
    const items = this.queue.filter(item => (item.isReady));
    if (!items.length) {
      return;
    }

    for (const item of items) {
      item.upload(endpoint, options);
    }
  }

  /**
   * Uploads all not uploaded items of queue
   */
  cancelAll() {
    const items: FileItem[] = this.queue.filter(item => (item.uploadInProgress));
    if (!items.length) {
      return;
    }

    for (const item of items) {
      item.cancel();
    }
    this.progressTotal = this.computeTotalProgress();
  }

  /**
   * Uploads all not uploaded items of queue
   */
  removeAllFromQueue() {
    const items: FileItem[] = this.queue.filter(item => (!item.uploadInProgress && !item.isSuccess));
    if (!items.length) {
      return;
    }

    for (const item of items) {
      this.removeFromQueue(item);
    }
  }

  removeFromQueue(fileItem: FileItem) {
    const index = this.queue.indexOf(fileItem);
    const item = this.queue[index];
    if (item.uploadInProgress) {
      item.cancel();
    }
    this.queue.splice(index, 1);
    this.progressTotal = this.computeTotalProgress();
  }

  /**
   * Returns the total progress
   * @param {Number} [value]
   * @returns {Number}
   * @private
   */
  computeTotalProgress(): number {
    let totalCurrent = 0;
    let total = 0;
    for (const item of this.queue) {
      if (item.uploadInProgress || item.isSuccess) {
        totalCurrent += (item.file.size / 100) * item.progress || 0;
        total += item.file.size;
        this.logger.debug(totalCurrent + ' / ' + total);
      }
    }
    return Math.round((totalCurrent * 100) / total);
  }

  /**
   * Prepares file status before upload
   * @param item
   */
  protected onBeforeUploadItem(item: FileItem) {
    this.logger.info('enter uploadService.ɵonBeforeUploadItem()');
    item.ɵonBeforeUploadItem();
    this.onBeforeUploadItem$.next(item);
  }

  /**
   * Update status during upload progress
   * @param item
   * @param progress
   */
  protected onProgressItem(item: FileItem, progress: number): void {
    this.logger.info(`call onProgressItem ${item} ${progress}`);
    this.progressTotal = this.computeTotalProgress();
    item.ɵonProgress(progress);
    this.onProgress$.next({item, progress});
  }

  /**
   * Callback called when an upload error occurs
   * @param item
   * @param xhr
   */
  protected onError(item: FileItem, body: any, status: number, headers: any) {
    this.logger.info(`call onError ${item} ${body} ${status} ${headers}`);
    item.ɵonError();
    this.onError$.next({item, body, status, headers});
  }

  /**
   * Callback called when an upload success occurs
   * @param item
   * @param xhr
   */
  protected onSuccess(item: FileItem, body: any, status: number, headers: any) { // TODO headers is not any
    this.logger.info(`call onSuccess ${item} ${body} ${status} ${headers}`);
    this.progressTotal = this.computeTotalProgress();
    item.ɵonSuccess();
    this.onSuccess$.next({item, body, status, headers});
  }

}


text:
![ANSiTURE](https://i.imgur.com/VQfHPIp.jpg)

- adventure platformer
- text based (DOS ANSi) characters
- 16 colours
- made in Godot Engine

## MEDIA
![ANSiTURE](https://i.imgur.com/lGnpg1k.jpg)

Watch video of PoC: [https://youtu.be/7N5zwwNaoDM](https://youtu.be/7N5zwwNaoDM)

## NEW MOCKUP (PabloDraw)
![ANSiTURE](https://i.imgur.com/rnPOSYa.png)


text:
package liquibase.executor.jvm;

import java.sql.PreparedStatement;
import java.sql.SQLException;

/**
 * General callback interface used by the {@link liquibase.executor.Executor} class.
 *

 *
This interface sets values on a {@link java.sql.PreparedStatement} provided
 * by the JdbcTemplate class, for each of a number of updates in a batch using the
 * same SQL. Implementations are responsible for setting any necessary parameters.
 * SQL with placeholders will already have been supplied.
 *

 *
Implementations do not need to concern themselves with
 * SQLExceptions that may be thrown from operations they attempt.
 * The JdbcTemplate class will catch and handle SQLExceptions appropriately.
 *
 * @author Spring Framework
 */
interface PreparedStatementSetter {

    /**
     * Set parameter values on the given PreparedStatement.
     *
     * @param ps the PreparedStatement to invoke setter methods on
     * @throws java.sql.SQLException if a SQLException is encountered
     *                               (i.e. there is no need to catch SQLException)
     */
    void setValues(PreparedStatement ps) throws SQLException;

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace Archivist
{

    /// <summary>
    /// Class that represents keyboard shortcut
    /// </summary>
    public class KeyboardShortcut
    {

        #region Public Properties

        /// <summary>
        /// Shotcut Key
        /// </summary>
        public Key Key { get; set; }

        /// <summary>
        /// Indicates if Alt key is pressed
        /// </summary>
        public bool Alt { get; set; }

        /// <summary>
        /// Indicates if Ctrl key is pressed
        /// </summary>
        public bool Ctrl { get; set; }

        /// <summary>
        /// Indicates if Shift key is pressed
        /// </summary>
        public bool Shift { get; set; }

        #endregion

        #region Events

        /// <summary>
        /// Event that is fired when shortcut criteria are meet
        /// </summary>
        public event EventHandler OnShortcutActivated;

        #endregion

        #region Constructor

        /// <summary>
        /// Default Constructor
        /// </summary>
        public KeyboardShortcut()
        {
            Clear();
        }

        /// <summary>
        /// Copy Constructor
        /// </summary>
        public KeyboardShortcut(KeyboardShortcut source)
        {
            this.Key = source.Key;
            this.Alt = source.Alt;
            this.Ctrl = source.Ctrl;
            this.Shift = source.Shift;
            this.OnShortcutActivated = source.OnShortcutActivated;
        }

        #endregion

        #region Public Methods

        /// <summary>
        /// Fires shortcut methods that are connected to <see cref="OnShortcutActivated"/>.
        /// </summary>
        public void Execute()
        {
            if (OnShortcutActivated != null)
            {
                OnShortcutActivated(this, new EventArgs());
            }
        }

        /// <summary>
        /// Sets shortcut values to default
        /// </summary>
        public void Clear()
        {
            this.Key = Key.None;
            this.Alt = false;
            this.Ctrl = false;
            this.Shift = false;
        }

        #endregion

        #region Override

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            if (Ctrl)
                sb.Append("Ctrl + ");
            if (Alt)
                sb.Append("Alt + ");
            if (Shift)
                sb.Append("Shift + ");

            return $"{sb.ToString()}{Key.ToString()}";
        }

        #endregion

    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/transparent"
    android:elevation="3dp"
    android:gravity="center"
    android:orientation="vertical"
    android:visibility="gone">

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="48dp"
        android:contentDescription="@null"
        android:src="@drawable/dr_phases"
        android:tint="@color/empty_view_text_color"/>

    <Space
        android:layout_width="wrap_content"
        android:layout_height="16dp"/>

    <liam.franco.selene.ui.FontTextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/empty_view_text"
        android:textColor="@color/empty_view_text_color"
        android:textSize="16sp"
        app:font="BreeSerif-Regular"/>
</LinearLayout>


text:
using System;
using System.Collections.Generic;
using System.Net.NetworkInformation;
using System.Timers;

namespace YUI.WPF.YUtil
{
    /// <summary>
    /// 网络监控类
    /// </summary>
    public static class YNetworkMonitor
    {
        /// <summary>
        /// 上传速度改变事件
        /// </summary>
        public static event Action<long> SendSpeedChanged;

        /// <summary>
        /// 上传速度改变事件
        /// </summary>
        public static event Action<long> ReceivedSpeedChanged;

        /// <summary>
        /// 网络接口
        /// </summary>
        public static NetworkInterface[] NetworkInterfaces => NetworkInterface.GetAllNetworkInterfaces();

        private static IEnumerable<NetworkInterface> monitorInterfaces;

        /// <summary>
        /// 上传速度
        /// </summary>
        public static long SentSpeed { get; set; }

        /// <summary>
        /// 下载速度
        /// </summary>
        public static long ReceivedSpeed { get; set; }

        /// <summary>
        /// 上传总量
        /// </summary>
        public static long TotalSend { get; set; }

        /// <summary>
        /// 下载总量
        /// </summary>
        public static long TotalReceived { get; set; }

        private static long lastTotalSend;
        private static long lastTotalReceived;

        private static bool IsMonitorAll { get; set; }

        private static Timer timer;

        private static bool IsMonitoring;

        /// <summary>
        /// 开始监控
        /// </summary>
        /// <param name="interfaces">监控的网络接口(为null时监控所有网络接口)</param>
        public static void StartMonitor(IEnumerable<NetworkInterface> interfaces = null)
        {
            if (IsMonitoring)
                StopMonitor();

            monitorInterfaces = interfaces ?? NetworkInterfaces;

            IsMonitorAll = interfaces == null;

            lastTotalSend = 0;
            lastTotalReceived = 0;
            SentSpeed = 0;
            ReceivedSpeed = 0;
            foreach (var networkInterface in monitorInterfaces)
            {
                lastTotalSend += networkInterface.GetIPv4Statistics().BytesSent / 1024;
                lastTotalReceived += networkInterface.GetIPv4Statistics().BytesReceived / 1024;
            }
            TotalSend = lastTotalSend;
            TotalReceived = lastTotalReceived;

            timer = new Timer(1000);
            timer.Elapsed += (sender, args) =>
            {
                if (IsMonitorAll)
                    monitorInterfaces = NetworkInterfaces;

                if (monitorInterfaces == null)
                    return;

                long tempSent = 0;
                long tempReceived = 0;
                foreach (var networkInterface in monitorInterfaces)
                {
                    tempSent += networkInterface.GetIPStatistics().BytesSent / 1024;
                    tempReceived += networkInterface.GetIPStatistics().BytesReceived / 1024;
                }

                lastTotalSend = TotalSend;
                lastTotalReceived = TotalReceived;

                TotalSend = tempSent;
                TotalReceived = tempReceived;

                SentSpeed = TotalSend - lastTotalSend;
                ReceivedSpeed = TotalReceived - lastTotalReceived;

                SendSpeedChanged?.Invoke(SentSpeed);
                ReceivedSpeedChanged?.Invoke(ReceivedSpeed);
            };
            timer.Start();
            IsMonitoring = true;
        }

        /// <summary>
        /// 停止监控
        /// </summary>
        public static void StopMonitor()
        {
            timer.Stop();
            IsMonitoring = false;
        }
    }
}


text:
namespace lasso {

struct ProxGradConfig {
  int worker_rank = -1;
  int feature_start = 0;
  int feature_end = 0;
  int num_samples = 0;
  int num_reps = 1;
};

class ProxGrad {
public:
  ProxGrad(const ProxGradConfig& config);

  void ProxStep(
      const std::vector<petuum::ml::SparseFeature<float>*>& X_cols,
      const petuum::ml::DenseFeature<float>& y,
      float lr, int my_clock);

  float EvalSqLoss(
      const petuum::ml::DenseFeature<float>& y);

  float EvalL1Penalty() const;

  // Cound # of non-zeros in beta (sharded to workers).
  int EvalBetaNNZ() const;

  int GetSampleSize() const {
    return num_feature_samples_;
  }

private:
  void SoftThreshold(float threshold,
      petuum::ml::DenseFeature<float>* x);

private:
  int worker_rank_;
  int num_workers_;
  int num_samples_;
  int feature_start_;
  int feature_end_;
  int num_features_;    // # features in this worker.
  // stochastic version uses only this many coordinates in each step
  int num_feature_samples_;
  int num_reps_;
  petuum::ml::DenseFeature<float> beta_;    // [num_features_ x 1]
  petuum::ml::DenseFeature<float> r_;       // [num_samples_ x 1]
  //petuum::ml::DenseFeature<float> delta_;   // [num_features_ x 1]
  petuum::Table<float> w_table_;
  petuum::Table<float> unused_table_;
  petuum::Table<int64_t> staleness_table_;
  std::random_device r;
  std::seed_seq seed2{r(), r(), r(), r(), r(), r(), r(), r()};
  std::mt19937 rand_eng{seed2};
  std::uniform_real_distribution<float> uniform_dist{0, 1};
};

}  // namespace lasso


text:
using System.Collections.Generic;
using ReMi.Common.Utils;
using ReMi.Contracts.Plugins.Data;

namespace ReMi.Plugin.Go
{
    public class PluginConfigurationEntity : IPluginConfigurationEntity
    {
        [PluginConfiguration("GO User Name", PluginConfigurationType.String)]
        public string GoUser { get; set; }
        [PluginConfiguration("GO Password", PluginConfigurationType.Password)]
        public string GoPassword { get; set; }
        [PluginConfiguration("GO Servers", PluginConfigurationType.NameValueCollection)]
        public IEnumerable<NameValuePair> GoServers { get; set; }

        public override string ToString()
        {
            return string.Format("[GoUser={0}, GoServers={1}]",
                GoUser, GoServers.FormatElements());
        }
    }
}


text:
@implementation CHDiscoverCell
+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *reuseID = @"CELL";
    CHDiscoverCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseID];
    if (cell == nil) {
        cell = [[CHDiscoverCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseID];
    }
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;

    return cell;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end


text:
package io.d0048.restarter;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

public final class Restarter extends JavaPlugin implements Listener{
	public boolean enable=false;
	public int time = 0;

	@Override
    public void onEnable() {
        //config = getConfig();
        //if(config==null) System.out.print("NPE");

		//getServer().getPluginManager().registerEvents(this, this);

        this.getConfig().set("Enable", this.getConfig().getBoolean("Enable"));
        this.enable=this.getConfig().getBoolean("Enable");
        this.getConfig().set("Time", this.getConfig().getBoolean("Time"));
        this.time=this.getConfig().getInt("Time");

        this.saveDefaultConfig();
        saveConfig();

        if(enable){
        	new BukkitRunnable(){
        		int timeLeft=time;
    			@Override
    			public void run() {
    				timeLeft=timeLeft-2;
    				if(timeLeft<=300 && timeLeft>=299){
    					Bukkit.broadcastMessage(ChatColor.RED+"服务器将在"+timeLeft+"秒后重启!请做好准备。。。");
    				}
    				if(timeLeft<=60 && timeLeft>=59){
    					Bukkit.broadcastMessage(ChatColor.RED+"服务器将在"+timeLeft+"秒后重启!请做好准备。。。");
    				}
    				if(timeLeft<=30){
    					Bukkit.broadcastMessage(ChatColor.RED+"服务器将在"+timeLeft+"秒后重启!请做好准备。。。");
    				}
    				if(timeLeft<=0){
    					cancel();
    				}
    				//System.out.print("check"+timeLeft);
    			}
        	}.runTaskTimer(Bukkit.getPluginManager().getPlugin("AutoRestart"), 0L, 40L);
    	}

    	//this.saveConfig();
		getLogger().info("[AutoRestart]Successfully loaded!");

    }

    @Override
    public void onDisable(){
		getLogger().info("[Anti-Troll]Reloading!");
    }

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    	//refresh指令使用
    	if(cmd.getName().equalsIgnoreCase("refresh")){
    		this.reloadConfig();
    		sender.sendMessage(ChatColor.GREEN+"[Anti-Troll]Reloading!");
    	}
		return false;
    }

}


text:
package com.miaoweather.android.gson;

import com.google.gson.annotations.SerializedName;

/**
 * Created by Joey on 2017/6/27 12:19.
 */

public class Basic {

    @SerializedName("city")
    public String cityName;

    @SerializedName("id")
    public String weatherId;

    public Update update;

    public class Update {

        @SerializedName("loc")
        public String updateTime;

    }
}


text:
import PluginViewBase = require('./plugin-view-base');

class PluginView extends PluginViewBase {

  constructor(state) {
    super(state);
    atom.workspaceView.command("ts-package-example:toggle", () => this.toggle());
  }

  public static content() {
    return this.div({class: "atom-ts-package-example overlay from-top"}, () =>
    this.div("Yo!"));
  }

  public toggle() {
    console.log("PluginView was toggled!");

    if (this.jQuery.hasParent()) {
      this.jQuery.detach();
    } else {
      atom.workspaceView.appendToTop(this);
    }
  }
}

export = PluginView;


text:
package fm.jiecao.jcvideoplayer_lib;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.ActivityInfo;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.Toast;

import java.lang.ref.WeakReference;
import java.util.Timer;
import java.util.TimerTask;

import fm.jiecao.jcvideoplayer_lib.listener.JCControlViewListener;
import fm.jiecao.jcvideoplayer_lib.listener.JCMediaPlayerListener;
import fm.jiecao.jcvideoplayer_lib.manager.JCVideoPlayerManager;

/**
 * Created by Nathen
 * On 2016/04/18 16:15
 */
public class JCVideoPlayerStandard extends JCVideoPlayer {

    protected static Timer DISMISS_CONTROL_VIEW_TIMER;

    public ImageView backButton;
    public ProgressBar bottomProgressBar, loadingProgressBar;
    public TextView titleTextView;
    public ImageView thumbImageView;
    public ImageView coverImageView;
    public ImageView tinyBackImageView;

    protected JCControlViewListener mJCControlViewListener;
    protected DismissControlViewTimerTask mDismissControlViewTimerTask;

    public JCVideoPlayerStandard(Context context) {
        super(context);
    }

    public JCVideoPlayerStandard(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void init(Context context) {
        super.init(context);
        bottomProgressBar = (ProgressBar) findViewById(R.id.bottom_progressbar);
        titleTextView = (TextView) findViewById(R.id.title);
        backButton = (ImageView) findViewById(R.id.back);
        thumbImageView = (ImageView) findViewById(R.id.thumb);
        coverImageView = (ImageView) findViewById(R.id.cover);
        loadingProgressBar = (ProgressBar) findViewById(R.id.loading);
        tinyBackImageView = (ImageView) findViewById(R.id.back_tiny);

        thumbImageView.setOnClickListener(this);
        backButton.setOnClickListener(this);
        tinyBackImageView.setOnClickListener(this);
    }

    @Override
    public boolean setUp(String url, int screen, Object... objects) {
        if (objects.length == 0) return false;
        if (super.setUp(url, screen, objects)) {
            titleTextView.setText(objects[0].toString());
            if (currentScreen == SCREEN_WINDOW_FULLSCREEN) {
                fullscreenButton.setImageResource(R.drawable.jc_shrink);
                backButton.setVisibility(View.VISIBLE);
                tinyBackImageView.setVisibility(View.INVISIBLE);
            } else if (currentScreen == SCREEN_LAYOUT_NORMAL
                    || currentScreen == SCREEN_LAYOUT_LIST) {
                fullscreenButton.setImageResource(R.drawable.jc_enlarge);
                backButton.setVisibility(View.GONE);
                tinyBackImageView.setVisibility(View.INVISIBLE);
            } else if (currentScreen == SCREEN_WINDOW_TINY) {
                backButton.setVisibility(View.INVISIBLE);
                titleTextView.setVisibility(View.INVISIBLE);
                tinyBackImageView.setVisibility(View.VISIBLE);
                setAllControlsVisible(View.INVISIBLE, View.INVISIBLE, View.INVISIBLE,
                        View.INVISIBLE, View.INVISIBLE, View.INVISIBLE, View.INVISIBLE);
            }
            return true;
        }
        return false;
    }

    @Override
    public int getLayoutId() {
        return R.layout.jc_layout_standard;
    }

    @Override
    public void setUiWithStateAndScreen(int state) {
        super.setUiWithStateAndScreen(state);
        switch (currentState) {
            case CURRENT_STATE_NORMAL:
                changeUiToNormal();
                break;
            case CURRENT_STATE_PREPARING:
                changeUiToPreparingShow();
                startDismissControlViewTimer();
                break;
            case CURRENT_STATE_PLAYING:
                changeUiToPlayingShow();
                startDismissControlViewTimer();
                break;
            case CURRENT_STATE_PAUSE:
                changeUiToPauseShow();
                cancelDismissControlViewTimer();
                break;
            case CURRENT_STATE_ERROR:
                changeUiToError();
                break;
            case CURRENT_STATE_AUTO_COMPLETE:
                changeUiToCompleteShow();
                cancelDismissControlViewTimer();
                bottomProgressBar.setProgress(100);
                break;
            case CURRENT_STATE_PLAYING_BUFFERING_START:
                changeUiToPlayingBufferingShow();
                break;
        }
    }

    @Override
    public boolean onTouch(View v, MotionEvent event) {
        int id = v.getId();
        if (id == R.id.surface_container) {
            switch (event.getAction()) {
                case MotionEvent.ACTION_DOWN:
                    break;
                case MotionEvent.ACTION_MOVE:
                    break;
                case MotionEvent.ACTION_UP:
                    startDismissControlViewTimer();
                    if (mChangePosition) {
                        int duration = getDuration();
                        int progress = mSeekTimePosition * 100 / (duration == 0 ? 1 : duration);
                        bottomProgressBar.setProgress(progress);
                    }
                    if (!mChangePosition && !mChangeVolume) {
                        onEvent(JCUserActionStandard.ON_CLICK_BLANK);
                        onClickUiToggle();
                    }
                    break;
            }
        } else if (id == R.id.progress) {
            switch (event.getAction()) {
                case MotionEvent.ACTION_DOWN:
                    cancelDismissControlViewTimer();
                    break;
                case MotionEvent.ACTION_UP:
                    startDismissControlViewTimer();
                    break;
            }
        }
        return super.onTouch(v, event);
    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        int i = v.getId();
        if (i == R.id.thumb) {
            if (TextUtils.isEmpty(url)) {
                Toast.makeText(getContext(), getResources().getString(R.string.no_url), Toast.LENGTH_SHORT).show();
                return;
            }
            if (currentState == CURRENT_STATE_NORMAL) {
                if (!url.startsWith("file") && !JCUtils.isWifiConnected(getContext()) && !WIFI_TIP_DIALOG_SHOWED) {
                    showWifiDialog();
                    return;
                }
                startPlayLogic();
            } else if (currentState == CURRENT_STATE_AUTO_COMPLETE) {
                onClickUiToggle();
            }
        } else if (i == R.id.surface_container) {
            startDismissControlViewTimer();
        } else if (i == R.id.back) {
            if (!backPress()) {
                this.release();
            }
        } else if (i == R.id.back_tiny) {
            JCMediaPlayerListener listener = JCVideoPlayerManager.getScrollListener();
            if (listener != null && !isCurrentPlayingUrl(listener.getUrl())) {
                releaseAllVideos();
                return;
            }
            backPress();
        }
    }

    @Override
    public void showWifiDialog() {
        super.showWifiDialog();
        AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
        builder.setMessage(getResources().getString(R.string.tips_not_wifi));
        builder.setPositiveButton(getResources().getString(R.string.tips_not_wifi_confirm), new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
                startPlayLogic();
                WIFI_TIP_DIALOG_SHOWED = true;
            }
        });
        builder.setNegativeButton(getResources().getString(R.string.tips_not_wifi_cancel), new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });
        builder.create().show();
    }

    @Override
    public void onStartTrackingTouch(SeekBar seekBar) {
        super.onStartTrackingTouch(seekBar);
        cancelDismissControlViewTimer();
    }

    @Override
    public void onStopTrackingTouch(SeekBar seekBar) {
        super.onStopTrackingTouch(seekBar);
        startDismissControlViewTimer();
    }

    public void startPlayLogic() {
        prepareVideo();
        onEvent(JCUserActionStandard.ON_CLICK_START_THUMB);
    }

    public void onClickUiToggle() {
        boolean isShowing = bottomContainer.getVisibility() == View.VISIBLE;

        onControlViewToggle(!isShowing);

        if (currentState == CURRENT_STATE_PREPARING) {
            if (isShowing) {
                changeUiToPreparingClear();
            } else {
                changeUiToPreparingShow();
            }
        } else if (currentState == CURRENT_STATE_PLAYING) {
            if (isShowing) {
                changeUiToPlayingClear();
            } else {
                changeUiToPlayingShow();
            }
        } else if (currentState == CURRENT_STATE_PAUSE) {
            if (isShowing) {
                changeUiToPauseClear();
            } else {
                changeUiToPauseShow();
            }
        } else if (currentState == CURRENT_STATE_AUTO_COMPLETE) {
            if (isShowing) {
                changeUiToCompleteClear();
            } else {
                changeUiToCompleteShow();
            }
        } else if (currentState == CURRENT_STATE_PLAYING_BUFFERING_START) {
            if (isShowing) {
                changeUiToPlayingBufferingClear();
            } else {
                changeUiToPlayingBufferingShow();
            }
        }
    }

    protected void onControlViewToggle(boolean isShowing) {
        if (mJCControlViewListener != null) {
            mJCControlViewListener.onControlUiToggle(isShowing);
        }
    }

    @Override
    public void setProgressAndTime(int progress, int secProgress, int currentTime, int totalTime) {
        super.setProgressAndTime(progress, secProgress, currentTime, totalTime);
        if (progress != 0) bottomProgressBar.setProgress(progress);
        if (secProgress != 0) bottomProgressBar.setSecondaryProgress(secProgress);
    }

    @Override
    public void resetProgressAndTime() {
        super.resetProgressAndTime();
        bottomProgressBar.setProgress(0);
        bottomProgressBar.setSecondaryProgress(0);
    }

    @Override
    protected void switchToFullOrientation(Context context) {
        JCUtils.getAppCompActivity(context)
                .setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    }

    //Unified management Ui
    public void changeUiToNormal() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.VISIBLE, View.INVISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.VISIBLE, View.VISIBLE, View.INVISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.VISIBLE, View.INVISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.VISIBLE, View.VISIBLE, View.INVISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }
    }

    public void changeUiToPreparingShow() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.VISIBLE, View.INVISIBLE, View.INVISIBLE,
                        View.VISIBLE, View.VISIBLE, View.VISIBLE, View.INVISIBLE);
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.VISIBLE, View.INVISIBLE, View.INVISIBLE,
                        View.VISIBLE, View.VISIBLE, View.VISIBLE, View.INVISIBLE);
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }

    }

    public void changeUiToPreparingClear() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.VISIBLE, View.INVISIBLE, View.INVISIBLE,
                        View.VISIBLE, View.VISIBLE, View.VISIBLE, View.INVISIBLE);
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.VISIBLE, View.INVISIBLE, View.INVISIBLE,
                        View.VISIBLE, View.VISIBLE, View.VISIBLE, View.INVISIBLE);
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }

    }

    //JustPreparedUi
    @Override
    public void onPrepared() {
        super.onPrepared();
        setAllControlsVisible(View.VISIBLE, View.INVISIBLE, View.INVISIBLE,
                View.INVISIBLE, View.INVISIBLE, View.INVISIBLE, View.VISIBLE);
        startDismissControlViewTimer();
    }

    public void changeUiToPlayingShow() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.VISIBLE, View.VISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.INVISIBLE, View.INVISIBLE, View.INVISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.VISIBLE, View.VISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.INVISIBLE, View.INVISIBLE, View.INVISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }

    }

    public void changeUiToPlayingClear() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.INVISIBLE, View.INVISIBLE, View.INVISIBLE,
                        View.INVISIBLE, View.INVISIBLE, View.INVISIBLE, View.VISIBLE);
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.INVISIBLE, View.INVISIBLE, View.INVISIBLE,
                        View.INVISIBLE, View.INVISIBLE, View.INVISIBLE, View.VISIBLE);
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }

    }

    public void changeUiToPauseShow() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.VISIBLE, View.VISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.INVISIBLE, View.INVISIBLE, View.INVISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.VISIBLE, View.VISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.INVISIBLE, View.INVISIBLE, View.INVISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }

    }

    public void changeUiToPauseClear() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.INVISIBLE, View.INVISIBLE, View.INVISIBLE,
                        View.INVISIBLE, View.INVISIBLE, View.INVISIBLE, View.INVISIBLE);
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.INVISIBLE, View.INVISIBLE, View.INVISIBLE,
                        View.INVISIBLE, View.INVISIBLE, View.INVISIBLE, View.INVISIBLE);
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }

    }

    public void changeUiToPlayingBufferingShow() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.VISIBLE, View.VISIBLE, View.INVISIBLE,
                        View.VISIBLE, View.INVISIBLE, View.INVISIBLE, View.INVISIBLE);
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.VISIBLE, View.VISIBLE, View.INVISIBLE,
                        View.VISIBLE, View.INVISIBLE, View.INVISIBLE, View.INVISIBLE);
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }

    }

    public void changeUiToPlayingBufferingClear() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.INVISIBLE, View.INVISIBLE, View.INVISIBLE,
                        View.VISIBLE, View.INVISIBLE, View.INVISIBLE, View.VISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.INVISIBLE, View.INVISIBLE, View.INVISIBLE,
                        View.VISIBLE, View.INVISIBLE, View.INVISIBLE, View.VISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }

    }

    public void changeUiToCompleteShow() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.VISIBLE, View.INVISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.VISIBLE, View.VISIBLE, View.INVISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.VISIBLE, View.INVISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.VISIBLE, View.VISIBLE, View.INVISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }

    }

    public void changeUiToCompleteClear() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.INVISIBLE, View.INVISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.VISIBLE, View.INVISIBLE, View.VISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.INVISIBLE, View.INVISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.VISIBLE, View.INVISIBLE, View.VISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }

    }

    public void changeUiToError() {
        switch (currentScreen) {
            case SCREEN_LAYOUT_NORMAL:
            case SCREEN_LAYOUT_LIST:
                setAllControlsVisible(View.INVISIBLE, View.INVISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.INVISIBLE, View.VISIBLE, View.INVISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_FULLSCREEN:
                setAllControlsVisible(View.INVISIBLE, View.INVISIBLE, View.VISIBLE,
                        View.INVISIBLE, View.INVISIBLE, View.VISIBLE, View.INVISIBLE);
                updateStartImage();
                break;
            case SCREEN_WINDOW_TINY:
                break;
        }

    }

    public void setAllControlsVisible(int topCon, int bottomCon, int startBtn, int loadingPro,
                                      int thumbImg, int coverImg, int bottomPro) {
        topContainer.setVisibility(topCon);
        bottomContainer.setVisibility(bottomCon);
        startButton.setVisibility(startBtn);
        loadingProgressBar.setVisibility(loadingPro);
        if (thumbImg == View.VISIBLE) {
            thumbImageView.setVisibility(thumbImg);
        } else {
            thumbImageView.setVisibility(View.GONE);
        }
        coverImageView.setVisibility(coverImg);
        bottomProgressBar.setVisibility(bottomPro);
    }

    public void updateStartImage() {
        if (currentState == CURRENT_STATE_PLAYING) {
            startButton.setImageResource(R.drawable.jc_click_pause_selector);
        } else if (currentState == CURRENT_STATE_ERROR) {
            startButton.setImageResource(R.drawable.jc_click_error_selector);
        } else {
            startButton.setImageResource(R.drawable.jc_click_play_selector);
        }
    }

    protected Dialog mProgressDialog;
    protected ProgressBar mDialogProgressBar;
    protected TextView mDialogSeekTime;
    protected TextView mDialogTotalTime;
    protected ImageView mDialogIcon;

    @Override
    public void showProgressDialog(float deltaX, String seekTime, int seekTimePosition, String totalTime, int totalTimeDuration) {
        super.showProgressDialog(deltaX, seekTime, seekTimePosition, totalTime, totalTimeDuration);
        if (mProgressDialog == null) {
            View localView = LayoutInflater.from(getContext()).inflate(R.layout.jc_progress_dialog, null);
            mDialogProgressBar = ((ProgressBar) localView.findViewById(R.id.duration_progressbar));
            mDialogSeekTime = ((TextView) localView.findViewById(R.id.tv_current));
            mDialogTotalTime = ((TextView) localView.findViewById(R.id.tv_duration));
            mDialogIcon = ((ImageView) localView.findViewById(R.id.duration_image_tip));
            mProgressDialog = new Dialog(getContext(), R.style.jc_style_dialog_progress);
            mProgressDialog.setContentView(localView);
            Window window = mProgressDialog.getWindow();
            if (window != null) {
                window.addFlags(Window.FEATURE_ACTION_BAR);
                window.addFlags(32);
                window.addFlags(16);
                window.setLayout(-2, -2);
                WindowManager.LayoutParams localLayoutParams = window.getAttributes();
                localLayoutParams.gravity = 49;
                localLayoutParams.y = getResources().getDimensionPixelOffset(R.dimen.jc_progress_dialog_margin_top);
                window.setAttributes(localLayoutParams);
            }
        }
        if (!mProgressDialog.isShowing()) {
            mProgressDialog.show();
        }

        mDialogSeekTime.setText(seekTime);
        mDialogTotalTime.setText(String.format(" / %1$s", totalTime));
        mDialogProgressBar.setProgress(totalTimeDuration <= 0 ? 0 : (seekTimePosition * 100 / totalTimeDuration));
        if (deltaX > 0) {
            mDialogIcon.setBackgroundResource(R.drawable.jc_forward_icon);
        } else {
            mDialogIcon.setBackgroundResource(R.drawable.jc_backward_icon);
        }

    }

    @Override
    public void dismissProgressDialog() {
        super.dismissProgressDialog();
        if (mProgressDialog != null) {
            mProgressDialog.dismiss();
        }
    }

    protected Dialog mVolumeDialog;
    protected ProgressBar mDialogVolumeProgressBar;

    @Override
    public void showVolumeDialog(float deltaY, int volumePercent) {
        super.showVolumeDialog(deltaY, volumePercent);
        if (mVolumeDialog == null) {
            View localView = LayoutInflater.from(getContext()).inflate(R.layout.jc_volume_dialog, null);
            mDialogVolumeProgressBar = ((ProgressBar) localView.findViewById(R.id.volume_progressbar));
            mVolumeDialog = new Dialog(getContext(), R.style.jc_style_dialog_progress);
            mVolumeDialog.setContentView(localView);
            Window window = mVolumeDialog.getWindow();
            if (window != null) {
                window.addFlags(8);
                window.addFlags(32);
                window.addFlags(16);
                window.setLayout(-2, -2);
                WindowManager.LayoutParams localLayoutParams = window.getAttributes();
                localLayoutParams.gravity = 19;
                localLayoutParams.x = getContext().getResources().getDimensionPixelOffset(R.dimen.jc_volume_dialog_margin_left);
                window.setAttributes(localLayoutParams);
            }
        }
        if (!mVolumeDialog.isShowing()) {
            mVolumeDialog.show();
        }

        mDialogVolumeProgressBar.setProgress(volumePercent);
    }

    @Override
    public void dismissVolumeDialog() {
        super.dismissVolumeDialog();
        if (mVolumeDialog != null) {
            mVolumeDialog.dismiss();
        }
    }

    public void startDismissControlViewTimer() {
        cancelDismissControlViewTimer();
        DISMISS_CONTROL_VIEW_TIMER = new Timer();
        mDismissControlViewTimerTask = new DismissControlViewTimerTask(this);
        DISMISS_CONTROL_VIEW_TIMER.schedule(mDismissControlViewTimerTask, 2500);
    }

    public void cancelDismissControlViewTimer() {
        if (DISMISS_CONTROL_VIEW_TIMER != null) {
            DISMISS_CONTROL_VIEW_TIMER.cancel();
            DISMISS_CONTROL_VIEW_TIMER.purge();
        }
        if (mDismissControlViewTimerTask != null) {
            mDismissControlViewTimerTask.cancel();
        }

    }

    public void setJCControlViewListener(JCControlViewListener JCControlViewListener) {
        mJCControlViewListener = JCControlViewListener;
    }

    private static class DismissControlViewTimerTask extends TimerTask {

        WeakReference<JCVideoPlayerStandard> mJCVideoPlayerWeakReference;

        public DismissControlViewTimerTask(JCVideoPlayerStandard jcVideoPlayer) {
            mJCVideoPlayerWeakReference = new WeakReference<>(jcVideoPlayer);
        }

        @Override
        public void run() {
            final JCVideoPlayerStandard jcVideoPlayer = mJCVideoPlayerWeakReference.get();
            if (jcVideoPlayer != null) {
                if (jcVideoPlayer.currentState != CURRENT_STATE_NORMAL
                        && jcVideoPlayer.currentState != CURRENT_STATE_ERROR
                        && jcVideoPlayer.currentState != CURRENT_STATE_AUTO_COMPLETE) {
                    jcVideoPlayer.mHandler.post(new Runnable() {
                        @Override
                        public void run() {
                            jcVideoPlayer.onControlViewToggle(false);
                            jcVideoPlayer.bottomContainer.setVisibility(View.INVISIBLE);
                            jcVideoPlayer.topContainer.setVisibility(View.INVISIBLE);
                            jcVideoPlayer.startButton.setVisibility(View.INVISIBLE);
                            if (jcVideoPlayer.currentScreen != SCREEN_WINDOW_TINY) {
                                jcVideoPlayer.bottomProgressBar.setVisibility(View.VISIBLE);
                            }
                        }
                    });
                }
            }
        }
    }
}


text:
namespace base {

// Defined in memory_mac.mm for macOS + use_partition_alloc_as_malloc=false.
// In case of use_partition_alloc_as_malloc=true, no need to route the call to
// the system default calloc of macOS.
#if !BUILDFLAG(IS_APPLE) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)

bool UncheckedCalloc(size_t num_items, size_t size, void** result) {
  const size_t alloc_size = num_items * size;

  // Overflow check
  if (size && ((alloc_size / size) != num_items)) {
    *result = nullptr;
    return false;
  }

  if (!UncheckedMalloc(alloc_size, result))
    return false;

  memset(*result, 0, alloc_size);
  return true;
}

#endif  // !BUILDFLAG(IS_APPLE) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)

namespace internal {
bool ReleaseAddressSpaceReservation() {
#if BUILDFLAG(USE_PARTITION_ALLOC)
  return partition_alloc::ReleaseReservation();
#else
  return false;
#endif
}
}  // namespace internal

}  // namespace base


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <title>test_add (ActionsTest)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />

# File vendor/plugins/active_scaffold/test/data_structures/actions_test.rb, line 20
  def test_add
    assert !@actions.include?(:c)
    @actions.add 'c'
    assert @actions.include?('c')
  end


text:
var path = require('path');

// Postgres DATABASE_URL = postgres://user:passed@host:port/database
// SQLite DATABASE_URL = sqlite://:@:/

var url = process.env.DATABASE_URL.match(/(.*)\:\/\/(.*?)\:(.*)@(.*)\:(.*)\/(.*)/);
var DB_name = (url[6]||null);
var user = (url[2]||null);
var pwd = (url[3]||null);
var protocol = (url[1]||null);
var dialect = (url[1]||null);
var port = (url[5]||null);
var host = (url[4]||null);
var storage = process.env.DATABASE_STORAGE;

// Cargar Modelo ORM
var Sequelize = require('sequelize');

// Usar BBDD SQLite:
var sequelize = new Sequelize(DB_name, user, pwd,
	{dialect: protocol,
	 protocol: protocol,
	 port: port,
	 host: host,
	 storage: storage,  // solo SQLite (.env)
	 omitNull:true		// solo PostGres
	}
);

// Importar la definicion de la tabla Quiz en quiz.js
var quiz_path = path.join(__dirname,'quiz');
var Quiz = sequelize.import(quiz_path);

// Importar definicion de la tabla Comment
var comment_path = path.join(__dirname,'comment');
var Comment = sequelize.import(comment_path);

// Importar definicion de la tabla Comment
var user_path = path.join(__dirname,'user');
var User = sequelize.import(user_path);

// Los comentarios pertenecen a una pregunta
Comment.belongsTo(Quiz);
Quiz.hasMany(Comment);

// Los quizes pertenecen a un usuario registrado
Quiz.belongsTo(User);
User.hasMany(Quiz);

//Relacion para favoritos
favourites = sequelize.define('favourites')
User.belongsToMany(Quiz, {through: 'favourites'});
Quiz.belongsToMany(User, {through: 'favourites'});

// Exportar tablas de Quiz, comentarios y usuarios
exports.Quiz = Quiz;
exports.Comment = Comment;
exports.User = User;
exports.favourites = favourites;

// sequelize.sync() crea e inicializa tabla de preguntas en DB
sequelize.sync().then(function(){
	//then(...) ejecuta el manejador una vez creada la tabla
	User.count().then(function (count){
		if(count === 0) { // la tabla se inicializa solo si está vacía
			User.bulkCreate(
				[ {username: 'admin', password: '1234', isAdmin: true},
				  {username: 'mams', password: '5678'} // isAdmin por defecto: 'false'
				]
			).then(function(){
				console.log('Base de datos (Tabla User) inicializada');
				Quiz.count().then(function (count){
					if(count === 0){     // La tabla de inicializa sólo si está vacía
						Quiz.bulkCreate( // estos quizes pertenecen al usuario mams (2)
							[ {pregunta: '4+2', respuesta: '6', UserId: 2},
							  {pregunta: 'Capital de Italia', respuesta: 'Roma', UserId: 2},
							  {pregunta: 'Capital de Portugal', respuesta: 'Italia', UserId: 2},
							  {pregunta: 'Raíz cuadrada de 49', respuesta: '7', UserId: 2},
							]
						).then(function(){console.log('Base de datos (Tabla Quiz) inicializada')});
					};
				});
			});
		};
	});
});


text:
import * as path from 'path';

import * as minimist from 'minimist';
import * as chalk from 'chalk';

import {
  App,
  CONFIG_DIRECTORY,
  CONFIG_FILE,
  Client,
  Config,
  HookEngine,
  IHookEngine,
  IonicEnvironment,
  Logger,
  PROJECT_FILE,
  Project,
  Session,
  Shell,
  TaskChain,
  Telemetry,
  checkForUpdates,
  createPromptModule,
  formatSuperAgentError,
  fsReadDir,
  getCommandInfo,
  handleCliFlags,
  isSuperAgentError,
  isValidationErrorArray,
  load as loadFromUtils,
  loadPlugins,
  pathExists,
  pkgInstallArgs,
  registerHooks as cliUtilsRegisterHooks,
} from '@totvs/cli-utils';

import { IonicNamespace } from './commands';

export const name = '__NAME__';
export const version = '__VERSION__';
export const namespace = new IonicNamespace();

export function registerHooks(hooks: IHookEngine) {
  hooks.register(name, 'command:info', async () => {
    const osName = loadFromUtils('os-name');
    const os = osName();
    const node = process.version;

    const [
      xcode,
      iosDeploy,
      iosSim,
    ] = await Promise.all([
      getCommandInfo('/usr/bin/xcodebuild', ['-version']),
      getCommandInfo('ios-deploy', ['--version']),
      getCommandInfo('ios-sim', ['--version']),
    ]);

    return [
      { type: 'global-packages', name: 'Ionic CLI', version: version },
      { type: 'system', name: 'Node', version: node },
      { type: 'system', name: 'OS', version: os },
      { type: 'system', name: 'Xcode', version: xcode || 'not installed' },
      { type: 'system', name: 'ios-deploy', version: iosDeploy || 'not installed' },
      { type: 'system', name: 'ios-sim', version: iosSim || 'not installed' },
    ];
  });
}

export async function generateIonicEnvironment(pargv: string[], env: { [key: string]: string }): Promise<IonicEnvironment> {
  const inquirer = loadFromUtils('inquirer');
  const bottomBar = new inquirer.ui.BottomBar();
  const bottomBarHack = <any>bottomBar;
  try { bottomBarHack.rl.output.mute(); } catch (e) {} // TODO
  const log = new Logger({ stream: bottomBar.log });

  env['IONIC_CLI_LIB'] = __filename;
  env['IONIC_PROJECT_FILE'] = PROJECT_FILE;
  env['IONIC_PROJECT_DIR'] = await getProjectRootDir(process.cwd(), PROJECT_FILE);

  const config = new Config(env['IONIC_CONFIG_DIRECTORY'] || CONFIG_DIRECTORY, CONFIG_FILE);
  const project = new Project(env['IONIC_PROJECT_DIR'], PROJECT_FILE);
  const configData = await config.load();

  const tasks = new TaskChain({ config: configData, log, bottomBar });
  const hooks = new HookEngine();
  const client = new Client(configData.urls.api);
  const telemetry = new Telemetry(config, version);
  const shell = new Shell(tasks, log);
  const session = new Session(config, project, client);
  const app = new App(session, project, client);

  const argv = minimist(pargv, { boolean: true });
  argv._ = argv._.map(i => String(i)); // TODO: minimist types are lying

  registerHooks(hooks);
  cliUtilsRegisterHooks(hooks);

  return {
    app,
    argv,
    client,
    config,
    hooks,
    log,
    namespace,
    pargv,
    plugins: {
      ionic: {
        name,
        version,
        namespace,
        registerHooks,
        meta: {
          filePath: __filename,
        }
      },
    },
    prompt: await createPromptModule(log, config),
    project,
    session,
    shell,
    tasks,
    telemetry,

    close() {
      tasks.cleanup();
      bottomBar.close();
    },

    load: loadFromUtils,

  };
}

export async function run(pargv: string[], env: { [k: string]: string }) {
  const now = new Date();
  let exitCode = 0;
  let err: any;

  const ienv = await generateIonicEnvironment(modifyArguments(pargv.slice(2)), env);

  try {
    const configData = await ienv.config.load();
    await handleCliFlags(ienv);

    if (ienv.argv['log-level']) {
      ienv.log.level = ienv.argv['log-level'];
    }

    if (env['IONIC_EMAIL'] && env['IONIC_PASSWORD']) {
      ienv.log.debug(`${chalk.bold('IONIC_EMAIL')} / ${chalk.bold('IONIC_PASSWORD')} environment variables detected`);

      if (configData.user.email !== env['IONIC_EMAIL']) {
        ienv.log.debug(`${chalk.bold('IONIC_EMAIL')} mismatch with current session--attempting login`);

        try {
          await ienv.session.login(env['IONIC_EMAIL'], env['IONIC_PASSWORD']);
        } catch (e) {
          ienv.log.error(`Error occurred during automatic login via ${chalk.bold('IONIC_EMAIL')} / ${chalk.bold('IONIC_PASSWORD')} environment variables.`);
          throw e;
        }
      }
    }

    if (ienv.project.directory) {
      const nodeModulesExists = await pathExists(path.join(ienv.project.directory, 'node_modules'));

      if (!nodeModulesExists) {
        const confirm = await ienv.prompt({
          type: 'confirm',
          name: 'confirm',
          message: `Looks like a fresh checkout! No ${chalk.green('./node_modules')} directory found. Would you like to install project dependencies?`,
        });

        if (confirm) {
          ienv.log.info('Installing dependencies may take several minutes!');
          const [ installer, ...installerArgs ] = await pkgInstallArgs(ienv, undefined);
          await ienv.shell.run(installer, installerArgs, {});
        }
      }
    }

    // If an legacy command is being executed inform the user that there is a new command available
    const foundCommand = mapLegacyCommand(ienv.argv._[0]);
    if (foundCommand) {
      ienv.log.msg(`The ${chalk.green(ienv.argv._[0])} command has been renamed. To find out more, run:\n\n` +
                   `  ${chalk.green(`ionic ${foundCommand} --help`)}\n\n`);
    } else {
      let updates: undefined | string[];

      try {
        await loadPlugins(ienv);
      } catch (e) {
        if (e.fatal) {
          throw e;
        }

        ienv.log.error(chalk.red.bold('Error occurred while loading plugins. CLI functionality may be limited.\nChecking for CLI updates now...'));
        ienv.log.debug(chalk.red(chalk.bold('Plugin error: ') + (e.stack ? e.stack : e)));
        updates = await checkForUpdates(ienv);

        if (updates.length === 0) {
          ienv.log.error('No updates found after plugin error--please report this issue.');
        }
      }

      await ienv.hooks.fire('plugins:init', { env: ienv });

      if (configData.cliFlags['dev-always-ionic-updates'] || configData.cliFlags['dev-always-plugin-updates'] || (typeof updates === 'undefined' && now.getTime() - new Date(configData.lastCommand).getTime() >= 3600000)) {
        await checkForUpdates(ienv);
      }

      await namespace.runCommand(ienv);

      configData.lastCommand = now.toISOString();
    }

  } catch (e) {
    ienv.log.debug(chalk.red.bold('!!! ERROR ENCOUNTERED !!!'));
    err = e;
  }

  try {
    await Promise.all([ienv.config.save(), ienv.project.save()]);
  } catch (e) {
    ienv.log.error(e);
  }

  if (err) {
    ienv.tasks.fail();
    exitCode = 1;

    if (isValidationErrorArray(err)) {
      for (let e of err) {
        ienv.log.error(e.message);
      }
      ienv.log.msg(`Use the ${chalk.green('--help')} flag for more details.`);
    } else if (isSuperAgentError(err)) {
      ienv.log.msg(formatSuperAgentError(err));
    } else if (err.fatal) {
      exitCode = typeof err.exitCode === 'number' ? err.exitCode : 1;

      if (err.message) {
        if (exitCode > 0) {
          ienv.log.error(err.message);
        } else {
          ienv.log.msg(err.message);
        }
      }
    } else {
      ienv.log.msg(chalk.red(String(err)));

      if (err.stack) {
        ienv.log.debug(chalk.red(err.stack));
      }
    }

    process.exit(exitCode);
  }

  ienv.close();
}

/**
 * Find the base project directory based on the dir input
 */
export async function getProjectRootDir(dir: string, projectFileName: string): Promise<string> {
  dir = path.normalize(dir);
  const dirInfo = path.parse(dir);
  const directoriesToCheck = dirInfo.dir
    .slice(dirInfo.root.length)
    .split(path.sep)
    .concat(dirInfo.base)
    .map((segment: string, index: number, array: string[]) => {
      let pathSegments = array.slice(0, (array.length - index));
      return dirInfo.root + path.join(...pathSegments);
    });

  for (let i = 0; i < directoriesToCheck.length; i++) {
    const results = await fsReadDir(directoriesToCheck[i]);
    if (results.includes(projectFileName)) {
      return directoriesToCheck[i];
    }
  }

  return '';
}

/**
 * Map legacy options to their new equivalent
 */
export function modifyArguments(pargv: string[]): string[] {
  let modifiedArgArray: string[] = pargv.slice();
  const minimistArgv = minimist(pargv, { boolean: true });

  if (pargv.length === 0) {
    return ['help'];
  }

  if (minimistArgv['help'] || minimistArgv['h']) {
    if (minimistArgv._.length > 0) {
      return ['help', ...minimistArgv._];
    } else {
      return ['help'];
    }
  }

  if (minimistArgv._.length === 0 && (minimistArgv['version'] || minimistArgv['v'])) {
    return ['version'];
  }

  if (minimistArgv._[0] === 'lab') {
    modifiedArgArray[0] = 'serve';
    modifiedArgArray.push('--lab');
  }

  if (minimistArgv['verbose']) {
    modifiedArgArray[modifiedArgArray.indexOf('--verbose')] = '--log-level=debug';
  }

  if (minimistArgv['quiet']) {
    modifiedArgArray[modifiedArgArray.indexOf('--quiet')] = '--log-level=warn';
  }

  return modifiedArgArray;
}

/**
 * Find the command that is the equivalent of a legacy command.
 */
function mapLegacyCommand(command: string): string | undefined {
  const commandMap: { [command: string]: string} = {
    'build': 'cordova build',
    'compile': 'cordova compile',
    'emulate': 'cordova emulate',
    'platform': 'cordova platform',
    'plugin': 'cordova plugin',
    'prepare': 'cordova prepare',
    'resources': 'cordova resources',
    'run': 'cordova run',
    'cordova:build': 'cordova build',
    'cordova:compile': 'cordova compile',
    'cordova:emulate': 'cordova emulate',
    'cordova:platform': 'cordova platform',
    'cordova:plugin': 'cordova plugin',
    'cordova:prepare': 'cordova prepare',
    'cordova:resources': 'cordova resources',
    'cordova:run': 'cordova run',
  };

  return commandMap[command];
}


text:
export interface IUserVO {
    id:string,
    name:string,
    desc: string,
    pos: string,
    mail: string,
    phone:string,
    image:string
}

export var userData: IUserVO[] = [
    {
        id: 'at',
        name: 'Alexander Tschakarov',
        desc: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.',
        pos: 'DEV/CEO',
        mail: 'design@alexander-tschakarov.de',
        phone: '030-3456789',
        image: 'http://lorempixel.com/output/people-q-g-700-500-9.jpg'

    },
    {
        id: 'mt',
        name: 'Mirja Tschakarov',
        desc: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.',
        pos: 'DEV/CEO',
        mail: 'design@mirja-tschakarov.de',
        phone: '030-3456789',
        image: 'http://lorempixel.com/output/people-q-g-700-500-3.jpg'

    },
    {
        id: 'mm',
        name: 'Max Mustermann',
        desc: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.',
        pos: 'UX/CEO',
        mail: 'design@max-mustermann.de',
        phone: '030-3456789',
        image: 'http://lorempixel.com/output/people-q-g-700-500-2.jpg'

    }
]


text:
<?php

namespace Pitchart\Collection;

/**
 * Describes the basic interface for checks on a collection's elements
 *
 * @author Julien VITTE <vitte.julien@gmail.com>
 */
interface Checkable extends CollectionInterface
{
    /**
     * Returns true if all items satisfy the callable condition
     *
     * @param callable $callable The callable takes a collection element as parameter and returns a boolean
     *
     * @return boolean
     */
    public function every(callable $callable);

    /**
     * Returns true if at least one item satisfies the callable condition
     *
     * @param callable $callable The callable takes a collection element as parameter and returns a boolean
     *
     * @return boolean
     */
    public function some(callable $callable);

    /**
     * Returns true if no item satisfies the callable condition
     *
     * @param callable $callable The callable takes a collection element as parameter and returns a boolean
     *
     * @return boolean
     */
    public function none(callable $callable);
}


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

#if PARALLEL
using System.Threading;
using NUnit.Framework;

namespace NUnit.TestData.ParallelExecutionData
{
    [SetUpFixture]
    public class SetUpFixture1
    {
        [OneTimeSetUpAttribute]
        public void RunOneTimeSetUp()
        {
            Thread.Sleep(100);
        }

        [OneTimeTearDown]
        public void RunOneTimeTearDown()
        {
            Thread.Sleep(100);
        }
    }

    [SetUpFixture]
    public class SetUpFixture2
    {
        [OneTimeSetUpAttribute]
        public void RunOneTimeSetUp()
        {
            Thread.Sleep(100);
        }

        [OneTimeTearDown]
        public void RunOneTimeTearDown()
        {
            Thread.Sleep(100);
        }
    }

    public class TestFixture1
    {
        [Test]
        public void TestFixture1_Test()
        {
            Thread.Sleep(100);
        }
    }

    public class TestFixture2
    {
        [Test]
        public void TestFixture2_Test()
        {
            Thread.Sleep(100);
        }
    }

    public class TestFixture3
    {
        [Test]
        public void TestFixture3_Test()
        {
            Thread.Sleep(100);
        }
    }

    [Apartment(ApartmentState.STA)]
    public class STAFixture
    {
        [Test]
        public void STAFixture_Test()
        {
            Thread.Sleep(100);
        }
    }

    public class TestFixtureWithParallelParameterizedTest
    {
        [TestCase(1)]
        [TestCase(2)]
        [TestCase(3)]
        [Parallelizable(ParallelScope.Children)]
        public void ParameterizedTest(int i)
        {
            Thread.Sleep(100);
        }
    }
}
#endif


text:
require File.expand_path('../../../shared/complex/float/arg', __FILE__)

describe "Float#angle" do
  it_behaves_like :float_arg, :angle
end


text:
This is a public repository for the Flemington lab, divided into three
directories:

* **annotation**, for annotation and other data files that we edit (Erik)
* **code**, for scripts
* **docs**, for supporting documentation, guides, how-tos, etc. (Melody)

## citation

If you make use of this data, please cite:

* O'Grady T, Wang X, Höner Zu Bentrup K, Baddoo M, Concha M, Flemington EK. Global transcript structure resolution of high gene density genomes through multi-platform data integration. Nucleic Acids Res. 2016 Jul 12; PMID: 27407110.

* Lin Z, Wang X, Strong MJ, Concha M, Baddoo M, Xu G, Baribault C, Fewell C, Hulme W, Hedges D, Taylor CM, Flemington EK. Whole-Genome Sequencing of the Akata and Mutu Epstein-Barr Virus Strains. J Virol. 2013 Jan 15;87(2):1172–1182.


text:
<?xml version="1.0"?>
<System name="String">
  <Has name="server" value="/"/>
  <Has name="title" value="String"/>
  <Has name="version" value="0.0.0"/>
  <Function name="POST_string">
    <Has name="operation" value="POST"/>
    <Has name="path" value="/string"/>
    <Input type="query">
      <VarSet name="param0">
        <Has name="paramName" value="param0"/>
        <Var name="Defined">
          <Has name="style" value="form"/>
          <Value name="Yes" property="param0"/>
          <Value name="No"/>
        </Var>
        <Var name="Type" when="param0">
          <Value name="string" property="param0Value"/>
          <Value name="null" once="true"/>
          <Value name="Not string" failure="true"/>
        </Var>
        <VarSet name="Value" when="param0Value">
          <Has name="format" value="password"/>
          <Var name="Length">
            <Value name="0" failure="true"/>
            <Value name="1" property="param0LengthValid, param0NotEmpty"/>
            <Value name="> 1" property="param0LengthValid, param0NotEmpty"/>
          </Var>
          <Var name="Matches-Pattern" when="param0LengthValid">
            <Has name="pattern" value="^[A-Za-z0-9]+"/>
            <Value name="Yes"/>
            <Value name="No" failure="true" when="param0NotEmpty"/>
          </Var>
        </VarSet>
      </VarSet>
    </Input>
  </Function>
</System>


text:
package org.kuali.coeus.s2sgen.api.core;

/**
 * This is an error class that is used to capture an s2s error.
 * These errors are usually displayed to the end user.
 *
 * These errors contain three parts:
 * 1) an error key: which field or section was in error
 * 2) a message key: a key to use to lookup a message to display to an end user
 * 3) a link to place the error on
 */
public final class AuditError {

    public static final String NO_FIELD_ERROR_KEY = "noField";
    public static final String GG_LINK = "grantsGov" + "." + "Opportunity";

    private String errorKey;
    private String messageKey;
    private String link;

    public AuditError() {
    }

    public AuditError(String errorKey, String messageKey, String link) {
        this.errorKey = errorKey;
        this.messageKey = messageKey;
        this.link = link;
    }

    public String getErrorKey() {
        return errorKey;
    }

    public void setErrorKey(String errorKey) {
        this.errorKey = errorKey;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public String getMessageKey() {
        return messageKey;
    }

    public void setMessageKey(String messageKey) {
        this.messageKey = messageKey;
    }

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

        AuditError that = (AuditError) o;

        if (errorKey != null ? !errorKey.equals(that.errorKey) : that.errorKey != null) return false;
        if (link != null ? !link.equals(that.link) : that.link != null) return false;
        if (messageKey != null ? !messageKey.equals(that.messageKey) : that.messageKey != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = errorKey != null ? errorKey.hashCode() : 0;
        result = 31 * result + (messageKey != null ? messageKey.hashCode() : 0);
        result = 31 * result + (link != null ? link.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "AuditError{" +
                "errorKey='" + errorKey + '\'' +
                ", messageKey='" + messageKey + '\'' +
                ", link='" + link + '\'' +
                '}';
    }
}