text:
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var common_1 = require("@angular/common");
var forms_1 = require("@angular/forms");
var http_1 = require("@angular/http");
var cookies_service_1 = require("angular2-cookie/services/cookies.service");
var prime_ng_module_1 = require("./prime-ng.module");
var http_client_service_1 = require("./http-client.service");
var session_service_1 = require("./session.service");
var storage_service_1 = require("./storage.service");
var app_analytics_service_1 = require("./app-analytics.service");
var config_service_1 = require("./config.service");
var authentication_controller_proxy_service_1 = require("../common/controller-proxies/authentication-controller-proxy.service");
var programs_controller_proxy_service_1 = require("../common/controller-proxies/programs-controller-proxy.service");
var trainees_controller_proxy_service_1 = require("../common/controller-proxies/trainees-controller-proxy.service");
var workouts_controller_proxy_service_1 = require("../common/controller-proxies/workouts-controller-proxy.service");
var CommonModule = CommonModule_1 = (function () {
    function CommonModule() {
    }
    CommonModule.forRoot = function () {
        return {
            ngModule: CommonModule_1,
            providers: [
                app_analytics_service_1.AppAnalyticsService,
                session_service_1.SessionService,
                config_service_1.ConfigProvider,
                config_service_1.ConfigService,
                cookies_service_1.CookieService,
                http_client_service_1.HttpClientService,
                storage_service_1.StorageService,
                authentication_controller_proxy_service_1.AuthenticationControllerProxy,
                programs_controller_proxy_service_1.ProgramsControllerProxy,
                trainees_controller_proxy_service_1.TraineesControllerProxy,
                workouts_controller_proxy_service_1.WorkoutsControllerProxy
            ]
        };
    };
    return CommonModule;
}());
CommonModule = CommonModule_1 = __decorate([
    core_1.NgModule({
        imports: [
            http_1.HttpModule
        ],
        declarations: [],
        exports: [
            common_1.CommonModule,
            forms_1.FormsModule,
            http_1.HttpModule,
            prime_ng_module_1.PrimeNgModule
        ]
    })
], CommonModule);
exports.CommonModule = CommonModule;
var CommonModule_1;
//# sourceMappingURL=common.module.js.map


text:
<?php

declare(strict_types=1);

namespace Arcanedev\LogViewer;

use Arcanedev\LogViewer\Contracts\Utilities\Filesystem as FilesystemContract;
use Arcanedev\LogViewer\Contracts\Utilities\Factory as FactoryContract;
use Arcanedev\LogViewer\Contracts\Utilities\LogLevels as LogLevelsContract;
use Arcanedev\LogViewer\Contracts\LogViewer as LogViewerContract;

/**
 * Class     LogViewer
 *
 * @author   ARCANEDEV <arcanedev.maroc@gmail.com>
 */
class LogViewer implements LogViewerContract
{
    /* -----------------------------------------------------------------
     |  Constants
     | -----------------------------------------------------------------
     */

    /**
     * LogViewer Version
     */
    const VERSION = '9.0.0';

    /* -----------------------------------------------------------------
     |  Properties
     | -----------------------------------------------------------------
     */

    /**
     * The factory instance.
     *
     * @var \Arcanedev\LogViewer\Contracts\Utilities\Factory
     */
    protected $factory;

    /**
     * The filesystem instance.
     *
     * @var \Arcanedev\LogViewer\Contracts\Utilities\Filesystem
     */
    protected $filesystem;

    /**
     * The log levels instance.
     *
     * @var \Arcanedev\LogViewer\Contracts\Utilities\LogLevels
     */
    protected $levels;

    /* -----------------------------------------------------------------
     |  Constructor
     | -----------------------------------------------------------------
     */

    /**
     * Create a new instance.
     *
     * @param \Arcanedev\LogViewer\Contracts\Utilities\Factory $factory
     * @param \Arcanedev\LogViewer\Contracts\Utilities\Filesystem $filesystem
     * @param \Arcanedev\LogViewer\Contracts\Utilities\LogLevels $levels
     */
    public function __construct(
        FactoryContract $factory,
        FilesystemContract $filesystem,
        LogLevelsContract $levels
    ) {
        $this->factory = $factory;
        $this->filesystem = $filesystem;
        $this->levels = $levels;
    }

    /* -----------------------------------------------------------------
     |  Getters & Setters
     | -----------------------------------------------------------------
     */

    /**
     * Get the log levels.
     *
     * @param bool $flip
     *
     * @return array
     */
    public function levels($flip = false)
    {
        return $this->levels->lists($flip);
    }

    /**
     * Get the translated log levels.
     *
     * @param string|null $locale
     *
     * @return array
     */
    public function levelsNames($locale = null)
    {
        return $this->levels->names($locale);
    }

    /**
     * Set the log storage path.
     *
     * @param string $path
     *
     * @return self
     */
    public function setPath($path)
    {
        $this->factory->setPath($path);

        return $this;
    }

    /**
     * Get the log pattern.
     *
     * @return string
     */
    public function getPattern()
    {
        return $this->factory->getPattern();
    }

    /**
     * Set the log pattern.
     *
     * @param string $date
     * @param string $prefix
     * @param string $extension
     *
     * @return self
     */
    public function setPattern(
        $prefix = FilesystemContract::PATTERN_PREFIX,
        $date = FilesystemContract::PATTERN_DATE,
        $extension = FilesystemContract::PATTERN_EXTENSION
    ) {
        $this->factory->setPattern($prefix, $date, $extension);

        return $this;
    }

    /* -----------------------------------------------------------------
     |  Main Methods
     | -----------------------------------------------------------------
     */

    /**
     * Get all logs.
     *
     * @return \Arcanedev\LogViewer\Entities\LogCollection
     */
    public function all()
    {
        return $this->factory->all();
    }

    /**
     * Paginate all logs.
     *
     * @param int $perPage
     *
     * @return \Illuminate\Pagination\LengthAwarePaginator
     */
    public function paginate($perPage = 30)
    {
        return $this->factory->paginate($perPage);
    }

    /**
     * Get a log.
     *
     * @param string $date
     *
     * @return \Arcanedev\LogViewer\Entities\Log
     */
    public function get($date)
    {
        return $this->factory->log($date);
    }

    /**
     * Get the log entries.
     *
     * @param string $date
     * @param string $level
     *
     * @return \Arcanedev\LogViewer\Entities\LogEntryCollection
     */
    public function entries($date, $level = 'all')
    {
        return $this->factory->entries($date, $level);
    }

    /**
     * Download a log file.
     *
     * @param string $date
     * @param string|null $filename
     * @param array $headers
     *
     * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
     */
    public function download($date, $filename = null, $headers = [])
    {
        if (is_null($filename)) {
            $filename = sprintf(
                "%s{$date}.%s",
                config('log-viewer.download.prefix', 'laravel-'),
                config('log-viewer.download.extension', 'log')
            );
        }

        $path = $this->filesystem->path($date);

        return response()->download($path, $filename, $headers);
    }

    /**
     * Get logs statistics.
     *
     * @return array
     */
    public function stats()
    {
        return $this->factory->stats();
    }

    /**
     * Get logs statistics table.
     *
     * @param string|null $locale
     *
     * @return \Arcanedev\LogViewer\Tables\StatsTable
     */
    public function statsTable($locale = null)
    {
        return $this->factory->statsTable($locale);
    }

    /**
     * Delete the log.
     *
     * @param string $date
     *
     * @return bool
     */
    public function delete($date)
    {
        return $this->filesystem->delete($date);
    }

    /**
     * Clear the log files.
     *
     * @return bool
     */
    public function clear()
    {
        return $this->filesystem->clear();
    }

    /**
     * Get all valid log files.
     *
     * @return array
     */
    public function files()
    {
        return $this->filesystem->logs();
    }

    /**
     * List the log files (only dates).
     *
     * @return array
     */
    public function dates()
    {
        return $this->factory->dates();
    }

    /**
     * Get logs count.
     *
     * @return int
     */
    public function count()
    {
        return $this->factory->count();
    }

    /**
     * Get entries total from all logs.
     *
     * @param string $level
     *
     * @return int
     */
    public function total($level = 'all')
    {
        return $this->factory->total($level);
    }

    /**
     * Get logs tree.
     *
     * @param bool $trans
     *
     * @return array
     */
    public function tree($trans = false)
    {
        return $this->factory->tree($trans);
    }

    /**
     * Get logs menu.
     *
     * @param bool $trans
     *
     * @return array
     */
    public function menu($trans = true)
    {
        return $this->factory->menu($trans);
    }

    /* -----------------------------------------------------------------
     |  Check Methods
     | -----------------------------------------------------------------
     */

    /**
     * Determine if the log folder is empty or not.
     *
     * @return bool
     */
    public function isEmpty()
    {
        return $this->factory->isEmpty();
    }

    /* -----------------------------------------------------------------
     |  Other Methods
     | -----------------------------------------------------------------
     */

    /**
     * Get the LogViewer version.
     *
     * @return string
     */
    public function version()
    {
        return self::VERSION;
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.springframework.gradle.maven;

import org.gradle.api.Action;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.plugins.JavaPlatformPlugin;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.publish.PublishingExtension;
import org.gradle.api.publish.VariantVersionMappingStrategy;
import org.gradle.api.publish.VersionMappingStrategy;
import org.gradle.api.publish.maven.MavenPublication;
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin;

public class PublishAllJavaComponentsPlugin implements Plugin<Project> {
	@Override
	public void apply(Project project) {
		project.getPlugins().withType(MavenPublishPlugin.class).all((mavenPublish) -> {
			PublishingExtension publishing = project.getExtensions().getByType(PublishingExtension.class);
			publishing.getPublications().create("mavenJava", MavenPublication.class, new Action<MavenPublication>() {
				@Override
				public void execute(MavenPublication maven) {
					project.getPlugins().withType(JavaPlugin.class, (plugin) -> {
						maven.from(project.getComponents().getByName("java"));
					});
					project.getPlugins().withType(JavaPlatformPlugin.class, (plugin) -> {
						maven.from(project.getComponents().getByName("javaPlatform"));
					});
				}
			});
		});
	}
}


text:
package net.mikaboshi.util;

import java.lang.reflect.InvocationTargetException;

import org.apache.commons.beanutils.MethodUtils;

/**
 * リフレクションに関するユーティリティクラス。
 * @author Takuma Umezawa
 *
 */
public final class ReflectionUtils {

	private ReflectionUtils() {}

	/**
	 * リフレクションによるメソッドの実行を行う。
	 * リフレクション例外が発生した場合は、実行時例外である {@link UnsupportedOperationException}
	 * がスローされる。
	 *
	 * @param object レシーバオブジェクト
	 * @param methodName メソッド名
	 * @param args メソッドの引数
	 * @return メソッドの戻り値
	 * @throws UnsupportedOperationException
	 * 				リフレクションによるメソッドの実行に失敗した場合
	 */
	public static Object invoke(
			Object object,
			String methodName,
			Object[] args) {
		try {
			return MethodUtils.invokeMethod(object, methodName, args);
		} catch (NoSuchMethodException e) {
			throw new UnsupportedOperationException(e);
		} catch (IllegalAccessException e) {
			throw new UnsupportedOperationException(e);
		} catch (InvocationTargetException e) {
			throw new UnsupportedOperationException(e);
		}
	}

	/**
	 * リフレクションによるメソッドの実行を行う。
	 * メソッドの引数が1つの場合のショートカット。
	 * @see {@link #invoke(Object, String, Object[])}
	 */
	public static Object invoke(Object object, String methodName, Object arg) {
		return invoke(object, methodName, new Object[] {arg});
	}

	/**
	 * リフレクションによるメソッドの実行を行う。
	 * メソッドの引数がない場合のショートカット。
	 * @see {@link #invoke(Object, String, Object[])}
	 */
	public static Object invoke(Object object, String methodName) {
		return invoke(object, methodName, null);
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd ">

<import resource="classpath:contexts/logging-context.xml"/>

</beans>


text:
package org.javers.core.json.typeadapter.commit;

import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import org.javers.core.json.JsonTypeAdapterTemplate;
import org.javers.core.metamodel.object.CdoSnapshotState;

/**
 * @author bartosz walacik
 */
public class CdoSnapshotStateTypeAdapter extends JsonTypeAdapterTemplate<CdoSnapshotState> {

    @Override
    public Class getValueType() {
        return CdoSnapshotState.class;
    }

    @Override
    public CdoSnapshotState fromJson(JsonElement json, JsonDeserializationContext jsonDeserializationContext) {
        throw new UnsupportedOperationException("use CdoSnapshotStateDeserializer");
    }

    @Override
    public JsonElement toJson(CdoSnapshotState snapshotState, JsonSerializationContext context) {
        JsonObject jsonObject = new JsonObject();
        snapshotState.forEachProperty( (pName, pValue) -> jsonObject.add(pName, context.serialize(pValue)));
        return jsonObject;
    }
}


text:
//! Implementation of the Get API

use serde::de::DeserializeOwned;

use serde::Deserialize;

use super::common::{OptionVal, Options};

use crate::{error::EsError, util::StrJoin, Client, EsResponse};

/// Values for the `preference` query parameter
pub enum Preference {
    Primary,
    Local,
}

impl From<Preference> for OptionVal {
    fn from(from: Preference) -> OptionVal {
        OptionVal(
            match from {
                Preference::Primary => "_primary",
                Preference::Local => "_local",
            }
            .to_owned(),
        )
    }
}

/// An ES GET operation, to get a document by ID
#[derive(Debug)]
pub struct GetOperation<'a, 'b> {
    /// The HTTP connection
    client: &'a mut Client,

    /// The index to load the document.
    index: &'b str,

    /// Optional type
    doc_type: Option<&'b str>,

    /// The ID of the document.
    id: &'b str,

    /// Optional options
    options: Options<'b>,
}

impl<'a, 'b> GetOperation<'a, 'b> {
    pub fn new(client: &'a mut Client, index: &'b str, id: &'b str) -> Self {
        GetOperation {
            client,
            index,
            doc_type: None,
            id,
            options: Options::default(),
        }
    }

    pub fn with_all_types(&'b mut self) -> &'b mut Self {
        self.doc_type = Some("_all");
        self
    }

    pub fn with_doc_type(&'b mut self, doc_type: &'b str) -> &'b mut Self {
        self.doc_type = Some(doc_type);
        self
    }

    pub fn with_fields(&'b mut self, fields: &[&'b str]) -> &'b mut Self {
        self.options.push("fields", fields.iter().join(","));
        self
    }

    add_option!(with_realtime, "realtime");
    add_option!(with_source, "_source");
    add_option!(with_routing, "routing");
    add_option!(with_preference, "preference");
    add_option!(with_refresh, "refresh");
    add_option!(with_version, "version");
    add_option!(with_version_type, "version_type");

    pub fn send<T>(&'b mut self) -> Result<GetResult<T>, EsError>
    where
        T: DeserializeOwned,
    {
        let url = format!(
            "/{}/{}/{}{}",
            self.index,
            self.doc_type.expect("No doc_type specified"),
            self.id,
            self.options
        );
        // We're ignoring status_code as all valid codes should return a value,
        // so anything else is an error.
        let response = self.client.get_op(&url)?;
        Ok(response.read_response()?)
    }
}

impl Client {
    /// Implementation of the ES GET API
    ///
    /// See: https://www.elastic.co/guide/en/elasticsearch/reference/1.x/docs-get.html
    pub fn get<'a>(&'a mut self, index: &'a str, id: &'a str) -> GetOperation {
        GetOperation::new(self, index, id)
    }
}

/// The result of a GET request
#[derive(Debug, Deserialize)]
pub struct GetResult<T> {
    #[serde(rename = "_index")]
    pub index: String,
    #[serde(rename = "_type")]
    pub doc_type: String,
    #[serde(rename = "_id")]
    pub id: String,
    #[serde(rename = "_version")]
    pub version: Option<u64>,
    pub found: bool,
    #[serde(rename = "_source")]
    pub source: Option<T>,
}

#[cfg(test)]
pub mod tests {
    use crate::tests::{clean_db, make_client, TestDocument};

    #[test]
    fn test_get() {
        let index_name = "test_get";
        let mut client = make_client();
        clean_db(&mut client, index_name);
        {
            let doc = TestDocument::new().with_int_field(3).with_bool_field(false);
            client
                .index(index_name, "test_type")
                .with_id("TEST_GETTING")
                .with_doc(&doc)
                .send()
                .unwrap();
        }
        {
            let mut getter = client.get(index_name, "TEST_GETTING");
            let result_wrapped = getter.with_doc_type("test_type").send();
            let result = result_wrapped.unwrap();
            assert_eq!(result.id, "TEST_GETTING");

            let source: TestDocument = result.source.expect("Source document");
            assert_eq!(source.str_field, "I am a test");
            assert_eq!(source.int_field, 3);
            assert_eq!(source.bool_field, false);
        }
    }
}


text:
layout: post
title: "基于scribe的日志服务器搭建"
description: ""
category: "tech"
tags: [scribe,thrift,fb303]
tagline: "2016-04-15"

---
{% include JB/setup %}

## thrift

https://github.com/facebook/scribe

	yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel
	./configure --without-csharp --without-erlang --without-perl--without-haskell --with-boost=/usr/local PY_PREFIX='/usr/local'
	make && make install

NOTE: with-boost、PY_PREFIX默认安装在/usr

## fb303

	 cd contrib/fb303
	./bootstrap.sh
	./configure CPPFLAGS='-DHAVE_NETINET_IN_H' --with-boost=/usr/local PY_PREFIX='/usr/local'
	make && make install

NOTE: CPPFLAGS='-DHAVE_NETINET_IN_H'解决找不到htonl、htons问题

## scribe

http://scribeserver.wiki.sourceforge.net/

	./bootstrap.sh
	./configure --prefix=/usr/local/scribe --with-boost=/usr/local PY_PREFIX='/usr/local' CPPFLAGS='-DHAVE_NETINET_IN_H'
	make && make install

* * * * * * * * * *
NOTE: It seems that boost 1.46.0 has new filesystem that has no member named 'filename',
so to build scribe successefully, I must modify file.cpp:line:248 from
	_return.push_back(dir_iter->filename());
to
	_return.push_back(dir_iter->path().filename().string());
* * * * * * * * * *
*
## 其他配置

	export BOOST_ROOT=/usr/local
	export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
	ldconfig -v
	export PYTHONPATH=/usr/local/lib/python2.7/site-packages

## 启动

	scribed path_to_conf_file.conf     #服务端启动
	scribed -c path_to_conf_file.conf     #客户端启动

存储可以从配置文件中动态读取,不需要停止服务就可以改变配置(未测试)

接口代码生成:

	thrift --gen <language> <Thrift filename>

## reference

- [protbuff thrift messagePack jason 序列化反系列号对比](https://github.com/eishay/jvm-serializers/wiki)
- [MessagePack, Protocol Buffers和Thrift序列化框架原理和比较说明](http://jimmee.iteye.com/blog/2042420)
- [scribe源码研究1](http://www.open-open.com/lib/view/open1326329155780.html)
- [scribe源码研究2](hhttp://www.cnblogs.com/brucewoo/archive/2011/12/14/2288183.html)


text:
<?php

/**
 * Represents an instance of a Support Ticket resource from the API.
 * Holds data for a Support Ticket and provides methods to retrive
 * objects related to the Support Ticket such as its Department, Responses, and Devices.
 *
 * @category   ColoCrossing
 * @package    ColoCrossing_Object
 */
class ColoCrossing_Object_SupportTicket extends ColoCrossing_Resource_Object
{

	/**
	 * Retrieves the Creation Date of the Support Ticket as
	 * a Unix Timestamp.
	 * @return int The Date The Support Ticket was Created.
	 */
	public function getDateCreated()
	{
		$created_at = $this->getValue('created_at');

		return $created_at && isset($created_at) ? strtotime($created_at) : null;
	}

	/**
	 * Retrieves the Last Updated Date of the Support Ticket as
	 * a Unix Timestamp.
	 * @return int The Date The Support Ticket was Updated.
	 */
	public function getDateUpdated()
	{
		$updated_at = $this->getValue('updated_at');

		return $updated_at && isset($updated_at) ? strtotime($updated_at) : null;
	}

	/**
	 * Retrieves the Status object.
	 * @return ColoCrossing_Object The Status
	 */
	public function getStatus()
	{
		return $this->getObject('status');
	}

	/**
	 * Retrieves the Priority object.
	 * @return ColoCrossing_Object The Priority
	 */
	public function getPriority()
	{
		return $this->getObject('priority');
	}

	/**
	 * Retrieves the Department object.
	 * @return ColoCrossing_Object The Department
	 */
	public function getDepartment()
	{
		$client = $this->getClient();

		return $this->getObject('department', $client->support_departments, null, null, false);
	}

	/**
	 * Retrieves the Assigned User object.
	 * @return ColoCrossing_Object_User The Assigned User
	 */
	public function getAssignee()
	{
		return $this->getObject('assignee', null, 'user');
	}

	/**
	 * Retrieves the Owner User object.
	 * @return ColoCrossing_Object_User The Owner
	 */
	public function getOwner()
	{
		return $this->getObject('owner', null, 'user');
	}

	/**
	 * Retrieves the Updater User object.
	 * @return ColoCrossing_Object_User The Updater
	 */
	public function getUpdatedBy()
	{
		return $this->getObject('updated_by', null, 'user');
	}

	/**
	 * Retrieves the Devices that are assigned to this Ticket.
	 * @return ColoCrossing_Collection<ColoCrossing_Object_Device> 	The Ticket's Devices
	 */
	public function getDevices(array $options = null)
	{
		$client = $this->getClient();

		return $client->devices->findByTicket($this->getId(), $options);
	}

	/**
	 * Retrieves the Responses that this Ticket has.
	 * @return ColoCrossing_Collection<ColoCrossing_Object_SupportResponse> 	The Ticket's Responses
	 */
	public function getResponses(array $options = null)
	{
		$client = $this->getClient();

		return $client->support_responses->findByTicket($this->getId(), $options);
	}

}


text:
import * as I from './data/interface';
import {Stats} from './stats';
import {toID, extend, assignWithout} from './util';
import {State} from './state';

const STATS = ['hp', 'atk', 'def', 'spa', 'spd', 'spe'] as I.StatID[];
const SPC = new Set(['spc']);

export class Pokemon implements State.Pokemon {
  gen: I.Generation;
  name: I.SpeciesName;
  species: I.Specie;

  types: [I.TypeName] | [I.TypeName, I.TypeName];
  weightkg: number;

  level: number;
  gender?: I.GenderName;
  ability?: I.AbilityName;
  abilityOn?: boolean;
  isDynamaxed?: boolean;
  item?: I.ItemName;

  nature: I.NatureName;
  ivs: I.StatsTable;
  evs: I.StatsTable;
  boosts: I.StatsTable;
  rawStats: I.StatsTable;
  stats: I.StatsTable;

  originalCurHP: number;
  status: I.StatusName | '';
  toxicCounter: number;

  moves: I.MoveName[];

  constructor(
    gen: I.Generation,
    name: string,
    options: Partial<State.Pokemon> & {
      curHP?: number;
      ivs?: Partial<I.StatsTable> & {spc?: number};
      evs?: Partial<I.StatsTable> & {spc?: number};
      boosts?: Partial<I.StatsTable> & {spc?: number};
    } = {}
  ) {
    this.species = extend(true, {}, gen.species.get(toID(name)), options.overrides);

    this.gen = gen;
    this.name = options.name || name as I.SpeciesName;
    this.types = this.species.types;
    this.isDynamaxed = !!options.isDynamaxed;
    this.weightkg = this.species.weightkg;
    // Gigantamax 'forms' inherit weight from their base species when not dynamaxed
    // TODO: clean this up with proper Gigantamax support
    if (this.weightkg === 0 && !this.isDynamaxed && this.species.baseSpecies) {
      this.weightkg = gen.species.get(toID(this.species.baseSpecies))!.weightkg;
    }

    this.level = options.level || 100;
    this.gender = options.gender || this.species.gender || 'M';
    this.ability = options.ability || this.species.abilities?.[0] || undefined;
    this.abilityOn = !!options.abilityOn;

    this.item = options.item;
    this.nature = options.nature || ('Serious' as I.NatureName);
    this.ivs = Pokemon.withDefault(gen, options.ivs, 31);
    this.evs = Pokemon.withDefault(gen, options.evs, gen.num >= 3 ? 0 : 252);
    this.boosts = Pokemon.withDefault(gen, options.boosts, 0, false);

    if (gen.num < 3) {
      this.ivs.hp = Stats.DVToIV(
        Stats.getHPDV({
          atk: this.ivs.atk,
          def: this.ivs.def,
          spe: this.ivs.spe,
          spc: this.ivs.spa,
        })
      );
    }

    this.rawStats = {} as I.StatsTable;
    this.stats = {} as I.StatsTable;
    for (const stat of STATS) {
      const val = this.calcStat(gen, stat);
      this.rawStats[stat] = val;
      this.stats[stat] = val;
    }

    const curHP = options.curHP || options.originalCurHP;
    this.originalCurHP = curHP && curHP <= this.rawStats.hp ? curHP : this.rawStats.hp;
    this.status = options.status || '';
    this.toxicCounter = options.toxicCounter || 0;
    this.moves = options.moves || [];
  }

  maxHP(original = false) {
    // Shedinja still has 1 max HP during the effect even if its Dynamax Level is maxed (DaWoblefet)
    return !original && this.isDynamaxed && this.species.baseStats.hp !== 1
      ? this.rawStats.hp * 2
      : this.rawStats.hp;
  }

  curHP(original = false) {
    // Shedinja still has 1 max HP during the effect even if its Dynamax Level is maxed (DaWoblefet)
    return !original && this.isDynamaxed && this.species.baseStats.hp !== 1
      ? this.originalCurHP * 2
      : this.originalCurHP;
  }

  hasAbility(...abilities: string[]) {
    return !!(this.ability && abilities.includes(this.ability));
  }

  hasItem(...items: string[]) {
    return !!(this.item && items.includes(this.item));
  }

  hasStatus(...statuses: I.StatusName[]) {
    return !!(this.status && statuses.includes(this.status));
  }

  hasType(...types: I.TypeName[]) {
    for (const type of types) {
      if (this.types.includes(type)) return true;
    }
    return false;
  }

  named(...names: string[]) {
    return names.includes(this.name);
  }

  clone() {
    return new Pokemon(this.gen, this.name, {
      level: this.level,
      ability: this.ability,
      abilityOn: this.abilityOn,
      isDynamaxed: this.isDynamaxed,
      item: this.item,
      gender: this.gender,
      nature: this.nature,
      ivs: extend(true, {}, this.ivs),
      evs: extend(true, {}, this.evs),
      boosts: extend(true, {}, this.boosts),
      originalCurHP: this.originalCurHP,
      status: this.status,
      toxicCounter: this.toxicCounter,
      moves: this.moves.slice(),
      overrides: this.species,
    });
  }

  private calcStat(gen: I.Generation, stat: I.StatID) {
    return Stats.calcStat(
      gen,
      stat,
      this.species.baseStats[stat],
      this.ivs[stat]!,
      this.evs[stat]!,
      this.level,
      this.nature
    );
  }

  static getForme(
    gen: I.Generation,
    speciesName: string,
    item?: I.ItemName,
    moveName?: I.MoveName
  ) {
    const species = gen.species.get(toID(speciesName));
    if (!species || !species.otherFormes) {
      return speciesName;
    }

    let i = 0;
    if (
      (item &&
        ((item.includes('ite') && !item.includes('ite Y')) ||
          (speciesName === 'Groudon' && item === 'Red Orb') ||
          (speciesName === 'Kyogre' && item === 'Blue Orb'))) ||
      (moveName && speciesName === 'Meloetta' && moveName === 'Relic Song') ||
      (speciesName === 'Rayquaza' && moveName === 'Dragon Ascent')
    ) {
      i = 1;
    } else if (item?.includes('ite Y')) {
      i = 2;
    }

    return i ? species.otherFormes[i - 1] : species.name;
  }

  private static withDefault(
    gen: I.Generation,
    current: Partial<I.StatsTable> & {spc?: number} | undefined,
    val: number,
    match = true,
  ) {
    const cur: Partial<I.StatsTable> = {};
    if (current) {
      assignWithout(cur, current, SPC);
      if (current.spc) {
        cur.spa = current.spc;
        cur.spd = current.spc;
      }
      if (match && gen.num <= 2 && current.spa !== current.spd) {
        throw new Error('Special Attack and Special Defense must match before Gen 3');
      }
    }
    return {hp: val, atk: val, def: val, spa: val, spd: val, spe: val, ...cur};
  }
}


text:
void callback(const std_msgs::Int32::ConstPtr &msg) {  // <1>
  std::cout << msg->data << std::endl;
}

int main(int argc, char **argv) {
  ros::init(argc, argv, "count_subscriber");
  ros::NodeHandle node;

  ros::Subscriber sub = node.subscribe("counter", 10, callback);  // <2>

  ros::spin();
}


text:
<?xml version="1.0" encoding="utf-8"?><quotes>
<section name="Surah 11. Hud" id="179">
  <quote id="5795">
    <introtext><![CDATA[In the name of Allah, the Beneficent, the Merciful.
]]></introtext>
	<text><![CDATA[Alif Lam Ra (This is) a Book, whose verses are made decisive, then are they made plain, from the Wise, All-aware:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5796">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[That you shall not serve (any) but Allah; surely I am a warner for you from Him and a giver of good news,]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5797">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And you that ask forgiveness of your Lord, then turn to Him; He will provide you with a goodly provision to an appointed term and bestow His grace on every one endowed with grace, and if you turn back, then surely I fear for you the chastisement of a great day.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5798">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[To Allah is your return, and He has power over all things.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5799">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Now surely they fold up their breasts that they may conceal (their enmity) from Him; now surely, when they use their garments as a covering, He knows what they conceal and what they make public; surely He knows what is in the breasts.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5800">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And there is no animal in the earth but on Allah is the sustenance of it, and He knows its resting place and its depository all (things) are in a manifest book.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5801">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And He it is Who created the heavens and the earth in six periods — and His dominion (extends) on the water — that He might manifest to you, which of you is best in action, and if you say, surely you shall be raised up after death, those who disbelieve would certainly say: This is nothing but clear magic.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5802">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And if We hold back from them the punishment until a stated period of time, they will certainly say: What prevents it? Now surely on the day when it will come to them, it shall not be averted from them and that which they scoffed at shall beset them.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5803">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And if We make man taste mercy from Us, then take it off from him, most surely he is despairing, ungrateful.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5804">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And if We make him taste a favor after distress has afflicted him, he will certainly say: The evils are gone away from me. Most surely he is exulting, boasting;]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5805">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Except those who are patient and do good, they shall have forgiveness and a great reward.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5806">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Then, it may be that you will give up part of what is revealed to you and your breast will become straitened by it because they say: Why has not a treasure been sent down upon him or an angel come with him? You are only a warner; and Allah is custodian over all things.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5807">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Or, do they say: He has forged it. Say: Then bring ten forged chapters like it and call upon whom you can besides Allah, if you are truthful.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5808">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[But if they do not answer you, then know that it is revealed by Allah's knowledge and that there is no god but He; will you then submit?]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5809">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Whoever desires this world's life and its finery, We will pay them in full their deeds therein, and they shall not be made to. suffer loss in respect of them.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5810">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[These are they for whom there is nothing but fire in the hereafter, and what they wrought in it shall go for nothing, and vain is what they do.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5811">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Is he then who has with him clear proof from his Lord, and a witness from Him recites it and before it (is) the Book of Musa, a guide and a mercy? These believe in it; and whoever of the (different) parties disbelieves in it, surely it is the truth from your Lord, but most men do not believe.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5812">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And who is more unjust than he who forges a lie against Allah? These shall be brought before their Lord, and the witnesses shall say: These are they who lied against their Lord. Now surely the curse of Allah is on the unjust.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5813">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Who turn away from the path of Allah and desire to make it crooked; and they are disbelievers in the hereafter.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5814">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[These shall not escape in the earth, nor shall they have any guardians besides Allah; the punishment shall be doubled for them, they could not bear to hear and they did not see.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5815">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[These are they who have lost their souls, and what they forged is gone from them.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5816">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Truly in the hereafter they are the greatest losers.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5817">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Surely (as to) those who believe and do good and humble themselves to their Lord, these are the dwellers of the garden, in it they will abide.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5818">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[The likeness of the two parties is as the blind and the deaf and the seeing and the hearing: are they equal in condition? Will you not then mind?]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5819">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And certainly We sent Nuh to his people: Surely I am a plain warner for you:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5820">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[That you shall not serve any but Allah, surely I fear for you the punishment of a painful day.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5821">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[But the chiefs of those who disbelieved from among his people said: We do not consider you but a mortal like ourselves, and we do not see any have followed you but those who are the meanest of us at first thought and we do not see in you any excellence over us; nay, we deem you liars.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5822">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[He said: O my people! tell me if I have with me clear proof from my Lord, and He has granted me mercy from Himself and it has been made obscure to you; shall we constrain you to (accept) it while you are averse from it?]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5823">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And, O my people! I ask you not for wealth in return for it; my reward is only with Allah and I am not going to drive away those who believe; surely they shall meet their Lord, but I consider you a people who are ignorant:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5824">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And, O my people! who will help me against Allah if I drive them away? Will you not then mind?]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5825">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And I do not say to you that I have the treasures of Allah and I do not know the unseen, nor do I say that I am an angel, nor do I say about those whom your eyes hold in mean estimation (that) Allah will never grant them (any) good — Allah knows best what is in their souls — for then most surely I should be of the unjust.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5826">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[They said: O Nuh! indeed you have disputed with us and lengthened dispute with us, therefore bring to us what you threaten us with, if you are of the truthful ones.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5827">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[He said: Allah only will bring it to you if He please, and you will not escape:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5828">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And if I intend to give you good advice, my advice will not profit you if Allah intended that He should leave you to go astray; He is your Lord, and to Him shall you be returned.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5829">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Or do they say: He has forged it? Say: If I have forged it, on me is my guilt, and I am clear of that of which you are guilty.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5830">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And it was revealed to Nuh: That none of your people will believe except those who have already believed, therefore do not grieve at what they do:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5831">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And make the ark before Our eyes and (according to) Our revelation, and do not speak to Me in respect of those who are unjust; surely they shall be drowned.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5832">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And he began to make the ark; and whenever the chiefs from among his people passed by him they laughed at him. He said: If you laugh at us, surely we too laugh at you as you laugh (at us).]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5833">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[So shall you know who it is on whom will come a chastisement which will disgrace him, and on whom will lasting chastisement come down.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5834">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Until when Our command came and water came forth from the valley, We said: Carry in it two of all things, a pair, and your own family — except those against whom the word has already gone forth, and those who believe. And there believed not with him but a few.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5835">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And he said: Embark in it, in the name of Allah be its sailing and its anchoring; most surely my Lord is Forgiving, Merciful.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5836">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And it moved on with them amid waves like mountains; and Nuh called out to his son, and he was aloof: O my son! embark with us and be not with the unbelievers.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5837">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[He said: I will betake myself for refuge to a mountain that shall protect me from the water. Nuh said: There is no protector today from Allah's punishment but He Who has mercy; and a wave intervened between them, so he was of the drowned.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5838">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And it was said: O earth, swallow down your water, and O cloud, clear away; and the water was made to abate and the affair was decided, and the ark rested on the Judi, and it was said: Away with the unjust people.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5839">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And Nuh cried out to his Lord and said: My Lord! surely my son is of my family, and Thy promise is surely true, and Thou art the most just of the judges.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5840">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[He said: O Nuh! surely he is not of your family; surely he is (the doer of) other than good deeds, therefore ask not of Me that of which you have no knowledge; surely I admonish you lest you may be of the ignorant.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5841">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[He said: My Lord! I seek refuge in Thee from asking Thee that of which I have no knowledge; and if Thou shouldst not forgive me and have mercy on me, I should be of the losers.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5842">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[It was said: O Nuh! descend with peace from Us and blessings on you and on the people from among those who are with you, and there shall be nations whom We will afford provisions, then a painful punishment from Us shall afflict them.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5843">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[These are announcements relating to the unseen which We reveal to you, you did not know them — (neither) you nor your people — before this; therefore be patient; surely the end is for those who guard (against evil).]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5844">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And to Ad (We sent) their brother Hud. He said: O my people! serve Allah, you have no god other than He; you are nothing but forgers (of lies).]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5845">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[O my people! I do not ask of you any reward for it; my reward is only with Him Who created me; do you not then understand?]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5846">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And, O my people! ask forgiveness of your Lord, then turn to Him; He will send on you clouds pouring down abundance of rain and add strength to your strength, and do not turn back guilty.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5847">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[They said: O Hud! you have not brought to us any clear argument and we are not going to desert our gods for your word, and we are not believers in you:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5848">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[We cannot say aught but that some of our gods have smitten you with evil. He said: Surely I call Allah to witness, and do you bear witness too, that I am clear of what you associate (with Allah).]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5849">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Besides Him, therefore scheme against me all together; then give me no respite:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5850">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Surely I rely on Allah, my Lord and your Lord; there is no living creature but He holds it by its forelock; surely my Lord is on the right path.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5851">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[But if you turn back, then indeed I have delivered to you the message with which I have been sent to you, and my Lord will bring another people in your place, and you cannot do Him any harm; surely my Lord is the Preserver of all things.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5852">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And when Our decree came to pass, We delivered Hud and those who believed with him with mercy from Us, and We delivered them from a hard chastisement.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5853">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And this was Ad; they denied the communications of their Lord, and disobeyed His apostles and followed the bidding of every insolent opposer (of truth).]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5854">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And they were overtaken by curse in this world and on the resurrection day; now surely Ad disbelieved in their Lord; now surely, away with Ad, the people of Hud.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5855">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And to Samood (We sent) their brother Salih. He said: O my people! serve Allah, you have no god other than He; He brought you into being from the earth, and made you dwell in it, therefore ask forgiveness of Him, then turn to Him; surely my Lord is Nigh, Answering.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5856">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[They said: O Salih! surely you were one amongst us in whom great expectations were placed before this; do you (now) forbid us from worshipping what our fathers worshipped? And as to that which you call us to, most surely we are in disquieting doubt.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5857">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[He said: O my people! tell me if I have clear proof from my Lord and He has granted to me mercy from Himself — who will then help me against Allah if I disobey Him? Therefore you do not add to me other than loss:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5858">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And, O my people! this will be (as) Allah's she-camel for you, a sign; therefore leave her to pasture on Allah's earth and do not touch her with evil, for then a near chastisement will overtake you.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5859">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[But they slew her, so he said: Enjoy yourselves in your abode for three days, that is a promise not to be belied.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5860">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[So when Our decree came to pass, We delivered Salih and those who believed with him by mercy from Us, and (We saved them) from the disgrace of that day; surely your Lord is the Strong, the Mighty.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5861">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And the rumbling overtook those who were unjust, so they became motionless bodies in their abodes,]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5862">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[As though they had never dwelt in them; now surely did Samood disbelieve in their Lord; now surely, away with Samood.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5863">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And certainly Our messengers came to Ibrahim with good news. They said: Peace. Peace, said he, and he made no delay in bringing a roasted calf.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5864">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[But when he saw that their hands were not extended towards it, he deemed them strange and conceived fear of them. . They said: Fear not, surely we are sent to Lut's people.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5865">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And his wife was standing (by), so she laughed, then We gave her the good news of Ishaq and after Ishaq of (a son's son) Yaqoub.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5866">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[She said: O wonder! shall I bear a son when I am an extremely old woman and this my husband an extremely old man? Most surely this is a wonderful thing.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5867">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[They said: Do you wonder at Allah's bidding? The mercy of Allah and His blessings are on you, O people of the house, surely He is Praised, Glorious.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5868">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[So when fear had gone away from Ibrahim and good news came to him, he began to plead with Us for Lut's people.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5869">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Most surely Ibrahim was forbearing, tender-hearted, oft-returning (to Allah):]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5870">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[O Ibrahim! leave off this, surely the decree of your Lord has come to pass, and surely there must come to them a chastisement that cannot be averted.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5871">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And when Our messengers came to Lut, he was grieved for them, and he lacked strength to protect them, and said: This is a hard day.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5872">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And his people came to him, (as if) rushed on towards him, and already they did evil deeds. He said: O my people! these are my daughters — they are purer for you, so guard against (the punishment of) Allah and do not disgrace me with regard to my guests; is there not among you one right-minded man?]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5873">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[They said: Certainly you know that we have no claim on your daughters, and most surely you know what we desire.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5874">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[He said: Ah! that I had power to suppress you, rather I shall have recourse to a strong support.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5875">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[They said: O Lut! we are the messengers of your Lord; they shall by no means reach you; so remove your followers in a part of the night — and let none of you turn back — except your wife, for surely whatsoever befalls them shall befall her; surely their appointed time is the morning; is not the morning nigh?]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5876">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[So when Our decree came to pass, We turned them upside down and rained down upon them stones, of what had been decreed, one after another.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5877">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Marked (for punishment) with your Lord and it is not far off from the unjust.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5878">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And to Madyan (We sent) their brother Shu'aib. He said: O my people! serve Allah, you have no god other than He, and do not give short measure and weight: surely I see you in prosperity and surely I fear for you the punishment of an all-encompassing day.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5879">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And, O my people! give full measure and weight fairly, and defraud not men their things, and do not act corruptly in the land, making mischief:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5880">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[What remains with Allah is better for you if you are believers, and I am not a keeper over you.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5881">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[They said: O Shu'aib! does your prayer enjoin you that we should forsake what our fathers worshipped or that we should not do what we please with regard to our property? Forsooth you are the forbearing, the right-directing one.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5882">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[He said: O my people! have you considered if I have a clear proof from my Lord and He has given me a goodly sustenance from Himself, and I do not desire that in opposition to you I should betake myself to that which I forbid you: I desire nothing but reform so far as I am able, and with none but Allah is the direction of my affair to a right issue; on Him do I rely and to Him do I turn:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5883">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And, O my people! let not opposition to me make you guilty so that there may befall you the like of what befell the people of Nuh, or the people of Hud, or the people of Salih, nor are the people of Lut far off from you;]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5884">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And ask forgiveness of your Lord, then turn to Him; surely my Lord is Merciful, Loving-kind.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5885">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[They said: O Shu'aib! we do not understand much of what you say and most surely we see you to be weak among us, and were it not for your family we would surely stone you, and you are not mighty against us.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5886">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[He said: O my people! is my family more esteemed by you than Allah? And you neglect Him as a thing cast behind your back; surely my Lord encompasses what you do:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5887">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And, O my people! act according to your ability, I too am acting; you will come to know soon who it is on whom will light the punishment that will disgrace him and who it is that is a liar, and watch, surely I too am watching with you.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5888">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And when Our decree came to pass We delivered Shu'aib, and those who believed with him by mercy from Us, and the rumbling overtook those who were unjust so they became motionless bodies in their abodes,]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5889">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[As though they had never dwelt in them; now surely perdition overtook Madyan as had perished Samood.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5890">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And certainly We sent Musa with Our communications and a clear authority,]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5891">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[To Firon and his chiefs, but they followed the bidding of Firon, and Firon's bidding was not right-directing.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5892">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[He shall lead his people on the resurrection day, and bring them down to the fire; and evil the place to which they are brought.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5893">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And they are overtaken by curse in this (world), and on the resurrection day, evil the gift which shall be given.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5894">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[This is an account of (the fate of) the towns which We relate to you; of them are some that stand and (others) mown down.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5895">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And We did not do them injustice, but they were unjust to themselves, so their gods whom they called upon besides Allah did not avail them aught when the decree of your Lord came to pass; and they added but to their ruin.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5896">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And such is the punishment of your Lord when He punishes the towns while they are unjust; surely His punishment is painful, severe.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5897">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Most surely there is a sign in this for him who fears the chastisement of the hereafter; this is a day on which the people shall be gathered together and this is a day that shall be witnessed.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5898">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And We do not delay it but to an appointed term.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5899">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[On the day when it shall come, no soul shall speak except with His permission, then (some) of them shall be unhappy and (others) happy.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5900">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[So as to those who are unhappy, they shall be in the fire; for them shall be sighing and groaning in it:]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5901">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Abiding therein so long as the heavens and the earth endure, except as your Lord please; surely your Lord is the mighty doer of what He intends.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5902">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And as to those who are made happy, they shall be in the garden, abiding in it as long as the heavens and the earth endure, except as your Lord please; a gift which shall never be cut off.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5903">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Therefore be not in doubt as to what these worship; they do not worship but as their fathers worshipped before; and most surely We will pay them back in full their portion undiminished.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5904">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And certainly We gave the book to Musa, but it was gone against; and had not a word gone forth from your Lord, the matter would surely have been decided between them; and surely they are in a disquieting doubt about it.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5905">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And your Lord will most surely pay back to all their deeds in full; surely He is aware of what they do.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5906">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Continue then in the right way as you are commanded, as also he who has turned (to Allah) with you, and be not inordinate (O men!), surely He sees what you do.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5907">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And do not incline to those who are unjust, lest the fire touch you, and you have no guardians besides Allah, then you shall not be helped.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5908">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And keep up prayer in the two parts of the day and in the first hours of the night; surely good deeds take away evil deeds this is a reminder to the mindful.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5909">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And be patient, for surely Allah does not waste the reward of the good-doers.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5910">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[But why were there not among the generations before you those possessing understanding, who should have forbidden the making of mischief in the earth, except a few of those whom We delivered from among them? And those who were unjust went after what they are made to enjoy of plenty, and they were guilty.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5911">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And it did not beseem your Lord to have destroyed the towns tyrannously, while their people acted well.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5912">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And if your Lord had pleased He would certainly have made people a single nation, and they shall continue to differ.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5913">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[Except those on whom your Lord has mercy; and for this did He create them; and the word of your Lord is fulfilled: Certainly I will fill hell with the jinn and the men, all together.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5914">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And all we relate to you of the accounts of the apostles is to strengthen your heart therewith; and in this has come to you the truth and an admonition, and a reminder to the believers.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5915">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And say to those who do not believe: Act according to your state; surely we too are acting.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5916">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And wait; surely we are waiting also.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
    <quote id="5917">
    <introtext><![CDATA[]]></introtext>
	<text><![CDATA[And Allah's is the unseen in the heavens and the earth, and to Him is returned the whole of the affair; therefore serve Him and rely on Him, and your Lord is not heedless of what you do.]]></text>
 	<author><![CDATA[Qur'an]]></author>
  	<reference><![CDATA[Surah 11]]></reference>
    <language>en</language>
    <url><![CDATA[]]></url>
  </quote>
  </section>
</quotes>


text:
/* ----------------------------------------------------------------------------------
 * Hint: This is a derived (generated) file. Changes should be done in the underlying
 * source files only (*.control, *.js) or they will be lost after the next generation.
 * ---------------------------------------------------------------------------------- */

// Provides control sap.m.CustomListItem.
jQuery.sap.declare("sap.m.CustomListItem");
jQuery.sap.require("sap.m.library");
jQuery.sap.require("sap.m.ListItemBase");

/**
 * Constructor for a new CustomListItem.
 *
 * Accepts an object literal mSettings that defines initial
 * property values, aggregated and associated objects as well as event handlers.
 *
 * If the name of a setting is ambiguous (e.g. a property has the same name as an event),
 * then the framework assumes property, aggregation, association, event in that order.
 * To override this automatic resolution, one of the prefixes "aggregation:", "association:"
 * or "event:" can be added to the name of the setting (such a prefixed name must be
 * enclosed in single or double quotes).
 *
 * The supported settings are:
 *

 *
Properties
 *

 *

 *
Aggregations
 *

 *
{@link #getContent content} (default aggregation) : sap.ui.core.Control[]

 *

 *
Associations
 *

 *

 *
Events
 *

 *

 *

 *
 *
 * In addition, all settings applicable to the base type {@link sap.m.ListItemBase#constructor sap.m.ListItemBase}
 * can be used as well.
 *
 * @param {string} [sId] id for the new control, generated automatically if no id is given
 * @param {object} [mSettings] initial settings for the new control
 *
 * @class
 * This control with a content aggregation can be used to customize standard list items that we don't provide. List mode and ListItem type are applied to CustomListItems as well.
 * Note: Even the content aggregation allows any control, complex responsive layout controls (e.g. Table, Form) should not be aggregated as content.
 *
 *
 * @extends sap.m.ListItemBase
 *
 * @author SAP AG
 * @version 1.22.10
 *
 * @constructor
 * @public
 * @name sap.m.CustomListItem
 */
sap.m.ListItemBase.extend("sap.m.CustomListItem", { metadata : {

	// ---- object ----

	// ---- control specific ----
	library : "sap.m",
	defaultAggregation : "content",
	aggregations : {
    	"content" : {type : "sap.ui.core.Control", multiple : true, singularName : "content", bindable : "bindable"}
	}
}});

/**
 * Creates a new subclass of class sap.m.CustomListItem with name sClassName
 * and enriches it with the information contained in oClassInfo.
 *
 * oClassInfo might contain the same kind of informations as described in {@link sap.ui.core.Element.extend Element.extend}.
 *
 * @param {string} sClassName name of the class to be created
 * @param {object} [oClassInfo] object literal with informations about the class
 * @param {function} [FNMetaImpl] constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata.
 * @return {function} the created class / constructor function
 * @public
 * @static
 * @name sap.m.CustomListItem.extend
 * @function
 */

/**
 * Getter for aggregation content.

 * The content of this list item
 *
 * Note: this is the default aggregation for CustomListItem.
 * @return {sap.ui.core.Control[]}
 * @public
 * @name sap.m.CustomListItem#getContent
 * @function
 */

/**
 * Inserts a content into the aggregation named content.
 *
 * @param {sap.ui.core.Control}
 *          oContent the content to insert; if empty, nothing is inserted
 * @param {int}
 *             iIndex the 0-based index the content should be inserted at; for
 *             a negative value of iIndex, the content is inserted at position 0; for a value
 *             greater than the current size of the aggregation, the content is inserted at
 *             the last position
 * @return {sap.m.CustomListItem} this to allow method chaining
 * @public
 * @name sap.m.CustomListItem#insertContent
 * @function
 */

/**
 * Adds some content oContent
 * to the aggregation named content.
 *
 * @param {sap.ui.core.Control}
 *            oContent the content to add; if empty, nothing is inserted
 * @return {sap.m.CustomListItem} this to allow method chaining
 * @public
 * @name sap.m.CustomListItem#addContent
 * @function
 */

/**
 * Removes an content from the aggregation named content.
 *
 * @param {int | string | sap.ui.core.Control} vContent the content to remove or its index or id
 * @return {sap.ui.core.Control} the removed content or null
 * @public
 * @name sap.m.CustomListItem#removeContent
 * @function
 */

/**
 * Removes all the controls in the aggregation named content.

 * Additionally unregisters them from the hosting UIArea.
 * @return {sap.ui.core.Control[]} an array of the removed elements (might be empty)
 * @public
 * @name sap.m.CustomListItem#removeAllContent
 * @function
 */

/**
 * Checks for the provided sap.ui.core.Control in the aggregation named content
 * and returns its index if found or -1 otherwise.
 *
 * @param {sap.ui.core.Control}
 *            oContent the content whose index is looked for.
 * @return {int} the index of the provided control in the aggregation if found, or -1 otherwise
 * @public
 * @name sap.m.CustomListItem#indexOfContent
 * @function
 */

/**
 * Destroys all the content in the aggregation
 * named content.
 * @return {sap.m.CustomListItem} this to allow method chaining
 * @public
 * @name sap.m.CustomListItem#destroyContent
 * @function
 */

/**
 * Binder for aggregation content.
 *
 * @param {string} sPath path to a list in the model
 * @param {sap.ui.core.Element} oTemplate the control template for this aggregation
 * @param {sap.ui.model.Sorter} oSorter the initial sort order (optional)
 * @param {array} aFilters the predefined filters for this aggregation (optional)
 * @return {sap.m.CustomListItem} this to allow method chaining
 * @public
 * @name sap.m.CustomListItem#bindContent
 * @function
 */

/**
 * Unbinder for aggregation content.
 *
 * @return {sap.m.CustomListItem} this to allow method chaining
 * @public
 * @name sap.m.CustomListItem#unbindContent
 * @function
 */

// Start of sap\m\CustomListItem.js


text:
using GameLibrary.Dependencies.Entities;
using Microsoft.Xna.Framework;

namespace GameLibrary.Entities.Components
{
    /// <summary>
    /// An interface which specifies if a component posses a transformation.
    /// </summary>
    public interface ITransform : Component
    {
        /// <summary>
        /// The Position of a component
        /// </summary>
        Vector2 Position { set; get; }

        /// <summary>
        /// The rotation of a component.
        /// </summary>
        float Rotation { set; get; }

        void RotateTo(Vector2 direction);
    }
}


text:
class AddPreferencesToAppointmentSummaries < ActiveRecord::Migration[4.2]
  def change
    add_column :appointment_summaries, :continue_working, :boolean
    add_column :appointment_summaries, :unsure, :boolean
    add_column :appointment_summaries, :leave_inheritance, :boolean
    add_column :appointment_summaries, :wants_flexibility, :boolean
    add_column :appointment_summaries, :wants_security, :boolean
    add_column :appointment_summaries, :wants_lump_sum, :boolean
    add_column :appointment_summaries, :poor_health, :boolean
  end
end


text:
package cinemovie.views.components;

import cinemovie.views.components.FilmeFrame;
import cinemovie.core.Filme;
import cinemovie.core.Usuario;
import cinemovie.dao.FilmeDAO;
import cinemovie.servicos.ServicoLogin;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

/**
 * Card de filme para o grid principal.
 * @author Danilo Carolino
 */
public class FilmeFavoritoCard extends javax.swing.JPanel {

  private Filme filme = null;
  private JFrame frame = null;

  public FilmeFavoritoCard(Filme filme, JFrame frame) {
    this.filme = filme;
    this.frame = frame;
    initComponents();
    setSize(580, 300);
    setPreferredSize(new Dimension(580, 300));
    jLabel4.setText(filme.getSinopse());
    jLabel3.setText("(" + filme.getAnoLancamento().toString() + ")");
    jLabel2.setText(filme.getNome());
    jButton1.addActionListener((ActionEvent e) -> {
      FilmeFrame f = new FilmeFrame(filme);
      f.setLocationRelativeTo(null);
      f.setVisible(true);
      f.pack();
    });
    jButton2.setVisible(false);
  }

  public void setRemoveButtonVisible(Boolean b) {
    jButton2.setVisible(b);
  }

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

    jButton1 = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jButton2 = new javax.swing.JButton();

    setFocusable(false);
    setMaximumSize(new java.awt.Dimension(150, 800));
    setPreferredSize(new java.awt.Dimension(200, 500));
    setRequestFocusEnabled(false);
    setSize(new java.awt.Dimension(150, 500));

    jButton1.setText("Ver Filme");

    jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cinemovie/images/movie.jpg"))); // NOI18N
    jLabel1.setFocusable(false);
    jLabel1.setMaximumSize(new java.awt.Dimension(100, 200));
    jLabel1.setMinimumSize(new java.awt.Dimension(0, 0));
    jLabel1.setPreferredSize(new java.awt.Dimension(0, 0));

    jLabel2.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N
    jLabel2.setText("Movie name Here");

    jLabel3.setText("(2012)");

    jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    jLabel4.setText("Harry Potter and the Sorcerer's Stone é um filme britânico-americano de aventura e fantasia baseado no livro homônimo de J. K.");
    jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel4.setFocusable(false);
    jLabel4.setIconTextGap(5);

    jButton2.setText("Remover");
    jButton2.setActionCommand("");
    jButton2.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        jButton2ActionPerformed(evt);
      }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createSequentialGroup()
        .addContainerGap()
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
          .addComponent(jLabel3)
          .addGroup(layout.createSequentialGroup()
            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 300, Short.MAX_VALUE)))
        .addContainerGap())
      .addGroup(layout.createSequentialGroup()
        .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addGap(0, 0, Short.MAX_VALUE))
    );
    layout.setVerticalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE))
          .addGroup(layout.createSequentialGroup()
            .addGap(19, 19, 19)
            .addComponent(jLabel4)))
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addComponent(jLabel3)
        .addGap(18, 18, 18)
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
          .addComponent(jButton1)
          .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
        .addGap(215, 215, 215))
    );

    jLabel4.getAccessibleContext().setAccessibleDescription("");
  }// </editor-fold>//GEN-END:initComponents

  private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
    Usuario usuario = ServicoLogin.getInstancia().getSessao();
    Boolean res = FilmeDAO.getInstancia().removerFilmeFavorito(filme, usuario);
    JOptionPane.showMessageDialog(null, "Favorito removido com sucesso.");
    frame.revalidate();
    frame.repaint();
  }//GEN-LAST:event_jButton2ActionPerformed

  // Variables declaration - do not modify//GEN-BEGIN:variables
  private javax.swing.JButton jButton1;
  private javax.swing.JButton jButton2;
  private javax.swing.JLabel jLabel1;
  private javax.swing.JLabel jLabel2;
  private javax.swing.JLabel jLabel3;
  private javax.swing.JLabel jLabel4;
  // End of variables declaration//GEN-END:variables
}


text:
typedef void (*board_init)(void);
typedef void (*board_enable_can_transceiver)(uint8_t transceiver, bool enabled);
typedef void (*board_enable_can_transceivers)(bool enabled);
typedef void (*board_set_led)(uint8_t color, bool enabled);
typedef void (*board_set_usb_power_mode)(uint8_t mode);
typedef void (*board_set_gps_mode)(uint8_t mode);
typedef void (*board_set_can_mode)(uint8_t mode);
typedef void (*board_usb_power_mode_tick)(uint32_t uptime);
typedef bool (*board_check_ignition)(void);
typedef uint32_t (*board_read_current)(void);
typedef void (*board_set_ir_power)(uint8_t percentage);
typedef void (*board_set_fan_power)(uint8_t percentage);
typedef void (*board_set_phone_power)(bool enabled);
typedef void (*board_set_clock_source_mode)(uint8_t mode);
typedef void (*board_set_siren)(bool enabled);

struct board {
  const char *board_type;
  const harness_configuration *harness_config;
  board_init init;
  board_enable_can_transceiver enable_can_transceiver;
  board_enable_can_transceivers enable_can_transceivers;
  board_set_led set_led;
  board_set_usb_power_mode set_usb_power_mode;
  board_set_gps_mode set_gps_mode;
  board_set_can_mode set_can_mode;
  board_usb_power_mode_tick usb_power_mode_tick;
  board_check_ignition check_ignition;
  board_read_current read_current;
  board_set_ir_power set_ir_power;
  board_set_fan_power set_fan_power;
  board_set_phone_power set_phone_power;
  board_set_clock_source_mode set_clock_source_mode;
  board_set_siren set_siren;
};

// ******************* Definitions ********************
// These should match the enums in cereal/log.capnp and __init__.py
#define HW_TYPE_UNKNOWN 0U
#define HW_TYPE_WHITE_PANDA 1U
#define HW_TYPE_GREY_PANDA 2U
#define HW_TYPE_BLACK_PANDA 3U
#define HW_TYPE_PEDAL 4U
#define HW_TYPE_UNO 5U
#define HW_TYPE_DOS 6U

// LED colors
#define LED_RED 0U
#define LED_GREEN 1U
#define LED_BLUE 2U

// USB power modes (from cereal.log.health)
#define USB_POWER_NONE 0U
#define USB_POWER_CLIENT 1U
#define USB_POWER_CDP 2U
#define USB_POWER_DCP 3U

// GPS modes
#define GPS_DISABLED 0U
#define GPS_ENABLED 1U
#define GPS_BOOTMODE 2U

// CAN modes
#define CAN_MODE_NORMAL 0U
#define CAN_MODE_GMLAN_CAN2 1U
#define CAN_MODE_GMLAN_CAN3 2U
#define CAN_MODE_OBD_CAN2 3U

// ********************* Globals **********************
uint8_t usb_power_mode = USB_POWER_NONE;

// ************ Board function prototypes *************
bool board_has_gps(void);
bool board_has_gmlan(void);
bool board_has_obd(void);
bool board_has_lin(void);
bool board_has_rtc(void);
bool board_has_relay(void);


text:
/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     TreeNode *left;
 *     TreeNode *right;
 *     TreeNode(int x) : val(x), left(NULL), right(NULL) {}
 * };
 */
class Solution {
public:
    vector<int> rightSideView(TreeNode* root) {
      queue<pair<TreeNode*, int> >  Q;
      Q.push(make_pair(root, 0));
      vector<vector<int>> ans;
      while (!Q.empty()) {
        const TreeNode* current = Q.front().first;
        const int level = Q.front().second;
        if (current != NULL) {
          if (level >= ans.size()) {
            ans.push_back(vector<int>());
          }
          ans[level].push_back(current->val);
          Q.push(make_pair(current->left, level + 1));
          Q.push(make_pair(current->right, level + 1));
        }
        Q.pop();
      }
      vector<int> sol;
      for (int i = 0; i < ans.size(); ++i) {
        sol.push_back(ans[i].back());
      }
      return sol;
    }
};