text:
/*globals describe, afterEach, beforeEach, it*/
var should    = require('should'),
    sinon     = require('sinon'),
    Promise   = require('bluebird'),

    // Stuff we're testing
    db        = require('../../server/data/db'),
    errors    = require('../../server/errors'),
    exporter  = require('../../server/data/export'),
    schema    = require('../../server/data/schema'),
    settings  = require('../../server/api/settings'),

    schemaTables = Object.keys(schema.tables),

    sandbox = sinon.sandbox.create();

describe('Exporter', function () {
    var versionStub, tablesStub, queryMock, knexMock, knexStub;

    afterEach(function () {
        sandbox.restore();
        knexStub.restore();
    });

    describe('doExport', function () {
        beforeEach(function () {
            versionStub = sandbox.stub(schema.versioning, 'getDatabaseVersion').returns(new Promise.resolve('004'));
            tablesStub = sandbox.stub(schema.commands, 'getTables').returns(schemaTables);

            queryMock = {
                select: sandbox.stub()
            };

            knexMock = sandbox.stub().returns(queryMock);

            // this MUST use sinon, not sandbox, see sinonjs/sinon#781
            knexStub = sinon.stub(db, 'knex', {get: function () { return knexMock; }});
        });

        it('should try to export all the correct tables', function (done) {
            // Setup for success
            queryMock.select.returns(new Promise.resolve({}));

            // Execute
            exporter.doExport().then(function (exportData) {
                // No tables, less the number of excluded tables
                var expectedCallCount = schemaTables.length - 4;

                should.exist(exportData);

                versionStub.calledOnce.should.be.true();
                tablesStub.calledOnce.should.be.true();
                knexStub.get.called.should.be.true();
                knexMock.called.should.be.true();
                queryMock.select.called.should.be.true();

                knexMock.callCount.should.eql(expectedCallCount);
                queryMock.select.callCount.should.have.eql(expectedCallCount);

                knexMock.getCall(0).args[0].should.eql('posts');
                knexMock.getCall(1).args[0].should.eql('users');
                knexMock.getCall(2).args[0].should.eql('roles');
                knexMock.getCall(3).args[0].should.eql('roles_users');
                knexMock.getCall(4).args[0].should.eql('permissions');
                knexMock.getCall(5).args[0].should.eql('permissions_users');
                knexMock.getCall(6).args[0].should.eql('permissions_roles');
                knexMock.getCall(7).args[0].should.eql('permissions_apps');
                knexMock.getCall(8).args[0].should.eql('settings');
                knexMock.getCall(9).args[0].should.eql('tags');
                knexMock.getCall(10).args[0].should.eql('posts_tags');
                knexMock.getCall(11).args[0].should.eql('apps');
                knexMock.getCall(12).args[0].should.eql('app_settings');
                knexMock.getCall(13).args[0].should.eql('app_fields');

                knexMock.calledWith('clients').should.be.false();
                knexMock.calledWith('client_trusted_domains').should.be.false();
                knexMock.calledWith('refreshtokens').should.be.false();
                knexMock.calledWith('accesstokens').should.be.false();

                done();
            }).catch(done);
        });

        it('should catch and log any errors', function (done) {
            // Setup for failure
            var errorStub = sandbox.stub(errors, 'logAndThrowError');
            queryMock.select.returns(new Promise.reject({}));

            // Execute
            exporter.doExport().then(function (exportData) {
                should.not.exist(exportData);
                errorStub.calledOnce.should.be.true();
                done();
            }).catch(done);
        });
    });

    describe('exportFileName', function () {
        it('should return a correctly structured filename', function (done) {
            var settingsStub = sandbox.stub(settings, 'read').returns(
                new Promise.resolve({settings: [{value: 'testblog'}]})
            );

            exporter.fileName().then(function (result) {
                should.exist(result);
                settingsStub.calledOnce.should.be.true();
                result.should.match(/^testblog\.ghost\.[0-9]{4}-[0-9]{2}-[0-9]{2}\.json$/);

                done();
            }).catch(done);
        });

        it('should return a correctly structured filename if settings is empty', function (done) {
            var settingsStub = sandbox.stub(settings, 'read').returns(
                new Promise.resolve()
            );

            exporter.fileName().then(function (result) {
                should.exist(result);
                settingsStub.calledOnce.should.be.true();
                result.should.match(/^ghost\.[0-9]{4}-[0-9]{2}-[0-9]{2}\.json$/);

                done();
            }).catch(done);
        });

        it('should return a correctly structured filename if settings errors', function (done) {
            var settingsStub = sandbox.stub(settings, 'read').returns(
                new Promise.reject()
            );

            exporter.fileName().then(function (result) {
                should.exist(result);
                settingsStub.calledOnce.should.be.true();
                result.should.match(/^ghost\.[0-9]{4}-[0-9]{2}-[0-9]{2}\.json$/);

                done();
            }).catch(done);
        });
    });
});


text:
#include <pcl/filters/impl/filter_indices.hpp>
#include <pcl/PCLPointCloud2.h>

/** \brief Base method for feature estimation for all points given in
 * <setInputCloud (), setIndices ()> using the surface in setSearchSurface ()
 * and the spatial locator in setSearchMethod ()
 * \param output the resultant filtered point cloud dataset
 */
void
pcl::FilterIndices<pcl::PCLPointCloud2>::filter (std::vector<int> &indices)
{
  if (!initCompute ())
    return;

  // Apply the actual filter
  applyFilter (indices);

  deinitCompute ();
}

#ifndef PCL_NO_PRECOMPILE
#include <pcl/impl/instantiate.hpp>
#include <pcl/point_types.h>

// Instantiations of specific point types
PCL_INSTANTIATE(removeNanFromPointCloud, PCL_XYZ_POINT_TYPES)

#endif    // PCL_NO_PRECOMPILE

redpajama_set_name: RedPajamaGithub


text:
/*
    PROGRAMA: MediaDeNotas
    AUTOR: Elena Guzman Blanco
    FECHA: 27/Oct/2016
    DESCRIPCION: Este programa calcula la media de notas introducidas
*/

using System;

namespace MediaDeNotas
{
	class MediaDeNotas
	{
		public static void Main (string[] args)
		{
			/// Variables
			int nNotas = 0;
			int total = 0;
			int num = 0;
			int media = 0;

			// Titulo de consola
			Console.Title = "Calculando la media";

			Console.WriteLine ("Este programa calculará la media de notas hasta que introduzcas el valor '0'\n");

			// Tomando numeros
			Console.WriteLine ("¿Cual es la primera nota?");

			do {
				num = ObtenerNum (0,10);
				total += num;
				nNotas++;
				Console.WriteLine ("\n¿Siguiente numero?");
			} while (num != 0);

			// Calculos finales
			media = total / nNotas;

			Console.WriteLine ("\nCalculando notas...");
			Console.WriteLine ("La media de las {0} notas es {1}\n", nNotas, media);

			// Fin de programa
			Console.WriteLine ("Pulsa ENTER para salir...");
			Console.ReadLine ();
		}

		static int ObtenerNum(int min, int max)
		{
			bool valido = false;
			int num = 0;

			Console.Write("Dame un numero... ");

			while (!valido)
			{
				try
				{
					num = int.Parse(Console.ReadLine());
					if (num >= min && num <= max)
						valido = true;
					else
						Console.WriteLine("Tu numero no es válido, inténtalo otra vez ");
				}
				catch
				{
					Console.Write("Dato no valido, intentalo otra vez ");
				}
			}
			Console.WriteLine("Tu numero es válido, ¡procede!");
			return num;
		}

	}
}


text:
  {% for event in site.data.milestones %}
    {% assign loopindex = forloop.index | modulo: 2 %}
    {% capture class %}
    {% if loopindex == 0 %}
      timeline-inverted
    {% endif %}
    {% endcapture %}

{{ event.date }}

          {{ event.description | markdownify }}

  {% endfor %}


text:
'use strict';

require('mocha');
var assert = require('assert');
var hbs = require('handlebars').create();
var helpers = require('..');
helpers.i18n({handlebars: hbs});

var context = {language: 'en', en: {key: 'value', a: {b: 'c'}}, fr: {key: 'valeur'}};

describe('i18n', function() {
  it('should throw an error when key is not a string.', function() {
    assert.throws(function() {
      hbs.compile('{{#i18n}}{{/i18n}}')();
    });
  });

  it('should throw an error when language parameter is not a string.', function() {
    assert.throws(function() {
      hbs.compile('{{#i18n "key"}}{{/i18n}}')();
    });
  });

  it('should throw an error when the language is not found.', function() {
    assert.throws(function() {
      var ctx = {language: 'foo', en: {key: 'value'}, fr: {key: 'valeur'}};
      hbs.compile('{{#i18n "key"}}{{/i18n}}')(ctx);
    });
  });

  it('should throw an error when a key is not found.', function() {
    assert.throws(function() {
      var ctx = {language: 'en', en: {key: 'value'}, fr: {key: 'valeur'}};
      hbs.compile('{{#i18n "foo"}}{{/i18n}}')(ctx);
    });
  });

  it('should take a key and return for the default language', function() {
    var fn = hbs.compile('{{#i18n "key"}}{{/i18n}}');
    assert.equal(fn(context), 'value');
  });

  it('should use options passed on the context', function() {
    var fn = hbs.compile('{{#i18n "key"}}{{/i18n}}');
    var context = {en: {key: 'value'}, fr: {key: 'valeur'}};
    context.options = {language: 'en'};
    assert.equal(fn(context), 'value');
  });

  it('should take a key and return for the override language', function() {
    var fn = hbs.compile('{{#i18n "key" language="fr"}}{{/i18n}}');
    assert.equal(fn(context), 'valeur');
  });

  it('should support using dot notation for the key', function() {
    var fn = hbs.compile('{{#i18n "a.b"}}{{/i18n}}');
    assert.equal(fn(context), 'c');
  });
});


text:
SYNONYM

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

#### Published in
in Rossman, Samuels, Rogerson & Lowen, Stud. Mycol. 42: 135 (1999)

#### Original name
Nectria haematococca Berk. & Broome, 1875

### Remarks
null


text:
package com.wangf.hcp.sdc.persistence.dao;

import java.util.List;

import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import com.wangf.hcp.sdc.persistence.entity.Person;

@Stateless
@LocalBean
public class PersonDaoEjb {
	@PersistenceContext
	private EntityManager em;

	/**
	 * Get all persons from the table.
	 */
	public List<Person> getAll() {
		return em.createNamedQuery("AllPersons", Person.class).getResultList();
	}

	/**
	 * Add a person to the table.
	 */
	public Person add(Person person) {
		em.persist(person);
		em.flush();
		return person;
	}

	public Person remove(long id) {
		Person person = em.find(Person.class, id);
		em.remove(person);
		em.flush();
		return person;
	}
}


text:
package hex.glm;

import hex.ModelMojoWriter;

import java.io.IOException;

public class GLMMojoWriter extends ModelMojoWriter<GLMModel, GLMModel.GLMParameters, GLMModel.GLMOutput> {

  @SuppressWarnings("unused")  // Called through reflection in ModelBuildersHandler
  public GLMMojoWriter() {}

  public GLMMojoWriter(GLMModel model) {
    super(model);
  }

  @Override
  public String mojoVersion() {
    return "1.00";
  }

  @Override
  protected void writeModelData() throws IOException {
    writekv("use_all_factor_levels", model._parms._use_all_factor_levels);
    writekv("cats", model.dinfo()._cats);
    writekv("cat_offsets", model.dinfo()._catOffsets);
    writekv("nums", model._output._dinfo._nums);

    boolean imputeMeans = model._parms.imputeMissing();
    writekv("mean_imputation", imputeMeans);
    if (imputeMeans) {
      writekv("num_means", model.dinfo().numNAFill());
      writekv("cat_modes", model.dinfo().catNAFill());
    }

    writekv("beta", model.beta_internal());

    writekv("family", model._parms._family);
    writekv("link", model._parms._link);

    if (GLMModel.GLMParameters.Family.tweedie.equals(model._parms._family))
      writekv("tweedie_link_power", model._parms._tweedie_link_power);
  }

}


text:
Form Builder is a PHP class for building HTML 5 forms from a database

    Copyright (c) 2012 Mark Roland.
    Written by Mark Roland
    Released under the MIT license.

This PHP class may be distributed and used for free. The author makes
no guarantee for this software and offers no support.


text:
namespace RotatingMatrixWalk
{
    using System;
    public class RotatingMatrixWalk
    {
        static void Main()
        {
            var matrix = InitializeMatrix();

            RotatingMatrixWalkSolver.SolveRotatingMatrixWalk(matrix);

            PrintMatrix(matrix);
        }

        private static int[,] InitializeMatrix()
        {
            var matrixSize = ReadMatrixSize();

            return new int[matrixSize, matrixSize];
        }

        private static int ReadMatrixSize()
        {
            Console.WriteLine(UserMessages.EnterPositiveNumberMessage);

            string input = Console.ReadLine();
            int n = 0;
            while (!int.TryParse(input, out n) || NumberIsInRange(n))
            {
                Console.WriteLine(UserMessages.WrongInputMessage);
                Console.WriteLine(UserMessages.EnterPositiveNumberMessage);
                input = Console.ReadLine();
            }

            return n;
        }

        private static bool NumberIsInRange(int number)
        {
            var inRange = number < 1 && number > 100;
            return inRange;
        }

        private static void PrintMatrix(int[,] matrix)
        {
            for (int row = 0; row < matrix.GetLength(0); row++)
            {
                for (int col = 0; col < matrix.GetLength(1); col++)
                {
                    Console.Write("{0,3}", matrix[row, col]);
                }

                Console.WriteLine();
            }
        }
    }
}


text:
module Graticule #:nodoc:
  module Geocoder #:nodoc:

    # Yahoo geocoding API.
    #
    # http://developer.yahoo.com/maps/rest/V1/geocode.html
    class Yahoo < Rest

      PRECISION = {
        "country"=> :country,
        "state" => :state,
        "city" => :city,
        "zip+4" => :zip,
        "zip+2" => :zip,
        "zip" => :zip,
        "street" => :street,
        "address" => :address
      }

      # Web services initializer.
      #
      # The +appid+ is the Application ID that uniquely identifies your
      # application.  See: http://developer.yahoo.com/faq/index.html#appid
      #
      # See http://developer.yahoo.com/search/rest.html
      def initialize(appid)
        @appid = appid
        @url = URI.parse "http://api.local.yahoo.com/MapsService/V1/geocode"
      end

      # Returns a Location for +address+.
      #
      # The +address+ can be any of:
      # * city, state
      # * city, state, zip
      # * zip
      # * street, city, state
      # * street, city, state, zip
      # * street, zip
      def locate(address)
        location = (address.is_a?(String) ? address : location_from_params(address).to_s(:country => false))
        # yahoo pukes on line breaks
        get :location => location.gsub("\n", ', ')
      end

      def parse_response(xml) # :nodoc:
        r = xml.elements['ResultSet/Result[1]']
        returning Location.new do |location|
          location.precision = PRECISION[r.attributes['precision']] || :unknown

          if r.attributes.include? 'warning' then
            location.warning = r.attributes['warning']
          end

          location.latitude = r.elements['Latitude'].text.to_f
          location.longitude = r.elements['Longitude'].text.to_f

          location.street = r.elements['Address'].text.titleize unless r.elements['Address'].text.blank?
          location.locality = r.elements['City'].text.titleize unless r.elements['City'].text.blank?
          location.region = r.elements['State'].text
          location.postal_code = r.elements['Zip'].text
          location.country = r.elements['Country'].text
        end
      end

      # Extracts and raises an error from +xml+, if any.
      def check_error(xml) #:nodoc:
        err = xml.elements['Error']
        raise Error, err.elements['Message'].text if err
      end

      # Creates a URL from the Hash +params+.  Automatically adds the appid and
      # sets the output type to 'xml'.
      def make_url(params) #:nodoc:
        params[:appid] = @appid
        params[:output] = 'xml'

        super params
      end

    end

  end
end


text:
package com.aphyr.riemann.client;

import java.net.InetSocketAddress;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.Executors;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.CopyOnWriteArrayList;
import java.net.*;
import java.io.*;
import org.jboss.netty.util.HashedWheelTimer;
import org.jboss.netty.util.Timer;
import org.jboss.netty.channel.*;
import org.jboss.netty.channel.group.*;
import org.jboss.netty.handler.codec.oneone.*;
import org.jboss.netty.handler.codec.protobuf.*;
import org.jboss.netty.handler.codec.frame.*;
import org.jboss.netty.bootstrap.ClientBootstrap;
import org.jboss.netty.handler.execution.ExecutionHandler;
import org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor;
import com.aphyr.riemann.Proto.Msg;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.LinkedBlockingQueue;

public class TcpHandler extends SimpleChannelHandler {
  public final LinkedBlockingQueue<Promise<Msg>> queue =
    new LinkedBlockingQueue<Promise<Msg>>();

  // The channel associated with this handler.
  public volatile Channel channel;

  // The last error used to fulfill outstanding promises.
  public volatile IOException lastError =
    new IOException("Channel closed.");

  // A channel group so we can keep track of open channels.
  public final ChannelGroup channelGroup;

  public TcpHandler(final ChannelGroup channelGroup) {
    this.channelGroup = channelGroup;
  }

  // When we open, add our channel to the channel group.
  @Override
  public void channelOpen(ChannelHandlerContext c, ChannelStateEvent e) {
    channelGroup.add(e.getChannel());
  }

  // When we connect, save the channel so we can write to it.
  @Override
  public void channelConnected(ChannelHandlerContext c, ChannelStateEvent e) {
    channel = e.getChannel();
  }

  @Override
  public void channelClosed(ChannelHandlerContext c, ChannelStateEvent e) {
    // Kill the channel, so subsequent writes can fail quickly.
    channel = null;

    // Remove us from the channel group too
    channelGroup.remove(e.getChannel());

    // Another thread might still be calling write(), and have a copy of the
    // channel. At some point in the future, it's going to call channel.write()
    // and the channel will tell it the write failed because it's *closed*.
    // This means there will be no additional enqueued futures, and since the
    // channel is closed, no additional messages will be received. We are now
    // the sole owners of the message queue. Right? I hope?

    // Deliver exceptions to any remaining queued promises.
    final IOException ex = new IOException("Connection closed.");
    Promise<Msg> promise;
    while ((promise = queue.poll()) != null) {
      promise.deliver(ex);
    }
  }

  // We receive a Write, and pass the Write's message downstream, enqueuing the
  // corresponding promise when the write completes.
  public void handleDownstream(ChannelHandlerContext ctx, ChannelEvent e)
    throws Exception {

    // Pass through anything that isn't a message event
    if (!(e instanceof MessageEvent)) {
      ctx.sendDownstream(e);
      return;
    }

    // Bounce back anything that isn't a Write.
    final MessageEvent me = (MessageEvent) e;
    if (!(me.getMessage() instanceof Write)) {
      ctx.sendUpstream(me);
      return;
    }

    // Destructure the write
    final Write write = (Write) me.getMessage();
    final Msg message = write.message;
    final Promise promise = write.promise;

    // When the message event is written...
    me.getFuture().addListener(new ChannelFutureListener() {
      // Enqueue the corresponding promise.
      public void operationComplete(ChannelFuture future) throws Exception {
        if (future.isSuccess()) {
          queue.put(promise);
        } else if (future.getCause() != null) {
          promise.deliver(
            new IOException("Write failed.", future.getCause()));
        } else {
          promise.deliver(new IOException("Write failed."));
        }
      }
    });

    // Send the message event downstream
    Channels.write(ctx, me.getFuture(), message);
  }

  // When messages are received, deliver them to the next queued promise.
  @Override
  public void messageReceived(ChannelHandlerContext c, MessageEvent e) {
    Msg message = (Msg) e.getMessage();
    queue.poll().deliver(message);
  }

  // Log exceptions and close.
  @Override
  public void exceptionCaught(ChannelHandlerContext c, ExceptionEvent e) {
    e.getChannel().close();
  }
}


text:
layout: page
title: Street Trade Executive Retreat
date: 2016-05-24
author: Mark Santos
tags: weekly links, java
status: published
summary: Integer nisi ex, hendrerit nec neque quis, vestibulum imperdiet dolor.
banner: images/banner/leisure-03.jpg
booking:
  startDate: 11/27/2019
  endDate: 11/28/2019
  ctyhocn: LAMNMHX
  groupCode: STER
published: true
---
Cras a lacinia nisl. Curabitur auctor ex at libero aliquam, at vulputate est fermentum. Nulla facilisi. Cras vulputate, risus quis tristique fringilla, ligula urna auctor nunc, vel cursus augue tortor in augue. Quisque justo massa, interdum eget facilisis eu, ullamcorper et velit. Maecenas consectetur neque eget scelerisque efficitur. Morbi nec risus scelerisque, euismod sem sed, suscipit nibh. Cras imperdiet ut felis vitae euismod. Duis faucibus augue eget suscipit semper. Aenean euismod risus et tortor blandit sagittis.

* Proin consectetur nibh in nisl consequat sodales
* Etiam eget est aliquam, laoreet urna nec, finibus purus
* Curabitur ac neque a neque blandit malesuada
* Vestibulum vitae massa rutrum, vehicula justo sit amet, rhoncus odio.

Aenean sit amet gravida nisl. Vivamus quis risus at dolor eleifend vehicula. Integer ac massa sit amet est sagittis interdum non sit amet eros. Aenean sed ante aliquam nisl pretium rutrum. Vivamus id aliquam ligula. Mauris non dui vitae eros viverra pharetra. Nam id enim eu ante consequat pulvinar. Ut quis hendrerit dui, at blandit nisi. Praesent porta mauris a tortor vehicula, rutrum elementum erat blandit. In hac habitasse platea dictumst. Etiam eu risus nec orci convallis tempor. Nulla porttitor lacinia nisl in efficitur. Quisque aliquam lacus leo, id rutrum leo placerat a. Cras fringilla ornare lectus, in fermentum tellus aliquet ac. Phasellus placerat rhoncus dolor non consequat.
Nunc fermentum laoreet aliquam. Nullam id arcu libero. Sed mollis nisl sit amet eros hendrerit lacinia. Nunc vel lacus velit. Aliquam quis odio velit. Nam tempus dignissim libero sed blandit. Vivamus iaculis dapibus leo vitae imperdiet. Integer vel purus quis nunc tempus pretium ut id mauris. Etiam sed lobortis leo. Ut a suscipit augue. Vestibulum pellentesque mauris orci, a iaculis velit imperdiet non.


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Class utils.Basetest</title>
<meta name="date" content="2013-03-06">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
utils.Basetest

Packages that use Basetest

Package
Description

tests

Uses of Basetest in tests

Subclasses of Basetest in tests

Modifier and Type
Class and Description

class
ControlTests

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
    Dimensions,
    PixelRatio,
    TouchableOpacity,
    ScrollView,
    StatusBar
} from 'react-native';
import request from '../../utils/Request'
import config from '../../utils/Config'
import {Toast} from 'antd-mobile'
let dim = Dimensions.get('window');

import { NavigationActions } from 'react-navigation'
export default class Mine extends Component {

    //初始化赋值
    constructor(props){
        super(props);
        this.state={
            phoneNumber:"",
        }
    }
    componentDidMount(){
    }

    static navigationOptions=({navigation})=>({
        headerTintColor: "#333",
        headerStyle:{
            backgroundColor:'#fff'
        },
        headerTitle:'关于我们',
        headerTitleStyle:{
            fontSize:18,
            color:'#333'
        },
    });

    render() {
        return (
            <View style={{flex:1}}>
                <StatusBar barStyle="dark-content"/>
            <View style={{flex:1,backgroundColor:'#fff',borderTopWidth:1,borderTopColor:"#e5eaf6"}}>
                <View
                    numberOfLines={2}
                    style={{marginHorizontal:32,justifyContent:'center',alignItems:'center'}}>
                    <Image source={require("../../image/wode/logo.png")} style={{marginTop:47,width:64,height:46}}/>
                    <Text style={{marginTop:18}}>
                        融博生活圈
                    </Text>
                    <Image source={require("../../image/wode/slogan.png")} style={{marginTop:46,width:215,height:50}}/>
                    <Text style={{color:'#666',marginTop:56}}>
                        <Text style={{lineHeight:24,fontSize:14,width:28,height:12,backgroundColor:'#fff',opacity:0}}>空格</Text>
                           融博生活圈是普洱融博科技网络有限公司2017年创立,运用当下最新的思维模式:分享经济、倍增原理、大数据、互联网金融、资本市场,致力于创建一个以新零售、新制造、新金融、新技术和新能源为主的新型商业模式。
                    </Text>
                </View>
            </View>
                <View style={{position:'absolute',bottom:40,width:dim.width,justifyContent:'center',alignItems:'center'}}>
                    <Text style={{color:'#999',fontSize:10,backgroundColor:'rgba(0,0,0,0)'}}>
                        Copyright@2017
                    </Text>
                    <Text style={{color:'#999',fontSize:12,marginTop:5,backgroundColor:'rgba(0,0,0,0)'}}>
                        普洱融博网络科技有限公司
                    </Text>
                </View>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    row:{
        flexDirection:'row'
    },
    borderTop:{
        borderTopWidth:1,borderTopColor:"#f1f1f1"
    },
    borderBottom:{
        borderBottomWidth:1,borderBottomColor:"#f1f1f1"
    },
    center:{
        justifyContent: 'center',
        alignItems: 'center',
    },
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#F5FCFF',
    },
    welcome: {
        fontSize: 20,
        textAlign: 'center',
        margin: 10,
    },
    instructions: {
        textAlign: 'center',
        color: '#333333',
        marginBottom: 5,
    },
});


text:
<?php

namespace App\Controller;

use App\Entity\Page;
use App\Repository\EventRepository;
use App\Traits\ValidatorTrait;
use Doctrine\Common\Collections\Criteria;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;

/**
 * Class DefaultController.
 */
class DefaultController extends AbstractController
{
    use ValidatorTrait;

    private $eventRepository;

    /**
     * @param EventRepository $eventRepository
     */
    public function __construct(EventRepository $eventRepository)
    {
        $this->eventRepository = $eventRepository;
    }

    /**
     * @Route("/", name="homepage", options = {"expose"=true})
     *
     * @return Response
     */
    public function indexAction(): Response
    {
        $events = $this->eventRepository->findBy(['active' => true], ['date' => Criteria::ASC]);

        return $this->render('Default/index.html.twig', ['events' => $events]);
    }

    /**
     * @Route("/page/{slug}", name="page")
     *
     * @param Page $page
     *
     * @return Response
     */
    public function pageAction(Page $page): Response
    {
        // @todo https://redmine.stfalcon.com/issues/59959
        switch ($page->getSlug()) {
            case 'contacts':
                return $this->render('Redesign/static_contacts.page.html.twig', ['page' => $page]);
            case 'about':
                return $this->render('Page/about.html.twig', ['page' => $page]);
            default:
                return $this->render('Default/page.html.twig', ['page' => $page]);
        }
    }
}


text:
**org.jboss.netty.channel.ChannelState**

```java
public enum ChannelState {
    /**
     * Represents a {@link Channel}'s {@link Channel#isOpen() open} property
     */
    OPEN,

    /**
     * Represents a {@link Channel}'s {@link Channel#isBound() bound} property
     */
    BOUND,

    /**
     * Represents a {@link Channel}'s {@link Channel#isConnected() connected}
     * property
     */
    CONNECTED,

    /**
     * Represents a {@link Channel}'s {@link Channel#getInterestOps() interestOps}
     * property
     */
    INTEREST_OPS;
}
```

The current or future state of a Channel.

The state of a Channel is interpreted differently depending on the value of a ChannelStateEvent and the direction of the event in a ChannelPipeline:

|Direction|State|Value|Meaning|
|-|-|-|-|
|Upstream|OPEN|true|The channel is open.|
|||||


text:
namespace media {

namespace {
#if !defined(OS_WIN)
// Taken from "Bit Twiddling Hacks"
// http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
uint32_t RoundUpToPowerOfTwo(uint32_t v) {
  v--;
  v |= v >> 1;
  v |= v >> 2;
  v |= v >> 4;
  v |= v >> 8;
  v |= v >> 16;
  v++;
  return v;
}
#endif
}  // namespace

// static
int AudioLatency::GetHighLatencyBufferSize(int sample_rate,
                                           int preferred_buffer_size) {
  // Empirically, we consider 20ms of samples to be high latency.
  const double twenty_ms_size = 2.0 * sample_rate / 100;

#if defined(OS_WIN)
  preferred_buffer_size = std::max(preferred_buffer_size, 1);

  // Windows doesn't use power of two buffer sizes, so we should always round up
  // to the nearest multiple of the output buffer size.
  const int high_latency_buffer_size =
      std::ceil(twenty_ms_size / preferred_buffer_size) * preferred_buffer_size;
#else
  // On other platforms use the nearest higher power of two buffer size.  For a
  // given sample rate, this works out to:
  //
  //     <= 3200   : 64
  //     <= 6400   : 128
  //     <= 12800  : 256
  //     <= 25600  : 512
  //     <= 51200  : 1024
  //     <= 102400 : 2048
  //     <= 204800 : 4096
  //
  // On Linux, the minimum hardware buffer size is 512, so the lower calculated
  // values are unused.  OSX may have a value as low as 128.
  const int high_latency_buffer_size = RoundUpToPowerOfTwo(twenty_ms_size);
#endif  // defined(OS_WIN)

#if defined(OS_CHROMEOS)
  return high_latency_buffer_size;  // No preference.
#else
  return std::max(preferred_buffer_size, high_latency_buffer_size);
#endif  // defined(OS_CHROMEOS)
}

// static
int AudioLatency::GetRtcBufferSize(int sample_rate, int hardware_buffer_size) {
  // Use native hardware buffer size as default. On Windows, we strive to open
  // up using this native hardware buffer size to achieve best
  // possible performance and to ensure that no FIFO is needed on the browser
  // side to match the client request. That is why there is no #if case for
  // Windows below.
  int frames_per_buffer = hardware_buffer_size;

  // No |hardware_buffer_size| is specified, fall back to 10 ms buffer size.
  if (!frames_per_buffer) {
    frames_per_buffer = sample_rate / 100;
    DVLOG(1) << "Using 10 ms sink output buffer size: " << frames_per_buffer;
    return frames_per_buffer;
  }

#if defined(OS_LINUX) || defined(OS_MACOSX)
  // On Linux and MacOS, the low level IO implementations on the browser side
  // supports all buffer size the clients want. We use the native peer
  // connection buffer size (10ms) to achieve best possible performance.
  frames_per_buffer = sample_rate / 100;
#elif defined(OS_ANDROID)
  // TODO(olka/henrika): This settings are very old, need to be revisited.
  int frames_per_10ms = sample_rate / 100;
  if (frames_per_buffer < 2 * frames_per_10ms) {
    // Examples of low-latency frame sizes and the resulting |buffer_size|:
    //  Nexus 7     : 240 audio frames => 2*480 = 960
    //  Nexus 10    : 256              => 2*441 = 882
    //  Galaxy Nexus: 144              => 2*441 = 882
    frames_per_buffer = 2 * frames_per_10ms;
    DVLOG(1) << "Low-latency output detected on Android";
  }
#endif

  DVLOG(1) << "Using sink output buffer size: " << frames_per_buffer;
  return frames_per_buffer;
}

// static
int AudioLatency::GetInteractiveBufferSize(int hardware_buffer_size) {
#if defined(OS_ANDROID)
  // The optimum low-latency hardware buffer size is usually too small on
  // Android for WebAudio to render without glitching. So, if it is small, use
  // a larger size.
  //
  // Since WebAudio renders in 128-frame blocks, the small buffer sizes (144 for
  // a Galaxy Nexus), cause significant processing jitter. Sometimes multiple
  // blocks will processed, but other times will not be since the WebAudio can't
  // satisfy the request. By using a larger render buffer size, we smooth out
  // the jitter.
  const int kSmallBufferSize = 1024;
  const int kDefaultCallbackBufferSize = 2048;
  if (hardware_buffer_size <= kSmallBufferSize)
    return kDefaultCallbackBufferSize;
#endif

  return hardware_buffer_size;
}

}  // namespace media


text:
int main(int argc, char* argv[])
{

    vglInit(50,50);
    vglClInit();

    if (argc < 2)
    {
        printf("Usage: demo_histogram file.dicom\n");
        printf("bad arguments, read usage again\n");
        exit(1);
    }

    char* image_path = argv[1];

    printf("VisionCL on %s\n\n",image_path);

    //REMEMBER, LOAD A GRAY LEVEL IMAGE
    VglImage* img = vglDcmtkLoadDicom(image_path);
    VglImage* out = vglCreate3dImage(cvSize(img->getWidth(),img->getHeight()),img->depth,img->nChannels,img->getLength());

    int* eq = (int*) malloc(256*sizeof(int));
    for(int i = 0; i < 256; i++)
    {
      if (i < 96)
        eq[i] = 0;
      else if (i < 200)
        eq[i] = i;
      else
        eq[i] = 0;
    }

    //OpenCL histogram
    TimerStart();
    vglClHistogram(img);
    printf("First call to          cl3dHistogram: %s\n", getTimeElapsedInSeconds());
    TimerStart();
    vglCl3dGrayLevelTransform(img,out,eq);
    printf("First call to cl3dGrayLevelTransform: %s\n", getTimeElapsedInSeconds());
    TimerStart();
    vglCl3dGrayLevelTransform(img,out,eq);
    printf("Testing cl3dGrayLevelTransform time: %s\n", getTimeElapsedInSeconds());
    TimerStart();
    int* histogram = vglClHistogram(img);
    printf("Testing cl3dHistogram time: %s\n", getTimeElapsedInSeconds());

    //CPU histogram
    TimerStart();
    int* histogram_cpu_r = (int*) malloc(256*sizeof(int));

    memset(histogram_cpu_r,0x0,256*sizeof(int));

    unsigned char* pixels = (unsigned char*) img->ndarray;

    for(int i = 0; i < img->getWidth()*img->getHeight()*img->getLength();i++)
    {
      histogram_cpu_r[pixels[i]]++;
    }

    printf("Testing Histogram CPU time: %s\n", getTimeElapsedInSeconds());
    //Test if they are equal
    int t = 0;
    for(int i = 0; i < 256; i++)
    {
      t += histogram_cpu_r[i] - histogram[i];
    }
    printf("Total diff %d\n", t);

    vglCl3dHistogramEq(img,out);

    vglClDownload(out);
    vglDcmtkSaveDicom("C:/Users/H_DANILO/Dropbox/TCC/TCC_DICOM_HISTEQ.dcm", out, 0);

    vglCl3dGrayLevelTransform(img,out,eq);

    vglClDownload(out);
    vglDcmtkSaveDicom("C:/Users/H_DANILO/Dropbox/TCC/TCC_DICOM_GrayLevelTransform.dcm", out, 0);

    return 0;
}


text:
require("./proof")(1, function (step, relatable, resetManufacturer, deepEqual) {
  step(function () {

    resetManufacturer(step());

  }, function () {

    relatable.select(" \
      SELECT *, \
        (SELECT *, \
              (SELECT * \
                 FROM sale_item AS item \
                                ON products.manufacturer_id = item.manufacturer_id \
                               AND products.manufacturer_code = item.manufacturer_code \
               ) \
          FROM product AS products ON products.manufacturer_id = manufacturer.id \
          ) \
      FROM manufacturer \
    ", step());

  }, function (results) {

    deepEqual(
      [ { id: 1,
          name: 'Acme',
          products:
           [ { id: 1,
               name: 'Heavy Anvil',
               manufacturerCode: 'A',
               manufacturerId: 1,
               item:
                [ { id: 1,
                    price: 44.99,
                    quantity: 2,
                    manufacturerCode: 'A',
                    manufacturerId: 1,
                    saleId: 1 } ] } ] } ], results, "join through");

  });
});


text:
using namespace Kodiak;
using namespace std;
using namespace Microsoft::WRL;

#pragma intrinsic(_BitScanReverse)
#pragma intrinsic(_BitScanForward)
#pragma intrinsic(_BitScanForward64)

namespace Kodiak
{

	mutex DynamicDescriptorHeap::s_mutex;
	vector<ComPtr<ID3D12DescriptorHeap>> DynamicDescriptorHeap::s_descriptorHeapPool;
	queue<pair<uint64_t, ID3D12DescriptorHeap*>> DynamicDescriptorHeap::s_retiredDescriptorHeaps;
	queue<ID3D12DescriptorHeap*> DynamicDescriptorHeap::s_availableDescriptorHeaps;
	uint32_t DynamicDescriptorHeap::s_descriptorSize = 0;

} // namespace Kodiak

DynamicDescriptorHeap::DynamicDescriptorHeap(CommandList& owner) : m_owningCommandList(owner) {}

void DynamicDescriptorHeap::DestroyAll()
{
	s_descriptorHeapPool.clear();
}

void DynamicDescriptorHeap::CleanupUsedHeaps(uint64_t fenceValue)
{
	RetireCurrentHeap();
	RetireUsedHeaps(fenceValue);
	m_graphicsHandleCache.ClearCache();
	m_computeHandleCache.ClearCache();
}

D3D12_GPU_DESCRIPTOR_HANDLE DynamicDescriptorHeap::UploadDirect(D3D12_CPU_DESCRIPTOR_HANDLE handle)
{
	if(!HasSpace(1))
	{
		RetireCurrentHeap();
		UnbindAllValid();
	}

	m_owningCommandList.SetDescriptorHeap(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, GetHeapPointer());

	DescriptorHandle DestHandle = m_firstDescriptor + m_currentOffset * GetDescriptorSize();
	m_currentOffset += 1;

	g_device->CopyDescriptorsSimple(1, DestHandle.GetCpuHandle(), handle, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);

	return DestHandle.GetGpuHandle();
}

uint32_t DynamicDescriptorHeap::GetDescriptorSize()
{
	if (s_descriptorSize == 0)
	{
		s_descriptorSize = g_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
	}
	return s_descriptorSize;
}

ID3D12DescriptorHeap* DynamicDescriptorHeap::RequestDescriptorHeap()
{
	lock_guard<mutex> LockGuard(s_mutex);

	while(!s_retiredDescriptorHeaps.empty() && CommandListManager::GetInstance().IsFenceComplete(s_retiredDescriptorHeaps.front().first))
	{
		s_availableDescriptorHeaps.push(s_retiredDescriptorHeaps.front().second);
		s_retiredDescriptorHeaps.pop();
	}

	if(!s_availableDescriptorHeaps.empty())
	{
		ID3D12DescriptorHeap* HeapPtr = s_availableDescriptorHeaps.front();
		s_availableDescriptorHeaps.pop();
		return HeapPtr;
	}
	else
	{
		D3D12_DESCRIPTOR_HEAP_DESC heapDesc = {};
		heapDesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV;
		heapDesc.NumDescriptors = kNumDescriptorsPerHeap;
		heapDesc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
		heapDesc.NodeMask = 1;
		ComPtr<ID3D12DescriptorHeap> heapPtr;
		ThrowIfFailed(g_device->CreateDescriptorHeap(&heapDesc, IID_PPV_ARGS(&heapPtr)));
		s_descriptorHeapPool.emplace_back(heapPtr);
		return heapPtr.Get();
	}
}

void DynamicDescriptorHeap::DiscardDescriptorHeaps(uint64_t fenceValue, const std::vector<ID3D12DescriptorHeap*>& usedHeaps)
{
	lock_guard<mutex> LockGuard(s_mutex);
	for (auto iter = usedHeaps.begin(); iter != usedHeaps.end(); ++iter)
	{
		s_retiredDescriptorHeaps.push(make_pair(fenceValue, *iter));
	}
}

void DynamicDescriptorHeap::RetireCurrentHeap()
{
	// Don't retire unused heaps.
	if (m_currentOffset == 0)
	{
		assert(m_currentHeapPtr == nullptr);
		return;
	}

	assert(m_currentHeapPtr != nullptr);
	m_retiredHeaps.push_back(m_currentHeapPtr);
	m_currentHeapPtr = nullptr;
	m_currentOffset = 0;
}

void DynamicDescriptorHeap::RetireUsedHeaps(uint64_t fenceValue)
{
	DiscardDescriptorHeaps(fenceValue, m_retiredHeaps);
	m_retiredHeaps.clear();
}

inline ID3D12DescriptorHeap* DynamicDescriptorHeap::GetHeapPointer()
{
	if (m_currentHeapPtr == nullptr)
	{
		assert(m_currentOffset == 0);
		m_currentHeapPtr = RequestDescriptorHeap();
		m_firstDescriptor = DescriptorHandle(
			m_currentHeapPtr->GetCPUDescriptorHandleForHeapStart(),
			m_currentHeapPtr->GetGPUDescriptorHandleForHeapStart());
	}

	return m_currentHeapPtr;
}

void DynamicDescriptorHeap::UnbindAllValid()
{
	m_graphicsHandleCache.UnbindAllValid();
	m_computeHandleCache.UnbindAllValid();
}

uint32_t DynamicDescriptorHeap::DescriptorHandleCache::ComputeStagedSize()
{
	// Sum the maximum assigned offsets of stale descriptor tables to determine total needed space.
	uint32_t neededSpace = 0;
	uint32_t rootIndex;
	uint32_t staleParams = staleRootParamsBitMap;
	while(_BitScanForward((unsigned long*)&rootIndex, staleParams))
	{
		staleParams ^= (1 << rootIndex);

		uint32_t maxSetHandle;

		assert(TRUE == _BitScanReverse((unsigned long*)&maxSetHandle, rootDescriptorTable[rootIndex].assignedHandlesBitMap));
		// Root entry marked as stale but has no stale descriptors

		neededSpace += maxSetHandle + 1;
	}
	return neededSpace;
}

void DynamicDescriptorHeap::DescriptorHandleCache::CopyAndBindStaleTables(
	DescriptorHandle destHandleStart, ID3D12GraphicsCommandList* cmdList,
	void (STDMETHODCALLTYPE ID3D12GraphicsCommandList::*SetFunc)(UINT, D3D12_GPU_DESCRIPTOR_HANDLE))
{
	uint32_t staleParamCount = 0;
	uint32_t tableSize[DescriptorHandleCache::kMaxNumDescriptorTables];
	uint32_t rootIndices[DescriptorHandleCache::kMaxNumDescriptorTables];
	uint32_t neededSpace = 0;
	uint32_t rootIndex;

	// Sum the maximum assigned offsets of stale descriptor tables to determine total needed space.
	uint32_t staleParams = staleRootParamsBitMap;
	while (_BitScanForward((unsigned long*)&rootIndex, staleParams))
	{
		rootIndices[staleParamCount] = rootIndex;
		staleParams ^= (1 << rootIndex);

		uint32_t maxSetHandle;

		assert(TRUE == _BitScanReverse((unsigned long*)&maxSetHandle, rootDescriptorTable[rootIndex].assignedHandlesBitMap));
		// Root entry marked as stale but has no stale descriptors

		neededSpace += maxSetHandle + 1;
		tableSize[staleParamCount] = maxSetHandle + 1;

		++staleParamCount;
	}

	assert(staleParamCount <= DescriptorHandleCache::kMaxNumDescriptorTables);
	// We're only equipped to handle so many descriptor tables

	staleRootParamsBitMap = 0;

	static const uint32_t kMaxDescriptorsPerCopy = 16;
	uint32_t numDestDescriptorRanges = 0;
	D3D12_CPU_DESCRIPTOR_HANDLE pDestDescriptorRangeStarts[kMaxDescriptorsPerCopy];
	uint32_t pDestDescriptorRangeSizes[kMaxDescriptorsPerCopy];

	uint32_t numSrcDescriptorRanges = 0;
	D3D12_CPU_DESCRIPTOR_HANDLE pSrcDescriptorRangeStarts[kMaxDescriptorsPerCopy];
	uint32_t pSrcDescriptorRangeSizes[kMaxDescriptorsPerCopy];

	const uint32_t kDescriptorSize = DynamicDescriptorHeap::GetDescriptorSize();

	for (uint32_t i = 0; i < staleParamCount; ++i)
	{
		rootIndex = rootIndices[i];
		(cmdList->*SetFunc)(rootIndex, destHandleStart.GetGpuHandle());

		DescriptorTableCache& rootDescTable = rootDescriptorTable[rootIndex];

		D3D12_CPU_DESCRIPTOR_HANDLE* srcHandles = rootDescTable.tableStart;
		uint64_t setHandles = (uint64_t)rootDescTable.assignedHandlesBitMap;
		D3D12_CPU_DESCRIPTOR_HANDLE curDest = destHandleStart.GetCpuHandle();
		destHandleStart += tableSize[i] * kDescriptorSize;

		unsigned long skipCount;
		while (_BitScanForward64(&skipCount, setHandles))
		{
			// Skip over unset descriptor handles
			setHandles >>= skipCount;
			srcHandles += skipCount;
			curDest.ptr += skipCount * kDescriptorSize;

			unsigned long descriptorCount;
			_BitScanForward64(&descriptorCount, ~setHandles);
			setHandles >>= descriptorCount;

			// If we run out of temp room, copy what we've got so far
			if (numSrcDescriptorRanges + descriptorCount > kMaxDescriptorsPerCopy)
			{
				g_device->CopyDescriptors(
					numDestDescriptorRanges, pDestDescriptorRangeStarts, pDestDescriptorRangeSizes,
					numSrcDescriptorRanges, pSrcDescriptorRangeStarts, pSrcDescriptorRangeSizes,
					D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);

				numSrcDescriptorRanges = 0;
				numDestDescriptorRanges = 0;
			}

			// Setup destination range
			pDestDescriptorRangeStarts[numDestDescriptorRanges] = curDest;
			pDestDescriptorRangeSizes[numDestDescriptorRanges] = descriptorCount;
			++numDestDescriptorRanges;

			// Setup source ranges (one descriptor each because we don't assume they are contiguous)
			for (uint32_t i = 0; i < descriptorCount; ++i)
			{
				pSrcDescriptorRangeStarts[numSrcDescriptorRanges] = srcHandles[i];
				pSrcDescriptorRangeSizes[numSrcDescriptorRanges] = 1;
				++numSrcDescriptorRanges;
			}

			// Move the destination pointer forward by the number of descriptors we will copy
			srcHandles += descriptorCount;
			curDest.ptr += descriptorCount * kDescriptorSize;
		}
	}

	g_device->CopyDescriptors(
		numDestDescriptorRanges, pDestDescriptorRangeStarts, pDestDescriptorRangeSizes,
		numSrcDescriptorRanges, pSrcDescriptorRangeStarts, pSrcDescriptorRangeSizes,
		D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
}

void DynamicDescriptorHeap::DescriptorHandleCache::UnbindAllValid()
{
	staleRootParamsBitMap = 0;

	unsigned long tableParams = rootDescriptorTablesBitMap;
	unsigned long rootIndex;
	while(_BitScanForward(&rootIndex, tableParams))
	{
		tableParams ^= (1 << rootIndex);
		if (rootDescriptorTable[rootIndex].assignedHandlesBitMap != 0)
		{
			staleRootParamsBitMap |= (1 << rootIndex);
		}
	}
}

void DynamicDescriptorHeap::DescriptorHandleCache::StageDescriptorHandles(uint32_t rootIndex, uint32_t offset, uint32_t numHandles, const D3D12_CPU_DESCRIPTOR_HANDLE handles[])
{
	assert(((1 << rootIndex) & rootDescriptorTablesBitMap) != 0); // Root parameter is not a CBV_SRV_UAV descriptor table"
	assert(offset + numHandles <= rootDescriptorTable[rootIndex].tableSize);

	DescriptorTableCache& tableCache = rootDescriptorTable[rootIndex];
	D3D12_CPU_DESCRIPTOR_HANDLE* copyDest = tableCache.tableStart + offset;
	for (uint32_t i = 0; i < numHandles; ++i)
	{
		copyDest[i] = handles[i];
	}
	tableCache.assignedHandlesBitMap |= ((1 << numHandles) - 1) << offset;
	staleRootParamsBitMap |= (1 << rootIndex);
}

void DynamicDescriptorHeap::DescriptorHandleCache::ParseRootSignature(const RootSignature& rootSig)
{
	uint32_t currentOffset = 0;

	assert(rootSig.m_numParameters <= 16); // Maybe we need to support something greater

	staleRootParamsBitMap = 0;
	rootDescriptorTablesBitMap = rootSig.m_descriptorTableBitMap;

	unsigned long tableParams = rootDescriptorTablesBitMap;
	unsigned long rootIndex;
	while(_BitScanForward(&rootIndex, tableParams))
	{
		tableParams ^= (1 << rootIndex);

		uint32_t tableSize = rootSig.m_descriptorTableSize[rootIndex];
		assert(tableSize > 0);

		DescriptorTableCache& rootDescTable = rootDescriptorTable[rootIndex];
		rootDescTable.assignedHandlesBitMap = 0;
		rootDescTable.tableStart = handleCache + currentOffset;
		rootDescTable.tableSize = tableSize;

		currentOffset += tableSize;
	}

	maxCachedDescriptors = currentOffset;

	assert(maxCachedDescriptors <= kMaxNumDescriptors); //Exceeded user-supplied maximum cache size
}

void DynamicDescriptorHeap::CopyAndBindStagedTables(DescriptorHandleCache& handleCache, ID3D12GraphicsCommandList* cmdList,
	void (STDMETHODCALLTYPE ID3D12GraphicsCommandList::*SetFunc)(UINT, D3D12_GPU_DESCRIPTOR_HANDLE))
{
	uint32_t neededSize = handleCache.ComputeStagedSize();
	if(!HasSpace(neededSize))
	{
		RetireCurrentHeap();
		UnbindAllValid();
	}

	// This can trigger the creation of a new heap
	m_owningCommandList.SetDescriptorHeap(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, GetHeapPointer());

	handleCache.CopyAndBindStaleTables(Allocate(neededSize), cmdList, SetFunc);
}


text:
package com.pizza5stars.dao.mappers;

import com.pizza5stars.representations.Customer;
import org.skife.jdbi.v2.StatementContext;
import org.skife.jdbi.v2.tweak.ResultSetMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class CustomerMapper implements ResultSetMapper<Customer> {
    public Customer map(int index, ResultSet r, StatementContext ctx)
            throws SQLException {
        return new Customer(
                r.getInt("id"), r.getString("email"), r.getString("firstname"),
                r.getString("lastname"), r.getString("password"));
    }
}


text:
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcredit developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include "activebasenode.h"
#include "amount.h"
#include "basenode.h"
#include "basenodeman.h"
#include "basenodeconfig.h"
#include <boost/lexical_cast.hpp>
#include "db.h"
#include "darksend.h"
#include "init.h"
#include "main.h"
#include "primitives/transaction.h"
#include "rpc/server.h"
#include "univalue/include/univalue.h"
#include "util.h"
#include "utilmoneystr.h"

#include <fstream>
#include <iomanip>
using namespace std;

UniValue basenodelist(const UniValue& params, bool fHelp)
{
    std::string strMode = "status";
    std::string strFilter = "";

    if (params.size() >= 1) strMode = params[0].getValStr().c_str();
    if (params.size() == 2) strFilter = params[1].getValStr().c_str();

    if (fHelp ||
            (strMode != "status" && strMode != "vin" && strMode != "pubkey" && strMode != "lastseen" && strMode != "activeseconds" && strMode != "rank"
                && strMode != "protocol" && strMode != "full" && strMode != "votes" && strMode != "donation" && strMode != "pose"))
    {
        throw runtime_error(
                "basenodelist ( \"mode\" \"filter\" )\n"
                "Get a list of basenodes in different modes\n"
                "\nArguments:\n"
                "1. \"mode\"      (string, optional/required to use filter, defaults = status) The mode to run list in\n"
                "2. \"filter\"    (string, optional) Filter results. Partial match by IP by default in all modes, additional matches in some modes\n"
                "\nAvailable modes:\n"
                "  activeseconds  - Print number of seconds basenode recognized by the network as enabled\n"
                "  donation       - Show donation settings\n"
                "  full           - Print info in format 'status protocol pubkey vin lastseen activeseconds' (can be additionally filtered, partial match)\n"
                "  lastseen       - Print timestamp of when a basenode was last seen on the network\n"
                "  pose           - Print Proof-of-Service score\n"
                "  protocol       - Print protocol of a basenode (can be additionally filtered, exact match))\n"
                "  pubkey         - Print public key associated with a basenode (can be additionally filtered, partial match)\n"
                "  rank           - Print rank of a basenode based on current block\n"
                "  status         - Print basenode status: ENABLED / EXPIRED / VIN_SPENT / REMOVE / POS_ERROR (can be additionally filtered, partial match)\n"
                "  vin            - Print vin associated with a basenode (can be additionally filtered, partial match)\n"
                "  votes          - Print all basenode votes for a Dash initiative (can be additionally filtered, partial match)\n"
                );
    }

    UniValue obj(UniValue::VOBJ);
    if (strMode == "rank") {
        std::vector<pair<int, CBasenode> > vBasenodeRanks = mnodeman.GetBasenodeRanks(chainActive.Tip()->nHeight);
        BOOST_FOREACH(PAIRTYPE(int, CBasenode)& s, vBasenodeRanks) {
            std::string strAddr = s.second.addr.ToString();
            if(strFilter !="" && strAddr.find(strFilter) == string::npos) continue;
            obj.push_back(Pair(strAddr,       s.first));
        }
    } else {
        std::vector<CBasenode> vBasenodes = mnodeman.GetFullBasenodeVector();
        BOOST_FOREACH(CBasenode& mn, vBasenodes) {
            std::string strAddr = mn.addr.ToString();
            if (strMode == "activeseconds") {
                if(strFilter !="" && strAddr.find(strFilter) == string::npos) continue;
                obj.push_back(Pair(strAddr,       (int64_t)(mn.lastTimeSeen - mn.sigTime)));
            } else if (strMode == "full") {
                CScript pubkey;
                pubkey=GetScriptForDestination(mn.pubkey.GetID());
                CTxDestination address1;
                ExtractDestination(pubkey, address1);
                CBitcreditAddress address2(address1);

                std::ostringstream addrStream;
                addrStream << std::setw(21) << strAddr;

                std::ostringstream stringStream;
                stringStream << std::setw(10) <<
                               mn.Status() << " " <<
                               mn.protocolVersion << " " <<
                               address2.ToString() << " " <<
                               mn.vin.prevout.hash.ToString() << " " <<
                               mn.lastTimeSeen << " " << setw(8) <<
                               (mn.lastTimeSeen - mn.sigTime);
                std::string output = stringStream.str();
                stringStream << " " << strAddr;
                if(strFilter !="" && stringStream.str().find(strFilter) == string::npos &&
                        strAddr.find(strFilter) == string::npos) continue;
                obj.push_back(Pair(addrStream.str(), output));
            } else if (strMode == "lastseen") {
                if(strFilter !="" && strAddr.find(strFilter) == string::npos) continue;
                obj.push_back(Pair(strAddr,       (int64_t)mn.lastTimeSeen));
            } else if (strMode == "protocol") {
                if(strFilter !="" && strFilter != boost::lexical_cast<std::string>(mn.protocolVersion) &&
                    strAddr.find(strFilter) == string::npos) continue;
                obj.push_back(Pair(strAddr,       (int64_t)mn.protocolVersion));
            } else if (strMode == "pubkey") {
                CScript pubkey;
                pubkey=GetScriptForDestination(mn.pubkey.GetID());
                CTxDestination address1;
                ExtractDestination(pubkey, address1);
                CBitcreditAddress address2(address1);

                if(strFilter !="" && address2.ToString().find(strFilter) == string::npos &&
                    strAddr.find(strFilter) == string::npos) continue;
                obj.push_back(Pair(strAddr,       address2.ToString().c_str()));
            } else if (strMode == "pose") {
                if(strFilter !="" && strAddr.find(strFilter) == string::npos) continue;
                std::string strOut = boost::lexical_cast<std::string>(mn.nScanningErrorCount);
                obj.push_back(Pair(strAddr,       strOut.c_str()));
            } else if(strMode == "status") {
                std::string strStatus = mn.Status();
                if(strFilter !="" && strAddr.find(strFilter) == string::npos && strStatus.find(strFilter) == string::npos) continue;
                obj.push_back(Pair(strAddr,       strStatus.c_str()));
            } else if (strMode == "vin") {
                if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
                    strAddr.find(strFilter) == string::npos) continue;
                obj.push_back(Pair(strAddr,       mn.vin.prevout.hash.ToString().c_str()));
            } else if(strMode == "votes"){
                std::string strStatus = "ABSTAIN";

                //voting lasts 30 days, ignore the last vote if it was older than that
                if((GetAdjustedTime() - mn.lastVote) < (60*60*30*24))
                {
                    if(mn.nVote == -1) strStatus = "NAY";
                    if(mn.nVote == 1) strStatus = "YEA";
                }

                if(strFilter !="" && (strAddr.find(strFilter) == string::npos && strStatus.find(strFilter) == string::npos)) continue;
                obj.push_back(Pair(strAddr,       strStatus.c_str()));
            }
        }
    }
    return obj;

}

UniValue basenode(const UniValue& params, bool fHelp)
{
    string strCommand;
    if (params.size() >= 1)
        strCommand = params[0].getValStr().c_str();

    if (fHelp  ||
        (strCommand != "start" && strCommand != "mincollateral" && strCommand != "maxbnssupply" && strCommand != "start-alias" && strCommand != "start-many" && strCommand != "stop" && strCommand != "stop-alias" && strCommand != "stop-many" && strCommand != "list" && strCommand != "list-conf" && strCommand != "count"  && strCommand != "enforce"
            && strCommand != "debug" && strCommand != "current" && strCommand != "winners" && strCommand != "genkey" && strCommand != "connect" && strCommand != "outputs" && strCommand != "vote-many" && strCommand != "vote"))
        throw runtime_error(
                "basenode \"command\"... ( \"passphrase\" )\n"
                "Set of commands to execute basenode related actions\n"
                "\nArguments:\n"
                "1. \"command\"        (string or set of strings, required) The command to execute\n"
                "2. \"passphrase\"     (string, optional) The wallet passphrase\n"
                "\nAvailable commands:\n"
                "  count        - Print number of all known basenodes (optional: 'enabled', 'both')\n"
                "  current      - Print info on current basenode winner\n"
                "  debug        - Print basenode status\n"
                "  genkey       - Generate new basenodeprivkey\n"
                "  mincollateral- Minimum basenode collateral to start a BN\n"
                "  maxbnssupply - Maximum basenodes collateral\n"
                "  enforce      - Enforce basenode payments\n"
                "  outputs      - Print basenode compatible outputs\n"
                "  start        - Start basenode configured in basenode.conf\n"
                "  start-alias  - Start single basenode by assigned alias configured in basenode.conf\n"
                "  start-many   - Start all basenodes configured in basenode.conf\n"
                "  stop         - Stop basenode configured in basenode.conf\n"
                "  stop-alias   - Stop single basenode by assigned alias configured in basenode.conf\n"
                "  stop-many    - Stop all basenodes configured in basenode.conf\n"
                "  list         - Print list of all known basenodes (see basenodelist for more info)\n"
                "  list-conf    - Print basenode.conf in JSON format\n"
                "  winners      - Print list of basenode winners\n"
                "  vote-many    - Vote on a BCR initiative\n"
                "  vote         - Vote on a BCR initiative\n"
                );

    if (strCommand == "mincollateral")
        {
    		return (uint64_t)getBasenodeMinimumCollateral();
        }
    if (strCommand == "maxbnssupply")
        {
    		return (uint64_t)getBasenodeMaximumCollateralSum();
        }

    if (strCommand == "stop")
    {
        if(!fBaseNode) return "you must set basenode=1 in the configuration";

        if(pwalletMain->IsLocked()) {
            SecureString strWalletPass;
            strWalletPass.reserve(100);

            if (params.size() == 2){
                strWalletPass = params[1].getValStr().c_str();
            } else {
                throw runtime_error(
                    "Your wallet is locked, passphrase is required\n");
            }

            if(!pwalletMain->Unlock(strWalletPass)){
                return "incorrect passphrase";
            }
        }

        std::string errorMessage;
        if(!activeBasenode.StopBaseNode(errorMessage)) {
        	return "stop failed: " + errorMessage;
        }
        pwalletMain->Lock();

        if(activeBasenode.status == BASENODE_STOPPED) return "successfully stopped basenode";
        if(activeBasenode.status == BASENODE_NOT_CAPABLE) return "not capable basenode";

        return "unknown";
    }

    if (strCommand == "stop-alias")
    {
	    if (params.size() < 2){
			throw runtime_error(
			"command needs at least 2 parameters\n");
	    }

	    std::string alias = params[1].getValStr().c_str();

    	if(pwalletMain->IsLocked()) {
    		SecureString strWalletPass;
    	    strWalletPass.reserve(100);

			if (params.size() == 3){
				strWalletPass = params[2].getValStr().c_str();
			} else {
				throw runtime_error(
				"Your wallet is locked, passphrase is required\n");
			}

			if(!pwalletMain->Unlock(strWalletPass)){
				return "incorrect passphrase";
			}
        }

    	bool found = false;

    	UniValue statusObj(UniValue::VOBJ);
		statusObj.push_back(Pair("alias", alias));

    	BOOST_FOREACH(CBasenodeConfig::CBasenodeEntry mne, basenodeConfig.getEntries()) {
    		if(mne.getAlias() == alias) {
    			found = true;
    			std::string errorMessage;
    			bool result = activeBasenode.StopBaseNode(mne.getIp(), mne.getPrivKey(), errorMessage);

				statusObj.push_back(Pair("result", result ? "successful" : "failed"));
    			if(!result) {
   					statusObj.push_back(Pair("errorMessage", errorMessage));
   				}
    			break;
    		}
    	}

    	if(!found) {
    		statusObj.push_back(Pair("result", "failed"));
    		statusObj.push_back(Pair("errorMessage", "could not find alias in config. Verify with list-conf."));
    	}

    	pwalletMain->Lock();
    	return statusObj;
    }

    if (strCommand == "stop-many")
    {
    	if(pwalletMain->IsLocked()) {
			SecureString strWalletPass;
			strWalletPass.reserve(100);

			if (params.size() == 2){
				strWalletPass = params[1].getValStr().c_str();
			} else {
				throw runtime_error(
				"Your wallet is locked, passphrase is required\n");
			}

			if(!pwalletMain->Unlock(strWalletPass)){
				return "incorrect passphrase";
			}
		}

		int total = 0;
		int successful = 0;
		int fail = 0;

		UniValue resultsObj(UniValue::VOBJ);

		BOOST_FOREACH(CBasenodeConfig::CBasenodeEntry mne, basenodeConfig.getEntries()) {
			total++;

			std::string errorMessage;
			bool result = activeBasenode.StopBaseNode(mne.getIp(), mne.getPrivKey(), errorMessage);

			UniValue statusObj(UniValue::VOBJ);
			statusObj.push_back(Pair("alias", mne.getAlias()));
			statusObj.push_back(Pair("result", result ? "successful" : "failed"));

			if(result) {
				successful++;
			} else {
				fail++;
				statusObj.push_back(Pair("errorMessage", errorMessage));
			}

			resultsObj.push_back(Pair("status", statusObj));
		}
		pwalletMain->Lock();

		UniValue returnObj(UniValue::VOBJ);
		returnObj.push_back(Pair("overall", "Successfully stopped " + boost::lexical_cast<std::string>(successful) + " basenodes, failed to stop " +
				boost::lexical_cast<std::string>(fail) + ", total " + boost::lexical_cast<std::string>(total)));
		returnObj.push_back(Pair("detail", resultsObj));

		return returnObj;

    }

    /*
    if (strCommand == "list")
    {
    	std::string newParams[params.size() - 1];
        std::copy(params. + 1, params.end(), newParams->begin());
        return basenodelist(newParams, fHelp);
    }
    */

    if (strCommand == "count")
    {
        if (params.size() > 2){
            throw runtime_error(
            "too many parameters\n");
        }
        if (params.size() == 2)
        {
        	std::string par = params[1].getValStr().c_str();
            if(par == "enabled") return mnodeman.CountEnabled();
            if(par == "both") return boost::lexical_cast<std::string>(mnodeman.CountEnabled()) + " / " + boost::lexical_cast<std::string>(mnodeman.size());
        }
        return mnodeman.size();
    }

    if (strCommand == "start")
    {
        if(!fBaseNode) return "you must set basenode=1 in the configuration";

        if(pwalletMain->IsLocked()) {
            SecureString strWalletPass;
            strWalletPass.reserve(100);

            if (params.size() == 2){
                strWalletPass = params[1].getValStr().c_str();
            } else {
                throw runtime_error(
                    "Your wallet is locked, passphrase is required\n");
            }

            if(!pwalletMain->Unlock(strWalletPass)){
                return "incorrect passphrase";
            }
        }

        if(activeBasenode.status != BASENODE_REMOTELY_ENABLED && activeBasenode.status != BASENODE_IS_CAPABLE){
            activeBasenode.status = BASENODE_NOT_PROCESSED; // TODO: consider better way
            std::string errorMessage;
            activeBasenode.ManageStatus();
            pwalletMain->Lock();
        }

        if(activeBasenode.status == BASENODE_REMOTELY_ENABLED) return "basenode started remotely";
        if(activeBasenode.status == BASENODE_INPUT_TOO_NEW) return "basenode input must have at least 15 confirmations";
        if(activeBasenode.status == BASENODE_STOPPED) return "basenode is stopped";
        if(activeBasenode.status == BASENODE_IS_CAPABLE) return "successfully started basenode";
        if(activeBasenode.status == BASENODE_NOT_CAPABLE) return "not capable basenode: " + activeBasenode.notCapableReason;
        if(activeBasenode.status == BASENODE_SYNC_IN_PROCESS) return "sync in process. Must wait until client is synced to start.";

        return "unknown";
    }

    if (strCommand == "start-alias")
    {
	    if (params.size() < 2){
			throw runtime_error(
			"command needs at least 2 parameters\n");
	    }

	    std::string alias = params[1].getValStr().c_str();

    	if(pwalletMain->IsLocked()) {
    		SecureString strWalletPass;
    	    strWalletPass.reserve(100);

			if (params.size() == 3){
				strWalletPass = params[2].getValStr().c_str();
			} else {
				throw runtime_error(
				"Your wallet is locked, passphrase is required\n");
			}

			if(!pwalletMain->Unlock(strWalletPass)){
				return "incorrect passphrase";
			}
        }

    	bool found = false;

    	UniValue statusObj(UniValue::VOBJ);
		statusObj.push_back(Pair("alias", alias));

    	BOOST_FOREACH(CBasenodeConfig::CBasenodeEntry mne, basenodeConfig.getEntries()) {
    		if(mne.getAlias() == alias) {
    			found = true;
    			std::string errorMessage;
    			bool result = activeBasenode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), errorMessage);

    			statusObj.push_back(Pair("result", result ? "successful" : "failed"));
    			if(!result) {
					statusObj.push_back(Pair("errorMessage", errorMessage));
				}
    			break;
    		}
    	}

    	if(!found) {
    		statusObj.push_back(Pair("result", "failed"));
    		statusObj.push_back(Pair("errorMessage", "could not find alias in config. Verify with list-conf."));
    	}

    	pwalletMain->Lock();
    	return statusObj;

    }

    if (strCommand == "start-many")
    {
    	if(pwalletMain->IsLocked()) {
			SecureString strWalletPass;
			strWalletPass.reserve(100);

			if (params.size() == 2){
				strWalletPass = params[1].getValStr().c_str();
			} else {
				throw runtime_error(
				"Your wallet is locked, passphrase is required\n");
			}

			if(!pwalletMain->Unlock(strWalletPass)){
				return "incorrect passphrase";
			}
		}

		std::vector<CBasenodeConfig::CBasenodeEntry> mnEntries;
		mnEntries = basenodeConfig.getEntries();

		int total = 0;
		int successful = 0;
		int fail = 0;

		UniValue resultsObj(UniValue::VOBJ);

		BOOST_FOREACH(CBasenodeConfig::CBasenodeEntry mne, basenodeConfig.getEntries()) {
			total++;

			std::string errorMessage;

			CTxIn vin = CTxIn(uint256S(mne.getTxHash()), uint32_t(atoi(mne.getOutputIndex().c_str())));
            //CBasenode *pmn = mnodeman.Find(vin);

			bool result = activeBasenode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), errorMessage);

			UniValue statusObj(UniValue::VOBJ);
			statusObj.push_back(Pair("alias", mne.getAlias()));
            statusObj.push_back(Pair("result", result ? "successful" : "failed"));

			if(result) {
				successful++;
			} else {
				fail++;
				statusObj.push_back(Pair("errorMessage", errorMessage));
			}

			resultsObj.push_back(Pair("status", statusObj));
		}
		pwalletMain->Lock();

		UniValue returnObj(UniValue::VOBJ);
		returnObj.push_back(Pair("overall", "Successfully started " + boost::lexical_cast<std::string>(successful) + " basenodes, failed to start " +
				boost::lexical_cast<std::string>(fail) + ", total " + boost::lexical_cast<std::string>(total)));
		returnObj.push_back(Pair("detail", resultsObj));

		return returnObj;
    }

    if (strCommand == "debug")
    {
        if(activeBasenode.status == BASENODE_REMOTELY_ENABLED) return "basenode started remotely";
        if(activeBasenode.status == BASENODE_INPUT_TOO_NEW) return "basenode input must have at least 15 confirmations";
        if(activeBasenode.status == BASENODE_IS_CAPABLE) return "successfully started basenode";
        if(activeBasenode.status == BASENODE_STOPPED) return "basenode is stopped";
        if(activeBasenode.status == BASENODE_NOT_CAPABLE) return "not capable basenode: " + activeBasenode.notCapableReason;
        if(activeBasenode.status == BASENODE_SYNC_IN_PROCESS) return "sync in process. Must wait until client is synced to start.";

        CTxIn vin = CTxIn();
        CPubKey pubkey = CPubKey();
        CKey key;
        bool found = activeBasenode.GetBaseNodeVin(vin, pubkey, key);
        if(!found){
            return "Missing basenode input, please look at the documentation for instructions on basenode creation";
        } else {
            return "No problems were found";
        }
    }

    if (strCommand == "create")
    {

        return "Not implemented yet, please look at the documentation for instructions on basenode creation";
    }

    if (strCommand == "current")
    {
        CBasenode* winner = mnodeman.GetCurrentBaseNode(1);
        if(winner) {
        	UniValue obj(UniValue::VOBJ);
            CScript pubkey;
            pubkey=GetScriptForDestination(winner->pubkey.GetID());
            CTxDestination address1;
            ExtractDestination(pubkey, address1);
            CBitcreditAddress address2(address1);

            obj.push_back(Pair("IP:port",       winner->addr.ToString().c_str()));
            obj.push_back(Pair("protocol",      (int64_t)winner->protocolVersion));
            obj.push_back(Pair("vin",           winner->vin.prevout.hash.ToString().c_str()));
            obj.push_back(Pair("pubkey",        address2.ToString().c_str()));
            obj.push_back(Pair("lastseen",      (int64_t)winner->lastTimeSeen));
            obj.push_back(Pair("activeseconds", (int64_t)(winner->lastTimeSeen - winner->sigTime)));
            return obj;
        }

        return "unknown";
    }

    if (strCommand == "genkey")
    {
        CKey secret;
        secret.MakeNewKey(false);

        return CBitcreditSecret(secret).ToString();
    }

    if (strCommand == "winners")
    {
    	UniValue obj(UniValue::VOBJ);

        for(int nHeight = chainActive.Tip()->nHeight-10; nHeight < chainActive.Tip()->nHeight+20; nHeight++)
        {
            CScript payee;
            if(basenodePayments.GetBlockPayee(nHeight, payee)){
                CTxDestination address1;
                ExtractDestination(payee, address1);
                CBitcreditAddress address2(address1);
                obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       address2.ToString().c_str()));
            } else {
                obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       ""));
            }
        }

        return obj;
    }

    if(strCommand == "enforce")
    {
        return (uint64_t)enforceBasenodePaymentsTime;
    }

    if(strCommand == "connect")
    {
        std::string strAddress = "";
        if (params.size() == 2){
            strAddress = params[1].getValStr().c_str();
        } else {
            throw runtime_error(
                "Basenode address required\n");
        }

        CService addr = CService(strAddress);

        if(ConnectNode((CAddress)addr, NULL)){
            return "successfully connected";
        } else {
            return "error connecting";
        }
    }

    if(strCommand == "list-conf")
    {
    	std::vector<CBasenodeConfig::CBasenodeEntry> mnEntries;
    	mnEntries = basenodeConfig.getEntries();

    	UniValue resultObj(UniValue::VOBJ);

        BOOST_FOREACH(CBasenodeConfig::CBasenodeEntry mne, basenodeConfig.getEntries()) {
        	UniValue mnObj(UniValue::VOBJ);
    		mnObj.push_back(Pair("alias", mne.getAlias()));
    		mnObj.push_back(Pair("address", mne.getIp()));
    		mnObj.push_back(Pair("privateKey", mne.getPrivKey()));
    		mnObj.push_back(Pair("txHash", mne.getTxHash()));
    		mnObj.push_back(Pair("outputIndex", mne.getOutputIndex()));
    		resultObj.push_back(Pair("basenode", mnObj));
    	}

        return resultObj;
    }

    if (strCommand == "outputs"){
        // Find possible candidates
        vector<COutput> possibleCoins = activeBasenode.SelectCoinsBasenode();

        UniValue obj(UniValue::VOBJ);
        BOOST_FOREACH(COutput& out, possibleCoins) {
            obj.push_back(Pair(out.tx->GetHash().ToString().c_str(), boost::lexical_cast<std::string>(out.i)));
        }

        return obj;

    }

    if(strCommand == "vote-many")
    {
        std::vector<CBasenodeConfig::CBasenodeEntry> mnEntries;
        mnEntries = basenodeConfig.getEntries();

        if (params.size() != 2)
            throw runtime_error("You can only vote 'yea' or 'nay'");

        std::string vote = params[1].getValStr().c_str();
        if(vote != "yea" && vote != "nay") return "You can only vote 'yea' or 'nay'";
        int nVote = 0;
        if(vote == "yea") nVote = 1;
        if(vote == "nay") nVote = -1;

        int success = 0;
        int failed = 0;

        UniValue resultObj(UniValue::VOBJ);

        BOOST_FOREACH(CBasenodeConfig::CBasenodeEntry mne, basenodeConfig.getEntries()) {
            std::string errorMessage;
            std::vector<unsigned char> vchBaseNodeSignature;
            std::string strBaseNodeSignMessage;

            CPubKey pubKeyCollateralAddress;
            CKey keyCollateralAddress;
            CPubKey pubKeyBasenode;
            CKey keyBasenode;

            if(!darkSendSigner.SetKey(mne.getPrivKey(), errorMessage, keyBasenode, pubKeyBasenode)){
                printf(" Error upon calling SetKey for %s\n", mne.getAlias().c_str());
                failed++;
                continue;
            }

            CBasenode* pmn = mnodeman.Find(pubKeyBasenode);
            if(pmn == NULL)
            {
                printf("Can't find basenode by pubkey for %s\n", mne.getAlias().c_str());
                failed++;
                continue;
            }

            std::string strMessage = pmn->vin.ToString() + boost::lexical_cast<std::string>(nVote);

            if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchBaseNodeSignature, keyBasenode)){
                printf(" Error upon calling SignMessage for %s\n", mne.getAlias().c_str());
                failed++;
                continue;
            }

            if(!darkSendSigner.VerifyMessage(pubKeyBasenode, vchBaseNodeSignature, strMessage, errorMessage)){
                printf(" Error upon calling VerifyMessage for %s\n", mne.getAlias().c_str());
                failed++;
                continue;
            }

            success++;

            //send to all peers
            LOCK(cs_vNodes);
            BOOST_FOREACH(CNode* pnode, vNodes)
                pnode->PushMessage("mvote", pmn->vin, vchBaseNodeSignature, nVote);
        }

        return("Voted successfully " + boost::lexical_cast<std::string>(success) + " time(s) and failed " + boost::lexical_cast<std::string>(failed) + " time(s).");
    }

    if(strCommand == "vote")
    {
        std::vector<CBasenodeConfig::CBasenodeEntry> mnEntries;
        mnEntries = basenodeConfig.getEntries();

        if (params.size() != 2)
            throw runtime_error("You can only vote 'yea' or 'nay'");

        std::string vote = params[1].getValStr().c_str();
        if(vote != "yea" && vote != "nay") return "You can only vote 'yea' or 'nay'";
        int nVote = 0;
        if(vote == "yea") nVote = 1;
        if(vote == "nay") nVote = -1;

        // Choose coins to use
        CPubKey pubKeyCollateralAddress;
        CKey keyCollateralAddress;
        CPubKey pubKeyBasenode;
        CKey keyBasenode;

        std::string errorMessage;
        std::vector<unsigned char> vchBaseNodeSignature;
        std::string strMessage = activeBasenode.vin.ToString() + boost::lexical_cast<std::string>(nVote);

        if(!darkSendSigner.SetKey(strBaseNodePrivKey, errorMessage, keyBasenode, pubKeyBasenode))
            return(" Error upon calling SetKey");

        if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchBaseNodeSignature, keyBasenode))
            return(" Error upon calling SignMessage");

        if(!darkSendSigner.VerifyMessage(pubKeyBasenode, vchBaseNodeSignature, strMessage, errorMessage))
            return(" Error upon calling VerifyMessage");

        //send to all peers
        LOCK(cs_vNodes);
        BOOST_FOREACH(CNode* pnode, vNodes)
            pnode->PushMessage("mvote", activeBasenode.vin, vchBaseNodeSignature, nVote);

    }

    return UniValue::VNULL;
}


text:
#pragma once

#include <list>
#include <vector>
#include "veloslam/veloscan.h"
#include "veloslam/tracker.h"

#include <GL/gl.h>			/* OpenGL header file */
#include <GL/glu.h>			/* OpenGL utilities header file */

#ifdef _MSC_VER
#include <GL/glut.h>
#else
#include <GL/freeglut.h>
#endif

/** for Glut display mode */
#define RGBA 4   ///< colors for GLUT display
#define RGB 3    ///< colors for GLUT display
extern GLenum buffermode_debugView;

extern void StartShow();

void  GetCurrecntdelteMat(Scan& CurrentScan ,  double *deltaMat);

void  DrawText(float x, float y, float z, char * outputstring);
void  DrawTextRGB(float x, float y, float z, float r, float g, float b, char * outputstring);
void  DrawTextRGB(Point P, float r, float g, float b, char * outputstring);

void  Draw_Line_GL_RGB(float x1, float y1, float z1,  float x2, float y2, float z2, float r,float g,float b,float width=1.0);
void  Draw_Line_GL(float x1, float y1, float z1, float x2, float y2, float z2);
void  Draw_Line_GL_RGB(Point P1, Point P2, int width,	float r,float g,float b, bool arrow);

void  Draw_Cube_GL_RGB(float min_x, float min_y, float min_z,
	                                    float max_x, float max_y, float max_z,
										float r,float g,float b);

void  Draw_Inclined_Cube_GL_RGB(double rectangleVexPos[4][2],double min_z,double max_z,
	                                    float r,float g,float b,float width=1.0);

void  DrawPointsRGB(Point p,    float r,     float g,    float b);
void  DrawPoint(Point  p, int size , float r, float g, float b);
void  DrawPoint(Point  p, int size , float r, float g, float b, double deltaMat[16]);

int DrawAll_ScanPoints_Number(vector <Scan *> allScans,  int psize, float r, float g, float b, int n);

void glDumpWindowPPM_debugView(const char *filename, GLenum mode);

static void Reshape(int w, int h);
static void SpecialKey(int key, int x, int y);
static void Draw(void);
int Show(int frameno);


text:
<?php

namespace Symfony\Component\HttpKernel\Bundle;

use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\Console\Application;
use Symfony\Component\Finder\Finder;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;

/**
 * An implementation of BundleInterface that adds a few conventions
 * for DependencyInjection extensions and Console commands.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
abstract class Bundle implements BundleInterface
{
    use ContainerAwareTrait;

    protected $name;
    protected $extension;
    protected $path;
    private $namespace;

    /**
     * Boots the Bundle.
     */
    public function boot()
    {
    }

    /**
     * Shutdowns the Bundle.
     */
    public function shutdown()
    {
    }

    /**
     * Builds the bundle.
     *
     * It is only ever called once when the cache is empty.
     *
     * This method can be overridden to register compilation passes,
     * other extensions, ...
     *
     * @param ContainerBuilder $container A ContainerBuilder instance
     */
    public function build(ContainerBuilder $container)
    {
    }

    /**
     * Returns the bundle's container extension.
     *
     * @return ExtensionInterface|null The container extension
     *
     * @throws \LogicException
     */
    public function getContainerExtension()
    {
        if (null === $this->extension) {
            $extension = $this->createContainerExtension();

            if (null !== $extension) {
                if (!$extension instanceof ExtensionInterface) {
                    throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', get_class($extension)));
                }

                // check naming convention
                $basename = preg_replace('/Bundle$/', '', $this->getName());
                $expectedAlias = Container::underscore($basename);

                if ($expectedAlias != $extension->getAlias()) {
                    throw new \LogicException(sprintf(
                        'Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.',
                        $expectedAlias, $extension->getAlias()
                    ));
                }

                $this->extension = $extension;
            } else {
                $this->extension = false;
            }
        }

        if ($this->extension) {
            return $this->extension;
        }
    }

    /**
     * Gets the Bundle namespace.
     *
     * @return string The Bundle namespace
     */
    public function getNamespace()
    {
        if (null === $this->namespace) {
            $this->parseClassName();
        }

        return $this->namespace;
    }

    /**
     * Gets the Bundle directory path.
     *
     * @return string The Bundle absolute path
     */
    public function getPath()
    {
        if (null === $this->path) {
            $reflected = new \ReflectionObject($this);
            $this->path = dirname($reflected->getFileName());
        }

        return $this->path;
    }

    /**
     * Returns the bundle parent name.
     *
     * @return string|null The Bundle parent name it overrides or null if no parent
     */
    public function getParent()
    {
    }

    /**
     * Returns the bundle name (the class short name).
     *
     * @return string The Bundle name
     */
    final public function getName()
    {
        if (null === $this->name) {
            $this->parseClassName();
        }

        return $this->name;
    }

    /**
     * Finds and registers Commands.
     *
     * Override this method if your bundle commands do not follow the conventions:
     *
     * * Commands are in the 'Command' sub-directory
     * * Commands extend Symfony\Component\Console\Command\Command
     *
     * @param Application $application An Application instance
     */
    public function registerCommands(Application $application)
    {
        if (!is_dir($dir = $this->getPath().'/Command')) {
            return;
        }

        if (!class_exists('Symfony\Component\Finder\Finder')) {
            throw new \RuntimeException('You need the symfony/finder component to register bundle commands.');
        }

        $finder = new Finder();
        $finder->files()->name('*Command.php')->in($dir);

        $prefix = $this->getNamespace().'\\Command';
        foreach ($finder as $file) {
            $ns = $prefix;
            if ($relativePath = $file->getRelativePath()) {
                $ns .= '\\'.str_replace('/', '\\', $relativePath);
            }
            $class = $ns.'\\'.$file->getBasename('.php');
            if ($this->container) {
                $alias = 'console.command.'.strtolower(str_replace('\\', '_', $class));
                if ($this->container->has($alias)) {
                    continue;
                }
            }
            $r = new \ReflectionClass($class);
            if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract() && !$r->getConstructor()->getNumberOfRequiredParameters()) {
                $application->add($r->newInstance());
            }
        }
    }

    /**
     * Returns the bundle's container extension class.
     *
     * @return string
     */
    protected function getContainerExtensionClass()
    {
        $basename = preg_replace('/Bundle$/', '', $this->getName());

        return $this->getNamespace().'\\DependencyInjection\\'.$basename.'Extension';
    }

    /**
     * Creates the bundle's container extension.
     *
     * @return ExtensionInterface|null
     */
    protected function createContainerExtension()
    {
        if (class_exists($class = $this->getContainerExtensionClass())) {
            return new $class();
        }
    }

    private function parseClassName()
    {
        $pos = strrpos(static::class, '\\');
        $this->namespace = false === $pos ? '' : substr(static::class, 0, $pos);
        if (null === $this->name) {
            $this->name = false === $pos ? static::class : substr(static::class, $pos + 1);
        }
    }
}


text:
from qpanel.job import start_process
from multiprocessing import Process
from rq_scheduler.scripts.rqscheduler import main

def start_jobs():
    p = Process(target=start_process)
    p.start()
    start_scheduler()

def start_scheduler():
    p = Process(target=main)
    p.start()

if __name__ == '__main__':
    start_jobs()


text:
ENV?=latest.yml
BASE_COMMAND=docker-compose -f base.yml -f ports.yml -f ${ENV}

start:
	# This is run every time to make sure the environment is up-to-date
	${BASE_COMMAND} build
	${BASE_COMMAND} run beat bash

stop:
	${BASE_COMMAND} stop
	${BASE_COMMAND} rm -f

# Be careful using this command, as it will remove all containers and volumes of your docker-machine
clean:
	docker stop $(shell docker ps -a -q)
	docker rm -v $(shell docker ps -a -q)

# Tails the environment log files
logs:
	${BASE_COMMAND} logs -f


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/rootView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="space.ibrahim.appupdate.MainActivity">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/textView"
        android:text="MAIN"
        android:textAlignment="center" />
</RelativeLayout>


text:
package io.miti.jawbone;

/**
 * This class represents each line of data in the WordNet
 * index files.
 *
 * @author mwallace
 */
public final class IndexTerm implements Comparable<IndexTerm>
{
  /**
   * The word.
   */
  private String lemma = null;

  /**
   * The part of speech.
   */
  private PartOfSpeech partOfSpeech;

  /**
   * Number of synsets that lemma is in. This is the number of
   * senses of the word in WordNet.
   */
  private int synsetCount = 0;

  /**
   * Number of different pointers that lemma has in all synsets
   * containing it.
   */
  private int pointerCount = 0;

  /**
   * The list of pointers that lemma has in all synsets containing it.
   */
  private String[] pointers;

  /**
   * Number of senses of lemma that are ranked according to their
   * frequency of occurrence in semantic concordance texts.
   */
  private int tagSenseCount = 0;

  /**
   * Byte offset in data.pos file of a synset containing lemma.
   * Each synset offset in the list corresponds to a different
   * sense of lemma in WordNet.
   */
  private Synset[] synsets;

  /**
   * Default constructor.
   */
  protected IndexTerm()
  {
    super();
  }

  /**
   * @return Returns the lemma.
   */
  public String getLemma()
  {
    return lemma;
  }

  /**
   * @param sLemma The lemma to set.
   */
  protected void setLemma(final String sLemma)
  {
    // Check if the lemma is null or has no underscores
    if ((sLemma == null) || (sLemma.indexOf('_') < 0))
    {
      lemma = sLemma;
    }
    else
    {
      // Replace each _ with a space
      lemma = sLemma.replace('_', ' ');
    }
  }

  /**
   * @return Returns the part of speech.
   */
  public PartOfSpeech getPartOfSpeech()
  {
    return partOfSpeech;
  }

  /**
   * @param cPartOfSpeech The part of speech to set.
   */
  protected void setPartOfSpeech(final char cPartOfSpeech)
  {
    partOfSpeech = PartOfSpeech.getInstance(cPartOfSpeech);
  }

  /**
   * @return Returns the pointer count.
   */
  public int getPointerCount()
  {
    return pointerCount;
  }

  /**
   * @param nPointerCount The pointer count to set.
   */
  protected void setPointerCount(final int nPointerCount)
  {
    pointerCount = nPointerCount;

    // Check if the count is greater than zero
    if (pointerCount > 0)
    {
      // It is, so allocate the array
      pointers = new String[pointerCount];
    }
  }

  /**
   * @return Returns the pointer symbols.
   */
  public String[] getPointers()
  {
    // Check the array length
    if (pointers == null)
    {
      // It's null or empty so return null
      return null;
    }

    // Make a new array
    String[] data = new String[pointers.length];

    // Copy the array
    System.arraycopy(pointers, 0, data, 0, pointers.length);

    // Return the copy
    return data;
  }

  /**
   * Sets the pointer symbol in the specified location
   * in the array.
   *
   * @param index the index to store the symbol in the array
   * @param sPointerSymbol The pointer symbols to set
   */
  protected void setPointerSymbol(final int index,
                                  final String sPointerSymbol)
  {
    pointers[index] = sPointerSymbol;
  }

  /**
   * @return Returns the synset count.
   */
  public int getSynsetCount()
  {
    return synsetCount;
  }

  /**
   * @param nSynsetCount The synset count to set.
   */
  protected void setSynsetCount(final int nSynsetCount)
  {
    synsetCount = nSynsetCount;

    // Check if the count is greater than zero
    if (synsetCount > 0)
    {
      // It is, so allocate the array
      synsets = new Synset[synsetCount];
    }
  }

  /**
   * @return Returns the synsets.
   */
  public Synset[] getSynsets()
  {
    // Check the array length
    if (synsets == null)
    {
      // It's null or empty so return null
      return null;
    }

    // Make a new array
    Synset[] data = new Synset[synsets.length];

    // Copy the array
    System.arraycopy(synsets, 0, data, 0, synsets.length);

    // Return the copy
    return data;
  }

  /**
   * Sets the synset offset in the specified location
   * in the array.
   *
   * @param index the index to store the offset in the array
   * @param lSynsetOffset The synset offset to set
   */
  protected void setSynsetOffset(final int index,
                              final long lSynsetOffset)
  {
    synsets[index] = new Synset(lSynsetOffset, partOfSpeech);
  }

  /**
   * @return Returns the tag sense count.
   */
  public int getTagSenseCount()
  {
    return tagSenseCount;
  }

  /**
   * @param nTagSenseCount The tag sense count to set.
   */
  protected void setTagSenseCount(final int nTagSenseCount)
  {
    tagSenseCount = nTagSenseCount;
  }

  /**
   * @see java.lang.Object#finalize()
   * @throws Throwable an exception for the parent's finalize
   */
  @Override
  protected void finalize() throws Throwable
  {
    // Call the parent's method first
    super.finalize();

    // Clear the stored data
    lemma = null;
    pointers = null;
    synsets = null;
  }

  /**
   * @see java.lang.Object#toString()
   * @return a string representation of this object
   */
  @Override
  public String toString()
  {
    // Declare the string buffer to hold the output
    StringBuffer buf = new StringBuffer(150);

    // Build the string
    buf.append("Lemma: ").append(lemma)
       .append("  POS: ").append(partOfSpeech)
       .append("  Tag-Sense-Count: ").append(tagSenseCount);

    // Add the list of synset offsets
    buf.append("\nList of Synsets (").append(synsetCount)
       .append(")");
    for (int index = 0; index < synsetCount; ++index)
    {
      buf.append("\n  #").append(index + 1).append(": ")
         .append(Long.toString(synsets[index].getSynsetOffset()));
    }

    // Add the list of pointer symbols
    buf.append("\nList of Pointers (").append(pointerCount)
       .append(")");
    for (int index = 0; index < pointerCount; ++index)
    {
      buf.append("\n  #").append(index + 1).append(": ")
         .append(pointers[index]).append(" (")
         .append(Pointer.getPointerDescription(partOfSpeech, pointers[index]))
         .append(")");
    }

    // Return the string
    return buf.toString();
  }

  /**
   * Implemented method for the Comparable interface.
   *
   * @param obj the obj to compare this to
   * @return the result of the comparison
   */
  public int compareTo(final IndexTerm obj)
  {
    // Check the input
    if (obj == null)
    {
      return -1;
    }

    // Save the lemma from the argument
    String lemma2 = obj.getLemma();

    // Check for nullness
    if ((lemma == null) && (lemma2 == null))
    {
      return 0;
    }
    else if (lemma == null)
    {
      return 1;
    }
    else if (lemma2 == null)
    {
      return -1;
    }

    // Return the comparison value
    return (lemma.compareTo(lemma2));
  }
}


text:
ActiveRecord::Schema.define(version: 20150325130246) do

  # These are extensions that must be enabled in order to support this database
  enable_extension "plpgsql"

  create_table "entries", force: :cascade do |t|
    t.integer  "mylist_id",    null: false
    t.integer  "video_id",     null: false
    t.integer  "item_type",    null: false
    t.integer  "item_id",      null: false, comment: "Use for accessing the mylist API."
    t.datetime "created_time", null: false
    t.datetime "updated_time", null: false
    t.text     "description"
  end

  add_index "entries", ["mylist_id", "video_id"], name: "index_entries_on_mylist_id_and_video_id", unique: true, using: :btree

  create_table "mylists", force: :cascade do |t|
    t.integer  "user_id",                      null: false
    t.integer  "group_id"
    t.string   "name"
    t.boolean  "is_public",    default: false, null: false
    t.integer  "sort_order",   default: 1,     null: false
    t.datetime "created_time"
    t.datetime "updated_time"
    t.text     "description"
  end

  add_index "mylists", ["group_id"], name: "index_mylists_on_group_id", unique: true, using: :btree

  create_table "sessions", force: :cascade do |t|
    t.integer "user_id",   null: false
    t.string  "cookie",    null: false
    t.string  "api_token", null: false
  end

  add_index "sessions", ["user_id"], name: "index_sessions_on_user_id", unique: true, using: :btree

  create_table "taggings", force: :cascade do |t|
    t.integer  "tag_id"
    t.integer  "taggable_id"
    t.string   "taggable_type"
    t.integer  "tagger_id"
    t.string   "tagger_type"
    t.string   "context",       limit: 128
    t.datetime "created_at"
  end

  add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true, using: :btree
  add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree

  create_table "tags", force: :cascade do |t|
    t.string  "name"
    t.integer "taggings_count", default: 0
  end

  add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree

  create_table "users", force: :cascade do |t|
    t.integer "niconico_id", null: false
    t.string  "nickname"
    t.string  "avatar"
  end

  add_index "users", ["niconico_id"], name: "index_users_on_niconico_id", unique: true, using: :btree

  create_table "videos", force: :cascade do |t|
    t.string   "video_id",                       null: false
    t.string   "title"
    t.string   "thumbnail_url"
    t.string   "group_type",                     null: false
    t.string   "watch_id",                       null: false, comment: "Use for creating video url, such as \"http://www.nicovideo.jp/watch/{watch_id}\"."
    t.boolean  "is_deleting",    default: false, null: false
    t.datetime "created_time",                   null: false
    t.datetime "updated_time",                   null: false
    t.integer  "play_count",     default: 0,     null: false
    t.integer  "mylist_count",   default: 0,     null: false
    t.integer  "comment_count",  default: 0,     null: false
    t.integer  "seconds"
    t.text     "latest_comment"
    t.string   "description"
  end

  add_index "videos", ["video_id"], name: "index_videos_on_video_id", unique: true, using: :btree

  add_foreign_key "entries", "mylists"
  add_foreign_key "entries", "videos"
  add_foreign_key "mylists", "users"
end


text:
/**
 * -----------------------------------------------------------
 * Project : ZUI-Resize UI Module (Javascript + jquery Module)
 * Version : ZUI-Resize v1.0.0
 * Creator : Deshineplus / SSC.Developer
 * update  : 2017.10.23
 * License : MIT
 * -----------------------------------------------------------
 * */

(function(window, $){
    "use strict";

    var _zui_resize, _zui_module_key = "ZUI-RESIZE-KEY";
    var checkJqueryModule = function(){
        if(!$ && !jQuery){
            alert("Sorry! The jquery module is required.");
            return false;
        }
    };

    /** ZUI-Module Common Utility Object Module */
    var _zui_utility = {

    };

    /** ZUI-Module Start Basic Object Module */
    _zui_resize = function(){

    };

    /** ZUI-Module Start Prototype Object Module */
    _zui_resize.prototype = {

    };

    /** ZUI-Module Publishing Start Module to jQuery Function Module */
    $.ZUIResize = function(options){

    };

    checkJqueryModule();
}(window, jQuery));