text:
layout: default
title: TranslateConfig
permalink: /TranslatorConfig.html
---
# TranslatorConfig

As the name reveals `TranslatorConfig` gives a configuration for this module.

You can change the options by giving an object to the constructor:
```ts
import { TranslatorConfig } from 'angular-translator';

new TranslatorConfig({
  defaultLanguage: 'de'
});
```

This is done for you within `TranslatorModule.forRoot(config = {})`. You can also change the configuration afterwards
with `TranslatorConfig.setOptions(options)` but we can't recommend as we never tested what happens. There is no reason
to do so.

## The Options

| Name                  | Type     | Default  | Description |
|-----------------------|----------|----------|-------------|
| defaultLanguage       | string   | `'en'`   | Defines the default language to be used if no language got set and language detection is disabled or does not detect a language. |
| providedLanguages     | string[] | `['en']` | Defines a list of the languages that are supported from you. The provided languages has to match your file names. To make language detection work you should use the ISO format 639-1 (e.g. 'en') or the IETF language tag (e.g. 'de-AT'). You don't have to use "-" and don't have to care about case sensitive. A language 'en/us' will also match a browser language en-US and vise versa - but the file has to be *path**en/us**extension* then. |
| detectLanguage        | boolean  | `true`   | Defines whether the language should be detected by navigator.language(s) when TranslateService got initialized or not. |
| loader                | Type     | `TranslationLoaderJson` | The loader that is used for loading translations. |
| loaderOptions         | any      | `{}`     | Options that are passed to the loader. |
| modules               | any      | `{}`     | The module configurations. The modules inherit the options from the root and overwrite with the options in this object. (see [Modules](modules.md) for more information) |

## The Methods

### providedLanguage(lang: string, strict: boolean): string

Tries to find matching provided language and returns the provided language. The provided language and the language that
is searched are getting normalized for matching. That means that `'EN/usa'` is getting `'en-US'`.

Only valid language/region combinations are allowed for non-strict matching. This is necessary to exclude finding provided language Breton if the browser says `"british"`. Valid in this case means to use this format:
`<two letter language>[[divider]<two letter region>]`. Or - to be more precise - this regular expression:
`/^([A-Za-z]{2})(?:[.\-_\/]?([A-Za-z]{2}))?$/`.

Example:

```ts
import { TranslatorConfig } from 'angular-translator';

var translatorConfig = new TranslatorConfig({
  providedLanguages: ['EN', 'EN/usa']
});

expect(translatorConfig.providedLanguage('en-US')).toBe('EN/usa');
```

## Example

This example shows how you usually use the `TranslatorConfig` class:

```ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { TranslatorModule } from "angular-translator";

import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    TranslatorModule.forRoot({
        defaultLanguage: "de",
        providedLanguages: [ "de", "en" ],
        detectLanguage: false
    }),
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```


text:
title: Login to droplet via SSH
permalink: /documentation/matrix/droplet-ssh/
description: The ways to physically get onto a machine.
---

There are two ways to log in at one of the droplets.

### SSH

Find the credentials for the connection in the following paths:
- `PROJECT_DIR/.cikit/credentials/MATRIX_NAME/DROPLET_NAME/DROPLET_NAME.private.key`
- `/usr/local/share/cikit/credentials/MATRIX_NAME/DROPLET_NAME/DROPLET_NAME.private.key`

```bash
ssh root@DROPLET_NAME.MATRIX_HOST -p22DROPLET_NUMBER -i DROPLET_KEY
```

Review the case when the `matrix1` - it's a name of the matrix with the `example.com` hostname and `cikit04` a name of the droplet:

- `MATRIX_HOST` equal to `example.com`
- `MATRIX_NAME` equal to `matrix1`
- `DROPLET_NAME` equal to `cikit04`
- `DROPLET_NUMBER` equal to `04`
- `DROPLET_KEY` equal to one of the paths where the key is stored. This depends on how a droplet was created. If it was within the project - credentials are in `<PROJECT_DIR>`. Otherwise in a global storage.

```bash
ssh root@cikit04.example.com -p2204 -i /usr/local/share/cikit/credentials/matrix1/cikit04/cikit04.private.key
```

### Docker

Login to your matrix via SSH and to the droplet from there via `docker exec -it DROPLET_NAME bash`.

To get the list of matrices you can refer to the [host manager](../../hosts-manager) documentation.

redpajama_set_name: RedPajamaGithub


text:
namespace Popsql.Grammar
{
	/// <summary>
	/// Provides the grammar for the SQL JOIN clause.
	/// </summary>
	public interface ISqlJoinClause : ISqlSelectFromClause
	{
		/// <summary>
		/// Adds a SQL ON clause to this SQL JOIN clause.
		/// </summary>
		/// <param name="predicate">
		/// The predicate used for determining which rows are grouped by this GROUP BY clause.
		/// </param>
		/// <returns>
		/// The next grammatical possibilities in the SQL statement.
		/// </returns>
		ISqlSelectFromClause On(SqlExpression predicate);
	}
}


text:
@interface NSImage (BWAdditions)

// Draw a solid color over an image - taking into account alpha. Useful for coloring template images.
- (NSImage *)bwTintedImageWithColor:(NSColor *)tint;

// Rotate an image 90 degrees clockwise or counterclockwise
- (NSImage *)bwRotateImage90DegreesClockwise:(BOOL)clockwise;

@end


text:
/* globals -$ */
"use strict";

WYMeditor.SKINS.compact = {
    init: function(wym) {
        // Move the containers panel to the top area
        jQuery(wym._options.containersSelector + ', ' +
            wym._options.classesSelector, wym._box)
          .appendTo( jQuery("div.wym_area_top", wym._box) )
          .addClass("wym_dropdown")
          .css({"margin-right": "10px", "width": "120px", "float": "left"});

        // Render following sections as buttons
        jQuery(wym._options.toolsSelector, wym._box)
          .addClass("wym_buttons")
          .css({"margin-right": "10px", "float": "left"});

        // Make hover work under IE < 7
        jQuery(".wym_section", wym._box).hover(function(){
          jQuery(this).addClass("hover");
        },function(){
          jQuery(this).removeClass("hover");
        });

        var postInit = wym._options.postInit;
        wym._options.postInit = function(wym) {
            if (postInit) {
                postInit.call(wym, wym);
            }

            jQuery(wym._doc.body).css('background-color', '#f0f0f0');
        };
    }
};


text:
Server that provides RESTful services of GetYourLocation system. See the [APIs](https://github.com/GetYourLocation/Documentation/blob/master/doc/api.md) available.

## Installation

- Requirements

    - Maven

- Run locally

    ```bash
    $ mvn clean tomcat7:run
    ```

- Run unit tests

    ```bash
    $ mvn clean test
    ```

## License

See the [LICENSE](./LICENSE) file for license rights and limitations.


text:
<?php

/**
 * SPL (Standard PHP Library) function definitions to replace originals.
 *
 * In order to allow unit testing on an unmodified PHP runtime the function
 * implementation definition is contained by this class. The actual function
 * name is mapped in Setup.php which simply calls the implementation.
 */

namespace google\appengine\runtime;

use google\appengine\api\modules\ModulesService;
use google\appengine\util\StringUtil;
use org\bovigo\vfs\vfsStream;

final class SplOverride {
  const DEFAULT_CONTENT_TYPE = 'binary/octet-stream';
  const DEFAULT_TMPFILE_MODE = 0600;

  /**
   * Gets the standard host name for the local machine.
   *
   * @return bool|string
   *   a string with the hostname on success, otherwise FALSE is returned.
   *
   * @see http://php.net/gethostname
   */
  public static function gethostname() {
    // In order to be consistent with PHP core implementation, wrap any
    // exception and return false.
    try {
      return ModulesService::getHostname();
    }
    catch (\Exception $e) {
      return false;
    }
  }

  /**
   * Moves an uploaded file to a new location.
   *
   * @param string $filename
   *   The filename of the uploaded file.
   * @param string $destination
   *   The destination of the moved file.
   * @param array $context_options
   *   An associative array of stream context options. The options will be
   *   merged with defaults and passed to stream_context_create().
   *
   * @see http://php.net/move_uploaded_file
   */
  public static function move_uploaded_file($filename, $destination,
                                            array $context_options = null) {
    // move_uploaded_file() does not support moving a file between two different
    // stream wrappers. Other file handling functions like rename() have the
    // same problem, but copy() works since it explicitly sends the contents to
    // the new source. As such move_uploaded_file() is replaced by
    // is_uploaded_file(), copy(), and unlink() the old file.
    //
    // This also supports upload proxying during which the file may be remotely
    // located and referenced by a stream wrapper. In that case $filename may be
    // something like gs://... and $destination public://... which may end up on
    // the same remote filesystem, but PHP does not make the distinction. Of
    // course, this also means the file can be moved between two different file
    // systems.
    //
    // In the simple case gs:// to gs:// rename() will be called first and
    // invoke the more performant operation.
    if (is_uploaded_file($filename)) {
      // Either use the user provided context options, otherwise use the default
      // context with the Content-Type overridden.
      if ($context_options !== null) {
        $context = stream_context_create($context_options);
      } else {
        // Default to content type provided in $_FILES array.
        $context = stream_context_get_default([
          'gs' => ['Content-Type' => static::lookupContentType($filename)],
        ]);
      }

      // Attempt rename() which is less expensive if the origin and destination
      // use the same stream wrapper, otherwise perform copy() and unlink().
      if (@rename($filename, $destination, $context)) {
        static::removeUploadedFile($filename);
        return true;
      }
      if (copy($filename, $destination, $context) &&
          unlink($filename, $context)) {
        static::removeUploadedFile($filename);
        return true;
      }
    }
    return false;
  }

  /**
   * Lookup the content type associated with an uploaded file.
   *
   * @param string $filename
   *   The filename of the uploaded file.
   * @return
   *   Content type associated with filename, otherwise DEFAULT_CONTENT_TYPE.
   */
  private static function lookupContentType($filename) {
    foreach ($_FILES as $file) {
      if ($file['tmp_name'] == $filename) {
        return $file['type'] ?: static::DEFAULT_CONTENT_TYPE;
      }
    }
    return static::DEFAULT_CONTENT_TYPE;
  }

  /**
   * Remove file from uploaded files list.
   *
   * Provided by the GAE extension, otherwise ignore if not present.
   *
   * @param string $filename
   *   The filename of the uploaded file.
   */
  private static function removeUploadedFile($filename) {
    if (function_exists('__remove_uploaded_file')) {
      __remove_uploaded_file($filename);
    }
  }

  /**
   * Create file with unique file name.
   *
   * @param string $dir
   *   The directory where the temporary filename will be created.
   * @param string $prefix
   *   The prefix of the generated temporary filename.
   * @return bool|string
   *   a string with the new temporary file name on success, otherwise FALSE.
   *
   * @see http://php.net/manual/en/function.tempnam.php
   */
  public static function tempnam($dir, $prefix) {
    // Force $dir into a VFS temp path if it's not already one.
    $temp_root = static::sys_get_temp_dir();
    if (!StringUtil::startsWith($dir, $temp_root)) {
      $dir = $temp_root . '/' . str_replace('\\', '/', $dir);
    }

    // Create all intermediate directories if needed.
    @mkdir($dir, 0777, true);

    // Generate a unique non-existing file name.
    for ($retry = 0; $retry < 10 || file_exists($filename); $retry++) {
      $filename = $dir . '/' . uniqid($prefix, true);
    }
    if (file_exists($filename)) {
      trigger_error('Fail to generate a unique name for the temporary file',
                    E_USER_ERROR);
      return false;
    }

    // tempnam requires the file to be created with permission set to 0600.
    if (touch($filename) === false ||
        chmod($filename, static::DEFAULT_TMPFILE_MODE) === false) {
      trigger_error('Fail to create and change permission of temporary file ' .
                    $filename, E_USER_ERROR);
      return false;
    }

    return $filename;
  }

  /**
   * Returns directory path used for temporary files.
   *
   * @return string
   *   a string with the path of the temporary directory.
   *
   * @see http://php.net/function.sys-get-temp-dir.php
   */
  public static function sys_get_temp_dir() {
    VirtualFileSystem::getInstance()->initialize();
    return vfsStream::url('root/temp');
  }

}


text:
cd ..
pwd
coresavialbol=$(nproc)
echo "Number of computer cores [Max with HyperThreading(TM): $coresavialbol]: "
read cores

pressure_left=0

echo Flipper. Pressure Left $pressure_left both charge and none charge
mpiexec -n $cores python sauce.py problem=dolphin  pressure_left=$pressure_left surface_charge=-10 T=50
mpiexec -n $cores python sauce.py problem=dolphin  pressure_left=$pressure_left surface_charge=0 T=50

pressure_left=5

echo Flipper. Pressure Left $pressure_left both charge and none charge
mpiexec -n $cores python sauce.py problem=dolphin  pressure_left=$pressure_left surface_charge=-10 T=50
mpiexec -n $cores python sauce.py problem=dolphin  pressure_left=$pressure_left surface_charge=0 T=50

pressure_left=20

echo Flipper. Pressure Left $pressure_left both charge and none charge
mpiexec -n $cores python sauce.py problem=dolphin  pressure_left=$pressure_left surface_charge=-10 T=50 dt=0.01
mpiexec -n $cores python sauce.py problem=dolphin  pressure_left=$pressure_left surface_charge=0 T=50 dt=0.01

pressure_left=50

echo Flipper. Pressure Left $pressure_left both charge and none charge
mpiexec -n $cores python sauce.py problem=dolphin  pressure_left=$pressure_left surface_charge=-10 T=50 dt=0.005
mpiexec -n $cores python sauce.py problem=dolphin  pressure_left=$pressure_left surface_charge=0 T=50 dt=0.005


text:
#pragma once
#include <aws/route53/Route53_EXPORTS.h>
#include <aws/route53/Route53Request.h>
#include <aws/route53/model/AccountLimitType.h>
#include <utility>

namespace Aws
{
namespace Route53
{
namespace Model
{

  /**
   *
A complex type that contains information about the request to create a hosted
   * zone.

See Also:
   AWS
   * API Reference

   */
  class AWS_ROUTE53_API GetAccountLimitRequest : public Route53Request
  {
  public:
    GetAccountLimitRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "GetAccountLimit"; }

    Aws::String SerializePayload() const override;

    /**
     *
The limit that you want to get. Valid values include the following:

     *

 MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks
     * that you can create using the current account.

     * MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you
     * can create using the current account.

     * MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable
     * delegation sets that you can create using the current account.

     *
 MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies
     * that you can create using the current account.

     * MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic
     * policy instances that you can create using the current account. (Traffic policy
     * instances are referred to as traffic flow policy records in the Amazon Route 53
     * console.)

     */
    inline const AccountLimitType& GetType() const{ return m_type; }

    /**
     *
The limit that you want to get. Valid values include the following:

     *

 MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks
     * that you can create using the current account.

     * MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you
     * can create using the current account.

     * MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable
     * delegation sets that you can create using the current account.

     *
 MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies
     * that you can create using the current account.

     * MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic
     * policy instances that you can create using the current account. (Traffic policy
     * instances are referred to as traffic flow policy records in the Amazon Route 53
     * console.)

     */
    inline void SetType(const AccountLimitType& value) { m_typeHasBeenSet = true; m_type = value; }

    /**
     *
The limit that you want to get. Valid values include the following:

     *

 MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks
     * that you can create using the current account.

     * MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you
     * can create using the current account.

     * MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable
     * delegation sets that you can create using the current account.

     *
 MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies
     * that you can create using the current account.

     * MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic
     * policy instances that you can create using the current account. (Traffic policy
     * instances are referred to as traffic flow policy records in the Amazon Route 53
     * console.)

     */
    inline void SetType(AccountLimitType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }

    /**
     *
The limit that you want to get. Valid values include the following:

     *

 MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks
     * that you can create using the current account.

     * MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you
     * can create using the current account.

     * MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable
     * delegation sets that you can create using the current account.

     *
 MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies
     * that you can create using the current account.

     * MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic
     * policy instances that you can create using the current account. (Traffic policy
     * instances are referred to as traffic flow policy records in the Amazon Route 53
     * console.)

     */
    inline GetAccountLimitRequest& WithType(const AccountLimitType& value) { SetType(value); return *this;}

    /**
     *
The limit that you want to get. Valid values include the following:

     *

 MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks
     * that you can create using the current account.

     * MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you
     * can create using the current account.

     * MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable
     * delegation sets that you can create using the current account.

     *
 MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies
     * that you can create using the current account.

     * MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic
     * policy instances that you can create using the current account. (Traffic policy
     * instances are referred to as traffic flow policy records in the Amazon Route 53
     * console.)

     */
    inline GetAccountLimitRequest& WithType(AccountLimitType&& value) { SetType(std::move(value)); return *this;}

  private:

    AccountLimitType m_type;
    bool m_typeHasBeenSet;
  };

} // namespace Model
} // namespace Route53
} // namespace Aws


text:
"""Tests for the USBStor Windows Registry plugin."""

from __future__ import unicode_literals

import unittest

from plaso.lib import definitions
from plaso.parsers.winreg_plugins import usbstor

from tests.parsers.winreg_plugins import test_lib

class USBStorPlugin(test_lib.RegistryPluginTestCase):
  """Tests for the USBStor Windows Registry plugin."""

  def testFilters(self):
    """Tests the FILTERS class attribute."""
    plugin = usbstor.USBStorPlugin()

    key_path = 'HKEY_LOCAL_MACHINE\\System\\ControlSet001\\Enum\\USBSTOR'
    self._AssertFiltersOnKeyPath(plugin, key_path)

    self._AssertNotFiltersOnKeyPath(plugin, 'HKEY_LOCAL_MACHINE\\Bogus')

  def testProcess(self):
    """Tests the Process function."""
    test_file_entry = self._GetTestFileEntry(['SYSTEM'])
    key_path = 'HKEY_LOCAL_MACHINE\\System\\ControlSet001\\Enum\\USBSTOR'

    win_registry = self._GetWinRegistryFromFileEntry(test_file_entry)
    registry_key = win_registry.GetKeyByPath(key_path)

    plugin = usbstor.USBStorPlugin()
    storage_writer = self._ParseKeyWithPlugin(
        registry_key, plugin, file_entry=test_file_entry)

    self.assertEqual(storage_writer.number_of_warnings, 0)
    self.assertEqual(storage_writer.number_of_events, 5)

    events = list(storage_writer.GetEvents())

    event = events[0]

    self.CheckTimestamp(event.timestamp, '2012-04-07 10:31:37.640871')
    self.assertEqual(
        event.timestamp_desc, definitions.TIME_DESCRIPTION_WRITTEN)

    event_data = self._GetEventDataOfEvent(storage_writer, event)

    # This should just be the plugin name, as we're invoking it directly,
    # and not through the parser.
    self.assertEqual(event_data.parser, plugin.plugin_name)
    self.assertEqual(event_data.data_type, 'windows:registry:usbstor')
    self.assertEqual(event_data.subkey_name, 'Disk&Ven_HP&Prod_v100w&Rev_1024')
    self.assertEqual(event_data.device_type, 'Disk')
    self.assertEqual(event_data.vendor, 'Ven_HP')
    self.assertEqual(event_data.product, 'Prod_v100w')
    self.assertEqual(event_data.revision, 'Rev_1024')

    expected_message = (
        '[{0:s}] '
        'Device type: Disk '
        'Display name: HP v100w USB Device '
        'Product: Prod_v100w '
        'Revision: Rev_1024 '
        'Serial: AA951D0000007252&0 '
        'Subkey name: Disk&Ven_HP&Prod_v100w&Rev_1024 '
        'Vendor: Ven_HP').format(key_path)
    expected_short_message = '{0:s}...'.format(expected_message[:77])

    self._TestGetMessageStrings(
        event_data, expected_message, expected_short_message)

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


text:
Toast是一种转瞬即逝的对话框,它在淡出之前会显示几秒钟。Toast不需要焦点,而且是非模态的,因此,它们不会中断当前活跃的应用程序。
Toast最好的地方是它可以告知用户事件,而不需要强迫用户打开一个Activity或阅读一个Notification。它为运行在后台的Service,在不中断前台应用程序的前提下,告知用户事件提供了理想的机制。
Toast类包含一个静态的makeText方法,用来创建一个标准的Toast显示窗口。传入应用程序上下文、显示的文本和要显示的时间(LENGTH_SHORT或者LENGTH_LONG)来构建一个新的Toast。一旦Toast已经创建完成,调用show方法来显示它,如下面的代码片段所示:
```
Context context = getApplicationContext();
String msg = "To health and happiness!";
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, msg, duration);
toast.show();
```
#### 定制Toast
标准的Toast文本消息窗口一般来说应该是足用了,但在一些情形中,你可能想要定制它的外观和屏幕位置。你可以通过设定它的显示位置和指定可选的View或Layout来修改一个Toast。
下面的代码片段显示了如何用setGravity方法来将一个Toast布局在屏幕的底部:
```
Context context = getApplicationContext();
String msg = "To the bride an groom!";
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, msg, duration);
int offsetX = 0;
int offsetY = 0;
toast.setGravity(Gravity.BOTTOM, offsetX, offsetY);
toast.show();
```
当仅靠一个文本消息不能完成任务时,你可以指定一个自定义的View或Layout来显示一个更加复杂更加美观的外观。使用setView方法,你可以指定任何View(包括Layout),在转瞬即逝的文本窗口中显示。
例如,下面的片段指定了一个Layout,它包含第4章中创建的指南针构件和一个TextView,来作为一个Toast显示。
```
Context context = getApplicationContext();
String msg = "Cheers!";
int duration = Toast.LENGTH_LONG;
Toast toast = Toast.makeText(context, msg, duration);
toast.setGravity(Gravity.TOP, 0, 0);
LinearLayout ll = new LinearLayout(context);
ll.setOrientation(LinearLayout.VERTICAL);
TextView myTextView = new TextView(context);
CompassView cv = new CompassView(context);
myTextView.setText(msg);
int lHeight = LinearLayout.LayoutParams.FILL_PARENT;
int lWidth = LinearLayout.LayoutParams.WRAP_CONTENT;
ll.addView(cv, new LinearLayout.LayoutParams(lHeight, lWidth));
ll.addView(myTextView, new LinearLayout.LayoutParams(lHeight, lWidth));
ll.setPadding(40, 50, 0, 50);
toast.setView(ll);
toast.show();
```
#### 在工作者线程中使用Toast
作为GUI组件,Toast必须在GUI线程中打开,否则会抛出一个线程异常。在下面的例子中,Handler用来保证Toast在GUI线程中打开:
```
private void mainProcessing() {
Thread thread = new Thread(null, doBackgroundThreadProcessing, "Background");
thread.start();
}
private Runnable doBackgroundThreadProcessing = new Runnable() {
	public void run() {
		backgroundThreadProcessing();
	}
};
private void backgroundThreadProcessing() {
	handler.post(doUpdateGUI);
}
// Runnable that executes the update GUI method.
private Runnable doUpdateGUI = new Runnable() {
	public void run() {
		Context context = getApplicationContext();
		String msg = "To open mobile development!";
		int duration = Toast.LENGTH_SHORT;
		Toast.makeText(context, msg, duration).show();
	}
};
```


text:
package com.cynigram.yashiro.parser;

import org.codehaus.jparsec.Parser;
import org.codehaus.jparsec.Parsers;
import org.codehaus.jparsec.Token;
import org.codehaus.jparsec.TokenMap;
import org.codehaus.jparsec.functors.Map;

import java.io.Serializable;

import static org.codehaus.jparsec.misc.Mapper._;

public class Tag<T extends Serializable> implements Serializable
{
    private static final long serialVersionUID = 1L;

    public static final class StripTag extends Tag<Stripping>
    {
        protected StripTag ()
        {
            super("whitespace stripping instruction");
        }

        Map<String, Fragment<Stripping>> mapFromString ()
        {
            return new Map<String, Fragment<Stripping>>() {
                @Override
                public Fragment<Stripping> map (String from)
                {
                    if (from.equals("-"))
                        return new Fragment<>(Stripping.ALL, StripTag.this);
                    else if (from.equals("+"))
                        return new Fragment<>(Stripping.NONE, StripTag.this);
                    else if (from.equals("!"))
                        return new Fragment<>(Stripping.LINE, StripTag.this);

                    throw new IllegalArgumentException(from);
                }

                @Override
                public String toString ()
                {
                    return String.valueOf(this);
                }
            };
        }

        public Parser<?> parserOf (boolean expected)
        {
            return expected ? parserOf(Stripping.ALL) : parserOf(Stripping.NONE);
        }
    }

    public static final Tag<String> TERM = new Tag<>("reserved keyword");
    public static final Tag<String> NAME = new Tag<>("name");
    public static final Tag<Long> INTEGER = new Tag<>("integer");
    public static final Tag<String> DECIMAL = new Tag<>("decimal");
    public static final Tag<String> DATA = new Tag<>("data");
    public static final Tag<String> STATEMENT_BLOCK = new Tag<>("statement block");
    public static final Tag<String> VARIABLE_BLOCK = new Tag<>("variable block");
    public static final StripTag STRIP = new StripTag();

    private final String name;

    protected Tag (String name)
    {
        this.name = name;
    }

    public Fragment<T> apply (T in)
    {
        return new Fragment<>(in, this);
    }

    Map<T, Fragment<T>> map ()
    {
        return new Map<T, Fragment<T>>()
        {
            @Override
            public Fragment<T> map (T from)
            {
                return new Fragment<>(from, Tag.this);
            }

            @Override
            public String toString ()
            {
                return Tag.this.toString();
            }
        };
    }

    public Parser<T> parser ()
    {
        return Parsers.token(new TokenMap<T>()
        {
            @Override
            public T map (Token token)
            {
                if (!(token.value() instanceof Fragment<?>)) {
                    return null;
                }

                Fragment<?> frag = (Fragment<?>)token.value();
                if (frag.getTag() == Tag.this) {
                    @SuppressWarnings("unchecked")
                    T value = (T)frag.getValue();

                    return value;
                } else {
                    return null;
                }
            }

            @Override
            public String toString ()
            {
                return Tag.this.toString();
            }
        });
    }

    public <U extends T> Parser<?> parserOf (final U expected)
    {
        return _(Parsers.token(new TokenMap<U>()
        {
            @Override
            public U map (Token token)
            {
                if (!(token.value() instanceof Fragment)) {
                    return null;
                }

                Fragment<?> frag = (Fragment<?>)token.value();
                if (frag.getTag() == Tag.this && (expected == null || frag.getValue().equals(expected))) {
                    @SuppressWarnings("unchecked")
                    U value = (U)frag.getValue();

                    return value;
                } else {
                    return null;
                }
            }

            @Override
            public String toString ()
            {
                return expected == null ? Tag.this.toString() : expected.toString();
            }
        }));
    }

    @SafeVarargs
    public final <U extends T> Parser<?> parserOf (final U... expected)
    {
        if (expected.length == 0) {
            return Parsers.never();
        } else if (expected.length == 1) {
            return parserOf(expected[0]);
        }

        Parser<?>[] parsers = new Parser<?>[expected.length];
        for (int i = 0; i < expected.length; i++)
        {
            parsers[i] = parserOf(expected[i]);
        }
        return Parsers.sequence(parsers);
    }

    @Override
    public String toString ()
    {
        return this.name;
    }
}


text:
package org.virtue.game.entity.combat.impl.range;

import org.virtue.game.entity.Entity;
import org.virtue.game.entity.combat.AttackInfo;
import org.virtue.game.entity.combat.CombatStyle;
import org.virtue.game.entity.combat.impl.AttackHandler;
import org.virtue.game.entity.combat.impl.CombatUtils;
import org.virtue.game.entity.combat.impl.formula.Formula;
import org.virtue.game.entity.player.Player;
import org.virtue.game.entity.player.inv.Item;
import org.virtue.game.world.region.zone.Projectile;

/**
 * Handles range attacks.
 * @author Emperor
 *
 */
public class RangeAttackHandler extends AttackHandler {

	/**
	 * Constructs a new {@code RangeAttackHandler} {@code Object}.
	 */
	public RangeAttackHandler() {
		super(-1, -1);
	}

	/**
	 * Constructs a new {@code RangeAttackHandler} {@code Object}.
	 * @param maximumHit The maximum hit.
	 * @param maximumAccuracy The maximum accuracy.
	 */
	public RangeAttackHandler(int maximumHit, int maximumAccuracy) {
		super(maximumHit, maximumAccuracy);
	}

	@Override
	public AttackInfo getAttackInfo(Entity entity, Entity lock) {
		if (entity instanceof Player) {
			Player player = (Player) entity;

			Item weapon = player.getEquipment().getWorn(3);
			Item ammo = player.getEquipment().getWorn(13);
			if (ammo != null) {
				return AttackInfo.create(entity, CombatUtils.getAttackAnimation(entity, false, true), null,
						impact(entity, lock, CombatStyle.RANGE, null, new Projectile(CombatUtils.getProjectileGFX(ammo), 48, 74, 5, 42, 38)));
			}
			if (weapon != null) {
				return AttackInfo.create(entity, CombatUtils.getAttackAnimation(entity, false, true), null,
						impact(entity, lock, CombatStyle.RANGE, null, new Projectile(CombatUtils.getDartProjectileGFX(weapon), 48, 74, 5, 42, 38)));
			}
		}
		return AttackInfo.create(entity, CombatUtils.getAttackAnimation(entity, false, true), null,
				impact(entity, lock, CombatStyle.RANGE, null, new Projectile(11, 48, 74, 5, 42, 38)));
	}

	@Override
	public double getMaximumHit(Entity entity, Entity lock) {
		if (maximumHit > -1) {
			return maximumHit;
		}
		return Formula.getMaximumRangeHit(entity, lock);
	}

	@Override
	public double getMaximumAccuracy(Entity entity, Entity lock) {
		if (maximumAccuracy > -1) {
			return maximumAccuracy;
		}
		return Formula.getMaximumRangeAccuracy(entity, lock);
	}

	@Override
	public double getMaximumDefence(Entity entity, Entity lock) {
		//TODO: Maximum defence formula.
		return Formula.getArmourTotalDefence(entity, lock);
	}

}


text:
<?php

/**
 * Base class that represents a query for the 'faoarfam' table.
 *
 *
 *
 * @method FaoarfamQuery orderByFamcode($order = Criteria::ASC) Order by the FamCode column
 * @method FaoarfamQuery orderByAreacode($order = Criteria::ASC) Order by the AreaCode column
 * @method FaoarfamQuery orderByTs($order = Criteria::ASC) Order by the TS column
 *
 * @method FaoarfamQuery groupByFamcode() Group by the FamCode column
 * @method FaoarfamQuery groupByAreacode() Group by the AreaCode column
 * @method FaoarfamQuery groupByTs() Group by the TS column
 *
 * @method FaoarfamQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
 * @method FaoarfamQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
 * @method FaoarfamQuery innerJoin($relation) Adds a INNER JOIN clause to the query
 *
 * @method Faoarfam findOne(PropelPDO $con = null) Return the first Faoarfam matching the query
 * @method Faoarfam findOneOrCreate(PropelPDO $con = null) Return the first Faoarfam matching the query, or a new Faoarfam object populated from the query conditions when no match is found
 *
 * @method Faoarfam findOneByFamcode(int $FamCode) Return the first Faoarfam filtered by the FamCode column
 * @method Faoarfam findOneByAreacode(int $AreaCode) Return the first Faoarfam filtered by the AreaCode column
 * @method Faoarfam findOneByTs(string $TS) Return the first Faoarfam filtered by the TS column
 *
 * @method array findByFamcode(int $FamCode) Return Faoarfam objects filtered by the FamCode column
 * @method array findByAreacode(int $AreaCode) Return Faoarfam objects filtered by the AreaCode column
 * @method array findByTs(string $TS) Return Faoarfam objects filtered by the TS column
 *
 * @package    propel.generator.fbapp.om
 */
abstract class BaseFaoarfamQuery extends ModelCriteria
{
    /**
     * Initializes internal state of BaseFaoarfamQuery object.
     *
     * @param     string $dbName The dabase name
     * @param     string $modelName The phpName of a model, e.g. 'Book'
     * @param     string $modelAlias The alias for the model in this query, e.g. 'b'
     */
    public function __construct($dbName = null, $modelName = null, $modelAlias = null)
    {
        if (null === $dbName) {
            $dbName = 'fbapp';
        }
        if (null === $modelName) {
            $modelName = 'Faoarfam';
        }
        parent::__construct($dbName, $modelName, $modelAlias);
    }

    /**
     * Returns a new FaoarfamQuery object.
     *
     * @param     string $modelAlias The alias of a model in the query
     * @param   FaoarfamQuery|Criteria $criteria Optional Criteria to build the query from
     *
     * @return FaoarfamQuery
     */
    public static function create($modelAlias = null, $criteria = null)
    {
        if ($criteria instanceof FaoarfamQuery) {
            return $criteria;
        }
        $query = new FaoarfamQuery(null, null, $modelAlias);

        if ($criteria instanceof Criteria) {
            $query->mergeWith($criteria);
        }

        return $query;
    }

    /**
     * Find object by primary key.
     * Propel uses the instance pool to skip the database if the object exists.
     * Go fast if the query is untouched.
     *
     *
     * $obj = $c->findPk(array(12, 34), $con);
     *
     *
     * @param array $key Primary key to use for the query
                         A Primary key composition: [$FamCode, $AreaCode]
     * @param     PropelPDO $con an optional connection object
     *
     * @return   Faoarfam|Faoarfam[]|mixed the result, formatted by the current formatter
     */
    public function findPk($key, $con = null)
    {
        if ($key === null) {
            return null;
        }
        if ((null !== ($obj = FaoarfamPeer::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
            // the object is already in the instance pool
            return $obj;
        }
        if ($con === null) {
            $con = Propel::getConnection(FaoarfamPeer::DATABASE_NAME, Propel::CONNECTION_READ);
        }
        $this->basePreSelect($con);
        if ($this->formatter || $this->modelAlias || $this->with || $this->select
         || $this->selectColumns || $this->asColumns || $this->selectModifiers
         || $this->map || $this->having || $this->joins) {
            return $this->findPkComplex($key, $con);
        } else {
            return $this->findPkSimple($key, $con);
        }
    }

    /**
     * Find object by primary key using raw SQL to go fast.
     * Bypass doSelect() and the object formatter by using generated code.
     *
     * @param     mixed $key Primary key to use for the query
     * @param     PropelPDO $con A connection object
     *
     * @return                 Faoarfam A model object, or null if the key is not found
     * @throws PropelException
     */
    protected function findPkSimple($key, $con)
    {
        $sql = 'SELECT `FamCode`, `AreaCode`, `TS` FROM `faoarfam` WHERE `FamCode` = :p0 AND `AreaCode` = :p1';
        try {
            $stmt = $con->prepare($sql);
            $stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
            $stmt->bindValue(':p1', $key[1], PDO::PARAM_INT);
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
        }
        $obj = null;
        if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
            $obj = new Faoarfam();
            $obj->hydrate($row);
            FaoarfamPeer::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
        }
        $stmt->closeCursor();

        return $obj;
    }

    /**
     * Find object by primary key.
     *
     * @param     mixed $key Primary key to use for the query
     * @param     PropelPDO $con A connection object
     *
     * @return Faoarfam|Faoarfam[]|mixed the result, formatted by the current formatter
     */
    protected function findPkComplex($key, $con)
    {
        // As the query uses a PK condition, no limit(1) is necessary.
        $criteria = $this->isKeepQuery() ? clone $this : $this;
        $stmt = $criteria
            ->filterByPrimaryKey($key)
            ->doSelect($con);

        return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
    }

    /**
     * Find objects by primary key
     *
     * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con);
     *
     * @param     array $keys Primary keys to use for the query
     * @param     PropelPDO $con an optional connection object
     *
     * @return PropelObjectCollection|Faoarfam[]|mixed the list of results, formatted by the current formatter
     */
    public function findPks($keys, $con = null)
    {
        if ($con === null) {
            $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
        }
        $this->basePreSelect($con);
        $criteria = $this->isKeepQuery() ? clone $this : $this;
        $stmt = $criteria
            ->filterByPrimaryKeys($keys)
            ->doSelect($con);

        return $criteria->getFormatter()->init($criteria)->format($stmt);
    }

    /**
     * Filter the query by primary key
     *
     * @param     mixed $key Primary key to use for the query
     *
     * @return FaoarfamQuery The current query, for fluid interface
     */
    public function filterByPrimaryKey($key)
    {
        $this->addUsingAlias(FaoarfamPeer::FAMCODE, $key[0], Criteria::EQUAL);
        $this->addUsingAlias(FaoarfamPeer::AREACODE, $key[1], Criteria::EQUAL);

        return $this;
    }

    /**
     * Filter the query by a list of primary keys
     *
     * @param     array $keys The list of primary key to use for the query
     *
     * @return FaoarfamQuery The current query, for fluid interface
     */
    public function filterByPrimaryKeys($keys)
    {
        if (empty($keys)) {
            return $this->add(null, '1<>1', Criteria::CUSTOM);
        }
        foreach ($keys as $key) {
            $cton0 = $this->getNewCriterion(FaoarfamPeer::FAMCODE, $key[0], Criteria::EQUAL);
            $cton1 = $this->getNewCriterion(FaoarfamPeer::AREACODE, $key[1], Criteria::EQUAL);
            $cton0->addAnd($cton1);
            $this->addOr($cton0);
        }

        return $this;
    }

    /**
     * Filter the query on the FamCode column
     *
     * Example usage:
     *
     * $query->filterByFamcode(1234); // WHERE FamCode = 1234
     * $query->filterByFamcode(array(12, 34)); // WHERE FamCode IN (12, 34)
     * $query->filterByFamcode(array('min' => 12)); // WHERE FamCode >= 12
     * $query->filterByFamcode(array('max' => 12)); // WHERE FamCode <= 12
     *
     *
     * @param     mixed $famcode The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return FaoarfamQuery The current query, for fluid interface
     */
    public function filterByFamcode($famcode = null, $comparison = null)
    {
        if (is_array($famcode)) {
            $useMinMax = false;
            if (isset($famcode['min'])) {
                $this->addUsingAlias(FaoarfamPeer::FAMCODE, $famcode['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($famcode['max'])) {
                $this->addUsingAlias(FaoarfamPeer::FAMCODE, $famcode['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(FaoarfamPeer::FAMCODE, $famcode, $comparison);
    }

    /**
     * Filter the query on the AreaCode column
     *
     * Example usage:
     *
     * $query->filterByAreacode(1234); // WHERE AreaCode = 1234
     * $query->filterByAreacode(array(12, 34)); // WHERE AreaCode IN (12, 34)
     * $query->filterByAreacode(array('min' => 12)); // WHERE AreaCode >= 12
     * $query->filterByAreacode(array('max' => 12)); // WHERE AreaCode <= 12
     *
     *
     * @param     mixed $areacode The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return FaoarfamQuery The current query, for fluid interface
     */
    public function filterByAreacode($areacode = null, $comparison = null)
    {
        if (is_array($areacode)) {
            $useMinMax = false;
            if (isset($areacode['min'])) {
                $this->addUsingAlias(FaoarfamPeer::AREACODE, $areacode['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($areacode['max'])) {
                $this->addUsingAlias(FaoarfamPeer::AREACODE, $areacode['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(FaoarfamPeer::AREACODE, $areacode, $comparison);
    }

    /**
     * Filter the query on the TS column
     *
     * Example usage:
     *
     * $query->filterByTs('2011-03-14'); // WHERE TS = '2011-03-14'
     * $query->filterByTs('now'); // WHERE TS = '2011-03-14'
     * $query->filterByTs(array('max' => 'yesterday')); // WHERE TS < '2011-03-13'
     *
     *
     * @param     mixed $ts The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return FaoarfamQuery The current query, for fluid interface
     */
    public function filterByTs($ts = null, $comparison = null)
    {
        if (is_array($ts)) {
            $useMinMax = false;
            if (isset($ts['min'])) {
                $this->addUsingAlias(FaoarfamPeer::TS, $ts['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($ts['max'])) {
                $this->addUsingAlias(FaoarfamPeer::TS, $ts['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(FaoarfamPeer::TS, $ts, $comparison);
    }

    /**
     * Exclude object from result
     *
     * @param   Faoarfam $faoarfam Object to remove from the list of results
     *
     * @return FaoarfamQuery The current query, for fluid interface
     */
    public function prune($faoarfam = null)
    {
        if ($faoarfam) {
            $this->addCond('pruneCond0', $this->getAliasedColName(FaoarfamPeer::FAMCODE), $faoarfam->getFamcode(), Criteria::NOT_EQUAL);
            $this->addCond('pruneCond1', $this->getAliasedColName(FaoarfamPeer::AREACODE), $faoarfam->getAreacode(), Criteria::NOT_EQUAL);
            $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
        }

        return $this;
    }

}


text:
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>index.html</title>


text:
package at.caseapps.matcha;

import java.util.Map;

public class Action {

    public String name;
    public String element;
    public Map<String, Object> parameters;
    public int line = 0;

    public double wait = 2.0;
    public double pollInterval = 0.25;

    public Action(String name, String firstParameter, Map<String, Object> parameters, int line) {
        this.name = name;
        this.element = firstParameter;
        if (parameters != null && parameters.isEmpty() == false) {
            this.parameters = parameters;
        }
        this.line = line;
    }

    public static Action createAction(String name, String firstParameter, Map<String, Object> parameters, int line) {
        if (name.equals("scroll")) {
            return new ScrollAction(name, firstParameter, parameters, line);
        }
        if (name.equals("enter")) {
            return new EnterAction(name, firstParameter, parameters, line);
        }
        if (name.equals("verify")) {
            if (parameters.get("navigationTitle") != null) {
                return new VerifyNavigationAction(name, firstParameter, parameters, line);
            } else {
                return new VerifyAction(name, firstParameter, parameters, line);
            }
        }
        if (name.equals("contains")) {
            return new VerifyAction(name, firstParameter, parameters, line);
        }
        if (name.equals("executeJS")) {
            return new ExecuteJSAction(name, firstParameter, parameters, line);
        }
        if (name.equals("http")) {
            return new HttpAction(name, firstParameter, parameters, line);
        }
        if (name.equals("wait")) {
            return new WaitAction(name, firstParameter, parameters, line);
        }
        if (name.equals("searchField")) {
            return new SearchFieldAction(name, firstParameter, parameters, line);
        }
        return new Action(name, firstParameter, parameters, line);
    }

    public static class HttpAction extends Action {
        public String url;
        public String header;
        public String params;

        public HttpAction(String name, String firstParameter, Map<String, Object> parameters, int line) {
            super(name, firstParameter, parameters, line);
            this.url = (String) parameters.get("url");
            this.header = (String) parameters.get("headers");
            this.params = (String) parameters.get("params");
        }
    }

    public static class ScrollAction extends Action {
        public String to;
        public String direction = "right";
        public int amount = 500;

        public ScrollAction(String name, String firstParameter, Map<String, Object> parameters, int line) {
            super(name, firstParameter, parameters, line);
            this.to = (String) parameters.get("to");
            if (parameters.get("direction") != null) {
                this.direction = (String) parameters.get("direction");
            }
            if (parameters.get("amount") != null) {
                this.amount = Integer.valueOf((String) parameters.get("amount"));
            }
        }
    }

    public static class ExecuteJSAction extends Action {
        public String code;

        public ExecuteJSAction(String name, String firstParameter, Map<String, Object> parameters, int line) {
            super(name, firstParameter, parameters, line);
            if (parameters.get("value") != null) {
                this.code = (String) parameters.get("value");
            } else {
                this.code = (String) parameters.get("code");
            }

        }
    }

    public static class VerifyNavigationAction extends Action {
        public String navigationTitle;

        public VerifyNavigationAction(String name, String firstParameter, Map<String, Object> parameters, int line) {
            super(name, firstParameter, parameters, line);
            if (parameters.get("value") != null) {
                this.navigationTitle = (String) parameters.get("value");
            } else {
                this.navigationTitle = (String) parameters.get("navigationTitle");
            }
        }
    }

    public static class VerifyAction extends Action {
        public String value;

        public VerifyAction(String name, String firstParameter, Map<String, Object> parameters, int line) {
            super(name, firstParameter, parameters, line);
            this.value = (String) parameters.get("value");
        }
    }

    public static class EnterAction extends Action {
        public String value;

        public EnterAction(String name, String firstParameter, Map<String, Object> parameters, int line) {
            super(name, firstParameter, parameters, line);
            this.value = (String) parameters.get("value");
        }
    }

    public static class WaitAction extends Action {
        public double value = 0.5;

        public WaitAction(String name, String firstParameter, Map<String, Object> parameters, int line) {
            super(name, firstParameter, parameters, line);
            if (parameters.get("value") != null) {
                this.value = (double) parameters.get("value");
            } else if (firstParameter != null) {
                this.value = Double.valueOf(firstParameter);
            }
        }
    }

    public static class SearchFieldAction extends Action {
        public String value = "";

        public SearchFieldAction(String name, String firstParameter, Map<String, Object> parameters, int line) {
            super(name, firstParameter, parameters, line);
            if (parameters.get("value") != null) {
                this.value = (String) parameters.get("value");
            } else if (firstParameter != null) {
                this.value = firstParameter;
            }
        }
    }
}


text:
var UU5 = UU5 || {};
UU5.DocKit = UU5.DocKit || {};
UU5.DocKit.data = UU5.DocKit.data || {};

UU5.DocKit.data.uu5_bricks_language_selector = {
  tagName: "UU5.Bricks.LanguageSelector",
  sourceFile: "../../data/source/uu5-bricks-language-selector.js",
  cssFile: "../../data/source/uu5-bricks-language-selector.less",
  descLSI: {
    en: '',
    cs: `<UU5.Bricks.Blockquote.bgSuccess>Komponenta <UU5.Bricks.Code content='UU5.Bricks.LanguageSelector'/>
se vykresluje jako rozbalovací menu na velkých obrazovkách (<UU5.Bricks.Code content='lg' />, <UU5.Bricks.Code content='md' /> a
<UU5.Bricks.Code content='sm' />) nebo jako tlačítko, které otevře modální okno, na menších obrazovkách. Komponenta
slouží k výběru jazyka vizuálního případu užití. Pokud vybraný jazyk není nadefinovaný v
<UU5.Bricks.Code content="lsi" />, vybere se jazyk s největší váhou. Poté je na řadě jazyk,
který je definovaný v <UU5.Bricks.Code content='Environment.defaultLanguage' />, pak se bere jazyk prohlížeče a naposled první jazyk definovaný v <UU5.Bricks.Code content="lsi" />.</UU5.Bricks.Blockquote.bgSuccess>`
  },
  demoExample: {
    src: "../../data/examples/exampleUU5BricksLanguageSelector02.html",
    descLSI: {
      cs: `Příklad komponenty <UU5.Bricks.Code content='UU5.Bricks.LanguageSelector'/> s nastavením tří jazyků. Komponenta po výběru jazyka vyvolá ve frameworku <UU5.DocKit.Bricks.LinkUU5 />
událost změny jazyka. Všechny jazykově senzitivní komponenty ve vizuálním případu užití na tuto událost reagují tak, že překreslí svůj obsah ve vybraném jazyce.
Ve frameworku <UU5.DocKit.Bricks.LinkUU5 /> je takovou komponentou <UU5.DocKit.Bricks.Link tagName='UU5.Bricks.Lsi' />. Pokud vybraný jazyk není nadefinovaný v
 <UU5.Bricks.Code content="lsi" />, vybere se jazyk s největší váhou. Poté je na řadě jazyk,
který je definovaný v <UU5.Bricks.Code content='Environment.defaultLanguage' />, pak se bere jazyk prohlížeče a naposled první jazyk definovaný v <UU5.Bricks.Code content="lsi" />.`
    }
  },
  mixins: [
    '<UU5.DocKit.Bricks.Link tagName="UU5.Common.BaseMixin" />',
    '<UU5.DocKit.Bricks.Link tagName="UU5.Common.ElementaryMixin" />',
    '<UU5.DocKit.Bricks.Link tagName="UU5.Common.ScreenSizeMixin" />',
    '<UU5.DocKit.Bricks.Link tagName="UU5.Common.LsiMixin" />'
  ],
  staticsDescLSI: null,
  props: [{
    "name": "headerMode", "descLSI": {
      en: "",
      cs: `<UU5.Bricks.Code content="(enum) ['all' | 'flag' | 'label']"/> - definuje, jak se bude zobrazovat tlačítko pro
vyvolání modálního okna (malé obrazovky) nebo jak se bude zobrazovat hlavní tlačítko rozbalovacího seznamu (velké obrazovky)

<UU5.Bricks.Code content='all' /> - zobrazí vlajku a název jazyka. Název jazyka není jazykově senzitivní.

<UU5.Bricks.Code content='flag' /> - zobrazí pouze vlajku

<UU5.Bricks.Code content='label' /> - zobrazí pouze název jazyka. Název jazyka není jazykově senzitivní.

Výchozí hodnota je <UU5.Bricks.Code content="all" />.

Např. <UU5.Bricks.Code content="headerMode='flag'" /> zobrazí na hlavním tlačítku rozbalovacího menu vlajku.`
    }
  }, {
    "name": "bodyMode", "descLSI": {
      en: "",
      cs: `<UU5.Bricks.Code content="(enum) ['all' | 'flag' | 'label']"/> - definuje, jak se budou zobrazovat
jednotlivé položky v modálním okně (malé obrazovky) nebo jednotlivé položky rozbalovacího seznamu (velké obrazovky)

<UU5.Bricks.Code content='all' /> - zobrazí vlajku a název jazyka. Název jazyka není jazykově senzitivní.

<UU5.Bricks.Code content='flag' /> - zobrazí pouze vlajku

<UU5.Bricks.Code content='label' /> - zobrazí pouze název jazyka. Název jazyka není jazykově senzitivní.

Výchozí hodnota je <UU5.Bricks.Code content="all" />.

Např. <UU5.Bricks.Code content="bodyMode='label'" /> zobrazí na jednotlivých položkách rozbalovacího menu pouze text.`
    }
  }, {
    "name": "displayedLanguages", "descLSI": {
      en: "",
      cs: `<UU5.Bricks.Code content='(array)'/> - seznam jazyků, které se zobrazí v <UU5.Bricks.Code content='UU5.Bricks.LanguageSelector' />.
Pokud není zadáno, zobrazí se všechny jazyky definované ve vlastnosti <UU5.Bricks.Code content='languages'/>.

Výchozí hodnota je <UU5.Bricks.Code content="null" />.

Např. <UU5.Bricks.Code content="['cs', 'sk', 'en‑gb']" />`
    }
  }, {
    "name": "languages", "descLSI": {
      en: "",
      cs: `<UU5.Bricks.Code content='(object)'/> - seznam všech jazyků, kde klíčem je kód jazyka. Jednotlivé položky seznamu pak
obsahují jméno jazyka a vlajku, které může komponenta použít.

Výchozí hodnota je <UU5.Bricks.Code content="null" />.

Např.<UU5.Bricks.Pre>languages={{
  cs: {flag: '../assets/flags/cs.png', language: 'Česky'},
  sk: {flag: '../assets/flags/sk.png', language: 'Slovensky'}
}}</UU5.Bricks.Pre>`
    }
  }],
  propsDescLSI: null,
  interface: [],
  interfaceDescLSI: null,
  examplesIntroLSI: null,
  examples: [
    {
      src: '../../data/examples/exampleUU5BricksLanguageSelector01.html',
      descLSI: {
        en: `ToDo!!!`,
        cs: `Příklad představuje výchozí zobrazení komponenty <UU5.Bricks.Code content='UU5.Bricks.LanguageSelector'/>.`
      },
      hintLSI: {
        cs: ''
      }
    },
    {
      src: '../../data/examples/exampleUU5BricksLanguageSelector02.html',
      descLSI: {
        en: `ToDo!!!`,
        cs: `Příklad komponenty <UU5.Bricks.Code content='UU5.Bricks.LanguageSelector'/> s nastavením tří jazyků. Komponenta po výběru jazyka vyvolá ve frameworku <UU5.DocKit.Bricks.LinkUU5 />
událost změny jazyka. Všechny jazykově senzitivní komponenty ve vizuálním případu užití na tuto událost reagují tak, že překreslí svůj obsah ve vybraném jazyce.
Ve frameworku <UU5.DocKit.Bricks.LinkUU5 /> je takovou komponentou <UU5.DocKit.Bricks.Link tagName='UU5.Bricks.Lsi' />. Pokud vybraný jazyk není nadefinovaný v
 <UU5.Bricks.Code content="lsi" /> (v tomto příkladě jsou definované pouze jazyky <UU5.Bricks.Code content="'cs', 'sk', 'en'" />), vybere se jazyk s největší váhou. Poté je na řadě jazyk,
který je definovaný v <UU5.Bricks.Code content='Environment.defaultLanguage' />, pak se bere jazyk prohlížeče a naposled první jazyk definovaný v <UU5.Bricks.Code content="lsi" />.
Ve frameworku <UU5.DocKit.Bricks.LinkUU5 /> je takovou komponentou <UU5.DocKit.Bricks.Link tagName='UU5.Bricks.Lsi' />.`
      },
      hintLSI: {
        cs: ''
      }
    },
    {
      src: '../../data/examples/exampleUU5BricksLanguageSelector03.html',
      descLSI: {
        en: `ToDo!!!`,
        cs: `V příkladu je předvedeno, jak je možné omezit počet použitých jazyků v komponentě. K jejich výběru je použita vlastnost
<UU5.Bricks.Code content='displayedLanguages' />, jejíž hodnota je pole použitých jazyků např. <UU5.Bricks.Code content="['cs', 'sk', 'en-gb']" />.`
      },
      hintLSI: {
        cs: ''
      }
    }, {
      src: '../../data/examples/exampleUU5BricksLanguageSelector04.html',
      descLSI: {
        en: `ToDo!!!`,
        cs: `V příkladu je předvedeno, jak je možné omezit počet použitých jazyků v komponentě. K jejich výběru je použita vlastnost
<UU5.Bricks.Code content='languages' /> - objekt, který obsahuje seznam všech jazyků, kde klíčem je kód jazyka. Jednotlivé položky seznamu pak obsahují jméno jazyka a vlajku, které může komponenta použít.`
      },
      hintLSI: {
        cs: ''
      }
    },{
      src: '../../data/examples/exampleUU5BricksLanguageSelector05.html',
      descLSI: {
        en: `ToDo!!!`,
        cs: `V příkladu jsou předvedeny všechny varianty zobrazení komponenty s použitím vlastností <UU5.Bricks.Code content='headerMode' /> (určí, zda se na hlavním tlačítku rozbalovacího menu zobrazí <UU5.Bricks.Code content="flag"/>, <UU5.Bricks.Code content="label"/> nebo <UU5.Bricks.Code content="all"/>) a <UU5.Bricks.Code content='bodyMode' /> (určí, zda se na jednotlivých položkák při rozkliknutí hlavního tlačítka rozbalovacího menu zobrazí <UU5.Bricks.Code content="flag"/>, <UU5.Bricks.Code content="label"/> nebo <UU5.Bricks.Code content="all"/>).`
      },
      hintLSI: {
        cs: ''
      }
    }
  ],
  exampleConclusionLSI: null
};


text:
package com.navercorp.pinpoint.common.server.bo.stat;

import com.navercorp.pinpoint.common.server.util.FilterUtils;

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

/**
 * @author HyunGil Jeong
 */
public class AgentStatBo {

    private final String agentId;
    private final long startTimestamp;

    private final List<JvmGcBo> jvmGcBos;
    private final List<JvmGcDetailedBo> jvmGcDetailedBos;
    private final List<CpuLoadBo> cpuLoadBos;
    private final List<TransactionBo> transactionBos;
    private final List<ActiveTraceBo> activeTraceBos;
    private final List<DataSourceListBo> dataSourceListBos;
    private final List<ResponseTimeBo> responseTimeBos;
    private final List<DeadlockThreadCountBo> deadlockThreadCountBos;
    private final List<FileDescriptorBo> fileDescriptorBos;
    private final List<DirectBufferBo> directBufferBos;
    private final List<TotalThreadCountBo> totalThreadCountBos;
    private final List<LoadedClassBo> loadedClassBos;

    public AgentStatBo(Builder builder) {
        this.agentId = builder.agentId;
        this.startTimestamp = builder.startTimestamp;
        this.jvmGcBos = FilterUtils.filter(builder.statList, JvmGcBo.class);
        this.jvmGcDetailedBos = FilterUtils.filter(builder.statList, JvmGcDetailedBo.class);
        this.cpuLoadBos = FilterUtils.filter(builder.statList, CpuLoadBo.class);
        this.transactionBos = FilterUtils.filter(builder.statList, TransactionBo.class);
        this.activeTraceBos = FilterUtils.filter(builder.statList, ActiveTraceBo.class);
        this.dataSourceListBos = FilterUtils.filter(builder.statList, DataSourceListBo.class);
        this.responseTimeBos = FilterUtils.filter(builder.statList, ResponseTimeBo.class);
        this.deadlockThreadCountBos = FilterUtils.filter(builder.statList, DeadlockThreadCountBo.class);
        this.fileDescriptorBos = FilterUtils.filter(builder.statList, FileDescriptorBo.class);
        this.directBufferBos = FilterUtils.filter(builder.statList, DirectBufferBo.class);
        this.totalThreadCountBos = FilterUtils.filter(builder.statList, TotalThreadCountBo.class);
        this.loadedClassBos = FilterUtils.filter(builder.statList, LoadedClassBo.class);
    }

    public long getStartTimestamp() {
        return startTimestamp;
    }

    public String getAgentId() {
        return agentId;
    }

    public List<JvmGcBo> getJvmGcBos() {
        return jvmGcBos;
    }

    public List<JvmGcDetailedBo> getJvmGcDetailedBos() {
        return jvmGcDetailedBos;
    }

    public List<CpuLoadBo> getCpuLoadBos() {
        return cpuLoadBos;
    }

    public List<TransactionBo> getTransactionBos() {
        return transactionBos;
    }

    public List<ActiveTraceBo> getActiveTraceBos() {
        return activeTraceBos;
    }

    public List<DataSourceListBo> getDataSourceListBos() {
        return dataSourceListBos;
    }

    public List<ResponseTimeBo> getResponseTimeBos() {
        return responseTimeBos;
    }

    public List<DeadlockThreadCountBo> getDeadlockThreadCountBos() {
        return deadlockThreadCountBos;
    }

    public List<FileDescriptorBo> getFileDescriptorBos() {
        return fileDescriptorBos;
    }

    public List<DirectBufferBo> getDirectBufferBos() {
        return directBufferBos;
    }

    public List<TotalThreadCountBo> getTotalThreadCountBos() {
        return totalThreadCountBos;
    }

    public List<LoadedClassBo> getLoadedClassBos() {
        return loadedClassBos;
    }

    public static Builder newBuilder(String agentId, long startTimestamp) {
        return new Builder(agentId, startTimestamp);
    }

    public static class Builder {
        private final String agentId;
        private final long startTimestamp;

        private final List<AgentStatDataPoint> statList = new ArrayList<>();

        public Builder(String agentId, long startTimestamp) {
            this.agentId = Objects.requireNonNull(agentId, "agentId");
            this.startTimestamp = startTimestamp;
        }

        public StatBuilder newStatBuilder(long timestamp) {
            return new StatBuilder(timestamp);
        }

        public class StatBuilder {
            private final long timestamp;

            public StatBuilder(long timestamp) {
                this.timestamp = timestamp;
            }

            private void setBaseData(AgentStatDataPoint agentStatDataPoint) {
                agentStatDataPoint.setAgentId(agentId);
                agentStatDataPoint.setStartTimestamp(startTimestamp);
                agentStatDataPoint.setTimestamp(this.timestamp);
            }

            public void addJvmGc(JvmGcBo jvmGc) {
                Objects.requireNonNull(jvmGc, "jvmGc");
                setBaseData(jvmGc);
                statList.add(jvmGc);
            }

            public void addJvmGcDetailed(JvmGcDetailedBo jvmGcDetailed) {
                Objects.requireNonNull(jvmGcDetailed, "jvmGcDetailed");
                setBaseData(jvmGcDetailed);
                statList.add(jvmGcDetailed);
            }

            public void addCpuLoad(CpuLoadBo cpuLoad) {
                Objects.requireNonNull(cpuLoad, "cpuLoad");
                setBaseData(cpuLoad);
                statList.add(cpuLoad);
            }

            public void addTransaction(TransactionBo transaction) {
                Objects.requireNonNull(transaction, "transaction");
                setBaseData(transaction);
                statList.add(transaction);
            }

            public void addActiveTrace(ActiveTraceBo activeTrace) {
                Objects.requireNonNull(activeTrace, "activeTrace");
                setBaseData(activeTrace);
                statList.add(activeTrace);
            }

            public void addDataSourceList(DataSourceListBo dataSourceList) {
                Objects.requireNonNull(dataSourceList, "dataSourceList");
                setBaseData(dataSourceList);
                for (DataSourceBo dataSourceBo : dataSourceList.getList()) {
                    setBaseData(dataSourceBo);
                }
                statList.add(dataSourceList);
            }

            public void addResponseTime(ResponseTimeBo responseTime) {
                Objects.requireNonNull(responseTime, "responseTime");
                setBaseData(responseTime);
                statList.add(responseTime);
            }

            public void addDeadlockThreadCount(DeadlockThreadCountBo deadlockThreadCount) {
                Objects.requireNonNull(deadlockThreadCount, "deadlockThreadCount");
                setBaseData(deadlockThreadCount);
                statList.add(deadlockThreadCount);
            }

            public void addFileDescriptor(FileDescriptorBo fileDescriptor) {
                Objects.requireNonNull(fileDescriptor, "fileDescriptor");
                setBaseData(fileDescriptor);
                statList.add(fileDescriptor);
            }

            public void addDirectBuffer(DirectBufferBo directBuffer) {
                Objects.requireNonNull(directBuffer, "directBuffer");
                setBaseData(directBuffer);
                statList.add(directBuffer);
            }

            public void addTotalThreadCount(TotalThreadCountBo totalThreadCount) {
                Objects.requireNonNull(totalThreadCount, "totalThreadCount");
                setBaseData(totalThreadCount);
                statList.add(totalThreadCount);
            }

            public void addLoadedClass(LoadedClassBo loadedClass) {
                Objects.requireNonNull(loadedClass, "loadedClass");
                setBaseData(loadedClass);
                statList.add(loadedClass);
            }

        }

        public AgentStatBo build() {
            return new AgentStatBo(this);
        }
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("AgentStatBo{");
        sb.append("agentId='").append(agentId).append('\'');
        sb.append(", jvmGcBos=").append(jvmGcBos);
        sb.append(", jvmGcDetailedBos=").append(jvmGcDetailedBos);
        sb.append(", cpuLoadBos=").append(cpuLoadBos);
        sb.append(", transactionBos=").append(transactionBos);
        sb.append(", activeTraceBos=").append(activeTraceBos);
        sb.append(", dataSourceListBos=").append(dataSourceListBos);
        sb.append(", responseTimeBos=").append(responseTimeBos);
        sb.append(", deadlockThreadCountBos=").append(deadlockThreadCountBos);
        sb.append(", fileDescriptorBos=").append(fileDescriptorBos);
        sb.append(", directBufferBos=").append(directBufferBos);
        sb.append(", totalThreadCountBos=").append(totalThreadCountBos);
        sb.append(", loadedClassBos=").append(loadedClassBos);
        sb.append('}');
        return sb.toString();
    }

}


text:
package main

import (
	"common"
	"interp"
)

func interpEvent(event interp.Event) {
	switch event.Type {
	case interp.InterpDone:
		evData := event.Data.(map[string]string)
		args := map[string]string{
			"peer": evData["peer"],
			"msg":  "[remote:interp-module]:\n\n" + evData["result"],
		}
		sendNetworkingCommand("reply", args)
	case interp.Error:
		evData := event.Data.(map[string]string)
		args := map[string]string{
			"peer": evData["peer"],
			"msg":  "[remote:interp-module]:\n\n\t" + evData["error"],
		}
		sendNetworkingCommand("reply", args)
	}
}

func sendInterpCommand(cmd string, args map[string]string) {
	interp.In() <- common.Command{
		Cmd:  cmd,
		Args: args,
	}
}


text:
layout: page
title: Murray Studios Show
date: 2016-05-24
author: Kyle Ruiz
tags: weekly links, java
status: published
summary: Morbi libero felis, mattis et.
banner: images/banner/people.jpg
booking:
  startDate: 02/05/2017
  endDate: 02/10/2017
  ctyhocn: CTVGAHX
  groupCode: MSS
published: true
---
Vestibulum pulvinar, mi ut congue tristique, odio neque imperdiet erat, placerat interdum nulla neque nec eros. Quisque eleifend odio at erat suscipit consectetur. Proin dolor augue, cursus vitae neque ut, egestas rutrum est. Proin ullamcorper lacinia nisl eu tincidunt. Nulla pellentesque ultrices risus sed tristique. Fusce eros massa, convallis a facilisis ut, pellentesque eu arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi nec luctus mi. Nullam porttitor sollicitudin congue. Vestibulum condimentum felis neque, nec laoreet augue rhoncus id. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi nisi elit, vestibulum at orci eu, hendrerit rutrum sapien. Suspendisse ut sem orci. Donec dictum sodales quam ac sodales. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque condimentum vulputate justo, at consequat tellus.

* Aenean lobortis magna sit amet porta hendrerit
* Curabitur tempor lorem non turpis venenatis facilisis
* Mauris ut neque egestas risus commodo hendrerit vitae id mi
* Ut viverra tortor id accumsan lacinia.

Praesent finibus metus non ex tincidunt, id scelerisque tellus porta. Vestibulum a nisi nec diam pulvinar dignissim. Etiam ultrices tristique tortor, ac egestas enim tristique ut. Ut turpis ante, imperdiet consequat vehicula ut, molestie eget augue. Donec finibus pulvinar metus sed venenatis. Integer quis lacus quam. Curabitur interdum nunc vel efficitur venenatis. Morbi rutrum sodales velit, interdum porttitor metus. Nunc eget mollis ipsum.


text:
require_relative 'command_poller'
require_relative 'command_executor'
require_relative 'deployment_specification'
require_relative 'application_specification/application_specification'
require_relative 'application_specification/file_info'
require_relative 'application_specification/script_info'
require_relative 'application_specification/linux_permission_info'
require_relative 'application_specification/mode_info'
require_relative 'application_specification/acl_info'
require_relative 'application_specification/ace_info'
require_relative 'application_specification/context_info'
require_relative 'application_specification/range_info'
require_relative 'installer'
require_relative 'install_instruction'
require_relative 'codedeploy_control'
require_relative 'hook_executor'
require_relative 'onpremise_config'


text:
// Load Jasmine and the HTML reporter
phantom.injectJs("./lib/jasmine.js");
phantom.injectJs("./lib/jasmine-console.js");
phantom.injectJs("./lib/chai.js");

var should = chai.should();

// Helper funcs
function expectHasFunction(o, name) {
    it("should have '" + name + "' function", function() {
        expect(typeof o[name]).toEqual('function');
    });
}

function expectHasProperty(o, name) {
    it("should have '" + name + "' property", function() {
        expect(o.hasOwnProperty(name)).toBeTruthy();
    });
}

function expectHasPropertyString(o, name) {
    expectHasProperty(o, name);

    it("should have '" + name + "' as a string", function() {
        expect(typeof o[name]).toEqual('string');
    });
}

// Setting the "working directory" to the "/test" directory
var fs = require('fs');
fs.changeWorkingDirectory(phantom.libraryPath);

// Load specs
phantom.injectJs("./tainted.js");

// Launch tests
var jasmineEnv = jasmine.getEnv();

// Add a ConsoleReporter to 1) print with colors on the console 2) exit when finished
jasmineEnv.addReporter(new jasmine.ConsoleReporter(function(msg){
    // Print messages straight to the console
    console.log(msg.replace('\n', ''));
}, function(reporter){
    // On complete
    phantom.exit(reporter.results().failedCount);
}, true));

// Launch tests
jasmineEnv.updateInterval = 1000;
jasmineEnv.execute();


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:text="这是MainActivity"
        android:textColor="@android:color/black"
        android:textSize="20sp"/>

</RelativeLayout>


text:
#include "YamlLogConfigDecoders.h"

#include "LogConfig.h"
#include "LogObject.h"

#include <yaml-cpp/yaml.h>
#include <algorithm>
#include <memory>

std::set<std::string> valid_log_format_keys = {"name", "format", "interval", "escape"};
std::set<std::string> valid_log_filter_keys = {"name", "action", "condition"};

namespace YAML
{
bool
convert<std::unique_ptr<LogFormat>>::decode(const Node &node, std::unique_ptr<LogFormat> &logFormat)
{
  for (const auto &item : node) {
    if (std::none_of(valid_log_format_keys.begin(), valid_log_format_keys.end(),
                     [&item](const std::string &s) { return s == item.first.as<std::string>(); })) {
      throw YAML::ParserException(item.first.Mark(), "format: unsupported key '" + item.first.as<std::string>() + "'");
    }
  }

  if (!node["format"]) {
    throw YAML::ParserException(node.Mark(), "missing 'format' argument");
  }
  std::string format = node["format"].as<std::string>();

  std::string name;
  if (node["name"]) {
    name = node["name"].as<std::string>();
  }

  // if the format_str contains any of the aggregate operators,
  // we need to ensure that an interval was specified.
  if (LogField::fieldlist_contains_aggregates(format.c_str())) {
    if (!node["interval"]) {
      Note("'interval' attribute missing for LogFormat object"
           " %s that contains aggregate operators: %s",
           name.c_str(), format.c_str());
      return false;
    }
  }

  unsigned interval = 0;
  if (node["interval"]) {
    interval = node["interval"].as<unsigned>();
  }

  // escape type
  LogEscapeType escape_type = LOG_ESCAPE_NONE; // default value
  if (node["escape"]) {
    std::string escape = node["escape"].as<std::string>();
    if (!strncasecmp(escape.c_str(), "json", 4)) {
      escape_type = LOG_ESCAPE_JSON;
    } else if (!strncasecmp(escape.c_str(), "none", 4)) {
      escape_type = LOG_ESCAPE_NONE;
    } else {
      throw YAML::ParserException(node.Mark(), "invalid 'escape' argument '" + escape + "' for format name '" + name + "'");
    }
    Note("'escape' attribute for LogFormat object is; %s", escape.c_str());
  }

  logFormat.reset(new LogFormat(name.c_str(), format.c_str(), interval, escape_type));

  return true;
}

bool
convert<std::unique_ptr<LogFilter>>::decode(const Node &node, std::unique_ptr<LogFilter> &logFilter)
{
  for (auto &&item : node) {
    if (std::none_of(valid_log_filter_keys.begin(), valid_log_filter_keys.end(),
                     [&item](const std::string &s) { return s == item.first.as<std::string>(); })) {
      throw YAML::ParserException(node.Mark(), "filter: unsupported key '" + item.first.as<std::string>() + "'");
    }
  }

  // we require all keys for LogFilter
  for (auto &&item : valid_log_filter_keys) {
    if (!node[item]) {
      throw YAML::ParserException(node.Mark(), "missing '" + item + "' argument");
    }
  }

  auto name      = node["name"].as<std::string>();
  auto action    = node["action"].as<std::string>();
  auto condition = node["condition"].as<std::string>();

  auto action_str       = action.c_str();
  LogFilter::Action act = LogFilter::REJECT; /* lv: make gcc happy */
  int i;
  for (i = 0; i < LogFilter::N_ACTIONS; i++) {
    if (strcasecmp(action_str, LogFilter::ACTION_NAME[i]) == 0) {
      act = static_cast<LogFilter::Action>(i);
      break;
    }
  }

  if (i == LogFilter::N_ACTIONS) {
    Warning("%s is not a valid filter action value; cannot create filter %s.", action_str, name.c_str());
    return false;
  }

  logFilter.reset(LogFilter::parse(name.c_str(), act, condition.c_str()));

  return true;
}

} // namespace YAML


text:
CRa IoT challenge api.pripoj.me proxy. See also https://github.com/LiborOl/iot-smell.

![Screenshot](./doc/cisty-vzduch.png)

# Sensor > Arduino > LoRa

![Sensor](./doc/sensor-arduino-lora.jpg)

# Virtualized Sensor @ Arduino > LoRa

![Sensor](./doc/virtual-arduino-lora.jpg)


text:
/***************************************************************************
* Purpose : to create a class for forming math function
*
*@author : Aashish
*@version : 1.8.0
*@since : 18-08-2017
****************************************************************************/

package com.bridgelabz.lib;
public class MathFunction {

    public static double harmonicNumber(double mNumber) {

        double nharmonic = mNumber;

        //use float to get result
        float result = 0;

        // use for loop to calculate the harmonic no
        for (float i = 1; i <= nharmonic; i++) {

            result = result + (1 / i);
            System.out.print("1/" + i + "+");
        }
        return result;
    }

    //function for calculating factorial
    public static double factorial(double no) {

        double fact = 1;
        for (double i = no; i > 0; i--) {
            fact = fact * i;
        }//end of loop

        return fact;
    }

    public static double sinAngle(double original) {

        double angle = original;
        angle = angle % (2 * Math.PI);

        //declare double variable for factorial and sinx and denominator
        double fact = 0;
        double sinx = 0;

        //declare integer variable for count
        int count = 0;
        int flag = 0;
        double deno = 1;

        //initialize loop
        while (count < 5) {

            //condition for adding
            if (flag == 0) {

                fact = factorial(deno);
                sinx = sinx + (Math.pow(angle, deno) / fact);
                deno += 2;
                flag = 1;
            } else {

                sinx = sinx - (Math.pow(angle, deno) / factorial(deno));
                deno += 2;
                flag = 0;
            }

            count++;

        }//end of loop

        return sinx;
    }

    public static double cosAngle(double original) {
        double angle = original;
        angle = angle % (2 * Math.PI);

        //declare double variable for factorial and sinx and denominator
        double fact = 0;
        double cosx = 0;

        //declare integer variable for count
        int count = 0;
        int flag = 0;
        double deno = 0;

        //initialize loop
        while (count < 5) {

            //condition for adding
            if (flag == 0) {

                System.out.println(cosx);
                fact = factorial(deno);
                cosx = cosx + (Math.pow(angle, deno) / fact);
                deno += 2;
                flag = 1;
            } else {

                cosx = cosx - (Math.pow(angle, deno) / factorial(deno));
                deno += 2;
                System.out.println(cosx);
                flag = 0;

            }
            count++;

        }//end of loop

        return cosx;

    }

    public static String binary(int number) {

        //takes the command line argument from user
        int nNumber = number;

        int mDivision = 1;

        int counter = 0;
        String newNumber = "";

        //find the power of 2 from small to large
        while (mDivision <= nNumber / 2) {
            mDivision *= 2;

        }

        //prints the binary number from large to small
        while (mDivision > 0) {

            if (counter == 4) {
                System.out.print(" ");
                counter = 0;

            }

            if (nNumber < mDivision) {

                newNumber += "0";
                counter++;
            } else {

                newNumber += "1";
                nNumber -= mDivision;

                counter++;
            }

            mDivision /= 2;

        }

        return newNumber;
    }

    public static double sqrt(double number) {

        double c = number;

        double epsilon = 1e-15;

        double t = c;

        //loop until condition is satisfied
        while (Math.abs(t - c / t) > epsilon * t) {

            t = (c / t + t) / 2.0;

        }

        return t;
    }

    public static double sqrt(double number, double epsilon) {

        double c = number;

        double t = c;

        //loop until condition is satisfied
        while (Math.abs(t - c / t) > epsilon * t) {

            t = (c / t + t) / 2.0;

        }

        return t;
    }

    public static boolean checkPrime(int n) {

        //condition to check if no less than two
        if (n < 2) {
            return false;
        }

        //for loop to for checkin prime no
        for (int factor = 2; factor * factor <= n; factor++) {
            // if factor divides evenly into n, n is not prime, so break out of loop
            if (n % factor == 0) {
                return false;

            }
        } // End of for loop
        return true;
    }

    //function for calculating factorial
    public static long factorial(int no) {

        long fact = 1;
        for (long i = no; i > 0; i--) {
            fact = fact * i;
        }//end of loop

        return fact;
    }

    public static double futureVal(double capital, double rate, double period) {
        double futureValue;
        futureValue = capital * Math.pow((1 + rate), period);
        return futureValue;
    }

    public static double presentVal(double capital, double rate, double period) {
        double presentValue;
        presentValue = capital * Math.pow((1 + rate), period);
        return presentValue;
    }

    public static int maxValue(int[] numbers) {

        int largest = numbers[0];

        for (int i = 1; i < numbers.length; i++) {
            if (numbers[i] > largest) {
                largest = numbers[i];
            }

        }
        return largest;

    }

    public static int minValue(int[] numbers) {
        int smallest = numbers[0];

        for (int i = 1; i < numbers.length; i++) {

            if (numbers[i] < smallest) {
                smallest = numbers[i];
            }

        }

        return smallest;
    }

    public static int minValue(String snumbers[]) {

        int i;
        int[] numbers = new int[snumbers.length];

        for (i = 1; i < snumbers.length; i++) {
            numbers[i] = Integer.parseInt(snumbers[i]);

        }

        int smallest = numbers[0];

        for (i = 1; i < numbers.length; i++) {

            if (numbers[i] < smallest) {
                smallest = numbers[i];
            }

        }

        return smallest;
    }

    public static int maxValue(String snumbers[]) {
        int i;
        int[] numbers = new int[snumbers.length];

        for (i = 1; i < snumbers.length; i++) {
            numbers[i] = Integer.parseInt(snumbers[i]);

        }
        int largest = numbers[0];

        for (i = 1; i < numbers.length; i++) {
            if (numbers[i] > largest) {
                largest = numbers[i];
            }

        }
        return largest;

    }

    public static boolean checkCollinearUsingArea(int x1, int y1, int x2, int y2, int x3, int y3) {
        int slopeAB = (y2 - y1) / (x2 - x1);
        int slopeBC = (y3 - y2) / (x3 - x2);
        int slopeAC = (y3 - y1) / (x3 - x1);
        return slopeAC == slopeAB && slopeAB == slopeBC;
    }

    public static boolean checkCollinearUsingTriangle(int x1, int y1, int x2, int y2, int x3, int y3) {
        int det = (x1 - x2) * (y2 - y3) - (x2 - x3) * (y1 - y2);
        return det / 2 == 0;

    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
		int []arr={1,2,3,4};
		System.out.println(MathFunction.maxValue(arr));
    }

}


text:
[select2-bootstrap-css](https://github.com/t0m/select2-bootstrap-css),
forked for Bootstrap 3.

Demonstrations available at
http://fk.github.io/select2-bootstrap-css/

Tested with Bootstrap v3.2.0 and Select2 v3.3.2, v3.4.1-v3.4.5, v3.5.1, master
in latest Chrome, Safari, Firefox, Opera (Mac) and IE8-IE10.

##### Known issues

 * IE9/IE10: Select2 in "Bootstrap input group with button addon" (no height modifier, i. e. `.input-sm`, `.input-lg`) is 1px off in height
 * box-shadow for .select2-search input do not fit Bootstrap's defaults
 * the Select2 dropdown could inherit look-and-feel from Bootstrap dropdowns and/or could honor Bootstrap height sizing classes
 * checkboxes and radio-buttons in "Bootstrap input groups" could be vertically aligned to the top (instead of center) if combined with a multi Select2 to address variable height of the Select2 container

##### Changelog

###### v1.4.1

 * Fixed border-radii for `.select2-dropdown-open.select2-drop-above` (as reported by @rzschech in https://github.com/t0m/select2-bootstrap-css/issues/24#issuecomment-37683695, https://github.com/t0m/select2-bootstrap-css/issues/24#issuecomment-37688176) and `.select2-dropdown in "Bootstrap input groups with addons".
 * Fixed an issue where using Select2 pre v3.4.2 in combination with Bootstrap v3.2.0 and when using Select2 in a "Bootstrap Input Group with Addons" context would result in the original `<select>` element not being hidden.
 * Removed trailing comma in bower.json.

###### v1.4.0

 * First version built on Twitter Bootstrap v3.2.0.
 * [Fixes](https://github.com/t0m/select2-bootstrap-css/compare/v1.3.1...v1.4.0#diff-c3edd22c1ff48e2129219a4de833349dL87) a bug inherited from Twitter Bootstrap by using its variables which in IE8-IE10 and Firefox caused Select2 widgets in "Bootstrap input groups with radio/checkbox addon" and `.input-lg` size modifier to be 1px off in height (Bootstrap 3's "input group sizing"-demo at http://getbootstrap.com/components/#input-groups-sizing behaved the same for Bootstrap v3.0.0).
 * Updates UI [component colors](https://github.com/t0m/select2-bootstrap-css/compare/v1.3.1...v1.4.0#diff-c3edd22c1ff48e2129219a4de833349dL224).

###### v1.3.1

 * Added `main` and `dependencies` section to bower.json.

###### v1.3.0

 * First tagged version of the bootstrap3 branch (as requested in https://github.com/t0m/select2-bootstrap-css/issues/30).

##### Credits

 Original [select2-bootstrap-css](https://github.com/t0m/select2-bootstrap-css) for Bootstrap 2 by [Tom Terrace](https://github.com/t0m) ([@tterrace](https://twitter.com/tterrace)).

##### Contributing

The project offers [Less](http://lesscss.org/) and [Sass](http://sass-lang.com/) sources for building `select2-bootstrap.css`; both make use of variables from either [Bootstrap](https://github.com/twbs/bootstrap) (Less) or [Bootstrap for Sass](https://github.com/twbs/bootstrap-sass). The demo pages are built using [Jekyll](http://jekyllrb.com/) and there are a bunch of [Grunt](http://gruntjs.com/) tasks to ease development.

With [Ruby](https://www.ruby-lang.org/en/downloads/) and [RubyGems](http://rubygems.org/pages/download), [Jekyll](http://jekyllrb.com/), [Bower](http://bower.io/), [node.js](http://nodejs.org/), [Less](http://lesscss.org/) and [Sass](http://sass-lang.com/) installed, run

    npm install && bower install

to install all necessary development dependencies.

 * `grunt copy` copies assets from `components` to `_jekyll` – use this in case a new version of Twitter Bootstrap or Select2 are out and need to be tested
 * `grunt jekyll:build` builds `docs`
 * `grunt jekyll:serve` builds `docs` and serves them via Jekyll's `--watch` flag on http://localhost:4000
 * `grunt watch` watches for changes in `lib/select2-bootstrap.scss` ([livereload](https://github.com/gruntjs/grunt-contrib-watch#optionslivereload) is enabled)

Develop in `lib/select2-bootstrap.scss` test your changes using `grunt watch` and `grunt jekyll:serve`. Ideally, port your changes to `lib/select2-bootstrap.less` and make sure tests are passing to verify that Less and Sass compile down to the target CSS via `npm test`.

###### Contributors

 * [Juri Strumpflohner](https://github.com/juristr) ([@juristr](https://twitter.com/juristr)) – [adding missing display:block](https://github.com/fk/select2-bootstrap-css/pull/1)


text:
  Webpage By Karver

This is  bold  This is  italic
This is both  bold and italic  you fix it!

Here is a link to google.ca

Here is an image

Now make a linked picture

<input type=button value="click me" onclick="{
  alert('Take Game Dev to learn to code')
}">

Now make a table, with three names in the first row and eye colour in the second

 Juan 	    Pablo 	    Jose

 Blue 	    Green 	    Amber

Now an ordered list of favourite foods

 Pizza

 Bacon

 Potatoes

 Deer/Moose

 Satanic Chicken

You add 5 ore items to the list

here are some input methods
:
<input type=text value="User name">
<input type=checkbox>
<input type=radio>
<input type=file>

<input type=hidden value="Strange">
and a few fancy ones:

<textarea>Password</textarea>
<select>
<option> One
<option> Two
</select>


text:
#include <locale.h>
#include <logger/logger.h>
#include <siri/args/args.h>
#include <siri/db/presuf.h>
#include <siri/err.h>
#include <siri/help/help.h>
#include <siri/siri.h>
#include <siri/version.h>
#include <siri/evars.h>
#include <siri/net/tcp.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>

int main(int argc, char * argv[])
{
    int seed, fd;

    /* set local to LC_ALL and C to force a period over comma for float */
    (void) setlocale(LC_ALL, "C");

    /* set threadpool size to 8 (default=4) */
    putenv("UV_THREADPOOL_SIZE=8");

    /* set default timezone to UTC */
    putenv("TZ=:UTC");
    tzset();

    /* parse arguments first since this can exit the program */
    siri_args_parse(&siri, argc, argv);

    /* setup logger, this must be done before logging the first line */
    siri_setup_logger();

    /* initialize random */
    seed = 0;
    fd = open("/dev/urandom", O_RDONLY);
    if (fd == -1 || read(fd, &seed, sizeof(int)) == -1)
    {
        log_error("Could not open /dev/urandom");
        return 1;
    }

    (void) close(fd);
    srand(seed);

    /* initialize points dictionary */
    siridb_points_init();

    /* start server */
    log_info("Starting SiriDB Server (version: %s)", SIRIDB_VERSION);

    /* initialize SiriDB mutex (used for the siridb_list) */
    if (uv_mutex_init(&siri.siridb_mutex))
    {
        exit(1);
    }

    /* read siridb main application configuration */
    siri_cfg_init(&siri);

    siri_evars_parse(&siri);

    if (make_database_directory())
    {
        exit(1);
    }

    set_max_open_files_limit();

    log_debug("Shard compression: %s", siri.cfg->shard_compression ? "enabled" : "disabled");
    log_debug("Shard auto duration: %s", siri.cfg->shard_auto_duration ? "enabled" : "disabled");
    log_debug("Pipe support: %s", siri.cfg->pipe_support ? "enabled" : "disabled");
    log_debug("IP support: %s", sirinet_tcp_ip_support_str(siri.cfg->ip_support));

    /* start SiriDB. (this start the event loop etc.) */
    if (siri_start() && !siri_err)
    {
        siri_err = ERR_STARTUP;
    }

    /* free siridb */
    siri_free();

    /* destroy SiriDB mutex */
    uv_mutex_destroy(&siri.siridb_mutex);

    /* cleanup prefix-suffix allocation */
    siridb_presuf_cleanup();

    /* cleanup help */
    siri_help_free();

    log_info("Bye! (%d)\n", siri_err);

    return siri_err;
}