text:
div.azul #page-color {
  background: white url("../img/cubos_azul.png");
}
div.azul a:visited,
div.azul a:link {
  color: #226FA5;
}
div.azul #footer-menu a:hover,
div.azul .breadcrumb a:hover,
div.azul .content a:hover {
  color: #0BA3DB;
}
div.azul #content-menu li,
div.azul input#edit-next,
div.azul input[type="file"],
div.azul input[type="submit"],
div.azul #main-menu li {
  color: #226FA5;
  border-color: #226FA5
}
div.azul #content-menu li.active,
div.azul #main-menu li.active {
  color: #226FA5;
  background-color: #D3E2ED;
  border-color: #D3E2ED;
}
div.azul #content-menu li:hover,
div.azul input#edit-next:hover,
div.azul input[type="file"],
div.azul input[type="submit"]:hover,
div.azul #main-menu li:hover {
  background-color: #D3E2ED;
  border-color: #D3E2ED;
}
div.azul #content-menu{
  margin-bottom: 20px;
}
/* Pagina de noticias */
.noticia-size-12 {
  font-size: 12px;
  font-family: Tahoma;
  font-style: normal;
  line-height: 130%;
  text-align: left;
}
#block-views-noticias-block,
#block-views-noticias-block-1,
#block-views-noticias-block-2 {
  float: left;
  width: 100%;
}
#block-views-noticias-block,
#block-views-noticias-block-2 {
  display: none;
}
body.node-type-pagina-azul .field-type-file a,
body.node-type-noticia .field-item a,
body.node-type-mapa .field-item a{
  font-weight: bold;
}
.view-noticias .box-noticia {
  display: inline-block;
  width: 30%;
  margin-right: 10px;
}
.view-noticias .views-field-title{
  font-size: 14px;
  font-family: Trebuchet MS;
  font-weight: bold;
  line-height: 100%;
}
.view-noticias .views-field-body{
  font-size: 12px;
  font-family: Tahoma;
  font-style: normal;
  line-height: 130%;
  text-align: left;
}
.view-noticias .views-field-body p{
  margin-bottom: 0px;
}
.view-row + .views-field-body{
  padding-bottom: 2px;
}
/*Verificar daqui pra baixo qual serve*/

.azul_txt_sub-titulo {
  font-size: 22px;
  font-family: Trebuchet MS;
  font-weight: bold;
  line-height: 100%;
}
.azul_txt_corrido_12 {
  font-size: 12px;
  font-family: Tahoma;
  font-style: normal;
  line-height: 130%;
  text-align: justify;
}
.azul_txt_mes-ano_noticia {
  font-size: 14px;
  font-family: Trebuchet MS;
  font-style: normal;
  line-height: 200%;
  text-align: left;
}
.azul_txt_noticia_titulo {
  font-size: 14px;
  font-family: Trebuchet MS;
  font-weight: bold;
  line-height: 100%;
}
body.node-type-pagina-azul .field-item p{
  margin-top: 0px;
  margin-bottom: 0px;
}
body.node-type-pagina-azul .block-views h2{
  font-size: 22px;
  font-family: Trebuchet MS;
  font-weight: bold;
  line-height: 100%;
}

body.azul .field-type-text {
  font-weight: bold;
}
.page-node div.azul .field-type-file{
  font-size: 14px;
  font-family: Tahoma;
  font-style: normal;
  line-height: 130%;
  text-align: justify;
}

/* Mapas de Navegação */

body.node-type-janela .field-link-field,
body.node-type-doenca-falciforme-janela-de-mapa .field-type-file {
  margin-bottom: 20px;
}
body.node-type-doenca-falciforme-janela-de-mapa .field-type-link-field .field-item,
body.node-type-doenca-falciforme-janela-de-mapa .field-type-file .field-item,
body.node-type-janela .field-type-link-field .field-item{
  z-index:10;
  background:#fff;
  border-bottom:2px solid #fff;
}
body.node-type-doenca-falciforme-janela-de-mapa .field-type-text,
body.node-type-janela .field-type-text{
  margin-top: 10px;
  font-size: 18px;
  font-family: Trebuchet MS;
  font-weight: bold;
  line-height: 130%;
}
/* Mapas de Navegação */
/* Dash line da pagina azul */
body.node-type-doenca-falciforme-janela-de-mapa .field-type-text,
body.node-type-janela .field-type-text,
.view-noticias .views-row{
  border-color: black;
  padding-bottom: 4px;
  border-width: 1px;
  border-bottom-style: dashed;
  margin-top: 5px;
  margin-bottom: 5px;
}
/* Dash line da pagina azul */
/* Forms */
.page-user input.form-text,
.page-node input.form-text,
.page-node textarea.form-textarea,
.page-node input[type="text"] {
  display: block;
  margin: 0;
  width: 100%;
  font-size: 18px;
  appearance: none;
  box-shadow: none;
  border-radius: none;
}
.page-user input.form-text:focus,
.page-node input.form-text:focus,
.page-node textarea.form-textarea:focus,
.page-node input[type="text"]:focus {
  outline: none;
}
.page-user input.form-text,
.page-node .webform-client-form input.form-text,
.page-node .webform-client-form textarea.form-textarea,
.page-node .webform-client-form input[type="text"] {
  text-align: justify;
  -webkit-transition: all 0.30s ease-in-out;
  -moz-transition: all 0.30s ease-in-out;
  -ms-transition: all 0.30s ease-in-out;
  -o-transition: all 0.30s ease-in-out;
  outline: none;
  padding: 3px 0px 3px 3px;
  margin: 5px 1px 3px 0px;
  border: 1px solid #DDDDDD;
}
.page-user input.form-text.focus,
.page-user input.form-text:focus,
.page-node .webform-client-form input.form-text.focus,
.page-node .webform-client-form input.form-text:focus,
.page-node .webform-client-form textarea.form-textarea:focus,
.page-node .webform-client-form textarea.form-textarea.focus,
.page-node .webform-client-form input[type="text"]:focus,
.page-node .webform-client-form input[type="text"].focus {
  outline: none !important;
  box-shadow: 5px 3px 20px rgba(81, 203, 238, 1);
  padding: 3px 0px 3px 3px;
  margin: 5px 1px 3px 0px;
  border: 1px solid rgba(81, 203, 238, 1);
  border-style: double;
}
.page-node .form-type-radio{
  width: 100%;
  float: left;
}
.page-node .webform-client-form  input[value="Upload"]{
  display: none;
}
.page-user input[type="submit"],
.page-node input[type="submit"]{
  cursor: pointer;
}
/* hide input */
.page-node input[type="radio"]:empty {
  position: absolute;
  visibility: hidden;
}
.page-node input[type="radio"] ~ label {
  width: 100%;
  border-radius: 3px;
  border: 1px solid #D1D3D4;
  color: #999;
}
/* style label */
.page-node input[type="radio"]:empty ~ label {
  position: relative;
  float: left;
  line-height: 2.5em;
  text-indent: 3.25em;
  margin-top: 5px;
  margin-bottom: 5px;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.page-node input[type="radio"]:empty ~ label:before {
  position: absolute;
  display: block;
  top: 0;
  bottom: 0;
  left: 0;
  content: '';
  width: 2.5em;
  background: #D1D3D4;
  border-radius: 3px 0 0 3px;
}
/* toggle hover */
.page-node input[type="radio"]:hover:not(:checked) ~ label:before {
  content:'\2714';
  text-indent: .9em;
  color: #226FA5;
  background-color: #D3E2ED;
}
.page-node input[type="radio"]:hover:not(:checked) ~ label {
  color: #226FA5;
}
/* toggle on */
.page-node input[type="radio"]:checked ~ label:before {
  content:'\2714';
  text-indent: .9em;
  color: #D3E2ED;
  background-color: #226FA5;
}
.page-node input[type="radio"]:checked ~ label {
  color: #226FA5;
}
.page-node .links {
  font-weight: bold;
}
/* Select Data */
.page-node .form-type-select {
  width: 100px;
  float: left;
}
.page-node .form-type-select > select {
  width: 100%;
  height: 45px;
  margin: 8px 0;
  border: 0;
  border: 1px solid black;
  border-top: 4px solid #226FA5;
  background: #fff url('https://cdn3.iconfinder.com/data/icons/google-material-design-icons/48/ic_keyboard_arrow_down_48px-128.png') no-repeat;
  background-size: 20px;
  background-position:  right 10px center;
  padding-left: 24px;
  -webkit-appearance: none;
  -moz-appearance: none;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  color: #226FA5;
}
.page-node .form-type-select > select:focus {
  outline: none;
}
.page-node .form-type-select > select > option:hover,
.page-node .form-type-select > select > option:focus {
  background-color: #D3E2ED;
}
.page-user .webform-client-form input.error,
.page-node .webform-client-form input.error{
  border: 1px solid red;
}
/* Forms */


text:
<?php

namespace Victoire\Bundle\WidgetBundle\Renderer;

use Doctrine\ORM\EntityManager;
use Symfony\Component\DependencyInjection\Container;
use Victoire\Bundle\BusinessPageBundle\Entity\BusinessPage;
use Victoire\Bundle\BusinessPageBundle\Entity\BusinessTemplate;
use Victoire\Bundle\BusinessPageBundle\Helper\BusinessPageHelper;
use Victoire\Bundle\CoreBundle\DataCollector\VictoireCollector;
use Victoire\Bundle\CoreBundle\Entity\View;
use Victoire\Bundle\CoreBundle\Event\WidgetRenderEvent;
use Victoire\Bundle\CoreBundle\VictoireCmsEvents;
use Victoire\Bundle\WidgetBundle\Cache\WidgetCache;
use Victoire\Bundle\WidgetBundle\Entity\Widget;
use Victoire\Bundle\WidgetBundle\Helper\WidgetHelper;
use Victoire\Bundle\WidgetMapBundle\Entity\Slot;

class WidgetRenderer
{
    private $container;
    /**
     * @var WidgetCache
     */
    private $widgetCache;
    /**
     * @var WidgetHelper
     */
    private $widgetHelper;
    /**
     * @var VictoireCollector
     */
    private $victoireCollector;
    /**
     * @var BusinessPageHelper
     */
    private $bepHelper;

    /**
     * WidgetRenderer constructor.
     *
     * @param Container          $container
     * @param WidgetCache        $widgetCache
     * @param WidgetHelper       $widgetHelper
     * @param VictoireCollector  $victoireCollector
     * @param BusinessPageHelper $bepHelper
     *
     * @internal param Client $redis
     */
    public function __construct(Container $container, WidgetCache $widgetCache, WidgetHelper $widgetHelper, VictoireCollector $victoireCollector, BusinessPageHelper $bepHelper)
    {
        $this->container = $container;
        $this->widgetCache = $widgetCache;
        $this->widgetHelper = $widgetHelper;
        $this->victoireCollector = $victoireCollector;
        $this->bepHelper = $bepHelper;
    }

    /**
     * render the Widget.
     *
     * @param Widget $widget
     * @param View   $view
     *
     * @return widget show
     */
    public function render(Widget $widget, View $view)
    {
        //the mode of display of the widget
        $mode = $widget->getMode();

        //if entity is given and it's not the object, retrieve it and set the entity for the widget
        if ($mode == Widget::MODE_BUSINESS_ENTITY && $view instanceof BusinessPage) {
            $widget->setEntity($view->getBusinessEntity());
        } elseif ($view instanceof BusinessTemplate) {
            //We'll try to find a sample entity to mock the widget behavior
            /** @var EntityManager $entityManager */
            $entityManager = $this->container->get('doctrine.orm.entity_manager');
            if ($mock = $this->bepHelper->getEntitiesAllowedQueryBuilder($view, $entityManager)->setMaxResults(1)->getQuery()->getOneOrNullResult()) {
                $widget->setEntity($mock);
            }
        }

        //the templating service
        $templating = $this->container->get('templating');

        //the content of the widget

        $parameters = $this->container->get('victoire_widget.widget_content_resolver')->getWidgetContent($widget);
        /*
         * In some cases, for example, WidgetRender in BusinessEntity mode with magic variables {{entity.id}} transformed
         * into the real business entity id, then if in the rendered action, we need to flush, it would persist the
         * modified widget which really uncomfortable ;)
         */
        if ($widget->getMode() == Widget::MODE_BUSINESS_ENTITY) {
            $this->container->get('doctrine.orm.entity_manager')->refresh($widget);
        }

        //the template displayed is in the widget bundle (with the potential theme)
        $showView = 'show'.ucfirst($widget->getTheme());
        $templateName = $this->container->get('victoire_widget.widget_helper')->getTemplateName($showView, $widget);

        return $templating->render($templateName, $parameters);
    }

    /**
     * render a widget.
     *
     * @param Widget $widget
     * @param View   $view
     *
     * @return string
     */
    public function renderContainer(Widget $widget, View $view)
    {
        $dispatcher = $this->container->get('event_dispatcher');

        $dispatcher->dispatch(VictoireCmsEvents::WIDGET_PRE_RENDER, new WidgetRenderEvent($widget));

        $widgetMap = $widget->getWidgetMap();
        $directive = '';
        if ($this->container->get('security.authorization_checker')->isGranted('ROLE_VICTOIRE')) {
            $directive = 'widget';
        }

        $id = 'vic-widget-'.$widget->getId().'-container';

        $html = sprintf('
', $directive, $widgetMap->getId(), $id, $widget->getId());

        if ($this->widgetHelper->isCacheEnabled($widget)) {
            $content = $this->widgetCache->fetch($widget);
            if (null === $content) {
                $content = $this->render($widget, $view);
                $this->widgetCache->save($widget, $content);
            } else {
                $this->victoireCollector->addCachedWidget($widget);
            }
        } else {
            $content = $this->render($widget, $view);
        }
        $html .= $content;
        $html .= '
'; //close container

        $dispatcher->dispatch(VictoireCmsEvents::WIDGET_POST_RENDER, new WidgetRenderEvent($widget, $html));

        return $html;
    }

    /**
     * prepare a widget to be rendered asynchronously.
     *
     * @param int $widgetId
     *
     * @return string
     */
    public function prepareAsynchronousRender($widgetId)
    {
        $ngControllerName = 'widget'.$widgetId.'AsynchronousLoadCtrl';
        $ngDirectives = sprintf('ng-controller="WidgetAsynchronousLoadController as %s" class="vic-widget" ng-init="%s.init(%d)" ng-bind-html="html"', $ngControllerName, $ngControllerName, $widgetId);
        $html = sprintf('

', $widgetId, $ngDirectives);

        return $html;
    }

    /**
     * render widget unlink action.
     *
     * @param int  $widgetId
     * @param View $view
     *
     * @return string
     */
    public function renderUnlinkActionByWidgetId($widgetId, $view)
    {
        return $this->container->get('templating')->render(
            'VictoireCoreBundle:Widget:widgetUnlinkAction.html.twig',
            [
                'widgetId' => $widgetId,
                'view'     => $view,
            ]
        );
    }

    /**
     * Compute slot options.
     *
     * @param Slot  $slotId
     * @param array $options
     *
     * @return string
     */
    public function computeOptions($slotId, $options = [])
    {
        $slots = $this->container->getParameter('victoire_core.slots');

        $availableWidgets = $this->container->getParameter('victoire_core.widgets');
        $widgets = [];

        //If the slot is declared in config
        if (!empty($slots[$slotId]) && !empty($slots[$slotId]['widgets'])) {
            //parse declared widgets
            $slotWidgets = array_keys($slots[$slotId]['widgets']);
        } elseif (!empty($options['availableWidgets'])) {
            $slotWidgets = $options['availableWidgets'];
        } else {
            //parse all widgets
            $slotWidgets = array_keys($availableWidgets);
        }

        foreach ($slotWidgets as $slotWidget) {
            $widgetParams = $availableWidgets[$slotWidget];
            $widgets[$slotWidget]['params'] = $widgetParams;
        }
        $slots[$slotId]['availableWidgets'] = $widgets;
        if (isset($options['max'])) {
            $slots[$slotId]['max'] = $options['max'];
        }

        return $slots[$slotId];
    }

    /**
     * Get the extra classes for the css.
     *
     * @return string The classes
     */
    public function getExtraCssClass(Widget $widget)
    {
        $cssClass = 'v-widget--'.strtolower($this->container->get('victoire_widget.widget_helper')->getWidgetName($widget));

        return $cssClass;
    }
}

redpajama_set_name: RedPajamaGithub


text:
package dagger.tests.integration;

import dagger.internal.codegen.GraphAnalysisProcessor;
import dagger.internal.codegen.InjectAdapterProcessor;
import dagger.internal.codegen.ModuleAdapterProcessor;
import dagger.internal.codegen.ValidationProcessor;
import java.util.Arrays;
import javax.annotation.processing.Processor;

/**
 * Internal test utilities.
 */
public class ProcessorTestUtils {
  public static Iterable<? extends Processor> daggerProcessors() {
    return Arrays.asList(
        new InjectAdapterProcessor(),
        new ModuleAdapterProcessor(),
        new GraphAnalysisProcessor(),
        new ValidationProcessor());
  }
}


text:
"""
pynorm - Python wrapper for NRL's libnorm
By: Tom Wambold <wambold@itd.nrl.navy.mil>
"""

# For Python 2.5
from __future__ import with_statement

from threading import Thread, Lock
from random import randint

#from .models import get_session, SessionProfile, SendProfile, ReceiveProfile
from .. import constants as c
from ..instance import Instance

class StopManager(Exception): pass

class Manager(Thread):
    """Provides a callback driven method of handling NORM events."""

    def __init__(self, instance=None, *args, **kwargs):
        super(Manager, self).__init__(*args, **kwargs)
        self.setDaemon(True)

        self.instance = instance if instance is not None else Instance()

        self.callbacks = {}
        self.sessions = {}
        self.lock = Lock()
        self.doQuit = False

    def run(self):
        while not self.doQuit:
            event = self.instance.getNextEvent(2)
            if event is None:
                continue

            with self.lock:
                try:
                    cbs = self.callbacks[event.type]
                except KeyError:
                    continue

                try:
                    for func, args, kwargs in cbs:
                        func(event, *args, **kwargs)
                except StopManager:
                    self.doQuit = True

    def register(self, event, func, *args, **kwargs):
        with self.lock:
            self.callbacks.setdefault(event, list()).append(
                    (func, args, kwargs))

    def unregister(self, event, func, *args, **kwargs):
        with self.lock:
            self.callbacks[event].remove((func, args, kwargs))

#    def start_session(self, name):
#        sqlsession = get_session()
#        profile = sqlsession.query(SessionProfile).filter_by(name=name).first()
#        self.instance.setCacheDirectory(profile.cache_directory)
#        session = self.instance.createSession(profile.address, profile.port, profile.node_id)
#        session.userData = name
#
#        if profile.interface is not None:
#            session.setMulticastInterface(profile.interface)
#
#        if profile.ttl is not None:
#            session.setTTL(profile.ttl)
#
#        if profile.tos is not None:
#            session.setTOS(profile.tos)
#
#        if profile.loopback is not None:
#            session.setLoopback(profile.loopback)
#        self.sessions[name] = session
#        sqlsession.close()
#
#    def start_sender(self, session_name, sender_name):
#        session = self.sessions[session_name]
#        sqlsession = get_session()
#        profile = sqlsession.query(SendProfile).filter_by(
#                name=sender_name).first()
#        session.startSender(randint(0, 10000), profile.buffer_space,
#                profile.segment_size, profile.block_size, profile.num_parity)
#
#        if profile.graceful_stop is not None:
#            session.sendGracefulStop = profile.graceful_stop
#
#        if profile.rate is not None:
#            session.setTxRate(profile.rate)
#
#        if profile.socket_buffer is not None:
#            session.setTxSocketBuffer(profile.socket_buffer)
#
#        if profile.congestion_control is not None:
#            session.setCongestionControl(profile.congestion_control)
#
#        if None not in (profile.rate_min, profile.rate_max):
#            session.setTxRateBounds(profile.rate_min, profile.rate_max)
#
#        if None not in (profile.size_max, profile.cache_min,
#                profile.cache_max):
#            session.setTxCacheBounds(profile.size_max, profile.cache_min,
#                    profile.cache_max)
#
#        if profile.auto_parity is not None:
#            session.setAutoParity(profile.auto_parity)
#
#        if profile.grtt is not None:
#            session.setGrttEstimate(profile.grtt)
#
#        if profile.grtt_max is not None:
#            session.setGrttMax(profile.grtt_max)
#
#        if profile.grtt_probing_mode is not None:
#            session.setGrttProbingMode(getattr(c, profile.grtt_probing_mode))
#
#        if None not in (profile.grtt_probing_interval_min,
#                profile.grtt_probing_interval_max):
#            session.setGrttProbingInterval(profile.grtt_probing_interval_min,
#                    profile.grtt_probing_interval_max)
#
#        if profile.backoff_factor is not None:
#            session.setBackoffFactor(profile.backoff_factor)
#
#        if profile.group_size is not None:
#            session.setGroupSize(profile.group_size)
#        sqlsession.close()
#        return session
#
#    def start_receiver(self, session_name, receiver_name):
#        sqlsession = get_session()
#        session = self.sessions[session_name]
#        profile = sqlsession.query(ReceiveProfile).filter_by(
#                name=receiver_name).first()
#        session.startReceiver(profile.buffer_space)
#
#        if profile.grace_period is not None:
#            session.gracePeriod = profile.grace_period
#
#        if profile.socket_buffer is not None:
#            session.setRxSocketBuffer(profile.socket_buffer)
#
#        if profile.is_silent is not None:
#            session.setSilentReceiver(profile.is_silent, profile.silent_max_delay)
#
#        if profile.unicast_nack is not None:
#            session.setDefaultUnicastNack(profile.unicast_nack)
#
#        if profile.nacking_mode is not None:
#            session.setDefaultNackingMode(getattr(c, profile.nacking_mode))
#
#        if profile.repair_boundary is not None:
#            session.setDefaultRepairBoundary(getattr(c, profile.repair_boundary))
#        sqlsession.close()
#        return session


text:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
		  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5">
    <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>

    <!-- Granule Tag required servlet declarations -->
    <servlet>
        <servlet-name>CompressServlet</servlet-name>
        <servlet-class>com.granule.CompressServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>CompressServlet</servlet-name>
        <url-pattern>/combined.js</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>CompressServlet</servlet-name>
        <url-pattern>/combined.css</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
</web-app>


text:
<?php
/*
Template Name: No Sidebar
*/
?>
<?php get_template_part('templates/page', 'header'); ?>
<?php get_template_part('templates/content', 'page'); ?>


text:
See [.github/RELEASING](https://github.com/cucumber/.github/blob/main/RELEASING.md).

## When done ##

Update the cucumber-jvm version in the documentation project:

* https://github.com/cucumber/docs.cucumber.io

The cucumber-jvm version for the docs is specified in the docs [versions.yaml](https://github.com/cucumber/docs.cucumber.io/blob/master/data/versions.yaml)

All done! Hurray!


text:
import { withLinks } from '@storybook/addon-links';

export const decorators = [withLinks];

const port = process.env.SERVER_PORT || 1337;

export const parameters = {
  a11y: {
    config: {},
    options: {
      checks: { 'color-contrast': { options: { noScroll: true } } },
      restoreScroll: true,
    },
  },
  docs: {
    iframeHeight: '200px',
  },
  server: {
    url: `http://localhost:${port}/storybook_preview`,
  },
};


text:
#import "CKHttpServletOutputStream.h"
#import "CKHttpServletResponse.h"

@implementation CKHttpServletOutputStream

- initWithResponse:(CKHttpServletResponse *)aResponse
{
	response = aResponse; //not retained

	return self;
}

- (void)dealloc
{
	[super dealloc];
}

- (void)writeData:(NSData *)data
{
	[response writeData:data];
}

- (void)writeString:(NSString *)string encoding:(NSStringEncoding)encoding
{
	[response writeData:[string dataUsingEncoding:encoding]];
}

@end


text:
+ `--watch` now looks for template changes
+ Add consistent `format_date` function for both mustache/lhtml templates:
+ Add `config.date_format`

# v3.1

+ Add support for `.mustache` templates
+ Default new sites to use `.mustache` build in template
+ Add `--lhtml` flag to init to create sites with the old `.lhtml` template
+ Fix `.lhtml` templates which print '-'

# v3.0

Breaking:

+ Rename `config.index` -> `config.index_page`
+ Change CLI arg `--nocache` -> `--no-cache`

The rest:

+ Add support for multiple (url, build_dir) environments
+ Add `config.force_index_page` to create index form page even when posts exist
+ Add `config.sticky_page` to have a page appear at the top of index
+ Add `config.archive_title` to change the title of the archive page
+ Add `--watch` command line to rebuild on changes to posts/ & pages/ (no Windows support :()
+ Add ID attribute to `<hX>` tags in markdown lib
+ Add $raw$...$/raw$ syntax to disable Markdown extras
+ Add default config, so local config can be sparse
+ Fix escaping for post & gallery RSS content
+ Rename `press.lua` -> `luapress.lua`
+ Remove `alt_getopt` and handle args manually
+ Nicer (colored, where possible) terminal output

# v2.1.1

+ Add `config.posts_dir` and `config.pages_dir`

# v2.1.0

Many thanks to GitHub user w-oertl for contributing most of this release.

+ Add crosslink capability [posts|pages/NAME]
+ If no posts and pages, use first post as index, or link.index
+ Plugin support(!) & gallery plugin
+ Move default template into install path and copy on init
+ Add tests

# v2.0.4

+ Add `--build` option to change the directory to build the blog in
+ Fix handling of modification times on posts with manual time defined ($time=)

# v2.0.3

+ Customise the contents of the link `--MORE--` generates

# v2.0.2

+ Fix escaping on `--MORE--`
+ Fix RSS output

# v2.0.1

+ Fix bug with markdown & code blocks

# v2.0.0

+ Lua 5.2 support
+ Rockspec/Luarocks
+ Bin executable
+ `luapress init <url>` functionality
+ Rewritten, broken up into utils

# v1.1.2

+ Add $=url support to posts

# v1.1.1

+ Fix bug in cache: empty archive and/or missing page links
    * fixed by always loading pages/posts, cache still prevents writing them if no change

# v1.1.0

+ Start log


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="HtmlInput.cs" company="">
//
// </copyright>
//
//   The html input.
//
// --------------------------------------------------------------------------------------------------------------------
namespace UX.Testing.Core.Controls
{
	using System;

	/// The html input.
	public class HtmlInput : HtmlControl
	{
		#region Fields

		/// The type.
		private InputType type;

		#endregion

		#region Constructors and Destructors

		/// Initializes a new instance of the <see cref="HtmlInput"/> class.
		/// <param name="type">The type.</param>
		public HtmlInput(InputType type)
		{
			this.type = type;
		}

		#endregion

		#region Enums

		/// The input type.
		public enum InputType
		{
			/// The button.
			Button,

			/// The check box.
			CheckBox,

			/// The color.
			Color,

			/// The date.
			Date,

			/// The date time.
			DateTime,

			/// The date time local.
			DateTimeLocal,

			/// The file.
			File,

			/// The hidden.
			Hidden,

			/// The image.
			Image,

			/// The month.
			Month,

			/// The password.
			Password,

			/// The radio.
			Radio,

			/// The reset.
			Reset,

			/// The submit.
			Submit,

			/// The tel.
			Tel,

			/// The text.
			Text,

			/// The time.
			Time,

			/// The email.
			Email,

			/// The url.
			Url,

			/// The number.
			Number,

			/// The range.
			Range,

			/// The search.
			Search,

			/// The week.
			Week
		}

		#endregion

		#region Public Properties

		/// Gets or sets Accept.
		public string Accept
		{
			get
			{
				return this.GetAttribute("accept");
			}

			set
			{
				this.AddAttribute("accept", value);
			}
		}

		/// Gets or sets Align.
		public string Align
		{
			get
			{
				return this.GetAttribute("align");
			}

			set
			{
				this.AddAttribute("align", value);
			}
		}

		/// Gets or sets Alt.
		public string Alt
		{
			get
			{
				return this.GetAttribute("alt");
			}

			set
			{
				this.AddAttribute("alt", value);
			}
		}

		/// Gets or sets AutoComplete.
		public string AutoComplete
		{
			get
			{
				return this.GetAttribute("autocomplete");
			}

			set
			{
				this.AddAttribute("autocomplete", value);
			}
		}

		/// Gets or sets AutoFocus.
		public string AutoFocus
		{
			get
			{
				return this.GetAttribute("autofocus");
			}

			set
			{
				this.AddAttribute("autofocus", value);
			}
		}

		/// Gets or sets Checked.
		public virtual bool Checked
		{
			get
			{
				var checkedAttr = (this.GetFrameworkAttribute("checked") ?? string.Empty).ToLower();
				return checkedAttr == "checked" || checkedAttr == "true";
			}
		}

		/// Gets or sets Disabled.
		public string Disabled
		{
			get
			{
				return this.Browser.GetAttribute(this, "disabled");
			}
		}

		/// Gets or sets Form.
		public string Form
		{
			get
			{
				return this.GetAttribute("form");
			}

			set
			{
				this.AddAttribute("form", value);
			}
		}

		/// Gets or sets FormAction.
		public string FormAction
		{
			get
			{
				return this.GetAttribute("formaction");
			}

			set
			{
				this.AddAttribute("formaction", value);
			}
		}

		/// Gets or sets FormEncType.
		public string FormEncType
		{
			get
			{
				return this.GetAttribute("formenctype");
			}

			set
			{
				this.AddAttribute("formenctype", value);
			}
		}

		/// Gets or sets FormMethod.
		public string FormMethod
		{
			get
			{
				return this.GetAttribute("formmethod");
			}

			set
			{
				this.AddAttribute("formmethod", value);
			}
		}

		/// Gets or sets FormNoValidate.
		public string FormNoValidate
		{
			get
			{
				return this.GetAttribute("formnovalidate");
			}

			set
			{
				this.AddAttribute("formnovalidate", value);
			}
		}

		/// Gets or sets FormTarget.
		public string FormTarget
		{
			get
			{
				return this.GetAttribute("formtarget");
			}

			set
			{
				this.AddAttribute("formtarget", value);
			}
		}

		/// Gets or sets Height.
		public string Height
		{
			get
			{
				return this.GetAttribute("height");
			}

			set
			{
				this.AddAttribute("height", value);
			}
		}

		/// Gets the tag name.
		public override HtmlTag HtmlTag
		{
			get
			{
				return HtmlTag.input;
			}
		}

		/// Gets or sets List.
		public string List
		{
			get
			{
				return this.GetAttribute("list");
			}

			set
			{
				this.AddAttribute("list", value);
			}
		}

		/// Gets or sets Max.
		public string Max
		{
			get
			{
				return this.GetAttribute("max");
			}

			set
			{
				this.AddAttribute("max", value);
			}
		}

		/// Gets or sets MaxLength.
		public string MaxLength
		{
			get
			{
				return this.GetAttribute("maxlength");
			}

			set
			{
				this.AddAttribute("maxlength", value);
			}
		}

		/// Gets or sets Min.
		public string Min
		{
			get
			{
				return this.GetAttribute("min");
			}

			set
			{
				this.AddAttribute("min", value);
			}
		}

		/// Gets or sets Multiple.
		public string Multiple
		{
			get
			{
				return this.GetAttribute("multiple");
			}

			set
			{
				this.AddAttribute("multiple", value);
			}
		}

		/// Gets or sets Name.
		public new string Name
		{
			get
			{
				return this.GetAttribute("name");
			}

			set
			{
				this.AddAttribute("name", value);
			}
		}

		/// Gets or sets Pattern.
		public string Pattern
		{
			get
			{
				return this.GetAttribute("pattern");
			}

			set
			{
				this.AddAttribute("pattern", value);
			}
		}

		/// Gets or sets PlaceHolder.
		public string PlaceHolder
		{
			get
			{
				return this.GetAttribute("placeholder");
			}

			set
			{
				this.AddAttribute("placeholder", value);
			}
		}

		/// Gets or sets ReadOnly.
		public string ReadOnly
		{
			get
			{
				return this.GetAttribute("readonly");
			}

			set
			{
				this.AddAttribute("readonly", value);
			}
		}

		/// Gets or sets Required.
		public string Required
		{
			get
			{
				return this.GetAttribute("required");
			}

			set
			{
				this.AddAttribute("required", value);
			}
		}

		/// Gets or sets Size.
		public string Size
		{
			get
			{
				return this.GetAttribute("size");
			}

			set
			{
				this.AddAttribute("size", value);
			}
		}

		/// Gets or sets Src.
		public string Src
		{
			get
			{
				return this.GetAttribute("src");
			}

			set
			{
				this.AddAttribute("src", value);
			}
		}

		/// Gets or sets Step.
		public string Step
		{
			get
			{
				return this.GetAttribute("step");
			}

			set
			{
				this.AddAttribute("step", value);
			}
		}

		/// Gets or sets the value.
		public string Value
		{
			get
			{
				return this.Browser.GetAttribute(this, "value");
			}

			set
			{
				this.Browser.SetValue(this, value);
			}
		}

		/// Gets the type.
		public InputType Type
		{
			get
			{
				return this.type;
			}
		}

		/// Gets or sets Width.
		public string Width
		{
			get
			{
				return this.GetAttribute("width");
			}

			set
			{
				this.AddAttribute("width", value);
			}
		}

		#endregion
	}
}


text:
package com.sksamuel.elastic4s.requests.update

import com.sksamuel.elastic4s.requests.common.RefreshPolicy
import com.sksamuel.elastic4s.testkit.DockerTests
import org.scalatest.OptionValues
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

import scala.concurrent.ExecutionContext.Implicits.global
import scala.util.Try

class UpdateByQueryTest
  extends AnyFlatSpec
    with Matchers
    with DockerTests
    with OptionValues {

  Try {
    client.execute {
      deleteIndex("pop")
    }.await
  }

  Try {
    client.execute {
      createIndex("pop")
    }.await
  }

  client.execute {
    bulk(
      indexInto("pop").fields("name" -> "sprite", "type" -> "lemonade", "foo" -> "f"),
      indexInto("pop").fields("name" -> "fanta", "type" -> "orangeade", "foo" -> "f"),
      indexInto("pop").fields("name" -> "pepsi", "type" -> "cola", "foo" -> "f")
    ).refreshImmediately
  }.await

  "an update by query request" should "support script based update" in {

    client.execute {
      updateByQuery("pop", matchAllQuery()).script(script("ctx._source.foo = 'a'").lang("painless")).refreshImmediately
    }.await.result.updated shouldBe 3

    client.execute {
      count("pop").query(termQuery("foo", "a"))
    }.await.result.count shouldBe 3
  }

  it should "return errors if the update fails" in {
    client.execute {
      updateByQuery("pop", prefixQuery("name", "spr")).script("wibble")
    }.await.error.`type` shouldBe "script_exception"
  }

  it should "support RefreshPolicy.IMMEDIATE" in {
    client.execute {
      updateByQuery("pop", matchAllQuery()).script(script("ctx._source.foo = 'b'").lang("painless")).refresh(RefreshPolicy.IMMEDIATE)
    }.await.result.updated shouldBe 3

    client.execute {
      count("pop").query(termQuery("foo", "b"))
    }.await.result.count shouldBe 3
  }

  it should "support RefreshPolicy.NONE" in {
    client.execute {
      updateByQuery("pop", matchAllQuery()).script(script("ctx._source.foo = 'c'").lang("painless")).refresh(RefreshPolicy.NONE)
    }.await.result.updated shouldBe 3

    client.execute {
      count("pop").query(termQuery("foo", "c"))
    }.await.result.count shouldBe 0
  }
}


text:
namespace net {

ScopedResState::ScopedResState() {
#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA)
  // Note: res_ninit in glibc always returns 0 and sets RES_INIT.
  // res_init behaves the same way.
  memset(&_res, 0, sizeof(_res));
  res_init_result_ = res_init();
#else
  memset(&res_, 0, sizeof(res_));
  res_init_result_ = res_ninit(&res_);
#endif  // BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA)
}

ScopedResState::~ScopedResState() {
#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)

  // Prefer res_ndestroy where available.
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
  res_ndestroy(&res_);
#else
  res_nclose(&res_);
#endif  // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)

#endif  // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
}

bool ScopedResState::IsValid() const {
  return res_init_result_ == 0;
}

const struct __res_state& ScopedResState::state() const {
  DCHECK(IsValid());
#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA)
  return _res;
#else
  return res_;
#endif  // BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA)
}

}  // namespace net


text:
package org.xchain.namespaces.hibernate.test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import org.apache.commons.jxpath.JXPathContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.xchain.Catalog;
import org.xchain.framework.hibernate.EntityOperation;
import org.xchain.framework.hibernate.EntityPermission;
import org.xchain.framework.hibernate.HibernateLifecycle;
import org.xchain.framework.hibernate.HqlEntityPermission;
import org.xchain.framework.hibernate.QualifiedEntityPermission;
import org.xchain.framework.lifecycle.Lifecycle;
import org.xchain.framework.lifecycle.ThreadContext;
import org.xchain.framework.lifecycle.ThreadLifecycle;
import org.xchain.framework.security.IdentityManager;
import org.xchain.framework.security.Permission;
import org.xchain.framework.security.SecurityManager;
import org.xchain.framework.security.UsernamePrincipal;
import org.xchain.namespaces.hibernate.test.om.UserNote;

/**
 * @author Jason Rose
 * @author Josh Kennedy
 */
public class TestHqlEntityPermission extends BaseDatabaseTest {

  public static final Logger log = LoggerFactory.getLogger(TestHqlEntityPermission.class);

  protected JXPathContext context = null;
  protected ThreadContext threadContext = null;
  protected Catalog catalog = null;

  @BeforeClass public static void setupCommand()
  throws Exception
  {
    Lifecycle.startLifecycle();
    populateUserData();
    populateUserNoteData();
  }

  @AfterClass public static void teardownCommand()
  throws Exception
  {
    Lifecycle.stopLifecycle();
  }

  @Before public void setupTest()
  throws Exception
  {
    // create the context.
    context = JXPathContext.newContext(new Object());
    threadContext = new TestQualifiedEntityPermission.TestThreadContext();
    ThreadLifecycle.getInstance().startThread(threadContext);
  }

  @After public void teardownTest() throws Exception {
    context = null;
    catalog = null;
    ThreadLifecycle.getInstance().stopThread(threadContext);
    threadContext = null;
  }

  @Test
  public void testGetEntityClass() throws Exception {
    QualifiedEntityPermission p = new HqlEntityPermission(EntityOperation.ALL, UserNote.class, null);
    assertEquals(UserNote.class, p.getEntityClass());
  }

  @Test
  public void testGetHql() throws Exception {
    final String hql = String.format("select count(id) from %s group by id", UserNote.class.getName());
    HqlEntityPermission p = new HqlEntityPermission(EntityOperation.ALL, UserNote.class, hql);
    assertEquals(hql, p.getHql());
  }

  @Test
  public void testIdParameter() throws Exception {
    HibernateLifecycle.getCurrentSession().beginTransaction();
    final String hql = String.format("select count(id) from %s where id = :id group by id", UserNote.class.getName());
    Permission p = new HqlEntityPermission(EntityOperation.ALL, UserNote.class, hql);
    UserNote instance = (UserNote) userList.get(0).getUserNoteSet().toArray()[0];
    IdentityManager.instance().loggedIn(new UsernamePrincipal(userList.get(0).getUsername()));
    Permission entityPermission = new EntityPermission<UserNote>(EntityOperation.LOAD, instance.getId(), instance);
    try {
      SecurityManager.instance().checkPermission(entityPermission);
      fail();
    } catch (SecurityException e) {
    }
    try {
      IdentityManager.instance().getIdentity().getPermissions().add(p);
      SecurityManager.instance().checkPermission(entityPermission);
    } catch (Exception e) {
      fail(e.getMessage());
    }
    HibernateLifecycle.getCurrentSession().getTransaction().rollback();
  }

  @Test
  public void testPrincipalParameter() throws Exception {
    HibernateLifecycle.getCurrentSession().beginTransaction();
    final String hql = String.format("select count(user.username) from %s entity join entity.user user where user.username = :principal group by user.username", UserNote.class.getName());
    Permission p = new HqlEntityPermission(EntityOperation.ALL, UserNote.class, hql);
    UserNote instance = (UserNote) userList.get(0).getUserNoteSet().toArray()[0];
    IdentityManager.instance().loggedIn(new UsernamePrincipal(userList.get(0).getUsername()));
    Permission entityPermission = new EntityPermission<UserNote>(EntityOperation.LOAD, instance.getId(), instance);
    try {
      SecurityManager.instance().checkPermission(entityPermission);
      fail();
    } catch (SecurityException e) {
    }
    try {
      IdentityManager.instance().getIdentity().getPermissions().add(p);
      SecurityManager.instance().checkPermission(entityPermission);
    } catch (Exception e) {
      fail(e.getMessage());
    }
    HibernateLifecycle.getCurrentSession().getTransaction().rollback();
  }

  @Test
  public void testUnknownParameter() throws Exception {
    HibernateLifecycle.getCurrentSession().beginTransaction();
    final String hql = String.format("select count(user.username) from %s entity join entity.user user where user.username = :foo group by user.username", UserNote.class.getName());
    Permission p = new HqlEntityPermission(EntityOperation.ALL, UserNote.class, hql);
    UserNote instance = (UserNote) userList.get(0).getUserNoteSet().toArray()[0];
    IdentityManager.instance().loggedIn(new UsernamePrincipal(userList.get(0).getUsername()));
    Permission entityPermission = new EntityPermission<UserNote>(EntityOperation.LOAD, instance.getId(), instance);
    try {
      SecurityManager.instance().checkPermission(entityPermission);
      fail();
    } catch (SecurityException e) {
    }
    try {
      IdentityManager.instance().getIdentity().getPermissions().add(p);
      SecurityManager.instance().checkPermission(entityPermission);
      fail();
    } catch (SecurityException e) {
    }
    HibernateLifecycle.getCurrentSession().getTransaction().rollback();
  }
}


text:
import React, { Component } from 'react'
// import ReactDOM from 'react-dom'
// import NameNav from './NameNav'
// import Bio from './Bio'
// import Projects from './Projects'
// import Contact from './Contact'
import BlankSite from './BlankSite'

import '../assets/website/website.css'

//polyfill for scrollIntoView for safari and some mobile browsers
// require('smoothscroll-polyfill').polyfill()

class Website extends Component {

  componentDidMount() {
    document.body.className = "bg-website"
    document.title = "andydierker.com"
  }

  // scrollTo = (component) => {
  //   let node = ReactDOM.findDOMNode(this.namenav)
  //   if (component === "bio") { node = ReactDOM.findDOMNode(this.bio) }
  //   if (component === "projects") { node = ReactDOM.findDOMNode(this.projects) }
  //   if (component === "contact") { node = ReactDOM.findDOMNode(this.contact) }
  //   node.scrollIntoView({ behavior: "smooth" })
  // }

  render() {
    return (
      <main id="namenav" className="ad-white">
        <BlankSite ref={(element) => {this.namenav = element}}/>
				{/* <NameNav ref={(element) => {this.namenav = element}} scrollTo={this.scrollTo}/>
				<Bio ref={(element) => {this.bio = element}}/>
				<Projects ref={(element) => {this.projects = element}}/>
				<Contact ref={(element) => {this.contact = element}}/> */}
      </main>
    )
  }
}

export default Website


text:
FROM ubuntu:19.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update -yqq > /dev/null && \
    apt-get install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql php7.3-xml php7.3-mbstring php7.0-mcrypt php7.3-intl > /dev/null

RUN apt-get install -yqq composer > /dev/null

COPY deploy/conf/* /etc/php/7.3/fpm/
COPY deploy/conf/* /etc/php/7.3/cli/
RUN sed -i "s|listen = /run/php/php7.3-fpm.sock|listen = /run/php/php7.3-fpm.sock|g" /etc/php/7.3/fpm/php-fpm.conf

ADD ./ /cakephp
WORKDIR /cakephp

RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;

RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet --ignore-platform-reqs

RUN chmod -R 777 /cakephp

CMD service php7.3-fpm start && \
    nginx -c /cakephp/deploy/nginx.conf -g "daemon off;"


text:
<?php
namespace bunq\test;

use bunq\Context\ApiContext;
use bunq\Context\BunqContext;
use bunq\Exception\BunqException;
use bunq\Http\ApiClient;
use bunq\Model\Generated\Endpoint\AttachmentPublic;
use bunq\Model\Generated\Endpoint\Avatar;
use bunq\Model\Generated\Endpoint\CashRegister;
use bunq\Model\Generated\Endpoint\MonetaryAccountBank;
use bunq\Model\Generated\Endpoint\RequestInquiry;
use bunq\Model\Generated\Object\Amount;
use bunq\Model\Generated\Object\Pointer;
use bunq\Util\BunqEnumApiEnvironmentType;
use bunq\Util\FileUtil;
use bunq\Util\InstallationUtil;
use PHPUnit\Framework\TestCase;

/**
 * The base for all the Bunq SDK tests.
 */
class BunqSdkTestBase extends TestCase
{
    /**
     * Error constants.
     */
    const ERROR_COULD_NOT_DETERMINE_IBAN_POINTER = 'Could not determine IBAN pointer';
    const ERROR_COULD_NOT_DETERMINE_USER_ALIAS = 'Could not determine user alias.';
    const WARMING_TEST_SKIPPED_DUE_TO_INSUFFICIENT_BALANCE = 'Not enough money on primary account.';

    /*
     * CashRegister constants.
     */
    const CASH_REGISTER_NAME = 'PHP test cash register';
    const CASH_REGISTER_STATUS = 'PENDING_APPROVAL';

    /**
     * MonetaryAccount constants.
     */
    const MONETARY_ACCOUNT_CURRENCY = 'EUR';
    const MONETARY_ACCOUNT_DESCRIPTION = 'test account php';
    const MONETARY_ACCOUNT_BALANCE_THRESHOLD = 0.00;

    /**
     * Pointer constants.
     */
    const POINTER_TYPE_IBAN = 'IBAN';
    const POINTER_TYPE_EMAIL = 'EMAIL';
    const EMAIL_BRAVO = 'bravo@bunq.com';

    /**
     * Full name of context config file to use for testing.
     */
    const FILE_PATH_CONTEXT_CONFIG = __DIR__ . '/../bunq-test.conf';
    const FILE_PATH_AVATAR = '/resource/vader.png';

    /**
     * Attachment constants.
     */
    const ATTACHMENT_CONTENT_TYPE = 'image/png';
    const ATTACHMENT_DESCRIPTION = 'TEST PNG PHP';
    const ATTACHMENT_PATH_IN = '/vader.png';

    /**
     * Default constants.
     */
    const PAYMENT_AMOUNT_DEFAULT = '0.01';

    /**
     * The index of the first item in an array.
     */
    const INDEX_FIRST = 0;

    /**
     * @var MonetaryAccountBank
     */
    protected $secondMonetaryAccountBank;

    /**
     * @var CashRegister
     */
    protected $cashRegister;

    /**
     * Spending money constants.
     */
    const SPENDING_MONEY_AMOUNT = '500';
    const SPENDING_MONEY_RECIPIENT = 'sugardaddy@bunq.com';
    const SPENDING_MONEY_DESCRIPTION = 'sdk php test, thanks daddy <3';

    /**
     */
    public static function setUpBeforeClass(): void
    {
        static::createApiContext();
        BunqContext::loadApiContext(
            ApiContext::restore(self::FILE_PATH_CONTEXT_CONFIG)
        );
    }

    /**
     */
    protected static function createApiContext()
    {
        InstallationUtil::automaticInstall(
            BunqEnumApiEnvironmentType::SANDBOX(),
            self::FILE_PATH_CONTEXT_CONFIG
        );
    }

    /**
     */
    protected function setUp(): void
    {
        $this->setSecondMonetaryAccountBank();
        $this->requestSpendingMoney();
        sleep(0.5); // ensure requests are auto accepted.
        BunqContext::getUserContext()->refreshUserContext();
    }

    /**
     */
    private function setCashRegister()
    {
        $attachmentUuid = AttachmentPublic::create(
            FileUtil::getFileContents(__DIR__ . self::FILE_PATH_AVATAR),
            [
                ApiClient::HEADER_CONTENT_TYPE => $this->getAttachmentContentType(),
                ApiClient::HEADER_ATTACHMENT_DESCRIPTION => $this->getAttachmentDescription(),
            ]
        );
        $avatarUuid = Avatar::create($attachmentUuid->getValue());
        $cashRegisterId = CashRegister::create(
            self::CASH_REGISTER_NAME,
            self::CASH_REGISTER_STATUS,
            $avatarUuid->getValue()
        );

        $this->cashRegister = CashRegister::get($cashRegisterId->getValue());
    }

    /**
     * @return string
     */
    protected function getAttachmentContentType(): string
    {
        return self::ATTACHMENT_CONTENT_TYPE;
    }

    /**
     * @return string
     */
    protected function getAttachmentDescription(): string
    {
        return self::ATTACHMENT_DESCRIPTION;
    }

    /**
     */
    private function setSecondMonetaryAccountBank()
    {
        $createdId = MonetaryAccountBank::create(
            self::MONETARY_ACCOUNT_CURRENCY,
            self::MONETARY_ACCOUNT_DESCRIPTION
        );

        $this->secondMonetaryAccountBank = MonetaryAccountBank::get($createdId->getValue())->getValue();
    }

    /**
     */
    private function requestSpendingMoney()
    {
        RequestInquiry::create(
            new Amount(self::SPENDING_MONEY_AMOUNT, self::MONETARY_ACCOUNT_CURRENCY),
            new Pointer(self::POINTER_TYPE_EMAIL, self::SPENDING_MONEY_RECIPIENT),
            self::SPENDING_MONEY_DESCRIPTION,
            false
        );

        RequestInquiry::create(
            new Amount(self::SPENDING_MONEY_AMOUNT, self::MONETARY_ACCOUNT_CURRENCY),
            new Pointer(self::POINTER_TYPE_EMAIL, self::SPENDING_MONEY_RECIPIENT),
            self::SPENDING_MONEY_DESCRIPTION,
            false,
            $this->getSecondMonetaryAccountId()
        );
    }

    /**
     * @return Pointer
     *
     * @throws BunqException
     */
    protected function getSecondMonetaryAccountAlias(): Pointer
    {
        $allAlias = $this->secondMonetaryAccountBank->getAlias();

        foreach ($allAlias as $alias) {
            if ($alias->getType() === self::POINTER_TYPE_IBAN) {
                return $alias;
            }
        }

        throw new BunqException(self::ERROR_COULD_NOT_DETERMINE_IBAN_POINTER);
    }

    /**
     * @return string
     */
    protected function getAttachmentFilePath(): string
    {
        return self::ATTACHMENT_PATH_IN;
    }

    /**
     * @return Pointer
     *
     * @throws BunqException
     */
    protected function getUserAlias(): Pointer
    {
        if (BunqContext::getUserContext()->isOnlyUserPersonSet()) {
            return BunqContext::getUserContext()->getUserPerson()->getAlias()[self::INDEX_FIRST];
        } elseif (BunqContext::getUserContext()->isOnlyUserCompanySet()) {
            return BunqContext::getUserContext()->getUserCompany()->getAlias()[self::INDEX_FIRST];
        } elseif (BunqContext::getUserContext()->isOnlyUserApiKeySet()) {
            return BunqContext::getUserContext()
                ->getUserApiKey()
                ->getRequestedByUser()
                ->getReferencedObject()
                ->getAlias()[self::INDEX_FIRST];
        } else {
            throw new BunqException(self::ERROR_COULD_NOT_DETERMINE_USER_ALIAS);
        }
    }

    /**
     * @return Pointer
     */
    protected function getPointerUserBravo(): Pointer
    {
        return new Pointer(
            self::POINTER_TYPE_EMAIL,
            self::EMAIL_BRAVO
        );
    }

    /**
     * @return int
     */
    protected function getSecondMonetaryAccountId(): int
    {
        return $this->secondMonetaryAccountBank->getId();
    }

    /**
     * @return int
     */
    protected function getCashRegisterId(): int
    {
        if (is_null($this->cashRegister)) {
            $this->setCashRegister();
        }

        return $this->cashRegister->getId();
    }

    /**
     * @return bool
     */
    protected function isMonetaryAccountBalanceSufficient(): bool
    {
        $balance = floatval(BunqContext::getUserContext()->getPrimaryMonetaryAccount()->getBalance()->getValue());

        return $balance > self::MONETARY_ACCOUNT_BALANCE_THRESHOLD;
    }

    /**
     * @return bool
     */
    protected function skipTestIfNeededDueToInsufficientBalance(): bool
    {
        if (!$this->isMonetaryAccountBalanceSufficient()) {
            static::markTestSkipped(self::WARMING_TEST_SKIPPED_DUE_TO_INSUFFICIENT_BALANCE);
        }

        return true;
    }
}


text:
require "rails_helper"

RSpec.describe "Speakerboxxx /health", type: :request do
  it "200s on /health" do
    get "/health"
    data = JSON.parse(body)
    expect(status).to eql(200)
    expect(data["name"]).to eql("speakerboxxx")
  end
end


text:
import React from "react"
import { css } from "emotion"
import { Button } from "@material-ui/core"
import { actions } from "./utils"
import { useHistory, useLocation } from "react-router-dom"
import img from "assets/celebration.jpg"

type Props = {
  component: (props: any) => JSX.Element
  path?: "login" | "signup"
}

export const Auth = (props: Props) => {
  const { component, path } = props
  const history = useHistory()
  const { pathname } = useLocation()
  const [activeAction, setActiveAction] = React.useState<"login" | "signup">(
    "login"
  )
  const Cmp = component

  const actionToToggle = activeAction === "login" ? "signup" : "login"

  const handleChange = () => {
    setActiveAction(actionToToggle)
    history.push(`/${actions[actionToToggle].value}`)
  }

  const hasFooter = pathname !== "/reset"

  return (

          <Cmp path={path} />

        {hasFooter ? (

            {actions[actionToToggle].message}
            <Button className="btn" onClick={handleChange}>
              {actions[actionToToggle].actionMessage}
            </Button>

        ) : null}

  )
}

const styles = {
  shell: css`
    display: flex;
    overflow: hidden;
    background: url(${img});
    height: 100vh;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  `,
  content: css`
    margin: auto;
    background-color: var(--white);
    border-top: 3px solid var(--primary-main);
  `,
  inputsContainer: css`
    width: 256px;
    margin: auto;
    padding: 64px;
    height: 100%;
    min-height: 325px;
  `,
  action: css`
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
    border-top: 1px solid var(--light-grey);
    color: var(--light-grey-2);
    .btn {
      color: var(--primary-main);
      padding: 2px 0 0 4px;
      text-transform: capitalize;
      min-width: fit-content;
      :hover {
        background-color: transparent;
        color: var(--primary-dark);
      }
    }
  `,
}


text:
source node/common.sh

# Function to send post call to go endpoint joinNode
function updateNmcAddress(){

    url=http://${MASTER_IP}:${MAIN_NODEMANAGER_PORT}/qm/peer

    response=$(curl -s -X POST \
    --max-time 310 ${url} \
    -H "content-type: application/json" \
    -d '{
       "enode-id":"'${enode}'",
       "ip-address":"'${CURRENT_IP}'"
    }')
    response=$(echo $response | tr -d \")
    echo $response > input.txt
    RAFTV=$(awk -F':' '{ print $1 }' input.txt)

    contractAdd=$(awk -F':' '{ print $2 }' input.txt)
    updateProperty setup.conf CONTRACT_ADD $contractAdd

    PATTERN="s/#raftId#/$RAFTV/g"
    sed -i $PATTERN node/start_${NODENAME}.sh

    echo 'RAFT_ID='$RAFTV >> setup.conf
    rm -f input.txt

}

# Function to send post call to java endpoint getGenesis
function requestGenesis(){
    pending="Pending user response"
    rejected="Access denied"
    timeout="Response Timed Out"
    urlG=http://${MASTER_IP}:${MAIN_NODEMANAGER_PORT}/qm/genesis

    echo -e $RED'\nJoin Request sent to '$MASTER_IP'. Waiting for approval...'$COLOR_END

    response=$(curl -s -X POST \
    --max-time 310 ${urlG} \
    -H "content-type: application/json" \
    -d '{
       "enode-id":"'${enode}'",
       "ip-address":"'${CURRENT_IP}'",
       "nodename":"'${NODENAME}'"
    }')

    if [ "$response" = "$pending" ]
    then
        echo "Previous request for Joining Network is still pending. Please try later. Program exiting"
        exit
    elif [ "$response" = "$rejected" ]
    then
        echo "Request to Join Network was rejected. Program exiting"
        exit
    elif [ "$response" = "$timeout" ]
    then
        echo "Waited too long for approval from Master node. Please try later. Program exiting"
        exit
    elif [ "$response" = "" ]
    then
        echo "Unknown Error. Please check log. Program exiting"
        exit
    else
        echo $response > input1.json
	declare -A replyMap
	while IFS="=" read -r key value
	do
    	replyMap[$key]="$value"
	done < <(jq -r "to_entries|map(\"\(.key)=\(.value|tostring)\")|.[]" input1.json)

    MASTER_CONSTELLATION_PORT=${replyMap[contstellation-port]}

	echo 'MASTER_CONSTELLATION_PORT='$MASTER_CONSTELLATION_PORT >>  setup.conf
	echo 'NETWORK_ID='${replyMap[netID]} >>  setup.conf
	echo ${replyMap[genesis]}  > node/genesis.json
        rm -f input1.json
    fi
}

function generateConstellationConf() {
    PATTERN1="s/#CURRENT_IP#/${CURRENT_IP}/g"
    PATTERN2="s/#C_PORT#/$CONSTELLATION_PORT/g"
    PATTERN3="s/#mNode#/$NODENAME/g"
    PATTERN4="s/#MASTER_IP#/$MASTER_IP/g"
    PATTERN5="s/#MASTER_CONSTELLATION_PORT#/$MASTER_CONSTELLATION_PORT/g"

    sed -i "$PATTERN1" node/$NODENAME.conf
    sed -i "$PATTERN2" node/$NODENAME.conf
    sed -i "$PATTERN3" node/$NODENAME.conf
    sed -i "$PATTERN4" node/$NODENAME.conf
    sed -i "$PATTERN5" node/$NODENAME.conf
}

# execute init script
function executeInit(){
    PATTERN="s/#networkId#/${netvalue}/g"
    sed -i $PATTERN node/start_${NODENAME}.sh

    ./init.sh
}

function migrateToTessera() {

    pushd node
    . ./migrate_to_tessera.sh >> /dev/null 2>&1
    popd
}

function main(){

    source setup.conf

    if [ -z $NETWORK_ID ]; then
        enode=$(cat node/enode.txt)
        requestGenesis
        executeInit
        updateNmcAddress
        generateConstellationConf

        if [ ! -z $TESSERA ]; then
            migrateToTessera
        fi

        publickey=$(cat node/keys/$NODENAME.pub)
        echo 'PUBKEY='$publickey >> setup.conf
        role="Unassigned"
        echo 'ROLE='$role >> setup.conf

        uiUrl="http://localhost:"$THIS_NODEMANAGER_PORT"/qm"

        echo -e '****************************************************************************************************************'

        echo -e '\e[1;32mSuccessfully created and started \e[0m'$NODENAME
        echo -e '\e[1;32mYou can send transactions to \e[0m'$CURRENT_IP:$RPC_PORT
        echo -e '\e[1;32mFor private transactions, use \e[0m'$publickey
        echo -e '\e[1;32mFor accessing Quorum Maker UI, please open the following from a web browser \e[0m'$uiUrl
        echo -e '\e[1;32mTo join this node from a different host, please run Quorum Maker and choose option to run Join Network\e[0m'
        echo -e '\e[1;32mWhen asked, enter \e[0m'$CURRENT_IP '\e[1;32mfor Existing Node IP and \e[0m'$THIS_NODEMANAGER_PORT '\e[1;32mfor Node Manager port\e[0m'

        echo -e '****************************************************************************************************************'

    fi

}
main


text:
<!DOCTYPE html>

  <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Access H2O Confusion Matrices — h2o.confusionMatrix • h2o</title>

<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cosmo/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">

<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">

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

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

      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">

      </button>
      H2O.ai

  The H2O-R Package

  Getting Started

  R Reference Guide

Access H2O Confusion Matrices

Retrieve either a single or many confusion matrices from H2O objects.

h2o.confusionMatrix(object, ...)

# S4 method for H2OModel
h2o.confusionMatrix(object, newdata, valid = FALSE, ...)

# S4 method for H2OModelMetrics
h2o.confusionMatrix(object, thresholds = NULL,
  metrics = NULL)

 Arguments

    <colgroup><col class="name" /><col class="desc" /></colgroup>

      object

Either an H2OModel object or an
H2OModelMetrics object.

      ...

Extra arguments for extracting train or valid confusion matrices.

      newdata

An H2OFrame object that can be scored on.
Requires a valid response column.

      valid

Retrieve the validation metric.

      thresholds

(Optional) A value or a list of valid values between 0.0 and 1.0.
This value is only used in the case of
H2OBinomialMetrics objects.

      metrics

(Optional) A metric or a list of valid metrics ("min_per_class_accuracy", "absolute_mcc", "tnr", "fnr", "fpr", "tpr", "precision", "accuracy", "f0point5", "f2", "f1").
This value is only used in the case of
H2OBinomialMetrics objects.

Value

Calling this function on H2OModel objects returns a
        confusion matrix corresponding to the predict function.
        If used on an H2OBinomialMetrics object, returns a list
        of matrices corresponding to the number of thresholds specified.

Details

The H2OModelMetrics version of this function will only take
H2OBinomialMetrics or H2OMultinomialMetrics
objects. If no threshold is specified, all possible thresholds are selected.

See also

predict for generating prediction frames,
         h2o.performance for creating
         H2OModelMetrics.

Examples

# NOT RUN {
library(h2o)
h2o.init()
prosPath <- system.file("extdata", "prostate.csv", package="h2o")
hex <- h2o.uploadFile(prosPath)
hex[,2] <- as.factor(hex[,2])
model <- h2o.gbm(x = 3:9, y = 2, training_frame = hex, distribution = "bernoulli")
h2o.confusionMatrix(model, hex)
# Generating a ModelMetrics object
perf <- h2o.performance(model, hex)
h2o.confusionMatrix(perf)
# }

Contents

Arguments

Value

Details

See also

Examples

Developed by The H2O.ai team.

Site built with pkgdown.


text:
package com.spapageo.ethmmyrss.cli;

import com.spapageo.ethmmyrss.ThmmyRssApplication;
import com.spapageo.ethmmyrss.ThmmyRssConfiguration;
import io.dropwizard.cli.EnvironmentCommand;
import io.dropwizard.setup.Environment;
import net.sourceforge.argparse4j.inf.Namespace;

public class RecreateTableCommand extends EnvironmentCommand<ThmmyRssConfiguration> {
    private ThmmyRssApplication application;

    public RecreateTableCommand(ThmmyRssApplication application,
                                String name, String description) {
        super(application, name, description);
        this.application = application;
    }

    @Override
    protected void run(Environment env, Namespace namespace,
                       ThmmyRssConfiguration config) throws Exception {
        application.getAnnouncementDAO().dropAnnouncementsTable();
        application.getAnnouncementDAO().createAnnouncementsTable();
    }
}


text:
/*
 * HTML5 ✰ Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 *
 * Detailed information about this CSS: h5bp.com/css
 *
 * ==|== normalize ==========================================================
 */

/* =============================================================================
   HTML5 display definitions
   ========================================================================== */

article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
audio:not([controls]) { display: none; }
[hidden] { display: none; }

/* =============================================================================
   Base
   ========================================================================== */

/*
 * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
 * 2. Force vertical scrollbar in non-IE
 * 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
 */

html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }

body { margin: 0; font-size: 13px; line-height: 1.231; }

body, button, input, select, textarea { font-family: sans-serif; color: #222; }

/*
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection declarations have to be separate
 * Also: hot pink! (or customize the background color to match your design)
 */

::-moz-selection { background: #8491F4; color: #fff; text-shadow: none; }
::selection { background: #8491F4; color: #fff; text-shadow: none; }

/* =============================================================================
   Links
   ========================================================================== */

a { color: #00e; }
a:visited { color: #551a8b; }
a:hover { color: #06e; }
a:focus { outline: thin dotted; }

/* Improve readability when focused and hovered in all browsers: h5bp.com/h */
a:hover, a:active { outline: 0; }

/* =============================================================================
   Typography
   ========================================================================== */

abbr[title] { border-bottom: 1px dotted; }

b, strong { font-weight: bold; }

blockquote { margin: 1em 40px; }

dfn { font-style: italic; }

hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }

ins { background: #ff9; color: #000; text-decoration: none; }

mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }

/* Redeclare monospace font family: h5bp.com/j */
pre, code, kbd, samp { font-family: monospace, monospace; _font-family: 'courier new', monospace; font-size: 1em; }

/* Improve readability of pre-formatted text in all browsers */
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }

q { quotes: none; }
q:before, q:after { content: ""; content: none; }

small { font-size: 85%; }

/* Position subscript and superscript content without affecting line-height: h5bp.com/k */
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }

/* =============================================================================
   Lists
   ========================================================================== */

ul, ol { margin: 1em 0; padding: 0 0 0 25px; }
dd { margin: 0 0 0 25px; }
nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }

/* =============================================================================
   Embedded content
   ========================================================================== */

/*
 * 1. Improve image quality when scaled in IE7: h5bp.com/d
 * 2. Remove the gap between images and borders on image containers: h5bp.com/e
 */

img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }

/*
 * Correct overflow not hidden in IE9
 */

svg:not(:root) { overflow: hidden; }

/* =============================================================================
   Figures
   ========================================================================== */

figure { margin: 0; }

/* =============================================================================
   Forms
   ========================================================================== */

form { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; }

/* Indicate that 'label' will shift focus to the associated form element */
label { cursor: pointer; }

/*
 * 1. Correct color not inheriting in IE6/7/8/9
 * 2. Correct alignment displayed oddly in IE6/7
 */

legend { border: 0; *margin-left: -7px; padding: 0; }

/*
 * 1. Correct font-size not inheriting in all browsers
 * 2. Remove margins in FF3/4 S5 Chrome
 * 3. Define consistent vertical alignment display in all browsers
 */

button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }

/*
 * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
 * 2. Correct inner spacing displayed oddly in IE6/7
 */

button, input { line-height: normal; *overflow: visible; }

/*
 * Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7
 */

table button, table input { *overflow: auto; }

/*
 * 1. Display hand cursor for clickable form elements
 * 2. Allow styling of clickable form elements in iOS
 */

button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; }

/*
 * Consistent box sizing and appearance
 */

input[type="checkbox"], input[type="radio"] { box-sizing: border-box; }
input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

/*
 * Remove inner padding and border in FF3/4: h5bp.com/l
 */

button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }

/*
 * 1. Remove default vertical scrollbar in IE6/7/8/9
 * 2. Allow only vertical resizing
 */

textarea { overflow: auto; vertical-align: top; resize: vertical; }

/* Colors for form validity */
input:valid, textarea:valid,input.valid,textarea.valid {  }
input:invalid, textarea:invalid,input.error,textarea.error { background-color: #f0dddd; }

form .form-row{
  margin-bottom: 1em;
}
form .form-label{
  font-weight:bold;
}
form label.required{}
form label.required:before{
  content: "* ";
  color: #BF1515;

}
form .form-element{}
form .form-description{
  font-style: italic;
  font-size:90%;
}
form .errors{
  margin:0;
  padding:0;
}
form .errors li{
  color: #BF1515;
  margin-left: 20px;
  list-style-type: disc;
}
form .form-element-password input{

}
form .password-meter{
  margin-left: 5px;
  display:inline-block;
}

/* =============================================================================
   Tables
   ========================================================================== */

table { border-collapse: collapse; border-spacing: 0; }
td { vertical-align: top; }
td,th{ padding:3px; }

/* ==|== primary styles =====================================================
   Author: spekkionu
   ========================================================================== */

.form-tooltip{
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image:url(../images/icons/help.png);
  background-repeat: no-repeat;
  cursor: help;
}
.full-width{ width: 100%;}
.align-left{ text-align: left;}
.align-center{ text-align: center;}
.align-right{ text-align: right;}
.nowrap{ white-space:nowrap; }

/* =============================================================================
   Icons
   ========================================================================== */

.icon{
  display:inline-block !important;
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  margin:0 1px;
}
.link-icon{
  display:inline-block;
  padding-left:22px !important;
  background-repeat: no-repeat;
  background-position:3px center;
  line-height:16px;
  height:16px;
}
.icon-accept{
  background-image:url(../images/icons/accept.png) !important;
}
.icon-add{
  background-image:url(../images/icons/add.png) !important;
}
.icon-edit{
  background-image:url(../images/icons/pencil.png) !important;
}
.icon-delete{
  background-image:url(../images/icons/delete.png) !important;
}
.icon-alert{
  background-image:url(../images/icons/error.png) !important;
}
.icon-error{
  background-image:url(../images/icons/exclamation.png) !important;
}
.icon-help{
  background-image:url(../images/icons/help.png) !important;
}
.icon-info{
  background-image:url(../images/icons/information.png) !important;
}
.icon-home{
  background-image:url(../images/icons/house.png) !important;
}
.icon-key{
  background-image:url(../images/icons/key.png) !important;
}
.icon-login{
  background-image:url(../images/icons/connect.png) !important;
}
.icon-logout{
  background-image:url(../images/icons/disconnect.png) !important;
}
.icon-check{
  background-image:url(../images/icons/tick.png) !important;
}
.icon-cross{
  background-image:url(../images/icons/cross.png) !important;
}
.icon-user{
  background-image:url(../images/icons/user.png) !important;
}
.icon-save{
  background-image:url(../images/icons/disk.png) !important;
}

/* ==|== non-semantic helper classes ========================================
   Please define your styles before this section.
   ========================================================================== */

/* For image replacement */
.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; }
.ir br { display: none; }

/* Hide from both screenreaders and browsers: h5bp.com/u */
.hidden { display: none !important; visibility: hidden; }

/* Hide only visually, but have it available for screenreaders: h5bp.com/v */
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }

/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }

/* Hide visually and from screenreaders, but maintain layout */
.invisible { visibility: hidden; }

/* Contain floats: h5bp.com/q */
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { zoom: 1; }

/* ==|== media queries ======================================================
   PLACEHOLDER Media Queries for Responsive Design.
   These override the primary ('mobile first') styles
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 480px) {
  /* Style adjustments for viewports 480px and over go here */

}

@media only screen and (min-width: 768px) {
  /* Style adjustments for viewports 768px and over go here */

}

/* ==|== print styles =======================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
  * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
  a, a:visited { text-decoration: underline; }
  a[href]:after { content: " (" attr(href) ")"; }
  abbr[title]:after { content: " (" attr(title) ")"; }
  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }  /* Don't show links for images, or javascript/internal links */
  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
  thead { display: table-header-group; } /* h5bp.com/t */
  tr, img { page-break-inside: avoid; }
  img { max-width: 100% !important; }
  @page { margin: 0.5cm; }
  p, h2, h3 { orphans: 3; widows: 3; }
  h2, h3 { page-break-after: avoid; }
}


text:
#import "MXKTableViewCellWithPicker.h"

@implementation MXKTableViewCellWithPicker

@end


text:
#include "argument.h"
#include "util.h"

using namespace std;

namespace coda
{
    argument operator"" _arg(const char *cstr, size_t len)
    {
        return argument(string(cstr, len));
    }

    argument::argument() noexcept
    {
    }

    argument::argument(const string &str) noexcept : str_(str)
    {
    }

    argument::~argument() noexcept
    {
    }

    argument::argument(const argument &other) noexcept : str_(other.str_)
    {
    }

    argument::argument(argument &&other) noexcept : str_(std::move(other.str_))
    {
    }

    argument &argument::operator=(const argument &other) noexcept
    {
        if (this != &other) {
            str_ = other.str_;
        }
        return *this;
    }

    argument &argument::operator=(argument &&other) noexcept
    {
        if (this != &other) {
            str_ = std::move(other.str_);
        }
        return *this;
    }

    /**
     * gets the next argument.
     * example arguments:
     * "abc 1234"
     * 'abc 1234'
     * (abc 1234)
     * abc
     * 1234
     */
    size_t argument::next(string &arg) const
    {
        char cEnd;

        size_t pos = str_.find_first_not_of(' ');

        if (pos == string::npos) {
            return pos;
        }

        cEnd = ' ';

        if (str_[pos] == '\'' || str_[pos] == '"' || str_[pos] == '(') {
            if (str_[pos] == '(') {
                cEnd = ')';
                pos++;
            } else {
                cEnd = str_[pos++];
            }
        }

        while (pos < str_.length()) {
            if (str_[pos] == cEnd) {
                pos++;
                break;
            }

            arg += str_[pos++];
        }

        pos = str_.find_first_not_of(' ', pos);

        return pos;
    }

    string argument::peek() const
    {
        string arg;

        next(arg);

        return arg;
    }

    string argument::next()
    {
        string arg;

        auto pos = next(arg);

        if (pos == string::npos) {
            str_.clear();
        } else {
            str_ = str_.substr(pos);
        }

        return arg;
    }
    long argument::next_number()
    {
        return stol(next());
    }
    double argument::next_real()
    {
        return stod(next());
    }
    bool argument::next_bool()
    {
        string arg = next();
        return coda::equals(arg, "true") || coda::equals(arg, "yes") || coda::equals(arg, "1");
    }

    argument::operator const string &() noexcept
    {
        return str_;
    }

    bool argument::empty() const noexcept
    {
        return str_.length() == 0;
    }

    size_t argument::length() const noexcept
    {
        return str_.length();
    }

    string argument::to_string() const noexcept
    {
        return str_;
    }

    char argument::operator[](int index) const
    {
        return str_[index];
    }

    bool argument::operator!() const noexcept
    {
        return empty();
    }

    bool argument::equals(const string &arg, bool caseSensitive) const
    {
        return coda::equals(str_, arg, caseSensitive);
    }

    bool argument::prefix(const string &arg, bool caseSensitive) const
    {
        return coda::prefix(arg, str_, caseSensitive);
    }

    bool argument::operator==(const std::string &arg) const noexcept
    {
        return str_ == arg;
    }
    bool argument::operator!=(const std::string &arg) const noexcept
    {
        return str_ != arg;
    }
    bool argument::operator==(const char *const arg) const
    {
        return str_ == arg;
    }
    bool argument::operator!=(const char *const arg) const
    {
        return str_ != arg;
    }
    bool argument::operator==(const argument &arg) const noexcept
    {
        return str_ == arg.str_;
    }
    bool argument::operator!=(const argument &arg) const noexcept
    {
        return str_ != arg.str_;
    }
    bool operator==(const std::string &a1, const argument &a2) noexcept
    {
        return a1 == a2.to_string();
    }
    bool operator!=(const std::string &a1, const argument &a2) noexcept
    {
        return a1 != a2.to_string();
    }
    bool operator==(const char *const a1, const argument &a2)
    {
        return a1 == a2.to_string();
    }
    bool operator!=(const char *const a1, const argument &a2)
    {
        return a1 != a2.to_string();
    }
}


text:
Series legend sheet

- Key to waterproofing and thermal insulation codes
- Description of systems; reference to specification section


text:
title: Query and Visualize data from Python
name: Python
logo: /assets/images/integrations/python.png
---


text:
In order to build and run these examples you need to [install the MIND SDK](https://www.vincross.com/developer/introduction/getting-started/macos-&-linux)
and configure it for your [HEXA](https://www.vincross.com/hexa).

Example:
```
$ cd SensorWalkSkill
$ mind build
$ mind pack
$ mind run
```

## [SensorWalkSkill](SensorWalkSkill)
SensorWalkSkill makes the HEXA to walk forward and change direction when encountering obstacles.

## [MoveLegsSkill](MoveLegsSkill)
MoveLegsSkill makes the HEXA to move its front right leg up and down and front left leg in a circle.

## [BalanceSkill](BalanceSkill)
BalanceSkill makes the HEXA keep its balance when standing on an unstable
surface. You could also try to hold the HEXA's feet with your hands.

## [SightSkill](SightSkill)
SightSkill makes the HEXA react to what's infront of it by comparing images captured from the camera.

## [PeripheralsSkill](PeripheralsSkill)
PeripheralsSkill implements a skill that shows how to use the peripherals interface.

## [OpenCVSkill](OpenCVSkill)
OpenCVSkill is an example project showing how to cross-compile C++ libraries and bind them to Golang for Skill development.
This Skill makes the HEXA stand up when it detects human faces.

## [ROSSkill](ROSSkill)
ROSSkill implements a *skill* that shows how to publish images to an ROS topic via rosserial.

## [SelectGaitSkill](SelectGaitSkill)
SelectGaitSkill is an example project showing how to select different gaits for hexa.

## [CameraSkill](CameraSkill)
CameraSkill use the media to show the video on the remote webpage.

## [AudioSkill](AudioSkill)
AudioSkill shows some simple examples that how to use 'audio' driver on HEXA.


text:
@(title: String, currentForm: Option[Form[_]] = None, completedQuestionGroups: List[models.domain.QuestionGroup] = Nil)(content: Html)(implicit claim: models.domain.Claim,request: Request[AnyContent], lang:Lang, flash:Flash, messages: play.api.i18n.Messages)

@import helper._
@import play.api.i18n.Messages

@common.govMain(title) {

        @common.protoType()

        @common.helperMobile()

@Html(messages("c1"))

                @if(completedQuestionGroups.size > 0) {

                            @for(completedQuestionGroup <- completedQuestionGroups) {

@Html(messages(completedQuestionGroup.identifier.id))

                                @Html(messages("change.these"))

                            }

                }

                @if(currentForm.isDefined) {
                    @errorsSummary(currentForm.get)
                }

                @content

}


text:
class Mysql::BrPin < ActiveRecord::Base
  include Tire::Model::Search
  # include Tire::Model::Callbacks

  establish_connection Rails.configuration.database_configuration["pindb"]

  class << self
    def import_to_es
      find_in_batches do |pin_group|
        index.import pin_group
      end
    end

    def build_sample_pin
      br_pin = self.new(
        actions_count: 1,
        board_cat: 'test cat',
        board_name: 'test board',
        board_url: 'http://test.test/borda_url',
        comments_count: 1,
        created_at: Time.now,
        description: 'test test desc',
        error_404: 0,
        img_src: 'http://test.test/test.jpg',
        like_count: 1,
        pin_at: Time.now,
        pinned_count: 1,
        pinner: 'tester',
        pinner_id: 'tester_id',
        ran_resolver: 0,
        source: 'walmart.com',
        title: 'test br pin',
        updated_at: Time.now,
        wm_id: rand(1000000),
        social_rank: 1,
        p_type: nil,
        price: 1,
        repins_count: 1
      )
    end
  end
end


text:
class CreateTagPrompts < ActiveRecord::Migration[4.2]
  def change
    create_table :tag_prompts do |t|
      t.string :prompt
      t.string :desc
      t.string :control_type

      t.timestamps null: false
    end
  end
end


text:
FABRIC_UI_DFG_NAMESPACE_BEGIN

class DFGUICmd_EditNode
  : public DFGUICmd_Exec
{
public:

  DFGUICmd_EditNode(
    FabricCore::DFGBinding const &binding,
    FTL::StrRef execPath,
    FabricCore::DFGExec const &exec,
    FTL::StrRef oldNodeName,
    FTL::StrRef desiredNewNodeName,
    FTL::StrRef nodeMetadata,
    FTL::StrRef execMetadata
    )
    : DFGUICmd_Exec(
      binding,
      execPath,
      exec
      )
    , m_oldNodeName( oldNodeName )
    , m_desiredNewNodeName( desiredNewNodeName )
    , m_nodeMetadata( nodeMetadata )
    , m_execMetadata( execMetadata )
    {}

  static FTL::CStrRef CmdName()
    { return DFG_CMD_NAME("EditNode"); }

  FTL::CStrRef getActualNewNodeName() const
    { return m_actualNewNodeName; }

protected:

  virtual void appendDesc( std::string &desc );

  virtual void invoke( unsigned &coreUndoCount );

private:

  std::string m_oldNodeName;
  std::string m_desiredNewNodeName;
  std::string m_nodeMetadata;
  std::string m_execMetadata;

  std::string m_actualNewNodeName;
};

FABRIC_UI_DFG_NAMESPACE_END

#endif // __UI_DFG_DFGUICmd_EditNode__


text:
<template name="postContenders" class="container">

The Contender

{{author}}

The Challenger

{{displayText}}

      {{#if ownPost}}
      Select Challenger

First, select your Challenger.

      {{/if}}

      {{#if ownPost}}
      <button class="btn btn-danger notifyChange">Send Group Notification</button>

Rally your Spectators and others after selecting your Challenger.

      {{/if}}

</template>

<template name="contendersList">
  {{> postItem}}

    List of Challengers

    {{#each challengers}}
      {{> contender}}
    {{/each}}

</template>

<template name="contender">

    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#user-{{this}}" data-whatever="{{userName}}">Select Challenger</button>

    {{userName}}

          <button type="button" class="close" data-dismiss="modal">×Close</button>

          <button type="button" class="btn btn-primary no" data-dismiss="modal">No</button>
          <button type="button" class="btn btn-primary yes">Yes</button>

</template>


text:
title:  Theko ea Phomolo
date:  17/07/2021
---

### Bakeng sa boithuto ba beke ena, bala
2 Sam. 11:1–27, 2 Sam. 12:1–23, Gen. 3:1–8, 1 John 1:9.

>
Temana ea Khopolo

> "Oho Molimo, u boele u lokise kahare ho 'na moea o tiileng" (Pes. 51:10).

Batho ba bangata bo bonahala ba le tsietsing ea ho fumana khutso le botsitso. Ba ikemiselitse ho e lefella le hona.Litoropong tse ngata tse kholo hona le liphapusi tsa khokelo ea marang-rang ea mahala, tse ka hiroang ka hora.

Melao e thata haholo—ha ho lerata, ha ho baeti. Batho ba ikemiselitse ho lefa le ho fumana ho lula ka khutso le ho roba monakeli kapa ho khaleha. Ho na le libaka tsa ho robala tse hiroang boema-fofane, kapa lintho tse fokotsang molumo tse kenngoang ka litsebeng tse tummeng. Ho na le likhurumetsi, kapa lintho tse koahelang hlooho tseo u ka li rekang ho ikoahela bakeng sa khutso e itseng le mosebetsing ka nako ea phomolo.

Phomolo ea 'nete le eona e na le theko. Leha lingaka tsa mabili a bonohe a boithuso li ka leka hore re lumele hore re ka tseba qetello ea rōna le hore phomolo ke taba ea Khetho fela le ho etsa meralo e metle, empa bonyane ha re ela hloko botšepehi bona, re hlokomela ho hloka bokhoni ha rōna ho sa tliseng phomolo ea 'nete lipelong tsa rōna. Moetapele oa kereke ea lekholo la bone la lilemo Phatoine o e beha hantle bukeng ea hae ea Confessions (Book 1) ha a sheba mohau oa Molimo: "O iketselitse rōna, 'me lipelo tsa rōna ha li na phomolo ho fihlela li e fumana ho uena."

Bekeng ena, re tla sheba hakhutšoanyane bophelo ba monna ea pelong ea Molimo ho fumana hore ke joang a fumaneng theko ea 'nete ea phomolo ea Molimo.


text:
class HomeController extends TF.Controller {

    static configure() {
        this.addFilter(ActionFilter1).only('actionWithBeforeFilter1', 'actionWithAllBeforeFilters');
        this.addFilter(ActionFilter2).only('actionWithBeforeFilter2', 'actionWithAllBeforeFilters');
        this.addBeforeFilter(this.filter3).except('actionWithBeforeFilter1', 'actionWithBeforeFilter2', 'actionWithoutBeforeFilters');
    }

    static filter3(context: TF.IActionFilterContext) {
        if (context.request.param('filter') == 'filter3') context.reply.content('filter3');
        else context.next();
    }

    index() {
        this.content('home');
    }

    number(id: number) {
        this.content(id + ':' + typeof id);
    }

    numberArray(id: number[]) {
        this.content(id + ':' + typeof id);
    }

    boolean(id: boolean) {
        this.content(id + ':' + typeof id);
    }

    booleanArray(id: boolean[]) {
        this.content(id + ':' + typeof id);
    }

    string(id: string) {
        this.content(id + ':' + typeof id);
    }

    stringArray(id: string[]) {
        this.content(id + ':' + typeof id);
    }

    any(id: any) {
        this.content(id + ':' + typeof id);
    }

    anyArray(id: any[]) {
        this.content(id + ':' + typeof id);
    }

    actionWithBeforeFilter1() {
        this.content('actionWithBeforeFilter1');
    }

    actionWithBeforeFilter2() {
        this.content('actionWithBeforeFilter2');
    }

    actionWithBeforeFilter3() {
        this.content('actionWithBeforeFilter3');
    }

    actionWithAllBeforeFilters() {
        this.content('actionWithoutBeforeFilters');
    }

    actionWithoutBeforeFilters() {
        this.content('actionWithoutBeforeFilters');
    }

    redirectToHome() {
        this.redirect('/');
    }

    redirectToHomePermanently() {
        this.redirect('/', 301);
    }

    fileContent() {
        this.file('app.json');
    }

    downloadFile() {
        this.download('app.json');
    }

    viewWithLayout() {
        this.view('viewWithLayout', { layout: 'layout', message: 'view' });
    }

    viewWithoutLayout() {
        this.view('viewWithoutLayout', { message: 'viewWithoutLayout' });
    }

    customHeader() {
        this.response.setHeader('custom-header', 'test');
        this.content('');
    }

    private privateFunction() {
        this.content('private');
    }

    static staticFunction() {}

}


text:
package io.netty.buffer;

import org.junit.jupiter.api.Test;

import java.nio.ByteBuffer;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class PoolArenaTest {

    private static final int PAGE_SIZE = 8192;
    private static final int PAGE_SHIFTS = 11;
    //chunkSize = pageSize * (2 ^ pageShifts)
    private static final int CHUNK_SIZE = 16777216;

    @Test
    public void testNormalizeCapacity() {
        PoolArena<ByteBuffer> arena = new PoolArena.DirectArena(null, PAGE_SIZE, PAGE_SHIFTS, CHUNK_SIZE, 0);
        int[] reqCapacities = {0, 15, 510, 1024, 1023, 1025};
        int[] expectedResult = {16, 16, 512, 1024, 1024, 1280};
        for (int i = 0; i < reqCapacities.length; i ++) {
            assertEquals(expectedResult[i], arena.sizeIdx2size(arena.size2SizeIdx(reqCapacities[i])));
        }
    }

    @Test
    public void testNormalizeAlignedCapacity() {
        PoolArena<ByteBuffer> arena = new PoolArena.DirectArena(null, PAGE_SIZE, PAGE_SHIFTS, CHUNK_SIZE, 64);
        int[] reqCapacities = {0, 15, 510, 1024, 1023, 1025};
        int[] expectedResult = {64, 64, 512, 1024, 1024, 1280};
        for (int i = 0; i < reqCapacities.length; i ++) {
            assertEquals(expectedResult[i], arena.sizeIdx2size(arena.size2SizeIdx(reqCapacities[i])));
        }
    }

    @Test
    public void testSize2SizeIdx() {
        PoolArena<ByteBuffer> arena = new PoolArena.DirectArena(null, PAGE_SIZE, PAGE_SHIFTS, CHUNK_SIZE, 0);

        for (int sz = 0; sz <= CHUNK_SIZE; sz++) {
            int sizeIdx = arena.size2SizeIdx(sz);
            assertTrue(sz <= arena.sizeIdx2size(sizeIdx));
            if (sizeIdx > 0) {
                assertTrue(sz > arena.sizeIdx2size(sizeIdx - 1));
            }
        }
    }

    @Test
    public void testPages2PageIdx() {
        int pageShifts = PAGE_SHIFTS;

        PoolArena<ByteBuffer> arena = new PoolArena.DirectArena(null, PAGE_SIZE, PAGE_SHIFTS, CHUNK_SIZE, 0);

        int maxPages = CHUNK_SIZE >> pageShifts;
        for (int pages = 1; pages <= maxPages; pages++) {
            int pageIdxFloor = arena.pages2pageIdxFloor(pages);
            assertTrue(pages << pageShifts >= arena.pageIdx2size(pageIdxFloor));
            if (pageIdxFloor > 0 && pages < maxPages) {
                assertTrue(pages << pageShifts < arena.pageIdx2size(pageIdxFloor + 1));
            }

            int pageIdxCeiling = arena.pages2pageIdx(pages);
            assertTrue(pages << pageShifts <= arena.pageIdx2size(pageIdxCeiling));
            if (pageIdxCeiling > 0) {
                assertTrue(pages << pageShifts > arena.pageIdx2size(pageIdxCeiling - 1));
            }
        }
    }

    @Test
    public void testSizeIdx2size() {
        PoolArena<ByteBuffer> arena = new PoolArena.DirectArena(null, PAGE_SIZE, PAGE_SHIFTS, CHUNK_SIZE, 0);
        for (int i = 0; i < arena.nSizes; i++) {
            assertEquals(arena.sizeIdx2sizeCompute(i), arena.sizeIdx2size(i));
        }
    }

    @Test
    public void testPageIdx2size() {
        PoolArena<ByteBuffer> arena = new PoolArena.DirectArena(null, PAGE_SIZE, PAGE_SHIFTS, CHUNK_SIZE, 0);
        for (int i = 0; i < arena.nPSizes; i++) {
            assertEquals(arena.pageIdx2sizeCompute(i), arena.pageIdx2size(i));
        }
    }

    @Test
    public void testAllocationCounter() {
        final PooledByteBufAllocator allocator = new PooledByteBufAllocator(
                true,   // preferDirect
                0,      // nHeapArena
                1,      // nDirectArena
                8192,   // pageSize
                11,     // maxOrder
                0,      // tinyCacheSize
                0,      // smallCacheSize
                0,      // normalCacheSize
                true    // useCacheForAllThreads
                );

        // create small buffer
        final ByteBuf b1 = allocator.directBuffer(800);
        // create normal buffer
        final ByteBuf b2 = allocator.directBuffer(8192 * 5);

        assertNotNull(b1);
        assertNotNull(b2);

        // then release buffer to deallocated memory while threadlocal cache has been disabled
        // allocations counter value must equals deallocations counter value
        assertTrue(b1.release());
        assertTrue(b2.release());

        assertTrue(allocator.directArenas().size() >= 1);
        final PoolArenaMetric metric = allocator.directArenas().get(0);

        assertEquals(2, metric.numDeallocations());
        assertEquals(2, metric.numAllocations());

        assertEquals(1, metric.numSmallDeallocations());
        assertEquals(1, metric.numSmallAllocations());
        assertEquals(1, metric.numNormalDeallocations());
        assertEquals(1, metric.numNormalAllocations());
    }

    @Test
    public void testDirectArenaMemoryCopy() {
        ByteBuf src = PooledByteBufAllocator.DEFAULT.directBuffer(512);
        ByteBuf dst = PooledByteBufAllocator.DEFAULT.directBuffer(512);

        PooledByteBuf<ByteBuffer> pooledSrc = unwrapIfNeeded(src);
        PooledByteBuf<ByteBuffer> pooledDst = unwrapIfNeeded(dst);

        // This causes the internal reused ByteBuffer duplicate limit to be set to 128
        pooledDst.writeBytes(ByteBuffer.allocate(128));
        // Ensure internal ByteBuffer duplicate limit is properly reset (used in memoryCopy non-Unsafe case)
        pooledDst.chunk.arena.memoryCopy(pooledSrc.memory, 0, pooledDst, 512);

        src.release();
        dst.release();
    }

    @SuppressWarnings("unchecked")
    private PooledByteBuf<ByteBuffer> unwrapIfNeeded(ByteBuf buf) {
        return (PooledByteBuf<ByteBuffer>) (buf instanceof PooledByteBuf ? buf : buf.unwrap());
    }
}


text:
START_ATF_NAMESPACE
    namespace Detail
    {
        extern ::std::array<hook_record, 1> _world_account_ping_wrac_functions;
    }; // end namespace Detail
END_ATF_NAMESPACE


text:
@implementation ViewController
- (void)viewDidLoad
{
    [super viewDidLoad];

    CGFloat height = 35.0f;
    PPDemoToolBar *toolBar = [[PPDemoToolBar alloc] initWithFrame:CGRectMake(0, self.view.bottom - height, self.view.width, height)];
    [[UIApplication sharedApplication].keyWindow addSubview:toolBar];

    self.tableViewItems = @[[ExampleItem t:@"Image View Example" c:@"PPImageExample"],
                            [ExampleItem t:@"Text View Example" c:@"PPTextExample"],
                            [ExampleItem t:@"Button Example" c:@"PPButtonExample"],
//                            [ExampleItem t:@"AutoLayout Example" c:@"AutoLayoutExample"], // TODO
                            [ExampleItem t:@"Animation Example" c:@"PPAnimationExample"],
                            [ExampleItem t:@"Feeds List Example" c:@"WBTimelineViewController"]];
}

@end


text:
import {CrLottieElement} from 'chrome://resources/cr_elements/cr_lottie/cr_lottie.m.js';
import {LegacyElementMixin} from 'chrome://resources/polymer/v3_0/polymer/lib/legacy/legacy-element-mixin.js';

export const FINGERPRINT_TICK_DARK_URL: string;
export const FINGERPRINT_TICK_LIGHT_URL: string;
export const PROGRESS_CIRCLE_BACKGROUND_COLOR_DARK: string;
export const PROGRESS_CIRCLE_BACKGROUND_COLOR_LIGHT: string;
export const PROGRESS_CIRCLE_FILL_COLOR_DARK: string;
export const PROGRESS_CIRCLE_FILL_COLOR_LIGHT: string;

interface CrFingerprintProgressArcElement extends LegacyElementMixin,
                                                  HTMLElement {
  circleRadius: number;

  reset(): void;
  setProgress(
      prevPercentComplete: number, currPercentComplete: number,
      isComplete: boolean): void;
  setPlay(shouldPlay: boolean): void;
  isComplete(): boolean;
  $: {
    canvas: HTMLCanvasElement,
    scanningAnimation: CrLottieElement,
  };
}

export {CrFingerprintProgressArcElement};

declare global {
  interface HTMLElementTagNameMap {
    'cr-fingerprint-progress-arc': CrFingerprintProgressArcElement;
  }
}