text:
<?php

/***
 * Encapsulates web service calls to search for PagSeguro search authorizations
 */
class PagSeguroAuthorizationSearchService
{
    /**
     *
     */
    const SERVICE_NAME = 'authorizationService';

    /**
     * @var information about the log service
     */
    private static $logService;

    /**
     * @param PagSeguroConnectionData $connectionData
     * @param $authorizationCode
     * @return string
     */
    private static function buildSearchUrlByCode(PagSeguroConnectionData $connectionData, $authorizationCode)
    {
        $url = $connectionData->getServiceUrl();
        return "{$url}/{$authorizationCode}/?" . $connectionData->getCredentialsUrlQuery();
    }
    /**
     * @param PagSeguroConnectionData $connectionData
     * @param $notificationCode
     * @return string
     */
    private static function buildSearchUrlByNotification(PagSeguroConnectionData $connectionData, $notificationCode)
    {
        $url = $connectionData->getServiceUrl();
        return "{$url}/notifications/{$notificationCode}/?" . $connectionData->getCredentialsUrlQuery();
    }
    /**
     * @param PagSeguroConnectionData $connectionData
     * @param null|array $options
     * @return string
     */
    private static function buildSearchUrl(PagSeguroConnectionData $connectionData, $options = null)
    {
        if (!is_null($options)) {
            $options = http_build_query($options, '', '&');
            return $connectionData->getServiceUrl() . "/?" . $connectionData->getCredentialsUrlQuery() . "&" . $options;
        }
        return $connectionData->getServiceUrl() . "/?" . $connectionData->getCredentialsUrlQuery();
    }

    /**
     * @param PagSeguroConnectionData $connectionData
     * @param $reference
     * @return string
     */
    private static function buildSearchUrlByReference(PagSeguroConnectionData $connectionData, $reference)
    {
        $url = $connectionData->getServiceUrl();
        return "{$url}?" . $connectionData->getCredentialsUrlQuery() . '&reference='.$reference;
    }

    /***
     * Finds a authorization with a matching authorization code
     *
     * @param PagSeguroCredentials $credentials
     * @param String $authorizationCode
     * @return PagSeguroAuthorization a authorization object
     * @see PagSeguroAuthorization
     * @throws PagSeguroServiceException
     * @throws Exception
     */
    public static function searchByCode(PagSeguroCredentials $credentials, $authorizationCode)
    {
        LogPagSeguro::info("PagSeguroAuthorizationSearchService.SearchByCode($authorizationCode) - begin");
        $connectionData = new PagSeguroConnectionData($credentials, self::SERVICE_NAME);
        try {
            $connection = new PagSeguroHttpConnection();
            $connection->get(
                self::buildSearchUrlByCode($connectionData, $authorizationCode),
                $connectionData->getServiceTimeout(),
                $connectionData->getCharset()
            );

            self::$logService = "SearchByCode";
            return self::searchReturn($connection, $authorizationCode);

        } catch (PagSeguroServiceException $err) {
            throw $err;
        } catch (Exception $err) {
            LogPagSeguro::error("Exception: " . $err->getMessage());
            throw $err;
        }
    }

    /***
     * Finds a authorization with a matching notification code
     *
     * @param PagSeguroCredentials $credentials
     * @param String $notificationCode
     * @return PagSeguroAuthorization a authorization object
     * @see PagSeguroAuthorization
     * @throws PagSeguroServiceException
     * @throws Exception
     */
    public static function searchByNotificationCode(PagSeguroCredentials $credentials, $notificationCode)
    {
        LogPagSeguro::info("PagSeguroAuthorizationSearchService.searchByNotificationCode($notificationCode) - begin");
        $connectionData = new PagSeguroConnectionData($credentials, self::SERVICE_NAME);
        try {
            $connection = new PagSeguroHttpConnection();
            $connection->get(
                self::buildSearchUrlByNotification($connectionData, $notificationCode),
                $connectionData->getServiceTimeout(),
                $connectionData->getCharset()
            );

            self::$logService = "SearchByNotificationCode";
            return self::searchReturn($connection, $notificationCode);

        } catch (PagSeguroServiceException $err) {
            throw $err;
        } catch (Exception $err) {
            LogPagSeguro::error("Exception: " . $err->getMessage());
            throw $err;
        }
    }
    /***
     * Finds a authorization with a matching authorization credentials
     *
     * @param PagSeguroCredentials $credentials
     * @param array $options
     * @return PagSeguroAuthorization a authorization object
     * @see PagSeguroAuthorization
     * @throws PagSeguroServiceException
     * @throws Exception
     */
    public static function searchAuthorizations(PagSeguroCredentials $credentials, array $options = null)
    {
        LogPagSeguro::info("PagSeguroAuthorizationSearchService.searchAuthorizations() - begin");
        $connectionData = new PagSeguroConnectionData($credentials, self::SERVICE_NAME);
        try {
            $connection = new PagSeguroHttpConnection();
            $connection->get(
                self::buildSearchUrl($connectionData, $options),
                $connectionData->getServiceTimeout(),
                $connectionData->getCharset()
            );
            return self::searchAuthorizationsReturn($connection);
        } catch (PagSeguroServiceException $err) {
            throw $err;
        } catch (Exception $err) {
            LogPagSeguro::error("Exception: " . $err->getMessage());
            throw $err;
        }
    }

    /***
     * Finds a authorization with a matching authorization code
     *
     * @param PagSeguroCredentials $credentials
     * @param String $authorizationCode
     * @return PagSeguroAuthorization a authorization object
     * @see PagSeguroAuthorization
     * @throws PagSeguroServiceException
     * @throws Exception
     */
    public static function searchByReference(PagSeguroCredentials $credentials, $reference)
    {
        LogPagSeguro::info("PagSeguroAuthorizationSearchService.SearchByReference($reference) - begin");
        $connectionData = new PagSeguroConnectionData($credentials, self::SERVICE_NAME);

        try {
            $connection = new PagSeguroHttpConnection();
            $connection->get(
                self::buildSearchUrlByReference($connectionData, $reference),
                $connectionData->getServiceTimeout(),
                $connectionData->getCharset()
            );

            self::$logService = "SearchByReference";
            return self::searchAuthorizationsReturn($connection, $reference);

        } catch (PagSeguroServiceException $err) {
            throw $err;
        } catch (Exception $err) {
            LogPagSeguro::error("Exception: " . $err->getMessage());
            throw $err;
        }
    }

    /**
     * @param PagSeguroHttpConnection $connection
     * @param string $authorizationCode
     * @return bool|mixed|string
     * @throws PagSeguroServiceException
     */
    private static function searchReturn($connection, $code)
    {
        $httpStatus = new PagSeguroHttpStatus($connection->getStatus());
        switch ($httpStatus->getType()) {
            case 'OK':
                $authorization = PagSeguroAuthorizationParser::readAuthorization($connection->getResponse());
                LogPagSeguro::info(
                    sprintf("PagSeguroAuthorizationSearchService.%s(code=$code) - end ", self::$logService) .
                    $authorization->toString()
                );
                break;
            case 'BAD_REQUEST':
                $errors = PagSeguroAuthorizationParser::readErrors($connection->getResponse());
                $err = new PagSeguroServiceException($httpStatus, $errors);
                LogPagSeguro::error(
                    sprintf("PagSeguroAuthorizationSearchService.%s(code=$code) - error ", self::$logService) .
                    $err->getOneLineMessage()
                );
                throw $err;
                break;
            default:
                $err = new PagSeguroServiceException($httpStatus);
                LogPagSeguro::error(
                    sprintf("PagSeguroAuthorizationSearchService.%s(code=$code) - error ", self::$logService) .
                    $err->getOneLineMessage()
                );
                throw $err;
                break;
        }
        return isset($authorization) ? $authorization : false;
    }

    /**
     * @param PagSeguroHttpConnection $connection
     * @return bool|mixed|string
     * @throws PagSeguroServiceException
     */
    private function searchAuthorizationsReturn($connection)
    {
        $httpStatus = new PagSeguroHttpStatus($connection->getStatus());
        switch ($httpStatus->getType()) {
            case 'OK':
                $authorization = PagSeguroAuthorizationParser::readSearchResult($connection->getResponse());

                LogPagSeguro::info(
                    "PagSeguroAuthorizationSearchService.searchAuthorizations() - end " .
                    $authorization->toString()
                );
                break;
            case 'BAD_REQUEST':
                $errors = PagSeguroAuthorizationParser::readErrors($connection->getResponse());
                $err = new PagSeguroServiceException($httpStatus, $errors);
                LogPagSeguro::error(
                    "PagSeguroAuthorizationSearchService.searchAuthorizations() - error " .
                    $err->getOneLineMessage()
                );
                throw $err;
                break;
            default:
                $err = new PagSeguroServiceException($httpStatus);
                LogPagSeguro::error(
                    "PagSeguroAuthorizationSearchService.searchAuthorizations() - error " .
                    $err->getOneLineMessage()
                );
                throw $err;
                break;
        }
        return isset($authorization) ? $authorization : false;
    }
}


text:
package com.examw.collector.dao.impl;

import java.util.List;

import org.hibernate.Query;

import com.examw.collector.dao.ICatalogEntityDao;
import com.examw.collector.domain.local.CatalogEntity;
import com.examw.collector.model.local.CatalogEntityInfo;

/**
 * 课程分类数据接口实现类
 * @author fengwei.
 * @since 2014年7月2日 上午9:59:12.
 */
public class CatalogEntityDaoImpl extends BaseDaoImpl<CatalogEntity> implements ICatalogEntityDao{

	@Override
	public List<CatalogEntity> findCatalogs(CatalogEntityInfo info) {
		String hql =  "from CatalogEntity c  where c.parent.id = 0 order by c.id";
		return this.find(hql, null, null, null);
	}

	@Override
	public CatalogEntity find(String edu24_code) {
		//使用charindex函数
		String hql = "from CatalogEntity c where c.code = :code or charindex(:code,c.code) > 0";
		Query query = this.getCurrentSession().createQuery(hql);
		query.setParameter("code", edu24_code);
		@SuppressWarnings("unchecked")
		List<CatalogEntity> list = query.list();
		if(list == null || list.size()==0)
			return null;
		return list.get(0);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<CatalogEntity> findAllWithCode() {
		//只用一个进行测试测试用
		String hql = "from CatalogEntity c where c.code in('775','1235','1905','567','568')";
		//String hql = "from CatalogEntity c where c.code is not null and c.code != ''";
		Query query = this.getCurrentSession().createQuery(hql);
		return query.list();
	}
}

redpajama_set_name: RedPajamaGithub


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

<title>The GNU C Library: Unconstrained Allocation</title>

<meta name="description" content="The GNU C Library: Unconstrained Allocation">
<meta name="keywords" content="The GNU C Library: Unconstrained Allocation">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Memory-Allocation.html#Memory-Allocation" rel="up" title="Memory Allocation">
<link href="Basic-Allocation.html#Basic-Allocation" rel="next" title="Basic Allocation">
<link href="Memory-Allocation-and-C.html#Memory-Allocation-and-C" rel="prev" title="Memory Allocation and C">

Next: Allocation Debugging, Previous: Memory Allocation and C, Up: Memory Allocation   [Contents][Index]

3.2.2 Unconstrained Allocation

The most general dynamic allocation facility is malloc.  It
allows you to allocate blocks of memory of any size at any time, make
them bigger or smaller at any time, and free the blocks individually at
any time (or never).

• Basic Allocation:	  	Simple use of malloc.

• Malloc Examples:	  	Examples of malloc.  xmalloc.

• Freeing after Malloc:	  	Use free to free a block you
				 got with malloc.

• Changing Block Size:	  	Use realloc to make a block
				 bigger or smaller.

• Allocating Cleared Space:	  	Use calloc to allocate a
				 block and clear it.

• Efficiency and Malloc:	  	Efficiency considerations in use of
				 these functions.

• Aligned Memory Blocks:	  	Allocating specially aligned memory.

• Malloc Tunable Parameters:	  	Use mallopt to adjust allocation
                                 parameters.

• Heap Consistency Checking:	  	Automatic checking for errors.

• Hooks for Malloc:	  	You can use these hooks for debugging
				 programs that use malloc.

• Statistics of Malloc:	  	Getting information about how much
				 memory your program is using.

• Summary of Malloc:	  	Summary of malloc and related functions.


text:
            <?php echo $this->session->flashdata('success_profile_update');?>
            <?php echo $this->session->flashdata('success');?>
            <?php echo $this->session->flashdata('error');?>

                     Edit Benefit

                <?php echo form_open_multipart(base_url().'admin/admin-edit-benefit-exec', array('name' => 'my_form')); ?>

                    <?php
                    $for_benefit_id = array(
                        'type' => 'hidden',
                        'name' => 'id',
                        'value' => $benefit->id
                    );
                    echo form_input($for_benefit_id);
                    ?>

                        Title
                        <?php echo form_error('title');?>
                        <?php
                        $for_benefit_title = array(
                            'type' => 'text',
                            'name' => 'title',
                            'id' => 'title',
                            'class' => 'form-control',
                            'value' => $benefit->benefit_title
                        );
                        echo form_input($for_benefit_title);
                        ?>

                        Description
                        <?php echo form_error('description');?>
                        <?php
                        $for_benefit_desc = array(
                            'name' => 'description',
                            'id' => 'description',
                            'class' => 'form-control',
                            'value' => $benefit->benefit_description
                        );
                        echo form_textarea($for_benefit_desc);
                        ?>

                        Image
                        <?php echo form_error('image');?>
                        <?php
                        $for_benefit_image = array(
                            'type' => 'file',
                            'name' => 'image',
                            'id' => 'image',
                            'class' => 'form-control'
                        );
                        echo form_input($for_benefit_image);
                        ?>

                    <?php
                    $submit_button = array(
                        'class' => 'btn btn-primary',
                        'type' => 'submit',
                        'content' => ' Update'
                    );
                    echo form_button($submit_button);
                    ?>

                <?php echo form_close(); ?>


text:
<!doctype html>

		<title>Zabuun - Learn Egyptian Arabic for English speakers</title>
		<meta name="description" content="">
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/head.php';?>

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/ie8.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/header.php';?>

			<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/side.php';?>

Essays > Non-traditional Wakes

						Expand All | Collapse All

Non-traditional Wakes

These non-traditional wakes have their critics though. Some people think they are disrespectful. They think of death as a solemn and sad occasion, not a time to pose the dead as if they were toys. Fans feel it helps them remember the dead as they were when they were alive.

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/footer.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/scripts.php';?>


text:
from pox.core import core
import pox
log = core.getLogger()

from pox.sine.libmysql import dbop
from pox.lib.packet.packet_sine import sine #some constant defined in class sine
from pox.lib.recoco import Timer
import pox.openflow.libopenflow_01 as of

from pox.lib.revent import *
from collections import defaultdict

import time

#This part for constant definition
TIMEOUT = 10#globle timeout value

class info_collector (EventMixin):
  def __init__ (self):
    self.listenTo(core)

  #DJ++ START 20131209
  def _handle_Collect_serInfo (self, event):
    print "DJ---/pox/sine/libinfo.py Entering _handle_Collect_serInfo!", event
    sid = event.sid
    nid = event.nid
    #sbd need to be added

    print "DJ---/pox/sine/libinfo.py _handle_Collect_serInfo!", type(sid), repr(sid), type(nid), repr(nid)
    #search table_service if there has already been an entry about this nid and sid
    ret = dbop.pk_select("table_service", sid=sid, nid=nid)
    print "DJ---/pox/sine/libinfo.py Entering _handle_Collect_serInfo! ret = ", ret
    if not ret:
      entries = dbop.insert("table_service", (sid,nid,''))
  #DJ++ END 20140115

  #DJ++ START 20140116
  def _handle_Collect_capInfo (self, event):
    print "DJ---/pox/sine/libinfo.py Entering _handle_Collect_capInfo!", event
    nid = event.nid
    nbd = event.nbd
    flag = event.flag
    #ATTENTION!! TODO DJ 20140116
    dpid = event.dpid
    #ATTENTION!! IF THIS IS AN HOST CAPABILITY REGISTRATION, DPID SHOULD NOT BE WRITEN INTO DATABAESE

    #NBD parameters
    cpu  = ''
    mem  = ''
    disk = ''
    link = ''
    ip   = ''
    mac  = ''
    port = ''

    #node registe for first time
    if flag & sine.FLAG_REG_REQ:
      while nbd:
        (tlv_t, tlv_l, tlv_v, nbd) = self.parse_tlv(nbd)
        if tlv_t == sine.TYPE_TLV_CPU:
          cpu = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_MEM:
          mem = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_DISK:
          disk = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_LINK:
          link = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_IP:
          ip = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_MAC:
          mac = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_PORT:
          port = tlv_v
          continue
        else:
          log.error("TLV Type error when handling capability registration message!")

      #search table_capability if there has already been an entry about this nid
      cap_ret = dbop.pk_select("table_capability", nid=nid)
      if not cap_ret:
        #no duplicate entry, insert into table_capability
        #here,there should be two conditions because of dpid, coz host do not have dpid
        entries = dbop.insert("table_capability", (nid, dpid, cpu, mem, disk))

      #insert into table_portinfo
      if port == '':
        log.debug("Port is an empty string! Give up inserting into table_portinfo!")
        return
      #search table_portinfo if there has already been an entry about this nid and port
      port_ret = dbop.pk_select("table_portinfo", nid=nid, port=port)
      if not port_ret:
        entries = dbop.insert("table_portinfo", (nid, port, ip, mac, link))

    #node information update
    elif flag & sine.FLAG_UPD_REQ:
      #parse tlv
      while nbd:
        (tlv_t, tlv_l, tlv_v, nbd) = self.parse_tlv(nbd)
        if tlv_t == sine.TYPE_TLV_CPU:
          cpu = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_MEM:
          mem = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_DISK:
          disk = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_PORT:
          port = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_LINK:
          link = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_IP:
          ip = tlv_v
          continue
        elif tlv_t == sine.TYPE_TLV_MAC:
          mac = tlv_vi
          continue

      #update
      if cpu:
        ret = dbop.pk_select("table_capability", nid=nid)
        if ret:
          dbop.update("table_capability", pk1=nid, cpu=cpu)
        else:
          log.debug("table_capability update failure!")
      if mem:
        ret = dbop.pk_select("table_capability", nid=nid)
        if ret:
          dbop.update("table_capability", pk1=nid, memory=mem)
        else:
          log.debug("table_capability update failure!")
      if disk:
        ret = dbop.pk_select("table_capability", nid=nid)
        if ret:
          dbop.update("table_capability", pk1=nid, disk=disk)
        else:
          log.debug("table_capability update failure!")
      if port == '':
        log.debug("No port TLV. Give up updating IP/MAC/LINK!")
      else:
        if ip:
          ret = dbop.pk_select("table_portinfo", nid=nid, port=port)
          if ret:
            dbop.update("table_portinfo", pk1=nid, ip=ip)
          else:
            log.debug("table_portinfo update failure!")
        if mac:
          ret = dbop.pk_select("table_portinfo", nid=nid, port=port)
          if ret:
            dbop.update("table_portinfo", pk1=nid, mac=mac)
          else:
            log.debug("table_portinfo update failure!")
        if link:
          ret = dbop.pk_select("table_portinfo", nid=nid, port=port)
          if ret:
            dbop.update("table_portinfo", pk1=nid, link=link)
          else:
            log.debug("table_portinfo update failure!")

    print "DJ---/pox/sine/libinfo.py leaving  _handle_Collect_capInfo!"
  #DJ++ END 20140116

  def _handle_GoingUpEvent (self, event):
    print "DJ---/pox/sine/libsine.py _handle_GoingUpEvent!"
    #self.listenTo(core.openflow)#listen to SINEIn
    self.listenTo(core.sine_event) #DJ++ 20131223
    log.debug("Up...")

  #DJ++ START 20131209
  #def _handle_BarrierIn (self, event):
  #  print "DJ---l3_learning _handle_BarrierIn!"
  #DJ++ END   20131209

def launch ():
  print "DJ---/pox/sine/libsine.py launch!"
  core.registerNew(info_collector)


text:
(function() { 'use strict';
(typeof $ENV !== 'undefined') ? initialize() : (window.defercqueue || (window.defercqueue = [])).push(initialize);
function initialize() {

    var transforms = ',matrix,translate,translateX,translateY,scale,scaleX,scaleY,rotate,skewX,skewY,matrix3d,translate3d,translateZ,scale3d,scaleZ,rotate3d,rotateX,rotateY,rotateZ,perspective,';

    // control + auto-css pair factory
    function  Felement(__type, parameters, attributes, css) {

        var control = controls.createBase(__type, parameters, attributes);

        // >> parse style from parameters

        parameters = control.parameters;
        var style = control.attributes.style || '';
        var transform = '';
        for(var name in parameters) {
            if (name === 'origin' || name === 'transform-origin')
                style += 'transform-origin:' + parameters.origin + ';-webkit-transform-origin:' + parameters.origin + ';-moz-transform-origin:' + parameters.origin + ';';
            else if (transforms.indexOf(name.trim()) >= 0) {
                if (transform)
                    transform += ' ';
                // translate=1,2 -> translate(1,2)
                transform += name +'(' + parameters[name] + ')';
            } else  {
                if (name[0] !== '$')
                    style += name + ':' + parameters[name] + ';';
            }
        }
        if (transform) {
            if (style && style.slice(-1) !== ';')
                style += ';';
            style += 'transform:' + transform + ';-webkit-transform:' + transform + ';-moz-transform:' + transform + ';';
        }
        if (style) {
            control.attributes.style = style;
        }

        // << parse style from parameters

        return control;
    }

    function process_inner_text(control) {
        // process markup at this level
        var inner_text = control.attributes.$text;
        if (inner_text) {
            $DOC.processContent(control, inner_text);
            control.attributes.$text = undefined;
        }
    }

    // styled block div factory
    function Block(parameters, attributes) {
        var control = Felement('div', parameters, attributes);
        control.template($ENV.getDefaultTemplate('div'), $ENV.getDefaultTemplate());
        process_inner_text(control);
        return control;
    };
    controls.factoryRegister('block', Block);

    function IBlock(parameters, attributes) {
        var control = Block(parameters, attributes);
        control.style('display:inline-block;' + control.style());
        return control;
    };
    controls.factoryRegister('iblock', IBlock);

    function span_template(it) {
        return ''
            + $ENV.marked( (it.attributes.$text || "") + it.controls.map(function(control) { return control.wrappedHTML(); }).join("") )
            + '';
    }
    function Text(parameters, attributes) {
        var control = Felement('span', parameters, attributes);
        control.template(span_template, $ENV.default_inner_template);
        process_inner_text(control);
        return control;
    };
    controls.factoryRegister('text', Text);

    function  Off(parameters, attributes) {
        var off_mode = $DOC.components_off;
        $DOC.components_off = true;
        var off_text = controls.createBase('container', parameters, attributes);
        $DOC.components_off = off_mode;
        return off_text;
    }
    controls.factoryRegister('off', Off);

    function  Encode(parameters, attributes) {
        var control = controls.createBase('container', parameters, attributes);
        control.template(html_encode, html_encode);
        process_inner_text(control);
        return control;
    }
    function html_encode(it) {
        return controls.encodeHTML((it.attributes.$text || "") + it.controls.map(function(control) { return control.wrappedHTML(); }).join(""));
    }
    controls.factoryRegister('encode', Encode);

    function  Decode(parameters, attributes) {
        var control = controls.createBase('container', parameters, attributes);
        control.template(html_decode, html_decode);
        process_inner_text(control);
        return control;
    }
    function html_decode(it) {
        return controls.decodeHTML((it.attributes.$text || "") + it.controls.map(function(control) { return control.wrappedHTML(); }).join(""));
    }
    controls.factoryRegister('decode', Decode);

    function  Escape(parameters, attributes) {
        var control = controls.createBase('container', parameters, attributes);
        control.template(escape_template, escape_template);
        process_inner_text(control);
        return control;
    }
    function escape_template(it) {
        return '' + controls.encodeHTML((it.attributes.$text || "") + it.controls.map(function(control) { return control.wrappedHTML(); }).join("")) + '';
    }
    controls.factoryRegister('escape', Escape);

}})();


text:
from openstack.tests.unit import base
import uuid

from openstack.load_balancer.v2 import listener

IDENTIFIER = 'IDENTIFIER'
EXAMPLE = {
    'admin_state_up': True,
    'connection_limit': '2',
    'default_pool_id': uuid.uuid4(),
    'description': 'test description',
    'id': IDENTIFIER,
    'insert_headers': {"X-Forwarded-For": "true"},
    'l7policies': [{'id': uuid.uuid4()}],
    'loadbalancers': [{'id': uuid.uuid4()}],
    'name': 'test_listener',
    'project_id': uuid.uuid4(),
    'protocol': 'TEST_PROTOCOL',
    'protocol_port': 10,
    'default_tls_container_ref': ('http://198.51.100.10:9311/v1/containers/'
                                  'a570068c-d295-4780-91d4-3046a325db51'),
    'sni_container_refs': [],
    'created_at': '2017-07-17T12:14:57.233772',
    'updated_at': '2017-07-17T12:16:57.233772',
    'operating_status': 'ONLINE',
    'provisioning_status': 'ACTIVE',
    'timeout_client_data': 50000,
    'timeout_member_connect': 5000,
    'timeout_member_data': 50000,
    'timeout_tcp_inspect': 0,
}

EXAMPLE_STATS = {
    'active_connections': 1,
    'bytes_in': 2,
    'bytes_out': 3,
    'request_errors': 4,
    'total_connections': 5
}

class TestListener(base.TestCase):

    def test_basic(self):
        test_listener = listener.Listener()
        self.assertEqual('listener', test_listener.resource_key)
        self.assertEqual('listeners', test_listener.resources_key)
        self.assertEqual('/lbaas/listeners', test_listener.base_path)
        self.assertTrue(test_listener.allow_create)
        self.assertTrue(test_listener.allow_fetch)
        self.assertTrue(test_listener.allow_commit)
        self.assertTrue(test_listener.allow_delete)
        self.assertTrue(test_listener.allow_list)

    def test_make_it(self):
        test_listener = listener.Listener(**EXAMPLE)
        self.assertTrue(test_listener.is_admin_state_up)
        self.assertEqual(EXAMPLE['connection_limit'],
                         test_listener.connection_limit)
        self.assertEqual(EXAMPLE['default_pool_id'],
                         test_listener.default_pool_id)
        self.assertEqual(EXAMPLE['description'], test_listener.description)
        self.assertEqual(EXAMPLE['id'], test_listener.id)
        self.assertEqual(EXAMPLE['insert_headers'],
                         test_listener.insert_headers)
        self.assertEqual(EXAMPLE['l7policies'],
                         test_listener.l7_policies)
        self.assertEqual(EXAMPLE['loadbalancers'],
                         test_listener.load_balancers)
        self.assertEqual(EXAMPLE['name'], test_listener.name)
        self.assertEqual(EXAMPLE['project_id'], test_listener.project_id)
        self.assertEqual(EXAMPLE['protocol'], test_listener.protocol)
        self.assertEqual(EXAMPLE['protocol_port'], test_listener.protocol_port)
        self.assertEqual(EXAMPLE['default_tls_container_ref'],
                         test_listener.default_tls_container_ref)
        self.assertEqual(EXAMPLE['sni_container_refs'],
                         test_listener.sni_container_refs)
        self.assertEqual(EXAMPLE['created_at'], test_listener.created_at)
        self.assertEqual(EXAMPLE['updated_at'], test_listener.updated_at)
        self.assertEqual(EXAMPLE['provisioning_status'],
                         test_listener.provisioning_status)
        self.assertEqual(EXAMPLE['operating_status'],
                         test_listener.operating_status)
        self.assertEqual(EXAMPLE['timeout_client_data'],
                         test_listener.timeout_client_data)
        self.assertEqual(EXAMPLE['timeout_member_connect'],
                         test_listener.timeout_member_connect)
        self.assertEqual(EXAMPLE['timeout_member_data'],
                         test_listener.timeout_member_data)
        self.assertEqual(EXAMPLE['timeout_tcp_inspect'],
                         test_listener.timeout_tcp_inspect)

        self.assertDictEqual(
            {'limit': 'limit',
             'marker': 'marker',
             'created_at': 'created_at',
             'updated_at': 'updated_at',
             'description': 'description',
             'name': 'name',
             'project_id': 'project_id',
             'tags': 'tags',
             'any_tags': 'tags-any',
             'not_tags': 'not-tags',
             'not_any_tags': 'not-tags-any',
             'operating_status': 'operating_status',
             'provisioning_status': 'provisioning_status',
             'is_admin_state_up': 'admin_state_up',

             'connection_limit': 'connection_limit',
             'default_pool_id': 'default_pool_id',
             'default_tls_container_ref': 'default_tls_container_ref',
             'sni_container_refs': 'sni_container_refs',
             'insert_headers': 'insert_headers',
             'load_balancer_id': 'load_balancer_id',
             'protocol': 'protocol',
             'protocol_port': 'protocol_port',
             'timeout_client_data': 'timeout_client_data',
             'timeout_member_connect': 'timeout_member_connect',
             'timeout_member_data': 'timeout_member_data',
             'timeout_tcp_inspect': 'timeout_tcp_inspect',
             },
            test_listener._query_mapping._mapping)

class TestListenerStats(base.TestCase):

    def test_basic(self):
        test_listener = listener.ListenerStats()
        self.assertEqual('stats', test_listener.resource_key)
        self.assertEqual('/lbaas/listeners/%(listener_id)s/stats',
                         test_listener.base_path)
        self.assertFalse(test_listener.allow_create)
        self.assertTrue(test_listener.allow_fetch)
        self.assertFalse(test_listener.allow_delete)
        self.assertFalse(test_listener.allow_list)
        self.assertFalse(test_listener.allow_commit)

    def test_make_it(self):
        test_listener = listener.ListenerStats(**EXAMPLE_STATS)
        self.assertEqual(EXAMPLE_STATS['active_connections'],
                         test_listener.active_connections)
        self.assertEqual(EXAMPLE_STATS['bytes_in'],
                         test_listener.bytes_in)
        self.assertEqual(EXAMPLE_STATS['bytes_out'],
                         test_listener.bytes_out)
        self.assertEqual(EXAMPLE_STATS['request_errors'],
                         test_listener.request_errors)
        self.assertEqual(EXAMPLE_STATS['total_connections'],
                         test_listener.total_connections)


text:
use crate::loom::sync::{Mutex, MutexGuard};
use crate::runtime::signal::Handle as SignalHandle;
use crate::signal::unix::{signal_with_handle, SignalKind};
use crate::sync::watch;
use std::io;
use std::process::ExitStatus;

/// An interface for waiting on a process to exit.
pub(crate) trait Wait {
    /// Get the identifier for this process or diagnostics.
    fn id(&self) -> u32;
    /// Try waiting for a process to exit in a non-blocking manner.
    fn try_wait(&mut self) -> io::Result<Option<ExitStatus>>;
}

impl<T: Wait> Wait for &mut T {
    fn id(&self) -> u32 {
        (**self).id()
    }

    fn try_wait(&mut self) -> io::Result<Option<ExitStatus>> {
        (**self).try_wait()
    }
}

/// An interface for queueing up an orphaned process so that it can be reaped.
pub(crate) trait OrphanQueue<T> {
    /// Adds an orphan to the queue.
    fn push_orphan(&self, orphan: T);
}

impl<T, O: OrphanQueue<T>> OrphanQueue<T> for &O {
    fn push_orphan(&self, orphan: T) {
        (**self).push_orphan(orphan);
    }
}

/// An implementation of `OrphanQueue`.
#[derive(Debug)]
pub(crate) struct OrphanQueueImpl<T> {
    sigchild: Mutex<Option<watch::Receiver<()>>>,
    queue: Mutex<Vec<T>>,
}

impl<T> OrphanQueueImpl<T> {
    cfg_not_has_const_mutex_new! {
        pub(crate) fn new() -> Self {
            Self {
                sigchild: Mutex::new(None),
                queue: Mutex::new(Vec::new()),
            }
        }
    }

    cfg_has_const_mutex_new! {
        pub(crate) const fn new() -> Self {
            Self {
                sigchild: Mutex::const_new(None),
                queue: Mutex::const_new(Vec::new()),
            }
        }
    }

    #[cfg(test)]
    fn len(&self) -> usize {
        self.queue.lock().len()
    }

    pub(crate) fn push_orphan(&self, orphan: T)
    where
        T: Wait,
    {
        self.queue.lock().push(orphan)
    }

    /// Attempts to reap every process in the queue, ignoring any errors and
    /// enqueueing any orphans which have not yet exited.
    pub(crate) fn reap_orphans(&self, handle: &SignalHandle)
    where
        T: Wait,
    {
        // If someone else is holding the lock, they will be responsible for draining
        // the queue as necessary, so we can safely bail if that happens
        if let Some(mut sigchild_guard) = self.sigchild.try_lock() {
            match &mut *sigchild_guard {
                Some(sigchild) => {
                    if sigchild.try_has_changed().and_then(Result::ok).is_some() {
                        drain_orphan_queue(self.queue.lock());
                    }
                }
                None => {
                    let queue = self.queue.lock();

                    // Be lazy and only initialize the SIGCHLD listener if there
                    // are any orphaned processes in the queue.
                    if !queue.is_empty() {
                        // An errors shouldn't really happen here, but if it does it
                        // means that the signal driver isn't running, in
                        // which case there isn't anything we can
                        // register/initialize here, so we can try again later
                        if let Ok(sigchild) = signal_with_handle(SignalKind::child(), handle) {
                            *sigchild_guard = Some(sigchild);
                            drain_orphan_queue(queue);
                        }
                    }
                }
            }
        }
    }
}

fn drain_orphan_queue<T>(mut queue: MutexGuard<'_, Vec<T>>)
where
    T: Wait,
{
    for i in (0..queue.len()).rev() {
        match queue[i].try_wait() {
            Ok(None) => {}
            Ok(Some(_)) | Err(_) => {
                // The stdlib handles interruption errors (EINTR) when polling a child process.
                // All other errors represent invalid inputs or pids that have already been
                // reaped, so we can drop the orphan in case an error is raised.
                queue.swap_remove(i);
            }
        }
    }

    drop(queue);
}

#[cfg(all(test, not(loom)))]
pub(crate) mod test {
    use super::*;
    use crate::runtime::io::Driver as IoDriver;
    use crate::runtime::signal::{Driver as SignalDriver, Handle as SignalHandle};
    use crate::sync::watch;
    use std::cell::{Cell, RefCell};
    use std::io;
    use std::os::unix::process::ExitStatusExt;
    use std::process::ExitStatus;
    use std::rc::Rc;

    pub(crate) struct MockQueue<W> {
        pub(crate) all_enqueued: RefCell<Vec<W>>,
    }

    impl<W> MockQueue<W> {
        pub(crate) fn new() -> Self {
            Self {
                all_enqueued: RefCell::new(Vec::new()),
            }
        }
    }

    impl<W> OrphanQueue<W> for MockQueue<W> {
        fn push_orphan(&self, orphan: W) {
            self.all_enqueued.borrow_mut().push(orphan);
        }
    }

    struct MockWait {
        total_waits: Rc<Cell<usize>>,
        num_wait_until_status: usize,
        return_err: bool,
    }

    impl MockWait {
        fn new(num_wait_until_status: usize) -> Self {
            Self {
                total_waits: Rc::new(Cell::new(0)),
                num_wait_until_status,
                return_err: false,
            }
        }

        fn with_err() -> Self {
            Self {
                total_waits: Rc::new(Cell::new(0)),
                num_wait_until_status: 0,
                return_err: true,
            }
        }
    }

    impl Wait for MockWait {
        fn id(&self) -> u32 {
            42
        }

        fn try_wait(&mut self) -> io::Result<Option<ExitStatus>> {
            let waits = self.total_waits.get();

            let ret = if self.num_wait_until_status == waits {
                if self.return_err {
                    Ok(Some(ExitStatus::from_raw(0)))
                } else {
                    Err(io::Error::new(io::ErrorKind::Other, "mock err"))
                }
            } else {
                Ok(None)
            };

            self.total_waits.set(waits + 1);
            ret
        }
    }

    #[test]
    fn drain_attempts_a_single_reap_of_all_queued_orphans() {
        let first_orphan = MockWait::new(0);
        let second_orphan = MockWait::new(1);
        let third_orphan = MockWait::new(2);
        let fourth_orphan = MockWait::with_err();

        let first_waits = first_orphan.total_waits.clone();
        let second_waits = second_orphan.total_waits.clone();
        let third_waits = third_orphan.total_waits.clone();
        let fourth_waits = fourth_orphan.total_waits.clone();

        let orphanage = OrphanQueueImpl::new();
        orphanage.push_orphan(first_orphan);
        orphanage.push_orphan(third_orphan);
        orphanage.push_orphan(second_orphan);
        orphanage.push_orphan(fourth_orphan);

        assert_eq!(orphanage.len(), 4);

        drain_orphan_queue(orphanage.queue.lock());
        assert_eq!(orphanage.len(), 2);
        assert_eq!(first_waits.get(), 1);
        assert_eq!(second_waits.get(), 1);
        assert_eq!(third_waits.get(), 1);
        assert_eq!(fourth_waits.get(), 1);

        drain_orphan_queue(orphanage.queue.lock());
        assert_eq!(orphanage.len(), 1);
        assert_eq!(first_waits.get(), 1);
        assert_eq!(second_waits.get(), 2);
        assert_eq!(third_waits.get(), 2);
        assert_eq!(fourth_waits.get(), 1);

        drain_orphan_queue(orphanage.queue.lock());
        assert_eq!(orphanage.len(), 0);
        assert_eq!(first_waits.get(), 1);
        assert_eq!(second_waits.get(), 2);
        assert_eq!(third_waits.get(), 3);
        assert_eq!(fourth_waits.get(), 1);

        // Safe to reap when empty
        drain_orphan_queue(orphanage.queue.lock());
    }

    #[test]
    fn no_reap_if_no_signal_received() {
        let (tx, rx) = watch::channel(());

        let handle = SignalHandle::default();

        let orphanage = OrphanQueueImpl::new();
        *orphanage.sigchild.lock() = Some(rx);

        let orphan = MockWait::new(2);
        let waits = orphan.total_waits.clone();
        orphanage.push_orphan(orphan);

        orphanage.reap_orphans(&handle);
        assert_eq!(waits.get(), 0);

        orphanage.reap_orphans(&handle);
        assert_eq!(waits.get(), 0);

        tx.send(()).unwrap();
        orphanage.reap_orphans(&handle);
        assert_eq!(waits.get(), 1);
    }

    #[test]
    fn no_reap_if_signal_lock_held() {
        let handle = SignalHandle::default();

        let orphanage = OrphanQueueImpl::new();
        let signal_guard = orphanage.sigchild.lock();

        let orphan = MockWait::new(2);
        let waits = orphan.total_waits.clone();
        orphanage.push_orphan(orphan);

        orphanage.reap_orphans(&handle);
        assert_eq!(waits.get(), 0);

        drop(signal_guard);
    }

    #[cfg_attr(miri, ignore)] // Miri does not support epoll.
    #[test]
    fn does_not_register_signal_if_queue_empty() {
        let (io_driver, io_handle) = IoDriver::new().unwrap();
        let signal_driver = SignalDriver::new(io_driver, &io_handle).unwrap();
        let handle = signal_driver.handle();

        let orphanage = OrphanQueueImpl::new();
        assert!(orphanage.sigchild.lock().is_none()); // Sanity

        // No register when queue empty
        orphanage.reap_orphans(&handle);
        assert!(orphanage.sigchild.lock().is_none());

        let orphan = MockWait::new(2);
        let waits = orphan.total_waits.clone();
        orphanage.push_orphan(orphan);

        orphanage.reap_orphans(&handle);
        assert!(orphanage.sigchild.lock().is_some());
        assert_eq!(waits.get(), 1); // Eager reap when registering listener
    }

    #[test]
    fn does_nothing_if_signal_could_not_be_registered() {
        let handle = SignalHandle::default();

        let orphanage = OrphanQueueImpl::new();
        assert!(orphanage.sigchild.lock().is_none());

        let orphan = MockWait::new(2);
        let waits = orphan.total_waits.clone();
        orphanage.push_orphan(orphan);

        // Signal handler has "gone away", nothing to register or reap
        orphanage.reap_orphans(&handle);
        assert!(orphanage.sigchild.lock().is_none());
        assert_eq!(waits.get(), 0);
    }
}


text:
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""

if __name__ == '__main__':
    from os import getcwd
    from os import sys
    sys.path.append(getcwd())

from MOAL.helpers.display import Section

DEBUG = True if __name__ == '__main__' else False

class InvalidBufferLength(Exception):
    pass

class CircularBuffer(list):

    def __init__(self, items, **kwargs):
        # Testing enforcement of maximum ring size
        self.MAX_SIZE = 8
        # Keep a "pointer" to the active index; it starts at 0.
        self.pointer = 0
        if not isinstance(items, list):
            raise TypeError
        if len(items) > self.MAX_SIZE:
            raise InvalidBufferLength(
                'Number of items cannot exceed {}'.format(self.MAX_SIZE))
        super(CircularBuffer, self).__init__(items, **kwargs)

    def __str__(self):
        indices = map(str, range(len(self)))
        chars = map(str, self)
        print('Current pointer: {}\n{}'.format(
            self.pointer, ' ' + '   '.join(indices)))
        return '[{}]'.format('] ['.join(chars))

    def __delitem__(self, key):
        # Delitem becomes a no-op here because we just overwrite items instead.
        pass

    def __getitem__(self, key):
        return super(CircularBuffer, self).__getitem__(key)

    def __setitem__(self, index, value):
        # If the pointer is at the end, append the value at the beginning.
        old = self.pointer
        if self.pointer >= self.MAX_SIZE:
            # Reset pointer position to the beginning, **before** appending.
            self.pointer = 0
            super(CircularBuffer, self).__setitem__(self.pointer, value)
        else:
            # Set the given value
            super(CircularBuffer, self).__setitem__(index, value)

        # Update pointer **after**
        self.pointer += 1
        print('  POINTER: {} => {}'.format(old, self.pointer))

    def append(self, value):
        return self.__setitem__(self.pointer, value)

if DEBUG:
    with Section('Array - Circular Buffer'):
        # Populate a full buffer
        circbuff = CircularBuffer(range(8))
        print(circbuff)

        # Start overwriting values
        circbuff.append('A')
        circbuff.append('B')
        circbuff.append('C')
        circbuff.append('D')
        circbuff.append('E')
        circbuff.append('0')
        circbuff.append('10')
        print(circbuff)

        # Test that the indices have been overwritten properly.
        assert circbuff[0] == 'A'
        assert circbuff[1] == 'B'
        assert circbuff[2] == 'C'
        assert circbuff[3] == 'D'
        assert circbuff[4] == 'E'

        # Add some more to check...
        circbuff.append('Z')
        circbuff.append('X')
        circbuff.append('Y')

        # Check that it wraps around properly (again).
        assert circbuff[7] == 'Z'
        assert circbuff[0] == 'X'
        assert circbuff[1] == 'Y'

        print(circbuff)


text:
layout: post
title: Video - Bitcoin Q and A Immutability As An Anchor For Other Systems
description: Video - Bitcoin Q and A Immutability As An Anchor For Other Systems
author: Andreas M. Antonopoulos
authorurl: /andreas-antonopoulos-bitcoin-expert/
published: true
---

Immutability and proof-of-payment. The Bitcoin blockchain as an anchor point for external systems. OP_RETURN function for embedded data. In order to get on the Bitcoin blockchain, you must create properly formed transactions, pay sufficient fee, and validate by propagating across the network.

TRANSCRIPT


text:
module Delayer
  module Deferred
    VERSION = '2.2.0'.freeze
  end
end


text:
/*
    This css has bootstrap css framework tables and tooltips/popover css.
    If using full bootstrap css framework then this file is not needed.
    */
.table {
    background-color: transparent;
    width: 100%;
    max-width: 100%;
    margin-bottom: 10px;
    border-collapse: collapse;
    border-spacing: 0;
}

    .table td {
        padding: 0;
    }

    .table th {
        padding: 0;
        text-align: left;
    }

    .table caption {
        padding-top: 8px;
        padding-bottom: 8px;
        color: #777777;
        text-align: left;
    }

    .table > thead > tr > th,
    .table > tbody > tr > th,
    .table > tfoot > tr > th,
    .table > thead > tr > td,
    .table > tbody > tr > td,
    .table > tfoot > tr > td {
        padding: 5px;
        line-height: 1.42857143;
        vertical-align: top;
        border-top: 1px solid #ddd;
    }

    .table > thead > tr > th {
        vertical-align: bottom;
        border-bottom: 2px solid #ddd;
    }

    .table > caption + thead > tr:first-child > th,
    .table > colgroup + thead > tr:first-child > th,
    .table > thead:first-child > tr:first-child > th,
    .table > caption + thead > tr:first-child > td,
    .table > colgroup + thead > tr:first-child > td,
    .table > thead:first-child > tr:first-child > td {
        border-top: 0;
    }

    .table > tbody + tbody {
        border-top: 2px solid #ddd;
    }

    .table .table {
        background-color: #fff;
    }

.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
    padding: 2px;
}

.table-bordered {
    border: 1px solid #ddd;
}

    .table-bordered > thead > tr > th,
    .table-bordered > tbody > tr > th,
    .table-bordered > tfoot > tr > th,
    .table-bordered > thead > tr > td,
    .table-bordered > tbody > tr > td,
    .table-bordered > tfoot > tr > td {
        border: 1px solid #ddd;
    }

    .table-bordered > thead > tr > th,
    .table-bordered > thead > tr > td {
        border-bottom-width: 2px;
    }

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}

.table-hover > tbody > tr:hover {
    background-color: #f5f5f5;
}

table col[class*="col-"] {
    position: static;
    display: table-column;
    float: none;
}

table td[class*="col-"],
table th[class*="col-"] {
    position: static;
    display: table-cell;
    float: none;
}

.table > thead > tr > td.active,
.table > tbody > tr > td.active,
.table > tfoot > tr > td.active,
.table > thead > tr > th.active,
.table > tbody > tr > th.active,
.table > tfoot > tr > th.active,
.table > thead > tr.active > td,
.table > tbody > tr.active > td,
.table > tfoot > tr.active > td,
.table > thead > tr.active > th,
.table > tbody > tr.active > th,
.table > tfoot > tr.active > th {
    background-color: #f5f5f5;
}

.table-hover > tbody > tr > td.active:hover,
.table-hover > tbody > tr > th.active:hover,
.table-hover > tbody > tr.active:hover > td,
.table-hover > tbody > tr:hover > .active,
.table-hover > tbody > tr.active:hover > th {
    background-color: #e8e8e8;
}

.table > thead > tr > td.success,
.table > tbody > tr > td.success,
.table > tfoot > tr > td.success,
.table > thead > tr > th.success,
.table > tbody > tr > th.success,
.table > tfoot > tr > th.success,
.table > thead > tr.success > td,
.table > tbody > tr.success > td,
.table > tfoot > tr.success > td,
.table > thead > tr.success > th,
.table > tbody > tr.success > th,
.table > tfoot > tr.success > th {
    background-color: #dff0d8;
}

.table-hover > tbody > tr > td.success:hover,
.table-hover > tbody > tr > th.success:hover,
.table-hover > tbody > tr.success:hover > td,
.table-hover > tbody > tr:hover > .success,
.table-hover > tbody > tr.success:hover > th {
    background-color: #d0e9c6;
}

.table > thead > tr > td.info,
.table > tbody > tr > td.info,
.table > tfoot > tr > td.info,
.table > thead > tr > th.info,
.table > tbody > tr > th.info,
.table > tfoot > tr > th.info,
.table > thead > tr.info > td,
.table > tbody > tr.info > td,
.table > tfoot > tr.info > td,
.table > thead > tr.info > th,
.table > tbody > tr.info > th,
.table > tfoot > tr.info > th {
    background-color: #d9edf7;
}

.table-hover > tbody > tr > td.info:hover,
.table-hover > tbody > tr > th.info:hover,
.table-hover > tbody > tr.info:hover > td,
.table-hover > tbody > tr:hover > .info,
.table-hover > tbody > tr.info:hover > th {
    background-color: #c4e3f3;
}

.table > thead > tr > td.warning,
.table > tbody > tr > td.warning,
.table > tfoot > tr > td.warning,
.table > thead > tr > th.warning,
.table > tbody > tr > th.warning,
.table > tfoot > tr > th.warning,
.table > thead > tr.warning > td,
.table > tbody > tr.warning > td,
.table > tfoot > tr.warning > td,
.table > thead > tr.warning > th,
.table > tbody > tr.warning > th,
.table > tfoot > tr.warning > th {
    background-color: #fcf8e3;
}

.table-hover > tbody > tr > td.warning:hover,
.table-hover > tbody > tr > th.warning:hover,
.table-hover > tbody > tr.warning:hover > td,
.table-hover > tbody > tr:hover > .warning,
.table-hover > tbody > tr.warning:hover > th {
    background-color: #faf2cc;
}

.table > thead > tr > td.danger,
.table > tbody > tr > td.danger,
.table > tfoot > tr > td.danger,
.table > thead > tr > th.danger,
.table > tbody > tr > th.danger,
.table > tfoot > tr > th.danger,
.table > thead > tr.danger > td,
.table > tbody > tr.danger > td,
.table > tfoot > tr.danger > td,
.table > thead > tr.danger > th,
.table > tbody > tr.danger > th,
.table > tfoot > tr.danger > th {
    background-color: #f2dede;
}

.table-hover > tbody > tr > td.danger:hover,
.table-hover > tbody > tr > th.danger:hover,
.table-hover > tbody > tr.danger:hover > td,
.table-hover > tbody > tr:hover > .danger,
.table-hover > tbody > tr.danger:hover > th {
    background-color: #ebcccc;
}

.table-responsive {
    min-height: .01%;
    overflow-x: auto;
}

@media screen and (max-width: 767px) {
    .table-responsive {
        width: 100%;
        margin-bottom: 15px;
        overflow-y: hidden;
        -ms-overflow-style: -ms-autohiding-scrollbar;
        border: 1px solid #ddd;
    }

        .table-responsive > .table {
            margin-bottom: 0;
        }

            .table-responsive > .table > thead > tr > th,
            .table-responsive > .table > tbody > tr > th,
            .table-responsive > .table > tfoot > tr > th,
            .table-responsive > .table > thead > tr > td,
            .table-responsive > .table > tbody > tr > td,
            .table-responsive > .table > tfoot > tr > td {
                white-space: nowrap;
            }

        .table-responsive > .table-bordered {
            border: 0;
        }

            .table-responsive > .table-bordered > thead > tr > th:first-child,
            .table-responsive > .table-bordered > tbody > tr > th:first-child,
            .table-responsive > .table-bordered > tfoot > tr > th:first-child,
            .table-responsive > .table-bordered > thead > tr > td:first-child,
            .table-responsive > .table-bordered > tbody > tr > td:first-child,
            .table-responsive > .table-bordered > tfoot > tr > td:first-child {
                border-left: 0;
            }

            .table-responsive > .table-bordered > thead > tr > th:last-child,
            .table-responsive > .table-bordered > tbody > tr > th:last-child,
            .table-responsive > .table-bordered > tfoot > tr > th:last-child,
            .table-responsive > .table-bordered > thead > tr > td:last-child,
            .table-responsive > .table-bordered > tbody > tr > td:last-child,
            .table-responsive > .table-bordered > tfoot > tr > td:last-child {
                border-right: 0;
            }

            .table-responsive > .table-bordered > tbody > tr:last-child > th,
            .table-responsive > .table-bordered > tfoot > tr:last-child > th,
            .table-responsive > .table-bordered > tbody > tr:last-child > td,
            .table-responsive > .table-bordered > tfoot > tr:last-child > td {
                border-bottom: 0;
            }
}

.tooltip {
  position: absolute;
  z-index: 1070;
  display: block;
  font-family: Arial;
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
  line-break: auto;
  line-height: 1.42857143;
  text-align: left;
  text-align: start;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  white-space: normal;
  word-break: normal;
  word-spacing: normal;
  word-wrap: normal;
  font-size: 12px;
  opacity: 0;
  filter: alpha(opacity=0);
}
.tooltip.in {
  opacity: 0.9;
  filter: alpha(opacity=90);
}
.tooltip.top {
  margin-top: -3px;
  padding: 5px 0;
}
.tooltip.right {
  margin-left: 3px;
  padding: 0 5px;
}
.tooltip.bottom {
  margin-top: 3px;
  padding: 5px 0;
}
.tooltip.left {
  margin-left: -3px;
  padding: 0 5px;
}
.tooltip-inner {
  max-width: 200px;
  padding: 3px 8px;
  color: #ffffff;
  text-align: center;
  background-color: #000000;
  border-radius: 4px;
}
.tooltip-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}
.tooltip.top .tooltip-arrow {
  bottom: 0;
  left: 50%;
  margin-left: -5px;
  border-width: 5px 5px 0;
  border-top-color: #000000;
}
.tooltip.top-left .tooltip-arrow {
  bottom: 0;
  right: 5px;
  margin-bottom: -5px;
  border-width: 5px 5px 0;
  border-top-color: #000000;
}
.tooltip.top-right .tooltip-arrow {
  bottom: 0;
  left: 5px;
  margin-bottom: -5px;
  border-width: 5px 5px 0;
  border-top-color: #000000;
}
.tooltip.right .tooltip-arrow {
  top: 50%;
  left: 0;
  margin-top: -5px;
  border-width: 5px 5px 5px 0;
  border-right-color: #000000;
}
.tooltip.left .tooltip-arrow {
  top: 50%;
  right: 0;
  margin-top: -5px;
  border-width: 5px 0 5px 5px;
  border-left-color: #000000;
}
.tooltip.bottom .tooltip-arrow {
 top: 0;
  left: 50%;
  margin-left: -5px;
  border-width: 0 5px 5px;
  border-bottom-color: #000000;
}
.tooltip.bottom-left .tooltip-arrow {
  top: 0;
  right: 5px;
  margin-top: -5px;
  border-width: 0 5px 5px;
  border-bottom-color: #000000;
}
.tooltip.bottom-right .tooltip-arrow {
  top: 0;
  left: 5px;
  margin-top: -5px;
  border-width: 0 5px 5px;
  border-bottom-color: #000000;
}

.popover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1060;
  display: none;
  max-width: 276px;
  padding: 1px;
  font-family: Arial;
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
  line-break: auto;
  line-height: 1.42857143;
  text-align: left;
  text-align: start;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  white-space: normal;
  word-break: normal;
  word-spacing: normal;
  word-wrap: normal;
  font-size: 14px;
  background-color: #ffffff;
  -webkit-background-clip: padding-box;
          background-clip: padding-box;
  border: 1px solid #cccccc;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.popover.top {
  margin-top: -10px;
}
.popover.right {
  margin-left: 10px;
}
.popover.bottom {
  margin-top: 10px;
}
.popover.left {
  margin-left: -10px;
}
.popover-title {
  margin: 0;
  padding: 8px 14px;
  font-size: 14px;
  background-color: #f7f7f7;
  border-bottom: 1px solid #ebebeb;
  border-radius: 5px 5px 0 0;
}
.popover-content {
  padding: 9px 14px;
}
.popover > .arrow,
.popover > .arrow:after {
  position: absolute;
  display: block;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}
.popover > .arrow {
  border-width: 11px;
}
.popover > .arrow:after {
  border-width: 10px;
  content: "";
}
.popover.top > .arrow {
  left: 50%;
  margin-left: -11px;
  border-bottom-width: 0;
  border-top-color: #999999;
  border-top-color: rgba(0, 0, 0, 0.25);
  bottom: -11px;
}
.popover.top > .arrow:after {
  content: " ";
  bottom: 1px;
  margin-left: -10px;
  border-bottom-width: 0;
  border-top-color: #ffffff;
}
.popover.right > .arrow {
  top: 50%;
  left: -11px;
  margin-top: -11px;
  border-left-width: 0;
  border-right-color: #999999;
  border-right-color: rgba(0, 0, 0, 0.25);
}
.popover.right > .arrow:after {
  content: " ";
  left: 1px;
  bottom: -10px;
  border-left-width: 0;
  border-right-color: #ffffff;
}
.popover.bottom > .arrow {
  left: 50%;
  margin-left: -11px;
  border-top-width: 0;
  border-bottom-color: #999999;
  border-bottom-color: rgba(0, 0, 0, 0.25);
  top: -11px;
}
.popover.bottom > .arrow:after {
  content: " ";
  top: 1px;
  margin-left: -10px;
  border-top-width: 0;
  border-bottom-color: #ffffff;
}
.popover.left > .arrow {
  top: 50%;
  right: -11px;
  margin-top: -11px;
  border-right-width: 0;
  border-left-color: #999999;
  border-left-color: rgba(0, 0, 0, 0.25);
}
.popover.left > .arrow:after {
  content: " ";
  right: 1px;
  border-right-width: 0;
  border-left-color: #ffffff;
  bottom: -10px;
}

.modal-open {
  overflow: hidden;
}
.modal {
  display: none;
  overflow: hidden;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  -webkit-overflow-scrolling: touch;
  outline: 0;
}
.modal.fade .modal-dialog {
  -webkit-transform: translate(0, -25%);
  -ms-transform: translate(0, -25%);
  -o-transform: translate(0, -25%);
  transform: translate(0, -25%);
  -webkit-transition: -webkit-transform 0.3s ease-out;
  -o-transition: -o-transform 0.3s ease-out;
  transition: transform 0.3s ease-out;
}
.modal.in .modal-dialog {
  -webkit-transform: translate(0, 0);
  -ms-transform: translate(0, 0);
  -o-transform: translate(0, 0);
  transform: translate(0, 0);
}
.modal-open .modal {
  overflow-x: hidden;
  overflow-y: auto;
}
.modal-dialog {
  position: relative;
  width: auto;
  margin: 10px;
}
.modal-content {
  position: relative;
  background-color: #ffffff;
  border: 1px solid #999999;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
  -webkit-background-clip: padding-box;
          background-clip: padding-box;
  outline: 0;
}
.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  background-color: #000000;
}
.modal-backdrop.fade {
  opacity: 0;
  filter: alpha(opacity=0);
}
.modal-backdrop.in {
  opacity: 0.5;
  filter: alpha(opacity=50);
}
.modal-header {
  padding: 15px;
  border-bottom: 1px solid #e5e5e5;
  min-height: 16.42857143px;
}
.modal-header .close {
  margin-top: -2px;
}
.modal-title {
  margin: 0;
  line-height: 1.42857143;
}
.modal-body {
  position: relative;
  padding: 15px;
}
.modal-footer {
  padding: 15px;
  text-align: right;
  border-top: 1px solid #e5e5e5;
}
.modal-footer .btn + .btn {
  margin-left: 5px;
  margin-bottom: 0;
}
.modal-footer .btn-group .btn + .btn {
  margin-left: -1px;
}
.modal-footer .btn-block + .btn-block {
  margin-left: 0;
}
.modal-scrollbar-measure {
  position: absolute;
  top: -9999px;
  width: 50px;
  height: 50px;
  overflow: scroll;
}
@media (min-width: 768px) {
  .modal-dialog {
    width: 600px;
    margin: 30px auto;
  }
  .modal-content {
    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  }
  .modal-sm {
    width: 300px;
  }
}
@media (min-width: 992px) {
  .modal-lg {
    width: 900px;
  }
}

.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 2px;
  vertical-align: middle;
  border-top: 4px dashed;
  border-top: 4px solid \9;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}
.dropup,
.dropdown {
  position: relative;
}
.dropdown-toggle:focus {
  outline: 0;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  float: left;
  min-width: 160px;
  padding: 5px 0;
  margin: 2px 0 0;
  list-style: none;
  font-size: 14px;
  text-align: left;
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  -webkit-background-clip: padding-box;
          background-clip: padding-box;
}
.dropdown-menu.pull-right {
  right: 0;
  left: auto;
}
.dropdown-menu .divider {
  height: 1px;
  margin: 9px 0;
  overflow: hidden;
  background-color: #e5e5e5;
}
.dropdown-menu > li > a {
  display: block;
  padding: 3px 20px;
  clear: both;
  font-weight: normal;
  line-height: 1.42857143;
  color: #333333;
  white-space: nowrap;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
  text-decoration: none;
  color: #262626;
  background-color: #f5f5f5;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
  color: #ffffff;
  text-decoration: none;
  outline: 0;
  background-color: #337ab7;
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
  color: #777777;
}
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
  text-decoration: none;
  background-color: transparent;
  background-image: none;
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  cursor: not-allowed;
}
.open > .dropdown-menu {
  display: block;
}
.open > a {
  outline: 0;
}
.dropdown-menu-right {
  left: auto;
  right: 0;
}
.dropdown-menu-left {
  left: 0;
  right: auto;
}
.dropdown-header {
  display: block;
  padding: 3px 20px;
  font-size: 12px;
  line-height: 1.42857143;
  color: #777777;
  white-space: nowrap;
}
.dropdown-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: 990;
}
.pull-right > .dropdown-menu {
  right: 0;
  left: auto;
}
.dropup .caret,
.navbar-fixed-bottom .dropdown .caret {
  border-top: 0;
  border-bottom: 4px dashed;
  border-bottom: 4px solid \9;
  content: "";
}
.dropup .dropdown-menu,
.navbar-fixed-bottom .dropdown .dropdown-menu {
  top: auto;
  bottom: 100%;
  margin-bottom: 2px;
}
@media (min-width: 768px) {
  .navbar-right .dropdown-menu {
    left: auto;
    right: 0;
  }
  .navbar-right .dropdown-menu-left {
    left: 0;
    right: auto;
  }
}

.panel {
  margin-bottom: 20px;
  background-color: #ffffff;
  border: 1px solid transparent;
  border-radius: 4px;
  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}
.panel-body {
  padding: 15px;
}
.panel-heading {
  padding: 10px 15px;
  border-bottom: 1px solid transparent;
  border-top-right-radius: 3px;
  border-top-left-radius: 3px;
}
.panel-heading > .dropdown .dropdown-toggle {
  color: inherit;
}
.panel-title {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 16px;
  color: inherit;
}
.panel-title > a,
.panel-title > small,
.panel-title > .small,
.panel-title > small > a,
.panel-title > .small > a {
  color: inherit;
}
.panel-footer {
  padding: 10px 15px;
  background-color: #f5f5f5;
  border-top: 1px solid #dddddd;
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;
}
.panel > .list-group,
.panel > .panel-collapse > .list-group {
  margin-bottom: 0;
}
.panel > .list-group .list-group-item,
.panel > .panel-collapse > .list-group .list-group-item {
  border-width: 1px 0;
  border-radius: 0;
}
.panel > .list-group:first-child .list-group-item:first-child,
.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {
  border-top: 0;
  border-top-right-radius: 3px;
  border-top-left-radius: 3px;
}
.panel > .list-group:last-child .list-group-item:last-child,
.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {
  border-bottom: 0;
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;
}
.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
  border-top-right-radius: 0;
  border-top-left-radius: 0;
}
.panel-heading + .list-group .list-group-item:first-child {
  border-top-width: 0;
}
.list-group + .panel-footer {
  border-top-width: 0;
}
.panel > .table,
.panel > .table-responsive > .table,
.panel > .panel-collapse > .table {
  margin-bottom: 0;
}
.panel > .table caption,
.panel > .table-responsive > .table caption,
.panel > .panel-collapse > .table caption {
  padding-left: 15px;
  padding-right: 15px;
}
.panel > .table:first-child,
.panel > .table-responsive:first-child > .table:first-child {
  border-top-right-radius: 3px;
  border-top-left-radius: 3px;
}
.panel > .table:first-child > thead:first-child > tr:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}
.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
  border-top-left-radius: 3px;
}
.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
  border-top-right-radius: 3px;
}
.panel > .table:last-child,
.panel > .table-responsive:last-child > .table:last-child {
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;
}
.panel > .table:last-child > tbody:last-child > tr:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}
.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
  border-bottom-left-radius: 3px;
}
.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
  border-bottom-right-radius: 3px;
}
.panel > .panel-body + .table,
.panel > .panel-body + .table-responsive,
.panel > .table + .panel-body,
.panel > .table-responsive + .panel-body {
  border-top: 1px solid #dddddd;
}
.panel > .table > tbody:first-child > tr:first-child th,
.panel > .table > tbody:first-child > tr:first-child td {
  border-top: 0;
}
.panel > .table-bordered,
.panel > .table-responsive > .table-bordered {
  border: 0;
}
.panel > .table-bordered > thead > tr > th:first-child,
.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
.panel > .table-bordered > tbody > tr > th:first-child,
.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
.panel > .table-bordered > tfoot > tr > th:first-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
.panel > .table-bordered > thead > tr > td:first-child,
.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
.panel > .table-bordered > tbody > tr > td:first-child,
.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
.panel > .table-bordered > tfoot > tr > td:first-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
  border-left: 0;
}
.panel > .table-bordered > thead > tr > th:last-child,
.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
.panel > .table-bordered > tbody > tr > th:last-child,
.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
.panel > .table-bordered > tfoot > tr > th:last-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
.panel > .table-bordered > thead > tr > td:last-child,
.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
.panel > .table-bordered > tbody > tr > td:last-child,
.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
.panel > .table-bordered > tfoot > tr > td:last-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
  border-right: 0;
}
.panel > .table-bordered > thead > tr:first-child > td,
.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
.panel > .table-bordered > tbody > tr:first-child > td,
.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
.panel > .table-bordered > thead > tr:first-child > th,
.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
.panel > .table-bordered > tbody > tr:first-child > th,
.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
  border-bottom: 0;
}
.panel > .table-bordered > tbody > tr:last-child > td,
.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
.panel > .table-bordered > tfoot > tr:last-child > td,
.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
.panel > .table-bordered > tbody > tr:last-child > th,
.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
.panel > .table-bordered > tfoot > tr:last-child > th,
.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
  border-bottom: 0;
}
.panel > .table-responsive {
  border: 0;
  margin-bottom: 0;
}
.panel-group {
  margin-bottom: 20px;
}
.panel-group .panel {
  margin-bottom: 0;
  border-radius: 4px;
}
.panel-group .panel + .panel {
  margin-top: 5px;
}
.panel-group .panel-heading {
  border-bottom: 0;
}
.panel-group .panel-heading + .panel-collapse > .panel-body,
.panel-group .panel-heading + .panel-collapse > .list-group {
  border-top: 1px solid #dddddd;
}
.panel-group .panel-footer {
  border-top: 0;
}
.panel-group .panel-footer + .panel-collapse .panel-body {
  border-bottom: 1px solid #dddddd;
}
.panel-default {
  border-color: #dddddd;
}
.panel-default > .panel-heading {
  color: #333333;
  background-color: #f5f5f5;
  border-color: #dddddd;
}
.panel-default > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #dddddd;
}
.panel-default > .panel-heading .badge {
  color: #f5f5f5;
  background-color: #333333;
}
.panel-default > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #dddddd;
}
.panel-primary {
  border-color: #337ab7;
}
.panel-primary > .panel-heading {
  color: #ffffff;
  background-color: #337ab7;
  border-color: #337ab7;
}
.panel-primary > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #337ab7;
}
.panel-primary > .panel-heading .badge {
  color: #337ab7;
  background-color: #ffffff;
}
.panel-primary > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #337ab7;
}
.panel-success {
  border-color: #d6e9c6;
}
.panel-success > .panel-heading {
  color: #3c763d;
  background-color: #dff0d8;
  border-color: #d6e9c6;
}
.panel-success > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #d6e9c6;
}
.panel-success > .panel-heading .badge {
  color: #dff0d8;
  background-color: #3c763d;
}
.panel-success > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #d6e9c6;
}
.panel-info {
  border-color: #bce8f1;
}
.panel-info > .panel-heading {
  color: #31708f;
  background-color: #d9edf7;
  border-color: #bce8f1;
}
.panel-info > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #bce8f1;
}
.panel-info > .panel-heading .badge {
  color: #d9edf7;
  background-color: #31708f;
}
.panel-info > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #bce8f1;
}
.panel-warning {
  border-color: #faebcc;
}
.panel-warning > .panel-heading {
  color: #8a6d3b;
  background-color: #fcf8e3;
  border-color: #faebcc;
}
.panel-warning > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #faebcc;
}
.panel-warning > .panel-heading .badge {
  color: #fcf8e3;
  background-color: #8a6d3b;
}
.panel-warning > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #faebcc;
}
.panel-danger {
  border-color: #ebccd1;
}
.panel-danger > .panel-heading {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}
.panel-danger > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #ebccd1;
}
.panel-danger > .panel-heading .badge {
  color: #f2dede;
  background-color: #a94442;
}
.panel-danger > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #ebccd1;
}
.close {
  float: right;
  font-size: 21px;
  font-weight: bold;
  line-height: 1;
  color: #000000;
  text-shadow: 0 1px 0 #ffffff;
  opacity: 0.2;
  filter: alpha(opacity=20);
}
.close:hover,
.close:focus {
  color: #000000;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.5;
  filter: alpha(opacity=50);
}
button.close {
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  -webkit-appearance: none;
}


text:
<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "gallery".
 *
 * @property integer $identifier
 * @property integer $cat_id
 * @property string $url
 * @property integer $created_date
 * @property integer $rating
 *
 * @property Category $cat
 */
class Gallery extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'gallery';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['cat_id', 'url', 'created_date', 'rating'], 'required'],
            [['cat_id', 'created_date', 'rating'], 'integer'],
            [['url'], 'string'],
            [['cat_id'], 'unique']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'identifier' => 'Identifier',
            'cat_id' => 'Cat ID',
            'url' => 'Url',
            'created_date' => 'Created Date',
            'rating' => 'Rating',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getCat()
    {
        return $this->hasOne(Category::className(), ['identifier' => 'cat_id']);
    }
}


text:
// MathAssert.cpp

#include "MathAssert.h"
#include "wxAll.h"

//=========================================================================================
MathAssert::MathAssert( void )
{
}

//=========================================================================================
/*virtual*/ MathAssert::~MathAssert( void )
{
}

//=========================================================================================
/*virtual*/ void MathAssert::AssertionFailure( const char* messageString )
{
	wxASSERT_MSG( false, messageString );
}

// MathAssert.cpp


text:
package array

import (
	"github.com/apache/arrow/go/arrow"
)

// A type which represents an immutable sequence of int64 values.
type Int64 struct {
	array
	values []int64
}

func NewInt64Data(data *Data) *Int64 {
	a := &Int64{}
	a.refCount = 1
	a.setData(data)
	return a
}

func (a *Int64) Value(i int) int64    { return a.values[i] }
func (a *Int64) Int64Values() []int64 { return a.values }

func (a *Int64) setData(data *Data) {
	a.array.setData(data)
	vals := data.buffers[1]
	if vals != nil {
		a.values = arrow.Int64Traits.CastFromBytes(vals.Bytes())
	}
}

// A type which represents an immutable sequence of uint64 values.
type Uint64 struct {
	array
	values []uint64
}

func NewUint64Data(data *Data) *Uint64 {
	a := &Uint64{}
	a.refCount = 1
	a.setData(data)
	return a
}

func (a *Uint64) Value(i int) uint64     { return a.values[i] }
func (a *Uint64) Uint64Values() []uint64 { return a.values }

func (a *Uint64) setData(data *Data) {
	a.array.setData(data)
	vals := data.buffers[1]
	if vals != nil {
		a.values = arrow.Uint64Traits.CastFromBytes(vals.Bytes())
	}
}

// A type which represents an immutable sequence of float64 values.
type Float64 struct {
	array
	values []float64
}

func NewFloat64Data(data *Data) *Float64 {
	a := &Float64{}
	a.refCount = 1
	a.setData(data)
	return a
}

func (a *Float64) Value(i int) float64      { return a.values[i] }
func (a *Float64) Float64Values() []float64 { return a.values }

func (a *Float64) setData(data *Data) {
	a.array.setData(data)
	vals := data.buffers[1]
	if vals != nil {
		a.values = arrow.Float64Traits.CastFromBytes(vals.Bytes())
	}
}

// A type which represents an immutable sequence of int32 values.
type Int32 struct {
	array
	values []int32
}

func NewInt32Data(data *Data) *Int32 {
	a := &Int32{}
	a.refCount = 1
	a.setData(data)
	return a
}

func (a *Int32) Value(i int) int32    { return a.values[i] }
func (a *Int32) Int32Values() []int32 { return a.values }

func (a *Int32) setData(data *Data) {
	a.array.setData(data)
	vals := data.buffers[1]
	if vals != nil {
		a.values = arrow.Int32Traits.CastFromBytes(vals.Bytes())
	}
}

// A type which represents an immutable sequence of uint32 values.
type Uint32 struct {
	array
	values []uint32
}

func NewUint32Data(data *Data) *Uint32 {
	a := &Uint32{}
	a.refCount = 1
	a.setData(data)
	return a
}

func (a *Uint32) Value(i int) uint32     { return a.values[i] }
func (a *Uint32) Uint32Values() []uint32 { return a.values }

func (a *Uint32) setData(data *Data) {
	a.array.setData(data)
	vals := data.buffers[1]
	if vals != nil {
		a.values = arrow.Uint32Traits.CastFromBytes(vals.Bytes())
	}
}

// A type which represents an immutable sequence of float32 values.
type Float32 struct {
	array
	values []float32
}

func NewFloat32Data(data *Data) *Float32 {
	a := &Float32{}
	a.refCount = 1
	a.setData(data)
	return a
}

func (a *Float32) Value(i int) float32      { return a.values[i] }
func (a *Float32) Float32Values() []float32 { return a.values }

func (a *Float32) setData(data *Data) {
	a.array.setData(data)
	vals := data.buffers[1]
	if vals != nil {
		a.values = arrow.Float32Traits.CastFromBytes(vals.Bytes())
	}
}

// A type which represents an immutable sequence of int16 values.
type Int16 struct {
	array
	values []int16
}

func NewInt16Data(data *Data) *Int16 {
	a := &Int16{}
	a.refCount = 1
	a.setData(data)
	return a
}

func (a *Int16) Value(i int) int16    { return a.values[i] }
func (a *Int16) Int16Values() []int16 { return a.values }

func (a *Int16) setData(data *Data) {
	a.array.setData(data)
	vals := data.buffers[1]
	if vals != nil {
		a.values = arrow.Int16Traits.CastFromBytes(vals.Bytes())
	}
}

// A type which represents an immutable sequence of uint16 values.
type Uint16 struct {
	array
	values []uint16
}

func NewUint16Data(data *Data) *Uint16 {
	a := &Uint16{}
	a.refCount = 1
	a.setData(data)
	return a
}

func (a *Uint16) Value(i int) uint16     { return a.values[i] }
func (a *Uint16) Uint16Values() []uint16 { return a.values }

func (a *Uint16) setData(data *Data) {
	a.array.setData(data)
	vals := data.buffers[1]
	if vals != nil {
		a.values = arrow.Uint16Traits.CastFromBytes(vals.Bytes())
	}
}

// A type which represents an immutable sequence of int8 values.
type Int8 struct {
	array
	values []int8
}

func NewInt8Data(data *Data) *Int8 {
	a := &Int8{}
	a.refCount = 1
	a.setData(data)
	return a
}

func (a *Int8) Value(i int) int8   { return a.values[i] }
func (a *Int8) Int8Values() []int8 { return a.values }

func (a *Int8) setData(data *Data) {
	a.array.setData(data)
	vals := data.buffers[1]
	if vals != nil {
		a.values = arrow.Int8Traits.CastFromBytes(vals.Bytes())
	}
}

// A type which represents an immutable sequence of uint8 values.
type Uint8 struct {
	array
	values []uint8
}

func NewUint8Data(data *Data) *Uint8 {
	a := &Uint8{}
	a.refCount = 1
	a.setData(data)
	return a
}

func (a *Uint8) Value(i int) uint8    { return a.values[i] }
func (a *Uint8) Uint8Values() []uint8 { return a.values }

func (a *Uint8) setData(data *Data) {
	a.array.setData(data)
	vals := data.buffers[1]
	if vals != nil {
		a.values = arrow.Uint8Traits.CastFromBytes(vals.Bytes())
	}
}

// A type which represents an immutable sequence of arrow.Timestamp values.
type Timestamp struct {
	array
	values []arrow.Timestamp
}

func NewTimestampData(data *Data) *Timestamp {
	a := &Timestamp{}
	a.refCount = 1
	a.setData(data)
	return a
}

func (a *Timestamp) Value(i int) arrow.Timestamp        { return a.values[i] }
func (a *Timestamp) TimestampValues() []arrow.Timestamp { return a.values }

func (a *Timestamp) setData(data *Data) {
	a.array.setData(data)
	vals := data.buffers[1]
	if vals != nil {
		a.values = arrow.TimestampTraits.CastFromBytes(vals.Bytes())
	}
}


text:
<?php

namespace Proxies\__CG__\CMS\Entity;

/**
 * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
 */
class Image extends \CMS\Entity\Image implements \Doctrine\ORM\Proxy\Proxy
{
    /**
     * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
     *      three parameters, being respectively the proxy object to be initialized, the method that triggered the
     *      initialization process and an array of ordered parameters that were passed to that method.
     *
     * @see \Doctrine\Common\Persistence\Proxy::__setInitializer
     */
    public $__initializer__;

    /**
     * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
     *
     * @see \Doctrine\Common\Persistence\Proxy::__setCloner
     */
    public $__cloner__;

    /**
     * @var boolean flag indicating if this object was already initialized
     *
     * @see \Doctrine\Common\Persistence\Proxy::__isInitialized
     */
    public $__isInitialized__ = false;

    /**
     * @var array properties to be lazy loaded, with keys being the property
     *            names and values being their default values
     *
     * @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
     */
    public static $lazyPropertiesDefaults = [];

    /**
     * @param \Closure $initializer
     * @param \Closure $cloner
     */
    public function __construct($initializer = null, $cloner = null)
    {

        $this->__initializer__ = $initializer;
        $this->__cloner__      = $cloner;
    }

    /**
     *
     * @return array
     */
    public function __sleep()
    {
        if ($this->__isInitialized__) {
            return ['__isInitialized__', '' . "\0" . 'CMS\\Entity\\Image' . "\0" . 'id', '' . "\0" . 'CMS\\Entity\\Image' . "\0" . 'filename', '' . "\0" . 'CMS\\Entity\\Image' . "\0" . 'file', '' . "\0" . 'CMS\\Entity\\Image' . "\0" . 'description', '' . "\0" . 'CMS\\Entity\\Image' . "\0" . 'thumbnail'];
        }

        return ['__isInitialized__', '' . "\0" . 'CMS\\Entity\\Image' . "\0" . 'id', '' . "\0" . 'CMS\\Entity\\Image' . "\0" . 'filename', '' . "\0" . 'CMS\\Entity\\Image' . "\0" . 'file', '' . "\0" . 'CMS\\Entity\\Image' . "\0" . 'description', '' . "\0" . 'CMS\\Entity\\Image' . "\0" . 'thumbnail'];
    }

    /**
     *
     */
    public function __wakeup()
    {
        if ( ! $this->__isInitialized__) {
            $this->__initializer__ = function (Image $proxy) {
                $proxy->__setInitializer(null);
                $proxy->__setCloner(null);

                $existingProperties = get_object_vars($proxy);

                foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
                    if ( ! array_key_exists($property, $existingProperties)) {
                        $proxy->$property = $defaultValue;
                    }
                }
            };

        }
    }

    /**
     *
     */
    public function __clone()
    {
        $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
    }

    /**
     * Forces initialization of the proxy
     */
    public function __load()
    {
        $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     */
    public function __isInitialized()
    {
        return $this->__isInitialized__;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     */
    public function __setInitialized($initialized)
    {
        $this->__isInitialized__ = $initialized;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     */
    public function __setInitializer(\Closure $initializer = null)
    {
        $this->__initializer__ = $initializer;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     */
    public function __getInitializer()
    {
        return $this->__initializer__;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     */
    public function __setCloner(\Closure $cloner = null)
    {
        $this->__cloner__ = $cloner;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific cloning logic
     */
    public function __getCloner()
    {
        return $this->__cloner__;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     * @static
     */
    public function __getLazyProperties()
    {
        return self::$lazyPropertiesDefaults;
    }

    /**
     * {@inheritDoc}
     */
    public function getId()
    {
        if ($this->__isInitialized__ === false) {
            return (int)  parent::getId();
        }

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', []);

        return parent::getId();
    }

    /**
     * {@inheritDoc}
     */
    public function setFilename($filename)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setFilename', [$filename]);

        return parent::setFilename($filename);
    }

    /**
     * {@inheritDoc}
     */
    public function getFilename()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFilename', []);

        return parent::getFilename();
    }

    /**
     * {@inheritDoc}
     */
    public function setFile($file)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setFile', [$file]);

        return parent::setFile($file);
    }

    /**
     * {@inheritDoc}
     */
    public function getFile()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFile', []);

        return parent::getFile();
    }

    /**
     * {@inheritDoc}
     */
    public function setDescription($description)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDescription', [$description]);

        return parent::setDescription($description);
    }

    /**
     * {@inheritDoc}
     */
    public function getDescription()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDescription', []);

        return parent::getDescription();
    }

    /**
     * {@inheritDoc}
     */
    public function setThumbnail($thumbnail)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setThumbnail', [$thumbnail]);

        return parent::setThumbnail($thumbnail);
    }

    /**
     * {@inheritDoc}
     */
    public function getThumbnail()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getThumbnail', []);

        return parent::getThumbnail();
    }

}


text:
package org.oic.simulator;

/**
 * Interface for getting device information.
 */
public interface IDeviceInfo {
    /**
     * Callback method which provides remote device information.
     *
     * @param devInfo
     *            {@link DeviceInfo} object holding the device information.
     */
    public void onDeviceFound(DeviceInfo devInfo);
}


text:
/*
 *   IRC - Internet Relay Chat, src/modules/out.c
 *   (C) 2004 The UnrealIRCd Team
 *
 *   See file AUTHORS in IRC package for additional names of
 *   the programmers.
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 1, or (at your option)
 *   any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
#include "config.h"
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "proto.h"
#include "channel.h"
#include <time.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#include <io.h>
#endif
#include <fcntl.h>
#include "h.h"
#ifdef _WIN32
#include "version.h"
#endif

CMD_FUNC(m_close);

#define MSG_CLOSE 	"CLOSE"

ModuleHeader MOD_HEADER(m_close)
  = {
	"m_close",
	"4.0",
	"command /close",
	"3.2-b8-1",
	NULL
    };

MOD_INIT(m_close)
{
	CommandAdd(modinfo->handle, MSG_CLOSE, m_close, MAXPARA, M_USER);
	MARK_AS_OFFICIAL_MODULE(modinfo);
	return MOD_SUCCESS;
}

MOD_LOAD(m_close)
{
	return MOD_SUCCESS;
}

MOD_UNLOAD(m_close)
{
	return MOD_SUCCESS;
}

/*
** m_close - added by Darren Reed Jul 13 1992.
*/
CMD_FUNC(m_close)
{
	aClient *acptr, *acptr2;
	int  i;
	int  closed = 0;

	if (!ValidatePermissionsForPath("server:close",sptr,NULL,NULL,NULL))
	{
		sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, sptr->name);
		return 0;
	}

	list_for_each_entry_safe(acptr, acptr2, &unknown_list, lclient_node)
	{
		sendto_one(sptr, rpl_str(RPL_CLOSING), me.name, sptr->name,
		    get_client_name(acptr, TRUE), acptr->status);
		(void)exit_client(acptr, acptr, acptr, "Oper Closing");
		closed++;
	}

	sendto_one(sptr, rpl_str(RPL_CLOSEEND), me.name, sptr->name, closed);
	sendto_realops("%s!%s@%s closed %d unknown connections", sptr->name,
	    sptr->user->username, GetHost(sptr), closed);
	IRCstats.unknown = 0;

	return 0;
}


text:
date: 2018-10-20 18:14:22
title: The Secretarybird
tags:
    - birds
    - nature
    - beautiful
---

Behold the beautiful [Secretarybird](https://en.wikipedia.org/wiki/Secretarybird) 🙌

![Secretarybird](/misc/s/Secretarybird.jpg)

<small class="credit">-- Source Unknown</small>

_Way_ out of other birds' leagues, eats venomous snakes, and "appears on the coats of arms of [Sudan](https://en.wikipedia.org/wiki/Emblem_of_Sudan#/media/File:Emblem_of_Sudan.svg) and [South Africa](https://en.wikipedia.org/wiki/Coat_of_arms_of_South_Africa#/media/File:Coat_of_arms_of_South_Africa.png)" 🔥


text:
RSpec.describe WannabeBool::Nil do
  context NilClass do
    subject { nil }

    describe '#to_b' do
      it { expect(subject.to_b).to be false }
    end

    describe '#to_bool' do
      it { expect(subject.to_bool).to be false }
    end

    describe '#to_boolean' do
      it { expect(subject.to_boolean).to be false }
    end
  end
end


text:
@interface AppDelegate ()

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    A0Lock *lock = [[Application sharedInstance] lock];
    [lock applicationLaunchedWithOptions:launchOptions];
    return YES;
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
    A0Lock *lock = [[Application sharedInstance] lock];
    return [lock handleURL:url sourceApplication:sourceApplication];
}

@end