text:
<!DOCTYPE html>

  <meta charset="UTF-8">

  <title>CodePen - A Pen by  INDIA</title>

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

  <title>India's Notes</title>
<link rel="stylesheet" href="css/style.css">

Table of Contents

Lesson 1: The Basics of the Web and HTML

How the Web Works

Browser

HTTP

Server

HTML

Tags & Elements

Attributes

Lesson 2: Creating a Structured Document with HTML

Document Object Model (DOM)

Boxes

Text Editor

Lesson 3: Adding CSS Style to HTML Structure

CSS

Repetition

Lesson 1: The Basics of the Web & HTML

      How the Web Works

The world wide web is a collection of Html documents accessed via the internet. When a person accesses a web  browser such as internet explorer or firefox to access a webpage i.e yahoo.com, their computer sends a HTTP request to a server. The server then delivers the web page to the web browser via the Internet. This HTML document is then displayed on the user's computer.

    Browser

A browser is known as a computer program used to find a view information on the Internet

    HTTP

"Hypertext Transfer Protocol" better known as HTTP, is the main protocol of the web.  The browser uses Http to communicate with the servers.

    Server

      A Server is like a little apartment housing all the webpages.  The server interprets the Html tags and sends them back as a webpage to our browser.

    HTML

"Hyper Text Markup Language" better known as HTML, is the basis for almost every webpage

    Tags & Elements

Tags are always contained within an angled bracket. An element is everything within a set of opening and closing tags. Html elements are either inline or block.  Block just means there is an invisible box around the content.The invisible block can be a certain height and width

    Attributes

Attributes are anchors used for referencing hyper links

Lesson 2: Creating a Structured Document w/ HTML

      Document Object Model (DOM)

 Document Object Model is referred to a tree-like structure of a page.  Viewing this structure in a browser, it will show as a series of nested boxes.

      Boxes

Everything on a webpage is in a box.  There are also boxes within boxes.  The more indented an element is, the deeper the nest box.

      Text Editor

Writing a code can be difficult.  Text editing programs like Sublime Text to assist in code writing. Sublime Text will automatically generate a closing HTML tag when you input an opening tag.

Lesson 3: CSS

        CSS

Cascading Style Sheets - style sheet language used for describing the look and formatting of a document written in a markup language.

        Repetition

Repetition is one of the main things you have to look out for.  People have a tendency to make mistakes and not be consistant.


text:
using System;
using ConsoleUI;
using System.Threading;

namespace ConsoleUITester
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            Console.Title = "ConsoleUI";
            CUI.SetArea(10, 5, 50, 10);

            Thread.Sleep(500);

            CUI.LineStyle = LineStyle.Thick;
            CUI.DrawAreaBorder();
            CUI.SetJustification(Justification.Center);
            CUI.DrawString("Label");
            CUI.MoveCursorDown();
            CUI.LineStyle = LineStyle.Normal;
            CUI.DrawHorizontalDivider();
            CUI.SetJustification(Justification.Left);
            CUI.MoveCursorDown();
            CUI.DrawList(new[] {"a", "b", "c"});
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
declare namespace Jymfony.Component.Security.Event {
    import TokenInterface = Jymfony.Component.Security.Authentication.Token.TokenInterface;
    import AuthenticationException = Jymfony.Component.Security.Exception.AuthenticationException;

    /**
     * Dispatched on authentication failure.
     */
    export class AuthenticationFailureEvent extends AuthenticationEvent {
        private _exception: AuthenticationException;

        /**
         * Constructor.
         */
        // @ts-ignore
        __construct(token: TokenInterface, exception: AuthenticationException): void;
        constructor(token: TokenInterface, exception: AuthenticationException);

        /**
         * Gets the authentication exception originating this event.
         */
        public readonly authenticationException: AuthenticationException;
    }
}


text:
package org.apache.tomcat.util.http.fileupload;

import java.util.Iterator;

/**
 *
 This class provides support for accessing the headers for a file or form
 * item that was received within a multipart/form-data POST
 * request.

 *
 * @author Michael C. Macaluso
 * @since 1.3
 */
public interface FileItemHeaders {
    /**
     * Returns the value of the specified part header as a String.
     * If the part did not include a header of the specified name, this method
     * return null.  If there are multiple headers with the same
     * name, this method returns the first header in the item.  The header
     * name is case insensitive.
     *
     * @param name a String specifying the header name
     * @return a String containing the value of the requested
     *         header, or null if the item does not have a header
     *         of that name
     */
    String getHeader(String name);

    /**
     *

     * Returns all the values of the specified item header as an
     * Enumeration of String objects.
     *

     *

     * If the item did not include any headers of the specified name, this
     * method returns an empty Enumeration. The header name is
     * case insensitive.
     *

     *
     * @param name a String specifying the header name
     * @return an Enumeration containing the values of the
     *         requested header. If the item does not have any headers of
     *         that name, return an empty Enumeration
     */
    Iterator<String> getHeaders(String name);

    /**
     *

     * Returns an Enumeration of all the header names.
     *

     *

     * If the item did not include any headers of the specified name, this
     * method returns an empty Enumeration. The header name is
     * case insensitive.
     *

     *
     * @return an Enumeration containing the values of the
     *         requested header. If the item does not have any headers of
     *         that name return an empty Enumeration
     */
    Iterator<String> getHeaderNames();
}


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>opennlp.tools.cmdline.entitylinker (Apache OpenNLP Tools 1.6.0 API)</title>
<meta name="date" content="2015-06-16">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

opennlp.tools.cmdline.entitylinker

Classes

EntityLinkerTool


text:
using System;

namespace CSharpFunctionalExtensions
{
    public static partial class ResultExtensions
    {
        /// <summary>
        ///     Executes the given action if the calling result is a failure. Returns the calling result.
        /// </summary>
        public static Result<T, E> TapError<T, E>(this Result<T, E> result, Action action)
        {
            if (result.IsFailure)
            {
                action();
            }

            return result;
        }

        /// <summary>
        ///     Executes the given action if the calling result is a failure. Returns the calling result.
        /// </summary>
        public static Result<T> TapError<T>(this Result<T> result, Action action)
        {
            if (result.IsFailure)
            {
                action();
            }

            return result;
        }

        /// <summary>
        ///     Executes the given action if the calling result is a failure. Returns the calling result.
        /// </summary>
        public static Result TapError(this Result result, Action action)
        {
            if (result.IsFailure)
            {
                action();
            }

            return result;
        }

        /// <summary>
        ///     Executes the given action if the calling result is a failure. Returns the calling result.
        /// </summary>
        public static UnitResult<E> TapError<E>(this UnitResult<E> result, Action<E> action)
        {
            if (result.IsFailure)
            {
                action(result.Error);
            }

            return result;
        }

        /// <summary>
        ///     Executes the given action if the calling result is a failure. Returns the calling result.
        /// </summary>
        public static UnitResult<E> TapError<E>(this UnitResult<E> result, Action action)
        {
            if (result.IsFailure)
            {
                action();
            }

            return result;
        }

        /// <summary>
        ///     Executes the given action if the calling result is a failure. Returns the calling result.
        /// </summary>
        public static Result<T, E> TapError<T, E>(this Result<T, E> result, Action<E> action)
        {
            if (result.IsFailure)
            {
                action(result.Error);
            }

            return result;
        }

        /// <summary>
        ///     Executes the given action if the calling result is a failure. Returns the calling result.
        /// </summary>
        public static Result<T> TapError<T>(this Result<T> result, Action<string> action)
        {
            if (result.IsFailure)
            {
                action(result.Error);
            }

            return result;
        }

        /// <summary>
        ///     Executes the given action if the calling result is a failure. Returns the calling result.
        /// </summary>
        public static Result TapError(this Result result, Action<string> action)
        {
            if (result.IsFailure)
            {
                action(result.Error);
            }

            return result;
        }
    }
}


text:
package models;

import java.lang.Runnable;

import com.fasterxml.jackson.databind.JsonNode;

import com.mongodb.client.*;
import org.bson.Document;
import static com.mongodb.client.model.Filters.*;

public class SessionWriter implements Runnable {

  private final User user;

  public SessionWriter(User user) {
    this.user = user;
  }

  public void run() {
    MongoConnection mc = new MongoConnection("db.properties");
    MongoCollection<Document> collection = mc.getCollection();
    Document userDoc = user.getDocument();
    String key = "email";

    if(collection.findOneAndReplace(eq(key, userDoc.get(key)), userDoc) == null) {
      System.out.println("not found");
    }
    mc.close();
  }
}


text:
layout: component-detail
group: components
permalink: /components/tags.html
level: "2"

title: Tags
description: Uma informação ou conteúdo precisa ser categorizado para facilitar a visualização e entendimento do usuário

variations:
- title: Tags
  styleModifier: c-tags
  includeClassification: components
  includeCategory: 02-blocks
  includeName: card
  includeEg: tags
---

### Quando usar
- Quando informações precisam ser diferenciadas de forma fácil e rápida
- Quando é preciso filtrar algum tipo de informação

### Quando não usar
- Não utilize as tags como forma de destacar uma informação. Caso seja necessário, recomenda-se modificar a cor do texto.
- Evite utilizar tags em sequências muito longas, como em uma lista, por exemplo. O excesso de tags e cores pode dificultar a leitura e a comparação de várias informações.
- Evite utilizar tags de mesmas cores para conteúdos diferentes. Isso pode confundir o usuário.


text:
'''

@author: rtermondt
'''
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.template import Context
from django.template import RequestContext
from django.template.loader import get_template
from django.db import IntegrityError
from django.db import transaction
from manager.forms import SubjectAddForm, MessageAddForm
from manager.dao import initiative_dao
from manager.dao import subject_dao
from manager.models import Profile_Invite, Invitation, Promotion, Profile
from manager.utils import queue_email
from manager.constants import USER_INVITE_SUBJECT, USER_INVITE_EVENT
from manager.forms import UserInviteForm
import uuid
from datetime import datetime

#from manager import utils
#from datetime import datetime

@login_required()
def collaboration(request):
    system_message = None
    return render_to_response('collaboration.html', {
                              'system_message': system_message
                              }, context_instance=RequestContext(request))

@login_required()
def subject_add(request, initiative_uuid=None):
    system_message = None
    profile_id = request.session['profile_id']
    if request.POST:
        form = SubjectAddForm(request.POST)
        if form.is_valid() == False:
            system_message = 'Error!'
        else:
            if 'initiative_uuid' in request.POST:
                uuid = request.POST['initiative_uuid']
                if uuid != "":
                    initiative_id = initiative_dao.get_pulic_intitiative_id(
                        uuid)
                    # defensive check - make sure submitter id contributor
                    contrib_init = initiative_dao.all_contributing_initiative_ids(
                        profile_id)
                    can_create_subject = False
                    for init_id in contrib_init:
                        if init_id == int(initiative_id):
                            can_create_subject = True
                            break
                    if not can_create_subject:
                        system_message = 'Error! You must be Initiative contributor or sponsor to create subject.'
                    else:
                        short_desc = form.cleaned_data['short_desc']
                        long_desc = form.cleaned_data['long_desc']
                        subject_dao.subject_create(
                            initiative_id,
                            profile_id,
                            short_desc,
                            long_desc,
                            True)
                        system_message = "Subject successfully created."
                        form = SubjectAddForm()
                else:
                    system_message = 'Error! Initiative is required.'
            else:
                system_message = 'Error! Initiative missing'
    else:
        form = SubjectAddForm()

    if initiative_uuid is None:
        #initiatives = initiative_dao.initiative_list_by_profile_id(profile_id)
        initiatives = initiative_dao.all_contributing_initiatives(profile_id)

    else:
        initiatives = None

    return render_to_response('subject_add.html', {
                              'system_message': system_message,
                              'form': form,
                              'initiatives': initiatives,
                              'initiative_uuid': initiative_uuid
                              }, context_instance=RequestContext(request))

@login_required()
def subject_list(request):
    system_message = None
    profile_id = request.session['profile_id']
    subjects = subject_dao.subjects_by_initiative(profile_id)
    return render_to_response('subject_list.html', {
                              'system_message': system_message,
                              'subjects': subjects
                              }, context_instance=RequestContext(request))

@login_required()
def subject_messages(request, subject_id=None):
    system_message = None
    if request.POST:
        form = MessageAddForm(request.POST)
        if form.is_valid() == False:
            system_message = 'Error!'
        else:
            comment = form.cleaned_data['comment']
            profile_id = request.session['profile_id']
            subject_id = request.POST['subject_id']
            subject_dao.message_create(subject_id, profile_id, comment)
            form = MessageAddForm()
    else:
        form = MessageAddForm()
    #lastUpdate = datetime.now()
    #newDT = lastUpdate.strftime('%B %d, %Y, %I:%M %p')
    messages = subject_dao.subject_messages(subject_id)
    subject = subject_dao.subject_by_id(subject_id)
    return render_to_response('subject_messages.html', {
                              'system_message': system_message,
                              'messages': messages,
                              'form': form,
                              'subject': subject,
                              #'last_update': newDT
                              }, context_instance=RequestContext(request))

@login_required()
def invite(request):
    system_message = None
    profile_id = request.session['profile_id']
    max_invitations = 5
    existing_invites = Profile_Invite.objects.filter(profile_id=profile_id)
    invites_remaining = max_invitations - existing_invites.count()

    if invites_remaining <= 0:
        system_message = "You have used all invites."
    else:
        if request.POST:
            post_form = UserInviteForm(request.POST)
            if post_form.is_valid():
                email = request.POST['email']
                message = request.POST['message']
                uid = uuid.uuid4()
                promotion = 'USER'
                p = Promotion.objects.get(code=promotion)
                promotion_id = p.pk
                p = Profile.objects.get(pk=profile_id)

                try:
                    with transaction.commit_on_success():
                        new_invite = Invitation.objects.create(
                            email=email,
                            signup_key=uid,
                            promotion_id=promotion_id,
                            approved_date=datetime.now())
                        Profile_Invite.objects.create(
                            profile_id=profile_id,
                            invitation_id=new_invite.pk,
                            message=message)
                        plaintext = get_template(
                            'email/create_profile_invite.txt')
                        d = Context({'uid': new_invite.signup_key,
                                     'message': message,
                                     'first_name': p.first_name,
                                     'last_name': p.last_name})
                        text_content = plaintext.render(d)
                        queue_email(
                            USER_INVITE_SUBJECT,
                            text_content,
                            new_invite.email,
                            USER_INVITE_EVENT)
                        system_message = 'Invitation successfully created!'
                        invites_remaining = invites_remaining - 1
                except IntegrityError:
                    system_message = "Email already exists."
            else:
                system_message = "Form validation error."

    form = UserInviteForm()
    return render_to_response('collaboration_invite.html', {
                              'system_message': system_message,
                              'max_invitations': max_invitations,
                              'invites_remaining': invites_remaining,
                              'form': form
                              }, context_instance=RequestContext(request))


text:
package com.baidu.oped.apm.profiler.monitor.metric;

import com.baidu.oped.apm.common.HistogramSchema;
import com.baidu.oped.apm.common.HistogramSlot;
import com.baidu.oped.apm.common.ServiceType;
import com.baidu.oped.apm.common.SlotType;
import com.baidu.oped.apm.profiler.util.jdk.LongAdder;

/**
 * @author emeroad
 */
public class LongAdderHistogram implements Histogram {
    // We could use LongAdder only for fastCounter and AtomicLong for the others.
    private final LongAdder fastCounter = new LongAdder();
    private final LongAdder normalCounter = new LongAdder();
    private final LongAdder slowCounter = new LongAdder();
    private final LongAdder verySlowCounter = new LongAdder();

    private final LongAdder errorCounter = new LongAdder();

    private final short serviceType;
    private final HistogramSchema histogramSchema;

    public LongAdderHistogram(ServiceType serviceType) {
        this(serviceType.getCode(), serviceType.getHistogramSchema());
    }

    public LongAdderHistogram(short serviceType, HistogramSchema histogramSchema) {
        this.serviceType = serviceType;
        this.histogramSchema = histogramSchema;
    }

    public short getServiceType() {
        return serviceType;
    }

    public void addResponseTime(int millis) {
        final HistogramSlot histogramSlot = histogramSchema.findHistogramSlot(millis);
        final SlotType slotType = histogramSlot.getSlotType();
        switch (slotType) {
            case FAST:
                fastCounter.increment();
                return;
            case NORMAL:
                normalCounter.increment();
                return;
            case SLOW:
                slowCounter.increment();
                return;
            case VERY_SLOW:
                verySlowCounter.increment();
                return;
            case ERROR:
                errorCounter.increment();
                return;
            default:
                throw new IllegalArgumentException("slot Type notFound:" + slotType);
        }
    }

    public HistogramSnapshot createSnapshot() {
        long fast = fastCounter.sum();
        long normal = normalCounter.sum();
        long slow = slowCounter.sum();
        long verySlow = verySlowCounter.sum();
        long error = errorCounter.sum();

        return new HistogramSnapshot(this.serviceType, fast, normal, slow, verySlow, error);
    }

    @Override
    public String toString() {
        return "LongAdderHistogram{" +
                "fastCounter=" + fastCounter +
                ", normalCounter=" + normalCounter +
                ", slowCounter=" + slowCounter +
                ", verySlowCounter=" + verySlowCounter +
                ", errorCounter=" + errorCounter +
                ", serviceType=" + serviceType +
                '}';
    }
}


text:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _graphql = require("../graphql");

var _ = require("..");

_.schemaComposer.getOrCreateOTC('User', tc => tc.addFields({
  name: {
    type: _graphql.GraphQLString
  },
  nickname: {
    type: _graphql.GraphQLString
  },
  age: {
    type: _graphql.GraphQLInt
  }
}));

var _default = _.schemaComposer;
exports.default = _default;


text:
import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import {Button} from 'react-toolbox/lib/button'
import { actions as counterActions } from '../../redux/modules/counter'
import classes from './HomeView.scss'

// We define mapStateToProps where we'd normally use
// the @connect decorator so the data requirements are clear upfront, but then
// export the decorated component after the main class definition so
// the component can be tested w/ and w/o being connected.
// See: http://rackt.github.io/redux/docs/recipes/WritingTests.html
const mapStateToProps = (state) => ({
  counter: state.counter
})
export class HomeView extends Component {
  static propTypes = {
    counter: PropTypes.number.isRequired,
    doubleAsync: PropTypes.func.isRequired,
    increment: PropTypes.func.isRequired
  };

  render () {
    return (

Welcome to the React Redux Starter Kit

          Sample Counter:
          {' '}
          {this.props.counter}

        <Button raised accent onClick={() => this.props.increment(1)} label='Increment' />
        {' '}
        <Button raised primary label='Double (Async)' onClick={this.props.doubleAsync}/>

        <Link to='/404'>Go to 404 Page</Link>

    )
  }
}

export default connect(mapStateToProps, counterActions)(HomeView)


text:
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <iostream>
#include <fstream>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <linux/videodev2.h>
#include  <sys/mman.h>
#include <v4l2_wrapper.h>

#include "common/log.h"
#include "common/utils.h"
#include "encodehelp.h"
#include "encodeinput.h"

static enum v4l2_memory inputMemoryType = V4L2_MEMORY_USERPTR;
const static enum v4l2_memory outputMemoryType = V4L2_MEMORY_MMAP;

uint32_t inputFramePlaneCount = 3; // I420(default) format has 3 planes
uint32_t inputFrameSize = 0;

const uint32_t kMaxFrameQueueLength = 8;
uint32_t inputQueueCapacity = 0;
uint32_t outputQueueCapacity = 0;
VideoFrameRawData inputFrames[kMaxFrameQueueLength];
uint8_t *outputFrames[kMaxFrameQueueLength];
bool isReadEOS = false;
bool isEncodeEOS = false;
bool isOutputEOS = false;

static EncodeInput* streamInput;

bool readOneFrameData(uint32_t index)
{
    static int encodeFrameCount = 0;

    if (!streamInput)
        return false;
    if (isReadEOS)
        return false;

    ASSERT(index<inputQueueCapacity);

    bool ret = streamInput->getOneFrameInput(inputFrames[index]);
    if (!ret || (frameCount && encodeFrameCount++>=frameCount)) {
        isReadEOS = true;
        return false;
    }

    return ret;
}

void fillV4L2InputBuffer(struct v4l2_buffer& buf, const VideoFrameRawData& frame)
{
    if (inputMemoryType == V4L2_MEMORY_USERPTR) {
        uint32_t width[3];
        uint32_t height[3];
        uint32_t planes;
        bool ret;

        ret = getPlaneResolution(frame.fourcc, frame.width, frame.height, width, height, planes);
        ASSERT(ret && "get planes resolution failed");
        unsigned long data = (unsigned long)frame.handle;
        for (uint32_t i = 0; i < planes; i++) {
            buf.m.planes[i].bytesused = width[i] * height[i];
            buf.m.planes[i].m.userptr = data + frame.offset[i];
        }
    }
#if ANDROID
    else if (inputMemoryType == V4L2_MEMORY_ANDROID_BUFFER_HANDLE) {
        // !!! FIXME, v4l2 use long for userptr. so bad
        DEBUG("ANativeWindowBuffer->handle: %p", (void*)frame.handle);
        buf.m.planes[0].m.userptr = (long)((intptr_t)frame.handle);
        buf.m.planes[0].bytesused = sizeof(buf.m.planes[0].m.userptr);
    }
#endif
    else
        ASSERT(0 && "unknown memory type");
}

bool feedOneInputFrame(int fd, int index = -1 /* if index is not -1, simple enque it*/)
{
    struct v4l2_buffer buf;
    struct v4l2_plane planes[VIDEO_MAX_PLANES];
    int ioctlRet = -1;
    static uint32_t dqCountAfterEOS = 0;

    memset(&buf, 0, sizeof(buf));
    memset(planes, 0, sizeof(planes));
    buf.m.planes = planes;
    buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; // it indicates input buffer(raw frame) type
    buf.memory = inputMemoryType;
    buf.length = inputFramePlaneCount;

    if (index == -1) {
        ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_DQBUF, &buf);
        if (ioctlRet == -1)
            return false;
        // recycle camera buffer
        bool ret = streamInput->recycleOneFrameInput(inputFrames[buf.index]);
        ASSERT(ret);
    } else {
        buf.index = index;
    }

    if (isReadEOS) {
        dqCountAfterEOS++;
        if (dqCountAfterEOS == inputQueueCapacity)
            isEncodeEOS = true;
        return false;
    }
    if (!readOneFrameData(buf.index)) {
        ASSERT(isReadEOS);
    }

    if (isReadEOS) {
        // send EOS to device
        buf.m.planes[0].m.userptr = buf.m.planes[1].m.userptr = buf.m.planes[2].m.userptr = 0;
        buf.m.planes[0].bytesused = buf.m.planes[1].bytesused = buf.m.planes[2].bytesused = 0;
    } else {
        fillV4L2InputBuffer(buf, inputFrames[buf.index]);
    }

    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_QBUF, &buf);
    ASSERT(ioctlRet != -1);

    return true;
}

bool writeOneOutputFrame(uint8_t* data, uint32_t dataSize)
{
    static std::ofstream m_ofs;

    if(!m_ofs.is_open()) {
        m_ofs.open(outputFileName, std::ofstream::out | std::ofstream::trunc);
        if (!m_ofs) {
            fprintf(stderr, "fail to open file: %s\n", outputFileName);
            return false;
        }
    }

    if(!m_ofs.write(reinterpret_cast<const char*>(data), dataSize).good()) {
        ASSERT(0);
        return false;
    }

    if(isOutputEOS)
        m_ofs.close();

    return true;

}

bool takeOneOutputFrame(int fd, int index = -1/* if index is not -1, simple enque it*/)
{
    struct v4l2_buffer buf;
    struct v4l2_plane planes[1];
    int ioctlRet = -1;

    memset(&buf, 0, sizeof(buf));
    memset(planes, 0, sizeof(planes));
    buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; //it indicates output buffer type
    buf.memory = outputMemoryType; // chromeos v4l2vea uses this mode only
    buf.m.planes = planes;
    buf.length = 1;

    if (index == -1) {
        ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_DQBUF, &buf);

        if (isEncodeEOS) {
            if (ioctlRet == -1) {
                isOutputEOS = true;
                YamiV4L2_SetDevicePollInterrupt(fd);
                return true;
            }
        }
        if (ioctlRet == -1)
            return false;

        if (!writeOneOutputFrame(outputFrames[buf.index], buf.bytesused)) {
            ASSERT(0);
            return false;
        }
    } else {
        buf.index = index;
    }

    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_QBUF, &buf);
    ASSERT(ioctlRet != -1);

    return true;
}

int main(int argc, char** argv)
{
    int32_t fd = -1;
    uint32_t i = 0;
    int32_t ioctlRet = -1;

    // parse command line parameters
    if (!process_cmdline(argc, argv))
        return -1;

#if ANDROID
    if (!inputFileName) {
        inputMemoryType = (enum v4l2_memory)V4L2_MEMORY_ANDROID_BUFFER_HANDLE;
        inputFourcc = VA_FOURCC_NV12;
    }
#endif
    streamInput = EncodeInput::create(inputFileName, inputFourcc, videoWidth, videoHeight);
    ASSERT(streamInput);

    // open device
    fd = YamiV4L2_Open("encoder", 0);
    ASSERT(fd!=-1);

    // query hw capability
    struct v4l2_capability caps;
    memset(&caps, 0, sizeof(caps));
    caps.capabilities = V4L2_CAP_VIDEO_CAPTURE_MPLANE | V4L2_CAP_VIDEO_OUTPUT_MPLANE | V4L2_CAP_STREAMING;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_QUERYCAP, &caps);
    ASSERT(ioctlRet != -1);

    // set input/output data format
    struct v4l2_format format;
    memset(&format, 0, sizeof(format));
    format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
    format.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_H264;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_S_FMT, &format);
    ASSERT(ioctlRet != -1);

    memset(&format, 0, sizeof(format));
    format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
    DEBUG_FOURCC("inputFourcc", inputFourcc);
    switch (inputFourcc) {
    case VA_FOURCC_YV12:
    case VA_FOURCC('I', '4', '2', '0'):
        format.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_YUV420M;
        inputFramePlaneCount = 3;
        inputFrameSize = videoWidth*videoHeight*3/2;
        break;
    case VA_FOURCC_NV12:
        format.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12;
        inputFramePlaneCount = 2;
        inputFrameSize = videoWidth*videoHeight*3/2;
        break;
    case VA_FOURCC_YUY2:
        format.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_YUYV;
        inputFramePlaneCount = 1;
        inputFrameSize = videoWidth*videoHeight*2;
        break;
    default:
        ASSERT(0);
        break;
    }
    format.fmt.pix_mp.width = videoWidth;
    format.fmt.pix_mp.height = videoHeight;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_S_FMT, &format);
    ASSERT(ioctlRet != -1);

    // set input buffer type
    {
    VideoDataMemoryType memoryType = VIDEO_DATA_MEMORY_TYPE_RAW_POINTER;
#if ANDROID
    if (inputMemoryType == V4L2_MEMORY_ANDROID_BUFFER_HANDLE)
        memoryType = VIDEO_DATA_MEMORY_TYPE_ANDROID_BUFFER_HANDLE;
#endif
    YamiV4L2_FrameMemoryType(fd, memoryType);
    }

    // set framerate
    struct v4l2_streamparm parms;
    memset(&parms, 0, sizeof(parms));
    parms.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
    parms.parm.output.timeperframe.denominator = 1;
    parms.parm.output.timeperframe.numerator = fps;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_S_PARM, &parms);
    ASSERT(ioctlRet != -1);

    // set bitrate
    struct v4l2_ext_control ctrls[1];
    struct v4l2_ext_controls control;
    memset(&ctrls, 0, sizeof(ctrls));
    memset(&control, 0, sizeof(control));
    ctrls[0].id = V4L2_CID_MPEG_VIDEO_BITRATE;
    ctrls[0].value = bitRate;
    control.ctrl_class = V4L2_CTRL_CLASS_MPEG;
    control.count = 1;
    control.controls = ctrls;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_S_EXT_CTRLS, &control);
    ASSERT(ioctlRet != -1);

    // other controls
    memset(&ctrls, 0, sizeof(ctrls));
    memset(&control, 0, sizeof(control));
    // No B-frames, for lowest decoding latency.
    ctrls[0].id = V4L2_CID_MPEG_VIDEO_B_FRAMES;
    ctrls[0].value = 0;
    control.ctrl_class = V4L2_CTRL_CLASS_MPEG;
    control.count = 1;
    control.controls = ctrls;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_S_EXT_CTRLS, &control);
    ASSERT(ioctlRet != -1);

    // start
    __u32 type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_STREAMON, &type);
    ASSERT(ioctlRet != -1);
    type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_STREAMON, &type);
    ASSERT(ioctlRet != -1);

    // setup input buffers
    struct v4l2_requestbuffers reqbufs;
    memset(&reqbufs, 0, sizeof(reqbufs));
    reqbufs.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
    reqbufs.memory = inputMemoryType;
    reqbufs.count = 2;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_REQBUFS, &reqbufs);
    ASSERT(ioctlRet != -1);
    ASSERT(reqbufs.count>0 && reqbufs.count <= kMaxFrameQueueLength);
    inputQueueCapacity = reqbufs.count;

    if (inputMemoryType == V4L2_MEMORY_USERPTR)
    {
        for (i = 0; i < inputQueueCapacity; i++) {
            inputFrames[i].handle = reinterpret_cast<intptr_t>(malloc(inputFrameSize));
        }
        for (i = inputQueueCapacity; i < kMaxFrameQueueLength; i++)
            inputFrames[i].handle = 0;
    }

    // setup output buffers
    memset(&reqbufs, 0, sizeof(reqbufs));
    reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
    reqbufs.memory = outputMemoryType;
    reqbufs.count = 2;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_REQBUFS, &reqbufs);
    ASSERT(ioctlRet != -1);
    ASSERT(reqbufs.count>0 && reqbufs.count <= kMaxFrameQueueLength);
    outputQueueCapacity = reqbufs.count;

    for (i=0; i<outputQueueCapacity; i++) {
        struct v4l2_plane planes[1];
        struct v4l2_buffer buffer;
        memset(&buffer, 0, sizeof(buffer));
        memset(planes, 0, sizeof(planes));
        buffer.index = i;
        buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
        buffer.memory = outputMemoryType;
        buffer.m.planes = planes;
        buffer.length = 1;
        ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_QUERYBUF, &buffer);
        ASSERT(ioctlRet != -1);
        void* address = YamiV4L2_Mmap(NULL,
                                      buffer.m.planes[0].length,
                                      PROT_READ | PROT_WRITE,
                                      MAP_SHARED, fd,
                                      buffer.m.planes[0].m.mem_offset);
        ASSERT(address);
        outputFrames[i] = static_cast<uint8_t*>(address);
        // ignore lenght here
    }
    for (i=outputQueueCapacity; i<kMaxFrameQueueLength; i++) {
        outputFrames[i] = NULL;
    }

    // feed input/output frames first
    for (i=0; i<inputQueueCapacity; i++) {
        if (!feedOneInputFrame(fd, i)) {
            ASSERT(0);
        }
    }

    for (i=0; i<outputQueueCapacity; i++) {
        if (!takeOneOutputFrame(fd, i)) {
            ASSERT(0);
        }
    }

    bool event_pending=true;
    do {
        takeOneOutputFrame(fd);
        feedOneInputFrame(fd);
        if (isReadEOS)
            break;
    } while (YamiV4L2_Poll(fd, true, &event_pending) == 0);

    // drain input buffer
    ASSERT(isReadEOS);
    while (!isEncodeEOS) {
        takeOneOutputFrame(fd);
        feedOneInputFrame(fd);
        usleep(10000);
    }

    // drain output buffer
    // stop input port to indicate EOS
    type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_STREAMOFF, &type);
    ASSERT(ioctlRet != -1);
    ASSERT(isEncodeEOS);
    while (!isOutputEOS) {
        usleep(10000);
        takeOneOutputFrame(fd);
    }

    ASSERT(isOutputEOS);
    // YamiV4L2_Munmap(void* addr, size_t length)

    // release queued input/output buffer
    memset(&reqbufs, 0, sizeof(reqbufs));
    reqbufs.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
    reqbufs.memory = inputMemoryType;
    reqbufs.count = 0;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_REQBUFS, &reqbufs);
    ASSERT(ioctlRet != -1);

    memset(&reqbufs, 0, sizeof(reqbufs));
    reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
    reqbufs.memory = outputMemoryType;
    reqbufs.count = 0;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_REQBUFS, &reqbufs);
    ASSERT(ioctlRet != -1);

    // stop output prot
    type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
    ioctlRet = YamiV4L2_Ioctl(fd, VIDIOC_STREAMOFF, &type);
    ASSERT(ioctlRet != -1);

    // close device
    ioctlRet = YamiV4L2_Close(fd);
    ASSERT(ioctlRet != -1);

    fprintf(stderr, "encode done\n");
    return 0;
}


text:
/* global require, module */
const EmberApp = require( 'ember-cli/lib/broccoli/ember-addon' );
const packageConfig = require( './package.json' );
const replace = require( 'broccoli-string-replace' );

module.exports = function( defaults ) {
    const app = new EmberApp( defaults, {
        // Add options here
    });

    /*
    This build file specifes the options for the dummy test app of this
    addon, located in `/tests/dummy`
    This build file does *not* influence how the addon or the app using it
    behave. You most likely want to be modifying `./index.js` or app's build file
    */

    const tree = replace( app.toTree(), {
        files: [
            'index.html',
            'assets/dummy.js'
        ],
        patterns: [
            {
                match: /REPLACE_META_DESCRIPTION/g,
                replacement: packageConfig.description
            }, {
                match: /REPLACE_META_KEYWORDS/g,
                replacement: packageConfig.keywords.join( ', ' ) +
                    ', ember, ember cli'
            }, {
                match: /REPLACE_APPLICATION_VERSION/g,
                replacement: packageConfig.version
             }
        ]
    });

    return tree;
};


text:
<!DOCTYPE html>

	<meta charset="utf-8">

	<title>Class LeanCloud\Role</title>

	<link rel="stylesheet" href="resources/style.css?c2f33731c1948fbed7c333554678bfa68d4817da">

		Overview

Namespaces

						LeanCloud

						Engine

						Operation

						Storage

						Uploader

Classes

ACL

Bytes

Client

File

GeoPoint

MIMEType

Object

Push

Query

Relation

Role

SaveOption

SMS

User

Exceptions

BatchRequestError

CloudException

	<form id="search">
		<input type="hidden" name="cx" value="">
		<input type="hidden" name="ie" value="UTF-8">
		<input type="text" name="q" class="text" placeholder="Search">
	</form>

				Overview

				Namespace

Class

Class Role

Role representation on LeanCloud

A role represents a group of users in ACL, where a role can be
assigned read/write permissions. If a role was granted write
permission, then users belongs to this role will all inherit the
write permission.

All users of a role could be queried by $role->getUsers(), which
is an instance of Relation, where users can be added or
removed.

Roles can belong to role as well, which can be got by
$role->getRoles(), where roles can be added or removed.

			LeanCloud\Object

LeanCloud\Role

		Namespace: LeanCloud

				See:
				LeanCloud\ACL, LeanCloud\Relation

			Located at LeanCloud/Role.php

Methods summary

			 public

			LeanCloud\Role

		#
		setName(  <var>$name</var> )

Set name of role

Set name of role

The name can contain only alphanumeric characters, _, -, and
space. It cannot be changed after being saved.

Returns

					LeanCloud\Role

			 public

			string

		#
		getName( )

Get name of role

Get name of role

Returns

					string

			 public

			LeanCloud\Relation

		#
		getUsers( )

Get a relation of users that belongs to this role

Get a relation of users that belongs to this role

Returns

					LeanCloud\Relation

			 public

			LeanCloud\Relation

		#
		getRoles( )

Get a relation of roles that belongs to this role

Get a relation of roles that belongs to this role

Returns

					LeanCloud\Relation

Methods inherited from LeanCloud\Object

			__construct(),
			addIn(),
			addUniqueIn(),
			create(),
			delete(),
			destroy(),
			destroyAll(),
			disableAfterHook(),
			disableBeforeHook(),
			fetch(),
			fetchAll(),
			findUnsavedChildren(),
			get(),
			getACL(),
			getClassName(),
			getCreatedAt(),
			getObjectId(),
			getPointer(),
			getQuery(),
			getRelation(),
			getUpdatedAt(),
			increment(),
			isDirty(),
			mergeAfterFetch(),
			mergeAfterSave(),
			registerClass(),
			removeIn(),
			save(),
			saveAll(),
			set(),
			setACL(),
			toFullJSON(),
			toJSON(),
			traverse()

Constants inherited from LeanCloud\Object

			PRESERVED_KEYS

Properties summary

			protected static
			string

				<var>$className</var>

Table name on LeanCloud

Table name on LeanCloud

				#
				"_Role"

		 API documentation generated by ApiGen


text:
package com.example.xiongcen.myapplication.util;

import android.os.Build;
import android.text.TextUtils;

import org.json.JSONObject;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.lang.reflect.Field;

public final class CpuInfoUtils {

    /**
     * 获取用户硬件信息
     */
    public static String getMobileInfo() {
        //StringBuffer sb = new StringBuffer();
        JSONObject mbInfo = new JSONObject();

        //通过反射获取用户硬件信息
        try {

            Field[] fields = Build.class.getDeclaredFields();
            for (Field field : fields) {
                // 暴力反射,获取私有信息
                field.setAccessible(true);
                String name = field.getName();
                String value = field.get(null).toString();
                //sb.append(name + "=" + value);
                //sb.append("\n");
                mbInfo.put(name, value);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

        //return sb.toString();
        return mbInfo.toString();
    }

    static public String getCpuString() {
        if (Build.CPU_ABI.equalsIgnoreCase("x86")) {
            return "Intel";
        }

        String strInfo = "";
        RandomAccessFile reader = null;
        try {
            byte[] bs = new byte[1024];
            reader = new RandomAccessFile("/proc/cpuinfo", "r");
            reader.read(bs);
            String ret = new String(bs);
            int index = ret.indexOf(0);
            if (index != -1) {
                strInfo = ret.substring(0, index);
            } else {
                strInfo = ret;
            }
        } catch (IOException ex) {
            ex.printStackTrace();
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }

        return strInfo;
    }

    static public String getCpuType() {
        String strInfo = getCpuString();
        if (TextUtils.isEmpty(strInfo)) {
            return "unknown";
        }

        String strType;
        if (strInfo.contains("ARMv5")) {
            strType = "armv5";
        } else if (strInfo.contains("ARMv6")) {
            strType = "armv6";
        } else if (strInfo.contains("ARMv7")) {
            strType = "armv7";
        } else if (strInfo.contains("Intel")) {
            strType = "x86";
        } else {
            strType = "unknown";
            return strType;
        }

        if (strInfo.contains("neon")) {
            strType += "_neon";
        } else if (strInfo.contains("vfpv3")) {
            strType += "_vfpv3";
        } else if (strInfo.contains(" vfp")) {
            strType += "_vfp";
        } else {
            strType += "_none";
        }

        return strType;
    }

    public static CPUInfo getCPUInfo() {
        String strInfo = null;
        RandomAccessFile reader = null;
        try {
            byte[] bs = new byte[1024];
            reader = new RandomAccessFile("/proc/cpuinfo", "r");
            reader.read(bs);
            String ret = new String(bs);
            int index = ret.indexOf(0);
            if (index != -1) {
                strInfo = ret.substring(0, index);
            } else {
                strInfo = ret;
            }
        } catch (IOException ex) {
            strInfo = "";
            ex.printStackTrace();
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }

        CPUInfo info = parseCPUInfo(strInfo);
        info.mCPUMaxFreq = getMaxCpuFreq();

        return info;
    }

    private final static String kCpuInfoMaxFreqFilePath = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq";

    private static int getMaxCpuFreq() {
        int result = 0;
        FileReader fr = null;
        BufferedReader br = null;
        try {
            fr = new FileReader(kCpuInfoMaxFreqFilePath);
            br = new BufferedReader(fr);
            String text = br.readLine();
            if (text != null) {
                result = Integer.parseInt(text.trim());
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (fr != null)
                try {
                    fr.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            if (br != null)
                try {
                    br.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
        }

        return result;
    }

    public static class CPUInfo {
        public CPUInfo() {

        }

        public static final int CPU_TYPE_UNKNOWN = 0x00000000;
        public static final int CPU_TYPE_ARMV5TE = 0x00000001;
        public static final int CPU_TYPE_ARMV6 = 0x00000010;
        public static final int CPU_TYPE_ARMV7 = 0x00000100;

        public static final int CPU_FEATURE_UNKNOWS = 0x00000000;
        public static final int CPU_FEATURE_VFP = 0x00000001;
        public static final int CPU_FEATURE_VFPV3 = 0x00000010;
        public static final int CPU_FEATURE_NEON = 0x00000100;

        public int mCPUType;
        public int mCPUCount;
        public int mCPUFeature;
        public double mBogoMips;
        public long mCPUMaxFreq;
    }

    private static CPUInfo parseCPUInfo(String cpuInfo) {
        if (cpuInfo == null || "".equals(cpuInfo)) {
            return null;
        }

        CPUInfo ci = new CPUInfo();
        ci.mCPUType = CPUInfo.CPU_TYPE_UNKNOWN;
        ci.mCPUFeature = CPUInfo.CPU_FEATURE_UNKNOWS;
        ci.mCPUCount = 1;
        ci.mBogoMips = 0;

        if (cpuInfo.contains("ARMv5")) {
            ci.mCPUType = CPUInfo.CPU_TYPE_ARMV5TE;
        } else if (cpuInfo.contains("ARMv6")) {
            ci.mCPUType = CPUInfo.CPU_TYPE_ARMV6;
        } else if (cpuInfo.contains("ARMv7")) {
            ci.mCPUType = CPUInfo.CPU_TYPE_ARMV7;
        }

        if (cpuInfo.contains("neon")) {
            ci.mCPUFeature |= CPUInfo.CPU_FEATURE_NEON;
        }

        if (cpuInfo.contains("vfpv3")) {
            ci.mCPUFeature |= CPUInfo.CPU_FEATURE_VFPV3;
        }

        if (cpuInfo.contains(" vfp")) {
            ci.mCPUFeature |= CPUInfo.CPU_FEATURE_VFP;
        }

        String[] items = cpuInfo.split("\n");

        for (String item : items) {
            if (item.contains("CPU variant")) {
                int index = item.indexOf(": ");
                if (index >= 0) {
                    String value = item.substring(index + 2);
                    try {
                        ci.mCPUCount = Integer.decode(value);
                        ci.mCPUCount = ci.mCPUCount == 0 ? 1 : ci.mCPUCount;
                    } catch (NumberFormatException e) {
                        ci.mCPUCount = 1;
                    }
                }
            } else if (item.contains("BogoMIPS")) {
                int index = item.indexOf(": ");
                if (index >= 0) {
                    String value = item.substring(index + 2);
                }
            }
        }

        return ci;
    }

    /**
     * 获取设备内存大小值
     *
     * @return 内存大小, 单位MB
     */
    public static long getTotalMemory() {
        String str1 = "/proc/meminfo";
        String str2;
        String[] arrayOfString;
        long initial_memory = 0;
        try {
            FileReader localFileReader = new FileReader(str1);
            BufferedReader localBufferedReader = new BufferedReader(localFileReader, 8192);
            str2 = localBufferedReader.readLine();
            if (str2 != null) {
                arrayOfString = str2.split("\\s+");
                initial_memory = Integer.valueOf(arrayOfString[1]).intValue() / 1024;
            }
            localBufferedReader.close();
            return initial_memory;
        } catch (IOException e) {
            return -1;
        }
    }

    public static CPUInfo getCPUInfos() {
        String strInfo = null;
        RandomAccessFile reader = null;
        try {
            byte[] bs = new byte[1024];
            reader = new RandomAccessFile("/proc/cpuinfo", "r");
            reader.read(bs);
            String ret = new String(bs);
            int index = ret.indexOf(0);
            if (index != -1) {
                strInfo = ret.substring(0, index);
            } else {
                strInfo = ret;
            }
        } catch (IOException ex) {
            strInfo = "";
            ex.printStackTrace();
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }

        CPUInfo info = parseCPUInfo(strInfo);
        info.mCPUMaxFreq = getMaxCpuFreq();

        return info;
    }

    /**
     * 获取android CPU类型
     *
     * @return String CPU类型
     */
    public static String getCpuModel() {
        String cpu_model = "";

        CPUInfo in = getCPUInfo();

        if ((in.mCPUType & CPUInfo.CPU_TYPE_ARMV5TE) == CPUInfo.CPU_TYPE_ARMV5TE)
            cpu_model = "armv5";
        else if ((in.mCPUType & CPUInfo.CPU_TYPE_ARMV6) == CPUInfo.CPU_TYPE_ARMV6)
            cpu_model = "armv6";
        else if ((in.mCPUType & CPUInfo.CPU_TYPE_ARMV7) == CPUInfo.CPU_TYPE_ARMV7)
            cpu_model = "armv7";
        else
            cpu_model = "unknown";
        return cpu_model;
    }

    /**
     * 获取android CPU特性
     *
     * @return String CPU特性
     */
    public static String getCpuFeature() {
        String cpu_feature = "";

        CPUInfo in = getCPUInfo();

        if ((in.mCPUFeature & CPUInfo.CPU_FEATURE_NEON) == CPUInfo.CPU_FEATURE_NEON)
            cpu_feature = "neon";
        else if ((in.mCPUFeature & CPUInfo.CPU_FEATURE_VFP) == CPUInfo.CPU_FEATURE_VFP)
            cpu_feature = "vfp";
        else if ((in.mCPUFeature & CPUInfo.CPU_FEATURE_VFPV3) == CPUInfo.CPU_FEATURE_VFPV3)
            cpu_feature = "vfpv3";
        else
            cpu_feature = "unknown";
        return cpu_feature;
    }

}


text:
class Api::IssuesController < ApplicationController
  skip_before_filter :verify_authenticity_token
  respond_to :json

  def index
    @issues = Issue.all

    render json: @issues, each_serializer: IssueListSerializer
  end

  def create
    @issue = Issue.create!(issue_params)

    render json: @issue, serializer: IssueSerializer
  end

  private

  def issue_params
    params.permit(:subject, :description, :location_id)
  end
end


text:
package com.datasift.connector.writer;

import com.codahale.metrics.MetricRegistry;
import org.junit.Test;

import static org.junit.Assert.*;

public class TestMetrics {
    @Test
    public void can_get_metrics_registry() {
        Metrics metrics = new Metrics();
        assertNotNull(metrics.getRegistry());
        assert(metrics.getRegistry() instanceof MetricRegistry);
    }
}


text:
using System.Threading.Tasks;
using Nethereum.Contracts.Extensions;
using Nethereum.Hex.HexTypes;
using Nethereum.RPC.TransactionManagers;

namespace Nethereum.Contracts.DeploymentHandlers
{
#if !DOTNET35
    public class DeploymentTransactionSenderHandler<TContractDeploymentMessage> : DeploymentHandlerBase<TContractDeploymentMessage>,
        IDeploymentTransactionSenderHandler<TContractDeploymentMessage> where TContractDeploymentMessage : ContractDeploymentMessage, new()
    {
        private readonly IDeploymentEstimatorHandler<TContractDeploymentMessage> _deploymentEstimatorHandler;

        public DeploymentTransactionSenderHandler(ITransactionManager transactionManager):base(transactionManager)
        {
            _deploymentEstimatorHandler = new DeploymentEstimatorHandler<TContractDeploymentMessage>(transactionManager);
        }

        public async Task<string> SendTransactionAsync(TContractDeploymentMessage deploymentMessage = null)
        {
            if(deploymentMessage == null) deploymentMessage = new TContractDeploymentMessage();
            deploymentMessage.Gas = await GetOrEstimateMaximumGasAsync(deploymentMessage).ConfigureAwait(false);
            var transactionInput = DeploymentMessageEncodingService.CreateTransactionInput(deploymentMessage);
            return await TransactionManager.SendTransactionAsync(transactionInput).ConfigureAwait(false);
        }

        protected virtual async Task<HexBigInteger> GetOrEstimateMaximumGasAsync(
            TContractDeploymentMessage deploymentMessage)
        {
            return deploymentMessage.GetHexMaximumGas()
                   ?? await _deploymentEstimatorHandler.EstimateGasAsync(deploymentMessage).ConfigureAwait(false);
        }
    }
#endif
}


text:
// Copyright 2016 Yahoo Inc.
// Licensed under the terms of the Apache license. Please see LICENSE.md file distributed with this work for terms.
package com.yahoo.bard.webservice.data.config.names;

import java.util.Locale;

/**
 * Hold the list of raw Druid table names.
 */
public enum TestDruidTableName implements TableName {
    ALL_SHAPES,
    COLOR_SHAPES_HOURLY,
    COLOR_SHAPES,
    COLOR_SHAPES_MONTHLY,
    COLOR_SIZE_SHAPES,
    COLOR_SIZE_SHAPE_SHAPES,
    ALL_PETS,
    MONTHLY,
    HOURLY;

    @Override
    public String asName() {
        return name().toLowerCase(Locale.ENGLISH);
    }
}


text:
<?php

namespace backend\controllers;

use Yii;
use backend\models\LocalizacionAccVariable;
use backend\models\AccionCentralizadaVariables;
use backend\models\LocalizacionAccVariableSearch;
use frontend\models\AccionCentralizadaVariableEjecucion;
use common\models\Pais;
use common\models\Estados;
use common\models\Municipio;
use common\models\Parroquia;
use common\models\AccionCentralizadaVariableProgramacion;
use common\models\Ambito;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use \yii\web\Response;
use yii\helpers\Html;
use yii\filters\AccessControl;
/**
 * LocalizacionAccVariableController implements the CRUD actions for LocalizacionAccVariable model.
 */
class LocalizacionAccVariableController extends \common\controllers\BaseController
{
    public function behaviors()
    {
        return parent::behaviors();
    }

    /**
     * Lists all LocalizacionAccVariable models.
     * @return mixed
     */
    public function actionIndex()
    {
        $searchModel = new LocalizacionAccVariableSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }

    /**
     * Displays a single LocalizacionAccVariable model.
     * @param integer $id
     * @return mixed
     */
    public function actionView($id)
    {
        $model=$this->findModel($id);
        $model1= AccionCentralizadaVariableProgramacion::find()->where(['id_localizacion' => $model->id])->One();
        $model2= AccionCentralizadaVariables::find($model->id_variable)->One();
        $request = Yii::$app->request;
        if($request->isAjax)
        {
            Yii::$app->response->format = Response::FORMAT_JSON;
            return
            [
                'title' => 'Localización Y Programación De Variable',
                'content'=>$this->renderAjax('view',
                [
                    'model' => $model,
                    'model1' => $model1,
                ]),
                'footer'=> Html::button('Cerrar',['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
                            Html::a('Editar',['update','id'=>$id, 'variable' => $model->id_variable, 'localizacion' => $model2->localizacion,],['class'=>'btn btn-primary','role'=>'modal-remote'])
            ];
        }
        else
        {
            return $this->render('view',
            [
                'model' => $model,
                'model1'=> $model1,
            ]);
        }
    }

    /**
     * Creates a new LocalizacionAccVariable model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @param integer $variable, $localizacion
     * @return mixed
     */
    public function actionCreate($variable,$localizacion)
    {
        $request = Yii::$app->request;
        $ACVariable=AccionCentralizadaVariables::findOne($variable);
        $model = new LocalizacionAccVariable();
        $model1= new AccionCentralizadaVariableProgramacion();

        $model->id_variable=$variable;
        //Escenario
        $model->scenario = $ACVariable->ambito->ambito;
        $model->id_pais = Pais::findOne(['nombre'=>'Venezuela'])->id;
        //lista desplegable
        $pais = Pais::find()->where(['nombre'=>'Venezuela'])->all();
        $estados = Estados::find()->all();
        $municipios = Municipio::find()->all();
        $parroquias = Parroquia::find()->all();

        if($request->isAjax){
            /*
            *   Process for ajax request
            */
            Yii::$app->response->format = Response::FORMAT_JSON;
            if($request->isGet){
                return [
                    'title'=> "Localización Y Programación Mensual",
                    'content'=>$this->renderAjax('create', [
                        'model' => $model,
                        'pais' => $pais,
                        'estados' => $estados,
                        'municipios' => $municipios,
                        'parroquias' => $parroquias,
                        'model1' => $model1,

                    ]),
                    'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
                                Html::button('Save',['class'=>'btn btn-primary','type'=>"submit"])

                ];
            }
            if($model->load($request->post()))
            {
                $connection = \Yii::$app->db;
                $transaction = $connection->beginTransaction();
                try
                {
                    if($model->save())
                    {
                        //guardando el modelo programacion
                        $model1->id_localizacion=$model->id;
                        if( $model1->load($request->post()) && $model1->save())
                        {
                            $transaction->commit();
                            return [
                                'forceReload'=>'true',
                                'title'=> "Localización y Programación",

                                'content'=>'Create VariableLocalizacion success',
                                'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
                                        Html::a('Create More',['create', 'variable' => $variable,
                                'localizacion' => $localizacion],['class'=>'btn btn-primary','role'=>'modal-remote'])

                            ];
                        }
                        else
                        {
                            $transaction->rollBack();
                            return
                            [
                                'title'=> "Localización y Programación",
                                'content'=>$this->renderAjax('create', [
                                    'model' => $model,
                                    'pais' => $pais,
                                    'estados' => $estados,
                                    'municipios' => $municipios,
                                    'parroquias' => $parroquias,
                                    'model1' => $model1,

                                ]),
                                'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
                                        Html::button('Save',['class'=>'btn btn-primary','type'=>"submit"])
                            ];

                        }
                    }
                    else
                    {
                        $transaction->rollBack();
                        return
                        [
                            'title'=> "Localización y Programación",
                            'content'=>$this->renderAjax('create', [
                                'model' => $model,
                                'pais' => $pais,
                                'estados' => $estados,
                                'municipios' => $municipios,
                                'parroquias' => $parroquias,
                                'model1' => $model1,
                            ]),
                            'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
                                        Html::button('Save',['class'=>'btn btn-primary','type'=>"submit"])
                        ];
                    }
                }
                catch (\Exception $e)
                {
                    $transaction->rollBack();
                    throw $e;
                }
            }
            else
            {
                return
                [
                    'title'=> "Localización",
                    'content'=>$this->renderAjax('create', [
                        'model' => $model,
                        'pais' => $pais,
                        'estados' => $estados,
                        'municipios' => $municipios,
                        'parroquias' => $parroquias,
                        'model1' => $model1,

                    ]),
                    'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
                                Html::button('Save',['class'=>'btn btn-primary','type'=>"submit"])

                ];
            }
        }
        else
        {

            if ($model->load(Yii::$app->request->post()) && $model->save())
            {
                //return $this->redirect(['create', 'id' => $model->id]);
                return $this->redirect(['accion-centralizada-variable-programacion/create',  'id_localizacion' => $model->id]);
            }
            else
            {
                return $this->render('create', [
                    'model' => $model,
                    'pais' => $paises,
                    'estados' => $estados,
                    'municipios' => $municipios,
                    'parroquias' => $parroquias,
                    'model1' => $model1,
                ]);
            }

        }
    }

    /**
     * Updates an existing LocalizacionAccVariable model.
     * If update is successful, the browser will be redirected to the 'view' page.
     * @param integer $id, $variable, $localizacion
     * @return mixed
     */
    public function actionUpdate($id)
    {
        $request = Yii::$app->request;
        $model = $this->findModel($id);
        $model1= AccionCentralizadaVariableProgramacion::find()->where(['id_localizacion' => $model->id])->One();
        //Escenario
        $model->scenario = $model->idVariable->ambito->ambito;
        //lista desplegable
        $paises = Pais::find()->where(['nombre'=>'Venezuela'])->all();
        $estados = Estados::find()->all();
        $municipios = Municipio::find()->where(['id_estado'=> $model->id_estado])->all();
        $parroquias = Parroquia::find()->where(['id_municipio' => $model->id_municipio])->all();

        if($request->isAjax)
        {
            /*
            *   Process for ajax request
            */
            Yii::$app->response->format = Response::FORMAT_JSON;
            if($request->isGet)
            {
                return [
                    'title'=> "Localización y Programación",
                    'content'=>$this->renderAjax('update', [
                        'model' => $model,
                        'pais' => $paises,
                        'estados' => $estados,
                        'municipios' => $municipios,
                        'parroquias' => $parroquias,
                        'model1' => $model1,
                    ]),
                    'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
                                Html::button('Save',['class'=>'btn btn-primary','type'=>"submit"])

                ];
            }
            else
            {
                if($model->load($request->post()))
                {
                    $connection = \Yii::$app->db;
                    $transaction = $connection->beginTransaction();
                    try
                    {
                        if($model->save())
                        {
                            //guardando el modelo programacion
                            $model1->id_localizacion=$model->id;
                            if( $model1->load($request->post()) && $model1->save())
                            {
                                $transaction->commit();
                                return [
                                    'forceReload'=>'true',
                                    'title'=> "Localización y Programación",
                                    'content'=>$this->renderAjax('view', [
                                    'model' => $model,
                                    'model1' => $model1,
                                    'id' => $model->id,
                                    ]),
                                    'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
                                    Html::a('Editar',['update', 'id' => $model->id, 'variable' => $model->id_variable, 'localizacion' => $model->idVariable->localizacion,],['class'=>'btn btn-primary','role'=>'modal-remote'])
                                ];
                            }
                            else
                            {
                                $transaction->rollBack();
                                return
                                [
                                    'title'=> "Localización y Programación",
                                    'content'=>$this->renderAjax('create', [
                                        'model' => $model,
                                        'pais' => $pais,
                                        'estados' => $estados,
                                        'municipios' => $municipios,
                                        'parroquias' => $parroquias,
                                        'model1' => $model1,
                                    ]),
                                    'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
                                            Html::button('Save',['class'=>'btn btn-primary','type'=>"submit"])
                                ];

                            }
                        }
                        else
                        {
                            $transaction->rollBack();
                            return
                            [
                                'title'=> "Localización y Programación",
                                'content'=>$this->renderAjax('create', [
                                    'model' => $model,
                                    'pais' => $pais,
                                    'estados' => $estados,
                                    'municipios' => $municipios,
                                    'parroquias' => $parroquias,
                                    'model1' => $model1,
                                ]),
                                'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
                                            Html::button('Save',['class'=>'btn btn-primary','type'=>"submit"])
                            ];
                        }
                    }
                    catch (\Exception $e)
                    {
                        $transaction->rollBack();
                        throw $e;
                    }
                }
                else
                {
                    return
                    [
                        'title'=> "Localización",
                        'content'=>$this->renderAjax('create', [
                            'model' => $model,
                            'pais' => $pais,
                            'estados' => $estados,
                            'municipios' => $municipios,
                            'parroquias' => $parroquias,
                            'model1' => $model1,
                        ]),
                        'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>"modal"]).
                                    Html::button('Save',['class'=>'btn btn-primary','type'=>"submit"])

                    ];
                }
            }
        }
        else
        {
            if ($model->load(Yii::$app->request->post()) && $model->save())
            {
                return $this->redirect(['view', 'id' => $model->id]);
            }
            else
            {
                return $this->render('update', [
                    'model' => $model,
                    'pais' => $paises,
                    'estados' => $estados,
                    'municipios' => $municipios,
                    'parroquias' => $parroquias,
                    'model1' => $model1,
                ]);
            }
        }
    }

    public function actionBulkDelete()
    {
        $request = Yii::$app->request;

        $pks = explode(',', $request->post('pks'));

        foreach ($pks as $key)
        {

            $model=$this->findModel($key);
            $model->delete();
        }

        if($request->isAjax){
            /*
            *   Process for ajax request
            */
            Yii::$app->response->format = Response::FORMAT_JSON;
            return ['forceClose'=>true,'forceReload'=>'true'];
        }
        else
        {
            /*
            *   Process for non-ajax request
            */
            return $this->redirect(['/accion_centralizada_variables/index']);
        }

    }

    /**
     * Deletes an existing LocalizacionAccVariable model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     * @param integer $id
     * @return mixed
     */
    public function actionDelete($id)
    {
        $request = Yii::$app->request;
        $model = $this->findModel($id);
        $bandera=0; //variable para determinar si ha ocurrido una ejecucion

        $programacion= AccionCentralizadaVariableProgramacion::find()->where(['id_localizacion' => $model->id])->one();
        if(isset($programacion) && $programacion!=null)
        {
            $usuario = \Yii::$app->user; //el admin no debe ser restringido
            if($usuario->can('sysadmin'))
            {
                //metodo del modelo donde se borra todo lo relacionado con la accion central
                if($model->eliminarTodoLocalizacion())
                {
                    if($request->isAjax)
                    {
                        /*
                        *   Process for ajax request
                        */
                        Yii::$app->response->format = Response::FORMAT_JSON;
                        return ['forceClose'=>true,'forceReload'=>'true'];
                    }
                    else
                    {
                        /*
                        *   Process for non-ajax request
                        */
                        return $this->redirect(['index']);
                    }
                }
                else
                {
                    Yii::$app->response->format = Response::FORMAT_JSON;
                    echo "\nError Desconocido consulte al administrador.";
                    Yii::$app->end();
                }
            }//fin admin
            else
            {
                //si existe alguna ejecucion de la programacion no se podrá eliminar
                $modelojecucion=AccionCentralizadaVariableEjecucion::find()->where(['id_programacion'=> $programacion->id])->One();
                if($modelojecucion!=null)
                {
                    $bandera=1;
                }

                if($bandera==1)
                {
                    Yii::$app->response->format = Response::FORMAT_JSON;
                    echo "\nEsta localización tiene una Ejecución asociada.";
                    Yii::$app->end();
                }
                else
                {
                    //borrar programaciones
                    AccionCentralizadaVariableProgramacion::findOne($programacion->id)->delete();
                    //borrar localizacion
                    $this->findModel($id)->delete();

                    if($request->isAjax)
                    {
                        /*
                        *   Process for ajax request
                        */
                        Yii::$app->response->format = Response::FORMAT_JSON;
                        return ['forceClose'=>true,'forceReload'=>'#crud-datatable-pjax'];
                    }
                    else
                    {
                        /*
                        *   Process for non-ajax request
                        */
                        return $this->redirect(['index']);
                    }
                }
            }//fin del else
        }
        else
        {
            $this->findModel($id)->delete();
        }

    }

    /**
     * Finds the LocalizacionAccVariable model based on its primary key value.
     * If the model is not found, a 404 HTTP exception will be thrown.
     * @param integer $id
     * @return LocalizacionAccVariable the loaded model
     * @throws NotFoundHttpException if the model cannot be found
     */
    protected function findModel($id)
    {
        if (($model = LocalizacionAccVariable::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
}


text:
package io.datakernel.di;

import io.datakernel.di.util.ReflectionUtils;
import io.datakernel.di.util.Types;
import io.datakernel.di.util.Utils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Objects;

import static io.datakernel.di.util.Types.ensureEquality;

/**
 * The key defines an identity of a binding. In any DI, a key is usually a type of the object along
 * with some optional tag to distinguish between bindings which make objects of the same type.
 *

 * In DataKernel DI, a key is also a type token - special abstract class that can store type information
 * with shortest syntax possible in Java.
 *

 * For example, to create a key of type Map<String, List<Integer>>, you can just use
 * this syntax: new Key<Map<String, List<Integer>>>(){}.
 *

 * If your types are not known at compile time, you can use {@link Types#parameterized} to make a
 * parameterized type and give it to a {@link #ofType Key.ofType} constructor.
 */
public abstract class Key<T> {
	@NotNull
	private final Type type;
	@Nullable
	private final Object qualifier;

	public Key() {
		this.type = ensureEquality(getTypeParameter());
		this.qualifier = null;
	}

	public Key(@Nullable Object qualifier) {
		this.type = ensureEquality(getTypeParameter());
		this.qualifier = qualifier;
	}

	Key(@NotNull Type type, @Nullable Object qualifier) {
		this.type = ensureEquality(type);
		this.qualifier = qualifier;
	}

	/**
	 * A default subclass to be used by {@link #of Key.of*} and {@link #ofType Key.ofType*} constructors
	 */
	private static final class KeyImpl<T> extends Key<T> {
		private KeyImpl(Type type, Object qualifier) {
			super(type, qualifier);
		}
	}

	@NotNull
	public static <T> Key<T> of(@NotNull Class<T> type) {
		return new KeyImpl<>(type, null);
	}

	@NotNull
	public static <T> Key<T> of(@NotNull Class<T> type, @Nullable Object qualifier) {
		return new KeyImpl<>(type, qualifier);
	}

	@NotNull
	public static <T> Key<T> ofName(@NotNull Class<T> type, @NotNull String name) {
		return new KeyImpl<>(type, Qualifiers.named(name));
	}

	@NotNull
	public static <T> Key<T> ofType(@NotNull Type type) {
		return new KeyImpl<>(type, null);
	}

	@NotNull
	public static <T> Key<T> ofType(@NotNull Type type, @Nullable Object qualifier) {
		return new KeyImpl<>(type, qualifier);
	}

	@NotNull
	public static <T> Key<T> ofType(@NotNull Type type, @NotNull Class<? extends Annotation> annotationType) {
		return new KeyImpl<>(type, annotationType);
	}

	/**
	 * Returns a new key with same type but the qualifier replaced with a given one
	 */
	public Key<T> qualified(Object qualifier) {
		return new KeyImpl<>(type, qualifier);
	}

	/**
	 * Returns a new key with same type but the qualifier replaced with @Named annotation with given value
	 *

	 * This is not the same as a {@link Key} with {@link String} qualifier
	 */
	public Key<T> named(String name) {
		return new KeyImpl<>(type, Qualifiers.named(name));
	}

	@NotNull
	private Type getTypeParameter() {
		// this cannot possibly fail so not even a check here
		Type typeArgument = ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
		Object outerInstance = ReflectionUtils.getOuterClassInstance(this);
		// the outer instance is null in static context
		return outerInstance != null ? Types.resolveTypeVariables(typeArgument, outerInstance.getClass(), outerInstance) : typeArgument;
	}

	@NotNull
	public Type getType() {
		return type;
	}

	/**
	 * A shortcut for {@link Types#getRawType}(key.getType()).
	 * Also casts the result to a properly parameterized class.
	 */
	@SuppressWarnings("unchecked")
	@NotNull
	public Class<T> getRawType() {
		return (Class<T>) Types.getRawType(type);
	}

	/**
	 * Returns a type parameter of the underlying type wrapped as a key with no qualifier.
	 *
	 * @throws IllegalStateException when underlying type is not a parameterized one.
	 */
	public  Key getTypeParameter(int index) {
		if (type instanceof ParameterizedType) {
			return new KeyImpl<>(((ParameterizedType) type).getActualTypeArguments()[index], null);
		}
		throw new IllegalStateException("Expected type from key " + getDisplayString() + " to be parameterized");
	}

	@Nullable
	public Object getQualifier() {
		return qualifier;
	}

	/**
	 * Returns an underlying type with display string formatting (package names stripped)
	 * and prepended qualifier display string if this key has a qualifier.
	 */
	public String getDisplayString() {
		return (qualifier != null ? Utils.getDisplayString(qualifier) + " " : "") + ReflectionUtils.getDisplayName(type);
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof Key)) {
			return false;
		}
		Key<?> that = (Key<?>) o;
		return type.equals(that.type) && Objects.equals(qualifier, that.qualifier);
	}

	@Override
	public int hashCode() {
		return 31 * type.hashCode() + (qualifier == null ? 0 : qualifier.hashCode());
	}

	@Override
	public String toString() {
		return (qualifier != null ? qualifier.toString() + " " : "") + type.getTypeName();
	}
}


text:
import babel from 'rollup-plugin-babel';

export default {
  entry: 'src/entry.js',
  format: 'cjs',
   plugins: [ babel() ],
  dest: 'dist/entry.js' // equivalent to --output
};