text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>INSPINIA | E-commerce</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">

    <link href="css/plugins/footable/footable.core.css" rel="stylesheet">

    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

                              David Williams
                              Art Director

Profile

Contacts

Mailbox

Logout

                        IN+

                     Dashboards

Dashboard v.1

Dashboard v.2

Dashboard v.3

Dashboard v.4

Dashboard v.5 NEW

                     Layouts

                     Graphs

Flot Charts

Morris.js Charts

Rickshaw Charts

Chart.js

Chartist

c3 charts

Peity Charts

Sparkline Charts

                     Mailbox 16/24

Inbox

Email view

Compose email

Email templates

                     Metrics

                     Widgets

                     Forms

Basic form

Advanced Plugins

Wizard

File Upload

Text Editor

Markdown

                     App Views  SPECIAL

Contacts

Profile

Profile v.2

Contacts v.2

Projects

Project detail

Teams board

Social feed

Clients

Outlook view

Vote list

File manager

Calendar

Issue tracker

Blog

Article

FAQ

Timeline

Pin board

                     Other Pages

Search results

Lockscreen

Invoice

Login

Login v.2

Forget password

Register

404 Page

500 Page

Empty page

                     MiscellaneousNEW

Notification

Nestable list

Agile board

Timeline v.2

Diff

i18 support

Sweet alert

Idle timer

Truncate

Spinners

Live favicon

Google maps

Code editor

Modal window

Clipboard

Forum view

Validation

Tree view

Loading buttons

Chat view

Masonry

Tour

                     UI Elements

Typography

Icons

Draggable Panels

Resizeable Panels

Buttons

Video

Panels

Tabs

Notifications & Tooltips

Badges, Labels, Progress

                     Grid options

                     Tables

Static Tables

Data Tables

Foo Tables

jqGrid

                     E-commerce

Products grid

Products list

Product edit

Product detail

Cart

Orders

Credit Card form

                     Gallery

Lightbox Gallery

Slick Carousel

Bootstrap Carousel

                     Menu Levels

                            Third Level

                                    Third Level Item

                                    Third Level Item

                                    Third Level Item

Second Level Item

                            Second Level Item

                            Second Level Item

                     CSS Animations 62

                     Landing Page NEW

                     Package

            <form role="search" class="navbar-form-custom" action="search_results.html">

                    <input type="text" placeholder="Search for something..." class="form-control" name="top-search" id="top-search">

            </form>

                    Welcome to INSPINIA+ Admin Theme.

                          16

                                    46h ago
                                    Mike Loreipsum started following Monica Smith.

                                    3 days ago at 7:58 pm - 10.06.2014

                                    5h ago
                                    Chris Johnatan Overtunk started following Monica Smith.

                                    Yesterday 1:21 pm - 11.06.2014

                                    23h ago
                                    Monica Smith love Kim Smith.

                                    2 days ago at 2:30 am - 11.06.2014

                                     Read All Messages

                          8

                                     You have 16 messages
                                    4 minutes ago

                                     3 New Followers
                                    12 minutes ago

                                     Server Rebooted
                                    4 minutes ago

                                    See All Alerts

                         Log out

E-commerce product list

                            Home

                            E-commerce

                            Product list

                            Product Name
                            <input type="text" id="product_name" name="product_name" value="" placeholder="Product Name" class="form-control">

                            Price
                            <input type="text" id="price" name="price" value="" placeholder="Price" class="form-control">

                            Quantity
                            <input type="text" id="quantity" name="quantity" value="" placeholder="Quantity" class="form-control">

                            Status
                            <select name="status" id="status" class="form-control">
                                <option value="1" selected>Enabled</option>
                                <option value="0">Disabled</option>
                            </select>

                                    Product Name
                                    Model
                                    Description
                                    Price
                                    Quantity
                                    Status
                                    Action

                                       Example product 1

                                        Model 1

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $50.00

                                        1000

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 2

                                        Model 2

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $40.00

                                        4300

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 3

                                        Model 3

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $22.00

                                        300

                                        Disabled

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 4

                                        Model 4

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $67.00

                                        2300

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 5

                                        Model 5

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $76.00

                                        800

                                        Low stock

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 6

                                        Model 6

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $60.00

                                        6000

                                        Disabled

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 7

                                        Model 7

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $32.00

                                        700

                                        Disabled

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 8

                                        Model 8

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $86.00

                                        5180

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 9

                                        Model 9

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $97.00

                                        450

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 10

                                        Model 10

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $43.00

                                        7600

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 1

                                        Model 1

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $50.00

                                        1000

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 2

                                        Model 2

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $40.00

                                        4300

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 3

                                        Model 3

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $22.00

                                        300

                                        Low stock

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 4

                                        Model 4

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $67.00

                                        2300

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 5

                                        Model 5

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $76.00

                                        800

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 6

                                        Model 6

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $60.00

                                        6000

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 7

                                        Model 7

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $32.00

                                        700

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 8

                                        Model 8

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $86.00

                                        5180

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 9

                                        Model 9

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $97.00

                                        450

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                                        Example product 10

                                        Model 10

                                        It is a long established fact that a reader will be distracted by the readable
                                        content of a page when looking at its layout. The point of using Lorem Ipsum is
                                        that it has a more-or-less normal distribution of letters, as opposed to using
                                        'Content here, content here', making it look like readable English.

                                        $43.00

                                        7600

                                        Enable

                                            <button class="btn-white btn btn-xs">View</button>
                                            <button class="btn-white btn btn-xs">Edit</button>

                10GB of 250GB Free.

                Copyright Example Company © 2014-2015


text:
using System.Collections.Generic;
using System.Linq;
using DataExplorer.Application;
using DataExplorer.Domain.Columns;
using DataExplorer.Domain.Tests.Columns;
using DataExplorer.Persistence.Columns;
using Moq;
using NUnit.Framework;

namespace DataExplorer.Persistence.Tests.Columns
{
    [TestFixture]
    public class ColumnRepositoryTests
    {
        private ColumnRepository _repository;
        private Mock<IDataContext> _mockContext;
        private List<Column> _columns;

        [SetUp]
        public void SetUp()
        {
            _columns = new List<Column>();
            _mockContext = new Mock<IDataContext>();
            _mockContext.Setup(p => p.Columns).Returns(_columns);
            _repository = new ColumnRepository(_mockContext.Object);
        }

        [Test]
        public void TestGetAllShouldReturnColumns()
        {
            var column = new ColumnBuilder().Build();
            _columns.Add(column);
            var result = _repository.GetAll();
            Assert.That(result.Single(), Is.EqualTo(column));
        }

        [Test]
        public void TestGetShouldReturnColumn()
        {
            var column = new ColumnBuilder().WithId(1).Build();
            _columns.Add(column);
            var result = _repository.Get(1);
            Assert.That(result, Is.EqualTo(column));
        }

        [Test]
        public void TestAddShouldAddColumn()
        {
            var column = new ColumnBuilder().Build();
            _repository.Add(column);
            Assert.That(_columns.Single(), Is.EqualTo(column));
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
using MediatR;
using ygo.application.Dto;

namespace ygo.application.Queries.ArchetypeById
{
    public class ArchetypeByIdQuery : IRequest<ArchetypeDto>
    {
        public long Id { get; set; }
    }
}


text:
A server for [Noctua](https://github.com/geneontology/noctua/)

## Usage

To build and launch a server, see [INSTRUCTIONS.md](INSTRUCTIONS.md)

## About

Minerva is a wrapper and server for the OWL API that serves as the
back end for Noctua. It communicates with Noctua via Barista. It gains
its knowledge of the world through a Golr instance.

For specifications, see [specs/](specs)


text:
let UrlPattern = require('url-pattern')
const Logger = require('../lib/Logger')
const fs = require('fs')
const security = require('./security')
let logger

module.exports = {
  load,
  add,
  match,
  resolve
}

const patterns = {}

function load(rules) {
  logger = Logger.getLogger('router')
  for (let name of Object.keys(rules)) {
    let pattern = patchIPParameters(name)
    let address = rules[name]
    if (!address) address = pattern.stringify()
    patterns[name] = {
      pattern: pattern,
      address: address
    }
  }
}

/**
 * REST params can contain dots. I.e: ips/17.223.37.12, properties/database.user
 * @return {URLPattern}
 */
function patchIPParameters(name) {
  const pattern = new UrlPattern(name)
  let regex = pattern.regex.toString()
  if (regex.includes('[')) {
    regex = regex.split('[').map((el, i) => i === 0 ? el : '\\.' + el).reduce((a, el) => a + '[' + el)
    regex = regex.substring(1, regex.length - 2)
    pattern.regex = new RegExp(regex, pattern.flags)
  }
  return pattern
}

function add(rules) {
  load(rules)
}

function match(path) {
  for (let name of Object.keys(patterns)) {
    let match = patterns[name].pattern.match(path)
    if (match) {
      logger.trace(match + ' ' + patterns[name].pattern.stringify() + ' ' + patterns[name].pattern.stringify(match))
    }
  }
}

/**
 * Get the real path and REST params
 * Note that querystring params are located along with the path
 * @param {String} path -A URL path to match against current routing table
 *@return {Object} {path:the real path, params: the REST params}
 */
function resolve(path, cb) {
  if (process.env.PERFORMANCE) return { path, params: null }
  security.checkManySubfolders(path)
  let result
  for (let name of Object.keys(patterns)) {
    let pattern = patterns[name].pattern
    let match = pattern.match(path)
    let params = (match && Object.keys(match).length == 0) ? null : match
    if (match) {
      let mainpath = patterns[name].address
      if (match['_']) {
        //pure URL (/p/a/t/h/?abcd)
        let subpath = match['_']
        if (!subpath) subpath = ''
        if (mainpath.endsWith('/') === false) mainpath = mainpath + '/'
        if (subpath.startsWith('/')) subpath = subpath.substring(1)
        result = {
          path: mainpath + subpath,
          params: params
        }
      } else {
        //REST service
        result = {
          path: mainpath,
          params: params
        }
      }
      return result;
    }
  }
  //if not found try to resolve if automatic routing or not
  return resolveAutomaticRouting(path, cb)
}

/**
 * A service can be a REST service but no need to be defined in config rules
 * This is useful when dropping js files in the /app/ folder directly anz zero configuration
 * The list of params p0, p1, etc can be set when guessing the route
 * Example:
 *  - if a file is /app/people.js and service is /app/people/id/permissions
 *  - result should be {path:app/people, params:{p0:id,p1:permissions}}
 * @param {string} path
 */
function resolveAutomaticRouting(path, cb) {
  let concat = path
  let index = concat.lastIndexOf('/')
  let found = false;

  while (index && index > 0) {
    concat = concat.substring(0, index)
    const realPath = cb(concat)
    if (fs.existsSync(realPath)) { found = true; break }
    index = concat.lastIndexOf('/')
  }

  if (found) {
    const realPath = concat
    const tail = path.substring(index + 1).split('/')
    const params = {}
    tail.forEach((el, i) => params['p' + i] = el)

    // add to routing table THE FIRST TIME so next time this rule will be executed eagerly
    let route = realPath
    tail.forEach((el, i) => route = `${route}(/:p${i})`)
    add({ route: '' })

    // return route
    return { path: realPath, params }

  } else {
    //if not found return the path
    return { path, params: null }
  }
}


text: nuget push YhsdApi\*.nupkg


text:
require_relative "helper"

class TestPairing < TestCase
  def setup
    @param = PairingParam.init_from_str(TYPE_A_PARAM)
  end

  def test_init
    assert_raise RuntimeError do
      Pairing.init_from_param_str("type a")
    end
    pairing1 = Pairing.init_from_param(@param)
    pairing2 = Pairing.init_from_param_str(@param.to_str())
    assert_equal pairing1.symmetric, pairing2.symmetric
    assert_equal pairing1.g1_bytes_length, pairing2.g1_bytes_length
    assert_equal pairing1.g2_bytes_length, pairing2.g2_bytes_length
  end

  def test_info
    pairing = Pairing.init_from_param(@param)
    assert pairing.symmetric
    assert_equal 128, pairing.g1_bytes_length
    assert_equal 64, pairing.g1_x_only_bytes_length
    assert_equal 65, pairing.g1_compressed_bytes_length
    assert_equal 128, pairing.g2_bytes_length
    assert_equal 64, pairing.g2_x_only_bytes_length
    assert_equal 65, pairing.g2_compressed_bytes_length
    assert_equal 128, pairing.gt_bytes_length
    assert_equal 20, pairing.zr_bytes_length
  end
end


text:
// Copyright 2020 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview Unit tests for SaveVersionMismatchModalController.
 */

import { LostChangeObjectFactory } from
  'domain/exploration/LostChangeObjectFactory';
import { TestBed } from '@angular/core/testing';
import { UtilsService } from 'services/utils.service';
import { WindowRef } from 'services/contextual/window-ref.service';

describe('Save Version Mismatch Modal Controller', () => {
  let $scope = null;
  let $log = null;
  let logSpy = null;
  let $timeout = null;
  const windowRef = new WindowRef();
  const mockExplorationData = {
    discardDraft: (callback) => callback()
  };
  const lostChanges = [{
    cmd: 'add_state',
    state_name: 'State name',
  }];

  beforeEach(function() {
    TestBed.configureTestingModule({
      providers: [
        UtilsService
      ]
    });
  });

  beforeEach(angular.mock.module('oppia', ($provide) => {
    $provide.value('ExplorationDataService', mockExplorationData);
    $provide.value('LostChangeObjectFactory', TestBed.get(
      LostChangeObjectFactory));
    $provide.value('WindowRef', windowRef);
  }));
  beforeEach(angular.mock.inject(($injector, $controller) => {
    $log = $injector.get('$log');
    $timeout = $injector.get('$timeout');

    logSpy = spyOn($log, 'error').and.callThrough();

    const $rootScope = $injector.get('$rootScope');
    $scope = $rootScope.$new();
    $controller(
      'SaveVersionMismatchModalController', {
        $scope: $scope,
        lostChanges: lostChanges
      });
  }));

  it('should evaluates lostChanges when controller is initialized', () => {
    expect($scope.lostChanges[0].cmd).toBe('add_state');
    expect($scope.lostChanges[0].stateName).toBe('State name');
    expect(logSpy).toHaveBeenCalledWith(
      'Lost changes: ' + JSON.stringify(lostChanges));
  });

  it('should remove exploration draft from local storage when modal is closed',
    () => {
      const reloadSpy = jasmine.createSpy('reload');
      spyOnProperty(windowRef, 'nativeWindow').and.returnValue({
        location: {
          reload: reloadSpy
        }
      });
      const discardDraftSpy = (
        spyOn(mockExplorationData, 'discardDraft').and.callThrough());

      $scope.discardChanges();
      expect(discardDraftSpy).toHaveBeenCalled();

      $timeout.flush(20);
      expect(reloadSpy).toHaveBeenCalled();
    });
});


text:
package com.xujun.funapp.view.main.fragment.picture;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.xujun.funapp.R;
import com.xujun.funapp.adapters.MultiPictureListAdapter;
import com.xujun.funapp.adapters.PictureListAdapter;
import com.xujun.funapp.beans.PictureListBean;
import com.xujun.funapp.common.BaseListFragment;
import com.xujun.funapp.common.Constants.IntentConstants;
import com.xujun.funapp.common.RequestResult;
import com.xujun.funapp.common.recyclerView.BaseRecyclerAdapter;
import com.xujun.funapp.common.recyclerView.MultiItemTypeSupport;
import com.xujun.funapp.model.PictureListModel;
import com.xujun.funapp.view.detail.PictureDetailActivity2;
import com.xujun.mylibrary.utils.LUtils;
import com.xujun.mylibrary.utils.ListUtils;

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

/**
 * @ explain:
 * @ author:xujun on 2016/9/17 20:17
 * @ email:gdutxiaoxu@163.com
 */
public class PictureListFragment extends BaseListFragment<PictureListPresenter>
        implements PictureListContract.View<PictureListBean> {

    private static final String TITLE = "title";
    private static final String ID = "id";

    private static String[] tags = PictureListModel.tags;
    private ArrayList<PictureListBean.TngouBean>  mDatas = new ArrayList<>();;
    private PictureListAdapter mAdapter;

    protected int mId = -1;
    private MultiPictureListAdapter mMultiPictureListAdapter;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        LUtils.d(this.getClass().getSimpleName()+"onCreate  mId"+mId);
        super.onCreate(savedInstanceState);
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        LUtils.d(this.getClass().getSimpleName()+"onCreateView  mId"+mId);
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        LUtils.d(this.getClass().getSimpleName()+"onDestroyView  mId"+mId);
        super.onActivityCreated(savedInstanceState);
    }

    @Override
    public void onDestroyView() {
        LUtils.d(this.getClass().getSimpleName()+"onDestroyView  mId"+mId);
        super.onDestroyView();
    }

    @Override
    public void onDestroy() {
        LUtils.d(this.getClass().getSimpleName()+"onDestroy  mId"+mId);
        super.onDestroy();
    }

    public static PictureListFragment newInstance(String title, int id) {
        PictureListFragment pictureListFragment = new PictureListFragment();
        Bundle bundle = new Bundle();
        bundle.putString(TITLE, title);
        bundle.putInt(ID, id);
        pictureListFragment.setArguments(bundle);
        return pictureListFragment;
    }

    @Override
    protected void initAru() {
        super.initAru();
        Bundle arguments = getArguments();
        if (arguments != null) {
            mId = arguments.getInt(ID);
//            WriteLogUtil.i("mId=" + mId);
        }

    }

    @Override
    protected BaseRecyclerAdapter getAdapter() {

        mMultiPictureListAdapter = new MultiPictureListAdapter(mContext, mDatas, new MultiItemTypeSupport<PictureListBean.TngouBean>() {

            @Override
            public int getItemType(PictureListBean.TngouBean tngouBean, int position) {
                if (position % 5 == 0) {
                    return MultiPictureListAdapter.TYPE_TWO;
                } else {
                    return MultiPictureListAdapter.TYPE_ONE;
                }

            }

            @Override
            public int getLayoutId(int itemType) {
                if (itemType == MultiPictureListAdapter.TYPE_ONE) {
                    return R.layout.item_picture_list_one;
                }
                return R.layout.item_picture_list_two;
            }
        });
//        View headerView = View.inflate(mContext, R.layout.header_view_test, null);
//        mMultiPictureListAdapter.addHeaderView(headerView);
        return mMultiPictureListAdapter;
    }

    @Override
    protected void initListener() {
        super.initListener();
        mMultiPictureListAdapter.setOnItemClickListener(new BaseRecyclerAdapter.OnItemClickListener() {
            @Override
            public void onClick(View view, RecyclerView.ViewHolder holder, int position) {
                PictureListBean.TngouBean tngouBean = mDatas.get(position);
                readyGo(PictureDetailActivity2.class,
                        IntentConstants.DEFAULT_PARCEABLE_NAME, tngouBean);
            }
        });

    }

    @Override
    protected void initData() {
        super.initData();
        //  如果是第0个Item,初始化的时候主动去刷新,不是第0个Item,等到界面的时候会调用fetech方法手动去刷新
        if(isFirstItem()){
            beginRefresh();
        }
    }

    @Override
    protected PictureListPresenter setPresenter() {
        return new PictureListPresenter(this);
    }

    protected void getNextPageData() {
        mPresenter.getPictureList(String.valueOf(++mPage), String.valueOf(mRows), mId+1);
    }

    protected void getFirstPageData() {
        mPage = 1;
        mPresenter.getPictureList(String.valueOf(mPage), String.valueOf(mRows), mId+1);
    }

    protected boolean isFirstItem(){
        return mId==0;
    }

    @Override
    public void showProgress() {

    }

    @Override
    public void hideProgress() {

    }

    @Override
    public void onSuccess(PictureListBean o) {
        List<PictureListBean.TngouBean> tngou = o.tngou;
        if (false == ListUtils.isEmpty(tngou)) {
            handleResult(tngou, RequestResult.success);
        } else {
            handleResult(tngou, RequestResult.empty);
        }

    }

    @Override
    public void onError(Throwable throwable) {

        handleResult(null, RequestResult.error);
    }

    @Override
    public void onLocal(PictureListBean o) {

    }
}


text:
package io.github.benas.jpopulator.spring;

import io.github.benas.jpopulator.api.Populator;
import io.github.benas.jpopulator.beans.Address;
import io.github.benas.jpopulator.beans.Gender;
import io.github.benas.jpopulator.beans.Person;
import io.github.benas.jpopulator.beans.Street;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Arrays;

import static org.assertj.core.api.Assertions.assertThat;

public class JPopulatorFactoryBeanTest {

    @Test
    public void testJPopulatorFactoryBeanWithDefaultRandomizers() {

        Populator populator = getPopulatorFromSpringContext("/application-context.xml");

        // the populator managed by spring should be correctly configured
        assertThat(populator).isNotNull();

        // the populator should populate valid instances
        Person person = populator.populateBean(Person.class);

        assertPerson(person);
    }

    @Test
    public void testJPopulatorFactoryBeanWithCustomRandomizers() {

        Populator populator = getPopulatorFromSpringContext("/application-context-with-custom-randomizers.xml");

        // the populator managed by spring should be correctly configured
        assertThat(populator).isNotNull();

        // the populator should populate valid instances
        Person person = populator.populateBean(Person.class);

        assertPerson(person);

        assertThat(person.getEmail())
                .isNotNull()
                .isNotEmpty()
                .matches(".*@.*\\..*");
    }

    private Populator getPopulatorFromSpringContext(String contextFileName) {

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(contextFileName);

        return (Populator) applicationContext.getBean("populator");
    }

    private void assertPerson(Person person) {
        assertThat(person).isNotNull();
        assertThat(person.getName()).isNotNull().isNotEmpty();
        assertThat(person.getEmail()).isNotNull().isNotEmpty();
        assertThat(person.getGender()).isNotNull().isIn(Arrays.asList(Gender.MALE, Gender.FEMALE));
        assertThat(person.getBirthDate()).isNotNull();
        assertThat(person.getPhoneNumber()).isNotNull().isNotEmpty();
        assertThat(person.getNicknames()).isNotNull().isEmpty();

        final Address address = person.getAddress();
        assertThat(address).isNotNull();
        assertThat(address.getCity()).isNotNull().isNotEmpty();
        assertThat(address.getCountry()).isNotNull().isNotEmpty();

        final Street street = address.getStreet();
        assertThat(street).isNotNull();
        assertThat(street.getName()).isNotNull().isNotEmpty();
        assertThat(street.getNumber()).isNotNull();
        assertThat(street.getType()).isNotNull();

        assertThat(address.getZipCode()).isNotNull().isNotEmpty();
        assertThat(person.getExcluded()).isNull();
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:background="@android:color/transparent"
    android:orientation="vertical">

    <LinearLayout
        android:id="@id/exo_controller_bottom"
        style="@style/ExoMediaControllerBottom">

        <TextView
            android:id="@id/exo_position"
            style="@style/ExoMediaCurrPosition"
            android:layout_marginLeft="10dp"
            tools:text="06:21" />

        <TextView
            style="@style/ExoMediaSpan"
            android:layout_marginLeft="2dp"
            android:layout_marginRight="2dp"
            android:text="@string/exo_fenge"
            android:textSize="12sp" />

        <TextView
            android:id="@id/exo_duration"
            style="@style/ExoMediaDuration"
            tools:text="06:21" />

        <chuangyuan.ycj.videolibrary.widget.ExoDefaultTimeBar
            app:bar_height="2dp"
            app:buffered_color="@android:color/white"
            app:played_color="#26e75c"
            app:scrubber_drawable="@mipmap/ding_wai"
            app:unplayed_color="#a5436af9"
            android:id="@id/exo_progress"
            style="@style/ExoMediaTimeBar" />

        <TextView style="@style/ExoMediaTextSwitch" />

        <TextView
            android:id="@+id/exoMediaSpeed"
            style="@style/ExoMediaTextSwitch" />
        <android.support.v7.widget.AppCompatCheckBox
            android:id="@id/exo_video_fullscreen"
            style="@style/ExoMediaButton.Fullscreen" />
    </LinearLayout>

    <ImageButton
        android:id="@id/exo_play"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:background="@null"
        android:src="@drawable/ic_exo_start"
        android:visibility="visible" />

    <ImageButton
        android:id="@id/exo_pause"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:background="@null"
        android:src="@drawable/ic_exo_pause"
        android:visibility="gone" />

    <TextView
        android:id="@id/exo_controls_title"
        style="@style/ExoMediaTitle"/>

</RelativeLayout>


text:
//package it.richkmeli.rms.data.model.rmc;
//
//
//import it.richkmeli.jframework.orm.AuthDatabaseException;
//import it.richkmeli.jframework.orm.DatabaseManager;
//
//import java.util.ArrayList;
//import java.util.List;
//
//public class RmcDatabaseJframeworkManager extends DatabaseManager implements RmcDatabaseModel {
//
//    public RmcDatabaseJframeworkManager() throws AuthDatabaseException {
//        schemaName = "AuthSchema";
//        tableName = schemaName + "." + "rmc";
//        table = "(" +
//                "associatedUser VARCHAR(50) REFERENCES AuthSchema.auth(email) ON DELETE CASCADE," +
//                "rmcId VARCHAR(68) NOT NULL," +
//                "PRIMARY KEY (associatedUser, rmcId)" +
//                ")";
//
//        init();
//    }
//
//    @Override
//    public Rmc addRMC(Rmc client) throws AuthDatabaseException {
//        if (create(client)) {
//            return client;
//        } else {
//            return null;
//        }
//    }
//
//    @Override
//    public Rmc editRMC(Rmc client) throws AuthDatabaseException {
//        //if (
//                removeRmcUserPair(new Rmc("", client.getRmcId()));
//        //) {
//            return addRMC(client);
//            //return false;
//            //_TODO: Fix update -> Anche le chiavi primarie devono essere modificabili
//            // return update(client);
//       /* } else {
//            return null;
//        }*/
//    }
//
//    @Override
//    public void removeRMCs(String associatedUser) throws AuthDatabaseException {
//        List<Rmc> rmcs = getRMCs(associatedUser);
//        boolean response = true;
//        for (Rmc rmc : rmcs) {
//            if (!delete(rmc)) {
//                response = false;
//            }
//        }
//        //return response;
//    }
//
//    @Override
//    public void removeRMC(String rmcId) throws AuthDatabaseException {
//        List<Rmc> rmcs = getAssociatedUsers(rmcId);
//        boolean response = true;
//        for (Rmc rmc : rmcs) {
//            //  if (!
//            removeRmcUserPair(rmc);
//            //  ) {
//            //      response = false;
//        }
//    }
//    //return response;
//    //}
//
//    @Override
//    public void removeRmcUserPair(Rmc client) throws AuthDatabaseException {
//        delete(client);
//    }
//
//    @Override
//    public boolean checkRmcUserPair(Rmc client) throws AuthDatabaseException {
//        return read(client) != null;
//    }
//
//    @Override
//    public boolean checkRmc(String rmcID) throws AuthDatabaseException {
////        return read(new RMC("", rmcID)) != null;
//        return getAssociatedUsers(rmcID).size() > 0;
//    }
//
//
//    public List<Rmc> getRMCs() throws AuthDatabaseException {
//        return getRMCs("");
//    }
//
//    @Override
//    public List<Rmc> getAssociatedUsers(String rmcId) throws AuthDatabaseException {
//        List<Rmc> rmcs = readAll(Rmc.class);
//        if (rmcs != null) {
//            // filter user rmcs
//            List<Rmc> userRmcs = new ArrayList<>();
//            for (Rmc rmc : rmcs) {
//                if (rmc.getRmcId().equalsIgnoreCase(rmcId)) {
//                    userRmcs.add(rmc);
//                }
//            }
//            return userRmcs;
//        } else {
//            return null;
//        }
//    }
//
//    @Override
//    public List<Rmc> getRMCs(String user) throws AuthDatabaseException {
//        List<Rmc> rmcs = readAll(Rmc.class);
//        if (rmcs != null) {
//            // filter user rmcs
//            List<Rmc> userRmcs = new ArrayList<>();
//            for (Rmc rmc : rmcs) {
//                if (rmc.getAssociatedUser().equalsIgnoreCase(user)) {
//                    userRmcs.add(rmc);
//                }
//            }
//            return userRmcs;
//        } else {
//            return null;
//        }
//    }
//
//    @Override
//    public List<Rmc> getAllRMCs() throws AuthDatabaseException {
//        return readAll(Rmc.class);
//    }
//
//    @Override
//    public List<Rmc> getUnassociatedRmcs(String rmcID) throws AuthDatabaseException {
//        List<Rmc> rmcs = getRMCs("");
//        List<String> user = new ArrayList<>();
//        for (Rmc rmc : rmcs) {
//            user.add(rmc.getAssociatedUser());
//        }
//        return getRMCs(user.get(0));
//    }
//
//}


text:
module.exports = function(app) {

  var _ = require('lodash')
    , Log = require('../models/log').Log;

  var determineLogsToLoad = function(days) {
    return _.chain(days).uniq("_id").without(undefined).value();
  };

  var mapLogsToDays = function(logs,days) {
    //-- loop through each log that was loaded
    _.forEach(logs, function(log) {
      var day = _.find(days, { '_id': log.day });
      if (day) {
        day.log = log._id;
      }
    });
  };

  return {
    sideloadLogs: function(req,res,data) {
      return function(callback) {
        if (data.days) {
          var logsToLoad = determineLogsToLoad(data.days);
          Log.find({
            'day': {
              $in: logsToLoad
            }
          }, function(error, logs) {
            if (error) {
              callback(error);
            } else {
              data.logs = logs;
              mapLogsToDays(data.logs,data.days);
              callback(null);
            }
          });
        } else {
          callback("could not find days in data");
        }
      }
    }
  }
};


text:
package com.amazonaws.services.sagemaker.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListDeviceFleetsResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {

    /**
     *

     * Summary of the device fleet.
     *

     */
    private java.util.List<DeviceFleetSummary> deviceFleetSummaries;
    /**
     *

     * The response from the last list when returning a list large enough to need tokening.
     *

     */
    private String nextToken;

    /**
     *

     * Summary of the device fleet.
     *

     *
     * @return Summary of the device fleet.
     */

    public java.util.List<DeviceFleetSummary> getDeviceFleetSummaries() {
        return deviceFleetSummaries;
    }

    /**
     *

     * Summary of the device fleet.
     *

     *
     * @param deviceFleetSummaries
     *        Summary of the device fleet.
     */

    public void setDeviceFleetSummaries(java.util.Collection<DeviceFleetSummary> deviceFleetSummaries) {
        if (deviceFleetSummaries == null) {
            this.deviceFleetSummaries = null;
            return;
        }

        this.deviceFleetSummaries = new java.util.ArrayList<DeviceFleetSummary>(deviceFleetSummaries);
    }

    /**
     *

     * Summary of the device fleet.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setDeviceFleetSummaries(java.util.Collection)} or {@link #withDeviceFleetSummaries(java.util.Collection)}
     * if you want to override the existing values.
     *

     *
     * @param deviceFleetSummaries
     *        Summary of the device fleet.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListDeviceFleetsResult withDeviceFleetSummaries(DeviceFleetSummary... deviceFleetSummaries) {
        if (this.deviceFleetSummaries == null) {
            setDeviceFleetSummaries(new java.util.ArrayList<DeviceFleetSummary>(deviceFleetSummaries.length));
        }
        for (DeviceFleetSummary ele : deviceFleetSummaries) {
            this.deviceFleetSummaries.add(ele);
        }
        return this;
    }

    /**
     *

     * Summary of the device fleet.
     *

     *
     * @param deviceFleetSummaries
     *        Summary of the device fleet.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListDeviceFleetsResult withDeviceFleetSummaries(java.util.Collection<DeviceFleetSummary> deviceFleetSummaries) {
        setDeviceFleetSummaries(deviceFleetSummaries);
        return this;
    }

    /**
     *

     * The response from the last list when returning a list large enough to need tokening.
     *

     *
     * @param nextToken
     *        The response from the last list when returning a list large enough to need tokening.
     */

    public void setNextToken(String nextToken) {
        this.nextToken = nextToken;
    }

    /**
     *

     * The response from the last list when returning a list large enough to need tokening.
     *

     *
     * @return The response from the last list when returning a list large enough to need tokening.
     */

    public String getNextToken() {
        return this.nextToken;
    }

    /**
     *

     * The response from the last list when returning a list large enough to need tokening.
     *

     *
     * @param nextToken
     *        The response from the last list when returning a list large enough to need tokening.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListDeviceFleetsResult withNextToken(String nextToken) {
        setNextToken(nextToken);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getDeviceFleetSummaries() != null)
            sb.append("DeviceFleetSummaries: ").append(getDeviceFleetSummaries()).append(",");
        if (getNextToken() != null)
            sb.append("NextToken: ").append(getNextToken());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof ListDeviceFleetsResult == false)
            return false;
        ListDeviceFleetsResult other = (ListDeviceFleetsResult) obj;
        if (other.getDeviceFleetSummaries() == null ^ this.getDeviceFleetSummaries() == null)
            return false;
        if (other.getDeviceFleetSummaries() != null && other.getDeviceFleetSummaries().equals(this.getDeviceFleetSummaries()) == false)
            return false;
        if (other.getNextToken() == null ^ this.getNextToken() == null)
            return false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getDeviceFleetSummaries() == null) ? 0 : getDeviceFleetSummaries().hashCode());
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
        return hashCode;
    }

    @Override
    public ListDeviceFleetsResult clone() {
        try {
            return (ListDeviceFleetsResult) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

}


text:
package com.sksamuel.scrimage.filter;

import java.awt.image.BufferedImageOp;

public class InvertAlphaFilter extends BufferedOpFilter {

    @Override
    public BufferedImageOp op() {
        return new thirdparty.jhlabs.image.InvertAlphaFilter();
    }
}


text:
<form id="searchform" class="searchform" method="get" action="<?php echo get_home_url(); ?>">

        <input type="text" name="s" onblur="if (this.value == '') {this.value = '<?php _e('Search','graphene'); ?>';}" onfocus="if (this.value == '<?php _e('Search','graphene'); ?>') {this.value = '';}" value="<?php _e('Search','graphene'); ?>" />
        <button type="submit"><?php _e('Search', 'graphene'); ?></button>

    <?php do_action('graphene_search_form'); ?>
</form>


text:
goog.provide('ping.Game');

goog.require('ping.Runner');
goog.require('ping.popup');
goog.require('lime.Scene');

ping.Game = function() {
  lime.Scene.call(this);
  var layer = new lime.Layer().setAnchorPoint(0,0).setPosition(-1,0);

  this.setAutoResize(lime.AutoResize.ALL);

  that = this;

  this.Score = 0;
  this.outScore = 0;
  this.strikeScore = 0;
  this.batterScore = 0;

  /**
   * Backgound square
   */
  this.bg = new lime.Sprite().setSize(640,640).setFill(ping.Resources.img.bg).setAnchorPoint(0,0);
  layer.appendChild(this.bg);

  /**
   * table
   */
  var  table = new lime.Sprite().setSize(98,110).setFill(ping.Resources.img.table).setPosition(500,500).setAnchorPoint(0,0);
  this.bg.appendChild(table);

  /**
   * Mark strike score
   */
  var strikeScroller = new lime.Sprite().setSize(48, 24).setPosition(26, -1).setFill(ping.Resources.img.strikeScore).setAnchorPoint(0, 0);

  that.markStrike = new lime.Sprite().setPosition(26, -1).setSize(0, 24).setFill(100, 0, 0).setAnchorPoint(0,0);

  table.appendChild(strikeScroller);

  strikeScroller.setMask(that.markStrike);

  table.appendChild(that.markStrike);

  /**
   * Mark batter score
   */
  var batterScroller = new lime.Sprite().setSize(72, 24).setPosition(26, 43).setFill(ping.Resources.img.bttScore).setAnchorPoint(0, 0);

  that.markBatter = new lime.Sprite().setPosition(26, 43).setSize(0, 24).setFill(100, 0, 0).setAnchorPoint(0,0);

  table.appendChild(batterScroller);

  batterScroller.setMask(that.markBatter);

  table.appendChild(that.markBatter);

  /**
   * Mark out score
   */
  var outScroller = new lime.Sprite().setSize(48, 24).setPosition(26, 86).setFill(ping.Resources.img.outScore).setAnchorPoint(0, 0);

  that.markOut = new lime.Sprite().setPosition(26, 86).setSize(0, 24).setFill(100, 0, 0).setAnchorPoint(0,0);

  table.appendChild(outScroller);

  outScroller.setMask(that.markOut);

  table.appendChild(that.markOut);

  /**
   * batter
   */
  this.batter =  new lime.Sprite().setPosition(275,555).setAnchorPoint(0,0);
  var batterHead = new lime.Sprite().setPosition(0,0).setAnchorPoint(0.5, 0.5).setFill(ping.Resources.img.head).setSize(40,36);
  var batterBody = new lime.Sprite().setPosition(0,32).setAnchorPoint(0.5, 0.5).setFill(ping.Resources.img.body).setSize(34,42);
  this.batter.appendChild(batterBody);
  this.batter.appendChild(batterHead);

  //var  character = new lime.Sprite().setSize(42,62).setFill(ping.Resources.img.character).setPosition(260,530).setAnchorPoint(0,0).setScale(1.2);
  this.bg.appendChild(this.batter);

  /**
   * gay bong chay
   */
  this.gay = new lime.Sprite().setSize(60,14).setFill(ping.Resources.img.gay).setPosition(285,570).setAnchorPoint(0.05,0).setRotation(-45);
  this.bg.appendChild(this.gay);

//flag xac dinh dang danh hay chua danh
  var flag = false;

  this.runner = new Array();

  /**
   * score bg
   */
  //this.scoreBg = new lime.Sprite().setSize(140,90).setFill(ping.Resources.img.scoreBg).setPosition(20,530).setAnchorPoint(0,0);
  this.scoreBg = new lime.Sprite().setSize(140,90).setPosition(20,530).setAnchorPoint(0,0);
  this.bg.appendChild(this.scoreBg);

  this.hunder = new lime.Sprite().setSize(20,31).setFill(ping.Resources.img.s0).setPosition(40,40).setAnchorPoint(0,0);
  this.dozen = new lime.Sprite().setSize(20,31).setFill(ping.Resources.img.s0).setPosition(70,40).setAnchorPoint(0,0);
  this.digit = new lime.Sprite().setSize(20,31).setFill(ping.Resources.img.s0).setPosition(100,40).setAnchorPoint(0,0);

  this.scoreBg.appendChild(this.digit);
  this.scoreBg.appendChild(this.dozen);
  this.scoreBg.appendChild(this.hunder);

  var playBall = new lime.Sprite().setSize(313,66).setFill(ping.Resources.img.play).setPosition(320,550).setAnchorPoint(0.5,0.5);

  that.bg.appendChild(playBall);

  var playAnim = new lime.animation.Sequence(
        new lime.animation.MoveTo(320,370).setDuration(0.3).enableOptimizations().setEasing(lime.animation.Easing.EASEOUT),
        new lime.animation.Delay(0.2).enableOptimizations(),
        new lime.animation.MoveTo(320,-0).setDuration(0.3).enableOptimizations().setEasing(lime.animation.Easing.EASEOUT)
      );
  playBall.runAction(playAnim);

  goog.events.listenOnce(playAnim, lime.animation.Event.STOP, function() {
    that.bg.removeChild(playBall);
  });

  this.balltxt = new lime.Sprite().setSize(83,33).setFill(ping.Resources.img.balltxt).setAnchorPoint(0.5,0.5).setPosition(320,400).setHidden(true);
  this.bg.appendChild(this.balltxt);

  //this.startBall = setInterval(this.ball,4500);

  /**
   * lister event click
   */

  that.isDam = false;

  goog.events.listen(that, [ 'touchstart','touchmove','mousedown'], function(e) {

    var gayRotation = new lime.animation.Spawn(
                            new lime.animation.RotateBy(90).enableOptimizations().setDuration(0.3).setEasing(lime.animation.Easing.EASE),
                            new lime.animation.MoveBy(-7,2).enableOptimizations().setDuration(0.3).setEasing(lime.animation.Easing.EASE)
                            );
    var gayAnimation = new lime.animation.Sequence(gayRotation, new lime.animation.Delay(.1), gayRotation.reverse());

    var batterHeadRotation = new lime.animation.Spawn(
        new lime.animation.RotateBy(45).setDuration(0.25).enableOptimizations().setEasing(lime.animation.Easing.EASE),
        new lime.animation.MoveBy(0,-5).enableOptimizations().setDuration(0.25).setEasing(lime.animation.Easing.EASE)
        );

    var batterBodyAnimation = new lime.animation.MoveBy(0,-3).setDuration(0.3).setDuration(0.3).setEasing(lime.animation.Easing.EASE);

    if(!flag){
      that.isDam = true;
      that.gay.runAction(gayAnimation);
      batterHead.runAction(new lime.animation.Sequence( batterHeadRotation, new lime.animation.Delay(.2),batterHeadRotation.reverse()));
      batterBody.runAction(new lime.animation.Sequence( batterBodyAnimation, new lime.animation.Delay(.2),batterBodyAnimation.reverse()));
    }
    flag = true;
    goog.events.listenOnce(gayAnimation,lime.animation.Event.STOP,function(){
      flag = false;
      delete gayAnimation,gayRotation,batterHeadRotation,batterBodyAnimation;
    });
  });
  this.appendChild(layer);

  lime.scheduleManager.scheduleWithDelay(
      ping.Game.startThrow = function() {
        that.ball();
    }, that, 4500);

};
goog.inherits(ping.Game,lime.Scene);

ping.Game.prototype.ball = function(){

  /**
   * ball
   */
  var ballSprite = new lime.Sprite().setSize(25,25).setFill(ping.Resources.img.ball).setPosition(320,250).setAnchorPoint(0.5,0.5);
  that.bg.appendChild(ballSprite);

  var animThrowIndex = Math.floor(Math.random()*3);
  //var animThrowIndex = 2;
  var roadBall = that.animationThrow(animThrowIndex);

  setTimeout(function(){
    ballSprite.runAction(roadBall);
  },500);

  var animHitIndex = Math.floor(Math.random()*10);
  // get animation khi danh trung bong
  var animHit = new lime.animation.Spawn(
                  that.animationHit(animHitIndex),
                  new lime.animation.FadeTo(1).setDuration(0.2)
                );

  var flagDam = false;

  /**this.collision = setInterval(function(){
    //console.log(that.gay.getRotation() );

    if( ballSprite.getPosition().y < that.gay.getPosition().y + 7 &&
        ballSprite.getPosition().y > that.gay.getPosition().y - 3 &&
        that.gay.getRotation() < 45 && that.gay.getRotation() > 0 && ( animThrowIndex == 0 ||  animThrowIndex == 1)){
      flagDam = true;
      roadBall.stop();
      // Bong den cac vi tri
      ballSprite.setOpacity(0);
      ballSprite.runAction(animHit);
    }
  },10);**/

  lime.scheduleManager.scheduleWithDelay(
      ping.Game.collision = function() {
        if( ballSprite.getPosition().y < that.gay.getPosition().y + 7 &&
            ballSprite.getPosition().y > that.gay.getPosition().y - 3 &&
            that.gay.getRotation() < 45 && that.gay.getRotation() > 0 && ( animThrowIndex == 0 ||  animThrowIndex == 1)){
          flagDam = true;
          roadBall.stop();
          // Bong den cac vi tri
          ballSprite.setOpacity(0);
          ballSprite.runAction(animHit);
        }
  }, ballSprite, 10);

  // danh trung bong
  goog.events.listenOnce(roadBall,lime.animation.Event.STOP, function() {

    /**
     * animThrowIndex xac dinh nem bong trung hay truot
     * flagDam xac dinh danh trung hay danh truot hoac ko danh
     * animHitIndex xac dinh danh trung o nao
     */
    that.calcScore(animThrowIndex,flagDam,animHitIndex,that.isDam );

  });

  setTimeout(function(){
    that.bg.removeChild(ballSprite);
    lime.scheduleManager.unschedule(ping.Game.collision, ballSprite);
  },2500);

};

ping.Game.prototype.calcScore = function(animThrowIndex,flagDam,animHitIndex,isDam ){

  // nem trung
  if(animThrowIndex == 0 || animThrowIndex == 1){
    //danh trung
    if(flagDam){
      // home run
      if(animHitIndex == 0){
        that.strikeScore = 0;
        that.batterScore = 0;
        setTimeout(function(){
          that.headShoot();
          that.homeRun();
        },800);
      }
      // 1 hr
      else if (animHitIndex == 1 || animHitIndex == 2) {

        that.strikeScore = 0;
        that.batterScore = 0;
        setTimeout(function(){
          that.go(1);
          that.hit();
        },400);
      }
      // 3 hr
      else if (animHitIndex == 3) {
        that.strikeScore = 0;
        that.batterScore = 0;
        setTimeout(function(){
          that.go(3);
          that.threeBase();
        },700);
      }
      // 2 hr
      else if (animHitIndex == 4) {
        that.strikeScore = 0;
        that.batterScore = 0;
        setTimeout(function(){
          that.go(2);
          that.twoBase();
        },600);
      }
      // out
      else if(animHitIndex == 5 || animHitIndex == 6 || animHitIndex == 7 || animHitIndex == 8){
          that.batterScore = 0;
          that.outScore++;
          setTimeout(function(){
            that.out();
          },700);

      }
      // foul
      else if(animHitIndex == 9 || animHitIndex == 10){
          if(that.outScore == 2)
            that.outScore++;
          else
            that.strikeScore++;
          that.foul();
      }
    }else{ //danh truot hoac ko danh
        that.strikeScore++;
        that.strikeAnim();
    }
  }else if(animThrowIndex == 2){// nem truot
    if(isDam){ // co danh nhung truot
        that.strikeScore++;
        that.strikeAnim();
    }else{ // ko danh
      that.batterScore++;
      setTimeout(function(){
        that.balltxt.setHidden(false);
      },1200);

      setTimeout(function(){
        that.balltxt.setHidden(true);
      },2000);
    }
  }

  if( that.strikeScore > 2){
    that.outScore++;
    that.batterScore = 0;
    that.strikeScore = 0;
  }
  if(that.batterScore > 3){
    that.strikeScore = 0;
    that.batterScore = 0;
    //setTimeout(function(){
      that.changeScore(1,true);
      that.go(1);
    //},400);

  }
  if(that.outScore > 2){
    that.calledEnd();
  }

//  console.log(that.strikeScore);
  that.isDam = false;
  that.setMark_(that.markStrike ,that.strikeScore);
  that.setMark_(that.markBatter ,that.batterScore);
  that.setMark_(that.markOut ,that.outScore);
};

ping.Game.prototype.strikeAnim = function(){

  var strike = new lime.Sprite().setSize(126,27).setFill(ping.Resources.img.strike).setAnchorPoint(0.5,0.5).setPosition(320,450);
  that.bg.appendChild(strike);
  var animStrike = new lime.animation.MoveTo(320,400).enableOptimizations().setDuration(1).setEasing(lime.animation.Easing.EASE);
  strike.runAction(animStrike);
  goog.events.listenOnce(animStrike,lime.animation.Event.STOP,function(){
    that.bg.removeChild(strike);
  });
};

ping.Game.prototype.threeBase = function(){

  var strike = new lime.Sprite().setSize(229,32).setFill(ping.Resources.img.threeBase).setAnchorPoint(0.5,0.5).setPosition(320,420).setScale(0.5);
  that.bg.appendChild(strike);

  var animStrike = new lime.animation.Sequence(
      new lime.animation.Spawn(
        new lime.animation.MoveTo(320,370).enableOptimizations().setDuration(0.6).setEasing(lime.animation.Easing.EASEOUT),
        new lime.animation.ScaleTo(1.2).enableOptimizations().setDuration(0.6).setEasing(lime.animation.Easing.EASEOUT)
        ),
        new lime.animation.ScaleTo(0.7).enableOptimizations().setDuration(0.2).setEasing(lime.animation.Easing.EASEOUT),
        new lime.animation.ScaleTo(1.2).enableOptimizations().setDuration(0.2).setEasing(lime.animation.Easing.EASEOUT),
        new lime.animation.ScaleTo(1).enableOptimizations().setDuration(0.2).setEasing(lime.animation.Easing.EASEOUT),
      new lime.animation.Delay(0.1)
    );

  var tunghoa = new lime.Sprite().setSize(448,442).setFill(ping.Resources.img.tunghoa).setAnchorPoint(0.5,0.5).setPosition(300,500).setScale(0.3);

  var rotateAnim = new lime.animation.Sequence(
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations()
                    ).setDuration(0.3);
  var tunghoaAnim = new lime.animation.Sequence(
                      new lime.animation.Spawn(
                          new lime.animation.MoveTo(300,300).enableOptimizations(),
                          new lime.animation.ScaleTo(1).enableOptimizations()
                      ).setDuration(0.4).setEasing(lime.animation.Easing.EASE),
                      rotateAnim
                    );
  that.bg.appendChild(tunghoa);
  tunghoa.runAction(tunghoaAnim);

  strike.runAction(animStrike);

  goog.events.listenOnce(animStrike,lime.animation.Event.STOP,function(){
    tunghoaAnim.stop();
    that.bg.removeChild(tunghoa);
    that.bg.removeChild(strike);
  });
};

ping.Game.prototype.twoBase = function(){

  var strike = new lime.Sprite().setSize(229,32).setFill(ping.Resources.img.twoBase).setAnchorPoint(0.5,0.5).setPosition(320,330).setScale(0.5);
  that.bg.appendChild(strike);
  var animStrike = new lime.animation.Sequence(
      new lime.animation.Spawn(
        new lime.animation.MoveTo(320,380).enableOptimizations().setDuration(0.6).setEasing(lime.animation.Easing.EASEOUT),
        new lime.animation.ScaleTo(1.2).enableOptimizations().setDuration(0.6).setEasing(lime.animation.Easing.EASEOUT)
        ),
      new lime.animation.Delay(0.1)
    );

var tunghoa = new lime.Sprite().setSize(448,442).setFill(ping.Resources.img.tunghoa).setAnchorPoint(0.5,0.5).setPosition(300,500).setScale(0.3);

  var rotateAnim = new lime.animation.Sequence(
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations()
                    ).setDuration(0.3);
  var tunghoaAnim = new lime.animation.Sequence(
                      new lime.animation.Spawn(
                          new lime.animation.MoveTo(300,300).enableOptimizations(),
                          new lime.animation.ScaleTo(1).enableOptimizations()
                      ).setDuration(0.4).setEasing(lime.animation.Easing.EASE),
                      rotateAnim
                    );
  that.bg.appendChild(tunghoa);
  tunghoa.runAction(tunghoaAnim);

  strike.runAction(animStrike);
  goog.events.listenOnce(animStrike,lime.animation.Event.STOP,function(){
    tunghoaAnim.stop();
    that.bg.removeChild(tunghoa);
    that.bg.removeChild(strike);
  });
};

ping.Game.prototype.foul = function(){

  var strike = new lime.Sprite().setSize(107,32).setFill(ping.Resources.img.txtfound).setAnchorPoint(0.5,0.5).setPosition(320,400);
  that.bg.appendChild(strike);
  var animStrike = new lime.animation.Delay(0.1);
  strike.runAction(animStrike);
  goog.events.listenOnce(animStrike,lime.animation.Event.STOP,function(){
    that.bg.removeChild(strike);
  });
};

ping.Game.prototype.hit = function(){

  var fallingAnim = new lime.animation.Sequence(
                        new lime.animation.ScaleTo(1).setDuration(1.5).enableOptimizations(),
                        new lime.animation.ScaleTo(0).setDuration(1.5).enableOptimizations()
                    );

  var fallingZone = new lime.Sprite().setAnchorPoint(0,0).setPosition(100,100);
  that.bg.appendChild(fallingZone);

  for(var i = 1 ; i < 6 ; i++){
    var falling = new lime.Sprite().setSize(58,59).setFill(ping.Resources.img.falling).setAnchorPoint(0.5,0.5).setPosition(Math.floor(Math.random()*301 + 100), Math.floor(Math.random()*301 + 100)).setScale(0);
    fallingZone.appendChild(falling);
    falling.runAction(fallingAnim);
  }

  setTimeout(function(){
      fallingAnim.stop();
      that.bg.removeChild(fallingZone);
  },1700);

  var strike = new lime.Sprite().setSize(116,49).setFill(ping.Resources.img.txthit).setAnchorPoint(0.5,0.5).setPosition(500,350).setScale(0.6);
  that.bg.appendChild(strike);
  var animStrike = new lime.animation.Sequence(
                    new lime.animation.Spawn(
                      new lime.animation.MoveTo(320,350).enableOptimizations().setDuration(0.6).setEasing(lime.animation.Easing.EASEOUT),
                      new lime.animation.ScaleTo(1.2).enableOptimizations().setDuration(0.4).setEasing(lime.animation.Easing.EASEOUT)
                      ),
                    new lime.animation.Delay(0.1)
                  );
  strike.runAction(animStrike);
  goog.events.listenOnce(animStrike,lime.animation.Event.STOP,function(){
    that.bg.removeChild(strike);
  });
};

ping.Game.prototype.homeRun = function(){

  var strike = new lime.Sprite().setSize(155,55).setPosition(320,50).setFill(ping.Resources.img.homerun).setAnchorPoint(0.5,0.5).setScale(0.5);
  that.bg.appendChild(strike);
  var animStrike = new lime.animation.Sequence(
                      new lime.animation.ScaleTo(1.3).setDuration(0.2).enableOptimizations().setEasing(lime.animation.Easing.EASE),
                      new lime.animation.ScaleTo(0.8).setDuration(0.15).enableOptimizations().setEasing(lime.animation.Easing.EASE),
                      new lime.animation.ScaleTo(1).setDuration(0.08).enableOptimizations().setEasing(lime.animation.Easing.EASE)
                  );
  strike.runAction(animStrike);
  goog.events.listenOnce(animStrike,lime.animation.Event.STOP,function(){
    setTimeout(function(){that.bg.removeChild(strike);},400);
  });
};

ping.Game.prototype.out = function(){

  var strike = new lime.Sprite().setSize(115,46).setFill(ping.Resources.img.txtout).setAnchorPoint(0.5,0.5).setPosition(320,330).setScale(1.5);
  that.bg.appendChild(strike);
  var animStrike = new lime.animation.Sequence(
                    new lime.animation.Spawn(
                      new lime.animation.MoveTo(320,370).enableOptimizations().setDuration(0.4).setEasing(lime.animation.Easing.EASEOUT),
                      new lime.animation.ScaleTo(1).enableOptimizations().setDuration(0.4).setEasing(lime.animation.Easing.EASEOUT)
                      ),
                    new lime.animation.Delay(0.1)
                  );
  strike.runAction(animStrike);
  goog.events.listenOnce(animStrike,lime.animation.Event.STOP,function(){
    that.bg.removeChild(strike);
  });
};

ping.Game.prototype.go = function(base){
  if(that.runner.length == 0 || goog.array.peek(that.runner).base > 0){
    var runner = new ping.Runner();
    that.appendChild(runner);
    that.runner.push(runner);
    goog.array.forEach(that.runner,function(r){
      r.run(base);
    });
  }else{
    goog.array.forEach(that.runner,function(r){
      r.run(base);
    });
  }

};

ping.Game.prototype.changeScore = function(score, remove ){
  //co runner dung o lo 3 thi ko cong diem
  if(that.runner[0] != undefined && that.runner[0].base == 3 && remove == true )
    that.Score = that.Score;
  else
    that.Score = that.Score + score;
  if(!goog.array.isEmpty(that.runner) && !remove)
    goog.array.removeAt(that.runner,0);

  that.renderScore();
};

ping.Game.prototype.headShoot = function(){

  /*
  var numberRunner = that.runner.length;

  goog.array.forEach(that.runner,function(r){
    that.removeChild(r);
  });
  that.runner = [];

  var runner = new ping.Runner();
  runner.run(4);
  that.appendChild(runner);
  if(numberRunner > 0){
    that.changeScore(2);
  }
  */
  that.go(4);
  var tunghoa = new lime.Sprite().setSize(448,442).setFill(ping.Resources.img.tunghoa).setAnchorPoint(0.5,0.5).setPosition(300,500).setScale(0.3);

  var rotateAnim = new lime.animation.Sequence(
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations(),
                      new lime.animation.RotateTo(5).enableOptimizations(),
                      new lime.animation.RotateTo(-5).enableOptimizations()
                    ).setDuration(0.3);
  var tunghoaAnim = new lime.animation.Sequence(
                      new lime.animation.Spawn(
                          new lime.animation.MoveTo(300,300).enableOptimizations(),
                          new lime.animation.ScaleTo(1).enableOptimizations()
                      ).setDuration(0.4).setEasing(lime.animation.Easing.EASE),
                      rotateAnim
                    );
  var yeah =  new lime.Sprite().setSize(228,359).setFill(ping.Resources.img.yeah).setAnchorPoint(0,0).setPosition(170,180).setScale(1.3);

  //setTimeout(function(){
  that.bg.appendChild(tunghoa);
  tunghoa.runAction(tunghoaAnim);
  that.appendChild(yeah);

  that.setChildIndex(yeah,that.getNumberOfChildren() + 4);
      //},1000);

  setTimeout(function(){
    tunghoaAnim.stop();
    that.removeChild(yeah);
    that.bg.removeChild(tunghoa);
  },1000);
};

ping.Game.prototype.setMark_ = function(mark, score){
  mark.setSize(score*24,mark.getSize().height);
};

ping.Game.prototype.calledEnd = function(){
  lime.scheduleManager.unschedule(ping.Game.startThrow, that);
  //var box = ping.popup.remind((10-that.Score).toString());
  //that.appendChild(box);
  var mc = new lime.Sprite().setSize(141,406).setFill(ping.Resources.img.mc).setAnchorPoint(0,0).setPosition(650,210).setScale(1.3);
  mc.id = "mc";
  that.appendChild(mc);
  mc.runAction(new lime.animation.MoveTo(450,210).setDuration(0.6).enableOptimizations().setEasing(lime.animation.Easing.EASE));
};

ping.Game.prototype.resume = function(){
  lime.scheduleManager.scheduleWithDelay(
      ping.Game.startThrow = function() {
        that.ball();
  }, that, 4500);
  goog.array.forEach(that.children_, function(object){
    if(object.id == "mc"){
      that.removeChild(object);
    }
  });
  that.outScore = 2;
};

ping.Game.prototype.gameOver = function(){

  this.bg.removeChild(this.balltxt);
  //goog.events.unlisten(this.bg, [ 'mousedown', 'touchstart' ], function(e){console.log('fdaf');});
  that.batterScore = 0 ;
  that.outScore = 0 ;
  that.strikeScore = 0 ;

  setTimeout(function(){
    that.bg.removeChild(that.gay);
    that.bg.removeChild(that.batter);

    var btnRetry = new lime.Button(new lime.Sprite().setFill(ping.Resources.img.retry).setSize(226,54)).setPosition(320, 600);

    that.appendChild(btnRetry);

    var gameOverTxt = new  lime.Sprite().setFill(ping.Resources.img.gameOver).setSize(204,33).setScale(2).setPosition(120,50).setAnchorPoint(0,0);
    that.appendChild(gameOverTxt);

    goog.events.listenOnce(btnRetry,[ 'mousedown', 'touchstart' ],function(){
      /**
       * TODO
       */
      that.destructor_();
      ping.start_();
      //that.getParent().newGame(that.getScene()) ;

    });
    /*
    goog.events.listenOnce(btnRanking,[ 'mousedown', 'touchstart' ],function(){
      window.location = "http://www.yahoo.co.jp/";
    });
    */
  },1000);

};

ping.Game.prototype.destructor_ = function(){
  delete that,this;
};

ping.Game.prototype.renderScore = function(){

  var hunder = Math.floor(that.Score / 100);
  var dozen = Math.floor((that.Score - hunder*100)/10);
  var digit = that.Score - hunder*100 - dozen*10;

  that.digit.setFill(ping.Resources.img["s" + digit.toString()]);
  that.dozen.setFill(ping.Resources.img["s" + dozen.toString()]);
  that.hunder.setFill(ping.Resources.img["s" + hunder.toString()]);
};

ping.Game.prototype.win = function(){

};

ping.Game.prototype.animationThrow = function (index){

  var anim = '';
  switch (index) {
  // nem trung
  case 0:
    anim = new lime.animation.MoveBy(0,400);
    break;
  case 1:
    anim = new lime.animation.MoveBy(0,400);
    break;
  // nem truot
  case 2:
    anim = new lime.animation.MoveBy(50,400);
    break;
  default:
    break;
  }
  return anim.setDuration(1.3 - Math.random()/1.5).enableOptimizations().setEasing(lime.animation.Easing.LINEAR);
};

ping.Game.prototype.animationHit = function (index){

  var anim = '';
  switch (index) {
  //hr
  case 0:
    anim = new lime.animation.MoveTo(320, 50);
    break;
  //1 hr
  case 1:
    anim = new lime.animation.MoveTo(260, 120);
    break;
  //1 hr
  case 2:
    anim = new lime.animation.MoveTo(380, 120);
    break;
  //3 hr
  case 3:
    anim = new lime.animation.MoveTo(95, 200);
    break;
  //2 hr
    /**
     * TODO
     */
  case 4:
    anim = new lime.animation.MoveTo(540, 200);
    break;
  //out
  case 5:
    anim = new lime.animation.MoveTo(80, 300);
    break;
  //out
  case 6:
    anim = new lime.animation.MoveTo(560, 300);
    break;
  //out
  //case 7:
    //anim = new lime.animation.MoveTo(260, 120);
    //break;
  //out
  case 7:
    anim = new lime.animation.MoveTo(240, 330);
    break;
  //foul
  case 8:
    anim = new lime.animation.MoveTo(400, 330);
    break;
  //foul
  case 9:
    anim = new lime.animation.MoveTo(60, 410);
    break;
  //foul
  case 10:
    anim = new lime.animation.MoveTo(590, 410);
    break;
  default:
    break;
  }
  return anim.setDuration(1).enableOptimizations().setEasing(lime.animation.Easing.EASE);
};


text:
package com.zihexin.business_interface.domain;

import com.zihexin.business_interface.common.UUIDGenerator;

import java.rmi.server.UID;
import java.util.UUID;

/**
 * Created by IntelliJ IDEA.
 * User: admin
 * Date: 12-4-16
 * Time: ÉÏÎç11:27
 * To change this template use File | Settings | File Templates.
 */
public class Message {
    private String id;
    private String msg;
    private String ip;

    public Message() {
        id = UUIDGenerator.getUUID();
    }

    public String getId() {
        return id;
    }

    public String getLogId() {
        return "LOGID[" + id + "]";
    }

    private void setId(String id) {
        this.id = id;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
}


text:
/*  <MIT License>:<https://webrtc-experiment.appspot.com/licence/>
    2013, Muaz Khan<muazkh>-<github.com/muaz-khan>
*/

function Streamer() {
    var self = this;
    self.stream = streamPreRecordedMedia;

    window.MediaSource = window.MediaSource || window.WebKitMediaSource;
    if (!window.MediaSource) throw '<chrome canary> is mandatory to test this experiment.';

    function streamPreRecordedMedia(file) {
        if (!self.push) throw '<push> method is mandatory.';

        var reader = new window.FileReader();
        reader.readAsArrayBuffer(file);
        reader.onload = function (e) {
            startStreaming(new window.Blob([new window.Uint8Array(e.target.result)]));
        };

        var sourceBuffer, mediaSource = new MediaSource();
        mediaSource.addEventListener('webkitsourceopen', function () {
            sourceBuffer = mediaSource.addSourceBuffer('video/webm; codecs="vorbis,vp8"');
            console.debug('MediaSource readyState: <', this.readyState, '>');
        }, false);

        mediaSource.addEventListener('webkitsourceended', function () {
            console.debug('MediaSource readyState: <', this.readyState, '>');
        }, false);

        function startStreaming(blob) {
			if(!blob) return;
                var size = blob.size,
                    startIndex = 0,
                    plus = 3000;

                console.debug('one chunk size: <', plus, '>');

                function inner_streamer() {
                    reader = new window.FileReader();
                    reader.onload = function (e) {
                        self.push(new window.Uint8Array(e.target.result));

                        startIndex += plus;
                        if (startIndex <= size) window.webkitRequestAnimationFrame(inner_streamer);
                        else
                            self.push({
                                end: true
                            });
                    };
                    reader.readAsArrayBuffer(blob.slice(startIndex, startIndex + plus));
                }

                inner_streamer();
        }

        startStreaming();
    }

    self.receive = receive;
    function receive() {
        var sourceBuffer, mediaSource = new MediaSource();

        self.video.src = window.URL.createObjectURL(mediaSource);
        mediaSource.addEventListener('webkitsourceopen', function () {
            self.receiver = mediaSource.addSourceBuffer('video/webm; codecs="vorbis,vp8"');
            self.mediaSource = mediaSource;

            console.debug('MediaSource readyState: <', this.readyState, '>');
        }, false);

        mediaSource.addEventListener('webkitsourceended', function () {
            console.debug('MediaSource readyState: <', this.readyState, '>');
        }, false);
    }

    this.append = function (data) {
		var uint8array = new window.Uint8Array(data);
        self.receiver.append(uint8array);
    };

    this.end = function (data) {
        self.mediaSource.endOfStream();
    };
}


text:
begin;

INSERT INTO csm_application (APPLICATION_NAME,APPLICATION_DESCRIPTION,DECLARATIVE_FLAG,ACTIVE_FLAG,UPDATE_DATE)
VALUES ('<<application_context_name>>','Application Description',0,0,GETDATE() );

INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES('CREATE','This privilege grants permission to a user to create an entity. This entity can be an object, a database entry, or a resource such as a network connection', GETDATE() );

INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES('ACCESS','This privilege allows a user to access a particular resource.  Examples of resources include a network or database connection, socket, module of the application, or even the application itself', GETDATE() );

INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES('READ','This privilege permits the user to read data from a file, URL, database, an object, etc. This can be used at an entity level signifying that the user is allowed to read data about a particular entry', GETDATE() );

INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES('WRITE','This privilege allows a user to write data to a file, URL, database, an object, etc. This can be used at an entity level signifying that the user is allowed to write data about a particular entity', GETDATE() );

INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES('UPDATE','This privilege grants permission at an entity level and signifies that the user is allowed to update data for a particular entity. Entities may include an object, object attribute, database row etc', GETDATE() );

INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES('DELETE','This privilege permits a user to delete a logical entity. This entity can be an object, a database entry, a resource such as a network connection, etc', GETDATE() );

INSERT INTO csm_privilege (privilege_name, privilege_description, update_date)
VALUES('EXECUTE','This privilege allows a user to execute a particular resource. The resource can be a method, function, behavior of the application, URL, button etc', GETDATE() );

commit;


text:
var searchData=
[
  ['semaphore',['Semaphore',['../classerpc_1_1_semaphore.html',1,'erpc']]],
  ['serialtransport',['SerialTransport',['../classerpc_1_1_serial_transport.html',1,'erpc']]],
  ['server',['Server',['../classerpc_1_1_server.html',1,'erpc']]],
  ['service',['Service',['../classerpc_1_1_service.html',1,'erpc']]],
  ['sharedstate',['SharedState',['../classerpc_1_1_inter_thread_buffer_transport.html#structerpc_1_1_inter_thread_buffer_transport_1_1_shared_state',1,'erpc::InterThreadBufferTransport']]],
  ['simpleserver',['SimpleServer',['../classerpc_1_1_simple_server.html',1,'erpc']]],
  ['spimastertransport',['SpiMasterTransport',['../classerpc_1_1_spi_master_transport.html',1,'erpc']]],
  ['spislavetransport',['SpiSlaveTransport',['../classerpc_1_1_spi_slave_transport.html',1,'erpc']]],
  ['staticqueue',['StaticQueue',['../classerpc_1_1_static_queue.html',1,'erpc']]],
  ['staticqueue_3c_20erpc_3a_3amessagebuffer_20_2a_20_3e',['StaticQueue< erpc::MessageBuffer * >',['../classerpc_1_1_static_queue.html',1,'erpc']]],
  ['staticqueue_3c_20erpc_3a_3amessagebuffer_2c_20kinitcountmessagebuffers_20_3e',['StaticQueue< erpc::MessageBuffer, kInitCountMessageBuffers >',['../classerpc_1_1_static_queue.html',1,'erpc']]]
];


text:
Try our demos and get inspired with what you can do with hand-pose-detection models!

## Table of Contents
1. [Live Camera Demo](#live-camera-demo)

2. [Upload a Video Demo](#upload-a-video-demo)

3. [How to Run a Demo](#how-to-run-a-demo)

-------------------------------------------------------------------------------

## Live Camera Demo
This demo uses your camera to get live stream and tracks your hands in real-time.
You can try out different runtimes to see the difference. It
works on laptops, iPhones and android phones.

[MediaPipeHands model entry](https://storage.googleapis.com/tfjs-models/demos/hand-pose-detection/index.html?model=mediapipe_hands)

## Upload a Video Demo
This demo allows you to upload a video (in .mp4 format) to run with the model.
Once the video is processed, it automatically downloads the video with hands keypoints.

[MediaPipeHands model entry](https://storage.googleapis.com/tfjs-models/demos/hand-pose-detection-upload-video/index.html?model=mediapipe_hands)

## How to Run a Demo
If you want to run any of the demos locally, follow these steps:

1. Go to the demo folder, e.g. `cd live_video`

2. Remove cache etc. `rm -rf .cache dist node_modules`

3. Build dependency. `yarn build-dep`

4. Install dependencies. `yarn`

5. Run the demo. `yarn watch`

6. The demo runs at `localhost:1234`. (Remember to provide URL model parameter e. g. `localhost:1234/?model=mediapipe_hands`)


text:
package com.javalearning.guavaexample.concurrent;

import com.google.common.base.Throwables;
import com.google.common.util.concurrent.*;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by renqun.yuan on 2015/10/26.
 */
public class ExecutorExample {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        ExecutorService executorService = Executors.newFixedThreadPool(2);
        ListeningExecutorService listeningExecutorService = MoreExecutors.listeningDecorator(executorService);

        ListenableFuture<String> submit = listeningExecutorService.submit(new Callable<String>() {
            @Override
            public String call() throws Exception {
                return "called";
            }
        });

        Futures.addCallback(submit, new FutureCallback<String>() {
            @Override
            public void onSuccess(String result) {
                System.out.println("on success:" + result);
            }

            @Override
            public void onFailure(Throwable t) {
                System.out.println(Throwables.getStackTraceAsString(t));
            }
        });

        System.out.println(submit.get());

        listeningExecutorService.shutdown();
    }
}