text:
package org.apache.camel.component.kubernetes.pods;

import java.util.Map;

import io.fabric8.kubernetes.api.model.DoneablePod;
import io.fabric8.kubernetes.api.model.Pod;
import io.fabric8.kubernetes.api.model.PodBuilder;
import io.fabric8.kubernetes.api.model.PodList;
import io.fabric8.kubernetes.api.model.PodSpec;
import io.fabric8.kubernetes.client.Watch;
import io.fabric8.kubernetes.client.Watcher;
import io.fabric8.kubernetes.client.dsl.FilterWatchListMultiDeletable;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.PodResource;

import org.apache.camel.Exchange;
import org.apache.camel.component.kubernetes.AbstractKubernetesEndpoint;
import org.apache.camel.component.kubernetes.KubernetesConstants;
import org.apache.camel.component.kubernetes.KubernetesOperations;
import org.apache.camel.impl.DefaultProducer;
import org.apache.camel.util.MessageHelper;
import org.apache.camel.util.ObjectHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class KubernetesPodsProducer extends DefaultProducer {

    private static final Logger LOG = LoggerFactory
            .getLogger(KubernetesPodsProducer.class);

    public KubernetesPodsProducer(AbstractKubernetesEndpoint endpoint) {
        super(endpoint);
    }

    @Override
    public AbstractKubernetesEndpoint getEndpoint() {
        return (AbstractKubernetesEndpoint) super.getEndpoint();
    }

    @Override
    public void process(Exchange exchange) throws Exception {
        String operation;

        if (ObjectHelper.isEmpty(getEndpoint().getKubernetesConfiguration()
                .getOperation())) {
            operation = exchange.getIn().getHeader(
                    KubernetesConstants.KUBERNETES_OPERATION, String.class);
        } else {
            operation = getEndpoint().getKubernetesConfiguration()
                    .getOperation();
        }

        switch (operation) {

        case KubernetesOperations.LIST_PODS_OPERATION:
            doList(exchange, operation);
            break;

        case KubernetesOperations.LIST_PODS_BY_LABELS_OPERATION:
            doListPodsByLabel(exchange, operation);
            break;

        case KubernetesOperations.GET_POD_OPERATION:
            doGetPod(exchange, operation);
            break;

        case KubernetesOperations.CREATE_POD_OPERATION:
            doCreatePod(exchange, operation);
            break;

        case KubernetesOperations.DELETE_POD_OPERATION:
            doDeletePod(exchange, operation);
            break;

        default:
            throw new IllegalArgumentException("Unsupported operation "
                    + operation);
        }
    }

    protected void doList(Exchange exchange, String operation) throws Exception {
        PodList podList = getEndpoint().getKubernetesClient().pods().inAnyNamespace().list();

        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
        exchange.getOut().setBody(podList.getItems());
    }

    protected void doListPodsByLabel(Exchange exchange, String operation) {
        Map<String, String> labels = exchange.getIn().getHeader(
                KubernetesConstants.KUBERNETES_PODS_LABELS, Map.class);
        if (ObjectHelper.isEmpty(labels)) {
            LOG.error("Get pods by labels require specify a labels set");
            throw new IllegalArgumentException(
                    "Get pods by labels require specify a labels set");
        }

        FilterWatchListMultiDeletable<Pod, PodList, Boolean, Watch, Watcher<Pod>> pods = getEndpoint().getKubernetesClient().pods().inAnyNamespace();
        for (Map.Entry<String, String> entry : labels.entrySet()) {
            pods.withLabel(entry.getKey(), entry.getValue());
        }
        PodList podList = pods.list();

        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
        exchange.getOut().setBody(podList.getItems());
    }

    protected void doGetPod(Exchange exchange, String operation)
            throws Exception {
        Pod pod = null;
        String podName = exchange.getIn().getHeader(
                KubernetesConstants.KUBERNETES_POD_NAME, String.class);
        String namespaceName = exchange.getIn().getHeader(
                KubernetesConstants.KUBERNETES_NAMESPACE_NAME, String.class);
        if (ObjectHelper.isEmpty(podName)) {
            LOG.error("Get a specific pod require specify a pod name");
            throw new IllegalArgumentException(
                    "Get a specific pod require specify a pod name");
        }
        if (ObjectHelper.isEmpty(namespaceName)) {
            LOG.error("Get a specific pod require specify a namespace name");
            throw new IllegalArgumentException(
                    "Get a specific pod require specify a namespace name");
        }
        pod = getEndpoint().getKubernetesClient().pods()
                .inNamespace(namespaceName).withName(podName).get();

        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
        exchange.getOut().setBody(pod);
    }

    protected void doCreatePod(Exchange exchange, String operation)
            throws Exception {
        Pod pod = null;
        String podName = exchange.getIn().getHeader(
                KubernetesConstants.KUBERNETES_POD_NAME, String.class);
        String namespaceName = exchange.getIn().getHeader(
                KubernetesConstants.KUBERNETES_NAMESPACE_NAME, String.class);
        PodSpec podSpec = exchange.getIn().getHeader(
                KubernetesConstants.KUBERNETES_POD_SPEC, PodSpec.class);
        if (ObjectHelper.isEmpty(podName)) {
            LOG.error("Create a specific pod require specify a pod name");
            throw new IllegalArgumentException(
                    "Create a specific pod require specify a pod name");
        }
        if (ObjectHelper.isEmpty(namespaceName)) {
            LOG.error("Create a specific pod require specify a namespace name");
            throw new IllegalArgumentException(
                    "Create a specific pod require specify a namespace name");
        }
        if (ObjectHelper.isEmpty(podSpec)) {
            LOG.error("Create a specific pod require specify a pod spec bean");
            throw new IllegalArgumentException(
                    "Create a specific pod require specify a pod spec bean");
        }
        Map<String, String> labels = exchange.getIn().getHeader(
                KubernetesConstants.KUBERNETES_PODS_LABELS, Map.class);
        Pod podCreating = new PodBuilder().withNewMetadata()
                .withName(podName).withLabels(labels).endMetadata()
                .withSpec(podSpec).build();
        pod = getEndpoint().getKubernetesClient().pods()
                .inNamespace(namespaceName).create(podCreating);

        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
        exchange.getOut().setBody(pod);
    }

    protected void doDeletePod(Exchange exchange, String operation)
            throws Exception {
        String podName = exchange.getIn().getHeader(
                KubernetesConstants.KUBERNETES_POD_NAME, String.class);
        String namespaceName = exchange.getIn().getHeader(
                KubernetesConstants.KUBERNETES_NAMESPACE_NAME, String.class);
        if (ObjectHelper.isEmpty(podName)) {
            LOG.error("Delete a specific pod require specify a pod name");
            throw new IllegalArgumentException(
                    "Delete a specific pod require specify a pod name");
        }
        if (ObjectHelper.isEmpty(namespaceName)) {
            LOG.error("Delete a specific pod require specify a namespace name");
            throw new IllegalArgumentException(
                    "Delete a specific pod require specify a namespace name");
        }
        boolean podDeleted = getEndpoint().getKubernetesClient().pods()
                .inNamespace(namespaceName).withName(podName).delete();

        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
        exchange.getOut().setBody(podDeleted);
    }
}


text:
const Joi = require('joi');
const router = require('express').Router();
const validator = require('express-joi-validation')({ passError: true });
const guard = require('express-jwt-permissions')();
const am = require('../../utils/async-middleware');
const barmanController = require('../controllers/barman-controller');
const { ID_SCHEMA, RANGE_SCHEMA } = require('../../utils');
const { BarmanSchema } = require('../models/schemas');

router.get(
  '/',
  guard.check('barman:read'),
  am(barmanController.getAllBarmen),
);

router.post(
  '/',
  guard.check('barman:write'),
  validator.body(BarmanSchema.requiredKeys('firstName', 'lastName', 'connection',
    'connection.email', 'nickname', 'dateOfBirth', 'flow')),
  am(barmanController.createBarman),
);

router.get(
  '/services',
  guard.check('barman:read'),
  validator.query(RANGE_SCHEMA),
  am(barmanController.getServicesBarmen),
);

router.get(
  '/:id',
  guard.check('barman:read'),
  validator.params(ID_SCHEMA),
  am(barmanController.getBarmanById),
);
router.put(
  '/:id',
  guard.check('barman:write'),
  validator.params(ID_SCHEMA),
  validator.body(BarmanSchema.min(1)),
  am(barmanController.updateBarman),
);
router.post(
  '/:id/delete',
  guard.check('barman:write'),
  validator.params(ID_SCHEMA),
  am(barmanController.deleteBarman),
);

router.get(
  '/:id/services',
  guard.check('barman:read', 'service:read'),
  validator.params(ID_SCHEMA),
  validator.query(RANGE_SCHEMA),
  am(barmanController.getServicesBarman),
);
router.post(
  '/:id/services',
  guard.check('barman:read', 'service:read'),
  validator.params(ID_SCHEMA),
  validator.body(Joi.array().items(Joi.number().integer().required()).required()),
  am(barmanController.createServiceBarman),
);
router.post(
  '/:id/services/delete',
  guard.check('barman:read', 'service:read'),
  validator.params(ID_SCHEMA),
  validator.body(Joi.array().items(Joi.number().integer().required()).required()),
  am(barmanController.deleteServiceBarman),
);

module.exports = router;

redpajama_set_name: RedPajamaGithub


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.Text;
using Azure.Core;

namespace Azure.Security.Attestation
{
    [CodeGenModel("CertificateModification")]
    public partial struct PolicyCertificateResolution
    {
    }
}


text:
"use strict";
/// <reference path="../IContainer.ts" />
Object.defineProperty(exports, "__esModule", { value: true });
var ArrayParameter = (function () {
    function ArrayParameter(service) {
        this.service = service;
    }
    ArrayParameter.prototype.resolve = function (container) {
        return container.resolveMany(this.service);
    };
    return ArrayParameter;
}());
exports.default = ArrayParameter;


text:
layout: doc
title: "ElementBuilder.build"
position: 0
---

Создает и настраивает элемент, по переданным метаданным.

## Parameters

|Name|Type|Description|
|----|----|-----------|
|context|[`Context`](../../../Context/)| Контекст представление, в котором будет находится элемент |
|args| `Object` | Объект со свойствами |
|args.metadata| `Object` | Метаданные элемента |
|args.parent| [`Element`](../../) | Родительский элемент |


text:
require 'tk'

module Tk
  module RbWidget
    class BalloonHelp<TkLabel
    end
  end
end
class Tk::RbWidget::BalloonHelp<TkLabel
  DEFAULT_FOREGROUND = 'black'
  DEFAULT_BACKGROUND = 'white'
  DEFAULT_INTERVAL   = 750

  def _balloon_binding(interval)
    @timer = TkAfter.new(interval, 1, proc{show})
    def @timer.interval(val)
      @sleep_time = val
    end
    @bindtag = TkBindTag.new
    @bindtag.bind('Enter',  proc{@timer.start})
    @bindtag.bind('Motion', proc{@timer.restart; erase})
    @bindtag.bind('Any-ButtonPress', proc{@timer.restart; erase})
    @bindtag.bind('Leave',  proc{@timer.stop; erase})
    tags = @parent.bindtags
    idx = tags.index(@parent)
    unless idx
      ppath = TkComm.window(@parent.path)
      idx = tags.index(ppath) || 0
    end
    tags[idx,0] = @bindtag
    @parent.bindtags(tags)
  end
  private :_balloon_binding

  def initialize(parent=nil, keys={})
    @parent = parent || Tk.root

    @frame = TkToplevel.new(@parent)
    @frame.withdraw
    @frame.overrideredirect(true)
    @frame.transient(TkWinfo.toplevel(@parent))
    @epath = @frame.path

    if keys
      keys = _symbolkey2str(keys)
    else
      keys = {}
    end

    @command = keys.delete('command')

    @interval = keys.delete('interval'){DEFAULT_INTERVAL}
    _balloon_binding(@interval)

    # @label = TkLabel.new(@frame, 'background'=>'bisque').pack
    @label = TkLabel.new(@frame,
                         'foreground'=>DEFAULT_FOREGROUND,
                         'background'=>DEFAULT_BACKGROUND).pack
    @label.configure(_symbolkey2str(keys)) unless keys.empty?
    @path = @label
  end

  def epath
    @epath
  end

  def interval(val)
    if val
      @timer.interval(val)
    else
      @interval
    end
  end

  def command(cmd = Proc.new)
    @command = cmd
    self
  end

  def show
    x = TkWinfo.pointerx(@parent)
    y = TkWinfo.pointery(@parent)
    @frame.geometry("+#{x+1}+#{y+1}")

    if @command
      case @command.arity
      when 0
        @command.call
      when 2
        @command.call(x - TkWinfo.rootx(@parent), y - TkWinfo.rooty(@parent))
      when 3
        @command.call(x - TkWinfo.rootx(@parent), y - TkWinfo.rooty(@parent),
                      self)
      else
        @command.call(x - TkWinfo.rootx(@parent), y - TkWinfo.rooty(@parent),
                      self, @parent)
      end
    end

    @frame.deiconify
    @frame.raise

    begin
      @org_cursor = @parent.cget('cursor')
    rescue
      @org_cursor = @parent['cursor']
    end
    begin
      @parent.configure('cursor', 'crosshair')
    rescue
      @parent.cursor('crosshair')
    end
  end

  def erase
    begin
      @parent.configure('cursor', @org_cursor)
    rescue
      @parent.cursor(@org_cursor)
    end
    @frame.withdraw
  end

  def destroy
    @frame.destroy
  end
end

################################################
# test
################################################
if __FILE__ == $0
  TkButton.new('text'=>'This button has a balloon help') {|b|
    pack('fill'=>'x')
    Tk::RbWidget::BalloonHelp.new(b, 'text'=>' Message ')
  }
  TkButton.new('text'=>'This button has another balloon help') {|b|
    pack('fill'=>'x')
    Tk::RbWidget::BalloonHelp.new(b,
                        'text'=>"CONFIGURED MESSAGE\nchange colors, and so on",
                        'interval'=>200, 'font'=>'courier',
                        'background'=>'gray', 'foreground'=>'red')
  }

  sb = TkScrollbox.new.pack(:fill=>:x)
  sb.insert(:end, *%w(aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm))
=begin
  # CASE1 : command takes no argument
  bh = Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
                           :relief=>:ridge, :background=>'white',
                           :command=>proc{
                             y = TkWinfo.pointery(sb) - TkWinfo.rooty(sb)
                             bh.text "current index == #{sb.nearest(y)}"
                           })
=end
=begin
  # CASE2 : command takes 2 arguments
  bh = Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
                           :relief=>:ridge, :background=>'white',
                           :command=>proc{|x, y|
                             bh.text "current index == #{sb.nearest(y)}"
                           })
=end
=begin
  # CASE3 : command takes 3 arguments
  Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
                      :relief=>:ridge, :background=>'white',
                      :command=>proc{|x, y, bhelp|
                        bhelp.text "current index == #{sb.nearest(y)}"
                      })
=end
=begin
  # CASE4a : command is a Proc object and takes 4 arguments
  cmd = proc{|x, y, bhelp, parent|
    bhelp.text "current index == #{parent.nearest(y)}"
  }

  Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
                      :relief=>:ridge, :background=>'white',
                      :command=>cmd)

  sb2 = TkScrollbox.new.pack(:fill=>:x)
  sb2.insert(:end, *%w(AAA BBB CCC DDD EEE FFF GGG HHH III JJJ KKK LLL MMM))
  Tk::RbWidget::BalloonHelp.new(sb2, :interval=>500,
                      :padx=>5, :relief=>:raised,
                      :background=>'gray25', :foreground=>'white',
                      :command=>cmd)
=end
#=begin
  # CASE4b : command is a Method object and takes 4 arguments
  def set_msg(x, y, bhelp, parent)
    bhelp.text "current index == #{parent.nearest(y)}"
  end
  cmd = self.method(:set_msg)

  Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
                                :relief=>:ridge, :background=>'white',
                                :command=>cmd)

  sb2 = TkScrollbox.new.pack(:fill=>:x)
  sb2.insert(:end, *%w(AAA BBB CCC DDD EEE FFF GGG HHH III JJJ KKK LLL MMM))
  Tk::RbWidget::BalloonHelp.new(sb2, :interval=>500,
                                :padx=>5, :relief=>:raised,
                                :background=>'gray25', :foreground=>'white',
                                :command=>cmd)
#=end

  Tk.mainloop
end


text:
//=================================================================================================

//=================================================================================================

//*************************************************************************************************
// Includes
//*************************************************************************************************

#include <cstdlib>
#include <iostream>
#include <blaze/math/CompressedVector.h>
#include <blaze/math/DynamicMatrix.h>
#include <blaze/math/LowerMatrix.h>
#include <blazetest/mathtest/Creator.h>
#include <blazetest/mathtest/dmatsvecmult/OperationTest.h>
#include <blazetest/system/MathTest.h>

//=================================================================================================
//
//  MAIN FUNCTION
//
//=================================================================================================

//*************************************************************************************************
int main()
{
   std::cout << "   Running 'LDaVCb'..." << std::endl;

   using blazetest::mathtest::TypeA;
   using blazetest::mathtest::TypeB;

   try
   {
      // Matrix type definitions
      typedef blaze::LowerMatrix< blaze::DynamicMatrix<TypeA> >  LDa;
      typedef blaze::CompressedVector<TypeB>                     VCb;

      // Creator type definitions
      typedef blazetest::Creator<LDa>  CLDa;
      typedef blazetest::Creator<VCb>  CVCb;

      // Running tests with large matrices and vectors
      for( size_t i=0UL; i<=6UL; ++i ) {
         for( size_t j=0UL; j<=i; ++j ) {
            RUN_DMATSVECMULT_OPERATION_TEST( CLDa( i ), CVCb( i, j ) );
         }
      }

      // Running tests with large matrices and vectors
      RUN_DMATSVECMULT_OPERATION_TEST( CLDa(  67UL ), CVCb(  67UL,  7UL ) );
      RUN_DMATSVECMULT_OPERATION_TEST( CLDa( 127UL ), CVCb( 127UL, 13UL ) );
      RUN_DMATSVECMULT_OPERATION_TEST( CLDa(  64UL ), CVCb(  64UL,  8UL ) );
      RUN_DMATSVECMULT_OPERATION_TEST( CLDa( 128UL ), CVCb( 128UL, 16UL ) );
   }
   catch( std::exception& ex ) {
      std::cerr << "\n\n ERROR DETECTED during dense matrix/sparse vector multiplication:\n"
                << ex.what() << "\n";
      return EXIT_FAILURE;
   }

   return EXIT_SUCCESS;
}
//*************************************************************************************************


text:
#include "SkPictureFlat.h"
#include "SkPicturePlayback.h"
#include "SkPictureRecord.h"

#include "SkCanvas.h"
#include "SkChunkAlloc.h"
#include "SkPicture.h"
#include "SkRegion.h"
#include "SkStream.h"
#include "SkTDArray.h"
#include "SkTSearch.h"
#include "SkTime.h"

#include "SkReader32.h"
#include "SkWriter32.h"

#define DUMP_BUFFER_SIZE 65536

//#define ENABLE_TIME_DRAW    // dumps milliseconds for each draw

#ifdef SK_DEBUG
// enable SK_DEBUG_TRACE to trace DrawType elements when
//     recorded and played back
// #define SK_DEBUG_TRACE
// enable SK_DEBUG_SIZE to see the size of picture components
// #define SK_DEBUG_SIZE
// enable SK_DEBUG_DUMP to see the contents of recorded elements
// #define SK_DEBUG_DUMP
// enable SK_DEBUG_VALIDATE to check internal structures for consistency
// #define SK_DEBUG_VALIDATE
#endif

#if defined SK_DEBUG_TRACE || defined SK_DEBUG_DUMP
const char* DrawTypeToString(DrawType drawType) {
    switch (drawType) {
        case UNUSED: SkDebugf("DrawType UNUSED\n"); SkASSERT(0); break;
        case CLIP_PATH: return "CLIP_PATH";
        case CLIP_REGION: return "CLIP_REGION";
        case CLIP_RECT: return "CLIP_RECT";
        case CONCAT: return "CONCAT";
        case DRAW_BITMAP: return "DRAW_BITMAP";
        case DRAW_BITMAP_MATRIX: return "DRAW_BITMAP_MATRIX";
        case DRAW_BITMAP_RECT: return "DRAW_BITMAP_RECT";
        case DRAW_PAINT: return "DRAW_PAINT";
        case DRAW_PATH: return "DRAW_PATH";
        case DRAW_PICTURE: return "DRAW_PICTURE";
        case DRAW_POINTS: return "DRAW_POINTS";
        case DRAW_POS_TEXT: return "DRAW_POS_TEXT";
        case DRAW_POS_TEXT_H: return "DRAW_POS_TEXT_H";
        case DRAW_RECT_GENERAL: return "DRAW_RECT_GENERAL";
        case DRAW_RECT_SIMPLE: return "DRAW_RECT_SIMPLE";
        case DRAW_SPRITE: return "DRAW_SPRITE";
        case DRAW_TEXT: return "DRAW_TEXT";
        case DRAW_TEXT_ON_PATH: return "DRAW_TEXT_ON_PATH";
        case RESTORE: return "RESTORE";
        case ROTATE: return "ROTATE";
        case SAVE: return "SAVE";
        case SAVE_LAYER: return "SAVE_LAYER";
        case SCALE: return "SCALE";
        case SKEW: return "SKEW";
        case TRANSLATE: return "TRANSLATE";
        default:
            SkDebugf("DrawType error 0x%08x\n", drawType);
            SkASSERT(0);
            break;
    }
    SkASSERT(0);
    return NULL;
}
#endif

#ifdef SK_DEBUG_VALIDATE
static void validateMatrix(const SkMatrix* matrix) {
    SkScalar scaleX = matrix->getScaleX();
    SkScalar scaleY = matrix->getScaleY();
    SkScalar skewX = matrix->getSkewX();
    SkScalar skewY = matrix->getSkewY();
    SkScalar perspX = matrix->getPerspX();
    SkScalar perspY = matrix->getPerspY();
    if (scaleX != 0 && skewX != 0)
        SkDebugf("scaleX != 0 && skewX != 0\n");
    SkASSERT(scaleX == 0 || skewX == 0);
    SkASSERT(scaleY == 0 || skewY == 0);
    SkASSERT(perspX == 0);
    SkASSERT(perspY == 0);
}
#endif

///////////////////////////////////////////////////////////////////////////////

SkPicture::SkPicture() {
    fRecord = NULL;
    fPlayback = NULL;
    fWidth = fHeight = 0;
}

SkPicture::SkPicture(const SkPicture& src) : SkRefCnt() {
    fWidth = src.fWidth;
    fHeight = src.fHeight;
    fRecord = NULL;

    /*  We want to copy the src's playback. However, if that hasn't been built
        yet, we need to fake a call to endRecording() without actually calling
        it (since it is destructive, and we don't want to change src).
     */
    if (src.fPlayback) {
        fPlayback = SkNEW_ARGS(SkPicturePlayback, (*src.fPlayback));
    } else if (src.fRecord) {
        // here we do a fake src.endRecording()
        fPlayback = SkNEW_ARGS(SkPicturePlayback, (*src.fRecord));
    } else {
        fPlayback = NULL;
    }
}

SkPicture::~SkPicture() {
    SkSafeUnref(fRecord);
    SkDELETE(fPlayback);
}

void SkPicture::swap(SkPicture& other) {
    SkTSwap(fRecord, other.fRecord);
    SkTSwap(fPlayback, other.fPlayback);
    SkTSwap(fWidth, other.fWidth);
    SkTSwap(fHeight, other.fHeight);
}

///////////////////////////////////////////////////////////////////////////////

SkCanvas* SkPicture::beginRecording(int width, int height,
                                    uint32_t recordingFlags) {
    if (fPlayback) {
        SkDELETE(fPlayback);
        fPlayback = NULL;
    }

    if (NULL != fRecord) {
        fRecord->unref();
        fRecord = NULL;
    }

    fRecord = SkNEW_ARGS(SkPictureRecord, (recordingFlags));

    fWidth = width;
    fHeight = height;

    SkBitmap bm;
    bm.setConfig(SkBitmap::kNo_Config, width, height);
    fRecord->setBitmapDevice(bm);

    return fRecord;
}

SkCanvas* SkPicture::getRecordingCanvas() const {
    // will be null if we are not recording
    return fRecord;
}

void SkPicture::endRecording() {
    if (NULL == fPlayback) {
        if (NULL != fRecord) {
            fPlayback = SkNEW_ARGS(SkPicturePlayback, (*fRecord));
            fRecord->unref();
            fRecord = NULL;
        }
    }
    SkASSERT(NULL == fRecord);
}

void SkPicture::draw(SkCanvas* surface) {
    this->endRecording();
    if (fPlayback) {
        fPlayback->draw(*surface);
    }
}

///////////////////////////////////////////////////////////////////////////////

#include "SkStream.h"

#define PICTURE_VERSION     1

SkPicture::SkPicture(SkStream* stream) : SkRefCnt() {
    if (stream->readU32() != PICTURE_VERSION) {
        sk_throw();
    }

    fWidth = stream->readU32();
    fHeight = stream->readU32();

    fRecord = NULL;
    fPlayback = NULL;

    if (stream->readBool()) {
        fPlayback = SkNEW_ARGS(SkPicturePlayback, (stream));
    }
}

void SkPicture::serialize(SkWStream* stream) const {
    SkPicturePlayback* playback = fPlayback;

    if (NULL == playback && fRecord) {
        playback = SkNEW_ARGS(SkPicturePlayback, (*fRecord));
    }

    stream->write32(PICTURE_VERSION);
    stream->write32(fWidth);
    stream->write32(fHeight);
    if (playback) {
        stream->writeBool(true);
        playback->serialize(stream);
        // delete playback if it is a local version (i.e. cons'd up just now)
        if (playback != fPlayback) {
            SkDELETE(playback);
        }
    } else {
        stream->writeBool(false);
    }
}

void SkPicture::abortPlayback() {
    if (NULL == fPlayback) {
        return;
    }
    fPlayback->abort();
}


text:
<?php
//
// PHASE: BOOTSTRAP
// Initiating phase.
define('SIMCOE_INSTALL_PATH', dirname(__FILE__));
define('SIMCOE_SITE_PATH', SIMCOE_INSTALL_PATH . '/site');

require(SIMCOE_INSTALL_PATH.'/src/CSimcoe/bootstrap.php');

$sim = CSimcoe::GetInstance();

//
// PHASE: FRONTCONTROLLER ROUTE
// Which controller to use?
$sim->FrontControllerRoute();

//
// PHASE: THEME ENGINE RENDER
// Create end result.
$sim->ThemeEngineRender();

?>


text:
package main

import (
	"fmt"
	"io"
	"os"
	"path/filepath"

	"github.com/pkg/errors"
	"github.com/spf13/cobra"

	"helm.sh/helm/v3/cmd/helm/require"
	"helm.sh/helm/v3/internal/completion"
	"helm.sh/helm/v3/pkg/helmpath"
	"helm.sh/helm/v3/pkg/repo"
)

type repoRemoveOptions struct {
	names     []string
	repoFile  string
	repoCache string
}

func newRepoRemoveCmd(out io.Writer) *cobra.Command {
	o := &repoRemoveOptions{}

	cmd := &cobra.Command{
		Use:     "remove [REPO1 [REPO2 ...]]",
		Aliases: []string{"rm"},
		Short:   "remove one or more chart repositories",
		Args:    require.MinimumNArgs(1),
		RunE: func(cmd *cobra.Command, args []string) error {
			o.repoFile = settings.RepositoryConfig
			o.repoCache = settings.RepositoryCache
			o.names = args
			return o.run(out)
		},
	}

	// Function providing dynamic auto-completion
	completion.RegisterValidArgsFunc(cmd, func(cmd *cobra.Command, args []string, toComplete string) ([]string, completion.BashCompDirective) {
		return compListRepos(toComplete, args), completion.BashCompDirectiveNoFileComp
	})

	return cmd
}

func (o *repoRemoveOptions) run(out io.Writer) error {
	r, err := repo.LoadFile(o.repoFile)
	if isNotExist(err) || len(r.Repositories) == 0 {
		return errors.New("no repositories configured")
	}

	for _, name := range o.names {
		if !r.Remove(name) {
			return errors.Errorf("no repo named %q found", name)
		}
		if err := r.WriteFile(o.repoFile, 0644); err != nil {
			return err
		}

		if err := removeRepoCache(o.repoCache, name); err != nil {
			return err
		}
		fmt.Fprintf(out, "%q has been removed from your repositories\n", name)
	}

	return nil
}

func removeRepoCache(root, name string) error {
	idx := filepath.Join(root, helmpath.CacheChartsFile(name))
	if _, err := os.Stat(idx); err == nil {
		os.Remove(idx)
	}

	idx = filepath.Join(root, helmpath.CacheIndexFile(name))
	if _, err := os.Stat(idx); os.IsNotExist(err) {
		return nil
	} else if err != nil {
		return errors.Wrapf(err, "can't remove index file %s", idx)
	}
	return os.Remove(idx)
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.UI;
using Microsoft.Graphics.Canvas.UI.Xaml;
using System.Numerics;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace OpticalFlow
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        OpticalFlowCamera _flow;
        private DispatcherTimer refresh = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(1.0 / 10.0) };

        public MainPage()
        {
            this.InitializeComponent();
        }

        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            _flow = new OpticalFlowCamera();
            await _flow.initialize(colorPreviewImage);

            refresh.Tick += Refresh_Tick;
            refresh.Start();
        }

        void CanvasControl_Draw(CanvasControl sender, CanvasDrawEventArgs args)
        {
            foreach (var point in _flow.interestPoints)
            {
                args.DrawingSession.DrawCircle(new Vector2((float)point.X, (float)point.Y), 1.0f, Colors.Green);
            }
        }

        private void Refresh_Tick(object sender, object e)
        {
            InterestPointDisplay.Invalidate();
        }
    }
}


text:
const fs = require('fs');
const pathUtil = require('path');
const resolveFrom = require('resolve-from');

const debug = require('debug')('plover-assets:vendor');

const rNamespace = /^@[-\w]+\//;

module.exports = function(app) {
  const settings = app.settings;
  const config = settings.assets || {};
  const vendors = config.vendors;
  if (!vendors) {
    return;
  }

  debug('try load module for assets vendor: %s', vendors);
  for (const item of vendors) {
    loadVendor(app, settings, item);
  }
};

function loadVendor(app, settings, item) {
  item = typeof item === 'string' ? { name: item } : item;
  const path = resolveFrom(
    settings.applicationRoot,
    item.name + '/package.json'
  );
  const root = pathUtil.dirname(path);
  const pkg = require(path);

  const tryPath = pathUtil.join(root, 'dist');
  const dist = item.dist ? pathUtil.join(root, item.dist) :
    isDir(tryPath) ? tryPath : root;

  const info = {
    name: pkg.name.replace(rNamespace, ''),   // remove namespace
    version: pkg.version,
    path: dist,
    assets: true,
    assetsRoot: '',
    reload: false,
    build: false
  };

  debug('try load assets vendor: %o', info);
  app.moduleResolver.pushModule(info);
}

function isDir(path) {
  return fs.existsSync(path) && fs.statSync(path).isDirectory();
}


text:
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

#include "./epoch_time_point.h"

bool is_leap_year(int yy) {
  if ((yy % 4) != 0) {
    // not divisible by 4
    return false;
  }
  // yy = 4x
  if ((yy % 400) == 0) {
    // yy = 400x
    return true;
  }
  // yy = 4x, return true if yy != 100x
  return ((yy % 100) != 0);
}

bool is_last_day_of_month(const EpochTimePoint& tp) {
  int days_in_month[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  if (tp.TmMon() != 1) {
    // not February. Don't worry about leap year
    return (tp.TmMday() == days_in_month[tp.TmMon()]);
  } else if (tp.TmMday() < 28) {
    // this is February, check if the day is 28 or 29
    return false;
  } else if (tp.TmMday() == 29) {
    // Feb 29th
    return true;
  }
  // check if year is non-leap year
  return !is_leap_year(tp.TmYear());
}

extern "C" {

#include <time.h>
#include "./time_constants.h"
#include "./types.h"

#define TIMESTAMP_DIFF_FIXED_UNITS(TYPE, NAME, FROM_MILLIS)                          \
  FORCE_INLINE                                                                       \
  gdv_int32 NAME##_##TYPE##_##TYPE(gdv_##TYPE start_millis, gdv_##TYPE end_millis) { \
    return static_cast<int32_t>(FROM_MILLIS(end_millis - start_millis));             \
  }

#define SIGN_ADJUST_DIFF(is_positive, diff) ((is_positive) ? (diff) : -(diff))
#define MONTHS_TO_TIMEUNIT(diff, num_months) (diff) / (num_months)

// Assuming end_millis > start_millis, the algorithm to find the diff in months is:
// diff_in_months = year_diff * 12 + month_diff
// This is approximately correct, except when the last month has not fully elapsed
//
// a) If end_day > start_day, return diff_in_months     e.g. diff(2015-09-10, 2017-03-31)
// b) If end_day < start_day, return diff_in_months - 1 e.g. diff(2015-09-30, 2017-03-10)
// c) If end_day = start_day, check for millis          e.g. diff(2017-03-10, 2015-03-10)
// Need to check if end_millis_in_day > start_millis_in_day
// c1) If end_millis_in_day >= start_millis_in_day, return diff_in_months
// c2) else return diff_in_months - 1
#define TIMESTAMP_DIFF_MONTH_UNITS(TYPE, NAME, N_MONTHS)                              \
  FORCE_INLINE                                                                        \
  gdv_int32 NAME##_##TYPE##_##TYPE(gdv_##TYPE start_millis, gdv_##TYPE end_millis) {  \
    gdv_int32 diff;                                                                   \
    bool is_positive = (end_millis > start_millis);                                   \
    if (!is_positive) {                                                               \
      /* if end_millis < start_millis, swap and multiply by -1 at the end */          \
      gdv_##TYPE tmp = start_millis;                                                  \
      start_millis = end_millis;                                                      \
      end_millis = tmp;                                                               \
    }                                                                                \
    EpochTimePoint start_tm(start_millis);                                            \
    EpochTimePoint end_tm(end_millis);                                                \
    gdv_int32 months_diff;                                                            \
    months_diff = static_cast<gdv_int32>(12 * (end_tm.TmYear() - start_tm.TmYear()) + \
                                         (end_tm.TmMon() - start_tm.TmMon()));        \
    if (end_tm.TmMday() > start_tm.TmMday()) {                                        \
      /* case a */                                                                    \
      diff = MONTHS_TO_TIMEUNIT(months_diff, N_MONTHS);                               \
      return SIGN_ADJUST_DIFF(is_positive, diff);                                     \
    }                                                                                \
    if (end_tm.TmMday() < start_tm.TmMday()) {                                        \
      /* case b */                                                                    \
      months_diff += (is_last_day_of_month(end_tm) ? 1 : 0);                          \
      diff = MONTHS_TO_TIMEUNIT(months_diff - 1, N_MONTHS);                           \
      return SIGN_ADJUST_DIFF(is_positive, diff);                                     \
    }                                                                                \
    gdv_int32 end_day_millis =                                                        \
        static_cast<gdv_int32>(end_tm.TmHour() * MILLIS_IN_HOUR +                     \
                               end_tm.TmMin() * MILLIS_IN_MIN + end_tm.TmSec());      \
    gdv_int32 start_day_millis =                                                      \
        static_cast<gdv_int32>(start_tm.TmHour() * MILLIS_IN_HOUR +                   \
                               start_tm.TmMin() * MILLIS_IN_MIN + start_tm.TmSec());  \
    if (end_day_millis >= start_day_millis) {                                         \
      /* case c1 */                                                                   \
      diff = MONTHS_TO_TIMEUNIT(months_diff, N_MONTHS);                               \
      return SIGN_ADJUST_DIFF(is_positive, diff);                                     \
    }                                                                                \
    /* case c2 */                                                                     \
    diff = MONTHS_TO_TIMEUNIT(months_diff - 1, N_MONTHS);                             \
    return SIGN_ADJUST_DIFF(is_positive, diff);                                       \
  }

#define TIMESTAMP_DIFF(TYPE)                                            \
  TIMESTAMP_DIFF_FIXED_UNITS(TYPE, timestampdiffSecond, MILLIS_TO_SEC)  \
  TIMESTAMP_DIFF_FIXED_UNITS(TYPE, timestampdiffMinute, MILLIS_TO_MINS) \
  TIMESTAMP_DIFF_FIXED_UNITS(TYPE, timestampdiffHour, MILLIS_TO_HOUR)   \
  TIMESTAMP_DIFF_FIXED_UNITS(TYPE, timestampdiffDay, MILLIS_TO_DAY)     \
  TIMESTAMP_DIFF_FIXED_UNITS(TYPE, timestampdiffWeek, MILLIS_TO_WEEK)   \
  TIMESTAMP_DIFF_MONTH_UNITS(TYPE, timestampdiffMonth, 1)               \
  TIMESTAMP_DIFF_MONTH_UNITS(TYPE, timestampdiffQuarter, 3)             \
  TIMESTAMP_DIFF_MONTH_UNITS(TYPE, timestampdiffYear, 12)

TIMESTAMP_DIFF(timestamp)

#define ADD_INT32_TO_TIMESTAMP_FIXED_UNITS(TYPE, NAME, TO_MILLIS)      \
  FORCE_INLINE                                                         \
  gdv_##TYPE NAME##_int32_##TYPE(gdv_int32 count, gdv_##TYPE millis) { \
    return millis + TO_MILLIS * static_cast<gdv_##TYPE>(count);        \
  }

// Documentation of mktime suggests that it handles
// TmMon() being negative, and also TmMon() being >= 12 by
// adjusting TmYear() accordingly
//
// Using gmtime_r() and timegm() instead of localtime_r() and mktime()
// since the input millis are since epoch
#define ADD_INT32_TO_TIMESTAMP_MONTH_UNITS(TYPE, NAME, N_MONTHS)                \
  FORCE_INLINE                                                                  \
  gdv_##TYPE NAME##_int32_##TYPE(gdv_int32 count, gdv_##TYPE millis) {          \
    EpochTimePoint tp(millis);                                                  \
    return tp.AddMonths(static_cast<int>(count * N_MONTHS)).MillisSinceEpoch(); \
  }

// TODO: Handle overflow while converting gdv_int64 to millis
#define ADD_INT64_TO_TIMESTAMP_FIXED_UNITS(TYPE, NAME, TO_MILLIS)      \
  FORCE_INLINE                                                         \
  gdv_##TYPE NAME##_int64_##TYPE(gdv_int64 count, gdv_##TYPE millis) { \
    return millis + TO_MILLIS * static_cast<gdv_##TYPE>(count);        \
  }

#define ADD_INT64_TO_TIMESTAMP_MONTH_UNITS(TYPE, NAME, N_MONTHS)                \
  FORCE_INLINE                                                                  \
  gdv_##TYPE NAME##_int64_##TYPE(gdv_int64 count, gdv_##TYPE millis) {          \
    EpochTimePoint tp(millis);                                                  \
    return tp.AddMonths(static_cast<int>(count * N_MONTHS)).MillisSinceEpoch(); \
  }

#define ADD_TIMESTAMP_TO_INT32_FIXED_UNITS(TYPE, NAME, TO_MILLIS)        \
  FORCE_INLINE                                                           \
  gdv_##TYPE NAME##_##TYPE##_int32(gdv_##TYPE millis, gdv_int32 count) { \
    return millis + TO_MILLIS * static_cast<gdv_##TYPE>(count);          \
  }

#define ADD_TIMESTAMP_TO_INT64_FIXED_UNITS(TYPE, NAME, TO_MILLIS)        \
  FORCE_INLINE                                                           \
  gdv_##TYPE NAME##_##TYPE##_int64(gdv_##TYPE millis, gdv_int64 count) { \
    return millis + TO_MILLIS * static_cast<gdv_##TYPE>(count);          \
  }

#define TIMESTAMP_ADD_INT32(TYPE)                                             \
  ADD_INT32_TO_TIMESTAMP_FIXED_UNITS(TYPE, timestampaddSecond, MILLIS_IN_SEC) \
  ADD_INT32_TO_TIMESTAMP_FIXED_UNITS(TYPE, timestampaddMinute, MILLIS_IN_MIN) \
  ADD_INT32_TO_TIMESTAMP_FIXED_UNITS(TYPE, timestampaddHour, MILLIS_IN_HOUR)  \
  ADD_INT32_TO_TIMESTAMP_FIXED_UNITS(TYPE, timestampaddDay, MILLIS_IN_DAY)    \
  ADD_INT32_TO_TIMESTAMP_FIXED_UNITS(TYPE, timestampaddWeek, MILLIS_IN_WEEK)  \
  ADD_INT32_TO_TIMESTAMP_MONTH_UNITS(TYPE, timestampaddMonth, 1)              \
  ADD_INT32_TO_TIMESTAMP_MONTH_UNITS(TYPE, timestampaddQuarter, 3)            \
  ADD_INT32_TO_TIMESTAMP_MONTH_UNITS(TYPE, timestampaddYear, 12)

#define TIMESTAMP_ADD_INT64(TYPE)                                             \
  ADD_INT64_TO_TIMESTAMP_FIXED_UNITS(TYPE, timestampaddSecond, MILLIS_IN_SEC) \
  ADD_INT64_TO_TIMESTAMP_FIXED_UNITS(TYPE, timestampaddMinute, MILLIS_IN_MIN) \
  ADD_INT64_TO_TIMESTAMP_FIXED_UNITS(TYPE, timestampaddHour, MILLIS_IN_HOUR)  \
  ADD_INT64_TO_TIMESTAMP_FIXED_UNITS(TYPE, timestampaddDay, MILLIS_IN_DAY)    \
  ADD_INT64_TO_TIMESTAMP_FIXED_UNITS(TYPE, timestampaddWeek, MILLIS_IN_WEEK)  \
  ADD_INT64_TO_TIMESTAMP_MONTH_UNITS(TYPE, timestampaddMonth, 1)              \
  ADD_INT64_TO_TIMESTAMP_MONTH_UNITS(TYPE, timestampaddQuarter, 3)            \
  ADD_INT64_TO_TIMESTAMP_MONTH_UNITS(TYPE, timestampaddYear, 12)

#define TIMESTAMP_ADD_INT(TYPE) \
  TIMESTAMP_ADD_INT32(TYPE)     \
  TIMESTAMP_ADD_INT64(TYPE)

TIMESTAMP_ADD_INT(date64)
TIMESTAMP_ADD_INT(timestamp)

// add gdv_int32 to timestamp
ADD_INT32_TO_TIMESTAMP_FIXED_UNITS(date64, date_add, MILLIS_IN_DAY)
ADD_INT32_TO_TIMESTAMP_FIXED_UNITS(date64, add, MILLIS_IN_DAY)
ADD_INT32_TO_TIMESTAMP_FIXED_UNITS(timestamp, date_add, MILLIS_IN_DAY)
ADD_INT32_TO_TIMESTAMP_FIXED_UNITS(timestamp, add, MILLIS_IN_DAY)

// add gdv_int64 to timestamp
ADD_INT64_TO_TIMESTAMP_FIXED_UNITS(date64, date_add, MILLIS_IN_DAY)
ADD_INT64_TO_TIMESTAMP_FIXED_UNITS(date64, add, MILLIS_IN_DAY)
ADD_INT64_TO_TIMESTAMP_FIXED_UNITS(timestamp, date_add, MILLIS_IN_DAY)
ADD_INT64_TO_TIMESTAMP_FIXED_UNITS(timestamp, add, MILLIS_IN_DAY)

// date_sub, subtract, date_diff on gdv_int32
ADD_TIMESTAMP_TO_INT32_FIXED_UNITS(date64, date_sub, -1 * MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT32_FIXED_UNITS(date64, subtract, -1 * MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT32_FIXED_UNITS(date64, date_diff, -1 * MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT32_FIXED_UNITS(timestamp, date_sub, -1 * MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT32_FIXED_UNITS(timestamp, subtract, -1 * MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT32_FIXED_UNITS(timestamp, date_diff, -1 * MILLIS_IN_DAY)

// date_sub, subtract, date_diff on gdv_int64
ADD_TIMESTAMP_TO_INT64_FIXED_UNITS(date64, date_sub, -1 * MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT64_FIXED_UNITS(date64, subtract, -1 * MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT64_FIXED_UNITS(date64, date_diff, -1 * MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT64_FIXED_UNITS(timestamp, date_sub, -1 * MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT64_FIXED_UNITS(timestamp, subtract, -1 * MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT64_FIXED_UNITS(timestamp, date_diff, -1 * MILLIS_IN_DAY)

// add timestamp to gdv_int32
ADD_TIMESTAMP_TO_INT32_FIXED_UNITS(date64, date_add, MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT32_FIXED_UNITS(date64, add, MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT32_FIXED_UNITS(timestamp, date_add, MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT32_FIXED_UNITS(timestamp, add, MILLIS_IN_DAY)

// add timestamp to gdv_int64
ADD_TIMESTAMP_TO_INT64_FIXED_UNITS(date64, date_add, MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT64_FIXED_UNITS(date64, add, MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT64_FIXED_UNITS(timestamp, date_add, MILLIS_IN_DAY)
ADD_TIMESTAMP_TO_INT64_FIXED_UNITS(timestamp, add, MILLIS_IN_DAY)

}  // extern "C"


text:
module app.domain {
    export interface IMovie {
        director: string;
        imageurl: string;
        movieId: number;
        mpaa: string;
        releaseDate: string;
        title: string;
    }

    export class Movie implements IMovie {
        constructor(public director: string,
                    public imageurl: string,
                    public movieId: number,
                    public mpaa: string,
                    public releaseDate: string,
                    public title: string) {
        }
    }
}


text:
#ifndef SRC_TRACE_PROCESSOR_DYNAMIC_EXPERIMENTAL_FLAMEGRAPH_GENERATOR_H_
#define SRC_TRACE_PROCESSOR_DYNAMIC_EXPERIMENTAL_FLAMEGRAPH_GENERATOR_H_

#include "src/trace_processor/sqlite/db_sqlite_table.h"

#include "src/trace_processor/storage/trace_storage.h"

namespace perfetto {
namespace trace_processor {

class TraceProcessorContext;

class ExperimentalFlamegraphGenerator
    : public DbSqliteTable::DynamicTableGenerator {
 public:
  struct InputValues {
    int64_t ts;
    UniquePid upid;
    std::string profile_type;
    std::string focus_str;
  };

  explicit ExperimentalFlamegraphGenerator(TraceProcessorContext* context);
  virtual ~ExperimentalFlamegraphGenerator() override;

  Table::Schema CreateSchema() override;
  std::string TableName() override;
  uint32_t EstimateRowCount() override;
  util::Status ValidateConstraints(const QueryConstraints&) override;
  std::unique_ptr<Table> ComputeTable(const std::vector<Constraint>& cs,
                                      const std::vector<Order>& ob) override;

 private:
  TraceProcessorContext* context_ = nullptr;
};

}  // namespace trace_processor
}  // namespace perfetto

#endif  // SRC_TRACE_PROCESSOR_DYNAMIC_EXPERIMENTAL_FLAMEGRAPH_GENERATOR_H_


text:
package middleware // import "github.com/docker/docker/api/server/middleware"

import (
	"net/http"

	"golang.org/x/net/context"
)

// Middleware is an interface to allow the use of ordinary functions as Docker API filters.
// Any struct that has the appropriate signature can be registered as a middleware.
type Middleware interface {
	WrapHandler(func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error) func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error
}


text:
import convert from './convert';

/**
 * Parse a `default` tag returning an empty object when no default is given.
 * If the default value appears to be a templated string, also return an
 * empty object.
 */
export default function defaultValue(type, value) {
    if (value.length > 0) {
        if (value.text().substr(0, 2) !== '{{' || value.text().substr(Math.max(0, value.text().length - 2)) !== '}}') {
            return {value: convert(type, value.text())};
        }
        const defstr = '__default__';
        const converted = convert(type, defstr);
        if (converted === defstr) {
            return {value: converted};
        }
    }
    return {};
}


text:
package io.warp10.script.functions;

import io.warp10.script.WarpScriptException;
import io.warp10.script.WarpScriptStack;

public class ENDVECTOR extends ENDLIST {

  private static final TOVECTOR tv = new TOVECTOR("");

  public ENDVECTOR(String name) {
    super(name);
  }

  @Override
  public Object apply(WarpScriptStack stack) throws WarpScriptException {
    super.apply(stack);
    tv.apply(stack);
    return stack;
  }
}


text:
/*
 * Copyright 1999-2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.sun.org.apache.xerces.internal.parsers;

import java.io.IOException;

import com.sun.org.apache.xerces.internal.impl.Constants;
import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager;
import com.sun.org.apache.xerces.internal.xni.XNIException;
import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration;

import org.xml.sax.SAXNotSupportedException;
import org.xml.sax.SAXNotRecognizedException;

/**
 * Base class of all XML-related parsers.
 *

 * In addition to the features and properties recognized by the parser
 * configuration, this parser recognizes these additional features and
 * properties:
 *

 *
Properties
 *

 *
http://apache.org/xml/properties/internal/error-handler

 *
http://apache.org/xml/properties/internal/entity-resolver

 *

 *

 *
 * @author Arnaud  Le Hors, IBM
 * @author Andy Clark, IBM
 *
 * @version $Id: XMLParser.java,v 1.5 2007/07/20 14:11:21 spericas Exp $
 */
public abstract class XMLParser {

    //
    // Constants
    //

    // properties

    /** Property identifier: entity resolver. */
    protected static final String ENTITY_RESOLVER =
        Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;

    /** Property identifier: error handler. */
    protected static final String ERROR_HANDLER =
        Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;

    /** Recognized properties. */
    private static final String[] RECOGNIZED_PROPERTIES = {
        ENTITY_RESOLVER,
        ERROR_HANDLER,
    };

    //
    // Data
    //

    /** The parser configuration. */
    protected XMLParserConfiguration fConfiguration;

    /** The XML Security Manager. */
    XMLSecurityManager securityManager;

    /** The XML Security Property Manager. */
    XMLSecurityPropertyManager securityPropertyManager;

    //
    // Constructors
    //

    /**
     * Query the state of a feature.
     */
    public boolean getFeature(String featureId)
            throws SAXNotSupportedException, SAXNotRecognizedException {
        return fConfiguration.getFeature(featureId);

    }

    /**
     * Default Constructor.
     */
    protected XMLParser(XMLParserConfiguration config) {

        // save configuration
        fConfiguration = config;

        // add default recognized properties
        fConfiguration.addRecognizedProperties(RECOGNIZED_PROPERTIES);

    } // <init>(XMLParserConfiguration)

    //
    // Public methods
    //

    /**
     * parse
     *
     * @param inputSource
     *
     * @exception XNIException
     * @exception java.io.IOException
     */
    public void parse(XMLInputSource inputSource)
        throws XNIException, IOException {
        // null indicates that the parser is called directly, initialize them
        if (securityManager == null) {
            securityManager = new XMLSecurityManager(true);
            fConfiguration.setProperty(Constants.SECURITY_MANAGER, securityManager);
        }
        if (securityPropertyManager == null) {
            securityPropertyManager = new XMLSecurityPropertyManager();
            fConfiguration.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager);
        }

        reset();
        fConfiguration.parse(inputSource);

    } // parse(XMLInputSource)

    //
    // Protected methods
    //

    /**
     * reset all components before parsing
     */
    protected void reset() throws XNIException {
    } // reset()

} // class XMLParser


text:
module.exports = function(type, x, y, opts) {
    var fullOpts = {
        bubbles: true,
        clientX: x,
        clientY: y
    };

    // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent
    if(opts && opts.buttons) {
        fullOpts.buttons = opts.buttons;
    }
    if(opts && opts.altKey) {
        fullOpts.altKey = opts.altKey;
    }
    if(opts && opts.ctrlKey) {
        fullOpts.ctrlKey = opts.ctrlKey;
    }
    if(opts && opts.metaKey) {
        fullOpts.metaKey = opts.metaKey;
    }
    if(opts && opts.shiftKey) {
        fullOpts.shiftKey = opts.shiftKey;
    }

    var el = (opts && opts.element) || document.elementFromPoint(x, y),
        ev;

    if(type === 'scroll') {
        ev = new window.WheelEvent('wheel', opts);
    } else {
        ev = new window.MouseEvent(type, fullOpts);
    }

    el.dispatchEvent(ev);

    return el;
};


text:
Body::Body(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
}

void Body::start() {
  QString result = page()->currentFrame()->toHtml();
  emit finished(new Response(true, result));
}


text:
#include "dart/gui/osg/GridVisual.hpp"

#include <osg/Depth>

#include "dart/dynamics/BodyNode.hpp"
#include "dart/dynamics/SimpleFrame.hpp"
#include "dart/dynamics/Skeleton.hpp"
#include "dart/dynamics/SphereShape.hpp"
#include "dart/gui/osg/Utils.hpp"
#include "dart/math/Helpers.hpp"

namespace dart {
namespace gui {
namespace osg {

//==============================================================================
GridVisual::GridVisual()
{
  initialize();
}

//==============================================================================
void GridVisual::setNumCells(std::size_t cells)
{
  if (mNumCells == cells)
    return;

  mNumCells = cells;
  mNeedUpdate = true;
}

//==============================================================================
std::size_t GridVisual::getNumCells() const
{
  return mNumCells;
}

//==============================================================================
void GridVisual::setMinorLineStepSize(double size)
{
  if (std::abs(mMinorLineStepSize - size) < 1e-6)
    return;

  if (size < 0.0)
    size = 0.0;

  mMinorLineStepSize = size;
  mNeedUpdate = true;
}

//==============================================================================
double GridVisual::getMinorLineStepSize() const
{
  return mMinorLineStepSize;
}

//==============================================================================
void GridVisual::setNumMinorLinesPerMajorLine(std::size_t size)
{
  if (mNumMinorLinesPerMajorLine == size)
    return;

  mNumMinorLinesPerMajorLine = size;
  mNeedUpdate = true;
}

//==============================================================================
std::size_t GridVisual::getNumMinorLinesPerMajorLine() const
{
  return mNumMinorLinesPerMajorLine;
}

//==============================================================================
void GridVisual::setPlaneType(GridVisual::PlaneType type)
{
  if (mPlaneType == type)
    return;

  mPlaneType = type;
  mNeedUpdate = true;
}

//==============================================================================
GridVisual::PlaneType GridVisual::getPlaneType() const
{
  return mPlaneType;
}

//==============================================================================
void GridVisual::setOffset(const Eigen::Vector3d& offset)
{
  if (mOffset.isApprox(offset))
    return;

  mOffset = offset;
  mNeedUpdate = true;
}

//==============================================================================
const Eigen::Vector3d& GridVisual::getOffset() const
{
  return mOffset;
}

//==============================================================================
void GridVisual::display(bool display)
{
  if (mDisplayGrid == display)
    return;

  mDisplayGrid = display;

  if (mDisplayGrid)
    addChild(mGeode);
  else
    removeChild(mGeode);
}

//==============================================================================
bool GridVisual::isDisplayed() const
{
  return mDisplayGrid;
}

//==============================================================================
void GridVisual::setMajorLineColor(const Eigen::Vector4d& color)
{
  assert(mMajorLineColor->size() == 1);
  mMajorLineColor->at(0) = ::osg::Vec4(
      static_cast<float>(color[0]),
      static_cast<float>(color[1]),
      static_cast<float>(color[2]),
      static_cast<float>(color[3]));
  mMajorLineGeom->setColorArray(mMajorLineColor, ::osg::Array::BIND_OVERALL);
}

//==============================================================================
Eigen::Vector4d GridVisual::getMajorLineColor() const
{
  const ::osg::Vec4& c = mMajorLineColor->at(0);
  return Eigen::Vector4f(c[0], c[1], c[2], c[3]).cast<double>();
}

//==============================================================================
void GridVisual::setMinorLineColor(const Eigen::Vector4d& color)
{
  assert(mMinorLineColor->size() == 1);
  mMinorLineColor->at(0) = ::osg::Vec4(
      static_cast<float>(color[0]),
      static_cast<float>(color[1]),
      static_cast<float>(color[2]),
      static_cast<float>(color[3]));
  mMinorLineGeom->setColorArray(mMinorLineColor, ::osg::Array::BIND_OVERALL);
}

//==============================================================================
Eigen::Vector4d GridVisual::getMinorLineColor() const
{
  const ::osg::Vec4& c = mMinorLineColor->at(0);
  return Eigen::Vector4f(c[0], c[1], c[2], c[3]).cast<double>();
}

//==============================================================================
void GridVisual::setAxisLineWidth(float width)
{
  if (width < 1)
    width = 1;

  mAxisLineWidth->setWidth(width);
  mAxisLineGeom->getOrCreateStateSet()->setAttributeAndModes(mAxisLineWidth);
}

//==============================================================================
float GridVisual::getAxisLineWidth() const
{
  return mAxisLineWidth->getWidth();
}

//==============================================================================
void GridVisual::setMajorLineWidth(float width)
{
  if (width < 1)
    width = 1;

  mMajorLineWidth->setWidth(width);
  mMinorLineGeom->getOrCreateStateSet()->setAttributeAndModes(mMinorLineWidth);
}

//==============================================================================
float GridVisual::getMajorLineWidth() const
{
  return mMajorLineWidth->getWidth();
}

//==============================================================================
void GridVisual::setMinorLineWidth(float width)
{
  if (width < 1)
    width = 1;

  mMinorLineWidth->setWidth(width);
  mMajorLineGeom->getOrCreateStateSet()->setAttributeAndModes(mMajorLineWidth);
}

//==============================================================================
float GridVisual::getMinorLineWidth() const
{
  return mMinorLineWidth->getWidth();
}

//==============================================================================
::osg::Vec3 toVec3(const Eigen::Vector3d& point)
{
  return ::osg::Vec3(
      static_cast<float>(point.x()),
      static_cast<float>(point.y()),
      static_cast<float>(point.z()));
}

//==============================================================================
void setVertices(
    ::osg::Vec3Array* axisLineVertices,
    ::osg::Vec3Array* majorLineVertices,
    ::osg::Vec3Array* minorLineVertices,
    std::size_t numCells,
    std::size_t numMinorLinesPerMajorLine,
    float stepSize,
    GridVisual::PlaneType planeType,
    const Eigen::Vector3d& offset)
{
  assert(axisLineVertices);
  assert(majorLineVertices);
  assert(minorLineVertices);

  int axis1 = 0;
  int axis2 = 1;

  switch (planeType)
  {
    case GridVisual::PlaneType::XY: {
      axis1 = 0;
      axis2 = 1;
      break;
    }
    case GridVisual::PlaneType::YZ: {
      axis1 = 1;
      axis2 = 2;
      break;
    }
    case GridVisual::PlaneType::ZX: {
      axis1 = 2;
      axis2 = 0;
      break;
    }
  }

  const std::size_t numAxisLineVertices = 5;
  const std::size_t numMajorLineVertices
      = numMinorLinesPerMajorLine > 0
            ? 8 * (numCells / numMinorLinesPerMajorLine)
            : 0;
  const std::size_t numMinorLineVertices = 8 * numCells - numMajorLineVertices;

  axisLineVertices->clear();
  axisLineVertices->reserve(numAxisLineVertices);
  majorLineVertices->clear();
  majorLineVertices->reserve(numMajorLineVertices);
  minorLineVertices->clear();
  minorLineVertices->reserve(numMinorLineVertices);

  const auto posInAxis1 = numCells * stepSize;
  const auto axis1Negative = -posInAxis1;
  const auto axis1Positive = +posInAxis1;

  ::osg::Vec3 vec3;
  const ::osg::Vec3 osgOffset = toVec3(offset);

  //----------------
  // Axis Vertices
  //----------------

  // Origin
  axisLineVertices->push_back(vec3 + osgOffset);

  // Axis1 positive
  vec3[axis1] = posInAxis1;
  axisLineVertices->push_back(vec3 + osgOffset);

  // Axis1 negative
  vec3[axis1] = -posInAxis1;
  axisLineVertices->push_back(vec3 + osgOffset);
  vec3[axis1] = 0;

  // Axis2 positive
  vec3[axis2] = posInAxis1;
  axisLineVertices->push_back(vec3 + osgOffset);

  // Axis2 negative
  vec3[axis2] = -posInAxis1;
  axisLineVertices->push_back(vec3 + osgOffset);
  vec3[axis2] = 0;

  //-------------------------------
  // Major and minor line vertices
  //-------------------------------

  for (auto i = 1u; i < numCells + 1; ++i)
  {
    const float posInAxis2 = stepSize * i;

    const auto axis2Negative = -posInAxis2;
    const auto axis2Positive = +posInAxis2;

    if (numMinorLinesPerMajorLine > 0 && i % numMinorLinesPerMajorLine == 0)
    {
      vec3[axis1] = axis1Negative;
      vec3[axis2] = axis2Positive;
      majorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis1] = axis1Positive;
      vec3[axis2] = axis2Positive;
      majorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis1] = axis1Negative;
      vec3[axis2] = axis2Negative;
      majorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis1] = axis1Positive;
      vec3[axis2] = axis2Negative;
      majorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis2] = axis1Negative;
      vec3[axis1] = axis2Positive;
      majorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis2] = axis1Positive;
      vec3[axis1] = axis2Positive;
      majorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis2] = axis1Negative;
      vec3[axis1] = axis2Negative;
      majorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis2] = axis1Positive;
      vec3[axis1] = axis2Negative;
      majorLineVertices->push_back(vec3 + osgOffset);
    }
    else
    {
      vec3[axis1] = axis1Negative;
      vec3[axis2] = axis2Positive;
      minorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis1] = axis1Positive;
      vec3[axis2] = axis2Positive;
      minorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis1] = axis1Negative;
      vec3[axis2] = axis2Negative;
      minorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis1] = axis1Positive;
      vec3[axis2] = axis2Negative;
      minorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis2] = axis1Negative;
      vec3[axis1] = axis2Positive;
      minorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis2] = axis1Positive;
      vec3[axis1] = axis2Positive;
      minorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis2] = axis1Negative;
      vec3[axis1] = axis2Negative;
      minorLineVertices->push_back(vec3 + osgOffset);

      vec3[axis2] = axis1Positive;
      vec3[axis1] = axis2Negative;
      minorLineVertices->push_back(vec3 + osgOffset);
    }
  }
}

//==============================================================================
void GridVisual::refresh()
{
  if (!mNeedUpdate)
    return;

  if (mDisplayGrid)
  {
    setVertices(
        mAxisLineVertices,
        mMajorLineVertices,
        mMinorLineVertices,
        mNumCells,
        mNumMinorLinesPerMajorLine,
        static_cast<float>(mMinorLineStepSize),
        mPlaneType,
        mOffset);

    mMajorLineFaces->clear();
    mMajorLineFaces->reserve(mMajorLineVertices->size());
    for (auto i = 0u; i < mMajorLineVertices->size(); ++i)
      mMajorLineFaces->push_back(i);

    mMinorLineFaces->clear();
    mMinorLineFaces->reserve(mMinorLineVertices->size());
    for (auto i = 0u; i < mMinorLineVertices->size(); ++i)
      mMinorLineFaces->push_back(i);

    mMinorLineGeom->setVertexArray(mMinorLineVertices);
    mMinorLineGeom->getOrCreateStateSet()->setAttributeAndModes(
        mMinorLineWidth);
    mMinorLineGeom->setPrimitiveSet(0, mMinorLineFaces);
    if (mMinorLineColor->at(0).a() < 1 - getAlphaThreshold<float>())
    {
      mMinorLineGeom->getOrCreateStateSet()->setMode(
          GL_BLEND, ::osg::StateAttribute::ON);
      mMinorLineGeom->getOrCreateStateSet()->setRenderingHint(
          ::osg::StateSet::TRANSPARENT_BIN);
      ::osg::ref_ptr<::osg::Depth> depth = new ::osg::Depth;
      depth->setWriteMask(false);
      mMinorLineGeom->getOrCreateStateSet()->setAttributeAndModes(
          depth, ::osg::StateAttribute::ON);
    }
    else
    {
      mMinorLineGeom->getOrCreateStateSet()->setMode(
          GL_BLEND, ::osg::StateAttribute::OFF);
      mMinorLineGeom->getOrCreateStateSet()->setRenderingHint(
          ::osg::StateSet::OPAQUE_BIN);
      ::osg::ref_ptr<::osg::Depth> depth = new ::osg::Depth;
      depth->setWriteMask(true);
      mMinorLineGeom->getOrCreateStateSet()->setAttributeAndModes(
          depth, ::osg::StateAttribute::ON);
    }

    mMajorLineGeom->setVertexArray(mMajorLineVertices);
    mMajorLineGeom->getOrCreateStateSet()->setAttributeAndModes(
        mMajorLineWidth);
    mMajorLineGeom->setPrimitiveSet(0, mMajorLineFaces);
    if (mMajorLineColor->at(0).a() < 1 - getAlphaThreshold<float>())
    {
      mMajorLineGeom->getOrCreateStateSet()->setMode(
          GL_BLEND, ::osg::StateAttribute::ON);
      mMajorLineGeom->getOrCreateStateSet()->setRenderingHint(
          ::osg::StateSet::TRANSPARENT_BIN);
      ::osg::ref_ptr<::osg::Depth> depth = new ::osg::Depth;
      depth->setWriteMask(false);
      mMajorLineGeom->getOrCreateStateSet()->setAttributeAndModes(
          depth, ::osg::StateAttribute::ON);
    }
    else
    {
      mMajorLineGeom->getOrCreateStateSet()->setMode(
          GL_BLEND, ::osg::StateAttribute::OFF);
      mMajorLineGeom->getOrCreateStateSet()->setRenderingHint(
          ::osg::StateSet::OPAQUE_BIN);
      ::osg::ref_ptr<::osg::Depth> depth = new ::osg::Depth;
      depth->setWriteMask(true);
      mMajorLineGeom->getOrCreateStateSet()->setAttributeAndModes(
          depth, ::osg::StateAttribute::ON);
    }

    static const ::osg::Vec4 xAxisLineColor(0.9f, 0.1f, 0.1f, 1.0f);
    static const ::osg::Vec4 yAxisLineColor(0.1f, 0.9f, 0.1f, 1.0f);
    static const ::osg::Vec4 zAxisLineColor(0.1f, 0.1f, 0.9f, 1.0f);

    switch (mPlaneType)
    {
      case GridVisual::PlaneType::XY: {
        mAxisLineColor->at(0) = xAxisLineColor;
        mAxisLineColor->at(2) = yAxisLineColor;
        break;
      }
      case GridVisual::PlaneType::YZ: {
        mAxisLineColor->at(0) = yAxisLineColor;
        mAxisLineColor->at(2) = zAxisLineColor;
        break;
      }
      case GridVisual::PlaneType::ZX: {
        mAxisLineColor->at(0) = zAxisLineColor;
        mAxisLineColor->at(2) = xAxisLineColor;
        break;
      }
    }

    mAxisLineGeom->setColorArray(mAxisLineColor);
  }

  mNeedUpdate = false;
}

//==============================================================================
void GridVisual::initialize()
{
  mNeedUpdate = true;

  mDisplayGrid = true;

  mPlaneType = PlaneType::XY;
  mNumCells = 20;
  mMinorLineStepSize = 0.1;
  mNumMinorLinesPerMajorLine = 5;

  mOffset = Eigen::Vector3d::Zero();

  mGeode = new ::osg::Geode;
  mGeode->getOrCreateStateSet()->setMode(
      GL_LIGHTING, ::osg::StateAttribute::OFF);
  addChild(mGeode);

  mMinorLineGeom = new ::osg::Geometry;
  mMajorLineGeom = new ::osg::Geometry;
  mAxisLineGeom = new ::osg::Geometry;
  mGeode->addDrawable(mMinorLineGeom);
  mGeode->addDrawable(mMajorLineGeom);
  mGeode->addDrawable(mAxisLineGeom);

  mMinorLineVertices = new ::osg::Vec3Array;
  mMinorLineGeom->setVertexArray(mMinorLineVertices);
  mMinorLineGeom->setDataVariance(::osg::Object::STATIC);

  mMajorLineVertices = new ::osg::Vec3Array;
  mMajorLineGeom->setVertexArray(mMajorLineVertices);
  mMajorLineGeom->setDataVariance(::osg::Object::STATIC);

  mAxisLineVertices = new ::osg::Vec3Array;
  mAxisLineGeom->setVertexArray(mAxisLineVertices);
  mAxisLineGeom->setDataVariance(::osg::Object::STATIC);
  mAxisLineGeom->getOrCreateStateSet()->setMode(
      GL_BLEND, ::osg::StateAttribute::OFF);
  mAxisLineGeom->getOrCreateStateSet()->setRenderingHint(
      ::osg::StateSet::OPAQUE_BIN);

  // Set grid color
  static const ::osg::Vec4 majorLineColor(0.4f, 0.4f, 0.4f, 1.0f);
  static const ::osg::Vec4 minorLineColor(0.5f, 0.5f, 0.5f, 1.0f);

  mAxisLineColor = new ::osg::Vec4Array;
  mAxisLineColor->resize(4);
  mAxisLineColor->at(0) = majorLineColor; // will be set on the fly
  mAxisLineColor->at(1) = majorLineColor;
  mAxisLineColor->at(2) = majorLineColor; // will be set on the fly
  mAxisLineColor->at(3) = majorLineColor;
  mAxisLineGeom->setColorArray(mAxisLineColor);
  mAxisLineGeom->setColorBinding(::osg::Geometry::BIND_PER_PRIMITIVE_SET);

  mMajorLineColor = new ::osg::Vec4Array;
  mMajorLineColor->resize(1);
  mMajorLineColor->at(0) = majorLineColor;
  mMajorLineGeom->setColorArray(mMajorLineColor);
  mMajorLineGeom->setColorBinding(::osg::Geometry::BIND_OVERALL);

  mMinorLineColor = new ::osg::Vec4Array;
  mMinorLineColor->resize(1);
  mMinorLineColor->at(0) = minorLineColor;
  mMinorLineGeom->setColorArray(mMinorLineColor);
  mMinorLineGeom->setColorBinding(::osg::Geometry::BIND_OVERALL);

  mMinorLineFaces = new ::osg::DrawElementsUInt(::osg::PrimitiveSet::LINES, 0);
  mMinorLineGeom->addPrimitiveSet(mMinorLineFaces);

  mMajorLineFaces = new ::osg::DrawElementsUInt(::osg::PrimitiveSet::LINES, 0);
  mMajorLineGeom->addPrimitiveSet(mMajorLineFaces);

  mAxis1PositiveFaces
      = new ::osg::DrawElementsUInt(::osg::PrimitiveSet::LINES, 0);
  mAxis1NegativeFaces
      = new ::osg::DrawElementsUInt(::osg::PrimitiveSet::LINES, 0);
  mAxis2PositiveFaces
      = new ::osg::DrawElementsUInt(::osg::PrimitiveSet::LINES, 0);
  mAxis2NegativeFaces
      = new ::osg::DrawElementsUInt(::osg::PrimitiveSet::LINES, 0);
  mAxis1PositiveFaces->resize(2);
  mAxis1NegativeFaces->resize(2);
  mAxis2PositiveFaces->resize(2);
  mAxis2NegativeFaces->resize(2);
  mAxis1PositiveFaces->at(0) = 0;
  mAxis1PositiveFaces->at(1) = 1;
  mAxis1NegativeFaces->at(0) = 0;
  mAxis1NegativeFaces->at(1) = 2;
  mAxis2PositiveFaces->at(0) = 0;
  mAxis2PositiveFaces->at(1) = 3;
  mAxis2NegativeFaces->at(0) = 0;
  mAxis2NegativeFaces->at(1) = 4;
  mAxisLineGeom->addPrimitiveSet(mAxis1PositiveFaces);
  mAxisLineGeom->addPrimitiveSet(mAxis1NegativeFaces);
  mAxisLineGeom->addPrimitiveSet(mAxis2PositiveFaces);
  mAxisLineGeom->addPrimitiveSet(mAxis2NegativeFaces);

  mAxisLineWidth = new ::osg::LineWidth(2);
  mMajorLineWidth = new ::osg::LineWidth(2);
  mMinorLineWidth = new ::osg::LineWidth(1);

  mAxisLineGeom->getOrCreateStateSet()->setAttributeAndModes(mAxisLineWidth);
  mMinorLineGeom->getOrCreateStateSet()->setAttributeAndModes(mMinorLineWidth);
  mMajorLineGeom->getOrCreateStateSet()->setAttributeAndModes(mMajorLineWidth);
}

} // namespace osg
} // namespace gui
} // namespace dart


text:
struct _Bind_common_static_plugins_CEL
{
  _Bind_common_static_plugins_CEL ();
};
namespace { _Bind_common_static_plugins_CEL bind_common_static_plugins_CEL; }


text:
<?php

namespace Drupal\KernelTests\Core\Config\Storage;

use Drupal\Core\Config\FileStorage;
use Drupal\Core\Config\CachedStorage;
use Drupal\Core\StreamWrapper\PublicStream;

/**
 * Tests CachedStorage operations.
 *
 * @group config
 */
class CachedStorageTest extends ConfigStorageTestBase {

  /**
   * The cache backend the cached storage is using.
   *
   * @var \Drupal\Core\Cache\CacheBackendInterface
   */
  protected $cache;

  /**
   * The file storage the cached storage is using.
   *
   * @var \Drupal\Core\Config\FileStorage
   */
  protected $fileStorage;

  protected function setUp(): void {
    parent::setUp();
    // Create a directory.
    $dir = PublicStream::basePath() . '/config';
    $this->fileStorage = new FileStorage($dir);
    $this->storage = new CachedStorage($this->fileStorage, \Drupal::service('cache.config'));
    $this->cache = \Drupal::service('cache_factory')->get('config');
    // ::listAll() verifications require other configuration data to exist.
    $this->storage->write('system.performance', []);
  }

  /**
   * {@inheritdoc}
   */
  public function testInvalidStorage() {
    $this->markTestSkipped('No-op as this test does not make sense');
  }

  /**
   * {@inheritdoc}
   */
  protected function read($name) {
    $data = $this->cache->get($name);
    // Cache misses fall through to the underlying storage.
    return $data ? $data->data : $this->fileStorage->read($name);
  }

  /**
   * {@inheritdoc}
   */
  protected function insert($name, $data) {
    $this->fileStorage->write($name, $data);
    $this->cache->set($name, $data);
  }

  /**
   * {@inheritdoc}
   */
  protected function update($name, $data) {
    $this->fileStorage->write($name, $data);
    $this->cache->set($name, $data);
  }

  /**
   * {@inheritdoc}
   */
  protected function delete($name) {
    $this->cache->delete($name);
    unlink($this->fileStorage->getFilePath($name));
  }

}