text:
/*!
 * Start Bootstrap - Agency Bootstrap Theme (http://startbootstrap.com)
 * Code licensed under the Apache License v2.0.
 * For details, see http://www.apache.org/licenses/LICENSE-2.0.
 */

body {
    overflow-x: hidden;
    font-family: "Roboto Slab","Helvetica Neue",Helvetica,Arial,sans-serif;
    color: #{{ site.color.secondary-dark }};
}

.text-muted {
    color: #777;
}

.text-primary {
    color: #{{ site.color.primary }};
}

p {
    font-size: 14px;
    line-height: 1.75;
}

p.large {
    font-size: 16px;
}

a,
a:hover,
a:focus,
a:active,
a.active {
    outline: 0;
}

a {
    color: #{{ site.color.primary }};
}

a:hover,
a:focus,
a:active,
a.active {
    color: #{{ site.color.secondary }};
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 700;
}

.img-centered {
    margin: 0 auto;
}

.bg-light-gray {
    background-color: #f7f7f7;
}

.bg-darkest-gray {
    background-color: #222;
}

.btn-primary {
    border-color: #{{ site.color.primary }};
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 700;
    color: #fff;
    background-color: #{{ site.color.primary }};
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
    border-color: #{{ site.color.primary }};
    color: #fff;
    background-color: #{{ site.color.secondary }};
}

.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
    background-image: none;
}

.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
    border-color: #{{ site.color.primary }};
    background-color: #{{ site.color.primary }};
}

.btn-primary .badge {
    color: #{{ site.color.primary }};
    background-color: #fff;
}

.btn-xl {
    padding: 20px 40px;
    border-color: #{{ site.color.primary }};
    border-radius: 3px;
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background-color: #{{ site.color.primary }};
}

.btn-xl:hover,
.btn-xl:focus,
.btn-xl:active,
.btn-xl.active,
.open .dropdown-toggle.btn-xl {
    border-color: #{{ site.color.primary }};
    color: #fff;
    background-color: #{{ site.color.secondary }};
}

.btn-xl:active,
.btn-xl.active,
.open .dropdown-toggle.btn-xl {
    background-image: none;
}

.btn-xl.disabled,
.btn-xl[disabled],
fieldset[disabled] .btn-xl,
.btn-xl.disabled:hover,
.btn-xl[disabled]:hover,
fieldset[disabled] .btn-xl:hover,
.btn-xl.disabled:focus,
.btn-xl[disabled]:focus,
fieldset[disabled] .btn-xl:focus,
.btn-xl.disabled:active,
.btn-xl[disabled]:active,
fieldset[disabled] .btn-xl:active,
.btn-xl.disabled.active,
.btn-xl[disabled].active,
fieldset[disabled] .btn-xl.active {
    border-color: #{{ site.color.primary }};
    background-color: #{{ site.color.primary }};
}

.btn-xl .badge {
    color: #{{ site.color.primary }};
    background-color: #fff;
}

.navbar-default {
    border-color: transparent;
    background-color: #222;
}

.navbar-default .navbar-brand {
    font-family: "Droid Serif","Helvetica Neue",Helvetica,Arial,cursive;
    color: #{{ site.color.primary }};
}

.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus,
.navbar-default .navbar-brand:active,
.navbar-default .navbar-brand.active {
    color: #{{ site.color.secondary }};
}

.navbar-default .navbar-collapse {
    border-color: rgba(255,255,255,.02);
}

.navbar-default .navbar-toggle {
    border-color: #{{ site.color.primary }};
    background-color: #{{ site.color.primary }};
}

.navbar-default .navbar-toggle .icon-bar {
    background-color: #fff;
}

.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
    background-color: #{{ site.color.primary }};
}

.navbar-default .nav li a {
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
    color: #fff;
}

.navbar-default .nav li a:hover,
.navbar-default .nav li a:focus {
    outline: 0;
    color: #{{ site.color.primary }};
}

.navbar-default .navbar-nav>.active>a {
    border-radius: 0;
    color: #fff;
    background-color: #{{ site.color.primary }};
}

.navbar-default .navbar-nav>.active>a:hover,
.navbar-default .navbar-nav>.active>a:focus {
    color: #fff;
    background-color: #{{ site.color.secondary }};
}

.navbar-fixed-top {
    position: relative;
}

@media(min-width:768px) {
    .navbar-default {
        padding: 25px 0;
        border: 0;
        background-color: transparent;
        -webkit-transition: padding .3s;
        -moz-transition: padding .3s;
        transition: padding .3s;
    }

    .navbar-default .navbar-brand {
        visibility: hidden;
        font-size: .1em;
        -webkit-transition: all .3s;
        -moz-transition: all .3s;
        transition: all .3s;
    }

    .navbar-default .navbar-nav>.active>a {
        border-radius: 3px;
    }

    .navbar-default.navbar-shrink {
        padding: 20px 0px 0px 0px;
        background-color: #222;
    }

    .navbar-default.navbar-shrink .navbar-brand {
        visibility: visible;
        font-size: 1.5em;
    }

    .navbar-fixed-top {
        position: fixed;
    }

    .navbar-override {
        background-color: #222;
        padding: 20px 0px 0px 0px;
    }
}

@media (min-width: 768px) {
    .navbar .navbar-nav {
        display: inline-block;
        float: none;
        vertical-align: top;
    }

    .navbar .navbar-collapse {
        text-align: center;
    }
}

.slide-item {
    background-position: center center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -o-background-size: cover;
    padding-bottom: 1000px;
}

#slide-innovation {
    background-image: url(/img/bulb.jpg);
}

#slide-security {
    background-image: url(/img/key.jpg);
}

#slide-numbers {
    background-image: url(/img/numbers.jpg);
}

#slide-outdoors {
    background-image: url(/img/mountain-lake.jpg);
}

.side-bar .content {
    background: white;
    clear: left;
    font: 14px Helvetica, Arial, sans-serif;
    /*width: 240px;*/
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.side-bar .content iframe {
    width: 220px;
}

.side-bar .content li {
    line-height: 16pt;
}

.slide-image {
    margin-top: -150px;
    /*opacity: 0.7;*/
}

@media(min-width: 768px) {
    .side-bar .content {
        width: 240px;
    }
}

@media(min-width:1px) {

    .logo .intro-text {
        width: 75%;
    }

    .logo a {
        text-decoration: none;
        color: #{{ site.color.secondary-dark }}
    }

    .logo a:hover,
    .logo a:focus,
    .logo a:active,
    .logo a.active {
        color: #{{ site.color.secondary-dark }};
    }

    .logo img {
        margin: 0 auto;
        padding-bottom: 10px;
        margin-top: 5px;
        height: 100px;
        width: auto;
        margin-right: 20px;
    }

    .logo .intro-text .intro-lead-in {
        /*margin-top: -28px;*/
        margin-bottom: 5px;
        font-family: "Oswald","Helvetica Neue",Helvetica,Arial,sans-serif;
        font-size: 30px;
        font-weight: 300;
        text-transform: uppercase;
        color: white;
    }

    .logo .intro-text .intro-heading {
        font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
        font-size: 10px;
        font-weight: 700;
        color: white;
    }
}

@media(min-width:768px) {

    .logo .intro-text {
        width: 400px;
    }

    .logo a {
        text-decoration: none;
        color: #{{ site.color.secondary-dark }}
    }

    .logo a:hover,
    .logo a:focus,
    .logo a:active,
    .logo a.active {
        color: #{{ site.color.secondary-dark }};
    }

    .logo img {
        margin: 0 auto;
        padding-bottom: 10px;
        margin-top: 10px;
        height: 100px;
        width: auto;
        margin-right: 20px;
    }

    .logo .intro-text .intro-lead-in {
        margin-top: -28px;
        margin-bottom: 5px;
        font-family: "Oswald","Helvetica Neue",Helvetica,Arial,sans-serif;
        font-size: 50px;
        font-weight: 300;
        text-transform: uppercase;
        color: white;
    }

    .logo .intro-text .intro-heading {
        font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
        font-size: 14px;
        font-weight: 700;
        color: white;
    }
}

#patterns-embed {
    height: 320px;
    width: 320px;
}

.slide-item p {
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 16px;
    font-weight: 400;
}

.slide-item a {
    color: #{{ site.color.secondary }}
}

.slide-item a:hover,
.slide-item a:focus,
.slide-item a:active,
.slide-item a.active {
    color: #{{ site.color.secondary }};
}

section {
    padding: 100px 0;
}

section h2.section-heading {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 40px;
}

section h3.section-subheading {
    margin-bottom: 75px;
    text-transform: none;
    font-family: "Droid Serif","Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
}

@media(min-width:768px) {
    section {
        padding: 150px 0;
    }
}

.service-heading {
    margin: 15px 0;
    text-transform: none;
}

.about img {
    margin: 0 auto;
    height: 200px;
    width: auto;
}

.about img.logos {
    margin: 0 auto;
    height: 75px;
    width: auto;
}

.my-work {
    margin-bottom: 50px;
    text-align: center;
}

.my-work img {
    margin: 0 auto;
}

.my-work h4 {
    margin-top: 25px;
    margin-bottom: 0;
    text-transform: none;
}

.my-work p {
    margin-top: 0;
}

.blog-teaser {
    padding: 20px 20px;
    margin-left: 6px;
    margin-right: 6px;
    margin-bottom: 30px;
    text-align: center;
    min-height: 400px;
    background-color: white;
}

.blog-teaser img {
    margin: 0 auto;
    height: 125px;
    width: auto;
    border-color: rgba(63,63,65,.4);
    border-width: 3px;
    border-style: solid;
}

.blog-teaser h4 {
    margin-top: 25px;
    margin-bottom: 10px;
    text-transform: none;
}

.blog-teaser p {
    margin-top: 0;
}

footer {
    padding: 25px 0;
    text-align: center;
}

footer span.copyright {
    text-transform: uppercase;
    text-transform: none;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    line-height: 40px;
}

footer ul.quicklinks {
    margin-bottom: 0;
    text-transform: uppercase;
    text-transform: none;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    line-height: 40px;
}

ul.social-buttons {
    margin-bottom: 0;
}

ul.social-buttons li a {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    font-size: 20px;
    line-height: 40px;
    outline: 0;
    color: #fff;
    background-color: #222;
    -webkit-transition: all .3s;
    -moz-transition: all .3s;
    transition: all .3s;
}

ul.social-buttons li a:hover,
ul.social-buttons li a:focus,
ul.social-buttons li a:active {
    background-color: #{{ site.color.primary }};
}

.btn:focus,
.btn:active,
.btn.active,
.btn:active:focus {
    outline: 0;
}

::-moz-selection {
    text-shadow: none;
    background: #{{ site.color.primary }};
}

::selection {
    text-shadow: none;
    background: #{{ site.color.primary }};
}

img::selection {
    background: 0 0;
}

img::-moz-selection {
    background: 0 0;
}

body {
    webkit-tap-highlight-color: #{{ site.color.primary }};
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.widget-title {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 23px;
    margin: 0;
    padding: 0 0 20px 0;
    text-align: left;
}

.bg-gray {
    background: #efefef;
}

.blog-info {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
    border-radius: 10px;
}

.blog-content {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
    border-radius: 10px;
    word-wrap: break-word;
}

@media(min-width:1px) {
    .mobile-hide {
        display: none;
    }
}

@media(min-width:768px) {
    .mobile-hide {
        display: block;
    }
}

.leader {
    background: white;
    clear: left;
    font: 14px Helvetica, Arial, sans-serif;
    /*width: 800px;*/
    padding: 10px;
    border-radius: 10px;
    margin: 20px 0px;
}

@media(min-width: 1px) {
    .leader-ad-mobile {
        display: inline-block;
    }

    .leader-ad-regular {
        display: none;
    }
}

@media(min-width: 768px) {
    .leader-ad-mobile {
        display: none;
    }

    .leader-ad-regular {
        display: inline-block;
    }
}


text:
package com.opengamma.util.result;

import com.google.common.base.Function;

/**
 * Functional interface that can transform a result.
 *
 * @param <R> the result type
 * @param <T> the type of the transformed result
 * @deprecated use a general purpose function type and {@link Result#ifSuccess(Function)} or
 * {@link Result#flatMap(Function)}
 */
@Deprecated
public interface ResultMapper<R, T> {

  /**
   * Transforms the input.
   *
   * @param result the result to be transformed
   * @return the transformed result, not null
   */
  Result<T> map(R result);
}

redpajama_set_name: RedPajamaGithub


text:
package com.mtech.easyexchange.manager.exception;

public class OrderNotFoundException extends Exception {
}


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _pure = require('recompose/pure');

var _pure2 = _interopRequireDefault(_pure);

var _SvgIcon = require('../../SvgIcon');

var _SvgIcon2 = _interopRequireDefault(_SvgIcon);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var ActionInfoOutline = function ActionInfoOutline(props) {
  return _react2.default.createElement(
    _SvgIcon2.default,
    props,
    _react2.default.createElement('path', { d: 'M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z' })
  );
};
ActionInfoOutline = (0, _pure2.default)(ActionInfoOutline);
ActionInfoOutline.displayName = 'ActionInfoOutline';

exports.default = ActionInfoOutline;


text:
![Build Status](https://github.com/CFWS/Periodic/workflows/Periodic/badge.svg)

Periodic is a minimalistic Periodic Table of Elements, coded in HTML, CSS and Javascript.

## Development

```shell
$ npm install
$ npm build
```

Element information are stored in JSON files located in the ```'build/Elements'``` folder.

## Features

- Multi-Browser Support
- Mobile Support
- Responsive Design

## Licenses

- [HERO Light - EULA Free Font License Ver. 2.0](https://github.com/CFWS/Periodic/blob/master/\_licenses/EULA%20Free%20Font%20License%20Ver.%202.0.pdf)

- Please note that element information may be subjected to copyright, as it is derived from [jlab](https://education.jlab.org/itselemental/) and other sources (like IUPAC)

[![Periodic](img/TableHero.png)](https://cfws.github.io/Periodic/)


text:
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Diagnostics.Contracts;
using System;

// Disable the "this variable is not used" warning as every field would imply it.
#pragma warning disable 0414
// Disable the "this variable is never assigned to".
#pragma warning disable 0067
// Disable the "this event is never assigned to".
#pragma warning disable 0649
// Disable the "this variable is never used".
#pragma warning disable 0169
// Disable the "new keyword not required" warning.
#pragma warning disable 0109
// Disable the "extern without DllImport" warning.
#pragma warning disable 0626
// Disable the "could hide other member" warning, can happen on certain properties.
#pragma warning disable 0108

namespace System.Web.UI
{
  public partial class ComplexPropertyEntry : BuilderPropertyEntry
  {
    #region Methods and constructors
    internal ComplexPropertyEntry()
    {
    }
    #endregion

    #region Properties and indexers
    public bool IsCollectionItem
    {
      get
      {
        return default(bool);
      }
    }

    public bool ReadOnly
    {
      get
      {
        return default(bool);
      }
      set
      {
      }
    }
    #endregion
  }
}


text:
`StoreModule` is a class derived from [[Module]].

## Public Static Methods

* `[[StoreModule::getInstance]]()`

## Public Methods

* `[[StoreModule::__construct]]()`
* `[[StoreModule::updateSchema]]()`


text:
package com.lucidera.luciddb.test;

import java.sql.*;
import java.util.*;

import org.luciddb.test.*;

import net.sf.farrago.catalog.*;
import net.sf.farrago.jdbc.*;
import net.sf.farrago.test.*;
import net.sf.farrago.util.*;

import org.eigenbase.util.property.*;

/**
 * LucidDB JDBC test for testing label settings
 *
 * @author Zelaine Fong
 * @version $Id$
 */
public class LucidDbJdbcLabelTest
    extends FarragoTestCase
{
    //~ Constructors -----------------------------------------------------------

    public LucidDbJdbcLabelTest(String testname)
        throws Exception
    {
        super(testname);
    }

    //~ Methods ----------------------------------------------------------------

    public void setUp()
        throws Exception
    {
        // Set the properties so the LucidDB session factory and LucidDB data
        // files are used.  The LucidDB data files need to be used; otherwise,
        // we won't use versioned data segment pages.
        //
        // REVIEW zfong 7/11/08 - Is there a better way of doing this?
        FarragoProperties farragoPropInstance = FarragoProperties.instance();
        StringProperty sessionFactory =
            farragoPropInstance.defaultSessionFactoryLibraryName;
        System.setProperty(
            sessionFactory.getPath(),
            "class:org.luciddb.session.LucidDbSessionFactory");
        String homeDirString = farragoPropInstance.homeDir.get(true);
        String catalogDir = homeDirString + "/../luciddb/catalog";
        farragoPropInstance.catalogDir.set(catalogDir);

        // Create a new connection so we're sure we have the right session
        // factory and db
        if (connection != null) {
            connection.close();
        }

        connection = newConnection();
        repos = getSession().getRepos();
        saveParameters();

        runCleanup();
        super.setUp();
    }

    public static void runCleanup()
        throws Exception
    {
        // Use the special LucidDB cleanup factory to avoid dropping schemas
        // like APPLIB
        FarragoTestCase.CleanupFactory.setFactory(new LucidDbCleanupFactory());
        FarragoTestCase.runCleanup();
    }

    public void tearDown()
        throws Exception
    {
        // Close the connection created by this test.
        if (connection != null) {
            connection.close();
            connection = null;
        }
    }

    public void testInvalidLabelInConnectString()
        throws Exception
    {
        final String driverURI = "jdbc:luciddb:";
        FarragoAbstractJdbcDriver driver =
            FarragoTestCase.newJdbcEngineDriver();
        Properties props = newProperties();
        props.setProperty("label", "foo");
        try {
            driver.connect(driverURI, props);
            fail(
                "connection should fail because of invalid label");
        } catch (Exception ex) {
            FarragoJdbcTest.assertExceptionMatches(
                ex,
                ".*Invalid label property.*");
        }
    }

    public void testLabelSetting()
        throws Exception
    {
        final String driverURI = "jdbc:luciddb:";
        FarragoAbstractJdbcDriver driver =
            FarragoTestCase.newJdbcEngineDriver();
        Properties props = newProperties();

        // Create a label based on an empty table
        Connection conn = driver.connect(driverURI, props);
        Statement stmt = conn.createStatement();
        stmt.executeUpdate("create schema s");
        stmt.executeUpdate("set schema 's'");
        stmt.executeUpdate("create table t(a int)");
        stmt.executeUpdate("create label l");
        stmt.executeUpdate("insert into t values(1)");
        stmt.close();
        conn.close();

        // Set up a connection based on that label and select from the
        // table.  It should return no rows.
        props.setProperty("label", "L");
        props.setProperty("schema", "S");
        conn = driver.connect(driverURI, props);
        stmt = conn.createStatement();
        ResultSet rset = stmt.executeQuery("select * from t");
        assertTrue("expected no rows", !rset.next());
        stmt.close();
        conn.close();

        // Now create a connection without the label setting and make sure
        // the query now returns 1 row.
        props.remove("label");
        props.setProperty("schema", "S");
        conn = driver.connect(driverURI, props);
        stmt = conn.createStatement();
        rset = stmt.executeQuery("select * from t");
        assertTrue("expected a row", rset.next());
        stmt.close();
        conn.close();
    }

    /**
     * Creates test connection properties.
     */
    private static Properties newProperties()
    {
        Properties props = new Properties();
        props.put("user", FarragoCatalogInit.SA_USER_NAME);
        props.put("password", "");
        return props;
    }

    /**
     * Cleanup factory that uses LucidDbTestCleanup
     */
    private static class LucidDbCleanupFactory
        extends FarragoTestCase.CleanupFactory
    {
        public Cleanup newCleanup(String name)
            throws Exception
        {
            return new LucidDbTestCleanup(connection);
        }
    }
}

// End LucidDbJdbcLabelTest.java


text:
chrome.app.runtime.onLaunched.addListener(function() {
  var IN_APP_RELATIVE_URL = 'nav-target.html';
  var IN_APP_ABSOLUTE_URL = chrome.runtime.getURL(IN_APP_RELATIVE_URL);
  var WEB_URL = 'http://chromium.org';

  var testLink = document.createElement('a');
  document.body.appendChild(testLink);

  function clickTestLink() {
    var clickEvent = document.createEvent('MouseEvents');
    clickEvent.initMouseEvent('click', true, true, window,
                              0, 0, 0, 0, 0, false, false,
                              false, false, 0, null);

    return testLink.dispatchEvent(clickEvent);
  }

  // Tests are verified in C++ at the end of the run, by looking at the tabs
  // these tests create.
  var tests = [
    // Trying to open a local resource in a new window will fail.
    function windowOpenInAppRelativeURL() {
      var w = window.open(IN_APP_RELATIVE_URL);
      // TODO(lazyboy): Enable the assert once http://crbug.com/585570 is fixed.
      //chrome.test.assertTrue(!w);
      chrome.test.succeed();
    },
    // Trying to open a local resource in a new window will fail.
    function openLinkToInAppRelativeURL() {
      testLink.target = '_blank';
      testLink.href = IN_APP_RELATIVE_URL;
      clickTestLink();
      chrome.test.succeed();
    },
    // Similar to windowOpenInAppRelativeURL().
    function windowOpenInAppAbsoluteURL() {
      var w = window.open(IN_APP_ABSOLUTE_URL);
      // TODO(lazyboy): Enable the assert once http://crbug.com/585570 is fixed.
      //chrome.test.assertTrue(!w);
      chrome.test.succeed();
    },
    // Similar to openLinkToInAppRelativeURL().
    function openLinkToInAppAbsoluteURL() {
      testLink.target = '_blank';
      testLink.href = IN_APP_ABSOLUTE_URL;
      clickTestLink();
      chrome.test.succeed();
    },
    // Opening web links in new window will pass.
    // The opened tab will be verified in C++.
    function windowOpenWebURL() {
      var w = window.open(WEB_URL);
      chrome.test.assertTrue(!!w);
      chrome.test.succeed();
    },
    // Opening web links in new window will pass.
    // The opened tab will be verified in C++.
    function openLinkToWebURL() {
      testLink.target = '_blank';
      testLink.href = WEB_URL;
      clickTestLink();
      chrome.test.succeed();
    }
  ];
  chrome.test.runTests(tests);
});


text:
import React, { Component } from 'react';
import { Link } from 'react-router';
import config from '../../config';
import {LinkContainer} from 'react-router-bootstrap';

export default class Home extends Component {
  render() {
    const laptopImage = require('./laptop.png');
    return (

              <button type="button" className="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                Toggle navigation

              </button>

                  <LinkContainer to="/dashboard/map">
                    Reserver
                  </LinkContainer>

AutoLib +

                  Conduisez,

                  Economisez

                  Soyez Ecologique

Le tout nouveau système de conduite de Lyon.

Complétement gratuit

Le service est complétement gratuit lors de votre inscription.

Complétement

Le service est complétement gratuit lors de votre inscription

Pensez Ecologie

Les voitures sont toutes des voitures électriques. Vous ne polluez donc pas.

Economisez

Aucun frais à la location et on ne facture que les kilomètres roulés.

Details »

Une ergonomie sans faille

Doté des dernières technologies de developpement web, AutoLib+ vous promet une user-experience incroyable.

Details »

AutoLib+
  La conduite de l'avenir

Complétement responsive

Le site s'adapte automatique à votre device.

Un suivi

Grâce à AutoLib, vous pouvez, à tous moment suivre votre voiture sur l'application.

Possibilité de reserver

Sur AutoLib+ vous avez même la possibilité de réserver une voiture.

Des voitures 3.0

Tout le confort nécessaire est présent dans les voitures AutoLib+.

Notre équipe

Une équipe de jeunes et talentueux développeur.

Valentin  Degrange

Résponsable de la partie mobile et du marketing.

Cabirol Florian

Responsable de la partie desktop/web et de l'architecture serveur.

                Ce que disent nos utilisateurs

                "Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like)."

                12.02.2014 - Andy Smith

  );
  }
}


text: extern inline linux_error_t linux_getrlimit(unsigned int resource, struct linux_rlimit* rlim);


text:
<?php namespace Arcanedev\LaravelTracker\Facades;

use Arcanedev\LaravelTracker\Contracts\Tracker as TrackerContract;
use Illuminate\Support\Facades\Facade;

/**
 * Class     Tracker
 *
 * @package  Arcanedev\LaravelTracker\Facades
 * @author   ARCANEDEV <arcanedev.maroc@gmail.com>
 */
class Tracker extends Facade
{
    /**
     * Get the registered name of the component.
     *
     * @return string
     */
    protected static function getFacadeAccessor() { return TrackerContract::class; }
}


text:
from subprocess import call

def sendCommand(device, message):
  call(['irsend', 'SEND_ONCE', device, message])


text:
package gui;

import logging.Logger;

/**
 *
 * @author
 */
public class MainGui extends javax.swing.JFrame
{
  static final Logger LOGP, LOG;

  static
  {
    //System.setProperty("logging.Logger.printStackTrace", "");
    //System.setProperty("logging.LogOutputStreamHandler.showRecordHashcode", "false");
    //System.setProperty("logging.Logger.printAll", "");
    //System.setProperty("logging.LogRecordDataFormattedText.Terminal","NETBEANS");
    //System.setProperty("logging.LogRecordDataFormattedText.Terminal","LINUX");
    System.setProperty("logging.Logger.Level", "ALL");
    //System.setProperty("logging.LogOutputStreamHandler.timeFormat", "%1$ta/%1$tF/%1$tT.%1$tL #%2$-3d");
    //System.setProperty("logging.LogOutputStreamHandler.colorize", "false");

    //System.setProperty("data.MyClass.Logger.Level", "FINER");
    LOGP = Logger.getParentLogger();
    LOG = Logger.getLogger(MainGui.class.getName());
  }

  // ******************************************************************************************
  // ******************************************************************************************

  public MainGui ()
  {
    initComponents();
  }

  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The
   * content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents()
  {

    jpanNorth = new javax.swing.JPanel();
    jpanDevice = new javax.swing.JPanel();
    jcbSerialDevice = new javax.swing.JComboBox<>();
    jpanNorthButtons = new javax.swing.JPanel();
    jpanSerialButtons = new javax.swing.JPanel();
    jbutConnect = new javax.swing.JButton();
    jbutDisconnect = new javax.swing.JButton();
    jbutRefresh = new javax.swing.JButton();
    jpanCenter = new javax.swing.JPanel();
    jlaTemperatur = new javax.swing.JLabel();
    jpanStartButtons = new javax.swing.JPanel();
    jpanStartButtonsGrid = new javax.swing.JPanel();
    jbutSingleMeasurement = new javax.swing.JButton();
    jbutContinousMeasurement = new javax.swing.JButton();
    jbutStopMeasurement = new javax.swing.JButton();
    jpanSouth = new javax.swing.JPanel();
    jtfStatus = new javax.swing.JTextField();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("LA1 - Temperatur Sensor ATmega328P");

    jpanNorth.setLayout(new java.awt.BorderLayout());

    jpanDevice.setBorder(javax.swing.BorderFactory.createEmptyBorder(7, 5, 7, 1));
    jpanDevice.setLayout(new java.awt.GridLayout(1, 0));

    jcbSerialDevice.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "/dev/ttyUSB0" }));
    jpanDevice.add(jcbSerialDevice);

    jpanNorth.add(jpanDevice, java.awt.BorderLayout.CENTER);

    jpanSerialButtons.setLayout(new java.awt.GridLayout(1, 0, 5, 0));

    jbutConnect.setText("Verbinden");
    jbutConnect.setMargin(new java.awt.Insets(3, 3, 3, 3));
    jbutConnect.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        jbutConnectActionPerformed(evt);
      }
    });
    jpanSerialButtons.add(jbutConnect);

    jbutDisconnect.setText("Trennen");
    jbutDisconnect.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        jbutDisconnectActionPerformed(evt);
      }
    });
    jpanSerialButtons.add(jbutDisconnect);

    jbutRefresh.setText("Aktualisieren");
    jbutRefresh.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        jbutRefreshActionPerformed(evt);
      }
    });
    jpanSerialButtons.add(jbutRefresh);

    jpanNorthButtons.add(jpanSerialButtons);

    jpanNorth.add(jpanNorthButtons, java.awt.BorderLayout.EAST);

    getContentPane().add(jpanNorth, java.awt.BorderLayout.NORTH);

    jpanCenter.setBorder(javax.swing.BorderFactory.createTitledBorder("Messung"));
    jpanCenter.setLayout(new java.awt.BorderLayout());

    jlaTemperatur.setFont(new java.awt.Font("DejaVu Sans", 1, 100)); // NOI18N
    jlaTemperatur.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jlaTemperatur.setText("20°C");
    jpanCenter.add(jlaTemperatur, java.awt.BorderLayout.CENTER);

    jpanStartButtonsGrid.setLayout(new java.awt.GridLayout(1, 0, 20, 0));

    jbutSingleMeasurement.setText("Einzelmessung");
    jbutSingleMeasurement.setMargin(new java.awt.Insets(5, 5, 5, 5));
    jbutSingleMeasurement.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        jbutSingleMeasurementActionPerformed(evt);
      }
    });
    jpanStartButtonsGrid.add(jbutSingleMeasurement);

    jbutContinousMeasurement.setText("Laufend messen");
    jbutContinousMeasurement.setMargin(new java.awt.Insets(5, 5, 5, 5));
    jbutContinousMeasurement.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        jbutContinousMeasurementActionPerformed(evt);
      }
    });
    jpanStartButtonsGrid.add(jbutContinousMeasurement);

    jbutStopMeasurement.setText("Stop");
    jbutStopMeasurement.setMargin(new java.awt.Insets(5, 5, 5, 5));
    jbutStopMeasurement.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        jbutStopMeasurementActionPerformed(evt);
      }
    });
    jpanStartButtonsGrid.add(jbutStopMeasurement);

    jpanStartButtons.add(jpanStartButtonsGrid);

    jpanCenter.add(jpanStartButtons, java.awt.BorderLayout.NORTH);

    getContentPane().add(jpanCenter, java.awt.BorderLayout.CENTER);

    jpanSouth.setLayout(new java.awt.GridLayout(1, 0));

    jtfStatus.setEditable(false);
    jpanSouth.add(jtfStatus);

    getContentPane().add(jpanSouth, java.awt.BorderLayout.SOUTH);

    pack();
  }// </editor-fold>//GEN-END:initComponents

  private void jbutConnectActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jbutConnectActionPerformed
  {//GEN-HEADEREND:event_jbutConnectActionPerformed
    // TODO add your handling code here:
  }//GEN-LAST:event_jbutConnectActionPerformed

  private void jbutDisconnectActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jbutDisconnectActionPerformed
  {//GEN-HEADEREND:event_jbutDisconnectActionPerformed
    // TODO add your handling code here:
  }//GEN-LAST:event_jbutDisconnectActionPerformed

  private void jbutRefreshActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jbutRefreshActionPerformed
  {//GEN-HEADEREND:event_jbutRefreshActionPerformed
    // TODO add your handling code here:
  }//GEN-LAST:event_jbutRefreshActionPerformed

  private void jbutSingleMeasurementActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jbutSingleMeasurementActionPerformed
  {//GEN-HEADEREND:event_jbutSingleMeasurementActionPerformed
    // TODO add your handling code here:
  }//GEN-LAST:event_jbutSingleMeasurementActionPerformed

  private void jbutContinousMeasurementActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jbutContinousMeasurementActionPerformed
  {//GEN-HEADEREND:event_jbutContinousMeasurementActionPerformed
    // TODO add your handling code here:
  }//GEN-LAST:event_jbutContinousMeasurementActionPerformed

  private void jbutStopMeasurementActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jbutStopMeasurementActionPerformed
  {//GEN-HEADEREND:event_jbutStopMeasurementActionPerformed
    // TODO add your handling code here:
  }//GEN-LAST:event_jbutStopMeasurementActionPerformed

  /**
   * @param args the command line arguments
   */
  public static void main (String args[])
  {
    /*
     * Set the Nimbus look and feel
     */
    //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /*
     * If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. For details see
     * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
     */
    try
    {
      for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
      {
        if ("Nimbus".equals(info.getName()))
        {
          javax.swing.UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    }
    catch (ClassNotFoundException ex)
    {
      java.util.logging.Logger.getLogger(MainGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    catch (InstantiationException ex)
    {
      java.util.logging.Logger.getLogger(MainGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    catch (IllegalAccessException ex)
    {
      java.util.logging.Logger.getLogger(MainGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    catch (javax.swing.UnsupportedLookAndFeelException ex)
    {
      java.util.logging.Logger.getLogger(MainGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    //</editor-fold>
    //</editor-fold>
    //</editor-fold>
    //</editor-fold>

    javax.swing.UIManager.getLookAndFeelDefaults().put(
            "ScrollBar.minimumThumbSize", new java.awt.Dimension(30, 30));

    LOGP.addHandler(new logging.LogOutputStreamHandler(System.out));
    LOG.setLevel(java.util.logging.Level.ALL);
    LOG.info("Start of Application");

    /*
     * Create and display the form
     */
    java.awt.EventQueue.invokeLater(new Runnable()
    {
      @Override
      public void run ()
      {
        new MainGui().setVisible(true);
      }
    });
  }

  // Variables declaration - do not modify//GEN-BEGIN:variables
  private javax.swing.JButton jbutConnect;
  private javax.swing.JButton jbutContinousMeasurement;
  private javax.swing.JButton jbutDisconnect;
  private javax.swing.JButton jbutRefresh;
  private javax.swing.JButton jbutSingleMeasurement;
  private javax.swing.JButton jbutStopMeasurement;
  private javax.swing.JComboBox<String> jcbSerialDevice;
  private javax.swing.JLabel jlaTemperatur;
  private javax.swing.JPanel jpanCenter;
  private javax.swing.JPanel jpanDevice;
  private javax.swing.JPanel jpanNorth;
  private javax.swing.JPanel jpanNorthButtons;
  private javax.swing.JPanel jpanSerialButtons;
  private javax.swing.JPanel jpanSouth;
  private javax.swing.JPanel jpanStartButtons;
  private javax.swing.JPanel jpanStartButtonsGrid;
  private javax.swing.JTextField jtfStatus;
  // End of variables declaration//GEN-END:variables

}


text:
package jp.furplag.data.json;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.type.TypeFactory;

import jp.furplag.sandbox.reflect.SavageReflection;
import jp.furplag.sandbox.trebuchet.Trebuchet;

public class JsonifierTest {

  static enum OneTwo {
    One, Two;
  }

  private String lineSeparator = System.getProperty("line.separator");

  @AfterEach
  void after() {
    System.setProperty("line.separator", lineSeparator);
  }

  @BeforeEach
  void before() {
    System.setProperty("line.separator", "\n");
  }

  @Test
  void deserialize() throws Throwable {
    assertEquals(new Nothing(), Jsonifier.deserializeStrictly("{}", Nothing.class));
    assertEquals(new Nothing(), Jsonifier.deserializeStrictly("{name:'john'}", Nothing.class));

    Instance that = new Instance();
    that.versionNo = 1;
    that.deleted = false;
    that.created = LocalDateTime.of(2017, 1, 1, 1, 23, 45).plus(678, ChronoUnit.MILLIS);
    that.modified = LocalDateTime.of(2017, 1, 23, 1, 23, 45).plus(678, ChronoUnit.MILLIS);
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", Instance.class));
    that.modified = LocalDateTime.of(2017, 1, 23, 0, 0, 0);
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23'}", Instance.class));
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017/01/23'}", Instance.class));
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '20170123'}", Instance.class));
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017.01.23'}", Instance.class));
    that.modified = LocalDateTime.of(2017, 1, 1, 0, 0, 0);
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017.1.1'}", Instance.class));
    that.modified = LocalDateTime.of(2017, 1, 23, 0, 0, 0);
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017年1月23日'}", Instance.class));
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017年1月23日'}", Instance.class));
    that.modified = null;
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '元禄元年.1.1'}", Instance.class));
    that.modified = LocalDateTime.of(201 + (71 / 12), 71 % 12, 23, 0, 0);
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017123'}", Instance.class));
    that.modified = LocalDateTime.of(2017, 1, 23, 0, 0, 0);
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23'}", TypeFactory.defaultInstance().constructType(Instance.class)));
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017/01/23'}", TypeFactory.defaultInstance().constructType(Instance.class)));
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '20170123'}", TypeFactory.defaultInstance().constructType(Instance.class)));
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017.01.23'}", TypeFactory.defaultInstance().constructType(Instance.class)));
    assertEquals(that, Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '20170123'}", TypeFactory.defaultInstance().constructType(Instance.class)));

    Map<String, Object> those = new HashMap<>();
    those.put("versionNo", 1);
    those.put("deleted", false);
    those.put("created", LocalDateTime.of(2017, 1, 1, 1, 23, 45).plus(678, ChronoUnit.MILLIS));
    those.put("modified", LocalDateTime.of(2017, 1, 23, 1, 23, 45).plus(678, ChronoUnit.MILLIS));
    assertEquals(those.keySet().stream().sorted().collect(Collectors.joining()), ((Map<String, Object>) (Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", new TypeReference<Map<String, Object>>() {}))).keySet().stream().sorted().collect(Collectors.joining()));
    assertEquals(those.values().stream().map(Objects::toString).sorted().collect(Collectors.joining()), ((Map<String, Object>) (Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", new TypeReference<Map<String, Object>>() {}))).values().stream().map(Objects::toString).sorted().collect(Collectors.joining()));
  }

  @Test
  void Jsonifier() throws Throwable {
    assertNotNull(new Jsonifier() {});

    Constructor<?> c = Jsonifier.Shell.class.getDeclaredConstructor();
    c.setAccessible(true);
    assertTrue(c.newInstance() instanceof Jsonifier.Shell);
  }

  @SuppressWarnings({ "unused" })
  @Test
  void lazy() throws Throwable {
    assertNull(Jsonifier.deserialize("[1, 2]", (Class<?>) null));
    assertNull(Jsonifier.deserialize("[1, 2]", (JavaType) null));
    assertNull(Jsonifier.deserialize("[1, 2]", (TypeReference<?>) null));
    assertNull(Jsonifier.deserialize(null, Instance.class));
    assertNull(Jsonifier.deserialize(null, TypeFactory.defaultInstance().constructType(Instance.class)));
    assertNull(Jsonifier.deserialize(null, new TypeReference<Instance>() {}));
    assertNull(Jsonifier.deserialize("", Instance.class));
    assertNull(Jsonifier.deserialize("", TypeFactory.defaultInstance().constructType(Instance.class)));
    assertNull(Jsonifier.deserialize("", new TypeReference<Instance>() {}));
    assertEquals(new Nothing(), Jsonifier.deserializeStrictly("{name:'john'}", Nothing.class));
    assertEquals(new Nothing(), Jsonifier.deserialize("{name:'john'}", Nothing.class));

    Instance that = new Instance();
    that.versionNo = 1;
    that.deleted = false;
    that.created = LocalDateTime.of(2017, 1, 1, 1, 23, 45).plus(678, ChronoUnit.MILLIS);
    that.modified = LocalDateTime.of(2017, 1, 23, 1, 23, 45).plus(678, ChronoUnit.MILLIS);
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", Instance.class));
    that.modified = LocalDateTime.of(2017, 1, 23, 0, 0, 0);
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23'}", Instance.class));
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017/01/23'}", Instance.class));
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '20170123'}", Instance.class));
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017.01.23'}", Instance.class));
    that.modified = LocalDateTime.of(2017, 1, 1, 0, 0, 0);
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017.1.1'}", Instance.class));
    that.modified = LocalDateTime.of(2017, 1, 23, 0, 0, 0);
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017年1月23日'}", Instance.class));
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017年1月23日'}", Instance.class));
    that.modified = null;
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '元禄元年.1.1'}", Instance.class));
    that.modified = LocalDateTime.of(201 + (71 / 12), 71 % 12, 23, 0, 0);
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017123'}", Instance.class));
    that.modified = LocalDateTime.of(2017, 1, 23, 0, 0, 0);
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23'}", TypeFactory.defaultInstance().constructType(Instance.class)));
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017/01/23'}", TypeFactory.defaultInstance().constructType(Instance.class)));
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '20170123'}", TypeFactory.defaultInstance().constructType(Instance.class)));
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017.01.23'}", TypeFactory.defaultInstance().constructType(Instance.class)));
    assertEquals(that, Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '20170123'}", TypeFactory.defaultInstance().constructType(Instance.class)));

    Map<String, Object> those = new HashMap<>();
    those.put("versionNo", 1);
    those.put("deleted", false);
    those.put("created", LocalDateTime.of(2017, 1, 1, 1, 23, 45).plus(678, ChronoUnit.MILLIS));
    those.put("modified", LocalDateTime.of(2017, 1, 23, 1, 23, 45).plus(678, ChronoUnit.MILLIS));
    assertEquals(those.keySet().stream().sorted().collect(Collectors.joining()), ((Map<String, Object>) (Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", new TypeReference<Map<String, Object>>() {}))).keySet().stream().sorted().collect(Collectors.joining()));
    assertEquals(those.values().stream().map(Objects::toString).sorted().collect(Collectors.joining()), ((Map<String, Object>) (Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", new TypeReference<Map<String, Object>>() {}))).values().stream().map(Objects::toString).sorted().collect(Collectors.joining()));

    final class Another extends Instance {
      public boolean created;
    }
    try {
      Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", Another.class);
      fail("raise JsonMappingException .");
    } catch (JsonMappingException e) {
      assertTrue(e instanceof JsonMappingException);
    }
    try {
      Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", TypeFactory.defaultInstance().constructType(Another.class));
      fail("raise JsonMappingException .");
    } catch (JsonMappingException e) {
      assertTrue(e instanceof JsonMappingException);
    }
    try {
      Jsonifier.deserializeStrictly("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", new TypeReference<Set<Integer>>() {});
      fail("raise JsonMappingException .");
    } catch (JsonMappingException e) {
      assertTrue(e instanceof JsonMappingException);
    }
    assertNull(Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", Another.class));
    assertNull(Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", TypeFactory.defaultInstance().constructType(Another.class)));
    assertNull(Jsonifier.deserialize("{versionNo: '1', deleted: false, created: '2017-01-01T01:23:45.678', modified: '2017-01-23T01:23:45.678'}", new TypeReference<Set<Integer>>() {}));

    ObjectMapper mapper = ((ObjectMapper) SavageReflection.get(Jsonifier.Shell.class, "mapper"));
    mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, true);
    SavageReflection.set(Jsonifier.class, "mapper", mapper);
    try {
      Jsonifier.serializeStrictly(new Nothing());
      fail("raise JsonMappingException .");
    } catch (JsonMappingException e) {
      assertTrue(e instanceof JsonMappingException);
    }
    assertNull(Jsonifier.serialize(new Nothing()));
    assertEquals(Jsonifier.serializeStrictly(new Instance()), Jsonifier.serialize(new Instance()));

    final String expect = Trebuchet.Functions.orElse((Object) null, (x) -> Jsonifier.serializeStrictly(new Nothing()), (t, e) -> String.format("{\"jsonifier.serializationFailure\":{\"error\":\"%s\",\"message\":\"%s\"}}", e.getClass().getName(), e.getMessage()));
    assertEquals(expect, Jsonifier.serializeOrFailure(new Nothing()));

    mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
    SavageReflection.set(Jsonifier.class, "mapper", mapper);
  }

  @Test
  void serialize() throws Throwable {
    assertEquals("\"One\"", Jsonifier.serializeStrictly(OneTwo.One));

    assertEquals("[]", Jsonifier.serializeStrictly(new Object[] {}));
    assertEquals("[]", Jsonifier.serializeStrictly(new Object[][] {}));
    assertEquals("[1,2.3,0.3456,\"789\",false]", Jsonifier.serializeStrictly(new Object[] {1, 2.3f, .3456d, "789", false}));
    assertEquals("[[1,2,3,4],[0.5,0.6,0.7,0.8],[\"9\",\"yep\",\"Nope\"],[false,true],[\"One\",\"Two\"]]", Jsonifier.serializeStrictly(new Object[][] {{1, 2, 3, 4}, {.5, .6, .7, .8}, {"9", "yep", "Nope"}, {false, true}, OneTwo.values()}));
    assertEquals("[\"南\",\"無\",\"阿\",\"弥\",\"陀\",\"仏\"]", Jsonifier.serializeStrictly(Arrays.stream("南無阿弥陀仏".split("")).collect(Collectors.toCollection(LinkedHashSet::new))));
    assertEquals("[\"南\",\"無\",\"阿\",\"弥\",\"陀\",\"仏\"]", Jsonifier.serializeStrictly(Arrays.asList("南無阿弥陀仏".split(""))));
    assertEquals("{\"0\":\"南\",\"1\":\"無\",\"2\":\"阿\",\"3\":\"弥\",\"4\":\"陀\",\"5\":\"仏\"}", Jsonifier.serializeStrictly(Arrays.stream("南無阿弥陀仏".split("")).map(s -> "南無阿弥陀仏".indexOf(s)).collect(Collectors.toMap(k -> Integer.valueOf(k), v -> "南無阿弥陀仏".substring(v, v + 1), (v1, v2) -> v2))));
    assertEquals("{\"0\":{\"0\":\"南\"},\"1\":{\"1\":\"無\"},\"2\":{\"2\":\"阿\"},\"3\":{\"3\":\"弥\"},\"4\":{\"4\":\"陀\"},\"5\":{\"5\":\"仏\"}}", Jsonifier.serializeStrictly(Arrays.stream("南無阿弥陀仏".split("")).map(s -> "南無阿弥陀仏".indexOf(s)).collect(Collectors.toMap(k -> Integer.valueOf(k), v -> "南無阿弥陀仏".substring(v, v + 1), (v1, v2) -> v2)).entrySet().stream().collect(Collectors.toMap(k -> k.getKey(), v -> v, (v1, v2) -> v2))));

    Instance that = new Instance();
    that.versionNo = 1;
    that.deleted = false;
    that.created = LocalDateTime.of(2017, 1, 1, 1, 23, 45).plus(678, ChronoUnit.MILLIS);
    that.modified = LocalDateTime.of(2017, 1, 23, 1, 23, 45).plus(678, ChronoUnit.MILLIS);
    assertEquals("{\"versionNo\":1,\"deleted\":false,\"created\":\"2017-01-01T01:23:45.678\",\"modified\":\"2017-01-23T01:23:45.678\"}", Jsonifier.serializeStrictly(that));
  }

  @Test
  void serializeFractions() throws Throwable {
    assertEquals(Jsonifier.serializeStrictly(-.123456f), "-0.123456");
    assertEquals(Jsonifier.serializeStrictly(0f), "0.0");
    assertEquals(Jsonifier.serializeStrictly(0.0f), "0.0");
    assertEquals(Jsonifier.serializeStrictly(.0f), "0.0");
    assertEquals(Jsonifier.serializeStrictly(1E-6f), "1.0E-6");
    assertEquals(Jsonifier.serializeStrictly(.123456f), "0.123456");

    assertEquals(Jsonifier.serializeStrictly(-.1234567890123d), "-0.1234567890123");
    assertEquals(Jsonifier.serializeStrictly(0d), "0.0");
    assertEquals(Jsonifier.serializeStrictly(0.0d), "0.0");
    assertEquals(Jsonifier.serializeStrictly(.0d), "0.0");
    assertEquals(Jsonifier.serializeStrictly(1E-12d), "1.0E-12");
    assertEquals(Jsonifier.serializeStrictly(.1234567890123d), "0.1234567890123");

    assertEquals(Jsonifier.serializeStrictly(Double.valueOf(Double.MAX_VALUE)), "1.7976931348623157E308");
  }

  @Test
  void serializeIntegers() throws Throwable {
    assertEquals("-128", Jsonifier.serializeStrictly(Byte.MIN_VALUE));
    assertEquals("0", Jsonifier.serializeStrictly((byte) 0));
    assertEquals("127", Jsonifier.serializeStrictly(Byte.MAX_VALUE));

    assertEquals("-32768", Jsonifier.serializeStrictly(Short.MIN_VALUE));
    assertEquals("0", Jsonifier.serializeStrictly((short) 0));
    assertEquals("32767", Jsonifier.serializeStrictly(Short.MAX_VALUE));

    assertEquals("-2147483648", Jsonifier.serializeStrictly(Integer.MIN_VALUE));
    assertEquals("0", Jsonifier.serializeStrictly(0));
    assertEquals("2147483647", Jsonifier.serializeStrictly(Integer.MAX_VALUE));

    assertEquals("-9223372036854775808", Jsonifier.serializeStrictly(Long.MIN_VALUE));
    assertEquals("0", Jsonifier.serializeStrictly(0L));
    assertEquals("9223372036854775807", Jsonifier.serializeStrictly(Long.MAX_VALUE));

    assertEquals("123", Jsonifier.serializeStrictly(Byte.valueOf("123")));
    assertEquals("1234", Jsonifier.serializeStrictly(Short.valueOf("1234")));
    assertEquals("123456", Jsonifier.serializeStrictly(Integer.valueOf("123456")));
    assertEquals("12345678901", Jsonifier.serializeStrictly(Long.valueOf("12345678901")));
    assertEquals("9223372036854775807", Jsonifier.serializeStrictly(BigInteger.valueOf(Long.MAX_VALUE)));
  }

  @Test
  void serializeNull() throws Throwable {
    assertEquals((String) null, Jsonifier.serializeStrictly(null));
  }

  @Test
  void serializePrimitives() throws Throwable {
    assertEquals("true", Jsonifier.serializeStrictly(true));
    assertEquals("false", Jsonifier.serializeStrictly(!true));

    assertEquals("\"諸\"", Jsonifier.serializeStrictly("諸行無常".charAt(0)));
  };

  @Test
  void serializeStrings() throws Throwable {
    assertEquals("\"\"", Jsonifier.serializeStrictly(""));
    assertEquals("\"南無阿弥陀仏\"", Jsonifier.serializeStrictly("南無阿弥陀仏"));
    assertEquals("[\"南\",\"無\",\"阿\",\"弥\",\"陀\",\"仏\"]", Jsonifier.serializeStrictly("南無阿弥陀仏".split("")));
  }

  @Test
  void serializeWrappers() throws Throwable {
    assertEquals("true", Jsonifier.serializeStrictly(Boolean.TRUE));
    assertEquals("false", Jsonifier.serializeStrictly(Boolean.FALSE));

    assertEquals("\"諸\"", Jsonifier.serializeStrictly(Character.valueOf("諸行無常".charAt(0))));
  }

  @Test
  void test() throws JsonProcessingException, IOException {
    assertNull(Jsonifier.deserializeStrictly("0.0", LocalDateTime.class));
    assertNull(Jsonifier.deserializeStrictly("'12345-1231'", LocalDateTime.class));
  }

  @Test
  void testBrutaly() throws JsonProcessingException {
    assertEquals("{}", Jsonifier.serialize(new Unseen()));
    assertEquals("{}", Jsonifier.serializeStrictly(new Unseen()));
    assertEquals("{}", Jsonifier.serializeOrFailure(new Unseen()));
    assertEquals("{\"theInt\":123,\"theString\":[\"南\",\"無\",\"阿\",\"弥\",\"陀\",\"仏\"]}", Jsonifier.serializeBrutaly(new Unseen()));
  }
}


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W25919_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans15.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Emerald Oil Inc
Well Summary Hot Rod 5-27-26H Section 27 T149N R102W McKenzie County, ND
PRODUCTION LINER

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">4-1/2" Liner Design

    <p class="styleSans59.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">' r V l ,7 7 I'm. ' m _ ' . )7 . " ' 4-1/2" 10378-20597 [MIME-m 3795" ——— _—-____——_ ** For Buttress thread casing connections, the make-up torque should be determined by carefully noting the torque
reQUired to make-up each of several connections to the base of the triangle; then using the torque value established. make up the balance of the pipe.

10,378—20,597 m 4-1/2',13.5|b,P-110.BTC' 10.680/1.9 12,410/1.2 422 (Body)/1.8 Im-

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">4-1/2" Liner A PI Rating & Safeg Factor

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Based on full casing evacuation with 9.5 ppg fluid on backside @ 10.956' TVD. Burst pressure based on 9000 psi Stimulation pressure with 10 ppg internal fluid gradient with 9.0 ppg gradient
on backside @ 10,956' TVD. Based on string weight in 9.5 ppg fluid (Buoyed weight: 126k lbs.) plus 100k lbs over pull.

    <p class="styleSans11.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Liner will not be cemented.
Plan to run 34-Stage "Plug and Perf" tools in liner—spaced roughly 300' apart.
Hydraulic Fracture Stimulation using Diesel Fuels:
68334-30-5 (Primary Name: Fuels, diesel) 68476-34-6 (Primary Name: Fuels. diesel. No. 2) 68476-30-2 (Primary Name: Fuels oil No. 2) 68476-31-3 (Primary Name: Fuel oil, No. 4) 8008-20-6 (Primary Name: Kerosene)
Emerald oil will not be using any of the above-referenced diesel fuels in the hydraulic fracture stimulation of this well.


text:
package org.oscm.domobjects;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.oscm.domobjects.annotations.BusinessKey;
import org.oscm.domobjects.enums.LocalizedObjectTypes;

/**
 * @author weiser
 *
 */
@Entity
@Table(uniqueConstraints = @UniqueConstraint(columnNames = {
        "technicalProduct_tkey", "operationId" }))
@NamedQueries({ @NamedQuery(name = "TechnicalProductOperation.findByBusinessKey", query = "select c from TechnicalProductOperation c where c.dataContainer.operationId=:operationId AND c.technicalProduct_tkey=:technicalProduct_tkey") })
@BusinessKey(attributes = { "technicalProduct_tkey", "operationId" })
public class TechnicalProductOperation extends
        DomainObjectWithVersioning<TechnicalProductOperationData> {

    private static final long serialVersionUID = 2022025062839133740L;

    private static final List<LocalizedObjectTypes> LOCALIZATION_TYPES = Collections
            .unmodifiableList(Arrays
                    .asList(LocalizedObjectTypes.TECHNICAL_PRODUCT_OPERATION_DESCRIPTION,
                            LocalizedObjectTypes.TECHNICAL_PRODUCT_OPERATION_NAME));

    @Column(name = "technicalProduct_tkey", insertable = false, updatable = false, nullable = false)
    private long technicalProduct_tkey;

    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    @JoinColumn(name = "technicalProduct_tkey")
    private TechnicalProduct technicalProduct;

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "technicalProductOperation", fetch = FetchType.LAZY)
    @OrderBy
    private List<OperationParameter> parameters = new ArrayList<OperationParameter>();

    @OneToMany(mappedBy = "technicalProductOperation", cascade = CascadeType.REMOVE, fetch = FetchType.LAZY)
    @OrderBy
    private List<OperationRecord> operationRecord = new ArrayList<OperationRecord>();

    public TechnicalProductOperation() {
        super();
        setDataContainer(new TechnicalProductOperationData());
    }

    public long getTechnicalProduct_tkey() {
        return technicalProduct_tkey;
    }

    public void setTechnicalProduct_tkey(long technicalProduct_tkey) {
        this.technicalProduct_tkey = technicalProduct_tkey;
    }

    public void setTechnicalProduct(TechnicalProduct technicalProduct) {
        this.technicalProduct = technicalProduct;
        if (null != technicalProduct) {
            setTechnicalProduct_tkey(technicalProduct.getKey());
        }
    }

    public TechnicalProduct getTechnicalProduct() {
        return technicalProduct;
    }

    public void setOperationId(String operationId) {
        dataContainer.setOperationId(operationId);
    }

    public String getOperationId() {
        return dataContainer.getOperationId();
    }

    public String getActionUrl() {
        return dataContainer.getActionUrl();
    }

    public void setActionUrl(String actionUrl) {
        dataContainer.setActionUrl(actionUrl);
    }

    @Override
    public List<LocalizedObjectTypes> getLocalizedObjectTypes() {
        return LOCALIZATION_TYPES;
    }

    public List<OperationParameter> getParameters() {
        return parameters;
    }

    public void setParameters(List<OperationParameter> parameters) {
        this.parameters = parameters;
    }

    public List<OperationRecord> getOperationRecord() {
        return operationRecord;
    }

    public void setOperationRecord(List<OperationRecord> operationRecord) {
        this.operationRecord = operationRecord;
    }

    public boolean isRequestParameterValuesRequired() {
        for (OperationParameter op : getParameters()) {
            if (op.getType().isRequestValues()) {
                return true;
            }
        }
        return false;
    }

    public OperationParameter findParameter(String id) {
        for (OperationParameter op : getParameters()) {
            if (op.getId().equals(id)) {
                return op;
            }
        }
        return null;
    }
}


text:
<?php

namespace backend\models\searchs;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\models\Attribute;

/**
 * AttributeSearch represents the model behind the search form about `backend\models\Attribute`.
 */
class AttributeSearch extends Attribute
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'cate_id', 'type_id', 'created_at', 'updated_at', 'sort'], 'integer'],
            [['name', 'value'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = Attribute::find()->where(['status' => self::STATUS_ACTIVE]);

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'cate_id' => $this->cate_id,
            'type_id' => $this->type_id,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
            'sort' => $this->sort,
        ]);

        $query->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'value', $this->value]);

        return $dataProvider;
    }
}


text:
module.exports = function(hbs) {

    // handlebars inheritance
    hbs.registerHelper('extend', function(name, context) {
        if (!this.blocks) {
            this.blocks = {};
        }
        if (!this.blocks[name]) {
            this.blocks[name] = [];
        }
        this.blocks[name].push(context.fn(this)); // for older versions of handlebars, use block.push(context(this));
    });

    hbs.registerHelper('block', function(name, context) {
        if (!this.blocks) {
            this.blocks = {};
        }
        var val = this.blocks[name] && this.blocks[name].length > 0 ? this.blocks[name][0] : context.fn(this);

        return val;
    });

    return hbs;
};


text:
namespace spec {
namespace support {

using std::string;
using ccspec::core::describe;
using ccspec::core::it;
using ccspec::expect;
using ccspec::matchers::contain;
using ccspec::matchers::eq;
using ccspec::support::inspect;

auto inspect_spec = describe("::inspect", [] {
  it("returns the string value for char", [] {
    char c = 'x';
    expect(inspect(c)).to(eq("x"));
  });

  it("returns the string value for unsigned char", [] {
    unsigned char c = 'x';
    expect(inspect(c)).to(eq("x"));
  });

  it("returns the string value for bool", [] {
    bool b = true;
    expect(inspect(b)).to(eq("true"));
  });

  it("returns the value for short", [] {
    short s = 32767;
    expect(inspect(s)).to(eq("32767"));
  });

  it("returns the value for unsigned short", [] {
    unsigned short s = 65535;
    expect(inspect(s)).to(eq("65535"));
  });

  it("returns the value for int", [] {
    int i = 1234567;
    expect(inspect(i)).to(eq("1234567"));
  });

  it("returns the value for unsigned int", [] {
    unsigned int i = 1234567324;
    expect(inspect(i)).to(eq("1234567324"));
  });

  it("returns the value for long", [] {
    long l = 12345678;
    expect(inspect(l)).to(eq("12345678"));
  });

  it("returns the value for unsigned long", [] {
    unsigned long l = 12345673243;
    expect(inspect(l)).to(eq("12345673243"));
  });

  it("returns the value for long long", [] {
    long long l = 1234567890987654321;
    expect(inspect(l)).to(eq("1234567890987654321"));
  });

  it("returns the value for unsigned long long", [] {
    unsigned long long l = 5234567890987654321;
    expect(inspect(l)).to(eq("5234567890987654321"));
  });

  it("returns the value for unsigned long long", [] {
    unsigned long long l = 5234567890987654321;
    expect(inspect(l)).to(eq("5234567890987654321"));
  });

  it("returns the value for float", [] {
    float f = 3.14;
    expect(inspect(f)).to(eq("3.14"));
  });

  it("returns the value for double", [] {
    double f = 3.14159268373523;
    expect(inspect(f)).to(eq("3.14159268373523"));
  });

  it("returns the numerical value for void*", [] {
    void* p = reinterpret_cast<void*>(0xffffffff);
    expect(inspect(p)).to(eq("0xffffffff"));
  });

  it("returns the string value for const char*", [] {
    const char* s = "Hello, 世界!";
    expect(inspect(s)).to(eq("Hello, 世界!"));
  });

  it("returns the value for string", [] {
    string s = "你好, world!";
    expect(inspect(s)).to(eq("你好, world!"));
  });

  it("returns the type name for arbitrary types", [] {
    class AbstractUserServiceProviderModule {
    } abstract_user_service_provider_module;
    expect(inspect(abstract_user_service_provider_module))
        .to(contain("AbstractUserServiceProviderModule"));
  });
});

}  // namespace support
}  // namespace spec


text:
rm -rf work/plugins
MAVEN_OPTS="$MAVEN_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
mvn -Dmaven.test.skip=true -DskipTests=true -Djetty.port=9191 clean compile org.jenkins-ci.tools:maven-hpi-plugin:run -Pjenkins,with-email-ext


text:
<?php
/**
* Céation du "Jeu du Labyrinthe" en PHP, suivant la séquence 4 du Mooc "Soyez acteurs du web!" sur le site.  <https://www.fun-mooc.fr/>
*
* Par convention les commentaires sur le code source sont en anglais, pour plus de lisibilité je les écris en français dans le bût d'être mieux compris de tous.
*
* @author  François lesenne <http://francoislesenne.xyz>
* @version 1.0.2
* @create  2017/01/10
* @update  2017/02/16
* @sources Images crée par moi pour les besoins du Mooc
*
* @license MIT <https://opensource.org/licenses/MIT> (en anglais). Vous pouvez réutiliser ce code source, le transformer ou le modifier ainsi que les images.
 */

/**
 * Indication de la timezone en fonction du pays.
 */
date_default_timezone_set('Europe/Paris');

/**
 * Affichage des erreurs en mode développement.
 */
error_reporting ( E_ALL ) ;
ini_set ('display_errors' , 1 ) ;
 /**
  * Création d'une fonction pour afficher le titre du document.
  *
  * @param  int $param
  * @return string
  */
 function titre($param) {
 	/**
	* Affichage du titre du document en fonction des pièces où l'on se trouve.
	*/
     return $param ? "Pièce " . $param . " | " : "";
 }

 /**
  * Création d'une fonction pour afficher les portes et les dirrections en fonction de la pièce
  *
  * @param  array $param1 paramètre du tableau des portes
  * @param  array $param2 paramètre des dirrections
  * @return string
  */
 function porteDirection($param1, $param2) {
 	if ($param1  != -1) {
 		return "
" . $param2 . "";
 	}

 }

 function porteEntree($param) {
 	if ($param < 0 or $param > 10 or !is_numeric($param)) {
 		return "
Entrée";
 	}
 	else {
 		$param = 0;
 	}
 }

 /**
  * Création d'une fonction pour afficher les enigmes en fonction de la pièce ou l'on se trouve.
  *
  * @param  array $param  paramètre du tableu des énigmes
  * @return string
  */
 function enigme($param1, $param2) {

 	/**
	* Je crée une condition pour afficher un contenu sur la pièce 10 en remplacement du sous-titre des enigmes sur les autres pages.
	*
	* @var boolean  Si vrai ou faux
	*/
	if ($param1 == 10) {
		return "
Entrer
Merci d'avoir joué à ce jeu. Vous pouvez rejouer au jeu en cliquant sur la porte d'entrée.
";
	}
	else {
		return "
Énigme :

" . $param2 ."
";
	}
 }

  /**
   * Création d'une fonction pour afficher le contenue en fonction de la pièce ou l'on se trouve.
   *
   * @param  int $param paramètre du contenue de l'entrée.
   *
   * @return array|string
   */
 function entree($param) {

 	/**
 	 * Je crée une condition pour afficher un contenu sur la page d'entrée du jeu en remplacement du sous-titre des enigmes sur les autres pages.
	*/
	if ($param) {

	}
	else {
		return '

Règle du jeu :

Vous devez cliquer sur la porte de votre choix pour avancer dans le jeu à l'aide des énigmes mises en place.

Je vous souhaite un bon jeu.
';
	}
 }
 /**
 * Fin de la partie du fonctionnement pour le jeu du labyrinthe en PHP.
 */


text:
import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class RotatingCar here.
 *
 * @author (your name)
 * @version (a version number or a date)
 */
public class RotatingCar extends Actor
{
    /**
     * Act - do whatever the RotatingCar wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public void act()
    {
        // Add your action code here.
        turn(10); // turn 10 degrees
    }
}


text:
#ifndef MediaControlElements_h
#define MediaControlElements_h

#if ENABLE(VIDEO)
#include "MediaControlElementTypes.h"
#include "TextTrackRepresentation.h"

namespace WebCore {

// ----------------------------

class MediaControlPanelElement FINAL : public MediaControlDivElement {
public:
    static PassRefPtr<MediaControlPanelElement> create(Document*);

    void setCanBeDragged(bool);
    void setIsDisplayed(bool);

    void resetPosition();
    void makeOpaque();
    void makeTransparent();

    virtual bool willRespondToMouseMoveEvents() OVERRIDE { return true; }
    virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }

private:
    explicit MediaControlPanelElement(Document*);

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;

    void startDrag(const LayoutPoint& eventLocation);
    void continueDrag(const LayoutPoint& eventLocation);
    void endDrag();

    void startTimer();
    void stopTimer();
    void transitionTimerFired(Timer<MediaControlPanelElement>*);

    void setPosition(const LayoutPoint&);

    bool m_canBeDragged;
    bool m_isBeingDragged;
    bool m_isDisplayed;
    bool m_opaque;
    LayoutPoint m_lastDragEventLocation;
    LayoutPoint m_cumulativeDragOffset;

    Timer<MediaControlPanelElement> m_transitionTimer;
};

// ----------------------------

class MediaControlPanelEnclosureElement FINAL : public MediaControlDivElement {
public:
    static PassRefPtr<MediaControlPanelEnclosureElement> create(Document*);

private:
    explicit MediaControlPanelEnclosureElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
};

// ----------------------------

class MediaControlOverlayEnclosureElement FINAL : public MediaControlDivElement {
public:
    static PassRefPtr<MediaControlOverlayEnclosureElement> create(Document*);

private:
    explicit MediaControlOverlayEnclosureElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
};

// ----------------------------

class MediaControlTimelineContainerElement : public MediaControlDivElement {
public:
    static PassRefPtr<MediaControlTimelineContainerElement> create(Document*);

    void setTimeDisplaysHidden(bool);

private:
    explicit MediaControlTimelineContainerElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;

    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
};

// ----------------------------

class MediaControlVolumeSliderContainerElement : public MediaControlDivElement {
public:
    static PassRefPtr<MediaControlVolumeSliderContainerElement> create(Document*);

    virtual bool willRespondToMouseMoveEvents() OVERRIDE { return true; }

private:
    explicit MediaControlVolumeSliderContainerElement(Document*);

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;

    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
};

// ----------------------------

class MediaControlStatusDisplayElement : public MediaControlDivElement {
public:
    static PassRefPtr<MediaControlStatusDisplayElement> create(Document*);

    void update();

private:
    explicit MediaControlStatusDisplayElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;

    enum StateBeingDisplayed { Nothing, Loading, LiveBroadcast };
    StateBeingDisplayed m_stateBeingDisplayed;
};

// ----------------------------

class MediaControlPanelMuteButtonElement FINAL : public MediaControlMuteButtonElement {
public:
    static PassRefPtr<MediaControlPanelMuteButtonElement> create(Document*, MediaControls*);

    virtual bool willRespondToMouseMoveEvents() OVERRIDE { return true; }

private:
    explicit MediaControlPanelMuteButtonElement(Document*, MediaControls*);

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;

    MediaControls* m_controls;
};

// ----------------------------

class MediaControlVolumeSliderMuteButtonElement FINAL : public MediaControlMuteButtonElement {
public:
    static PassRefPtr<MediaControlVolumeSliderMuteButtonElement> create(Document*);

private:
    explicit MediaControlVolumeSliderMuteButtonElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
};

// ----------------------------

class MediaControlPlayButtonElement FINAL : public MediaControlInputElement {
public:
    static PassRefPtr<MediaControlPlayButtonElement> create(Document*);

    virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }
    virtual void updateDisplayType() OVERRIDE;

private:
    explicit MediaControlPlayButtonElement(Document*);

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;
};

// ----------------------------

class MediaControlOverlayPlayButtonElement FINAL : public MediaControlInputElement {
public:
    static PassRefPtr<MediaControlOverlayPlayButtonElement> create(Document*);

    virtual void updateDisplayType() OVERRIDE;

private:
    explicit MediaControlOverlayPlayButtonElement(Document*);

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;
};

// ----------------------------

class MediaControlSeekForwardButtonElement : public MediaControlSeekButtonElement {
public:
    static PassRefPtr<MediaControlSeekForwardButtonElement> create(Document*);

private:
    explicit MediaControlSeekForwardButtonElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;

    virtual bool isForwardButton() const OVERRIDE { return true; }
};

// ----------------------------

class MediaControlSeekBackButtonElement : public MediaControlSeekButtonElement {
public:
    static PassRefPtr<MediaControlSeekBackButtonElement> create(Document*);

private:
    explicit MediaControlSeekBackButtonElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;

    virtual bool isForwardButton() const OVERRIDE { return false; }
};

// ----------------------------

class MediaControlRewindButtonElement : public MediaControlInputElement {
public:
    static PassRefPtr<MediaControlRewindButtonElement> create(Document*);

    virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }

private:
    explicit MediaControlRewindButtonElement(Document*);

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;
};

// ----------------------------

class MediaControlReturnToRealtimeButtonElement : public MediaControlInputElement {
public:
    static PassRefPtr<MediaControlReturnToRealtimeButtonElement> create(Document*);

    virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }

private:
    explicit MediaControlReturnToRealtimeButtonElement(Document*);

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;
};

// ----------------------------

class MediaControlToggleClosedCaptionsButtonElement FINAL : public MediaControlInputElement {
public:
    static PassRefPtr<MediaControlToggleClosedCaptionsButtonElement> create(Document*, MediaControls*);

    virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }

    virtual void updateDisplayType() OVERRIDE;

private:
    explicit MediaControlToggleClosedCaptionsButtonElement(Document*, MediaControls*);

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;

#if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(QT)
    MediaControls* m_controls;
#endif
};

// ----------------------------

class MediaControlClosedCaptionsContainerElement FINAL : public MediaControlDivElement {
public:
    static PassRefPtr<MediaControlClosedCaptionsContainerElement> create(Document*);

    virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }

private:
    MediaControlClosedCaptionsContainerElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
};

// ----------------------------

class MediaControlClosedCaptionsTrackListElement FINAL : public MediaControlDivElement {
public:
    static PassRefPtr<MediaControlClosedCaptionsTrackListElement> create(Document*, MediaControls*);

    virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }

    void updateDisplay();

private:
    MediaControlClosedCaptionsTrackListElement(Document*, MediaControls*);

    void rebuildTrackListMenu();

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;

    typedef Vector<RefPtr<Element> > TrackMenuItems;
    TrackMenuItems m_menuItems;
#if ENABLE(VIDEO_TRACK)
    typedef HashMap<RefPtr<Element>, RefPtr<TextTrack> > MenuItemToTrackMap;
    MenuItemToTrackMap m_menuToTrackMap;
#endif
    MediaControls* m_controls;
};

// ----------------------------

class MediaControlTimelineElement FINAL : public MediaControlInputElement {
public:
    static PassRefPtr<MediaControlTimelineElement> create(Document*, MediaControls*);

    virtual bool willRespondToMouseClickEvents() OVERRIDE;

    void setPosition(double);
    void setDuration(double);

private:
    explicit MediaControlTimelineElement(Document*, MediaControls*);

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;

    MediaControls* m_controls;
};

// ----------------------------

class MediaControlFullscreenButtonElement FINAL : public MediaControlInputElement {
public:
    static PassRefPtr<MediaControlFullscreenButtonElement> create(Document*);

    virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }

    virtual void setIsFullscreen(bool);

private:
    explicit MediaControlFullscreenButtonElement(Document*);

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;
};

// ----------------------------

class MediaControlPanelVolumeSliderElement FINAL : public MediaControlVolumeSliderElement {
public:
    static PassRefPtr<MediaControlPanelVolumeSliderElement> create(Document*);

private:
    explicit MediaControlPanelVolumeSliderElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
};
// ----------------------------

class MediaControlFullscreenVolumeSliderElement : public MediaControlVolumeSliderElement {
public:
    static PassRefPtr<MediaControlFullscreenVolumeSliderElement> create(Document*);

private:
    explicit MediaControlFullscreenVolumeSliderElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
};

// ----------------------------

class MediaControlFullscreenVolumeMinButtonElement : public MediaControlInputElement {
public:
    static PassRefPtr<MediaControlFullscreenVolumeMinButtonElement> create(Document*);

    virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }

private:
    explicit MediaControlFullscreenVolumeMinButtonElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;
};

// ----------------------------

class MediaControlFullscreenVolumeMaxButtonElement : public MediaControlInputElement {
public:
    static PassRefPtr<MediaControlFullscreenVolumeMaxButtonElement> create(Document*);

    virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }

private:
    explicit MediaControlFullscreenVolumeMaxButtonElement(Document*);

    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
    virtual void defaultEventHandler(Event*) OVERRIDE;
};

// ----------------------------

class MediaControlTimeRemainingDisplayElement FINAL : public MediaControlTimeDisplayElement {
public:
    static PassRefPtr<MediaControlTimeRemainingDisplayElement> create(Document*);

private:
    explicit MediaControlTimeRemainingDisplayElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
};

// ----------------------------

class MediaControlCurrentTimeDisplayElement FINAL : public MediaControlTimeDisplayElement {
public:
    static PassRefPtr<MediaControlCurrentTimeDisplayElement> create(Document*);

private:
    explicit MediaControlCurrentTimeDisplayElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;
};

// ----------------------------

#if ENABLE(VIDEO_TRACK)

class MediaControlTextTrackContainerElement FINAL : public MediaControlDivElement, public TextTrackRepresentationClient {
public:
    static PassRefPtr<MediaControlTextTrackContainerElement> create(Document*);

    void updateDisplay();
    void updateSizes(bool forceUpdate = false);
    void enteredFullscreen();
    void exitedFullscreen();
    static const AtomicString& textTrackContainerElementShadowPseudoId();

private:
    void updateTimerFired(Timer<MediaControlTextTrackContainerElement>*);

    explicit MediaControlTextTrackContainerElement(Document*);
    virtual const AtomicString& shadowPseudoId() const OVERRIDE;

    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);

    virtual PassRefPtr<Image> createTextTrackRepresentationImage() OVERRIDE;
    virtual void textTrackRepresentationBoundsChanged(const IntRect&) OVERRIDE;
    void clearTextTrackRepresentation();
    OwnPtr<TextTrackRepresentation> m_textTrackRepresentation;

    Timer<MediaControlTextTrackContainerElement> m_updateTimer;
    IntRect m_videoDisplaySize;
    int m_fontSize;
    bool m_fontSizeIsImportant;
};

#endif

} // namespace WebCore

#endif // ENABLE(VIDEO)

#endif // MediaControlElements_h


text:
MANTENIMIENTO VUELOS

"Insertar, modificar y eliminar Vuelos. KOHANA Framework, Programacion IV"

VUELOS

Modificacion de datos.

                <form action="">

                    País:
                    <select class="form-control">
                    <option>1</option>
                    </select>
                    Aerolinea:
                    <select class="form-control">
                    <option>1</option>
                    </select>

                        Precio:
                        <input type="input" class="form-control" id="exampleInputEmail1" placeholder="Precio">

                    <button type="submit" class="btn btn-primary btn-block">Agregar</button>
                </form>

Listado:

                        <form action="procesos/adminU.php" method="post" enctype="multipart/form-data">

                                        ID Vuelo
                                        Pais
                                        Aerolinea
                                        Precio
                                        Modificar
                                        Activo

                                        1

                                        <select class="form-control">
                                        <option>1</option>
                                        </select>
                                        <select class="form-control">
                                        <option>1</option>
                                        </select>
                                        <input class="form-control" placeholder="Precio" value="Precio">
                                        <button name="" type='submit' class='btn btn-primary'>Modificar</button>
                                        <button name="" type='submit' class='btn btn-danger'>Eliminar</button>

                        </form>


text:
package org.firebears.commands;

import edu.wpi.first.wpilibj.command.Command;
import org.firebears.Robot;

/**
 * Sets an animation on a strip of lights.
 */
public class SetLights extends Command {
    byte anim;
    byte strips;

    public SetLights(byte p_stripsToSet, byte p_anim) {
        strips = p_stripsToSet;
        anim = p_anim;
    }

    protected void initialize() {
        Robot.lights.sendPacket(strips,anim);
    }

    protected void execute() { }

    protected boolean isFinished() {
        return true;
    }

    protected void end() { }

    protected void interrupted() { }
}


text:
/**
 *
 */
package edu.cmu.cs.lane.annotations;

/**
 *
 * Variant information wrapper
 * @author zinman
 *
 */
//NOTE: add class to @XmlSeeAlso in AbstractFeatureAnnotation
public class SnpEffVariantAnnotation extends AbstractFeatureAnnotation {
	public String geneName;
	public String rsId;
	public String chr;
	public String pos;

	/**
	 * @see edu.cmu.cs.lane.annotations.SampleGeneticFeatureBean#toString()
	 */
	@Override
	public String toString() {
		return geneName + " "
				+ rsId + " "
				+ chr + " "
				+ pos;
	}
}


text:
package com.dianping.polestar.jobs;

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.dianping.polestar.EnvironmentConstants;
import com.dianping.polestar.store.mysql.dao.QueryDAO;
import com.dianping.polestar.store.mysql.dao.impl.QueryDAOFactory;
import com.dianping.polestar.store.mysql.domain.QueryProgress;

public class ProcessJob extends AbstractJob {
	public final static Log LOG = LogFactory.getLog(ProcessJob.class);

	private final static int FLUSH_STDERROR_IN_MILLISECONDS = 2000;
	private final static String KRB5CCNAME = "KRB5CCNAME";
	private final static String TICKET_CACHE_EXTENTION = ".ticketcache";
	private final static String SHARK_FILTER_STRING = "spray-io-worker";

	private final QueryDAO queryDao = QueryDAOFactory.getInstance();

	protected final Map<String, String> envMap;
	protected volatile Boolean killedWhenExceedMaxLines = false;
	protected volatile Process process;

	public ProcessJob(JobContext jobContext) {
		super(jobContext);
		envMap = new HashMap<String, String>(System.getenv());
	}

	@Override
	public Integer run() throws Exception {
		int exitCode = -999;
		File workDir = new File(jobContext.getWorkDir());
		if (!workDir.exists()) {
			workDir.mkdirs();
		}
		final File dataFile = new File(workDir,
				Utilities.genUniqueDataFileName());
		dataFile.createNewFile();
		jobContext.setLocalDataPath(dataFile.getAbsolutePath());

		String ticketCachePath = workDir.getAbsolutePath() + File.separator
				+ jobContext.getUsername() + TICKET_CACHE_EXTENTION;
		Utilities.hadoopKerberosLogin(jobContext.getUsername(),
				jobContext.getPasswd(), ticketCachePath);
		Runtime.getRuntime().exec("chmod 777 " + ticketCachePath);
		jobContext.getProperties().setProperty(KRB5CCNAME, ticketCachePath);

		setEnvironmentVariables();

		final Boolean storeResult = jobContext.isStoreResult();
		final int resultLineLimit = storeResult ? EnvironmentConstants.MAX_RESULT_DATA_NUMBER
				: EnvironmentConstants.DEFAULT_RESULT_DATA_NUMBER;
		final int showLineLimit = Math.min(resultLineLimit,
				EnvironmentConstants.DEFAULT_RESULT_DATA_NUMBER);

		ProcessBuilder builder = new ProcessBuilder(jobContext.getCommands());
		builder.directory(workDir);
		builder.environment().putAll(envMap);
		process = builder.start();

		final InputStream inputStream = process.getInputStream();
		final InputStream errorStream = process.getErrorStream();
		String threadName = "job-" + jobContext.getId();
		Thread outThread = new Thread(threadName + "-stdout") {

			@Override
			public void run() {
				OutputStream os = null;
				BufferedOutputStream bos = null;
				try {
					BufferedReader reader = new BufferedReader(
							new InputStreamReader(inputStream));
					if (storeResult) {
						os = Utilities.openOutputStream(dataFile, false, true);
						bos = new BufferedOutputStream(os);
					}
					int currLineNum = 0;
					String line = reader.readLine();
					while (line != null && currLineNum <= resultLineLimit
							&& !isInterrupted()) {
						if (line.contains(SHARK_FILTER_STRING)) {
							line = reader.readLine();
							continue;
						}
						if (storeResult) {
							bos.write(line.getBytes());
							bos.write(Utilities.LINE_SEPARATOR);
						}
						if (currLineNum <= showLineLimit) {
							jobContext.getStdout().append(line)
									.append(Utilities.LINE_SEPARATOR);
						}
						currLineNum++;
						line = reader.readLine();
					}

					if (currLineNum > resultLineLimit) {
						LOG.info("data result lines limit exceed max value:"
								+ resultLineLimit
								+ ",start to destroy query process, id:"
								+ jobContext.getId());
						killedWhenExceedMaxLines = true;
						process.destroy();
					}
				} catch (Exception e) {
					LOG.error(e);
				} finally {
					jobContext.setDone();
					try {
						if (bos != null) {
							bos.flush();
							bos.close();
						}
						IOUtils.closeQuietly(os);
						IOUtils.closeQuietly(inputStream);
					} catch (IOException ex) {
					}
				}
			}
		};

		Thread errThread = new Thread(threadName + "-stderr") {
			@Override
			public void run() {
				try {
					BufferedReader reader = new BufferedReader(
							new InputStreamReader(errorStream));
					String line = reader.readLine();
					while (line != null && !isInterrupted()) {
						jobContext.getStderr().append(line)
								.append(Utilities.LINE_SEPARATOR);
						line = reader.readLine();
					}
				} catch (IOException e) {
					LOG.warn("Error reading the error stream", e);
				} finally {
					IOUtils.closeQuietly(errorStream);
				}
			}
		};

		Thread flushDBThread = new Thread(threadName + "-flushdb") {
			@Override
			public void run() {
				while (!jobContext.isDone()) {
					String stderrString = jobContext.getStderr().toString();
					queryDao.insertQueryProgress(new QueryProgress(jobContext
							.getId(), stderrString));
					try {
						Thread.sleep(FLUSH_STDERROR_IN_MILLISECONDS);
					} catch (InterruptedException e) {
					}
				}
			}
		};

		try {
			outThread.start();
			errThread.start();
			flushDBThread.start();
		} catch (IllegalStateException ise) {
		}

		try {
			LOG.info("start to execute query commands:"
					+ StringUtils.join(jobContext.getCommands(), ' ')
					+ " ,username:" + jobContext.getUsername() + " ,query-id:"
					+ jobContext.getId());

			exitCode = process.waitFor();
			try {
				outThread.join();
				errThread.join();
				flushDBThread.join();
			} catch (InterruptedException ie) {
				LOG.warn("Interrupted while reading the stdout/stderr stream",
						ie);
			}
			// force return exitcode 0 when query was killed because of
			// exceedance of max line number
			if (killedWhenExceedMaxLines) {
				exitCode = 0;
			}
		} catch (InterruptedException e) {
			LOG.error(e);
		} finally {
			process = null;
		}
		return exitCode;
	}

	@Override
	public void cancel() {
		process.destroy();
		process = null;
		canceled = true;
		LOG.info("query was canceled, id:" + jobContext.getId());
	}

	@Override
	public boolean isCanceled() {
		return canceled;
	}

	private void setEnvironmentVariables() {
		// set environment variables
		for (Object key : jobContext.getProperties().keySet()) {
			envMap.put((String) key,
					(String) jobContext.getProperties().get(key));
		}
	}

}